Jump to content
Sign in to follow this  
GunnDawg09

Patrol question.

Recommended Posts

I am trying to get this group of 4 guys to move inside of a bunker via a waypoint that is set to "guard" and all they do is walk to the bunker but stay outside of it in front o fit...

How would I set it up so they get inside the bunker. I would just spawn them in the bunker but they spawn with their feet thru the floor.

Share this post


Link to post
Share on other sites

If you want to spawn them inside you can alway use this code in their init.

this setpos [(getpos this select 0),(getpos this select 1),[b]X[/b]];

X = The height above the ground in meters. (useful for putting units in rooms of buildings or putting stuff on tables.

Alternately you can have the units go in a building by placing the waypoint directly on the building so that you have position in house option.

Share this post


Link to post
Share on other sites

I used your code which worked, however when they spot enemy they all just go prone in the bunker rather than staying up and firing.... Marines in a bunker usually fire back, not just go prone at the sight of an enemy...any way to keep them on their feet ? Otherwise it defeats the purpose of having them in the bunker.

Share this post


Link to post
Share on other sites
I used your code which worked, however when they spot enemy they all just go prone in the bunker rather than staying up and firing.... Marines in a bunker usually fire back, not just go prone at the sight of an enemy...any way to keep them on their feet ? Otherwise it defeats the purpose of having them in the bunker.

Not that I know of. Im not the best guy to ask though. You could try to place a static weapon in the bunker. at least that guy wont go prone. But he might just shoot the enemy in the face from 600m.

Share this post


Link to post
Share on other sites

If you want your soldiers to keep standing, try:

unit setUnitPos "UP";

Share this post


Link to post
Share on other sites

Kylania I tried your code and as soon as the enemy came in sight they all hit the deck. I put it in the units initialization.

Share this post


Link to post
Share on other sites

Hmm, named the unit wrong maybe? I just did a quick test with a US FireTeam on one side of a building and a Russian Infantry Section on the other, with waypoints taking them into view of the US.

The US Fire Team leader had this in his init:

{_x setUnitPos "UP";} forEach units group this;

When the Russians came in view they remained standing while fighting. When I took it out of the init, they all went prone to fight.

Share this post


Link to post
Share on other sites

what if I just want to assign it to a single un grouped unit? (because for some reason they spawn outside of the bunker when grouped, and spawn inside the bunker properly when grouped, so I just left them un grouped)

---------- Post added at 10:11 PM ---------- Previous post was at 10:09 PM ----------

nvm I Just put that code in for each unit and works perfectly :) thanks yet again Kylania..

My mission is really takin shape now!

---------- Post added at 10:15 PM ---------- Previous post was at 10:11 PM ----------

{_x setUnitPos "UP";} forEach units group this;

I see after some testing that you can set it to UP for standing, and DOWN for prone, but what would you set it to for crouch/kneeled? I tried CROUCH and KNEEL but that didnt seem to do the trick.

Share this post


Link to post
Share on other sites

Well, setUnitPos can take 4 modes:

UP, DOWN, MIDDLE and AUTO. To so kneel a group, you'd:

{_x setUnitPos "MIDDLE";} forEach units group this;

Also, that code is for the entire group, so you only need it once in the leader's init. If you wanted to have just a single unit stay standing use this:

this setUnitPos "UP";

Share this post


Link to post
Share on other sites
what if I just want to assign it to a single un grouped unit? (because for some reason they spawn outside of the bunker when grouped, and spawn inside the bunker properly when grouped, so I just left them un grouped)

Just for future referance. You can set a grouped units position to match his place on the editor map by changing In Formation to None.

Edited by Redfield-77

Share this post


Link to post
Share on other sites

Sorry to necro thread, but just to point out that this does not work. If they are in a squad, they will move out of whatever bunkers you have put them in and form on the leader.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×