OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Phantom on 19 Apr 2003, 10:03:58

Title: Salute Triggers
Post by: Phantom on 19 Apr 2003, 10:03:58
I know this is possible, but I don't know how to do it.
I need a trigger so that these blokes will stay at their waypoint and salute whenever someone Lieutenant and upwards comes through their trigger area.

As always, any and all help is much appreciated.

Phantom
Title: Re:Salute Triggers
Post by: dmakatra on 19 Apr 2003, 11:05:32
Make a script sumthin like this:

_salute = _this select 0
_officer = _this select 1

#loop
? _salute distance _officer > 5 : _salute switchmove "Sumthin"
~0.2
goto "Loop"

This could have been more advanced and hopefully correct ;) , but I ainÂ't have time to use my head. ;D
Title: Re:Salute Triggers
Post by: Knut Erik on 19 Apr 2003, 11:55:01
Hmm....
Try this:

Create the trigger where the Lieutenant comes trough.
Activation : Anybody
OnActivation : "_x playmove ""effectStandSalute""" foreach [Man1,Man2]
Repeatly

You might need to stop the units that salutes:
Man1 stop true

And set the correct dir:
Man1 setdir 0-359

And if anything else failes, disable the AI:
Man1 disableAI Move/Target/AutoTarget

Note : There is no sutch command as enableAI, so if it is disabled, it can never be enabled again.
Title: Re:Salute Triggers
Post by: Phantom on 19 Apr 2003, 16:38:22
Cheers Knut, I'll give it a go