PDA

View Full Version : Spawgroup



speeder
Dec 13 2010, 12:20
This script should only spawn 4 US men, and does so when testing local.
But on dedi server, it spawns 8 men.
I thought I had taken care of that with the line: if (!isServer) exitWith {}; But what am I doing wrong?

Trigger:

[] exec "spawnW.sqs"


spawnW.sqs looks like this


if (!isServer) exitWith {};
_side1 = EAST;
_side2 = WEST;
_grp10 = [position wp3, _side2, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_FireTeam")] call BIS_fnc_spawnGroup;
~2
_wp = _grp10 addWaypoint [position wp3, 0];
_wp setWaypointType "MOVE";
_wp setWaypointSpeed "FULL";
exit;

kylania
Dec 13 2010, 14:36
You're mixing SQF and SQS there. Write it in SQF. :)

tom_48_97
Dec 13 2010, 14:46
this should work with sqs syntax :

?(!isServer): goTo "end";
_side1 = EAST; _side2 = WEST;
_grp10 = [position wp3, _side2, (configFile >> "CfgGroups" >> "West" >> "USMC" >> "Infantry" >> "USMC_FireTeam")] call BIS_fnc_spawnGroup;
~2
_wp = _grp10 addWaypoint [position wp3, 0];
_wp setWaypointType "MOVE";
_wp setWaypointSpeed "FULL";
#end
exit;

And yes, sqs is considered deprecated since Armed Assault, so use SQF for future works.
http://community.bistudio.com/wiki/SQF_syntax

speeder
Dec 13 2010, 14:49
Will try - cheers.

speeder
Dec 14 2010, 05:02
I tested it on dedi server and it worked just fine, as I expected. Thank you for your help.