Report this content
We want the Dreams coMmunity to be a safe, diverse and tolerant place for everyone, no matter their age, gender, race, sexual orientation or otherwise. If you believe this content to contradict these principles, you can file a report for our coMmunity teams to investigate.
Note that misuse of the reporting tool will not be tolerated.Item being reported:
If you want the lives to work across scenes then
1) put a variable in each scene called eg 'Lives' set it to 'persist' but don't give it a value.
2) add a variable modifier to set 'Lives' to 3 or whatever in your first level.
3) every time you have a 'death' event you need to have logic to calculate what to do - I send mine through a wireless transmitter so I can have my logic in one location.
3) so a 'dead' event I use a variable modifier to -1 from 'Lives', the 'dead' event also goes to the 'respawn' input on the controller gadget to respawn the user because they just lost a life.
4) I have a variable modifier set to 'get' the value of 'Lives'. The output feeds into a calculator input A. I compare if it is equal to 0 in input B. So while you have 1/2/3 lives the output will not do anything. When you lose your last life, the calculator will send a pulse.
5) you plug that pulse into the exit doorway of your scene to end the game (or to a game over screen).