Forum Jump :

Author Message


Posts: 29
Rank:


Level: Member

Country: de
Location: Berlin, Germany
Occupation:
Age:
In-game name:

 
#190550 Posted at 2016-06-30 11:46        
     
In initServer.sqf do something like this:

fnc_handle_medic_script = compileFinal preprocessFileLineNumbers "yourscriptname.sqf"
{
 _side_unit = side _x;
 [_x, (allUnits select {side _x == _side_unit})] spawn fnc_handle_medic_script;
 true
} count (allUnits - allPlayers);
this applies ur medic script to each unit and orders it to heal each unit of its side.

You could do it this way to only order to heal all units of the group:
fnc_handle_medic_script = compileFinal preprocessFileLineNumbers "yourscriptname.sqf"
{
 [_x, (units _x)] spawn fnc_handle_medic_script;
 true
} count (allUnits - allPlayers);
this is much less performance eating as well.

Note: this has to be inserted in the initServer.sqf file of each mission where it should be active.
If u want to have a solution that works for every mission without adding code to its initServer.sqf then u ve to create ur own addon for it.
Idk how to do an addon and this is the wrong forum section to ask for it.

addon related topics can be created here:
FORUMS / Editing / Addon editing / Arma 3

This post was edited by sarogahtyp (2016-06-30 12:44, ago)

Sarogahtyps Spawn Script Creator - SSSC
the easy way to cache ur units, vehicles and their waypoints