Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Thegluestickman on Sat 16/01/2010 04:30:49

Title: Or/else function?
Post by: Thegluestickman on Sat 16/01/2010 04:30:49
Is there some type of or/else function in AGS? In Action Script 2, there was an else feature so if you need something to happen without variables you could use else. For example:

if (game.score >70) {
Display("You've won the game!");
} else {
Display("Keep getting points.");
}

Is there anything like that in AGS?
Title: Re: Or/else function?
Post by: Calin Leafshade on Sat 16/01/2010 04:34:24
that is exactly how the AGS command works


if (condition) {
  DoStuff();
}
else if (condition) {
  DoShit();
}
else {
  DoTheBartMan();
}



although i love the idea of an "Or else!" function,


Make_My_Game_Awesome() or else!;

Title: Re: Or/else function?
Post by: Thegluestickman on Sat 16/01/2010 04:47:30
Quote from: Calin Leafshade on Sat 16/01/2010 04:34:24
that is exactly how the AGS command works


if (condition) {
  DoStuff();
}
else if (condition) {
  DoShit();
}
else {
  DoTheBartMan();
}



although i love the idea of an "Or else!" function,


Make_My_Game_Awesome() or else!;



Oh okay, Thanks a lot. Oh and lolatorelsefunction.
Title: Re: Or/else function?
Post by: Khris on Sat 16/01/2010 14:03:02
Please rtfm first.
http://www.adventuregamestudio.co.uk/manual/Script%20language%20keywords.htm