Jump to content

Maff

Member
  • Content Count

    371
  • Joined

  • Last visited

  • Medals

Everything posted by Maff

  1. Maff

    AI to spawn with random class

    I see you have a CUP classname which relies on CBA. This should run "random setUnitLoadout" on units already present in the mission AND created during the mission. I have not tested this, but I have used CBA_fnc_addClassEventHandler before to customise units in a mission. The only issue I can think of is if you have civilians or other units that you don't want to be given random loadouts in your mission. That can be worked out though. // init.sqf [ "CAManBase", "init", { (_this select 0) setunitloadout selectRandom ["rhsusf_usmc_marpat_d_grenadier", "rhsusf_army_ucp_arb_marksman", "rhsgref_nat_machinegunner", "CUP_I_UN_CDF_Soldier_SL_DST", "rhs_vdv_des_rifleman_asval"]; }, true, [], true ] call CBA_fnc_addClassEventHandler;
  2. _block = (if (_size == 1) then {"UserTexture10m_F"} else {"UserTexture_1x2_F"}) createVehicle _pos; You need to use 1 as the third parameter to get the larger effect size, otherwise the function will just select the small UserTexture.
  3. There is also BIS_fnc_VRSpawnEffect, @gc8. However the unit isn't entirely invisible.
  4. That's a shame, @gc8. I'm sure the function is the same one used in the VR Missions. Nice / Dodgy workaround with the hideobject true / false loop I thought.
  5. @johnnyboy I am absolutely shocked you haven't added something like this to your script resume! 1. Unit is killed - Turns into "Judgement Day T-1000 Liquid Metal". 2. Body drops to the ground, "slowly disappearing". 3. A puddle is created on old body position. 4. Killer freaks out.
  6. I believe BIS_fnc_VREffectKilled is what you are looking for, @gc8. I don't want to ruin the surprise how it works...
  7. Damnit! Using findIf was my first thought but my brain is... Working not good. Nice one!
  8. I have no experience in PHP and a cracking hangover, so this may not be the best method... But it works POORLY [Edit]. Hopefully that's some use to you. Ignore this, please!
  9. Yes. It can be found in CUP Vehicles.
  10. Is allMissionObjects of any use here? I'm not at all familiar with all the various 'WeaponHolder' classnames. A quick test in the debug console detected 1 dropped MX, and an IR Laser Pointer - Which was dropped separately. _holdersArray = allMissionObjects "WeaponHolder"
  11. I have never played DCG, but there are 2 mine detectors in ACE. Classnames: ACE_VMH3 ACE_VMM3 Either one will take up a pistol slot. If I remember right, you need to activate the mine detector via ACE Self-Interact, and the detection range is ~ 5 - 7 metres. So... Move slow!
  12. See above. I edited my last post. You can pick a units loadout via ACE Arsenal then export it as an array and paste inside your sqf.
  13. No bother. I have had my fair share of headaches with loadout scripts too! Have you played with setUnitLoadout yet? EDIT: You can export the loadout array from ACE Arsenal. It also looks neater in your sqf.
  14. OK. I just noticed you edited your first post. // MK 17 is selected then all is good. if (_rifle isEqualTo "rhs_weap_mk17_STD") then { for "_i" from 1 to 4 do {player addItemToBackpack _mag1;}; for "_i" from 1 to 3 do {player addItemToBackpack _mag2;}; }; // But below you have if () then {} else {}; // Which adds the unusable 7.62 mags to the MK17 loadout. if (_rifle isEqualTo "rhs_weap_sr25_d") then { for "_i" from 1 to 4 do {player addItemToBackpack "rhsusf_20Rnd_762x51_SR25_m118_special_Mag";}; for "_i" from 1 to 3 do {player addItemToBackpack "rhsusf_20Rnd_762x51_SR25_m993_Mag";}; } else { for "_i" from 1 to 4 do {player addItemToBackpack "ACE_20Rnd_762x51_M118LR_Mag";}; for "_i" from 1 to 3 do {player addItemToBackpack "ACE_20Rnd_762x51_M993_AP_Mag";}; }; Quick solution would be to do if (_rifle isEqualTo "THIS_WEAPON") then { }; for each of your weapons.
  15. I tested it in ArmA and it works for me when adding the semicolon on line 53. I had to change some of the class names as I don't have the mods. Are you running all the required mods?
  16. So the player never gets the M9? I'm firing up ArmA...
  17. Take another look at Line 53. } or // Should be };
  18. We tried to get a piano that went up to 11, but at 3AM it wasn't happening!
  19. Our group tested settings out on our public server last night, we were very impressed! That is the best way to learn in my opinion. It's trial and error, brother. You can also set up a Zeus scenario that sends limited enemies at a time to test the updated medical system. It's a lot better, and more fun, than shooting each other where you stand. Believe me! Enjoy.
  20. Maff

    Merry X-Mas!

    Arghahahahahaha! Seriously... Merry Christmas, brothers and sisters!
  21. Maff

    JBOY Dunk Tank

    You mad man. I love it!
  22. You can return the animate names and animationPhase with: getArray (configfile >> "CfgVehicles" >> "Land_Target_Dueling_01_F" >> "SimpleObject" >> "animate") // [["plate_1_rot",0],["plate_2_rot",0],["plate_3_rot",0],["plate_4_rot",1],["plate_5_rot",1],["plate_6_rot",1]] There is a function that already does this for the Land_Target_Dueling_01_F object. It uses a HitPart Event Handler: // Make all plates red. { if ((MyTarget animationPhase _x) < 0.5) then { MyTarget animate [_x, 1]; }; } forEach ["plate_1_rot", "plate_2_rot","plate_3_rot","plate_4_rot","plate_5_rot","plate_6_rot"];
  23. Maff

    babe_nvg error

    The Steam link, or profile, may be private. I can't view it. Can you upload it elsewhere? imgur maybe?
×