Can not reset my level with button press because my puppet is dead
When the player dies I want them to be taken to a screen with some text and a prompt to press a button to reset the level. The problem is that because the puppet is dead the button will not work.
I've given my puppet a health value of 6. In my level I have trigger zones and if the player performs an action six times in these trigger zones they will die. I've set this up by using an AND gate with the trigger zone and the button press. This feeds to a counter that counts down from 6 to 0 which in turn feeds into the health value of the puppet. When the puppet dies a signal is sent from 'Is Dead' output of the Controller Sensor to a camera and text gadget. I removed the connection from the 'Is Dead' output to the 'Respawn' input because this would take the power away from the camera. Also, because the counter is still on 0 the puppet immediately dies again.
I'm not sure how to get around this.
-
So, anytime you want to control anything not your character you'll need a seperate controller gadget.
I'd suggest stamping a new controller gadget, setting to remote control and wiring the origional controllers 'is dead' into the power of new controller. Then when the puppet dies your new controller becomes active(and is not active while alive).
Then on the new controller map the button you want the user to press to 'respawn' on the puppets origional controller.
You also want to map this button to Reset counter input on the counters trigger zones.
This is theoretical as I'm away from game and I havnt done this specifically. -
Yes, I did think that I should add another controller gadget, but didn't think to pass the "is dead" wire through it. You are also right, I should send a signal to the counter to reset it. I'm at work at the moment so I can't try it out. Thanks for the tip.
Trying to work out logic is like playing little puzzle games that you've invented for yourself. :)
Por favor, entrar para comentar.