Home   Help Search Login Register  

Author Topic: Checking unitpos. Is it possibile ?  (Read 985 times)

0 Members and 1 Guest are viewing this topic.

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Checking unitpos. Is it possibile ?
« 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
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Checking unitpos. Is it possibile ?
« Reply #1 on: 01 Mar 2008, 09:18:19 »
You'll want Mando Getpos: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.
"When 900 years YOU reach, look as good you will not!"

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: Checking unitpos. Is it possibile ?
« Reply #2 on: 01 Mar 2008, 17:50:46 »
Thank you.

Just downloaded it.

Laggy
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.