About dialog and animations?

Started by jimbow, Thu 22/01/2004 07:07:31

Previous topic - Next topic

jimbow

Hello!

I have two questions:

How could I make the game run an animation loop after I have chosen a certain alternative from the dialog?

And it would be nice if the animation wouldn't start if the character wouldn't have a certain inventory item with him/her/it.


Reno Caspain

You could put the run-script command in the dialog script, for example:

(in dialog you want to run the animation in)

run-script 1 //This runs the script 1 from dialog_request function in main script


(in main script)

function dialog_request (int xvalue)
{
if (xvalue==1)
  {
  if (character[character number here].inv[inventory item number]==1) //checks whether the character has the item
     {
      AnimateCharacter(parameters here); //runs the animation
     }
  }
}

In case you need the game to wait until the animation ends, you could use the AnimateCharacterEx function instead of AnimateCharacter.


jimbow

Thank you for your quick response!

I'll go and try this.

SMF spam blocked by CleanTalk