OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: apeters2525 on 26 Nov 2005, 22:02:53

Title: Basic Radar Imitation
Post by: apeters2525 on 26 Nov 2005, 22:02:53
I have a problem that is sure to be simple to correct.

How do i get a unit to hold it's fire until an enemy unit enters a trigger, and then go back to holding its fire once the enemy unit left?

I tried setting up a trigger around the unit I want to hold it's fire and set it to Act:West  Present Repeat. I tried synch it with a waypoint of the friendly unit and tried to synch it to the unit directly. In the Act field of the trigger, i put sam1 setcombatmode "red, then I put in the deact sam1 setcombatmode "blue". This doesnt seem to work. Everytime the enemy helo spawns in during test, which is outside the trigger, the friendly unit on the ground fires anyways. Any thoughts?
Title: Re:Basic Radar Imitation
Post by: RujiK on 26 Nov 2005, 23:06:56
you could do like:
Condition:(Vehicle Billy) in thislist
Activation:Billy setcaptive false
Deactivation:Billy setcaptive true

You will have to make the trigger activate repeatedly.
Also that top line may be a little off and if so just group the trigger to Billy.
Title: Re:Basic Radar Imitation
Post by: apeters2525 on 26 Nov 2005, 23:31:48
Thanks, I will try when i get home tonight. It was a matter of learning.... i.e. thislist...

Anyways, I'll try it...thanks!
Title: Re:Basic Radar Imitation
Post by: LoTekK on 27 Nov 2005, 10:42:44
Did you remember to setCombatMode "blue" the unit (or group) at the start of the mission?
(that wasn't sarcastic, I know I've overlooked silly little things like that before)
Title: Re:Basic Radar Imitation
Post by: apeters2525 on 27 Nov 2005, 20:46:40
Actually, no. I guess it is one of those silly things...lol! I'll have to try that as well as the suggestion posted above. Havent got the chance yet, had to work late.