ramones's Forum Posts

  • Any idea why it starts to lag after a while?

    You're creating a lot of HUDRocket sprites. See in event 22 it's constantly creating new sprites when RocketsAvailable > 0. It's always good to always display objectcount in your debug text. You'll see when you collect the first rocket the objectcount starts rising rapidly.

  • The first sounds like you might have some 'on destroyed: spawn object' type events. When you change/restart the layout all the objects are destroyed and that spawns new objects on the next layout.

  • What about collision polygons? Are the frames the same size?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your animation frames probably have different collision polygons and/or origin points which can cause problems with the platform behavior.

    scirra.com/manual/100/platform[/url]]

    Implementing reliable platform movements

    For the most reliable platform movement, it is recommended to use a invisible rectangle sprite with no animations with the Platform movement. Then, the animated player object can be positioned on top of that. Otherwise, the changing size and collision polygon of the object as its animation plays can interfere with the Platform movement's floor, wall and slope detection, causing a shaking or glitchy movement. For more information and a complete guide, see the tutorial How to make a Platform game.

  • "UI" is the layer name.

    X("layer")

    Y("layer")

    XAt(index, "layer")

    YAt(index, "layer")

    XForID(id, "layer")

    YForID(id, "layer")

    Return the current position of a touch in layout co-ordinates, with scrolling, scaling and rotation taken in to account for the given layer. The layer can be identified either by a string of its name or its zero-based index (e.g. Touch.X(0)). The At expressions can return the position of any touch on a layer given its zero-based index, and the ForID expressions return the position of a touch with a specific ID.

    https://www.scirra.com/manual/119/touch

    'parent' in that example is an instance variable that has been added to the Particles object.

    https://www.scirra.com/manual/73/instance-variables

    And "Scroller" is a just the name of a sprite.

  • floor(random(20)) will give you a random number in the range [0,19].

    So if your dictionary keys are "text_0", "text_1", etc. you can get a random one with:

    Dictionary.Get("text_" & floor(random(20)))

  • Oh well I'll leave this here anyway: xml_parsing_1.capx (r132)

  • Here's an example: rotate_towards_touch.capx (r138.2)

  • You have to move the fruit to the GUI layer. And bullet seems to work better than custom movement.

    fruit_movement.capx (r137)

  • whatsThisThreadAbout?

  • Yeah I see if you drop him and catch and then drop him again, 'on fall' doesn't trigger.

    I moved the 'set animation' to below the 'on s key pressed' but that didn't work for some reason. I think because the events below (that set the platform behavour enabled/disabled) were running every tick.

    So I rearranged the events in the 'Carry objects' group. I moved the actions that only need to run once when you pickup or drop a civilian under the keypress event. The only action that needs to be running every tick is the 'set position'. It seems to be working better now - what do you think?

    *edit* forgot the capx **

    civilian_falling.capx (r137)

  • Well 'on fall' does trigger when you drop him:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/falling_anim_1.PNG" border="0" />

    you just need to make sure the moving animation doesn't override the falling one:

    <img src="https://dl.dropboxusercontent.com/u/8367729/construct/pics/falling_anim_2.PNG" border="0" />

  • This is just a picking issue in events 9,10,11,12 of the 'byte all' event sheet. 'System: Compare two values' doesn't do any picking so what you're saying is: if the x/y velocity of the first Little is >800/<-800 then set the x/y velocity of all Littles to 800/-800.

    You should use the physics 'compare velocity' condition instead of 'compare two values'.

  • On collision with base -> stop pathfinding. Would that work?

  • If you mean in preview, clicking the run button will run the last viewed layout. Pressing F4 will run the first layout.