Jump to content
Sign in to follow this  
infiltrator_2k

Help With This Script Please

Recommended Posts

I copied this script from Chris' tutorials where a helo spawns - drops troops off. Before I edited it for my requirements I thought I'd better just make sure it works as written in its original form. However, I can't even get the helo to spawn. Can anyone see anything obvious in this script? I've tested 2 other similar scripts which work, is just seems to be this particular one that doesn't work. I've checked for typos but can't see anything :/

_crew1 = [];
_airframe1 = [];
_mygroup = [];

if (isServer) then {

_crew1 = creategroup WEST; 
_airframe1 = [getMarkerPos "marker1", 140, "B_Heli_Transport_01_F", _crew1] call BIS_fnc_spawnVehicle;

_wp1 = _crew1 addWaypoint [(getmarkerpos "marker2"), 0];
_wp1 setWaypointType "TR UNLOAD";
_wp1 setWaypointSpeed "LIMITED";
_wp1 setwaypointstatements ["this land 'land'"];

_wp2 = _crew1 addWaypoint [(getmarkerpos "marker3"), 0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointSpeed "LIMITED";

_wp3 = _crew1 addWaypoint [(getmarkerpos "marker1"), 0];
_wp3 setWaypointType "CYCLE";
_wp3 setWaypointSpeed "LIMITED";


_mygroup = [getmarkerpos "marker1", WEST, ["B_soldier_AR_F","B_soldier_AR_F","B_so***ldier_AR_F","B_soldier_AR_F"],[],[],[],[***],[],180] call BIS_fnc_spawnGroup;
_wp1a = _mygroup addWaypoint [getmarkerpos "marker3", 0];

sleep .5;
_mygroup = _mygroup;
{ _x assignAsCargo (_airframe1 select 0); _x moveIncargo (_airframe1 select 0);} foreach units _mygroup;
}; 

Cheers

Ian

Share this post


Link to post
Share on other sites
get rid of the if isserver start and end

Thanks it's now working, or at least spawning and cycling the waypoints. But why did I have to remove it? A similar script worked with the "if isserver" present?

Share this post


Link to post
Share on other sites

Is it really working with this line , what are the *** for?

_mygroup = [getmarkerpos "marker1", WEST, ["B_soldier_AR_F","B_soldier_AR_F","B_so***ldier_AR_F","B_soldier_AR_F"],[],[],[],[***],[],180] call BIS_fnc_spawnGroup;

replaced with the following line and it woks for me

_mygroup=[getmarkerpos "marker1", WEST, ["B_soldier_AR_F", "B_soldier_AR_F","B_soldier_AR_F","B_soldier_AR_F"],[],[],[],[]] call BIS_fnc_spawnGroup;

in the last B_soldier_AR_F I'm getting a space between B_soldier_A and R_F when I post in the forum it shouldn't be there.

Edited by F2k Sel

Share this post


Link to post
Share on other sites
Is it really working with this line , what are the *** for?

_mygroup = [getmarkerpos "marker1", WEST, ["B_soldier_AR_F","B_soldier_AR_F","B_so***ldier_AR_F","B_soldier_AR_F"],[],[],[],[***],[],180] call BIS_fnc_spawnGroup;

replaced with the following line and it woks for me

_mygroup=[getmarkerpos "marker1", WEST, ["B_soldier_AR_F", "B_soldier_AR_F","B_soldier_AR_F","B_soldier_AR_F"],[],[],[],[]] call BIS_fnc_spawnGroup;

Ahh... Chris warned people of this. It's a bug that's caused by copying/pasting from Youtube. Although he reported Youtube adding a hyphen. I just recopied and pasted and this time it adden the hyphen i.e. "[-]". Good spotting ;)

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  

×