Random messages

Started by Candle, Wed 26/10/2005 04:11:28

Previous topic - Next topic

Candle

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

Gilbert

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!");

Candle

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?

Elliott Hird

What game of his are you referring to? :P We're not all on a project at the moment you know...

Gilbert

I have several projects started actually, one of them is near completion, just don't have the time to.

Anyway, enough OT stuff. :=

SMF spam blocked by CleanTalk