Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Arjunaz78 on Sun 16/10/2011 06:40:28

Title: Alternate or Different Game Story
Post by: Arjunaz78 on Sun 16/10/2011 06:40:28
I want to create a game that include different or alternate game storyline when player choose or take action when different game situation/options in game trigger..how can i make it?

THX.
Title: Re: Alternate or Different Game Story
Post by: RickJ on Sun 16/10/2011 08:49:13
SMOP (http://en.wikipedia.org/wiki/Small_matter_of_programming)


*** Script Header ***
import int GameOption;

*** Global Script ***
int GameOption;
export Game Option;

*** Any Script ***
function PlayerChooseSomeAction() {
   GameOption = 1;
}
function PlayerChooseSomeOtherAction() {
   GameOption = 2;
}

function AnyFunction() {
   if (option==0) {
      // Do Something
   }
   else if (option==1) {
      // Do Something else
   }
   else if (option==2) {
      // Do Another Something else
   }
   else {
      // Opps, shouldn't ever be here
   }
}
Title: Re: Alternate or Different Game Story
Post by: Khris on Sun 16/10/2011 14:24:40
Yeah, use variables.
http://www.adventuregamestudio.co.uk/actutor.htm (bottom half)
Title: Re: Alternate or Different Game Story
Post by: Arjunaz78 on Mon 17/10/2011 17:36:10
Ok...thanks mate...i'll try it first   :)