Auto restart for scene

Does anyone know if there is a way to make it so when the main char actor dies the scene resets itself including resets the life meter and hit points for the main character so that when the scene restarts its just like you started that game there without having to go back and physically chose to start that scene over. It would be greatly appreciated if anyone can assist me with this. thank you

Comments

  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    ok lets just say that your life meter and hit points are both interger attributes and are both default set to 5.
    im presuming life meter is the lives of the actor,
    and every time the actor is hit it loses a life becomming life meter 4, than 3 and so on.

    anways
    <<START OF RULE>>

    create a rule in your actor
    if attribute life meter = 0 (meaning hes out of lives therefore he is dead)

    do>
    change attribute life meter to 5
    change attribute hit points to 5
    timer after 0.1 seconds change scene (to the same scene)

    <<end of rule>>

    hopefully this makes sense.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    You need to code a reset and change all game attributes to their default. You can use the reset scene behavior to reset the scene but not the game level attributes. Remember coding is not automatic the computer does what you tell it. So yeah there are no short cuts you need to code everything. See my video series on GS Logic.
Sign In or Register to comment.