Cut scene triggered by puzzle

Started by Eleri, Fri 20/05/2011 02:34:08

Previous topic - Next topic

Eleri

Have been having a bit of trouble finding the proper code for this set up:

Player is in puzzle screen- if they solve puzzle correctly, they get cut scene A, if they don't, they get cut scene B

I'm unsure of the variable you'd use to pick one cut scene or the other based on the player actions.




Khris

Since it's A or B, a bool is all you need.
Create one via the Global variables pane, e.g. "puzzle_solved", initial value "false".

If they solve it, call:

Code: ags
  puzzle_solved = true;


Then go to the next room, and in before/after fadein, check it:

Code: ags
  if (puzzle_solved) {
    scene A
  }
  else {
    scene B
  }

Eleri


SMF spam blocked by CleanTalk