Destroyed actors are being "reused" when spawned

thegwillthegwill Member Posts: 31
edited November -1 in Working with GS (Mac)
I have an actor which is spawned every few seconds and heads across the screen from left to right. The actor also has a counter which increments during its journey across the screen. At the right side it is destroyed using the Destroy behaviour.

I've added a DisplayText to show each actor's counter for debugging purposes.

All is well... until some of the actors reach the other side and then disappear (as expected). But, then they are spawned back on the left side and their counter has continued to increment whereas I'm expecting the counter to be reset to zero given that the actor has been spawned.

I assumed that spawning an actor was basically creating a new instance - is that incorrect?


  • ORBZORBZ Member Posts: 1,303
    That's very interesting.

    Does it happen all the time or after a certain duration or number of spawns?

    How long is the delay between destroy and spawn?
  • thegwillthegwill Member Posts: 31
    It appears to reuse as often as it can and only spawn when it has "run out" of previously destroyed items.

    I just bound the DisplayText to the actor.Time and on the "reused" ones the time stays at the time when it was first destroyed.

    Do any of the engine coders read this stuff?
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    I've seen this before where spawning/destroying of the same actor class results in recycled attributes in "new" instances. I had a game that exhibited this consistently, lemme see if I can find it...
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    We are aware of this issue. Thanks.
Sign In or Register to comment.