OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Rellikki on 18 Feb 2010, 09:22:31

Title: Animation check
Post by: Rellikki on 18 Feb 2010, 09:22:31
Is there a way to check when a character has performed a certain animation? Something like the animationPhase (http://www.ofpec.com/COMREF/index.php?action=details&id=23&game=All) command, but for characters.
Title: Re: Animation check
Post by: bedges on 20 Feb 2010, 08:36:43
As far as I know, there isn't. It depends on how the animation is being called. If it's in a script, even if the animations are randomised, could you not set a global variable when a particular animation is performed?

Difficult to say without more details.  :confused:
Title: Re: Animation check
Post by: Rellikki on 20 Feb 2010, 12:58:47
Well, I'm creating a script to plant bombs and wanted to check when the player has performed the "putDown" animation, which is done from the action menu and only then createVehicle a bomb at his position. Sadly, it wouldn't be perfectly precise if I just createVehicle'd the bomb after one second delay from executing the animation, because sometimes it takes a little longer to perform that animation, depending on the player's initial stance - If he's laying on ground or standing. Depending on the case, the bomb would be created too early / later.

Yeah, everything has to be that perfect. :D But if you say it's impossible, then I guess I can live with it. I wouldn't want to make it too complicated either. Just wanted to know if there's any simple way to check it.
Title: Re: Animation check
Post by: bedges on 20 Feb 2010, 13:19:11
If the "bomb" object is a regular satchel, one way around this would be to


Possibly?

EDIT - nope, quick test reveals that for some bizarre reason you cannot run the 'fire' action on the player. Probably why Lukin planting satchels in that Red Hammer mission was done in cutscene style...