Extra animation help

Started by Snake96x, Tue 18/11/2008 22:03:16

Previous topic - Next topic

Snake96x

I am making a fight style AGS game where when you press a button, AND you are colliding with a character, the person will die :o I also made extra animations for hitting and dying and made them a funtion in the global script. I made it so when you press A on the keyboard and you are colliding with a character, they will play. But when i run it, the extra animations are being called unidentified tokens. What am I doing wrong?
HI MOM!!!!!!!!! :)

densming

Capitalization matters.  Views in AGS scripting are all UPPERCASE.  So, if the view you want to use is called vCharacterHit then in the script that view will be referred to as VCHARACTERHIT. So, you'd switch to the view and animate it using that name, like this:

Code: ags

// the A key was pressed while colliding with another character, so play the vCharacterHit view.
cEgo.LockView(VCHARACTERHIT);
cEgo.Animate(0, 3, eRepeat, eBlock, eForwards);
cEgo.UnlockView();

Khris

ALWAYS post the relevant code snippets...

SMF spam blocked by CleanTalk