99Instances2Go's Forum Posts

  • Cant find that bug in my example.

  • Shortest path to first available tile.

    https://www.dropbox.com/s/d12hf0jnyudhl ... .capx?dl=0

  • Dont need a dirty way. : )

    You will learn to understand 'picking', which is a major actor in Construct's game.

    https://www.dropbox.com/s/aplwnnx4q8zub ... .capx?dl=0

    Step by step, you will get there.

  • is [Obj] the same object ?

    If so, then 'On Left button Clicked on [Obj]' selects 1 instance of [Obj]. It ads that object to an internal list: The Picklist.

    All following sub events start picking from the objects in the picklist, and (on there end) adjust that list.

    Since that list contains only 1 instance (the instance clicked by the mouse), .... 'Is overlapping [Obj] at offset' has no other instances to evaluate.

    Hence, the 'Pick nth instance' has to pick from an empty picklist, that condition will therefor always be false.

    Do you have access to family's ? (paid version)

  • Did you download file by file maybe ? Google drive has a download button on right top to download it as 1 capx.

  • The difference between how the Platform behaviour acts with solids and how it acts with Jumptrough, lays in the simple fact that Jumptroughs disable the Platform's 'Push-out-of-Solids' mechanism (under certain circumstances).

    Short story: when the platform breaks trough the boundary's of a Jumptrough it will not push that object out of that solids polygons.

    Your cat has frames with different sizes. As a result you have origins that wander and collision polygons that ramble.

    The cat will, due the animating origins and polygons, dive into the solid for 1 pixel. Since it is a Jumptrough, it does not get pushed out.

    Most people will tell you that the solution is a 'helper object'.

    At 1 point, when you going to add non native moves to the platform behaviour, a 'helper object' will be part of this solution. But wandering origins and collision polygons will bring you even more problems, problems that you have not seen yet.

    My suggestion: better take care of the animation frames.

    https://www.dropbox.com/s/j5uhvq2g88hfx ... .capx?dl=0

    Other suggestion: use a tilemap for the platforms.

  • On 'Start of layout' happens 1 time and in the time of 1 tick.

    A 'for' loop happens in the time of 1 tick.

    So, the system will once and only once visit that "every second" condition.

    To make that 'every second' work, the system needs every tick access to it, the system will look if its time to fire its events, if not it moves on.

    You need two global variables.'lvl2Rand' (=zero) and 'Counter' (=zero)

    In that On Start of layout event, you can set lvl2Random as you did.

    Outside that event, and as a top event :

    On every (1) second.

    _____sub event : System compare 2 values ... 'Counter' ... is < ... 'lvl2Rand'.

    _____Action .. spawn 1 object

    _____action .. add 1 to 'Counter'

    Now the systems eye will look into that condtion 'every second' each tick. When its time (1 second) if will fire the sub events. When it is not time yet, it will skip that event. That is how it does that Every x seconds.

  • That works. But it is a bit 'the old way'. It can be done faster today, with loops (in the background) optimised by C2 code.

    First give the Sprite an instance variable, lets say 'Yposition'

    Top-level event

    or system > condition > Trigger Once While true (when you want to do it only once)

    or system > condition > Every Tick (when you want to do it continues)

    _______Action > Sprite > Set value > 'Yposition' = Self.Y (this loops (optimised) trough the sprites and sets the instance variable for each)

    _______Action > System > Sort Z order > object = Sprite ... Instance variable = 'Yposition' (this will set the Z order for (another optimised loop) each sprite based on Y, nicely packing the indexes)

  • Lets converge.

    If this works:

    https://www.dropbox.com/s/qrtegi0qmx6a4 ... .capx?dl=0

    What do i miss ?

  • It is important for the project that you learn to use instances.

    https://www.dropbox.com/s/5fqmts3tkqaw6 ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound

    I tested his capx with your excellent Chipmunk Physics as engine. The objects fall and collide while resizing. Even with a sine behaviour (size) attached. So it works flawless as one would expect.

    But now, after your suggestion, i doubt my suggestion. Does Chipmunk has the same (or other) problems with recalculating polygons ? (As in animations by instance)

  • Thats true, the collission polygons of the box keeps things inside the layout. That was a very bad suggestion.

    I dont know if this 'collission' is supposed the act a 'physics collision', i suppose not.

    Then i dont see a problem.

    Give the player parts an identification instance variable, say 'id'.

    Player instance variable 'id' = bristle.

    On (player) overlapping (enemy)

    ............ do stuff

  • 8Direction for Player2 is enabled.

    There is nowhere an event that sets it to disabled.

  • Do the collisions on the bounding box ? With correct polygons.

    The the bounding box is what moves the whole system anywayz.