Adding lives
How do i add lives. I have working health but how do i add lives to it. When i touch the fire it just respawns. So i wanna add 2 lives, and i lose them when health hits zero???
-
As in, you can take 2 hits? If so, just adjust how much damage those things deal so it would take 2 hits before the health manager will be knocked down to 0.
-
You could try something simple like a counter. Give it a max of 2 and increment it when you die.
The counter would probably be best placed in the scene and incremented with a wireless transmitter & receiver.
Once you die twice the counter output activates the end game.
Display remaining lives using a calculator with port A having a value of 2 minus the counters current count connected to port B. Connect the calculator output to a number displayer.
Hope this points you in the right direction.
請登入寫評論。