Screen fade after death

basically i just want that black box (same size as the camera or whatever) to slide up when you die or click r (reset button) and then go back down when you respawn (so like it goes up stays for a second or so and then goes back down and your character has reset)

Do you reload the scene to start again? If so, the following steps will work:

  1. in the scene editor, set the black box so it covers the whole playing screen. Tip - put it on another layer (say named “Blackout layer”) and place it above all the other layers. You can then hide the blackout layer in the editor so you can still see and access objects on other layers.
  2. add tween behaviour to the black box object.
  3. in the events add the following:
1 Like

it worked perfectly good but now i have a new problem, so i duplicated the r key code but replaced the condition with when the characters death varible is 1 then that happens but when i test the game its just a black screen

Add a trigger once to the checking death condition. It’s most likely firing off repeatedly, which you don’t want.