OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: crisbal on 11 May 2011, 13:49:38
-
How can I get another group of soldiers to my group when I lost 6 units of my own group of soldiers
unless I have to call on the radio for replacements or support?
Thanks any comments!
-
If English is not your first language it helps to use more than ONE sentence to explain your request.
Is this to be done via the radio OR should it happen automatically?
Is the other group of soldiers already in the mission near the player OR can they appear by magic?
How many times should this happen?
If you answered 'Radio, Magic, Once', here is (http://www.ofpec.com/forum/index.php?topic=34980.msg242415#msg242415) a fairly simple way.
-
I think he's saying about How to add units to his group when he have lost 6 units? I think you should use the count units command, for example.
(count units group1) < 1
Hope it helps
Cheers,
Aldo15
-
Automatically , the group of soldiers are already in the mission, only one time.
-
In the Init line of the leader of the group of spare troops write
extratroops = group this
Make sure that the player has a higher rank than any of the spare troops.
For the following I assume you want reinforcements when you have no soldiers left alive under the player's command. If that's not the case you can raise the number, but remember that there can be no more than 12 in a group.
Create a trigger and enter as the condition
(count units player) < 2
and for the On Activation line
{[_x] join player} forEach units extratroops
As written above, the trigger will happen when all the soldiers have been reported killed (someone says "Oh no. x is down.") and they get removed from the Command bar at the bottom of the screen.
-
Exactly it's what I need, thank's! :good: :clap: