Jump to content

curtcooll

Member
  • Content Count

    154
  • Joined

  • Last visited

  • Medals

Everything posted by curtcooll

  1. I got this script UPSOM vehicle re spawn and patrol script issue i have is copilot wont spawn into seat i tried using cargo so know it works but moveinturret or assignasturret didn't work? for [{ _loop = 0 },{ _loop < count _unitsGroup},{ _loop = _loop + 1}] do { _guy = _unitsGroup select _loop; _guy setSkill (_AI_skillArray select _loop); if (_loop == 0) then {_guy moveInDriver _vcl_new}; if (_loop == 1) then {_guy moveinturret _vcl_new}; sleep 0.1; }; ---------- Post added at 20:11 ---------- Previous post was at 18:47 ---------- anyone?
  2. Having issue with script im using the vehicle respawns with helicopter pilot but cannot get the co pilot to get into the seat. for [{ _loop = 0 },{ _loop < count _unitsGroup},{ _loop = _loop + 1}] do { _guy = _unitsGroup select _loop; _guy setSkill (_AI_skillArray select _loop); if (_loop == 0) then {_guy moveInDriver _vcl_new}; //if (_loop == 1) then {_guy moveInTurret _vcl_new}; if (_loop == 1) then {_guy moveinturret _vcl_new}; sleep 0.1; };
  3. Thanks alot dude and you know what im thick i come across that even done it myself other day cheers though dude reps.
  4. curtcooll

    TeeTimes Warfare

    Can you help me please when i use store to buy vehicle on the east side the cars spawn 100 yards or more from the store, im using my own mission and west side vehicles spawn near player?
  5. ok so there no way for me to spawn a faction vehicle without ai already in there thats issue im having cant use empty vehicle coz it classes it as a enemy showing up with red dot instead of green. thanks
  6. does this re spawn work for putting in AI units back in the manned faction vehicles as im having issue with empty vehicles being shown as enemy vehicles.
  7. curtcooll

    TeeTimes Warfare

    Hi loving what you done so far all new stuff added etc but im using it in my mission and having a issue i think its to do with me not having random base spawn but the opfor red side when i buy vehicle it spawns about 100 yards or more away how can i resolve that i have your latest 620.
  8. curtcooll

    How to? Eject AI

    There 2 ways it can be done one with waypoints and like the above script i spent a few hours on ejecting divers and worked it out perfect.
  9. Ok for past 2 weeks ive been working on and scripting trying to get some help but didn't get much but to much avail trail and error i kept on going and am happy to see im nearly finished got a'lot neat stuff going on ill list a few things below. i have tested with some freinds and its quite intense need to balance a few things to get it ready for possible release. = implemented tested and finshed Shops Weapons AI units Vehicles More shops to come Money system killing players yields money killing AI units yields money More ways of getting money to come Game modes King of the hill - Global score system so you know if there is anyone at the Hill/village with constant UI score update system && contested hill. more to come AI support vehicles - support modules broken at the moment Weather changing system day/night Rain/Fog Other things scripted in bodies clean up Spawn in reaming AI units you bought to keep things fresh and intense More to come What im looking for are some testers to test balance and if there are any bugs, possibly help with scripting if anyone wants to be part of this.
  10. yeah there 2 options 1 i have a script that when you die you spawn into AI units or you can set up a description.ext file and set it like so respawn = "GROUP"; respawnDelay = 5;
  11. curtcooll

    TeeTimes Warfare

    How can u make it so you get money for killing the ai units in enemy players group and getting teamkills for your ai group units punishment.
  12. curtcooll

    Warefare

    why does no one wanna help if i could script myself i would but i dont have skills ive tried doing it myself but nothing.
  13. curtcooll

    Warefare

    I've been editing tee times warfare for my game mode just for the use of the shops and money system great so far only issue is that due to my game mode mostly being 1v1 with ai team, I'm trying to get it so that you get money the same as killing a player but for ai, I've tried going through code to find exactly what i need to do to account for ai team killing and enemy killing. /* Script written by TeeTime dont remove this comment */ //Functions //Debug Tee_Debug_Spawn = { //[] spawn Tee_Player_TK_Punish; /* _mags = magazines player; player groupchat str _mags; diag_log str _mags; */ //call Tee_Base_Set_Base; //call Tee_AttackTown; //_marker = createMarker ["Test", getPos player]; //[] call Tee_CreateTownMarker; // ServicePoint Building : Military Cargo House V1 (Land_Cargo_House_V1_F) // Baracks : Military Cargo HQ V1 (Land_Cargo_HQ_V1_F) // ComandPost : Military Cargo OP V1 (Land_Cargo_Patrol_V1_F)!?! nicht sicher _veh = createVehicle ["Land_Cargo_HQ_V1_F",getPos player,[],0,""]; }; Tee_Debug_Spawn_Weapon = { //[base_1,base_2] call Tee_Marker_ConnectMarker; //[base_2,base_4] call Tee_Marker_ConnectMarker; //[player] call Tee_Town_CreateAIDef; //_mags = weapons player; //player groupchat str _mags; //diag_log str _mags; //player addMagazine "30Rnd_65x39_caseless_green"; //player addWeapon "arifle_Khaybar_ACO_point_F"; }; Tee_Debug_Teleport = { onMapSingleClick "player setPos _pos;"; }; //**************************************** //Basic //**************************************** Tee_Init_Client = { if(playerside == west) then { TW_playerside = "west"; TW_playerside_colour = "ColorBlue";}; if(playerside == east) then { TW_playerside = "east"; TW_playerside_colour = "ColorRed";}; //if(player in TW_westplayer_array) then { TW_playerside = "west"; TW_playerside_colour = "ColorBlue";}; //For Later //if(player in TW_eastplayer_array) then { TW_playerside = "east"; TW_playerside_colour = "ColorRed";}; //For Later player addEventHandler ["killed", "_this call Tee_Player_Killed;"]; "TW_Vote_Start" addPublicVariableEventHandler {[] spawn Tee_Vote_Started;}; "TW_Player_Killed" addPublicVariableEventHandler {TW_Player_Killed call Tee_Player_Killed_Pub;}; "TW_Town_Taken" addPublicVariableEventHandler {TW_Town_Taken call Tee_Town_Caputred_2;}; "TW_Mission_End" addPublicVariableEventHandler { if(TW_restart) then { [] spawn Tee_Client_Restart; } else { endMission "END1"; }; }; }; Tee_Client_Restart = { titleText["Mission ended and will be restarted in 15 seconds.", "PLAIN DOWN"]; //Msg sleep 15; Tee_Konto = 1000; [] spawn Tee_Client_Base_Build_West; //TeeTimeTest [] spawn Tee_Client_Base_Build_East; //TeeTimeTest titleText["Mission Restarted", "PLAIN DOWN"]; //Msg TW_Mission_End = false; }; //******************************* //Voting //******************************* /* Called by player who init the Vote */ Tee_Vote_Start = { private ["_kind","_text","_result","_return"]; _kind = _this select 0; //What kind of Vote is it can be "HQ", //Check and activate Vote if(TW_Voting) exitWith {titleText ["Please wait there is already a active Voting.", "PLAIN DOWN"];}; //Msg TW_Voting = true; //Reset _return = false; TW_Vote_Result = _return; //Own Vote TW_Vote_Votes = [1,0]; publicVariable "TW_Vote_Votes"; TW_Vote_Start = [TW_playerside,_kind,name player]; publicVariable "TW_Vote_Start"; _text = format ["You started a vote. The Team has now %1 Seconds to vote.",TW_Vote_Time]; titleText [_text, "PLAIN DOWN"]; //Msg if(debug) then {TW_Vote_Start spawn Tee_Vote_Started;}; sleep TW_Vote_Time; _text = format ["Voting ended. Resulst: %1 Yes %2 No",TW_Vote_Votes select 0,TW_Vote_Votes select 1]; titleText[_text, "PLAIN DOWN"]; //Msg _return = if((TW_Vote_Votes select 0) > (TW_Vote_Votes select 1)) then {true} else {false}; TW_Vote_Result = _return; TW_Voting = false; }; /* Called on all players */ Tee_Vote_Started = { private ["_side","_kind","_name","_text","_actioncode","_action","_actionarray"]; _side = _this select 0; //Side who is allowed to vote _kind = _this select 1; //What kind of Vote is it _name = _this select 2; if(_side != TW_playerside) exitWith {}; if(TW_Voting) exitWith {}; TW_Voting = true; if(_kind == "HQ") then { _text = format ["%1 wants to mobilize the HQ. Please vote!",_name]; }; titleText [_text, "PLAIN DOWN"]; //Msg _text = "Vote Yes"; _actioncode = format ["[%1] call Tee_Vote_Vote;",true]; _action = player addAction [_text, AddActionCode,_actioncode]; TW_Vote_Actions = TW_Vote_Actions + [_action]; _text = "Vote No"; _actioncode = format ["[%1] call Tee_Vote_Vote;",false]; _action = player addAction [_text, AddActionCode,_actioncode]; TW_Vote_Actions = TW_Vote_Actions + [_action]; }; /* Vote */ Tee_Vote_Vote = { if(_this select 0) then { TW_Vote_Votes = [(TW_Vote_Votes select 0) + 1,(TW_Vote_Votes select 1)]; } else { TW_Vote_Votes = [(TW_Vote_Votes select 0),(TW_Vote_Votes select 1) + 1]; }; publicVariable "TW_Vote_Votes"; { player removeAction _x; } forEach TW_Vote_Actions; TW_Voting = false; TW_Vote_Actions = []; }; //******************************* //Player //******************************* Tee_SetPlayer = { waitUntil {HQ_placed}; waitUntil {TW_HQ_Placed_Client}; waitUntil {alive player}; if(TW_playerside == "west") then {player setPos (getMarkerPos TW_West_Respawn);}; if(TW_playerside == "east") then {player setPos (getMarkerPos TW_East_Respawn);}; //check sleep 2; if(TW_playerside == "west" && player distance hq_west > 10) then {player setPos (getMarkerPos TW_West_Respawn);}; if(TW_playerside == "east" && player distance hq_east > 10) then {player setPos (getMarkerPos TW_East_Respawn);}; //Make sure that leader is a player muss für player squads angepasst werden TeeTimeTest if(! isPlayer(leader (group (vehicle player)))) then { group player selectLeader player; }; //Welcome Msg sleep 20; titleText["Welcome to TeeTimes Warfare - ALPHA", "PLAIN DOWN"]; //Msg sleep 5; titleText["I hope that you wil enjoy this mission and Arma III. Have in mind its only Alpha!", "PLAIN DOWN"]; //Msg sleep 5; titleText["Here some Tipps:", "PLAIN DOWN"]; //Msg sleep 5; titleText["1. Caputure all Cities to win this mission!", "PLAIN DOWN"]; //Msg sleep 5; titleText["2. The Boxes in your base contain different shops for AI, Vehicle and Weapons.", "PLAIN DOWN"]; //Msg sleep 5; titleText["3. Increase your Income by holding more Cities.", "PLAIN DOWN"]; //Msg sleep 5; titleText["4. Dont Spawncamp the enemy Base!", "PLAIN DOWN"]; //Msg sleep 5; titleText["5. Use AI to capture Towns faster.", "PLAIN DOWN"]; //Msg sleep 5; titleText["6. Use i to open the bought ammo boxes.", "PLAIN DOWN"]; //Msg sleep 5; titleText["Good Luke and Have Fun", "PLAIN DOWN"]; //Msg }; //Called on killed Client Tee_Player_Killed = { private ["_victim","_killer","_side","_pos"]; _victim = _this select 0; _killer = _this select 1; _side = playerSide; //TeeTimeTest kann im Moment nur auf Clients ausgeführt werden! _pos = getPos _victim; if(isPlayer _killer) then { TW_Player_Killed = [_victim,_killer,_side,_pos]; publicVariable "TW_Player_Killed"; }; //For selfhosted Missions if(isServer && isPlayer _killer) then { _this call Tee_Player_Killed_Pub; }; }; //Called on all Clients Tee_Player_Killed_Pub = { private ["_victim","_killer","_side","_text"]; _victim = _this select 0; _killer = _this select 1; _side = _this select 2; //Bonus if(player == _killer && playerside != _side) then { Tee_Konto = Tee_Konto + Tee_Money_Kill_Bonus; player groupchat format ["You got %1$ for killing %2.",Tee_Money_Kill_Bonus,(name _victim)]; //Msg }; //Punish if(player == _killer && playerside == _side) then { //Punish Tee_Money_TK_Punish call Tee_Money_Substract; _text = format ["You killed a Teammember and lost %1$",Tee_Money_TK_Punish]; titleText[_text, "PLAIN DOWN"]; //Msg //HQ if((player distance hq_west < 20 && TW_playerside == "west") or (player distance hq_east < 20 && TW_playerside == "east")) then { player setDamage 1; titleText["You killed a Teammember near the Base and got killed for this.", "PLAIN DOWN"]; //Msg }; //Kick TW_TK_Counter = TW_TK_Counter + 1; if(TW_TK_Counter >= 3) then { [] spawn Tee_Player_TK_Punish; TW_TK_Counter = 0; TW_Player_Kick = getPlayerUID player; publicVariable "TW_Player_Kick"; }; }; }; //Punish Player for TK Tee_Player_TK_Punish = { private ["_i","_pos"]; _pos = getPos player; titleText["You killed to many Teammates and have to stay here for 5 minutes!", "PLAIN DOWN"]; //Msg for [{_i=0},{_i<300},{_i=_i+30}] do { player setPos [0,0,5]; titleText["Dont TK! First look then shoot!", "PLAIN DOWN"]; //Msg sleep 30; }; player setPos _pos; }; //******************************************* //Money //******************************************* Tee_ShowMoney = { hintSilent format ["Your Account: %1$",Tee_Konto]; //Msg }; Tee_Money_Substract = { if(Tee_Konto > _this) then { Tee_Konto = Tee_Konto - _this; } else { Tee_Konto = 0; }; }; Tee_MoneyLoop = { private ["_i","_count","_enemycount"]; while{true} do { sleep 60; _count = 0; _enemycount = 0; //Basic Tee_Konto = Tee_Konto + Tee_Money_Min; //Towns { _object = _x select 0; if(TW_playerside == _object getVariable "TownSide") then { Tee_Konto = Tee_Konto + Tee_Money_Town; _count = _count + 1; } else { if("civ" != _object getVariable "TownSide") then { _enemycount = _enemycount + 1; }; }; } forEach TW_TownArray; //TK Counter Reduce if(_i >= 10) then { TW_TK_Counter = TW_TK_Counter - 1; _i = 0; }; //End Mission Loser if(_enemycount == count TW_TownArray && !TW_Mission_End) exitWith { TW_Mission_End = true; publicVariable "TW_Mission_End"; }; //End Mission Winner if(_count == count TW_TownArray && !TW_Mission_End) exitWith { TW_Mission_End = true; publicVariable "TW_Mission_End"; }; _i = _i + 1; }; }; Tee_ActionLoop = { private ["_cursertarget","_veh","_invehicle","_action","_money_action","_lock_action","_lock_action2","_lock_action3","_lock_actionarray","_townaction","_money_action2","_town_actionarray","_neartown","_hq_action","_hq_actionarray","_veh_s_action","_veh_s_actionarray","_weap_action","_weap_actionarray","_ai_action","_ai_actionarray","_repairaction","_repairactionarray","_count","_object","_weap_typ","_text","_actioncode"]; _money_action = false; _lock_action = false; _lock_action3 = false; _townaction = false; _neartown = false; _hq_action = false; _veh_s_action = false; _weap_action = false; _ai_action = false; _repairaction = false; _town_actionarray = []; _hq_actionarray = []; _veh_s_actionarray = []; _weap_actionarray = []; _ai_actionarray = []; _repairactionarray = []; while{true} do { //Reset after Death and place Player if(! alive player) then { titleText["You died and will Respawn in 30 Seconds!", "PLAIN DOWN"]; //Msg _money_action = false; player removeAction _money_action2; waitUntil{alive player}; if(! isPlayer(leader (group (vehicle player)))) then { group player selectLeader player; }; if(TW_playerside == "west") then {player setPos (getMarkerPos TW_West_Respawn);}; if(TW_playerside == "east") then {player setPos (getMarkerPos TW_East_Respawn);}; }; //Check Vehicle if(player == vehicle player) then { _invehicle = false; _cursertarget = cursorTarget; } else { _veh = vehicle player; _invehicle = true; }; //Money if(!_money_action) then { _money_action2 = player addAction ["Show Money", AddActionCode,'[] call Tee_ShowMoney;']; _money_action = true; //Debug if(debug) then { player addAction ["Spawn Veh", AddActionCode,'[] call Tee_Debug_Spawn;']; player addAction ["Add Weapon", AddActionCode,'[] call Tee_Debug_Spawn_Weapon;']; player addAction ["Teleport", AddActionCode,'[] call Tee_Debug_Teleport;']; }; }; //Lock Unlock Vehicle if(!_invehicle && (_cursertarget in TW_Vehicle_Client) && (player distance _cursertarget < 5) && !_lock_action3) then { _text = "Lock/Unlock"; _actioncode = format ["[%1] call Tee_Vehicle_Lock;",_cursertarget]; _action = player addAction [_text, AddActionCode,_actioncode]; _lock_actionarray = _lock_actionarray + [_action]; _lock_action3 = true; }; if(!_lock_action && ((player distance _cursertarget > 5) || !(_cursertarget in TW_Vehicle_Client) || _invehicle)) then { { player removeAction _x; } forEach _lock_actionarray; _lock_actionarray = []; _lock_action3 = false; }; //Unlock Action for Player in Vehicles if(_invehicle && !_lock_action) then { //Action _text = "Lock/Unlock"; _actioncode = format ["[%1] call Tee_Vehicle_Lock;",_veh]; _lock_action2 = player addAction [_text, AddActionCode,_actioncode]; _lock_action = true; }; if(!_invehicle && _lock_action) then { player removeAction _lock_action2; _lock_action = false; }; //Townshops if(!_townaction) then { { _object = _x select 0; if(player distance _object < 5 && TW_playerside == _object getVariable "TownSide") then { if(!_invehicle) then { { _text = format ["Buy %1 (%2$)",_x call Tee_GetVeh_Name,_x call Tee_GetVeh_Price]; _actioncode = format ["[%1] call Tee_CreateVehicle;",_x]; _action = player addAction [_text, AddActionCode,_actioncode]; _town_actionarray = _town_actionarray + [_action]; } forEach TW_Vehicle_Shop_Town; } else { //Repair _text = format ["Repair your Vehicle (%1$)",TW_Repair_Cost]; _actioncode = format ["[] spawn Tee_Sup_Repair;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _town_actionarray = _town_actionarray + [_action]; //Refuel _text = format ["Refuel your Vehicle (%1$)",TW_Sup_Fuel_Cost]; _actioncode = format ["[] spawn Tee_Sup_Refuel;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _town_actionarray = _town_actionarray + [_action]; }; _townaction = true; }; } forEach TW_TownArray; } else { { _object = _x select 0; if(player distance _object < 5) then { _neartown = true; } else { _neartown = false; }; } forEach TW_TownArray; if(!_neartown && _townaction) then { { player removeAction _x; } forEach _town_actionarray; _town_actionarray = []; _townaction = false; }; }; //West HQ if((player distance hq_west) < 4 && !_invehicle && !(alive driver hq_west)) then { if(TW_playerside == "west" && !_hq_action) then { //Actions _text = format ["Mobilize HQ"]; _actioncode = format ["[%1] spawn Tee_Client_Base_DeMobHQ;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _hq_actionarray = _hq_actionarray + [_action]; _hq_action = true; }; } else { if(_hq_action && TW_playerside == "west") then { { player removeAction _x; } forEach _hq_actionarray; _hq_actionarray = []; _hq_action = false; }; }; //WestHQ SetUp if(player == (driver hq_west)) then { //Actions _text = format ["Build HQ"]; _actioncode = format ["[%1] call Tee_Client_Base_HQ_setUp;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _hq_actionarray = _hq_actionarray + [_action]; _hq_action = true; }; //West Vehicle if((player distance west_shop_veh) < 4 && !_invehicle) then { if(TW_playerside == "west" && !_veh_s_action) then { titleText["Vehicle Shop", "PLAIN DOWN"]; //Msg //Actions { _text = format ["Buy %1 (%2$)",_x call Tee_GetVeh_Name,_x call Tee_GetVeh_Price]; _actioncode = format ["[%1] call Tee_CreateVehicle;",_x]; _action = player addAction [_text, AddActionCode,_actioncode]; _veh_s_actionarray = _veh_s_actionarray + [_action]; } forEach TW_Vehicle_Shop_West; _veh_s_action = true; }; } else { if(_veh_s_action && TW_playerside == "west") then { { player removeAction _x; } forEach _veh_s_actionarray; _veh_s_actionarray = []; _veh_s_action = false; }; }; //West Weapon if((player distance west_shop_weapons) < 4 && !_invehicle) then { if(TW_playerside == "west" && !_weap_action) then { titleText["Weapon Shop", "PLAIN DOWN"]; //Msg //Actions { if(TW_BoxShop) then { _text = format ["Buy %1 (%2$)",_x call Tee_GetVeh_Name,_x call Tee_GetVeh_Price]; _actioncode = format ["[%1] call Tee_CreateVehicle;",_x]; } else { _text = format ["Buy %1 (%2$)",_x call Tee_GetWeap_Name,_x call Tee_GetWeap_Price]; _weap_typ = _x call Tee_GetWeap_Typ; if(_weap_typ == "wep") then { _actioncode = format ["[%1] call Tee_AddWeapon;",_x]; }; if(_weap_typ == "mag") then { _actioncode = format ["[%1] call Tee_AddMag;",_x]; }; }; _action = player addAction [_text, AddActionCode,_actioncode]; _weap_actionarray = _weap_actionarray + [_action]; } forEach TW_Weapon_Shop_West; _weap_action = true; }; } else { if(_weap_action && TW_playerside == "west") then { { player removeAction _x; } forEach _weap_actionarray; _weap_actionarray = []; _weap_action = false; }; }; //West AI Shop if((player distance west_shop_ai) < 4 && !_invehicle) then { if(TW_playerside == "west" && !_ai_action) then { titleText["AI Shop", "PLAIN DOWN"]; //Msg //Actions { _text = format ["Buy %1 (%2$)",_x call Tee_GetUnit_Name,_x call Tee_GetUnit_Price]; _actioncode = format ["[%1] call Tee_BuyUnit;",_x]; _action = player addAction [_text, AddActionCode,_actioncode]; _ai_actionarray = _ai_actionarray + [_action]; } forEach TW_AI_Shop_West; _ai_action = true; }; } else { if(_ai_action && TW_playerside == "west") then { { player removeAction _x; } forEach _ai_actionarray; _ai_actionarray = []; _ai_action = false; }; }; //West Repair Station if((player distance hq_west) < 10 && _invehicle) then { if(TW_playerside == "west" && !_repairaction) then { //titleText["Repair Station", "PLAIN DOWN"]; //Msg //Repair _text = format ["Repair your Vehicle (%1$)",TW_Repair_Cost]; _actioncode = format ["[] spawn Tee_Sup_Repair;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _repairactionarray = _repairactionarray + [_action]; //Refuel _text = format ["Refuel your Vehicle (%1$)",TW_Sup_Fuel_Cost]; _actioncode = format ["[] spawn Tee_Sup_Refuel;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _repairactionarray = _repairactionarray + [_action]; //Reammo _text = format ["Reammo your Vehicle (%1$)",TW_Sup_Reammo_Cost]; _actioncode = format ["[] spawn Tee_Sup_Reammo;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _repairactionarray = _repairactionarray + [_action]; _repairaction = true; }; } else { if(_repairaction && TW_playerside == "west") then { { player removeAction _x; } forEach _repairactionarray; _repairactionarray = []; _repairaction = false; }; }; //******************* //East //******************* //East HQ if(player distance hq_east < 4 && !_invehicle && !(alive driver hq_east)) then { if(TW_playerside == "east" && !_hq_action) then { //Actions _text = format ["Mobilize HQ"]; _actioncode = format ["[%1] spawn Tee_Client_Base_DeMobHQ;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _hq_actionarray = _hq_actionarray + [_action]; _hq_action = true; }; } else { if(_hq_action && TW_playerside == "east") then { { player removeAction _x; } forEach _hq_actionarray; _hq_actionarray = []; _hq_action = false; }; }; //EastHQ SetUp if(player == driver hq_east) then { //Actions _text = format ["Build HQ"]; _actioncode = format ["[%1] call Tee_Client_Base_HQ_setUp;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _hq_actionarray = _hq_actionarray + [_action]; _hq_action = true; }; //East Vehicle Shop if(player distance east_shop_veh < 4 && !_invehicle) then { if(TW_playerside == "east" && !_veh_s_action) then { titleText["Vehicle Shop", "PLAIN DOWN"]; //Msg //Actions { _text = format ["Buy %1 (%2$)",_x call Tee_GetVeh_Name,_x call Tee_GetVeh_Price]; _actioncode = format ["[%1] call Tee_CreateVehicle;",_x]; _action = player addAction [_text, AddActionCode,_actioncode]; _veh_s_actionarray = _veh_s_actionarray + [_action]; } forEach TW_Vehicle_Shop_East; _veh_s_action = true; }; } else { if(_veh_s_action && TW_playerside == "east") then { { player removeAction _x; } forEach _veh_s_actionarray; _veh_s_action = false; _veh_s_actionarray = []; }; }; //East Weapon if((player distance east_shop_weapons) < 4 && !_invehicle) then { if(TW_playerside == "east" && !_weap_action) then { titleText["Weapon Shop", "PLAIN DOWN"]; //Msg //Actions { _text = format ["Buy %1 (%2$)",_x call Tee_GetWeap_Name,_x call Tee_GetWeap_Price]; _weap_typ = _x call Tee_GetWeap_Typ; if(_weap_typ == "wep") then { _actioncode = format ["[%1] call Tee_AddWeapon;",_x]; }; if(_weap_typ == "mag") then { _actioncode = format ["[%1] call Tee_AddMag;",_x]; }; _action = player addAction [_text, AddActionCode,_actioncode]; _weap_actionarray = _weap_actionarray + [_action]; } forEach TW_Weapon_Shop_East; _weap_action = true; }; } else { if(_weap_action && TW_playerside == "east") then { { player removeAction _x; } forEach _weap_actionarray; _weap_actionarray = []; _weap_action = false; }; }; //East AI Shop if((player distance east_shop_ai) < 4 && !_invehicle) then { if(TW_playerside == "east" && !_ai_action) then { titleText["AI Shop", "PLAIN DOWN"]; //Msg //Actions { _text = format ["Buy %1 (%2$)",_x call Tee_GetUnit_Name,_x call Tee_GetUnit_Price]; _actioncode = format ["[%1] call Tee_BuyUnit;",_x]; _action = player addAction [_text, AddActionCode,_actioncode]; _ai_actionarray = _ai_actionarray + [_action]; } forEach TW_AI_Shop_East; _ai_action = true; }; } else { if(_ai_action && TW_playerside == "east") then { { player removeAction _x; } forEach _ai_actionarray; _ai_actionarray = []; _ai_action = false; }; }; //East Repair Station if((player distance hq_east) < 10 && _invehicle) then { if(TW_playerside == "east" && !_repairaction) then { //titleText["Repair Station", "PLAIN DOWN"]; //Msg //Repair _text = format ["Repair your Vehicle (%1$)",TW_Repair_Cost]; _actioncode = format ["[] spawn Tee_Sup_Repair;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _repairactionarray = _repairactionarray + [_action]; //Refuel _text = format ["Refuel your Vehicle (%1$)",TW_Sup_Fuel_Cost]; _actioncode = format ["[] spawn Tee_Sup_Refuel;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _repairactionarray = _repairactionarray + [_action]; //Reammo _text = format ["Reammo your Vehicle (%1$)",TW_Sup_Reammo_Cost]; _actioncode = format ["[] spawn Tee_Sup_Reammo;"]; _action = player addAction [_text, AddActionCode,_actioncode]; _repairactionarray = _repairactionarray + [_action]; _repairaction = true; }; } else { if(_repairaction && TW_playerside == "east") then { { player removeAction _x; } forEach _repairactionarray; _repairactionarray = []; _repairaction = false; }; }; //End sleep 5; }; }; //****************************************** //Base //****************************************** Tee_Base_Create_Marker = { private ["_marker","_name"]; waitUntil {HQ_placed}; //West if(TW_playerside == "west") then { //Create Respawn _marker = CreateMarkerLocal [TW_West_Respawn, [((getPos west_shop_veh) select 0) + 5,((getPos west_shop_veh) select 1) -10,(getPos west_shop_veh) select 2]]; //TeeTimeTest Marker ist Lokal //HQ _marker = CreateMarkerLocal [TW_West_BaseMarker, position hq_west]; _marker setMarkerTypeLocal "flag_NATO"; //Shops //Vehicle //_name = format ["sh_m_%1_%2",floor(time),floor(random(1000))]; _marker = CreateMarkerLocal [TW_West_ShopMarker_V, getPos west_shop_veh]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal "mil_dot"; _marker setMarkerTextLocal "Vehicle"; //Weapon //_name = format ["sh_m_%1_%2",floor(time),floor(random(1000))]; _marker = CreateMarkerLocal [TW_West_ShopMarker_G, getPos west_shop_weapons]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal "mil_dot"; _marker setMarkerTextLocal "Armory"; //AI //_name = format ["sh_m_%1_%2",floor(time),floor(random(1000))]; _marker = CreateMarkerLocal [TW_West_ShopMarker_AI, getPos west_shop_ai]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal "mil_dot"; _marker setMarkerTextLocal "Barracks"; }; //East if(TW_playerside == "east") then { //Create Respawn _marker = CreateMarkerLocal [TW_East_Respawn, [((getPos east_shop_veh) select 0) + 5,((getPos east_shop_veh) select 1) -10,(getPos east_shop_veh) select 2]]; //TeeTimeTest Marker ist Lokal _marker = CreateMarkerLocal [TW_East_BaseMarker, position hq_east]; _marker setMarkerTypeLocal "flag_Iran"; //Shops //Vehicle //_name = format ["sh_m_%1_%2",floor(time),floor(random(1000))]; _marker = CreateMarkerLocal [TW_East_ShopMarker_V, getPos east_shop_veh]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal "mil_dot"; _marker setMarkerTextLocal "Vehicle"; //Weapon //_name = format ["sh_m_%1_%2",floor(time),floor(random(1000))]; _marker = CreateMarkerLocal [TW_East_ShopMarker_G, getPos east_shop_weapons]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal "mil_dot"; _marker setMarkerTextLocal "Armory"; //AI //_name = format ["sh_m_%1_%2",floor(time),floor(random(1000))]; _marker = CreateMarkerLocal [TW_East_ShopMarker_AI, getPos east_shop_ai]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal "mil_dot"; _marker setMarkerTextLocal "Barracks"; }; TW_HQ_Placed_Client = true; }; Tee_Client_Base_Build_West = { private ["_hq","_marker"]; _hq = hq_west; //Set Respawn TW_West_Respawn setMarkerPosLocal [((getPos west_shop_veh) select 0) + 5,((getPos west_shop_veh) select 1) - 10,(getPos west_shop_veh) select 2]; //TeeTimeTest Marker ist Lokal //Set Veh Spawn west_shop_veh setPosATL [(getPos _hq) select 0,((getPos _hq) select 1) + 10,(getPos _hq) select 2]; "west_vehspawn" setMarkerPos [((getPos _hq) select 0) - 10,((getPos _hq) select 1),(getPos _hq) select 2]; //Nicht genutzt //Set Weapon Shop west_shop_weapons setPosATL [(getPos _hq) select 0,((getPos _hq) select 1) + 5,(getPos _hq) select 2]; //Set AI Shop west_shop_ai setPosATL [(getPos _hq) select 0,((getPos _hq) select 1) - 5,(getPos _hq) select 2]; }; Tee_Client_Base_Build_East = { private ["_hq","_marker"]; _hq = hq_east; //Set Respawn TW_East_Respawn setMarkerPosLocal [((getPos east_shop_veh) select 0) + 5,((getPos east_shop_veh) select 1) - 10,(getPos east_shop_veh) select 2]; //TeeTimeTest Marker ist Lokal //Set Veh Spawn east_shop_veh setPosATL [(getPos _hq) select 0,((getPos _hq) select 1) + 10,(getPos _hq) select 2]; "east_vehspawn" setMarkerPos [((getPos _hq) select 0) - 10,((getPos _hq) select 1),(getPos _hq) select 2]; //Nicht genutzt //Set Weapon Shop east_shop_weapons setPosATL [(getPos _hq) select 0,((getPos _hq) select 1) + 5,(getPos _hq) select 2]; //Set AI Shop east_shop_ai setPosATL [(getPos _hq) select 0,((getPos _hq) select 1) - 5,(getPos _hq) select 2]; }; //Mobilze HQ Tee_Client_Base_DeMobHQ = { private ["_hq"]; if(TW_playerside == "west") then { _hq = hq_west; }; if(TW_playerside == "east") then { _hq = hq_east; }; //Start Voting ["HQ"] spawn Tee_Vote_Start; sleep (TW_Vote_Time + 2); if(!TW_Vote_Result) exitWith {}; //Exit if Voting failed //Mob HQ player moveInDriver _hq; _hq setFuel 1; _hq lock false; if(TW_playerside == "west") then { //[] spawn Tee_Client_Base_Build_West; }; if(TW_playerside == "east") then { //[] spawn Tee_Client_Base_Build_East; }; }; //Build HQ Tee_Client_Base_HQ_setUp = { private ["_hq"]; if(TW_playerside == "west") then { _hq = hq_west; }; if(TW_playerside == "east") then { _hq = hq_east; }; if(player != (driver _hq)) exitWith {}; //Set HQ _hq setDir 90; moveOut player; _hq setFuel 0; _hq lock true; if(TW_playerside == "west") then { [] spawn Tee_Client_Base_Build_West; }; if(TW_playerside == "east") then { [] spawn Tee_Client_Base_Build_East; }; }; //************************************************* //Towns //************************************************* Tee_Client_CreateTownMarker = { private ["_object","_markername","_text","_marker"]; { _object = _x select 0; _markername = _x select 1; _text = _x select 2; //Create Marker _marker = CreateMarkerLocal [_markername, position _object]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal "mil_circle"; _marker setMarkerTextLocal format["%1 100/100",_text]; _marker setMarkerColorLocal "ColorBlack"; } forEach TW_TownArray; }; /* Called on all Client who took the last points */ Tee_Town_Caputred = { private ["_object","_side"]; _object = _this select 0; _side = TW_playerside; TW_Town_Taken = [_object,_side]; publicVariable "TW_Town_Taken"; TW_Town_Taken_Server = [_object,_side]; publicVariable "TW_Town_Taken_Server"; if(isServer && !isDedicated) then { TW_Town_Taken_Server call Tee_Server_Town_CreateAIDef; }; }; /* Called on all Clients when a Town got captured */ Tee_Town_Caputred_2 = { private ["_object","_side"]; _object = _this select 0; _side = _this select 1; if(player distance _object <= TW_Town_CapDis && _side == TW_playerside) then { Tee_Konto = Tee_Konto + Tee_Money_TownCap; _text = format ["You took that Town and earned %1$",Tee_Money_TownCap]; titleText[_text, "PLAIN DOWN"]; //Msg }; }; Tee_AttackTown = { private ["_object","_unitcount","_name","_points","_marker","_text"]; while{true} do { waitUntil{alive player}; { _object = _x select 0; _marker = _x select 1; _name = _x select 2; if(player distance _object <= TW_Town_CapDis) then { _points = _object getVariable "TownPoints"; if(TW_playerside != _object getVariable "TownSide") then { //Count near AI units _unitcount = 0; { if(_x distance _object <= TW_Town_CapDis) then { _unitcount = _unitcount + 1; }; } forEach (units (group player)); _points = _points - (5 * _unitcount); if(debug) then { _points = _points - 20; }; if(_points <= 0) then { _object setVariable ["TownSide",TW_playerside , true]; _object setVariable ["TownPoints", 100, true]; //_marker = _object getVariable "TownMarker"; //TeeTimeTest gedoppelt _marker setMarkerColorLocal TW_playerside_colour; _marker setMarkerTextLocal format["%1 100/100",_name]; Tee_Konto = Tee_Konto + Tee_Money_TownCap; _text = format ["You took that Town and earned %1$",Tee_Money_TownCap]; titleText[_text, "PLAIN DOWN"]; //Msg //Create AI Def [_object] call Tee_Town_Caputred; } else { _object setVariable ["TownPoints", _points, true]; _marker setMarkerTextLocal format["%1 %2/100",_name,_points]; _text = format ["%1 Points left",_points]; titleText[_text, "PLAIN DOWN"]; //Msg }; } else { if(_points < 100) then { _points = _points + 10; _object setVariable ["TownPoints", _points, true]; }; }; }; } forEach TW_TownArray; sleep 30; }; }; //********************************************************** //Support and Supply Functions //********************************************************** /* Repair Function Must be spawned */ Tee_Sup_Repair = { private ["_i","_vehicle","_pos","_damage","_text"]; _vehicle = vehicle player; _pos = getPos _vehicle; _damage = getDammage _vehicle; if(_damage == 0) exitWith { titleText["There is nothing you could repair at this vehicle!", "PLAIN DOWN"]; //Msg }; if(Tee_Konto < TW_Repair_Cost) exitWith { titleText["You dont have the money to repair this vehicle!", "PLAIN DOWN"]; //Msg }; Tee_Konto = Tee_Konto - TW_Repair_Cost; _vehicle engineOn false; _text = format ["You started to repair your vehicle. Please wait here for %1 Seconds.", TW_Repair_Time]; titleText[_text, "PLAIN DOWN"]; //Msg for [{_i=0},{_i< TW_Repair_Time},{_i=_i+5}] do { sleep 5; if(getPos _vehicle distance _pos > 1) exitWith { titleText["Repairing aborted", "PLAIN DOWN"]; //Msg }; _vehicle setDammage (getDammage _vehicle - (_damage / (TW_Repair_Time / 5))); titleText["Repairing", "PLAIN DOWN"]; //Msg }; _vehicle setDammage 0; titleText["Vehicle Repaired", "PLAIN DOWN"]; //Msg }; /* Refuel Function Must be spawned */ Tee_Sup_Refuel = { private ["_i","_vehicle","_pos"]; _vehicle = vehicle player; _pos = getPos _vehicle; if(fuel _vehicle == 1) exitWith { titleText["Your fueltank is full!", "PLAIN DOWN"]; //Msg }; if(Tee_Konto < TW_Sup_Fuel_Cost) exitWith { titleText["You dont have the money to refuel this vehicle!", "PLAIN DOWN"]; //Msg }; Tee_Konto = Tee_Konto - TW_Sup_Fuel_Cost; _vehicle engineOn false; titleText["You started to refuel your vehicle. Please wait here.", "PLAIN DOWN"]; //Msg while {fuel _vehicle < 1} do { sleep TW_Sup_Fuel_Time; if(getPos _vehicle distance _pos > 1) exitWith { titleText["Repairing aborted", "PLAIN DOWN"]; //Msg }; _vehicle setFuel ((fuel _vehicle + 0.1) min 1); titleText["Refueling", "PLAIN DOWN"]; //Msg }; titleText["Vehicle Refueled", "PLAIN DOWN"]; //Msg }; /* Reammo Function Must be spawned */ Tee_Sup_Reammo = { private ["_i","_vehicle","_pos","_text"]; _vehicle = vehicle player; _pos = getPos _vehicle; if(Tee_Konto < TW_Sup_Reammo_Cost) exitWith { titleText["You dont have the money to reammo this vehicle!", "PLAIN DOWN"]; //Msg }; Tee_Konto = Tee_Konto - TW_Sup_Reammo_Cost; _vehicle engineOn false; _text = format ["You started to load Ammunition. Please wait here for %1 Seconds.", TW_Sup_Reammo_Time]; titleText[_text, "PLAIN DOWN"]; //Msg sleep TW_Sup_Reammo_Time; if(getPos _vehicle distance _pos > 1) exitWith { titleText["You moved so you were unable to load the Ammunition", "PLAIN DOWN"]; //Msg }; _vehicle setVehicleAmmo 1; titleText["Amunition loaded!", "PLAIN DOWN"]; //Msg }; //********************************************************** //Marker //********************************************************** //Player Marker and Marker Uodate Tee_PlayerMarker_Loop = { private ["_i","_markerarray","_name","_type","_marker","_object","_text","_points","_side","_colour","_text","_actioncode","_action"]; waitUntil {HQ_placed}; _markerarray = []; while {true} do { _i = 0; //Delete PlayerMarker { deleteMarkerLocal _x; } forEach _markerarray; //Create PlayerMarker { _i = _i + 1; _name = format ["PlMa_%1",_i]; if(alive _x && isPlayer _x && playerSide == side _x) then { if(vehicle _x == _x) then { _type = "n_inf"; } else { _type = "b_motor_inf"; }; _marker = CreateMarkerLocal [_name, position _x]; _marker setMarkerShapeLocal "Icon"; _marker setMarkerTypeLocal _type; _marker setMarkerTextLocal name _x; _markerarray = _markerarray + [_marker]; }; } forEach playableUnits; //Update HQ if(TW_playerside == "west") then { TW_West_BaseMarker setMarkerPosLocal (getPos hq_west); TW_West_ShopMarker_V setMarkerPosLocal (getPos west_shop_veh); TW_West_ShopMarker_G setMarkerPosLocal (getPos west_shop_weapons); TW_West_ShopMarker_AI setMarkerPosLocal (getPos west_shop_ai); }; if(TW_playerside == "east") then { TW_East_BaseMarker setMarkerPosLocal (getPos hq_east); TW_East_ShopMarker_V setMarkerPosLocal (getPos east_shop_veh); TW_East_ShopMarker_G setMarkerPosLocal (getPos east_shop_weapons); TW_East_ShopMarker_AI setMarkerPosLocal (getPos east_shop_ai); }; //Update Town { _object = _x select 0; _name = _x select 1; _text = _x select 2; _points = _object getVariable "TownPoints"; _name setMarkerTextLocal format["%1 %2/100",_text,_points]; _side = _object getVariable "TownSide"; if(_side == "civ") then {_colour = "ColorBlack";}; if(_side == "west") then {_colour = "ColorBlue";}; if(_side == "east") then {_colour = "ColorRed";}; _name setMarkerColorLocal _colour; } forEach TW_TownArray; //Update Respawn TW_West_Respawn setMarkerPosLocal [((getPos west_shop_veh) select 0) + 5,((getPos west_shop_veh) select 1) - 10,(getPos west_shop_veh) select 2]; //TeeTimeTest Marker ist Lokal TW_East_Respawn setMarkerPosLocal [((getPos east_shop_veh) select 0) + 5,((getPos east_shop_veh) select 1) - 10,(getPos east_shop_veh) select 2]; //TeeTimeTest Marker ist Lokal //Basic Values if(playerside == west) then { TW_playerside = "west"; TW_playerside_colour = "ColorBlue";}; if(playerside == east) then { TW_playerside = "east"; TW_playerside_colour = "ColorRed";}; sleep 10; }; }; Tee_Marker_ConnectMarker = { private ["_base1","_base2","_xdif","_ydif","_xpos","_ypos","_pos","_marker"]; _base1 = getPos (_this select 0); _base2 = getPos (_this select 1); _xdif = (_base1 select 0) - (_base2 select 0); _ydif = (_base1 select 1) - (_base2 select 1); _xpos = (_base1 select 0) - _xdif / 2; _ypos = (_base1 select 1) - _ydif / 2; _pos = [_xpos,_ypos,0]; _dir = atan ( _xdif / _ydif ); player globalChat str _pos; _name = format ["CM_%1_%2",floor(time),floor(random(1000))]; _type = "RECTANGLE"; _marker = CreateMarkerLocal [_name, _pos]; _marker setMarkerShapeLocal "RECTANGLE"; _marker setMarkerBrushLocal "Solid"; _marker setMarkerDirLocal _dir; _marker setMarkerSizeLocal [10, ((_base1 distance _base2) / 2) * 0.95]; //Auf 95% runter wegen Optik _marker setMarkerColorLocal "ColorBlack"; }; //******************************************************* //Vehicles //******************************************************* Tee_GetVeh_Name = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 1;}; } forEach Tee_Veh_Array; _return }; Tee_GetVeh_Class = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 2;}; } forEach Tee_Veh_Array; _return }; Tee_GetVeh_Price = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 3;}; } forEach Tee_Veh_Array; _return }; Tee_GetVeh_Typ = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 5;}; } forEach Tee_Veh_Array; _return }; Tee_CreateVehicle = { private ["_id","_class","_price","_typ","_text","_veh"]; _id = _this select 0; _class = _id call Tee_GetVeh_Class; _price = _id call Tee_GetVeh_Price; _typ = _id call Tee_GetVeh_Typ; if(!TW_air && _typ == "Air") exitWith { titleText["You cant buy this Vehicle. It has been restricted by the server!", "PLAIN DOWN"]; //Msg }; if(Tee_Konto < _price) exitWith { titleText["You dont have the money to buy this!", "PLAIN DOWN"]; //Msg }; Tee_Konto = Tee_Konto - _price; _text = format ["You have now %1$ at your account", Tee_Konto]; titleText[_text, "PLAIN DOWN"]; //Msg //Create _veh = _class createVehicle (position player); _veh setVehicleVarName format["veh_%1_%2",floor(time),floor(random(50))]; //Lock/Unlock Action if(_typ != "Box") then { _veh lock true; TW_Vehicle_Client = TW_Vehicle_Client + [_veh]; //Action _text = "Lock/Unlock"; _actioncode = format ["[%1] call Tee_Vehicle_Lock;",_veh]; //_action = _veh addAction [_text, AddActionCode,_actioncode]; } else { //Action //_text = "Open Box"; //_actioncode = format ['createGearDialog [player, "RscDisplayGear"];',_veh]; //_action = _veh addAction [_text, AddActionCode,_actioncode]; //player groupchat str weaponCargo _veh; //Debug }; }; /* Lock Unlock given Vehicle */ Tee_Vehicle_Lock = { private ["_veh","_locked","_dis","_dis2"]; _veh = _this select 0; //Work Arround _dis2 = 999; { _dis = player distance _x; if(alive _x && _dis < _dis2) then { _dis2 = _dis; _veh = _x; }; } forEach TW_Vehicle_Client; //Work Arround _locked = locked _veh; if(_locked == 2) then { _veh lock false; titleText["Unlocked", "PLAIN DOWN"]; //Msg } else { _veh lock true; titleText["Locked", "PLAIN DOWN"]; //Msg }; }; //************************* //Weapons //************************* Tee_GetWeap_Name = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 1;}; } forEach Tee_Weapon_Array; _return }; Tee_GetWeap_Class = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 2;}; } forEach Tee_Weapon_Array; _return }; Tee_GetWeap_Price = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 3;}; } forEach Tee_Weapon_Array; _return }; Tee_GetWeap_Typ = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 5;}; } forEach Tee_Weapon_Array; _return }; Tee_AddWeapon = { private ["_id","_class","_price","_text"]; _id = _this select 0; _class = _id call Tee_GetWeap_Class; _price = _id call Tee_GetWeap_Price; if(debug) then { player groupChat "Wep"; player groupChat _class; }; if(Tee_Konto < _price) exitWith { titleText["You dont have the money to buy this!", "PLAIN DOWN"]; //Msg }; Tee_Konto = Tee_Konto - _price; player addWeapon _class; _text = format ["You have now %1$ at your account", Tee_Konto]; titleText[_text, "PLAIN DOWN"]; //Msg }; Tee_AddMag = { private ["_id","_class","_price"]; _id = _this select 0; _class = _id call Tee_GetWeap_Class; _price = _id call Tee_GetWeap_Price; if(debug) then { player groupChat "Mag"; player groupChat _class; }; if(Tee_Konto < _price) exitWith { titleText["You dont have the money to buy this!", "PLAIN DOWN"]; //Msg }; Tee_Konto = Tee_Konto - _price; player addMagazine _class; _text = format ["You have now %1$ at your account", Tee_Konto]; titleText[_text, "PLAIN DOWN"]; //Msg }; //AI Tee_GetUnit_Name = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 1;}; } forEach Tee_AI_Array; _return }; Tee_GetUnit_Class = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 2;}; } forEach Tee_AI_Array; _return }; Tee_GetUnit_Price = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 3;}; } forEach Tee_AI_Array; _return }; Tee_GetUnit_Side = { private ["_return"]; _return = 0; { if(_this == _x select 0) exitWith {_return = _x select 5;}; } forEach Tee_AI_Array; _return }; Tee_CreateUnit = { private ["_group","_class","_pos","_unit"]; _group = _this select 0; _class = _this select 1; _pos = _this select 2; _unit = _group createUnit [_class, _pos, [], 0, "FORM"]; //_unit = _class createUnit [_pos, __group]; _unit }; Tee_BuyUnit = { private ["_id","_class","_price","_group","_unit","_text"]; _id = _this select 0; _class = _id call Tee_GetUnit_Class; _price = _id call Tee_GetUnit_Price; _group = group player; if(debug) then { player groupChat "AI"; player groupChat _class; }; if(!TW_ai) exitWith { titleText["You cant buy AI. It has been restricted by the server!", "PLAIN DOWN"]; //Msg }; if(Tee_Konto < _price) exitWith { titleText["You dont have the money to buy this!", "PLAIN DOWN"]; //Msg }; if(count (units _group) >= (TW_AI_max + 1)) exitWith { titleText["You reached the AI Limit!", "PLAIN DOWN"]; //Msg }; Tee_Konto = Tee_Konto - _price; _unit = [_group,_class,position player] call Tee_CreateUnit; _text = format ["You have now %1$ at your account", Tee_Konto]; titleText[_text, "PLAIN DOWN"]; //Msg };
  14. curtcooll

    TeeTimes Warfare

    How can u make it so you get money for killing the ai units.
  15. when i die i cannot request heli evac as the support module stops working anyone else having same issue when i click communication and then heli support it fades out?
  16. curtcooll

    Support module help

    lol only workaround i could see is a script that spawns modules when player re spawns but i dunno how to do that, in my eyes it's a bug.
  17. curtcooll

    Support module help

    yeah im using requester alongsider the heli support module both sync up one to player and one to ai pilot works fine but when i die i try and recall heli and it allows me to select helicopter but then when i get to next menu it fades out. helicopter1 synchronizeObjectsAdd [jeraok]; using the above code to re sync after death i put this _guy synchronizeobjects add [helicopter1]; to my ai respawn script that works instead of using trigger for ai but when i die modules dont work even with re sync command.
  18. ive done something similar using a script using a raido command with heli flying about 3 inchs or more of ground you get booted out and then the heli will hold at waypoint for 12 secs enough time to use the command. unload waypoints dont work well at least never for me if you want the helicopter to hover without landing ive set it up for that but if you want heli to land and take of after cargo empty ive done that also just using way points. as cobra said.
  19. That was the way i done it first time till i made a script similar to berkan what you have to set waypoints up perfect and with script i made and setting up the timer correct after few hours of work, i made heli fly just inches above water at a fast speed and then with the timer the heli slows down to pretty much a hovering motion in which it kicks out units without having to land so its perfect way to get units unloaded into water without actually using a land pad. units dont get injured and heli flies of without hitting water.
  20. its not a trigger u use a move waypoint paste that code i gave you and make a helipad invisble in water where you want guys dropped of and bobs your uncle. im working on script for you atm that will alow drop of and fly of just using waypoint. so heli waits 10 secs or whateva you want then drops guys and flies without any damage. ---------- Post added at 00:18 ---------- Previous post was at 23:15 ---------- right mate sorted i got well exactly what i think you want heli runs at fast speed then fly's above water just about few inches of water at which point it slows down then hovers a little and they jump out and then heli flys of to base. add me curtcooll to steam and ill load the map for you to test out if its what you want.
  21. right ill have a go for u now mate ill set up summit and then let you know my results buddie. ---------- Post added at 20:50 ---------- Previous post was at 20:32 ---------- having posted that i just tested it and wicked mate i got it to work, what you wanna do is make a invisble heli pad in water where you want heli to drop of your guys, dont worry the heli wont go under water it will just sit on top of the water as if floating drop of your team and fly away. so make a heli pad named water heli land "water"; {unassignvehicle _x; dogetout _x} foreach units (cart); Put this in the on activation of heli move waypoint that your dropping guys of to. Then just set the speed to normal and then make another way point where you want helicopter to move to bobs your uncle. so altogether 2 waypoints one that drops of your guys and another that heads back to base. ---------- Post added at 21:25 ---------- Previous post was at 20:50 ---------- im yet to find a way for the heli to kick all units out without a landing pad. ---------- Post added at 22:05 ---------- Previous post was at 21:25 ---------- ok done it let me know what one u wanna do i made one with script that makes heli wait 10 secs and then kick you out instead of having to land without helipad.
  22. curtcooll

    Delete dead bodie

    yeah the ai re spawn mate but issue is i have separate script for helicopter pilot it deletes players and ai bodies but not the pilot ai that uses re spawn ai script.
  23. How do you implement removing ai dead bodie when they re spawn. i tried putting deletevehicle _guy but nothing happens. if (!isServer) exitWith {}; _unit = _this select 0; _lives = _this select 1; _delay = _this select 2; _respawn_point = _this select 3; _move_script = _this select 4; _group = _this select 5; _side = _this select 6; _AI_unitArray = _this select 7; _AI_magArray = _this select 8; _AI_wepArray = _this select 9; _unitsGroup = units (group _unit); while {(count _unitsGroup) > 0} do { _remainingUnits = []; {if (alive _x) then {_remainingUnits = _remainingUnits + [_x]}} forEach _unitsGroup; _unitsGroup = _remainingUnits; sleep 1; }; deleteGroup _group; if (_lives == 0) exitWith {}; _lives = _lives - 1; _wait = Time + _delay; waitUntil {Time > _wait}; _group = createGroup _side; {_x createUnit [(getMarkerPos _respawn_point), _group];} forEach _AI_unitArray; sleep 2; hint "AI respawn"; _unitsGroup = units _group; {_x disableAI "MOVE"} forEach _unitsGroup; for [{ _loop = 0 },{ _loop < count _unitsGroup},{ _loop = _loop + 1}] do { _guy = _unitsGroup select _loop; removeAllWeapons _guy; {_guy removeMagazine _x} forEach magazines _guy; removeAllItems _guy; {_guy addMagazine _x} forEach (_AI_magArray select _loop); {_guy addWeapon _x} forEach (_AI_wepArray select _loop); _guy selectWeapon (primaryWeapon _guy); if (_loop == 0) then {_guy moveInDriver heli}; _guy setSkill (_AI_skillArray select _loop); sleep 0.1; }; {_x enableAI "MOVE"} forEach _unitsGroup; _leader = leader _group; [_leader, _lives, _delay, _respawn_point, _move_script, _group, _side, _AI_unitArray,_AI_magArray, _AI_wepArray] execVM "AI_respawn\AI_respawn.sqf"; [_leader] execVM _move_script; if (true) exitWith {};
  24. i have a script in which when u die u spawn as one of remaing group memeber and makes you group leader and when all are dead you respawn at base marker, issue with that is ai team mates dont respawn.
  25. curtcooll

    Delete dead bodie

    Ok thanks for that works great only issue is that the ai re spawn script im using it wont delete those dead bodies how would i change the script to account for the ai.
×