Jump to content

outlaw

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

1 Follower

About outlaw

  • Rank
    Private
  1. outlaw

    ACE for OA 1.13

    Hi , I got some question about vanilla repairing script here is the code; init.sqf if ! isdedicated then {repair_allowed = 1;}; [player] execVM "repair_script\repair.sqf"; an object named mechanic_shed in the init place this addAction ["Machanic Skill", "repair_script\mechanic_replenish.sqf"]; mechanic_replenish.sqf if ! isdedicated then { _per = _this select 1; if (_per hasWeapon "ACE_Wirecutter") then { repair_allowed = 1; _per switchMove "AinvPknlMstpSnonWrflDnon_medic3"; sleep 3; _per switchMove "AinvPknlMstpSnonWrflDnon_medicEnd"; hint parseText format["<t color=""#80FF00"">you have recieved 1 Mechanic repair skill, you may now repair 1 vehicle!!!</t>"]; } else { hint parseText format["<t color=""#FF3300"">You need to carry a Wire-Cutter to be able to get a mechanic repair skills!</t>"]; }; }; and repair.sqf if ! isdedicated then { _crewType = ["USMC_SoldierS_Engineer","US_Soldier_Engineer_EP1","BAF_Soldier_EN_W","BAF_Soldier_EN_DDPM","BAF_Soldier_EN_MTP","Soldier_Engineer_PMC","CDF_Soldier_Engineer","US_Delta_Force_Air_Controller_EP1"]; if (count _this > 1) then { if (typeof player in _crewType) then { if (player hasWeapon "ACE_Wirecutter") then { if (repair_allowed == 1) then { (_this select 1) playMove "ActsPercSnonWnonDnon_carFixing2"; (_this select 0) setDammage 0; (_this select 0) setFuel 1; sleep 15; (_this select 1) switchMove "AinvPknlMstpSnonWrflDnon_medicEnd"; repair_allowed = 0; hint parseText format["<t color=""#80FF00"">Vehicle Repaired!!!!!!, You have no repairs ability left, Return to Engineer Service Point To get more Mechanic repair skills.</t>"]; } else { hint parseText format["<t color=""#FF3300"">You have no repairs ability left please return to Engineer Service point at base to get another mechanic repair skill!</t>"]; }; } else { hint parseText format["<t color=""#FF3300"">You need to be in posession of a Wire-Cutter to be able to get mechanic skills!</t>"]; }; } else { hint parseText format["<t color=""#FF3300"">Only Engineers are qualified to repair vehicles!</t>"]; }; }; if (!isNil ("vehicleRepairInitiated")) exitWith {}; vehicleRepairInitiated = true; waitUntil {sleep 1; alive player}; while {true} do { { if (!(_x getVariable ["RepairsInitiated", false])) then { //_id = _x addAction [("<t color=""#FF3300"">" + ("Repair Vehicle") +"</t>"), "repair_script\repair.sqf", [], 1, false, true, "", "(Damage _target) > 0.3 AND (side _this) == WEST AND (vehicle _this) == _this AND (_this distance _target)<6 "]; _id = _x addAction [("<t color=""#FF3300"">" + ("Repair Vehicle") +"</t>"), "repair_script\repair.sqf", [], 1, false, true, "", " (Damage _target) < 1 AND (Damage _target) > 0 AND (side _this) == WEST AND (vehicle _this) == _this"]; _x setVariable ["RepairsInitiated", true, false]; }; } foreach vehicles; sleep 5; }; }; Ok , after some test , i could make it work with repair most of vehicle (Air , Car) but not with ; - Tank (M1A1 , M1A2) - Armor Vehicle If this script had run with non ACE then i could see "repair vehicle" menu and repair the damaged Tank or Armor Vehicle with no problem. So my question is, How could we make the script that let engineer class repairs damaged Tank or Armored vehicle on ACE ? do we have specific vehicle class with this one?
  2. Ah.. Thank you , well right now , i'm trying to tweak your old code but still got the same error , so i'm gonna wait for your new code then :)
  3. Ok I have encountered a problem while testing.. If i tested with dedi server , i'll never get any error on show script errors panel (but script didn't work) and then i made my PC to be a LAN or Internet host , i'll get an error like this ; here was the script ; 1st test init.sqf if (isnil "repair_allowed") then {repair_allowed = 0;}; execVM "mechanic_replenish.sqf"; [player] execVM "repair1.sqf"; mechanic_replenish.sqf // change repair_allowed variable to 1 /////////////////////////////////////// if (isServer) then { _x = player[color="#FF0000"];[/color] // add " ; " while {true} do { if ({(_x distance mechanic_shed) <10}) then { repair_allowed = 1; publicvariable "repair_allowed"; _x switchMove "AinvPknlMstpSnonWrflDnon_medic3"; // change this to whatever animation you whant i think it gives the script some life so the player can c something is happaning sleep 10; [player,nil,rsideChat,"you have replenished your mechanical repair skill!"] call RE; }; }; }; repair1.sqf if ( repair_allowed == 1 ) then { if ! isdedicated then { if (count _this > 1) then { (_this select 1) playMove "ActsPercSnonWnonDnon_carFixing2"; sleep 7; (_this select 0) setDammage 0; (_this select 0) setFuel 1; }; if (!isNil ("vehicleRepairInitiated")) exitWith {}; _units = ['USMC_SoldierS_Engineer', 'US_Soldier_Engineer_EP1','BAF_Soldier_EN_W','BAF_Soldier_EN_DDPM','BAF_Soldier_EN_MTP','Soldier_Engineer_PMC','CDF_Soldier_Engineer']; vehicleRepairInitiated = true; waitUntil {sleep 1; alive player}; while {true} do { { if (!(_x getVariable ["RepairsInitiated", false])) then { _id = _x addAction ["Repair Vehicle", "repair1.sqf", [], 1, false, true, "", "(getDammage _target) < 1 AND (getDammage _target) > 0 AND (typeOf _this) == _unit AND (vehicle _this) == _this"]; _x setVariable ["RepairsInitiated", true, false]; }; } foreach vehicles; sleep 5; }; }; } 2nd Test init.sqf if (isnil "repair_allowed") then {repair_allowed = 0;}; execVM "mechanic_replenish.sqf"; mechanic_replenish.sqf // change repair_allowed variable to 1 /////////////////////////////////////// if (isServer) then { _x = player; while {true} do { if ({(_x distance mechanic_shed) <10}) then { repair_allowed = 1; publicvariable "repair_allowed"; _x switchMove "AinvPknlMstpSnonWrflDnon_medic3"; // change this to whatever animation you whant i think it gives the script some life so the player can c something is happaning sleep 10; [player,nil,rsideChat,"you have replenished your mechanical repair skill!"] call RE; }; }; }; if ( repair_allowed == 1 ) then { if ! isdedicated then { if (count _this > 1) then { (_this select 1) playMove "ActsPercSnonWnonDnon_carFixing2"; sleep 7; (_this select 0) setDammage 0; (_this select 0) setFuel 1; }; if (!isNil ("vehicleRepairInitiated")) exitWith {}; _units = ['USMC_SoldierS_Engineer', 'US_Soldier_Engineer_EP1','BAF_Soldier_EN_W','BAF_Soldier_EN_DDPM','BAF_Soldier_EN_MTP','Soldier_Engineer_PMC','CDF_Soldier_Engineer']; vehicleRepairInitiated = true; waitUntil {sleep 1; alive player}; while {true} do { { if (!(_x getVariable ["RepairsInitiated", false])) then { _id = _x addAction ["Repair Vehicle", "mechanic_replenish.sqf", [], 1, false, true, "", "(getDammage _target) < 1 AND (getDammage _target) > 0 AND (typeOf _this) == _unit AND (vehicle _this) == _this"]; _x setVariable ["RepairsInitiated", true, false]; }; } foreach vehicles; sleep 5; }; }; }
  4. @Hogmason , Thanks again for your help but i still got a problem as picture below I might have to remove this "engineer need to carry "Wire-cutter" to repair vehicle" feature , find another way to tweak this script with ACE , or just change from Wire-Cutter to anything else . and here is the script repair1.sqf if ! isdedicated then { if (count _this > 1) then { (_this select 1) playMove "ActsPercSnonWnonDnon_carFixing2"; sleep 7; (_this select 0) setDammage 0.3; (_this select 0) setFuel 1; }; if (!isNil ("vehicleRepairInitiated")) exitWith {}; vehicleRepairInitiated = true; _units = ['USMC_SoldierS_Engineer','US_Soldier_Engineer_EP1','BAF_Soldier_EN_W','BAF_Soldier_EN_DDPM','BAF_Soldier_EN_MTP','Soldier_Engineer_PMC','CDF_Soldier_Engineer']; waitUntil {sleep 1; alive player}; while {true} do { if (![player, "ACE_Wirecutter"] call ACE_fnc_HasWeapon) then { { if (!(_x getVariable ["RepairsInitiated", false])) then { _id = _x addAction ["Repair Vehicle", "repair1.sqf", [], 1, false, true, "", "(getDammage _target) < 1 AND (getDammage _target) > 0 AND (typeOf _this) == _unit AND (vehicle _this) == _this"]; _x setVariable ["RepairsInitiated", true, false]; }; } foreach vehicles; } else { [player,nil,rsideChat,"Wire cutters are required to service vehicles!"] call RE; //multiplayer ready }; }; sleep 5; }; by the way , do you know how to make a script that made engineer could use repair ability only once and then he needs to replenish his repair ability at base or some specific area (trigger area?) ?
  5. Thank you for your help again hogman . I have tried to tweak and tested your code with my MP mission (test with Editor and MP host on my PC) but I cannot seem to make it work , here is my tweak code ; init.sqf [player] execVM "repair1.sqf"; repair1.sqf if ! isdedicated then { if (count _this > 1) then { (_this select 1) playMove "ActsPercSnonWnonDnon_carFixing2"; sleep 7; (_this select 0) setDammage 0.3; (_this select 0) setFuel 1; }; if (!isNil ("vehicleRepairInitiated")) exitWith {}; vehicleRepairInitiated = true; _units = ['USMC_SoldierS_Engineer', 'US_Soldier_Engineer_EP1','BAF_Soldier_EN_W','BAF_Soldier_EN_DDPM','BAF_Soldier_EN_MTP','Soldier_Engineer_PMC','CDF_Soldier_Engineer']; waitUntil {sleep 1; alive player}; while {true} do { { if (!(_x getVariable ["RepairsInitiated", false])) then { _id = _x addAction ["Repair Vehicle", "repair1.sqf", [], 1, false, true, "", "(getDammage _target) < 1 AND (getDammage _target) > 0 AND (typeOf _this) == _unit AND (vehicle _this) == _this"]; _x setVariable ["RepairsInitiated", true, false]; }; } foreach vehicles; sleep 5; }; if !([player, "ACE_Wirecutter"] call ACE_fnc_HasWeapon) exitwith {hintc "Wire cutters are required to service vehicles.";}; }; you could see that i have added some Domination's script at the end of code , not sure if it work or not.
  6. Thank you for your help , i have some more question about the script ; If i used USMC engineer , BAF engineer and US engineer for engineer class in my MP mission , how could i do with that ? (typeOf _this) == 'engineer' or (typeOf _this) == 'USMC_SoldierS_Engineer, US_Soldier_Engineer_EP1,BAF_Soldier_EN_W'
  7. outlaw

    Opinions on the Alpha Release Date

    i hope that Alpha release would be "between Jan 1st and March 1st " :)
  8. Hi, After i saw this thread , i have similar requirement about the script for my MP mission but with some more condition like; -player is an engineer class; -player is looking at and is close to a vehicle; -vehicle has at least 10% damage; - engineer could repair 80% of vehicle's damage (20% damage left) ; - engineer could use repair ability only once and then he needs to replenish his repair ability at base or some specific area (trigger area?) ; - engineer need to carry "Wire-cutter" to repair vehicle. I've actually tried to isolate engineer repair system from Domination map but because my lack of programming skill , so i got no luck at all :( Any help or advice would be really appreciated :)
  9. Hi MSO team , First of all, thank you very much for the amazing MP map !!! :) I got some question about a repair system ; well ,i would like to add specific class (such as Engineer , Crewman or Pilot) into MSO map and make them to be the only class that could repair land and air vehicle... any idea how to do that via script?
×