Do after block - not working dependent on use. [Answered]

spoogob

  • Posts: 1106
I originally posted about this in the 'unimplemented blocks' sections as thats what i thought it was, until i realised it does work - sometimes.

After lots and lots of testing and playing around, i believe i have found what the issue is.

Using a do-after block with a setting of 2 seconds :-

..inside a scene under 'when created' event - works fine.
..inside a behaviour under 'when created' event - works fine.
..inside a behaviour under event collisions 'Type-Type' - works fine.
..inside a behaviour under event collisions 'Actor-Type' - doesn't work.
..inside a behaviour under event collisions 'Actor-Group' - doesn't work.

there may or maynot be other combinations that do/dont work - the ones above are what i mostly played with. i spent a long time sending prints to the console/log to check all of these, and those are my results.

both my games make use of 'do after' quite a lot when certain collisions happen - so i noticed it fairly quickly that things werent working. i havent included a test game , as i cant see where it would be useful as i cant really 'show' these things. I hope with me testing this lots and giving the info above is good enough to fix the problem. let me know if some form of test game would be useful though.


« Last Edit: October 21, 2012, 10:28:02 am by Jon »

Jon

  • *
  • Posts: 17526
Are you killing the actor in those events in which it doesn't work?

I think that starting in 2.x, there was a strong push to kill timed events that were spawned within actor behaviors.

spoogob

  • Posts: 1106
well it depends. sometimes i use it just to delay a scene switching, or to delay some other non-actor related thing such as delaying music playing or such. i do have actors im killing that have the behaviour that uses 'do after' inside it, but this all worked ok in 2.2 so i noticed it fairly soon after my game worked better in 3.0 (as in, after it worked better so i could actually check things out, what was working, what wasnt.. and this one i noticed fairly quick)


« Last Edit: October 19, 2012, 10:46:18 am by spoogob »

spoogob

  • Posts: 1106
ok ive just tested not killing an actor that uses this, and it works as it should.

Is this the way things are going to go still? I can change the way i do things with actors that used do after, shouldnt be a problem.

Jon

  • *
  • Posts: 17526
Let's put the question out and see what people think.

spoogob

  • Posts: 1106
Good idea.

Im ok either way - but for the sake of not having to go through my first game due to the size of it altering lots of stuff - i wouldn't say no to it staying.