Home   Help Search Login Register  

Author Topic: AI open gate/barrier?  (Read 2072 times)

0 Members and 1 Guest are viewing this topic.

Offline Maverick2002

  • Members
  • *
AI open gate/barrier?
« on: 25 Jan 2006, 10:07:10 »
As written in subject, is there a way to get an AI soldier to open a gate/barrier? I`m using the Barracken addon with the barrier that opens and closes. Tried the action command, but found out that there wasn`t any for open/close gate! :P

Offline XCess

  • Former Staff
  • ****
Re:AI open gate/barrier?
« Reply #1 on: 25 Jan 2006, 10:20:35 »
object animate ["openAnimation",x]

where object is the gate's name
where openAnimation is the animation name
where x is an integar from 1 to 0 (0 will be beginning of animation phase while 1 will be end)

All required details should be included in the readMe. If not, try contacting the authors or if you're feeling a bit more patient I'm sure somebody will come along here sooner or later to tell you.
« Last Edit: 25 Jan 2006, 10:21:14 by XCess »

Offline Maverick2002

  • Members
  • *
Re:AI open gate/barrier?
« Reply #2 on: 25 Jan 2006, 14:58:52 »
what do you mean by animation name? like "open" or "close"?
can you give me an example?

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re:AI open gate/barrier?
« Reply #3 on: 25 Jan 2006, 15:07:35 »
For a regular BIS_Resistance buildings the syntax to open and close a door is:
Open:
Code: [Select]
building animate ["dvere1", 0]Close:
Code: [Select]
building animate ["dvere1", 1]
The animation name in the example above is dvere1 (czech meaning door1). I don't know what animation name is used in the baracken addons gates. But as XCess says: It should be in the readme or you can contact the addonmaker and ask.

EDIT: In the FDF-mod the animation name for gates is keppi. Try the german words for gate or barrier. I think it's gatter or sperre, but my german is extremely rusty.
« Last Edit: 25 Jan 2006, 15:11:49 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline Maverick2002

  • Members
  • *
Re:AI open gate/barrier?
« Reply #4 on: 25 Jan 2006, 15:23:33 »
Okidok!

I`ll try when I get home!

Thanks! ;)

By the way, is it possible to open/close BIS Resistance gates?
« Last Edit: 25 Jan 2006, 15:24:46 by Maverick2002 »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:AI open gate/barrier?
« Reply #5 on: 25 Jan 2006, 15:52:35 »
For Baracken:

this animate ["Component02", 1]

and

this animate ["Component02", 0]

I think thats right.....according to the config anyway.  
 ;D


Planck
« Last Edit: 25 Jan 2006, 15:53:04 by Planck »
I know a little about a lot, and a lot about a little.

Victor1234

  • Guest
Re: AI open gate/barrier?
« Reply #6 on: 28 Jun 2006, 04:31:50 »
This is on a related note, but what's the code for getting the AI soldier to open the gate when you approach and close it when you move away?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: AI open gate/barrier?
« Reply #7 on: 28 Jun 2006, 11:04:08 »
The same..
???

Are we borderlining into off-topic?
Anyway, if you mean that there's an AI standing next to the gate and the gate opens when you approach it, you need the following:
- A trigger covering the close vicinity of the gate
- the gate's object id (show ID's in the editor, zoom close)

Set the trigger to 'repeatedly', your own side present..
In it's 'on activation' field you type
Code: [Select]
(object XXXXXX) animate ["Component02", 1]In 'on deactivation' field
Code: [Select]
(object XXXXXX) animate ["Component02", 0]Or vice versa, depending on what animation states the 1 and 0 represent..
The XXXXXX means the object id number..

If you are using editor placeable gates the instead of object id you just name the gate and do the above thing except instead of yousing (object XXXXXX) you use the name you gave to the gate..

Should work, not tested nor guaranteed though.. :)
« Last Edit: 28 Jun 2006, 11:05:48 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.