How to tell when stop is run ina dialogue???

Started by Joseph, Thu 08/07/2010 18:55:09

Previous topic - Next topic

Joseph

Hola IM back    ;D ;D ;D once again but with a VeNGence

is there a way to find out when the stop has been run in a dialogue? I have a code i wrote that i want to run each time stop is run inside a dialog but i dont want to retype that code evertime in each dialogue when you want it to stop.

I woudl place this inside my repeatedlty_execute of course, (like, check if "stop" has run in a dialogue, if "yes", do this code)

ps: http://www.poopreport.com/BMnewswire/972.html
Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

Calin Leafshade

Set a bool to true everytime you run stop, then check for that bool in rep_ex and set it back to false if its true.

so like this:

In dialogue:
Code: ags

  flag = true
stop


then in rep_ex:
Code: ags

if (flag) {
    flag = false;
    //Do your other stuff here.
}

Joseph

Is tehre a way I can do it without adding a bool everytime I run stop? Id rather not have to add anything at all in the dialog scripts...just somehow have it so repeatly execute "sees" when stop has been run  (is there a hardcoded script inisde AGs that says when"Stop" is proccesed?

Ifno t I can do your way with a bool no problemo  :=
Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

Mazoliin

You could replace the stop with a run-script command, and use StopDialog() in the dialog_request function.

Khris

Or just use this:

Code: ags
void Stop() {
  flag = true;
  StopDialog();
}


Then use " Stop();" instead of "stop".

Mazoliin

Why I used a run-script instead of a custom function was due to this line in the manual:

"This command can only be used from within the dialog_request function"

but if this is incorrect, a custom function is a much better solution.

Khris

Oh, right, didn't know that. It might still work as long as a dialog is running. Otherwise, never mind my post.

Calin Leafshade

For christ's sake Khris. Read the fucking manual.... n00b..

Dualnames

Quote from: Calin Leafshade on Fri 09/07/2010 00:55:22
For christ's sake Khris. Read the fucking manual.... n00b..

I see Death coming at you Calin. Khris f$%@ him up. ;)

*Bets on Khris*
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Khris

Hehe, walked into my own trap there, eh?

Well, I tested it, and indeed it doesn't work. I'll be in the corner of shame, if anyone needs me ;)

SMF spam blocked by CleanTalk