OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Swedish Chef on 21 Nov 2005, 01:56:51

Title: Can't get animations to work
Post by: Swedish Chef on 21 Nov 2005, 01:56:51
Hi all,
I've read the command references and searched through the forums and FAQ for examples, but just can't get the most simple thing to work... namely, unit animations. In my mission, I'd need my man "Smuggler" to pretend surrendering when the player comes near. So I have set a trigger for it, but the script
Code: [Select]
Smuggler playMove "FXStandSurUniv"
end
just doesn't work... ??? The problem is not with the trigger, it works, but I can't get any units to do any movements if I put <i>this playMove "move's_name"</i> in the init field.

So, what have I misunderstood this time? ;D
Title: Re:Can't get animations to work
Post by: Homefry31464 on 21 Nov 2005, 05:10:54
Did you try the command switchmove as well?
Title: Re:Can't get animations to work
Post by: Swedish Chef on 21 Nov 2005, 06:20:30
Yes, no difference.
Title: Re:Can't get animations to work
Post by: dmakatra on 21 Nov 2005, 08:19:29
Animations can't be launched in the init field, nor can they be launched in scripts that are started at mission start (e.g. init.sqs and all sub-scripts launched by it) without a delay.

:beat: *Gets Shot* :beat:
Title: Re:Can't get animations to work
Post by: The-Architect on 21 Nov 2005, 08:42:24
Is the unit set to safe?
Make sure there isn't a setunitpos command on him.
Sometimes the command wil not work from a init line. Try doing it via a trigger or a script.
Title: Re:Can't get animations to work
Post by: Swedish Chef on 21 Nov 2005, 16:22:35
Animations can't be launched in the init field, nor can they be launched in scripts that are started at mission start (e.g. init.sqs and all sub-scripts launched by it) without a delay.

:beat: *Gets Shot* :beat:
That's a good tip. But should executing a script in the unit init field work?

I've also tried doing it with a trigger, but alas...  :-[
Title: Re:Can't get animations to work
Post by: Planck on 21 Nov 2005, 17:36:31
Hmmm.....works fine for me.

"FXStandSurUniv"
"FXStandSur"

In fact these don't work with playmove, you must use switchmove for these FX animations.


Planck
Title: Re:Can't get animations to work
Post by: Swedish Chef on 21 Nov 2005, 19:26:27
Gah! I just spent some time experimenting, and got it working. I figure it was after all due to using playMove - although I could almost swear that I tried it. But I might have given it in the init field.

Sorry guys for taking your time, but all answers were appreciated! 8)