Jump to content
Sign in to follow this  
bennettonn

Complications in a script

Recommended Posts

HI GUYS :cool:

well I have an old post that was for an infiltration mission, in a part of the mission the player should get a uniform of the enemy to become a friend, and it worked out gave me a Great code that was this

private ["_unit", "_eastGrp","_westGrp"];

_unit = _this select 0;
_eastGrp =  createGroup EAST;
_westGrp = createGroup WEST;

if (isNull _unit) exitWith {};

while { true } do {
sleep 3;
   if ( ( currentWeapon _unit ) in ["arifle_Katiba_ACO_F", "launch_RPG32_F", "hgun_Rook40_F"] && { ( uniform _unit ) in ["U_O_CombatUniform_ocamo", "someOther_uniform"] } ) then {  
       if ( !( _unit in ( units _eastGrp ) ) ) then {
           [_unit] joinSilent _eastGrp; 
           player sideChat "You've joined the east group.";
       };
   } else {
       if ( !( _unit in ( units _westGrp ) ) ) then {
           [_unit] joinSilent _westGrp; 
           player sideChat "You've joined the west group.";        
       };
   };
};

well I used this code and everything worked, so that was one thing that was missing the space to put the classname of the vest that the player will use, so I'm doing this post to find help to modify this code to add space to write the classname of the vest. if someone can help me, thank you.

Share this post


Link to post
Share on other sites

I think this should not be the problem for you at all, or I missing something else?

   //old//if ( ( currentWeapon _unit ) in ["arifle_Katiba_ACO_F", "launch_RPG32_F", "hgun_Rook40_F"] && { ( uniform _unit ) in ["U_O_CombatUniform_ocamo", "someOther_uniform"] } ) then {  
   //suggestion// 
   if ( ( currentWeapon _unit ) in ["arifle_Katiba_ACO_F", "launch_RPG32_F", "hgun_Rook40_F"] && { ( uniform _unit ) in ["U_O_CombatUniform_ocamo", "someOther_uniform"] } && { ( vest _unit ) in arrayVests }) then { 

Share this post


Link to post
Share on other sites

[/color]

I think this should not be the problem for you at all, or I missing something else?

   //old//if ( ( currentWeapon _unit ) in ["arifle_Katiba_ACO_F", "launch_RPG32_F", "hgun_Rook40_F"] && { ( uniform _unit ) in ["U_O_CombatUniform_ocamo", "someOther_uniform"] } ) then {  
   //suggestion// 
   if ( ( currentWeapon _unit ) in ["arifle_Katiba_ACO_F", "launch_RPG32_F", "hgun_Rook40_F"] && { ( uniform _unit ) in ["U_O_CombatUniform_ocamo", "someOther_uniform"] } && { ( vest _unit ) in arrayVests }) then { 

I've tried this, but appears script error does not work I already tried several ways and not achieve a result and that's why I came to look for help in the forum

Edited by Bennettonn

Share this post


Link to post
Share on other sites

Hi since I can't post new thread, I'm just borrowing your thread to ask one of my questions. Does anyone know how to script a mission end for a death match? This match is about team A vs team B.I have placed a trigger for each team to specify that if the team has less than 4 unis left, then mission is ended. But it makes both side seeing "mission completed" message when one of the team has less than 4 units left. It's supposed to be winners win when losers lose but now it's winners win then losers win as well. How to fix that?

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  

×