OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: 22jacket on 30 Jun 2005, 12:09:50
-
Hi..just a quickie..how do I put troops into building, towers.., etc..sorry its a noobie type queation..
-
hey all u do is place them over the shaded building square in the editor and if u need them to be up in the air...e.g. like on a second floor or in a tower, use the SetPos command
:gunman: :beat:
-
Or stick a waypoint on the building and use the building pos field in the waypoint.
-
Add to radio-triger (Activated by Radio Alpha, for example)
HINT FORMAT ["Player Pos : %1",getpos player]
then walk to the place you want the AI, and press the radio trigger. Write that number down, or print-screen it and paste into Paint/PSP/PS
Then, in the AI's INIT field
this setpos [thenumber,yougot,fromthehint]
So say the HINT you got was "Player Pos : [1234,422,4]". You'd use this :
this setpos [1234,422,4]
To stop the AI falling though the floor at start, I suggest you add 0.5 to the last bit (The height)
- Ben
-
lovely top banana cheerse veryone
-
theres another way wich i think qqqqqq meant if you put a unit right next to the thing you want them on like one of those look out towers then make a waytpoint ontop of the tower then a new box init should appear like building pos then a box with 1 - 4 chose wich position you want then he should climb the ladder and get into the right pos
thats just another way
-
456 I didn't know that I will have a look.
Using buildingPos is a great way to put units in a building. I use the following in the init field of one unit:
this setpos ( (object 16744) buildingPos 1) ;doStop this;this doWatch (object 71908)
On Malden this will put the guy in the guard tower at Le Port.
But be careful if you are moving units into buildings after the mission has started.
buildingPos does not work correctly after a save and the restore of the mission so if you are going to use buildingPos later in the mission it would be a good idea to cerate a list of all these relevant locations at the start of the mission and use them instead later.
EDIT:
456 I tried your method and in deed you do get the extra field in the waypoint. I just cant seem to get it to work with the guard towers though.
-
it should work on guard towers thats how i dound it out but it doesnt seem to work on the ones in Kolgujev, Malden ones should work thats how i first did it but it doesnt seem to work with houses with me only guard towers or those ammo dumps or what ever they are. It also has to be a move waypoint if its anyother he will start moving and fall out so dostop this might be usefull
-
I think the problem was nearby buildings seemed to stop the loon getting to the ladder.