How do I…
Make it so the animation works
What is the expected result
When its at a certain range of health, it changes animation
What is the actual result
It goes trough all the animations
Make it so the animation works
When its at a certain range of health, it changes animation
It goes trough all the animations
You can use pairs of conditions to create ranges.
(use your object variable instead of HP)
HP > 8
HP <= 15
HP > 0
HP <= 8
HP <= 0
Animation not equal to “BrokenWatchtower3”
The last one needs a way to prevent it from being triggered multiple times. Checking the animation would keep it from adding multiple wait events.
It now works like i needed it to, thank you:D
Edit : I was just about to reply. So, the bottom is in reference to the previous post.
The first event in your most recent post keeps restarting the timer as long as there’s a collision and the boolean is true.
You could do something similar to my original reply and use another object boolean like CoolDown.
Something like this.
Conditions
CoolDown of object is false
Collision
Action
Set CoolDown of object to true
Start timer
Condition
Object timer >3
Actions
Restart timer
Set CoolDown or object to false
-----old post - - - - - -
For your method to work, it would need something to prevent the action from being triggered.
Conditions
CoolDown of object is false
Test collision
Actions
Set CoolDown of object to true
Wait
Set CoolDown of object to false
Do whatever else
I prefer a timer over wait. I personally would also use the health behavior. It has a built-in damage cool down. So, this isn’t really something I can provide much help for.
my bad, I thought you haven’t seen it so I made a new topic for that, you can send this message to that topic if you want
I’ll look if that works, thank you:D
Hey, I did what you told me to do but another issue popped up, it also deals damage to with other watch towers when it isn’t supposed to, the start health is 20.
It also removes the circles of other watch towers, if they were placed before the first one is destroyed
here is a link to my game so you can see the issue for yourself: (gd.games game build)
IDK about the damage. As far as deleting object, the matching object(s) need to be picked through a condition. You could link the objects when the other object is added or you could use distance or collision to pick it You would probably need a for each object if multiple collisions can happen.
I tried adding to the damage condition and animation condition “if rebel is below 100 pixels to watchtower”, and it didn’t work either:(
I could maybe fix it by making it so the tower only takes damage when it in collision and not the inner circle, but if I did that, I couldn’t add a way for enemies to make charged attacks(more details in my other post) since it would be right inside the watch tower
I think its also because of this, it removes all the watch towers hp, not one… I don’t know how to fix that, anyone?
I’m not ignoring, I just don’t see any issues.
you should really include the whole event; the context is completely lost.
This is the event:
and it does not filter the WatchTower in the conditions. So damage is applied to all WatchTowers.
You need to add a condition that identifies the WatchTower that should have it’s HP reduced. Does Rebel collide with WatchTower in order to damage it?
it collides with a circle around the watch tower
the inner circle, its “rebelRangeStop1”
the outside circle is the attack range of the watch tower
Okay, I fixed it with the “health” extension, thanks for the help anyways