OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: DjTano on 31 May 2007, 00:22:46
-
Hey guys,
ive once seen a thread about a VERY simple way to do that, but ive lost it now so can anybody tell me how to put enemies in buildings?
-
buildingpos (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=a#buildingPos).
-
I understand your frustration, i even made a blooper reel about this problem, check it out:
http://www.youtube.com/watch?v=FkqBywbOEIk
But the answer is, put this line in the initialization line for a unit (and buildings can have way more just one position,)
this setpos (nearestBuilding this buildingPos 1)
-
this setpos (nearestBuilding this buildingPos 1)
when i use that i land in a corner of the island on the sea... wtf?
-
strange. did you put the enemy unit on top of the building on the map? Also you pressed F1 to create an enemy soldier, then in the initialization line put
this setpos (nearestBuilding this buildingPos 1)
right? worked for me. try searching the forums i think i asked this question a while back and its in there.
-
what i use is this:
this setpos [getpos this select 0, getpos this select 1, XXX]
where XXX is the height. for example:
this setpos [getpos this select 0, getpos this select 1, 4]
works everytime.
-
tried tht aswell, and it doesnt work :(
-
how and what are you placing?
put a soldier in the building, then in the soldiers INIT field put the command
this setpos [getpos this select 0, getpos this select 1, 4]
*you have to use some trial and error for the height, its not always 4
you could also just put the soldier out in the open, put your player looking at the soldier then preview it... you should see the soldier fall to the ground.
also i forgot where i downloaded this from but heres some scripts that places the guy randomly in the building, and another to place a random patrol in the building...all you have to do is place a soldier near any building and it will automatically jump the guy in the building and he will start patrolling, or just be randomly placed.
scripts:
http://download.yousendit.com/FAF10ACF6E4D98D9
-
yea, i found a solution to it...
-
Post your solution! Share and enjoy!