random talk (SOLVED)

Started by zeta_san, Fri 15/12/2023 17:39:25

Previous topic - Next topic

zeta_san

Hi everyone
I would like to find a solution to a problem.
My character enters the quesroom and there are 2 talking
I would like them to say random sentences, different sentences every time I enter.
I also read some solutions here but I can't solve it

Rik_Vargard

I suggest this for random stuff:

Code: ags
int Talk1 = Random (2);  //character 1 talking (3 possible answers here > 0, 1 & 2)

if (Talk1 == 0) cCharacter.Say ("Blah blah."); // random = 0
else if (Talk1 == 1) cCharacter.Say ("Bah bah."); // random = 1
else cCharacter.Say ("Bye"); //random = 2

zeta_san

Thank you ! I'll try and let you know

zeta_san


Rik_Vargard

Glad I could help :)

SMF spam blocked by CleanTalk