how to make an icon like life dissapear one by one after the main character being hit by obstacle.
i have try use destroy but it destroy all 3 life at same time.need some rule to make it dissapear one by one if being hit..
Best Answers
-
jamie_c ImagineLabs.rocks Posts: 5,772
I find it easiest to use the Replicate Behavior for you icon and reduce the number of Copies by 1 each time you're hit. -
jamie_c ImagineLabs.rocks Posts: 5,772
If you put the Replicate Behavior within your actor (whatever it is) and then control its Count amount with an Attribute.
For example if you keep track of your players lives with an Attribute called Life. Lets say the player starts with 3 Lives.
So in your life icon actor you would use the Attribute Life for the Count number in the Replicate Behavior. Then when the value of Life is 3, 3 icons will show on screen. When the Value of Life becomes 2, only 2 icons will show, and so on.
Answers