Home   Help Search Login Register  

Author Topic: Forcing AI to Destroy a Bunker  (Read 1441 times)

0 Members and 1 Guest are viewing this topic.

Offline DrTrespasser

  • Members
  • *
Forcing AI to Destroy a Bunker
« on: 05 May 2007, 23:57:01 »
Hi everyone, simple question, what would be the simplest way to force a regular AT soldier or a soldier carrying a JAVELIN to destroy or even more simply, to fire once upon one of those "fortress1" objects? I've tried variations of the selectweapon, dotarget, dowatch, dofire and fire commands but the soldier either puts his launcher away before firing or fires at a crazy angle, I guess while animating pulling out the launcher or puting it back. How would any of you go about doing this?

Thanks

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Forcing AI to Destroy a Bunker
« Reply #1 on: 06 May 2007, 05:32:02 »
Code: [Select]
_unit = unit_name
_target = target_object

_unit selectweapon "JAVELIN"
_unit dowatch (getpos _target)
_unit dotarget (getpos _target)

_unit dofire _target

You say none of that works?

It is sometimes difficult but I somehow managed to get it working a while ago. I will see if I have that script on my PC tomorrow, but you could try that. It wasn't to different from that.

Offline DrTrespasser

  • Members
  • *
Re: Forcing AI to Destroy a Bunker
« Reply #2 on: 06 May 2007, 07:49:32 »
I just tried exactly what you typed.  The AT soldier still only pulls out his launcher, be it a JAVELIN or M136 and then puts it back without firing.  Im gonna try using  (fire) instead of (dofire) brb


Ok, just played around with the (fire) command and did some other investigating.  It seems the fire command is all wonky, he fires up into the air like previously, so I decided to go back with the (dofire) command.  I got a hunch that maybe the problem is the target type so I changed it to several different items. What I found is that he will not fire upon structure like objects, fortresses, sheds, walls etc. but he WILL fire upon all vehicle wreck objects and barrels.  Im sure there is some way to overcome this, please help.
« Last Edit: 06 May 2007, 08:09:22 by DrTrespasser »

Offline sharkattack

  • Former Staff
  • ****
Re: Forcing AI to Destroy a Bunker
« Reply #3 on: 06 May 2007, 11:07:28 »
try adding a game logic unit to the bunker
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: Forcing AI to Destroy a Bunker
« Reply #4 on: 06 May 2007, 18:01:39 »
Put one of the objects he will fire on inside the bunker and reveal it to him.
urp!