Or/else function?

Started by Thegluestickman, Sat 16/01/2010 04:30:49

Previous topic - Next topic

Thegluestickman

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?

Calin Leafshade

#1
that is exactly how the AGS command works

Code: ags

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



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

Code: ags

Make_My_Game_Awesome() or else!;


Thegluestickman

Quote from: Calin Leafshade on Sat 16/01/2010 04:34:24
that is exactly how the AGS command works

Code: ags

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



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

Code: ags

Make_My_Game_Awesome() or else!;



Oh okay, Thanks a lot. Oh and lolatorelsefunction.


SMF spam blocked by CleanTalk