Home   Help Search Login Register  

Author Topic: How to make the AI use building?  (Read 1448 times)

0 Members and 1 Guest are viewing this topic.

Offline Egogon

  • Members
  • *
How to make the AI use building?
« on: 22 Mar 2008, 22:58:46 »
Is there a way of getting AI troops to use the roofs of buildings, or even climb the ladders onto them? Would it be possible to start the mission with them already on there (assuming that the roof has access via ladders or similar).
I can't find much on this subject, but I may of missed something!

Cheers,

Offline laggy

  • Members
  • *
  • "Behold a pale horse"
Re: How to make the AI use building?
« Reply #1 on: 22 Mar 2008, 23:18:50 »
Hi.

Put this in the init line of the unit:

this setpos [getpos this select 0, getpos this select 1, 10]

This will position the unit 10 meters above original level. In the air if no building is present. Try adjusting that last number to fit your purposes.

In ArmA units will sometimes climb ladders automatically, if the waypoint is placed correctly on the building. Try this to.

Some buildings (the big hotel for example) has building position numbers that units can go to. Place the waypoint on top of the buildings name in the editor, open up the waypoint for editing and choose house position. Sometimes these building poition numbers also include the roof.

Cheers

Laggy
And I looked and beheld a pale horse and his name that sat on him was Death and Hell followed with him.

Offline Egogon

  • Members
  • *
Re: How to make the AI use building?
« Reply #2 on: 22 Mar 2008, 23:35:08 »
Nice one.  :good:
I'll give it a go.

Ta,

Offline enigma6584

  • Members
  • *
Re: How to make the AI use building?
« Reply #3 on: 24 Mar 2008, 18:28:06 »
Thanks from me as well...to the both of you.  I was just going to ask this question and lo and behold, both question and answer were already here. :good:

Offline Nexolate

  • Members
  • *
  • The lurking S.T.A.L.K.E.R.
Re: How to make the AI use building?
« Reply #4 on: 24 Mar 2008, 20:56:30 »
I used this on a mission I started working recently, made a little Civilian Camp inside a couple wrecked buildings.
Cheers.
You'll only notice me when it's too late.

Offline Callaghan

  • Members
  • *
Re: How to make the AI use building?
« Reply #5 on: 25 Mar 2008, 10:19:40 »
Also, if you want the AI to use buildings of its own accord, such as sending men to clear houses and to gain vantage points during a fire fight, try the ECS mod, has v recently come out and improves the AI in many ways...