OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: maxim on 18 Mar 2003, 10:44:53

Title: triggering a retreat after a attack
Post by: maxim on 18 Mar 2003, 10:44:53
Hello i want to make a mission where after a advance the opposition is so bad that there has to be a retreat.
How do i make a mission with the right triggers do do a retreat after the attack?
Title: Re:triggering a retreat after a attack
Post by: macguba on 18 Mar 2003, 12:40:42
Set up your waypoints for the AI group.    They will look something like this

MOVE     twards objective
HOLD     at the objective
MOVE     run away back to base

The hold waypoint goes at the place where the opposition gets too bad.    Now create a trigger

activation:   see below
type:   switch

Syncro the trigger with the hold waypoint.     The AI group will stay at the hold point till the trigger is fired, then they will move onto the next waypoint.    

Activate the trigger as you like:   you might want to count the number of loons in the group and make them retreat when it gets too low, or maybe use knowsAbout to make them retreat when they spot incoming tanks.     Whatever.

It might be worth using allowFleeing 0 to prevent your loons from running away too early.