Running Dialogs

Started by Babar, Fri 08/08/2003 12:29:11

Previous topic - Next topic

Babar

I already have another problem now. See, I wanted it that when one of my NPCs say something, after that they would disappear (like a spell that causes invisiblity). I chose run dialog in the interactions menu of the NPC, and after that I added a script to move NPC to a different room. The problem is that when the player talks to the NPC, the NPC disappears and THEN the dialog is run. I read the manual and it said that dialogs are run at the end of the script, so maybe thats the problem. How do I fix it so that the player finishes the dialog AND THEN the NPC disappears?
Thanks again
The ultimate Professional Amateur

Now, with his very own game: Alien Time Zone

Necro

Most people put stuff like that IN the dialog.

Check yout the Runscript commeand in the dialogs section of the manual on how to call script commands from within a dialog.

Ishmael

#2
in the dialog, in the end point (where you want the NPC to disappear) put run-script 1, and in the global script create a new function like this (unless you allrady have the function):

function dialog_request(int parameter) {
 if (parameter == 1)
   charater[NAME].room = -1
}

That shoud do it...
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk