quick animations

Started by viktor, Fri 25/06/2004 20:35:46

Previous topic - Next topic

viktor

I have a little problem.
I have a hotspot and when a player talks to it I wan't an animation to run. So I set a run dialog (so that the dialog is runed first), then a run script option (so a nother character is transported to the room) and then the run quick animation. But the animation is runed before everithing else. What should I do? I understand that I would have to use a script. Strazer already tryed helping me but I didn't understand all too well.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

strazer

#1
Ok, here goes again: :)

"Run script" actions are always executed last in a list of actions in the Interaction Editor.
Since you've done the animation via a "Quick animation" action, it is executed before the "Run script" action. Thus, you have to do the animation with script by adding the following lines to the script of your "Run script" action:

  SetCharacterView(CHARACTERHERE, VIEWNUMBERHERE);
  AnimateCharacter(CHARACTERHERE, LOOPHERE, DELAYHERE, REPEATHERE);
  while (character[CHARACTERHERE].animating) Wait(1);
  ReleaseCharacterView(CHARACTERHERE);

You have to replace the parameters (the ones in CAPITALS) with the values you've used in your "Quick animation" action. This could look like this example:

  SetCharacterView(EGO, 7);
  AnimateCharacter(EGO, 1, 0, 0);
  while (character[EGO].animating) Wait(1);
  ReleaseCharacterView(EGO);

After you're done, you can remove the "Quick animation" action.

Btw, I've noticed in the image you've posted in the other thread that you're using "Run dialog" actions for letting the player character talk when you look at something, for example.
That's not what dialogs are supposed to be used for. You'll eventually run out of topics too (the maximum is 500 at the moment).
I suppose you don't want to use "Game - Display a message", so I suggest doing the following instead of the "Run dialog" actions:
- Select a "Run script" action.
- Press the "Edit script" button
- Write
  DisplaySpeech(GetPlayerCharacter(), "The player character is saying this text!");

Edit:
Added while... line so game waits for animation to finish before continuing

viktor

HEHE. I'm going nuts :P.
Look I'm a REAL ROOKY when it comes to animations (actualy this is my first). The animation does not run. I copied the example you gave me and changed the loop number and view number.  I didn't change EGO since EGO is the characer I want to be animated.  Since the manual does not contain any information on this perdicament (or at least I didn't see it) I would like it if someone would lead me from scrach. Where to import the images. In which wiew and in which loop, etc.
But it would be nice if this defoult would be somehow fixed in the newer wersion of AGS. Since it would be a lot easier for people who don't know how to script (like me) to make animatins. Or does this defoult function serve a purpose?
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

viktor

Hey I got it working. Not shure what exactly I did but as long as it works...

strazer: Thanks for all the help. Now I can animate my game  ;D
And about those dialogs. Thanks for the tip.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

strazer


viktor

just as an of topic ( not realy that important). 
Someone once posted a whole list of scripts. But I can't find thet post.
Could anyone tell me where I could find this...
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

strazer

#6
A list of scripts? I don't know what you mean.

All script commands are explained in the manual.
And SSH released an AGS quick reference sheet a while back.

If you're looking for sample scripts, read the "READ THIS THREAD FIRST BEFORE ANYTHING ELSE" thread at the top of this forum for resources.

SMF spam blocked by CleanTalk