OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Kneehi on 16 Sep 2009, 02:12:01

Title: AI with binocular
Post by: Kneehi on 16 Sep 2009, 02:12:01
Please, can anyone tell me how to make a unit to use his binoculars while crouching?
I know the  Playername Playmove "BinocCrouchToCrouch", but he just don't keep that position...
why?
:)
Title: Re: AI with binocular
Post by: bedges on 16 Sep 2009, 08:52:14
Try a switchmove instead.
Title: Re: AI with binocular
Post by: Kneehi on 17 Sep 2009, 01:41:34
Well, i already tried that, but the unit(aI) get to this position than go back to normal standing.
Title: Re: AI with binocular
Post by: bedges on 17 Sep 2009, 10:26:57
Getting AI to perform animations can be tricky at the best of times, especially crouching, and may involve the use of "brute force" techniques such as disabling AI (http://www.ofpec.com/COMREF/index.php?action=details&id=105&game=OFP) (move and/or target) and setUnitPos (http://www.ofpec.com/COMREF/index.php?action=details&id=320&game=OFP).

In OFP disabling AI is non-reversible, so if the characters need to act normally after completing the animation, you can use duplicate characters - one to do the animation and the other to continue the cutscene normally.

If this is not for a cutscene and instead for in-mission action, I'm not sure what else to suggest.
Title: Re: AI with binocular
Post by: Kneehi on 18 Sep 2009, 23:55:48
Well, thanks...  :confused: