Some properties being retained in recycled actors

Nomosoft

  • Posts: 122
When I recycle an actor immediately on collision, then create a recycled actor of the same type, the new actor's Y-speed and rotation speed are both still set to the previous actor's values. This happens even if I use a "set y-speed to 0" block immediately before using "recycle self." So, not only do some values seem to be carrying over, it would appear that new values (at least those set in a collision event) don't take effect, immediately. I don't know if there is some sort of buffer that sets the properties the following frame, or what, but it may need to be flushed on a recycle call.

If I "create recycled" twice, without a "recycle" call in between, the values are zeroed out.

hansbe

  • Posts: 262
This happens for me too. My (long) bullets point the wrong way for a frame after recycling, then rotate to whatever i set it to in the next instruction.

It doesnt happen for every actor though, so it might have to do with the "threading".

hansbe

  • Posts: 262
Here's a hack that seemed to fix it.

  • Create recycled actor
  • Hide sprite
  • Position and rotate
  • "do after 0.01 seconds" { show sprite for New Bullet }.

Anyway the "bug" seems to be that for the first frame the recycled actor seems to be ready to be drawn, although it's not. It needs some sort of update, or the first frame must be skipped.