OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Aldo15 on 26 Dec 2010, 17:39:10
-
Hello Again.
I want to know how to make all units of a certain side to see
an enemy unit to travel from "safe" to "Combat"?
-
I'm having trouble understanding you, but I think you want this:
1. Make a trigger large enough to cover all needed units. Set activation to "West-Present." In its initialization field, write allunits = thisList.
2. Make another trigger larger enough to cover all needed units. Set activation to "East-Detected by West." In its initialization field, write {_x setBehaviour "COMBAT"} forEach allunits.
When the second trigger is activated, all units in the "list" of the first trigger will now have combat behaviour. Modify the above procedure as needed.
EDIT: clarity
-
1. Make a trigger large enough to cover all needed units. Set activation to "West-Present." In its initialization field, write allunits = thisList.
2. Make another trigger larger enough to cover all needed units. Set activation to "East-Detected by West." In its initialization field, write {_x setBehaviour "COMBAT"} forEach allunits.
Thanks for the input, but several vece try and not working. I followed the steps as wrote in the topic but the units still standing. :no:
-
Really? Try the attached demo mission and see what you're doing differently.
-
I tried the example you and I have served. That was really what I was looking for.
Thanks RKurtzDmitriyev :clap: :good:
-
Aldo, I would strongly recommend the tried and tested method of Syncing waypoints with triggers. Always works for me.
Just set some cycling waypoints for a patrol route followed by a "Search and Destroy" waypoint after the Cycle and a move waypoint after the Search and Destroy one. Put the Search and Destroy in the centre of your defended area. Then make a trigger for [ENEMY SIDE] detected by [YOUR SIDE]. Set the activation parameters to be "BaseEnemyDetected = true" and the deactivation parameters to be "BaseEnemyDetected = false".
Then make 2 triggers, the first has the condition "BaseEnemyDetected" and the second "not BaseEnemyDetected". Press F5 (or select synchronisation) and link the first trigger to the cycle waypoint before the Search and Destroy. Then link the second trigger to the Move waypoint after the Search and Destroy.
The trigger for [ENEMY SIDE] detected by [YOUR SIDE] shouldn't be linked to anything.
Set the waypoint parameters of the first patrol waypoint to be "SAFE", and set the parameters for the Search and Destroy waypoint to be "COMBAT" and "ENGAGE AT WILL".
This method will have soldiers patrol around until enemies are spotted. Then the soldiers will spread out around the defended area to fight off the attackers.
If you can't get it working, ask, and I'll provide a demo file.
Hope that helped,
Lone-Wolf :cool2: