Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Minimi on Tue 25/05/2004 16:41:20

Title: more dialog request
Post by: Minimi on Tue 25/05/2004 16:41:20
i have for run-script 1 in global script :

function dialog_request (int x1) {
   MoveCharacter(RALPH,160,198);
   }


now I need runscript2 for another runscript, but I can't just do
function dialog_request (int x2) {


so How do I do this?
Title: Re: more dialog request
Post by: Scorpiorus on Tue 25/05/2004 16:46:02
Just organize it in that way:

function dialog_request(int value) {

   if (value == 1) { // next the code for run-script 1

      MoveCharacter(RALPH,160,198);

   }
   else if (value == 2) { // next the code for run-script 2


   }
   else if (value == 3) { // next the code for run-script 3


   }

}