Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Candle on Wed 26/10/2005 04:11:28

Title: Random messages
Post by: Candle on Wed 26/10/2005 04:11:28
I have been searching the post and did a search of the bfaq and haven't found how to do it . I want when a NPC is clicked on he says a random message .
Can you point me to the right way or how to do it .
thanks
Title: Re: Random messages
Post by: Gilbert on Wed 26/10/2005 04:14:56
int blah = Random(3);
if (blah==0) cMan.Say("Hello!");
else if (blah==1) cMan.Say("Hey!");
else if (blah==2) cMan.Say("Fun!");
else if (blah==3) cMan.Say("Oh!");
Title: Re: Random messages
Post by: Candle on Wed 26/10/2005 04:21:25
Thanks I just found it in the help file and was trying it out when I got the email . thank you for the help. when do you getr time to work on your game?
Title: Re: Random messages
Post by: Elliott Hird on Wed 26/10/2005 08:44:08
What game of his are you referring to? :P We're not all on a project at the moment you know...
Title: Re: Random messages
Post by: Gilbert on Wed 26/10/2005 08:57:16
I have several projects started actually, one of them is near completion, just don't have the time to.

Anyway, enough OT stuff. :=