Displayspeech after a time

Started by MalleTheRedPhoenix, Sun 11/05/2008 22:35:48

Previous topic - Next topic

MalleTheRedPhoenix

I have a problem.

I want that the character says a sentence after I didn't something in the game.

Example:

I'm in the startscreen and I have to click on the start-button. The character begins to be nervous and says: "Please click on the start-button."

After a short time, when I didn't something again, the character says: "Didn't hear me. I said you must click the start-button to start the game." etc.

Can somebody help me?

TwinMoon


MalleTheRedPhoenix

#2
Can you give me an example or how should I write it in the script?

And where should I put it: In R. Execute or Players Enters Room (a.f)?

TwinMoon

#3
in room_Load or room_AfterFadeIn, put:

Code: ags

  SetTimer(1, 400);


40 is one second, so 400 will be about 10 seconds.
in the repeatedly execute of that room, put:

Code: ags

if (IsTimerExpired(1) == 1) {
  character.Say("Please click on the start-button. It's getting boring now.");
}

Khris

And add SetTimer(2, 400); after the .Say for the next sentence.

MalleTheRedPhoenix

Thanks for the help. It functions! :)

SMF spam blocked by CleanTalk