Can anyone help me with making a script that makes an enemy group and have them init the Urban Patrol Script that you can call in with a trigger
I'm doing it this way because my mission is big and I dont want a bunch of units already spawned in all over the map when the mission spawns. I want the groups to spawn and follow the UPS script when triggered by BLUFOR.
I tried making
egroup1.sqfups1 is the marker, _egroup1 is the group name
_grp = Creategroup EAST;
_grp createUnit ["SquadLeaderE", getMarkerPos "GrpM", ["GrpM"], 5, "FORM"];
_grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEMG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEAT", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierESniper", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
Then after that I tried to call it in but kept giving me errors. Any help would be greatly appreciated.
EDIT:Ok it's getting very frustrating for me to figure this out
1. The script I'm using to spawn a group does in fact work
2. This is the error I get:
I found out it's from the UPS script.
What I'm doing to try to get this script working:
I'm trying to spawn an enemy group from my
Init.sqf for now to just test and find how to add a group and make them init the
ups.sqf:
[this,"marker"] execVM "ups.sqf"From my
init.sqf:
//Spawns Group With UPS
[] execvm "ups1spwn.sqf";
Sleep 1;
[_grp,"ups1spwn"] execVM "ups.sqf";
From
ups1spwn.sqf:
//////////////////////////////////////////////////////////////////
// Function file for Armed Assault
// Created by: Semedar
//exec: [] execvm "ups1spwn.sqf"
//////////////////////////////////////////////////////////////////
_grp = Creategroup EAST;
_grp createUnit ["SquadLeaderE", getMarkerPos "GrpM", ["GrpM"], 5, "FORM"];
_grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEB", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEMG", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierEAT", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
_grp createUnit ["SoldierESniper", getMarkerPos "GrpM", ["GrpM"], 2, "FORM"];
I have a rectangle marker named
GrpM to spawn the units there. I'm trying to make them follow the ups script from the init.sqf
So, to summarize:Does anyone know how to spawn an enemy group and make them init:
[this,"marker"] execVM "ups.sqf" And make them spawn with a trigger?
If so, can you post detailed instructions?