OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: laggy on 01 Mar 2008, 04:28:55

Title: Checking unitpos. Is it possibile ?
Post by: laggy on 01 Mar 2008, 04:28:55
Hi all.

I'm working on a script and I want it to be able to register if the player is in crouch position or not. Basically my question is this:

Is there a way to write a script that checks with close intervalls if the players unit is crouching or not? I want the script to "exit" a soon as the player is not crouching.

I Looked at unitpos commands but they can not be used for "checking" if I'm correct. The "getpos unit select 2" return doesn't care about the actual unitpos either from my experience.

Cheers

Laggy
Title: Re: Checking unitpos. Is it possibile ?
Post by: Wolfrug on 01 Mar 2008, 09:18:19
You'll want Mando Getpos (http://www.ofpec.com/forum/index.php?topic=29174.0).  :good:

And as to the script, it's simply a matter of extracting the "crouching?" variable from mando getpos, and whenever it's != to it, the script exits. You'll figure it out.

G'luck!

Wolfrug out.
Title: Re: Checking unitpos. Is it possibile ?
Post by: laggy on 01 Mar 2008, 17:50:46
Thank you.

Just downloaded it.

Laggy