How change colour of sprite to indicate damage?


#1

Hi, I tried changing global colour of sprite but I want sprite’s colour to revert back to it’s original colour after 3 seconds, I tried setting timer but I don’t know how revert back to original colour value. How to do it?


#2

“255;255;255”

(The post needs 20 characters, so a few pizzas :pizza::pizza::pizza:)


#3

This is the code I used but still couldn’t get the result I wanted. It just turns blue very 3 seconds.

Result I was looking for was when collusion happens it turn colour for 3 seconds and turns back to original colour


#4

I think you need to move your reset to the other event.


#6

Tried it,didn’t work


#7

Add a trigger once condition below the collision condition.


#8

Did do it but, But colour changes only at first collision only!
The are multiple asteroids.


#9

Don’t know if you solved, but in aany case you need to put the planet part inside a foreach planet like
1 -Foreach planet
2 - if planet is in collision with asteroid
2 - Trigger Once
Acton
Change color
reset Timer
Hope this help


#10

Tried it didn’t work. I also tried for each asteroid and got the same results


#11

Try this should work, if not maybe is something in your other events


#12

If you are looking for a blinking effect then you need to use two timers: one is for the overall blinking lapse, the another is for the blinking intermittency during the blinking lapse.