some questions

This forum is currently in read-only mode.
  • 1. how does the timing of an event/action work

    the reason why i ask, i have some troubles with bullet settings, some things should happen all at once, but there seem some delay between them, like doing bulletsettings i call a function to do multiple settings,and then after function set a sprite position to the bullet, there some time between them how should i make sure everything happens at the same time

    2.

    could there be some problems with fast collision detection on multiple objects at once, i beginning to think that it sometimes skips some events or something, as my code works if you take one hit at a time, but when i do one big blowup some things are getting messed up

    if you use for each object collision with object, it should do all the events for each object on collison should it?

    3. countmatching,

    i litrally got crazy today as i didnt get this to work

    so i have an event where some sprites are counted as the same group, when destroyed, the count goes down like it should, but it nevers reaches 0, i want it to do this way so there can not be a mistake in collison detection, substracting from a var, it has to do with the condition gets false before reaching zero (i think), but why doesn't it gives zero as there are no matching events .. so 0!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1. how does the timing of an event/action work

    the reason why i ask, i have some troubles with bullet settings, some things should happen all at once, but there seem some delay between them, like doing bulletsettings i call a function to do multiple settings,and then after function set a sprite position to the bullet, there some time between them how should i make sure everything happens at the same time

    Not quite sure what you mean here. Could you post a .cap of the problem and a description of what should be happening?

    2.

    could there be some problems with fast collision detection on multiple objects at once, i beginning to think that it sometimes skips some events or something, as my code works if you take one hit at a time, but when i do one big blowup some things are getting messed up

    if you use for each object collision with object, it should do all the events for each object on collison should it?

    If you combine On Collision and For Each then the For Each will only loop the objects that are currently colliding in that tick. If you want all of them to blow up when only one collides, you need to not pick them. You could do this with a function (Forget picked objects -> Destroy objects), or you could use the Family Picking trick (put each object into two families like Red and Blue, then do On Collision with Red -> Destroy Blue).

    3. countmatching,

    i litrally got crazy today as i didnt get this to work

    so i have an event where some sprites are counted as the same group, when destroyed, the count goes down like it should, but it nevers reaches 0, i want it to do this way so there can not be a mistake in collison detection, substracting from a var, it has to do with the condition gets false before reaching zero (i think), but why doesn't it gives zero as there are no matching events .. so 0!

    Are you certain there aren't any instances lurking around somewhere? Check the debugger and see how many objects you have to make sure there are none. Also, check your order of events, you might be skipping the last "subtract from var" event somehow.

    Again, it would be a lot easier to see what's going wrong if you could provide a .cap.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)