Jump to content

billyh

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Everything posted by billyh

  1. I'm trying to get a script working, but can't get it trough the way I want. if ("ItemCompass" in assignedItems Player) then {arm = player addAction ["Arm Bomb","SUICIDE_VESTS\armbomb.sqf"] } else [removeAction det, removeAction deac, removeAction arm]; I've made a custom vest, which is an uniform. And I cant get the script to work because it doesn't count as an assigned item. if ("VSS" in assignedItems Player) then {arm = player addAction ["Arm Bomb","SUICIDE_VESTS\armbomb.sqf"] } else [removeAction det, removeAction deac, removeAction arm]; In other words, is there a function similar to assignedItems, like assignedUniforms? Or is there any way to do it the hard way for the script to trigger if a uniform is found? Becuase this script works if i have it look for the compass, but not for the uniform. (VSS is my classname for Vest Suicide Small) If there is no similar function, can someone help with how to do the same as assignedItems do? all i can think of would be something like bomberVests = ["SVS", "SVL"]; if ("SVS" in bomberVests Player) then {arm = player addAction ["Arm Bomb","SUICIDE_VESTS\armbomb.sqf"] } else [removeAction det, removeAction deac, removeAction arm];
  2. Sweet, that seems to work. Now to figure out why the client.cpp wont load the script. Thanks a lot. bomberVests = ["SVS", "SVL"]; arm = player addAction["Arm Bomb","SUICIDE_VESTS\armbomb.sqf","",0,false,false,"",'alive player && ((vest player) IN bomberVests)']; This works perfectly. class CfgPatches { class SUICIDE_VESTS { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; class Disable_XEH_Logging { units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class Extended_PostInit_EventHandlers { init = "call compile preprocessFileLineNumbers 'SUICIDE_VESTS\suicidebomb.sqf'"; }; class cfgWeapons { class Vest_Camo_Base; //this defines the rendered object - textures class VestItem; //this defines the item specifications class SVS : Vest_Camo_Base { // Class name to spawn scope = 2; displayName = "Suicide Vest Small"; // Ingame name for object, arsenal name etc etc to identify it picture = "\A3\characters_f\Data\UI\icon_V_tacvest_blk_CA.paa"; // doublecheck in characters_f pbo model = "\A3\Characters_F\COMMON\equip_tacticalvest"; // doublecheck in characters_f pbo //hiddenSelections[] = {"camo"}; //what is this //hiddenSelectionsTextures[] = {"pathtoyouraddonretexturefile.paa"}; // what is this? class ItemInfo : VestItem { uniformModel = "\A3\Characters_F\COMMON\equip_tacticalvest"; // ensure it is right containerClass = "Supply100"; // capacity mass = 50; // weight / size, correlates to value above armor = 5*0.5; passThrough = 0.7; //need to figure out what it means in relation to damage //hiddenSelections[] = {"camo"}; }; }; }; So I managed to fix the issue. I now have a vest which gives you the ad-action to blow yourself up, but only if you are wearing the vest. everyone technically have it, but only if they are wearing the vest. Thanks for the help!
  3. Still not there, can't get it to work adding arm = player addAction ["Arm Bomb","SUICIDE_VESTS\armbomb.sqf" manually in the console adds the addaction menu, but wearing the vest (with classname SVS) and trying this won't trigger it. class cfgWeapons { class Vest_Camo_Base; //this defines the rendered object - textures class VestItem; //this defines the item specifications class SVS : Vest_Camo_Base { // Class name to spawn scope = 2; displayName = "Suicide Vest Small"; // Ingame name for object, arsenal name etc etc to identify it picture = "\A3\characters_f\Data\UI\icon_V_tacvest_blk_CA.paa"; // doublecheck in characters_f pbo model = "\A3\Characters_F\COMMON\equip_tacticalvest"; // doublecheck in characters_f pbo //hiddenSelections[] = {"camo"}; //what is this //hiddenSelectionsTextures[] = {"pathtoyouraddonretexturefile.paa"}; // what is this? class ItemInfo : VestItem { uniformModel = "\A3\Characters_F\COMMON\equip_tacticalvest"; // ensure it is right containerClass = "Supply100"; // capacity mass = 50; // weight / size, correlates to value above armor = 5*0.5; passThrough = 0.7; //need to figure out what it means in relation to damage //hiddenSelections[] = {"camo"}; }; }; }; it does trigger if i set it to ItemCompass and use assignedItems. This would all be much simpler if assignedItems also checked uniform/vests, or i there were an assignedVest/assignedUniform function
  4. If I ever learn how to do things like that, then I'll look into it. edit: also, i've updated the main post. ---------- Post added at 15:15 ---------- Previous post was at 13:50 ---------- I'm not very good at scripting, but what I think I know what I need. I just don't know how to get what I need down. if you are wearing vest check if you have been given addaction -> if you have been given addaction then do nothing -> if you have not been given addactions then do give addactions -> if no vest then do remove addactions. -> repeat every X seconds/ minutes if(uniform player == "V_SuicideVest_Small") then Addaction Arm, if(player addaction arm == isNil) then Addaction Arm, if(uniform player == "V_SuicideVest_Small") isNil then removeaction arm, det, deac; Something something like that?
  5. So I'm trying to make a mod for custom and dedicated suicide vests, which let you blow yourself up out of the box by just wearing them.... I've basically just used vanilla assets (for now) to make a unique vest ingame with it's seperate classname and display name to get a better understanding on how to go ahead. I have however encountered some issues, and was wondering if someone could possibly help me figure out how to get this working. The addaction script themselves DO work, and my issue that remains is how to have the script keep checking if you qualify to be given the addaction (and if you don't the addactions get removed) Example: Player joins server, goes into arsenal/ammobox, picks up a suicide vest. since the script keeps checking if people are wearing vest, it gives him the addaction when it has found the vest on him. but if he removes it, the script removes all the addactions he may or may not have. (arm, det, deac) Is it possible to do that? config.cpp class CfgPatches { class SUICIDE_VESTS { //this is just requirements units[] = {}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {"a3_characters_F_COMMON, Extended_EventHandlers"}; }; }; class cfgWeapons { class Vest_Camo_Base; //this defines the rendered object - textures class VestItem; //this defines the item specifications class V_SuicideVest_Small : Vest_Camo_Base { // Class name to spawn scope = 2; displayName = "Suicide Vest Small"; // Ingame name for object, arsenal name etc etc to identify it picture = "\A3\characters_f\Data\UI\icon_V_tacvest_blk_CA.paa"; // doublecheck in characters_f pbo model = "\A3\Characters_F\COMMON\equip_tacticalvest_black"; // doublecheck in characters_f pbo //hiddenSelections[] = {"camo"}; //what is this //hiddenSelectionsTextures[] = {"pathtoyouraddonretexturefile.paa"}; // what is this? class ItemInfo : VestItem { uniformModel = "\A3\Characters_F\COMMON\equip_tacticalvest_black"; // ensure it is right containerClass = "Supply100"; // this defines how much storage the vest has - in theory you have a bomb, so zero - need balancing mass = 50; //general size of item, if it can fit inside other items - set high unless it enables to carry more ammo - after testing armor = 5*0.5; //can modify passThrough = 0.7; //need to figure out what it means in relation to damage //hiddenSelections[] = {"camo"}; }; }; }; class Extended_PreInit_EventHandlers { clientInit = "call compile preprocessfilelinenumbers '\SUICIDE_VESTS\init.sqf'" };
  6. billyh

    Real time Browser Map

    Kind of funny how some of the cheat producers have used some of the same concept to bypass battle-eye. Nice work though.
  7. I'm glad to see this project continues.
  8. billyh

    JSRS3: DragonFyre

    I like this mod, it adds much needed layer of immersion.
×