Ashley's Forum Posts

  • Families and Sprites pick instances totally separately. So it is actually intended behavior if you make this event:

    + Mouse clicked on Family1

    -> Set text1 to Family1.Expression

    -> Set text2 to SpriteInFamily1.Expression

    then 'Family1.Expression' returns the expression for the clicked Family1 instance, but 'SpriteInFamily1.Expression' returns as if it were an unreferenced object. It doesn't matter that it's in the family, it may as well be a different sprite not involved in the event at all, because families keep their own picked instances. Some users deliberately take advantage of this fact to be able to set up advanced picking, e.g. handling collisions.

    Knowing that, perhaps this is not a bug and just a misunderstanding?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • newt - they won't be affected. The only thing is whether or not 'for each' still iterates it, and the object count, IIRC.

  • Firstly, the JSON snippet you have used is more like a dictionary map than an array. It's not a sequence of elements, it's associating "success" with "true", and so on. This is a better fit for the Dictionary plugin which is coming in the next beta.

    Secondly your JSON must be in a special format for Construct 2 - look at the value returned from Array's AsJSON expression for a 1 x 1 x 1 array:

    {
        "c2array": true,
        "size": [1,1,1],
        "data":[[[0]]]
    }

    Your JSON must also match this format for Array. It's designed to only be used with JSON returned from other Array objects.

  • I can assure you there is no limit on the number of variables you can use anywhere in Construct 2. Are you sure this is not just a problem with your events?

  • I've changed the next build to clean up destroyed instances between top-level events, like Classic does. Hopefully that's a good enough fix? It's really hard in the engine to clean it up in a subevent, I don't think we can support that.

  • Woah, this was a complicated .capx. There are actually three issues combined:

    1: like Physics, manually adjusting the Platform behavior's position confuses it. What happens is when by a wall, you set its X to a bit to the right - that wedges the object inside the wall slightly. Then you test 'is by wall' - the platform behavior thinks it's stuck inside a solid, so returns false. At the end of the tick the platform behavior pushes itself outside the solid as part of its ordinary collision detection, and the cycle repeats - the condition is always false.

    Solution: use 'simulate control' to control platform behavior, instead of manually setting position.

    2: 'is on screen' was always false for the first tick in a layout. So negated 'is on screen' was always true for the first tick. This is a bug and has been fixed for the next build.

    3: OR blocks did not work correctly as subevents to 'for each' loops. This is a bug and should also be fixed for the next build.

    Nice .capx, got two fixes out of it :)

  • This is by design: the collision mask follows the pixels, in accordance to whether you choose align topleft, center or stretch.

    Since if you resize align top-left and just trim off a few pixels, the collision mask should stay exactly where it is so it's still perfectly aligned with the image. If you resize and choose stretch, that's when the collision mask also scales down to fit the image. Do you think it should work differently?

  • Does it run faster if the game is not running at the same time?

    Can you also provide your full system spec?

  • We're aware with issues with appMobi's directCanvas, as the release notes state we're working with them to try and get them all fixed.

  • This has always been allowed. When the trigger fires, it will check all the parent events are true. In this case it's identical to

    + On start of layout

    + a = 0

    -> actions

    It allows you to reorganise events like this:

    + Trigger A

    + Condition

    -> actions

    + Trigger B

    + Condition

    -> actions

    In to this, saving repeats:

    + Condition

    ----+ Trigger A

    ----> actions

    ----+ Trigger B

    ----> actions

  • You do not have permission to view this post

  • You are right you need to format it like var1=1&var2=2. The problem is it can be confusing mixing up & that means "add these strings together" and & which is part of an actual string.

    This expression:

    "var1=" & user.texbox.Text & "var2=" & pass.textbox.Text

    will result in a string like this:

    "var1=usertextvar2=passtext"

    Note the missing & because all your & mean "add strings".

    This should fix it:

    "var1=" & user.texbox.Text & "&var2=" & pass.textbox.Text

    Note the & inside a string meaning it is literally included in the text rather than adding strings together.

    Edit: just to clarify, don't use this for anything remotely serious! I know you know, but I just want to make sure I say it, because this is incredibly insecure :)

  • I'll see what I can do, but the split screen thing is a sort of weird hidden feature - I'm not sure we have much control over it!

  • You only need "" to mark a single " when typing in the parameters dialog in Construct 2. If you are using an external file which you AJAX you can format it normally.

  • Added to the todo list.