non blocking cutscene

Started by Iago, Sun 06/02/2005 10:38:45

Previous topic - Next topic

Iago

I want a NPC to do stuff, while the player is playing:

The NPC shall take a wrench lying around, say "This could be useful" and then put it in his pocket. Then the NPC shall take another tool and do the same, infinitely, until the player chooses to talk to the NPC.

I tried putting this script into the "player enters room" event:

AnimateCharacterÃ,  (4,0,4,0);
DisplayMessage (11);
AnimateCharacter (4,2,4,0);
DisplayMessage (14);
AnimateCharacter (4,3,4,0);

The problems are:

The animations are not displayed, instead, you see him in his talking view (I don't want to see his talking view)

The messages are blocking, so the player cannot walk around when the NPC speaks.



any help would be very appreciated!  :)

Rui 'Trovatore' Pires

DisplaySpeechBackground, or something of the sort, sure is a handy function, ain't it? It's in the manual, too. ;)

But I think you may have to fiddle a bit with repeatedly execute, making sure that the animation is over BEFORE displaying the text.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Because AnimateCharacter isn't blocking, you don't see the animation because you keep starting a new one before the old one had time to play.

The way you need to tackle this sort of situation is put some code in the room's Repeatedly EXecute event to check if the NPC is currently doing nothing. If they're idle, then run an animation on them.

SSH

12

Iago

thanks!  ;)

This could  help me a lot...

But I think I'm going to keep it simple (i.e. cutscene not running in background) because otherwise I'll spend too much time on it. and then It could even not work correctly...  :-\

I thought it would be easier to do.
But again, thanks for the answers.  :)


SMF spam blocked by CleanTalk