OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Cooba on 31 Jan 2005, 09:41:21

Title: soldier position
Post by: Cooba on 31 Jan 2005, 09:41:21
I need command checking soldier position (crouch or prone or stand). Anyone can help me?


sorry for bad english :-[
Title: Re:soldier position
Post by: OFPWiZard on 31 Jan 2005, 09:57:44
You want to know if the "soldier" is crouching, in prone position or even standing?

Correct?

---
What comes to me is the command canStand.

For example:
If you want to know if the person is able to stand up or not.  If they can't that means they're injuryed or something.

canStand unitname
---

Now, there might be something out there, but i don't know.
Anyone else wants to give it a shot.
I am pretty sure there is a way for mostly everything within OFP.
All you have to do is experiment.

If i find anything about that, or come up with something, i'll let ya know.  8)

l8r, pe@ce

* But i still don't get what your really trying to ask.
* Tell me what your doing.
* And what you want to try to get out of it.
Title: Re:soldier position
Post by: nominesine on 31 Jan 2005, 10:35:06
As far as I know it's NOT possible to check unitPos of a unit. You can set it, but not use it as a condition. As the Wizard said, canStand checks if a unit is able to stand in it's default position. This command will not react if the unit decides to go prone in the heat of combat.

It is, however, possible to link a units combat stance (UP, DOWN, AUTO) to other conditions on the battlefield. That way you can controll when the unit is up or down. And if you can controll the situation, there's no need to check IF a unit is up or down...

Sorry, but that's the best advice I can give right now.
Title: Re:soldier position
Post by: Cooba on 31 Jan 2005, 10:38:16
Yes, i want to know when soldier is crouch, stand or prone position. I know canStand command but it's not this what i need.
Title: Re:soldier position
Post by: OFPWiZard on 31 Jan 2005, 11:03:56
I have an idea. . .  :)

But first... what is the mission or hmmm.

Umm,  is this what your plan is.

There is a soldier running.  Then he stops and lays down.  

^ now you want to know when he lays down right... becuase you don't see him.

And when he does... do you want something to happen?

What is what you are trying to do?
Title: Re:soldier position
Post by: macguba on 31 Jan 2005, 12:17:57
It cannot be done.  
Title: Re:soldier position
Post by: Sentinel on 31 Jan 2005, 12:53:10
I had once an idea of this. Though it's not bullet proof but it would give a good guess of the position.

With "fired" eventhandler you should check the height of shot bullet. Usually units shoot almost horizontally so if bullet height is less than, say 0.5 meters the unit is proning, if less than 1.2 meters, he is kneeling and above that he is standing.

This would though indicate the postion when last shot was fired.
Title: Re:soldier position
Post by: Cooba on 31 Jan 2005, 14:10:27
thx guys for helping. I think macguba has right...unfortunatelly.

OFPWizard...its not that simple. i made fire dispersion script because i love SUCHEY's weapons from Marines Pack, but this stuff is too accurate.
Script is almost ready but i had one more idea... add command checking soldier position (prone, crouch, stand) and depending dispersion from this.
But in fact its not important.

Ugh... i hope you guys understand my english  :-[