Enemy respawn, repeated kill issue?

TobyToby Member Posts: 478
edited November -1 in Working with GS (Mac)
Have an enemy respawing from a specific XY location after being killed.

Enemy has a (boolean) game attribute applied called enemy1die (true = die and respawn... obviously)

The problem happens either when I'm close to the spawn point or on it. I was play testing the death routine and got to a point where I was shooting repeatedly at the respawn point and killing the enemy on respawn continuosly.

After a few kills 10>20 or so the enemy becomes invunerable to my bullets?

Is 'enemy1 die' staying true somehow and not reverting to false soon enough or could this be a bug?

Comments

  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    can you type out your behavior logic so we can understand please?

    I just had a thought though. When you say respawn, do you mean destroy that actor and create a new one, or change position of the actor back to the start point.

    Give that enemy a Display Text of the linear velocity X, or which ever direction it is moving. And also if gravity is affecting it.

    Reason: If you are constraining a position of an actor, all you are telling it to do is redraw the actor at that position every frame. If there are acceleration forces on that actor(gravity, acceleration behavior) then they keep increasing the linear velocity until they hit something that stops it. So even though it doesn't look like its moving due to the constrain of the position, it does have an increasing linear velocity.
Sign In or Register to comment.