Jump to content
Sign in to follow this  
Meatball0311

Placing units in a EMPTY\Objects (Fortification)\Bunker Tower

Recommended Posts

I am trying to spawn units inside a Bunker Tower. I have tried this an no luck

_grdpost1spawn = getMarkerPos "grdpost1"

GRD1group = createGroup WEST

_grd1 = "USMC_DESERT_SOLDIER_Soldier" createUnit [_grdpost1spawn, GRD1group, "GRD1=this", 0.8, "PRIVATE"]

post1 setPosATL _pos

_pos = position post1

_posx = _pos select 0

_posy = _pos select 1

GDR1 setPosATL _pos [_posx, _posy, + 10]

I have even tried to place units in the tower, but they only will go in the bottom level.

---------- Post added at 12:29 AM ---------- Previous post was Yesterday at 11:00 PM ----------

Well I figured out how to spawn a unit into an EMPTY\Objects (Fortification)\Bunker Tower. I had to use setPosASL so this is what I did:

_grdpost1spawn = getMarkerPos "grdpost1"

GRD1group = createGroup WEST

_grd1 = "USMC_DESERT_SOLDIER_Soldier" createUnit [_grdpost1spawn, GRD1group, "GRD1=this", 0.8, "PRIVATE"]

GRD1 setPosASL [ getPosASL GRD1 select 0, getPosASL GRD1 select 1, (getPosASL GRD1 select 2) + 2.9]

Basically just put your marker around the postion that you want it and the 2nd level is about 2.9 above sea level.. at least on the six_aiaktalik map

Share this post


Link to post
Share on other sites

How would i get an ai troop to start the mission mounting an emplacement?

Without any external scripting?

Share this post


Link to post
Share on other sites

unitname moveIngunner emplacementname

make sure you name the unit and name the emplacement and then add that into the units init line

Share this post


Link to post
Share on other sites

This will place spawned unit into tower, now I need to know how to make unit face a certain direction.

private ["_GRDspawnpos2 ", "_grd2post2"];

_GRDspawnpos2 = getMarkerPos "GUARDspawnpos_2";

GRD2group = createGroup WEST;

_grd2post2 = "USMC_DESERT_SOLDIER_Soldier" createUnit [_GRDspawnpos2, GRD2group, "GRD_2=this", 0.6, "PRIVATE"];

// GRD_2

GRD_2 setFace "face54";

GRD_2 setPosASL [ getPosASL GRD_2 select 0, getPosASL GRD_2 select 1, (getPosASL GRD_2 select 2) + 2.9];

GRD_2 setUnitPos "UP";

GRD_2 setDir 20;

doStop GRD_2;

this is not working to well

Share this post


Link to post
Share on other sites
How would i get an ai troop to start the mission mounting an emplacement?

Without any external scripting?

Alternatively use the "get in nearest" waypoint.

Share this post


Link to post
Share on other sites

I need to know how to make unit face a certain direction and stay faced there... any suggestions?

Share this post


Link to post
Share on other sites

you could try a dowatch or dotarget command. Just put a game logic or empty helipad in the direction you want him facing. That should work.

There is also: SetDir

Sets object heading. Angles are measured in degrees clockwise from north. The accepted heading range is from 0 to 360 Negative angles represent a counter-clockwise angle and the angle can be of any size.

 _soldier1 setDir 45 

object setDir heading

this setdir (random 360);

Will make him face a random direction within his 360 degree arc.

Edited by Jakerod

Share this post


Link to post
Share on other sites

ok so now i know how to face an unit towards an directin with "this setdir" but how do i tilt them? so they will look down or up? cause i want to place static weapons on helicopter and i want the gun to tilt downwards

plz reply, you have been very helpfull already!

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  

×