Script pause?

Started by , Sun 18/01/2004 13:59:52

Previous topic - Next topic

Dale

Hi,

I have problem with scripting.
I want to use a hotspot with an item, which will trigger a removal of said item from inventory, then a conversation dialog to be run. After the conversation has ended, I want a character view animation to be run.

I have a Conditional (if inv. item was used)

then as children:-

Game (Run Dialog)
THEN
Player (remove item from inv.)
THEN
Character (Quick animation).

The problem is, the animation runs BEFORE the dialog conversation, and after the item is used on the hotspot, EVEN though they are in the order I described above.

How can I get it so the animation plays AFTER the dialog has ended? Do I have to put in a wait command or equlivalent?

Thanks for any help you can offer; enjoying using AGS so far! :D

Shadow

#1
I don't know if I understood exactly what you wanted, my english is not so good. But try to put this in after Run Dialog:

while (character[EGO].talking != 0){
Wait (1);
}

the script should wait, until your Maincharacter stops talking.
Don't know if it works. Try it out.

Dale

Hi,

Thanks for the fast reply.

Unfortunately that doesn't seem to work; I get an error:

'talking' is not a member of 'GameCharacter'

Any other ideas?

Ishmael

#3
The dialog is run last bacause allways, no matter where in a single function it is, the RunDialog is processed last. So:

If I understood correctly, I think you should do this:

Just put:
Game (Run Dialog)
in the conditional.

Then, in the dialog script, put:

lose-inv x
set-globalint 1 1

or if Globalint 1 is used, replace the first 1 with a free number.

Then, in the room repeadetly execute:

Use a conditional to check if the above selected globalint is 1, if it is, do the character animation, and set the globalint back to 0.

Can you make anything out of this?
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