99Instances2Go's Forum Posts

  • Hello, I read the documentation but can not find the way to find out what is the point that is currently walking.

    Something like a variable named

    CurrentPoint

    This would return the point number that is currently walking.

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

  • You use a bit more memory then needed by having different objects and by setting them invisible instead of destroying them.

    Setting them invisible will not do the trick. They still collide/overlap. They still count in .. in the iterations and the evaluations, and therefor they also bring performance down. If you really worry about memory and performance, then you destroy them when not needed. Only destroyed sprites have no graphics in memory and are not seen by the events.

    You can of course add 'is visible' to each event. But then you are even farther away from home.

    You think to much in 'IF this THEN that'. You must learn to think in service of the PICKLIST (selected objects list)

    To choose a spawner that is not occupied by a 'sprite' you do this ...

    Is spawner overlapping sprite (inverted)

    Pick random spawner.

    The first condition picks all spawners that do not overlap a sprite. That is the picklist. The second condition takes that picklist, and pick from there a random spawner. Done and over with. Just need a exception for when all is occupied. (wich you currently dont have and can not do that way, would be an endless loop)

    Then, to minimise code, you should work with instances of the same object. There is a plugin "nickname" that can help you if you really want different objects. But. Really. A 'healer' is an instance with an instance variable/boolean set to 'healer'. Another instance can be a 'hunter' by setting that instance variable to 'hunter'. As simple as that. So to spawn a 'soldier', or 'priest', or a 'worker' ..you do something like ...

    (I have no idea why your enemypicker goes in steps of 2)

    Spawn Sprite

    Set Sprite.type to enemypicker (a dot to say it is an instance variable)

    Set sprite's animation to str(enemypicker)

    Set some more abilitys, or have an array with the abilitys on the Y-axis, with the X-axis sync with the types.

    One event for everything.

    I wonder why you need an array with the UID's. You can build that array on any moment with a simple loop, on any moment. Without maintaining it with pushes. Why do you need that anywayz ?

    Check if 'player' collides with 'healer' is as simple as ...

    Global variable 'healer' = 1 (if healer is first type)

    On 'player' colliding with 'Sprite'

    Sprite.Type = healer ?

    Do stuf .....

    All this goes for different sprites in a family too. Besides that you can not create members of a family the same way. Need the 'nickname' plugin to do that.

  • Need x times empty frames in the animation. (animation speed = zero) Set frame to next frame before loading image (event 2).

  • Darn, i thought that was standard. Haha, i dont even know anymore wich of my plugins is 3th party.

    Ty for correcting.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using RayCast .... plugin-jcw-trace-raycast_t172320

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

    I did not know that this plugin is so fast, first time trying it out. Johncw87 ty for the plugin!

  • I saw you first bug report. But i am afraid it works as intended. You ALWAYS draw with tiles selected in the tilebar. And the way it is now, it is pretty straight forward. Not that i see any use in how it works, really. I wonder if anyone used it that way.

    I felt a bit awkward with the answer you got. As a capx would explain/point to any thing in C2's basic interface. A thing that is there for any possible capx.

    I agree that it would be usefull if it was possible to select a region in the tilemap (not in the tilebar) and copy/past that where you want. And even just drag that region arround on the tilemap. But i suppose, that is more a future request then a bug catch. (still possible that i did't find out how to do that)

  • Distance for a full circle = 2*Pi*R

    Distance for a certain angle = ((2*Pi*R)/360)*angle .. R being distance(object.x,object.y,pivot.x,pivot.y) ... on the moment of collision.

    Speed = distance / time

    It must travel at 20 pixels / tick

    So for 1 tick .. ((2*Pi*R)/360)*angle should be = 20

    ((2*Pi*R)/360)*angle = 20 ... how much angle to rotate per tick ? (R is known)

    ((2*Pi*R)/360) / 20 = 1/angle ... or angle = 20 / ((2*Pi*R)/360)

    Hope this stands, not that big of a math brain. Dont forget to 'dt'.

  • You dont secure the state before going to layout 3, as you do before going to layout 2.

    Just do the same. Button clicked ... backup ... change layout.

  • Well then push a solid under it on jumping, eh.

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

  • I suppose slippery means 3 things. Slow acceleration. Slowly decelerate. Animations.

    For the first two you have the actions ... Sprite > platform ..

    Set acceleration & Set deceleration

    Setting the deceleration to a low value will slip.

  • It can be automated with 1 included event sheet. Did you see the post i linked to ?

  • I have no idea why the pin is not recalled by the persist behaviour.

    Some one brighter than me will probably find the cause or mark it as a bug.

    In the mean time, if you need a workaround, here is one, by 'assisting' the persist. Just 'mimic' what it supposed to do:

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

  • Place helper objects on the corners ? On overlap .. play ..

    In this post the placing of those helpers is automated.

  • No, it is an easy way to mark newly created instances and to pick them out of the not newly created instances, in the next top-event on the moment that they are available to pick.

    If you use containers, picking one always picks the others.

  • Ah !