OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Dj Tano on 22 Mar 2007, 19:57:54
-
Hey guys,
ive found this really great building in sahrani wich would be perfect for a house clearing mission, but i seem only to be able to put enemies ON buildings, instead of IN them... anybody knows wht i have to do?
-
Very common problem. In fact I made a joke blooper cutscene (i'll put it up on the forum later) about that. In the init line for your unit, put in "this setpos (nearestbuilding pos 3)" i think. I think that syntax is right. Check the old OFP forums on ofpec.com too.
-
There's a script, made by Tophe, which could be helpful for you:
http://www.armaholic.com/page.php?id=879
:EDITH:
saw it only at the second sight...there's also a random house patrol script by the same author there:
http://www.armaholic.com/page.php?id=936
-
i played around with the arma hotel and that code... worked except with all the floors the available in the hotel, the unit positions went beyond 180... so it required alot of patience setting the units in thier desired positions. I also noticed that after adding about 15/20 units in the hotel, the game began suffer heavy lag - dunno why* :confused:
unit setpos ((position unit nearestobject 172902) buildingpos 184);
unit setdir getdir unit +10;
*I know nothing about anything
-
Recommendation: Find a map called RED HOTEL or FORT ROOSTER and unpbo it. In both missions, they have men in the hotel on various floors, looking out various windows and with various actions (guard, patrol, etc).
That will show you how to do it. No scripts involved.
-
In the Init line of your unit put this:
this setpos (nearestBuilding this buildingPos 1)
You can try buildingpos at higher numbers, i think one building even goes up to 22 positions....
-
You can try buildingpos at higher numbers, i think one building even goes up to 22 positions....
The hotel I refered to above has over 180 :blink: