Home   Help Search Login Register  

Author Topic: Buildings with Positions for AI  (Read 728 times)

0 Members and 1 Guest are viewing this topic.

Offline Taggart

  • Members
  • *
Buildings with Positions for AI
« on: 01 Nov 2004, 03:26:19 »
Whenever you create an AI and give him a waypoint into an occupyable building it would seem to be the only time you can do it. Any other AI's you want in the building have to be placed manually. Is there another way, like with the building ID "man1 setpos [8793,3]" for example?  :-\
Tried in vain got an artery

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Buildings with Positions for AI
« Reply #1 on: 01 Nov 2004, 03:40:27 »
This is from the comref help file
Quote
building buildingPos index
Operand types:
    building: Object
    index: Number
Type of returned value:
    Array
Description:
    Returns given indexed position in building, returned value is in format Position

Example:
    buildingPos [building, 1]

So I would presume that the following would/should work
Code: [Select]
soldier buildingPos [BuildingID, 1]
Not tried it but seems logical.
Rebel without a pause...D.I.L.L.I.G.A.F.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Buildings with Positions for AI
« Reply #2 on: 01 Nov 2004, 07:30:27 »
Haven't tried either but I would be my bucks on

solder1 setpos buildingpos [buildingID, 1]

if Klinks doesnt work out.

:beat: *Gets Shot* :beat:

Darren Fletcher

  • Guest
Re:Buildings with Positions for AI
« Reply #3 on: 01 Nov 2004, 18:10:44 »
not meaning to be thick here but how do you find the building ID? and whats the 1 for after the comma is that the hight?

Fletch
« Last Edit: 01 Nov 2004, 18:14:01 by Darren Fletcher »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Buildings with Positions for AI
« Reply #4 on: 01 Nov 2004, 18:56:48 »
To get the ID of any object click Show IDs and zoom in close.

1 is the index number of the position in the building.    Most buildings have more than one position.    It is nothing to do with height.    
Plenty of reviewed ArmA missions for you to play

Unnamed

  • Guest
Re:Buildings with Positions for AI
« Reply #5 on: 01 Nov 2004, 20:13:56 »
Would this work with the sections (the static building classes) of Hawks Nimitz? I'm trying to setpos a guy on the bridge, but I'm sure the roadway is screwing things up.

Offline Taggart

  • Members
  • *
Re:Buildings with Positions for AI
« Reply #6 on: 01 Nov 2004, 21:07:17 »
Have tried various versions of the input all don't seem to work  ??? Open to suggestions
Tried in vain got an artery

Offline Killswitch

  • Members
  • *
  • Peace, cheese and ArmA
Re:Buildings with Positions for AI
« Reply #7 on: 01 Nov 2004, 21:53:15 »
Tried and confirmed to actually work:

somedude setPos (object someBuildingId buildingPos someIndex)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Buildings with Positions for AI
« Reply #8 on: 01 Nov 2004, 22:17:03 »
The building positions available depend on the building.

It needs to be an enterable building,,,,,,of course, but also the building must have a pathway LOD.

The building positions are defined as the various points along the pathway LOD which were set in O2.

Place the unit just outside the building in the editor.

in the init field of the unit put:

this setpos ((object XXXXX) buildingPos 1)

The XXXXX will be the ID number of the desired building
The number 1 will be the position within the building, the building may have more than one position, you could try 2 instead........experiment.
The position  numbers start with 0.....I think.


Planck

I know a little about a lot, and a lot about a little.

Darren Fletcher

  • Guest
Re:Buildings with Positions for AI
« Reply #9 on: 01 Nov 2004, 22:25:34 »
Killswitch !! your the man it works a treat!! just like that

Tags explained the coding for the index and last digit thanks guys

So just tried this on morton map in EF49

i set a west player outside the building and gave the init

this setpos (object 3279 buildingpos 3)

Worked a treat!!

going to test if this works on groups now, ie im going to see if i can use one group to man several builings in one town if there all grouped then all being well i can stop running along and hitting the 63 max groups

yours
Fletch

Darren Fletcher

  • Guest
Re:Buildings with Positions for AI
« Reply #10 on: 01 Nov 2004, 22:34:23 »
ok even with the chaps grouped into a group of 12 using this command i can add all 12 units anywhere on the map yet they all stay as one group this also stops them bunching together

expanple in a town of say 4 building if i have a 1 group of 4 men and i wish to put 1 man in each building with out this commnd they tend to move all over the place this method alls just what im after and frees up some groups so more men can be used

Well done chaps on this a spot in find and great help

Fletch

Offline Taggart

  • Members
  • *
Re:Buildings with Positions for AI
« Reply #11 on: 02 Nov 2004, 02:25:41 »
Thanx again Planck the entry "this setpos ((object XXXXX) buildingPos 1)" works like a charm. Thought there had to be an easier way than spending hours playing with soldiers heights  ;D
Tried in vain got an artery

Offline Colonel_Klink

  • Members
  • *
  • Independent Addon Creator
    • DC3D Game Modelling Zone
Re:Buildings with Positions for AI
« Reply #12 on: 02 Nov 2004, 09:18:31 »
Thanks from me too. Learned something new.  ;D
I think the  move command can also be used here to. Take a look at Philcommando's embassy addon. instructions.
Rebel without a pause...D.I.L.L.I.G.A.F.