Object confused when another is destroyed

Get help using Construct 2

Post » Fri Apr 01, 2016 1:35 am

I will post pictures if needed but basically I have 2 main objects and a 3rd object that determines when one object is within range of another (overlapping).

- Soldier object has an invisible circle object around him called Range.

- When the Enemy object is overlapping Range the Soldier targets the Enemy.

- When the Enemy is not overlapping (either the enemy runs or is destroyed), the Soldier is SUPPOSED to continue doing his task.

- Everytime the Enemy dies his respawn time increases (this is how I found the issue)

What actually happens is that the Soldier behaves normally when the Enemy is alive, both when Enemy is overlapping and not overlapping the Range. However when the Enemy is destroyed while overlapping Range the Solider continues to target where the Enemy was UNTIL the Enemy respawns, which then he acts normally again.

So during the time that the Enemy object is destroyed the Soldier still thinks the object is alive in that previous spot. I DO destroyed the Enemy sprite. I also have tried working around On Enemy destroyed by using variables and whatnot, but it seems like there's something in the Construct 2 logic that I do not understand.


Posts: 37
Reputation: 729

Post » Mon Apr 04, 2016 3:08 pm

You should condition NORMAL behavior on some other flag, then change that flag on overlapping or not.
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
Posts: 1,419
Reputation: 4,867

Return to How do I....?

Who is online

Users browsing this forum: burak22 and 12 guests