Avançar para o conteúdo principal

Pesquisa

Counter that counts deaths

  • Wilikai

    Check out the Variable and Variable Modifier gadgets under Gadgets > Logic and Processing. They're all the way on the right side.

    If you put a Variable gadget outside of your puppet, it will keep the value even if the puppet is destroyed/respawned. Then place the Variable Modifier on your puppet, make it target whatever name you gave the Variable, and have it increment the variable value by 1.

  • KlawUK

    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).

iniciar sessão para comentar.