Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Thu 21/08/2003 18:25:02

Title: loop help
Post by: on Thu 21/08/2003 18:25:02
how do you run a loop during a conversation  ??? ??? ???
Title: Re:loop help
Post by: Ishmael on Thu 21/08/2003 20:48:28
Was? Dialog_request? In manual?
Title: Re:loop help
Post by: inFERNo on Fri 22/08/2003 09:48:45
Do you mean a character animation loop?
If so, in the dialog script editor put run-script X (check help file) and place the animation in the dialog_request function in the global script.

What I still haven't figured out with the dialog_request and the "X" parameter in the run-script is if you can you run different scripts from one dialog. That means, e.g. putting run-script 1 and run script 2 on two different places in the dialog. How would you call the scripts sepparately in the dialog request? I suppose making two dialog request containing the diffferent parameters won"t work...
Sorry, don't mean to hijack any posts here, this is just a side question..
Title: Re:loop help
Post by: Ginny on Fri 22/08/2003 13:09:07
use an if statement like this:

function dialog_request (dm) {

if (dm==1) {
//whatever loop you want to have
}
if (dm==2) {
//whatever
}

}

So that in the dialog script you can use run-script X with any number as X and each will do something else. :)
Title: Re:loop help
Post by: inFERNo on Fri 22/08/2003 16:28:28
Oh, this is awesome, I really can use that. Great! Thanks!
Title: Re:loop help
Post by: TerranRich on Fri 22/08/2003 16:56:03
Check the Beginners' FAQ for the complete explanation of run-script.
Title: Re:loop help
Post by: Ginny on Fri 22/08/2003 17:08:26
inFERNO: your welcome :)
btw, "dm" can be anything. I meant to write dr, dunno why it came out dm :P