Jump to content
Sign in to follow this  
wickedstigma

SNiper Support Script v 1.0 beta [HELP!]

Recommended Posts

Hi everyone. Ive been working all day in this script and I managed to make it work some how. But I have a few problems:

1) I cant control when the Sniper and Spotter Joins you

2) The chopper doesnt come down to unload the snipers, (even though I tried the transport unload), because they are already in my group, unless I tell them to Disembark.

3) When I take out the piece of code that makes them part of my team the script works beautifully, but again I cant make them join my group after they disembark so they keep running towards the next waypoint of the transport.

4)When they are on my team I cant make them stop from the script so they try to come running towards me after disembarking.

I will be glad for all the help. Here is the code:

Remember to create 2 markers on the map, one called Sniper_Spawn and the other called Sniper_Infil

Radio Activated Trigger:

hint "Left click on map to set Sniper Team LZ coordinates"; onMapSingleClick """Sniper_Infil"" setMarkerPos _pos;[]exec ""Sniper_Support.sqs""; onMapSingleClick """";";

Sniper_Support.sqs:

[With this code it worked once, but then it started disembarking the snipers first and then heading to the real LZ. Btw, HueySecure is to force the chopper down to unload.]

//-------------------------------------
//Sniper Team Support By: wickedStigma
//-------------------------------------
//v1.0 beta
//-------------------------------------

//Creates Group SniperTeam1

SniperTeam1 = CreateGroup West;

//Creates Group SNIPERTEAMTRANSPORT and spawns UH1Y helicopter on the marker Sniper_Spawn

SNIPERTEAMTRANSPORT = createVehicle ["UH1Y", [(getMarkerPos "Sniper_Spawn") select 0,(getMarkerPos 

"Sniper_Spawn") select 1,100], [], 0, "FLY"];

//Creates Helicopter Crew

TRANSPORTPILOT = SNIPERTEAMTRANSPORT createUnit ["USMC_Soldier_Pilot", [0,0,1], [], 0, 

"CAN_COLLIDE"];
TRANSPORTPILOT moveInDriver SNIPERTEAMTRANSPORT;
TRANSPORTGUNNER = SNIPERTEAMTRANSPORT createUnit ["USMC_Soldier_Crew", [0,0,1], [], 0, 

"CAN_COLLIDE"];
TRANSPORTGUNNER moveInGunner SNIPERTEAMTRANSPORT;

//Creates Helicopter crew

HueyPilot = SniperTeam1 createUnit ["USMC_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"];
HueyPilot moveInDriver SNIPERTEAMTRANSPORT;
HueyGunner = SniperTeam1 createUnit ["USMC_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"];
HueyGunner moveInGunner SNIPERTEAMTRANSPORT;
HueySecure = SniperTeam1 createUnit ["USMC_Soldier_AR", [0,0,1], [], 0, "CAN_COLLIDE"];
HueySecure moveInCargo SNIPERTEAMTRANSPORT; 

//Creates Sniper Team [sniper and Spotter] and moves them in Huey Cargo

Sniper1 = SniperTeam1 createUnit ["USMC_SoldierS_Sniper", [0,0,1], [], 0, "CAN_COLLIDE"];
Sniper1 moveInCargo SNIPERTEAMTRANSPORT;
Spotter1 = SniperTeam1 createUnit ["USMC_SoldierS_Spotter", [0,0,1], [], 0, "CAN_COLLIDE"];
Spotter1 moveInCargo SNIPERTEAMTRANSPORT;

//Sniper Team Joins Player

[sniper1,Spotter1] join Player;

//Creates Waypoints to unload the snipers in the designated area

wp1 = SniperTeam1 addWaypoint [(getMarkerPos "Sniper_Infil"), 0];
wp1 setWaypointSpeed "NORMAL";
wp1 setWaypointType "UNLOAD";
doGetOut Sniper1;
doGetOut Spotter1;
deleteVehicle HueySecure;
wp2 = SniperTeam1 addWaypoint [(getMarkerPos "Sniper_Spawn"), 0];
wp2 setWaypointType "MOVE"

//Let you know the code was complete

hint "We are in position, standing by for orders.";

Share this post


Link to post
Share on other sites

Sorry would help, but I am really only familiar with Camera scripting... :)

Good luck, I know how it feels.

---

PS, sounds like a really cool script you have got so well done.

Share this post


Link to post
Share on other sites
Sorry would help, but I am really only familiar with Camera scripting... :)

Good luck, I know how it feels.

---

PS, sounds like a really cool script you have got so well done.

Thanks man, I still don't know how to script cams but will look forward to it soon since I'm learning everything I can to make a good mission. I have a lot of ideas for different missions merging real life stories with intense firefights, and different roles through the campaign.

And about the Sniper Support script its really frustrating me because even though I convert it to sqf, that I will post later, things like the waitUntil the ifs and everything else doesn't want to work. Not even the sleep command works.

---------- Post added at 04:59 PM ---------- Previous post was at 04:06 PM ----------

I recoded everything and still doest work as it should. Here is the code:

I changed the marker names to supportSpawn and snprInfil

//Sniper Team Support By: wickedStigma
//------------------------------------

// Creates group

snprSupport = CreateGroup West;

//Creates Helicopter

transportHelicopter = createVehicle ["UH1Y", [(getMarkerPos "supportSpawn") select 0, (getMarkerPos "supportSpawn") select 1, 0], [], 0, 

"FORM"];

//Creates Helicopter Crew members

transportPilot = snprSupport createUnit ["USMC_Soldier_Pilot", [[0,0,1], [], 0, "CAN_COLLIDE"];
transportPilot moveInDriver transportHelicopter;

transportGunner = snprSupport createUnit ["USMC_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"];
transportGunner moveInGunner transportHelicopter;

//Creates Sniper and Spotter

teamSniper = snprSupport createUnit ["USMC_SoldierS_SniperH", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSniper moveInCargo transportHelicopter;

teamSpotter = snprSupport createUnit ["USMC_SoldierS_Spotter", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSpotter moveInCargo transportHelicopter;

//Creates Transport Unload Helicopter

wp1 = snprSupport addWaypoint [(getMarkerPos "snprInfil"), 0];
wp1 setWaypointSpeed "NORMAL";
wp1 setWaypointType "UNLOAD";

//Checks if sniper is in the helicopter 

while {checkInside == true} do {checkInside = teamSniper in transportHelicopter};

waitUntil {checkInside == false;}


//Makes sniper and spotter join your team

[teamSniper,teamSpotter] join player;

//Makes trasportHelicopter come back to base

wp2 = snprSupport addWaypoint [(getMarkerPos "supportSpawn"), 0];
wp2 setWaypointSpeed "NORMAL";
wp2 setWaypointType "MOVE";

sleep 30;

deleteVehicle transportHelicopter;
deleteVehicle transportPilot;
deleteVehicle transportGunner;

Things that I think will solve the problem but haven't been able to do it successfully even though I tried:

  1. Separate snipers from the main group by creating another group inside the code. This way I could give them a waypoint to attack without joining the player while the tranportHelicopter returns to the spawn and delete the vehicle.
  2. Create a trigger in the middle of the snprInfinl marker so as soon as the snipers touch that trigger they join the player
  3. Remove the waitUntil so the sniper and spotter joins you from the start and create a trigger in the middle of the snprInfil marker with a radius at least of 25 meters, that when activated makes tranportHelicopter land "GET OUT" and the while close to the ground eject the sniper and spotter from it.
  4. If I could create another group inside the code i could make another group for the pilot alone, this way I could make insertions even in combat by setting the behavior of every other crew member to Combat and the Pilot to careless.
  5. Create a trigger with a radius of 50 meters so they can para drop from the helicopter to the ground.

I tried to make this but I cant make the waitUntil or the trigger coding to work, I even tried creating a trigger on the editor to move it to the snprInfil position with the code and it didn't work.

Any help will be appreciated. I will keep posting progress.

Share this post


Link to post
Share on other sites

As a general tip, ArmA 2 comes with a built-in function for spawning fully-crewed vehicles, which I recommend using:

http://community.bistudio.com/wiki/BIS_fnc_spawnVehicle

As for the issue with unloading the sniper team and the timing thereof, try something like this (assuming .sqf):

_helo = (insert name of helicopter here);
_sniperTeam = (insert group name of sniper team here);

// move sniper dudes into helo
{_x moveInCargo _helo} forEach units _sniperTeam;

// have helo fly to LZ
_helo move (getMarkerPos "Sniper_Infil");

// wait until helo is over LZ, then force helo to land
waitUntil {unitReady _helo};
_helo land "LAND";

// wait until helo is near the ground, then tell the sniper team to get out
waitUntil {(position _helo select 2) < 5};
{unassignVehicle _x} forEach units _sniperTeam;

// wait until sniper team is out, then have them join the player and make the helo RTB
waitUntil {{vehicle _x == _x} count (units _sniperTeam) == 2};
(units _sniperTeam) join player;
_helo move (getMarkerPos "Sniper_Spawn")

For stuff like this, it's generally easier to avoid waypoints entirely

EDIT:

Also, your usage of the comparison operator, "==", is incorrect. {checkInside == true} should simply be {checkInside}, and {checkInside == false} should be {!checkInside}. The comparison operators return a boolean value, but they cannot take boolean values as arguments, as that would be redundant.

Edited by ST_Dux

Share this post


Link to post
Share on other sites

As far as I know, checkInside isn't a real command.

Try (amendments in red):

//Sniper Team Support By: wickedStigma
//------------------------------------

// Creates group

snprSupport = CreateGroup West;

//Creates Helicopter

transportHelicopter = createVehicle ["UH1Y", [(getMarkerPos "supportSpawn") select 0, (getMarkerPos "supportSpawn") select 1, 0], [], 0, "FORM"];

//Creates Helicopter Crew members

transportPilot = snprSupport createUnit ["USMC_Soldier_Pilot", [[0,0,1], [], 0, "CAN_COLLIDE"];
transportPilot moveInDriver transportHelicopter;

transportGunner = snprSupport createUnit ["USMC_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"];
transportGunner moveInGunner transportHelicopter;

//Creates Sniper and Spotter

teamSniper = snprSupport createUnit ["USMC_SoldierS_SniperH", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSniper moveInCargo transportHelicopter;

teamSpotter = snprSupport createUnit ["USMC_SoldierS_Spotter", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSpotter moveInCargo transportHelicopter;

//Creates Transport Unload Helicopter

wp1 = snprSupport addWaypoint [(getMarkerPos "snprInfil"), 0];
wp1 setWaypointSpeed "NORMAL";
wp1 setWaypointType "UNLOAD";

//Checks if sniper is in the helicopter 

[color="Red"]waitUntil {!(teamSniper in transportHelicopter)};[/color]


//Makes sniper and spotter join your team

[teamSniper,teamSpotter] join player;

//Makes trasportHelicopter come back to base

wp2 = snprSupport addWaypoint [(getMarkerPos "supportSpawn"), 0];
wp2 setWaypointSpeed "NORMAL";
wp2 setWaypointType "MOVE";

sleep 30;

deleteVehicle transportHelicopter;
deleteVehicle transportPilot;
deleteVehicle transportGunner;

Share this post


Link to post
Share on other sites

@FuzzyBandit:

I believe the OP was using checkInside as a variable switch, although that isn't needed. Your suggested line in red would work, but it would only check for the sniper, not the whole team. Using a conditional count, as shown in my example code, allows you to wait until both are out, just to be sure.

Edited by ST_Dux

Share this post


Link to post
Share on other sites
As a general tip, ArmA 2 comes with a built-in function for spawning fully-crewed vehicles, which I recommend using:

http://community.bistudio.com/wiki/BIS_fnc_spawnVehicle

As for the issue with unloading the sniper team and the timing thereof, try something like this (assuming .sqf):

_helo = (insert name of helicopter here);
_sniperTeam = (insert group name of sniper team here);

// move sniper dudes into helo
{_x moveInCargo _helo} forEach units _sniperTeam;

// have helo fly to LZ
_helo move (getMarkerPos "Sniper_Infil");

// wait until helo is over LZ, then force helo to land
waitUntil {unitReady _helo};
_helo land "LAND";

// wait until helo is near the ground, then tell the sniper team to get out
waitUntil {(position _helo select 2) < 5};
{unassignVehicle _x} forEach units _sniperTeam;

// wait until sniper team is out, then have them join the player and make the helo RTB
waitUntil {{vehicle _x == _x} count (units _sniperTeam) == 2};
(units _sniperTeam) join player;
_helo move (getMarkerPos "Sniper_Spawn")

For stuff like this, it's generally easier to avoid waypoints entirely

EDIT:

Also, your usage of the comparison operator, "==", is incorrect. {checkInside == true} should simply be {checkInside}, and {checkInside == false} should be {!checkInside}. The comparison operators return a boolean value, but they cannot take boolean values as arguments, as that would be redundant.

Thanks both of you guys for the prompt response. Ok, I get it, but how can I create more than one group in the same script? just doing the same thing with the createGroup command? Im going to try to merge this code with my code to see how it goes. Ill post later the results, thanks again.

---------- Post added at 05:59 PM ---------- Previous post was at 05:57 PM ----------

As far as I know, checkInside isn't a real command.

Try (amendments in red):

//Sniper Team Support By: wickedStigma
//------------------------------------

// Creates group

snprSupport = CreateGroup West;

//Creates Helicopter

transportHelicopter = createVehicle ["UH1Y", [(getMarkerPos "supportSpawn") select 0, (getMarkerPos "supportSpawn") select 1, 0], [], 0, "FORM"];

//Creates Helicopter Crew members

transportPilot = snprSupport createUnit ["USMC_Soldier_Pilot", [[0,0,1], [], 0, "CAN_COLLIDE"];
transportPilot moveInDriver transportHelicopter;

transportGunner = snprSupport createUnit ["USMC_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"];
transportGunner moveInGunner transportHelicopter;

//Creates Sniper and Spotter

teamSniper = snprSupport createUnit ["USMC_SoldierS_SniperH", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSniper moveInCargo transportHelicopter;

teamSpotter = snprSupport createUnit ["USMC_SoldierS_Spotter", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSpotter moveInCargo transportHelicopter;

//Creates Transport Unload Helicopter

wp1 = snprSupport addWaypoint [(getMarkerPos "snprInfil"), 0];
wp1 setWaypointSpeed "NORMAL";
wp1 setWaypointType "UNLOAD";

//Checks if sniper is in the helicopter 

[color="Red"]waitUntil {!(teamSniper in transportHelicopter)};[/color]


//Makes sniper and spotter join your team

[teamSniper,teamSpotter] join player;

//Makes trasportHelicopter come back to base

wp2 = snprSupport addWaypoint [(getMarkerPos "supportSpawn"), 0];
wp2 setWaypointSpeed "NORMAL";
wp2 setWaypointType "MOVE";

sleep 30;

deleteVehicle transportHelicopter;
deleteVehicle transportPilot;
deleteVehicle transportGunner;

I am using checkInside as a pointer not as a command. Thanks for the suggestion! Im glad I finally got some response. Thanks again.

Share this post


Link to post
Share on other sites

You don't have to compare boolean variable with a boolean value, all you have to do is just type the variable name:

_bool = true;
if (_bool == true) then
{
    hint "Works but unnecessary";
};

if (_bool) then
{
    hint "Works just fine with less typing :)";
};

You should tag your global variables to avoid conflicts ;)

EDIT: I see Dux already told you about the first, sorry :)

Edited by Deadfast

Share this post


Link to post
Share on other sites
You don't have to compare boolean variable with a boolean value, all you have to do is just type the variable name:

_bool = true;
if (_bool == true) then
{
    hint "Works but unnecessary";
};

if (_bool) then
{
    hint "Works just fine with less typing :)";
};

You should tag your global variables to avoid conflicts ;)

EDIT: I see Dux already told you about the first, sorry :)

Yeah, but thatnks anyway! but I dont get really the tag thing, ig put the names like snprInfil because of a (good/bad) practice I developed with visual basic, where I called the objects like a text box like txtName and things like that. I saw the link about the tags you gaved me but every tagged thing has a word before the underscore and the variables here don't have them. So what you are saying is like instead of using teamSniper use _teamSniper ?

---------- Post added at 10:54 PM ---------- Previous post was at 09:50 PM ----------

@ST_Dux

I merged the code you gave me with my code and the only part that didn't work properly was the part that joins the team with the player, its like the game completly ignores the waitUntil and joins automatically the whole team with the player when the script starts. Also I don't have the snipers in a separate team since I don't know how to make another team inside the same script. I tried to make it with the createGroup command but the sniper don't spawn when I do it that way. Here is the new code: (I colored red the code that's not working.

//Sniper Team Support By: wickedStigma
//------------------------------------

// Creates group [WORKING]

snprSupport = CreateGroup West;

//Creates Helicopter [WORKING]
transportHelicopter = createVehicle ["UH1Y", [(getMarkerPos "supportSpawn") select 0, (getMarkerPos "supportSpawn") select 1, 50], [], 0, 

"FLY"];

//Creates Helicopter Crew members [WORKING]

transportPilot = snprSupport createUnit ["USMC_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"];
transportPilot moveInDriver transportHelicopter;

transportGunner = snprSupport createUnit ["USMC_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"];
transportGunner moveInGunner transportHelicopter;

//Creates Sniper and Spotter [WORKING]

teamSniper = snprSupport createUnit ["USMC_SoldierS_SniperH", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSniper moveInCargo transportHelicopter;

teamSpotter = snprSupport createUnit ["USMC_SoldierS_Spotter", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSpotter moveInCargo transportHelicopter;


//Gives move action to Helicopter [WORKING]

transportHelicopter move (getMarkerPos "snprInfil");

//Wait until Helicopter is over Infil to land [WORKING]

waitUntil {unitReady transportHelicopter};
transportHelicopter land "LAND";

//Wait until helicopter is near the ground and tell the sniper and the spotter to unload [WORKING]

waitUntil {(position transportHelicopter select 2) < 5};
unassignVehicle teamSniper;
unassignVehicle teamSpotter;

[b][color="Red"]//Wait until sniper team is off the helicopter and make the helicopter return back to base [NOT WORKING]
waitUntil {{vehicle _x == _x} count (units snprSupport) == 2};
(units snprSupport) join player;
transportHelicopter move (getMarkerPos "supportSpawn")[/color][/b]

I also tried to make make a while do but it happened the same thing.

Share this post


Link to post
Share on other sites
Yeah, but thatnks anyway! but I dont get really the tag thing, ig put the names like snprInfil because of a (good/bad) practice I developed with visual basic, where I called the objects like a text box like txtName and things like that. I saw the link about the tags you gaved me but every tagged thing has a word before the underscore and the variables here don't have them. So what you are saying is like instead of using teamSniper use _teamSniper ?

Variables with underscore in front are local to the scope they are created in and its children:

_test1 = 5;
if (true) then
{
    _test2 = 10;
    hint str _test1; //Hint: 5
    hint str _test2; //Hint: 10
};
hint str _test1; //Hint: 5
hint str _test2; //No hint - _test2 does not exist in this scope

Global variables (those with no underscore) are accessible from anywhere. This is why it is a good practice to tag them to make sure they don't get overwritten in some other script by accident.

Generally you should use local variables whenever possible.

Share this post


Link to post
Share on other sites

You must have something else in your mission that is causing the join to happen. Nothing below a waitUntil command will be executed until the condition is met, and since at least two of the waitUntil commands are working according to you, there is no explanation within the script as to how the join could be taking place immediately.

In any case, the last waitUntil was designed to work with a dedicated sniper team group of two people; having more than two people in the group screws up the count in the waitUntil condition. To make it work with the way you've set it up, use the following:

waitUntil {{vehicle _x == _x} count [teamSniper,teamSpotter] == 2};
[teamSniper,teamSpotter] join player;

This still doesn't explain how the join is happening immediately, though. The way you had the waitUntil command set up, it should have never returned true. You'll have to do some troubleshooting to discover what it is in your mission that is causing the premature join.

Also, how are you calling this script?

Share this post


Link to post
Share on other sites
Variables with underscore in front are local to the scope they are created in and its children:

_test1 = 5;
if (true) then
{
    _test2 = 10;
    hint str _test1; //Hint: 5
    hint str _test2; //Hint: 10
};
hint str _test1; //Hint: 5
hint str _test2; //No hint - _test2 does not exist in this scope

Global variables (those with no underscore) are accessible from anywhere. This is why it is a good practice to tag them to make sure they don't get overwritten in some other script by accident.

Generally you should use local variables whenever possible.

OOOOOOOOOOOOOOOOOOH! now I understand! Thanks man.

---------- Post added at 01:25 PM ---------- Previous post was at 01:07 PM ----------

You must have something else in your mission that is causing the join to happen. Nothing below a waitUntil command will be executed until the condition is met, and since at least two of the waitUntil commands are working according to you, there is no explanation within the script as to how the join could be taking place immediately.

In any case, the last waitUntil was designed to work with a dedicated sniper team group of two people; having more than two people in the group screws up the count in the waitUntil condition. To make it work with the way you've set it up, use the following:

waitUntil {{vehicle _x == _x} count [teamSniper,teamSpotter] == 2};
[teamSniper,teamSpotter] join player;

This still doesn't explain how the join is happening immediately, though. The way you had the waitUntil command set up, it should have never returned true. You'll have to do some troubleshooting to discover what it is in your mission that is causing the premature join.

Also, how are you calling this script?

Ok, first, I am running the script through:

hint "Left click on map to set Sniper Team LZ coordinates"; onMapSingleClick """snprInfil"" setMarkerPos _pos;[]exec ""Sniper_Support2.sqf""; onMapSingleClick """";";

Second, and most important, I think I found why they join me from start. I think its because I'm spawning the sniper and the spotter out of the chopper and the I move them as cargo to the chopper. Now that I know that, I tried to place a sleep command before the last waitUntil and it didn't work. I was planning to make a counter of at least two seconds to then activate the waitUntil but I'm not really sure that this will work.

//Sniper Team Support By: wickedStigma
//------------------------------------

// Creates group [WORKING]

snprSupport = CreateGroup West;

//Creates Helicopter [WORKING]
transportHelicopter = createVehicle ["UH1Y", [(getMarkerPos "supportSpawn") select 0, (getMarkerPos "supportSpawn") select 1, 50], [], 0, 

"FLY"];

//Creates Helicopter Crew members [WORKING]

transportPilot = snprSupport createUnit ["USMC_Soldier_Pilot", [0,0,1], [], 0, "CAN_COLLIDE"];
transportPilot moveInDriver transportHelicopter;

transportGunner = snprSupport createUnit ["USMC_Soldier_Crew", [0,0,1], [], 0, "CAN_COLLIDE"];
transportGunner moveInGunner transportHelicopter;

//Creates Sniper and Spotter [WORKING]

[b][color="Red"]teamSniper = snprSupport createUnit ["USMC_SoldierS_SniperH", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSniper moveInCargo transportHelicopter;

teamSpotter = snprSupport createUnit ["USMC_SoldierS_Spotter", [0,0,1], [], 0, "CAN_COLLIDE"];
teamSpotter moveInCargo transportHelicopter;[/color][/b] [color="Orange"][i]// They sapwn outside the chopper[/i][/color]


//Gives move action to Helicopter [WORKING]

transportHelicopter move (getMarkerPos "snprInfil");

//Wait until Helicopter is over Infil to land [WORKING]

waitUntil {unitReady transportHelicopter};
transportHelicopter land "LAND";

//Wait until helicopter is near the ground and tell the sniper and the spotter to unload [WORKING]

waitUntil {(position transportHelicopter select 2) < 5};
unassignVehicle teamSniper;
unassignVehicle teamSpotter;

//Wait until sniper team is off the helicopter and make the helicopter return back to base

waitUntil {{vehicle _x == _x} count [teamSniper,teamSpotter] == 2};
[teamSniper,teamSpotter] join player;
transportHelicopter move (getMarkerPos "supportSpawn")

Share this post


Link to post
Share on other sites
hint "Left click on map to set Sniper Team LZ coordinates"; onMapSingleClick """snprInfil"" setMarkerPos _pos;[]exec ""Sniper_Support2.sqf""; onMapSingleClick """";";

There's your problem. Trying to run an .sqf script using exec won't work properly; among other things, both sleeps and waitUntils will be ignored. When using .sqf scripts, you must always use execVM; never use the old exec for anything except running old .sqs scripts.

The fact that the sniper team is spawning outside of the chopper initially isn't a problem. Once the waitUntils are working, the script won't be checking for their presence in the chopper until after it has nearly landed, anyway.

Share this post


Link to post
Share on other sites

Ok, let me change that and Ill post back in a minute to see if it works. And btw, thanks for helping me in both scripts, I already posted the new version of the artillery strike and added special thanks to you.

---------- Post added at 02:32 PM ---------- Previous post was at 02:27 PM ----------

IT WORKS!!!!!!!!!!!! ITS ALIIIIIIVE!!!!!!!!! Fianlly man, so that was the problem. I'm going to add a couple of more features and then will post the final version. Thanks a lot ST_Dux. Lets see if I can get through alone with the other features. Thanks again man.

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  

×