Jump to content
Sign in to follow this  
shark-attack

Spawning AI in buildings.

Recommended Posts

Is there a way to avoid spawned AI from starting on the roof of buildings.

i have experimented with all kinds of code but to no avail. they always start on the roof , i can setpos the unit after spawn but they are still visible on the rooftop s for a split second.

i thought this would of worked as a work around, but the spawned unit will not teleport to required building position.

if (isserver) then {

grp1 = createGroup EAST;

dude1 ="TK_INS_Soldier_EP1" createUnit [getpos beercan, grp1];


sleep 1;

dude1 setPos ((nearestBuilding beercan) buildingPos 2); 


};

beercan is an empty editor placed beer can as a spawn point, any help with this issue would be great.

best wishes shark-attack

Share this post


Link to post
Share on other sites

This works for me...

createVehicle ["UnitType", getmarkerpos "markerName", [], 0, "UnitName = this; this setPos [(getPos this select 0),(getPos this select 1),3"];

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  

×