Home   Help Search Login Register  

Author Topic: troops in buildings..  (Read 893 times)

0 Members and 1 Guest are viewing this topic.

Offline 22jacket

  • Members
  • *
  • I'm a llama!
troops in buildings..
« 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..

Goatcheese

  • Guest
Re:troops in buildings..
« Reply #1 on: 30 Jun 2005, 12:34:30 »
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:

qqqqqq

  • Guest
Re:troops in buildings..
« Reply #2 on: 30 Jun 2005, 12:50:11 »
Or stick a waypoint on the building and use the building pos field in the waypoint.

DBR_ONIX

  • Guest
Re:troops in buildings..
« Reply #3 on: 30 Jun 2005, 14:49:09 »
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

Offline 22jacket

  • Members
  • *
  • I'm a llama!
Re:troops in buildings..
« Reply #4 on: 01 Jul 2005, 22:51:19 »
lovely top banana cheerse veryone

Offline 456820

  • Contributing Member
  • **
Re:troops in buildings..
« Reply #5 on: 02 Jul 2005, 08:41:32 »
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

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:troops in buildings..
« Reply #6 on: 02 Jul 2005, 08:51:14 »
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.
« Last Edit: 02 Jul 2005, 08:54:46 by THobson »

Offline 456820

  • Contributing Member
  • **
Re:troops in buildings..
« Reply #7 on: 02 Jul 2005, 09:43:27 »
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

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:troops in buildings..
« Reply #8 on: 02 Jul 2005, 13:51:46 »
I think the problem was nearby buildings seemed to stop the loon getting to the ladder.