Game over

This is the end part of the game. All we need to do now is show the user after someone has won the game.

  • Create a new group called “GameOver”
  • Create a new sub-event below.
  • Add the condition
    • Look for “ Common conditions / Variables / Value of a scene variable
    • Set Variable = gameRunning
    • Set Sign as =(equal to).
    • Set Value = 0

    This condition would mean that someone has won, and the game must now be stopped.

  • Add a sub-event to this event
    • Add a condition
    • Look for “ Advanced / Trigger Once”.

  • Add action to this event
  • Look for “ Layers and cameras / Effects / Show a layer ”.
  • Set Layer = “GameOver”.
  • Add another action
  • Look for “ Text object / Style / Modify the text
  • Set Object = WinnerText.
  • Set Modification as +(add).
  • Set Text = VariableString(Winner).

  • Add another action
  • Look for “ Text object / Effects / Change text Opacity ”.
  • Set Object=WinnerText
  • Set modification to +(add)
  • Set value as 255×TimeDelta()

This is what the “GameOver” group should look like at the end of it all:

Try running your game and sharing it with your friends! You are completely done! Good job!

Bonus!

Still looking for more? There is a lot more to do! This was just a basic game. Move ahead if you wanna add a ManaBar and make wizards shoot spells and use the remaining game assets that I've left untouched in the resources!

Move ahead to the next part!