Jump to content
Sign in to follow this  
saetheer

Trigger spawn group and UPS

Recommended Posts

Hey

I'm trying to figure out how to use the UPS.sqf. I've figured out how to place soldier in editor and init the USP.sqf from there.

Now what I want to is to implement a trigger, once a player enter that trigger I want to spawn several groups of units. But I cant figure out how to use thoose with eachother.

What I want is to have a training mission, where we go to kamino. when we are getting closer to the area, a trigger activates and spawn units. This is however not the issue. the issue is to have the same units use Urban Patrol Script to patrol the area.

There is more stuff todo in the training mission so I want to use scripts to save the servers for stress.

I use this script to create the group. I'm going to add different groups in this for later, but now I just want to have one group to work in firstplace.

P1 = rectangle marker (They spawn and patrol inside of this marker)

"Kamino_Spawn.sqf"

eastGP = Creategroup EAST;

eastGP createUnit ["O_Soldier_TL_F", getMarkerPos "P1", ["P1"], 5, "FORM"];

eastGP createUnit ["O_Soldier_F", getMarkerPos "P1", ["P1"], 2, "FORM"];

eastGP createUnit ["O_Soldier_F", getMarkerPos "P1", ["P1"], 2, "FORM"];

eastGP createUnit ["O_Soldier_F", getMarkerPos "P1", ["P1"], 2, "FORM"];

eastGP createUnit ["O_Soldier_F", getMarkerPos "P1", ["P1"], 2, "FORM"];

eastGP createUnit ["O_Soldier_F", getMarkerPos "P1", ["P1"], 2, "FORM"];

eastGP createUnit ["O_Soldier_F", getMarkerPos "P1", ["P1"], 2, "FORM"];

can anyone help me get this group use UPS for patroling P1?

Edited by Saetheer

Share this post


Link to post
Share on other sites

Try adding in the .sqf

 eastGP execVM "nameofscript.sqf"

If it does not work then give a try to

{[_x] execVM "nameofscript.sqf";} forEach units eastGP 

Share this post


Link to post
Share on other sites

I put together this script a while ago. (Based on the original script for ArmA2 Created by: TODO).

It uses UPSMON rather than UPS. UPSMON is based on UPS and is widely considered an enhanced UPS).

See UPSMON script thread for ArmA3 here UPSMON-for-ArmA3

Download UPSMON for ArmA3 UPSMON.rar here.

//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: TODO: Author Name
// Call init with _nul = ["spawnPoint_01", "patrolArea_01"] execVM "Spawn_scripts/Spawn_OPFGrp1.sqf";
// N.B. Needs Functions Module Added on Map. NOT NEEDED for ARMA3
//////////////////////////////////////////////////////////////////


if (!isServer) exitWith {};

_spawnPoint = _this select 0;
_patrolArea = _this select 1;

_side = if (count _this > 3) then {_this select 3} else {EAST};
_skill = if (count _this > 4) then {_this select 4} else {[0.1, 0.4]};
_units = if (count _this > 2) then {_this select 2} else {["O_Soldier_TL_F","O_soldier_AR_F","O_soldier_GL_F","O_soldier_F","O_medic_F","O_soldier_exp_F","O_Soldier_LAT_F"]};
_pos = getMarkerPos _spawnPoint;

_grp = [_pos, _side, _units, [], [], _skill] call BIS_fnc_spawnGroup;

sleep 3;

// Now have the spawned patrol use UPSMON script to patrol the "patrolArea_01" area.
[_grp,_patrolArea,"NOWAIT","RANDOMDN","SPAWNED","DELETE:",300] execVM "scripts\upsmon.sqf";

N.B. The above example uses a marker named "spawnPoint_01" where you want the group to spawn, and also an area called "patrolArea_01" where you you wish the group to patrol.

Edit the script to suit your squad.

Edited by Beerkan

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×