Home   Help Search Login Register  

Author Topic: Creating Group With Trigger + Add Urban Patrol Script  (Read 3254 times)

0 Members and 1 Guest are viewing this topic.

Offline Semedar

  • Members
  • *
    • Semedars Official Website
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.sqf

ups1 is the marker, _egroup1 is the group name

Code: [Select]
_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. :D

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:

Code: [Select]
//Spawns Group With UPS
[] execvm "ups1spwn.sqf";
Sleep 1;
[_grp,"ups1spwn"] execVM "ups.sqf";

From ups1spwn.sqf:

Code: [Select]
//////////////////////////////////////////////////////////////////
// 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?
« Last Edit: 15 Mar 2010, 21:55:46 by Semedar »

Offline Odin

  • Members
  • *
Re: Creating Group With Trigger + Add Urban Patrol Script
« Reply #1 on: 03 Apr 2010, 04:48:30 »
Sorry, Thought this was ARMA2 forum :-[ Please delete post
thanx
« Last Edit: 03 Apr 2010, 05:03:20 by Odin »