Hello !! Please help, energy shield does not follow the tank1x3 object
Why you don’t use the sticker extension ?
Use “Change position” in seperated event, it will stick
Could you perhaps tell us what you wish to achieve with a bit more detail?
When “upgrade1” is clicked, those listed in the action box should get executed. When “upgrade1” is released, those actions also stop including that “move towards tank” action.
Also note that if it doesn’t have a “trigger once” on it or a variable to prevent it from triggering multiple times, it will keep executing for as long as said button is held. This means it’s probably going to create multiple shields. Just a heads up.
Anyway, if the shield is supposed to stay with the tank then you might want to link them and have another event box to take care of positioning afterwards as mentioned by mysecret. Or use the sticker extension as Throwaway suggested.
But if in the off chance that you want the shield to follow the tank around with the specified speed you set regardless of the tank’s own speed (the shield may get left behind if the tank is faster) then perhaps use permanent force in the “move shield toward tank” line instead of instant force. Also note it might behave weird if it catches up to the tank while tank is stationary. But I’m not sure.
@Trowaway Thanks !! Stick works, but I have another problem, the shield does not destroyed when health of shield is equal to 0
If I may,
How much health does the shield have? If the damage applied exceeds it’s current health, the value can drop to negative. Maybe switch the operation on the health check. Instead of health points = 0, change it to <= (less than or equal to).
@Levio Thanks !! Less or equal to working ! Thanks to everyone for your help !