Home   Help Search Login Register  

Author Topic: TOW Ambush  (Read 1895 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucky Ed

  • Members
  • *
TOW Ambush
« on: 03 Jun 2009, 01:03:05 »
I'm trying to make an ambush with a TOW Tripod and a MG nest, but the AI spots them to soon. So I decided to use setCaptive to make them ignore the TOW and MG until I unleash the ambush.

This is what I put in the TOW INI (Group leader named Ambush1): 
"{_x setCaptive true} forEach units group Ambush1; {_x setCombatMode "Blue"} forEach units group Ambush1"

And this is what I put in a trigger that is triggerd once when OPFOR is present :
"{_x setCaptive false} forEach units group Ambush1; {_x setCombatMode "Red"} forEach units group Ambush1"

The problem is that setCaptive false dosn't work. They keep being captives. I don't get an error or anything. 
This is direct copy paste from my editor, so if you spot any faults that I don't see, please point them out. :D

In the new ComRef it states that setCaptive is used "setCaptive Player" and not "Player setCaptive true/false" is that the explenation and if, what do I do about it?

sry for any bad spelling, I'm Danish.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: TOW Ambush
« Reply #1 on: 03 Jun 2009, 11:04:46 »
Aye the 'new' comref is wrong.

Syntax remains as:  unit setCaptive boolean

For example:  player setCaptive true

If you find that 'true' and 'false' aren't working, then use 1 and 0, per the example above that would be:

player setCaptive 1


Planck
« Last Edit: 03 Jun 2009, 11:06:37 by Planck »
I know a little about a lot, and a lot about a little.

Offline Lucky Ed

  • Members
  • *
Re: TOW Ambush
« Reply #2 on: 04 Jun 2009, 10:39:53 »
Ok I'll try that, thanks.

[Edited]

Thanks a bunch, worked like a charm.

The OPFOR is a little slow to discover the "ambush units" but that's a minor problem. :D
« Last Edit: 04 Jun 2009, 11:09:01 by Lucky Ed »