Jump to content

Maff

Member
  • Content Count

    371
  • Joined

  • Last visited

  • Medals

Everything posted by Maff

  1. 90% sure it was nearestObjects. I know nearestTerrainObjects well. The nearestTerrainObjects filters aren't what I'm looking for. My old script searched the results from nearestObjects. It would probably work with nearestTerrainObjects also but there may have been a reason for using nearestObjects. I have found an old backup. I should rephrase and ask how to shorten this script:
  2. Have a look at the BIKI entry for setUnitLoadout. Down at the bottom there is an example on how to use it. It looks pretty overwhelming but once you get the hang of it, you can knock up loadouts in no time. It looks like you are just changing the uniform, vest, and backpack of each unit. In the mod you are using there may be units already configured, so you can spawn them using BIS_fnc_spawnGroup, instead of spawning random units and applying loadouts on each of them. If there are no units configured then there is quite a bit of work to do. What mods are you using? Steam link would be best.
  3. Maff

    Zeus radio alpha?

    A friend of mine run a Zeus operation a while back where he triggered certain events by destroying specific vehicles positioned away from the action. Place down an empty vehicle - Name it "Event_Alpha". Modify your Radio Alpha to wait for !alive Event_Alpha. Destroy the vehicle whenever you need to to run the trigger. This may not be the ideal solution for you but... Who doesn't like blowing up vehicles?
  4. I missed it the first time around. A few beers later and I see it... I think. The first setVariable sets "activefob" to 0, or false. You then add the action "Activate FOB", when that has been activated the "activefob" becomes 1, or true. But... You are checking "activefob" before _pole can be interacted with by a player. It will always return 0, or false because no one has completed the "Activate FOB" action. Did my previous examples display "Kill Maff"? You can also test the getVariable in the debug console. I still can't get to Arma to have a play around.
  5. Hey, you are very welcome! ' _x addItemToVest ["30Rnd_65x39_caseless_mag", 3]; ' is incorrect. You can only add item to vest one at a time. A shorter way would be to do: // Will add THREE 30Rnd_65x39_caseless_mag to vest. for "_i" from 1 to 3 do { _x addItemToVest "30Rnd_65x39_caseless_mag"; }; I highly suggest you check out the BIKI. Most of the commands and functions there are very well described with handy examples. Introduction to Arma Scripting Scripting Commands Arma 3 Arma 3: Functions Enjoy!
  6. I remember having some headaches in the past with setVariable / getVariable. I looked over some old code I created that uses getVariable / setVariable. For some reason that I cannot recall, I went with -1 for false and 1 for true. I am unable to test right now but I wonder if the following would work out for you: // Set "activefob" to 1. // The true makes variable global and persistent. _pole setVariable ["activefob", 1, true]; if ((_pole getVariable ["activefob", -1]) != -1) then { hint "It works!"; } else { hint "Kill Maff!"; }; OR // Set "activefob" to true. // The SECOND true makes variable global and persistent. _pole setVariable ["activefob", true, true]; if (_pole getVariable "activefob") then { hint "It works!"; } else { hint "Kill Maff!"; }; Hopefully that works and is of use to you. As I look at this I am transported back to Day 1 and I'm confused as ever. 🤣
  7. You are using setSkill on the group - It doesn't work that way. The command has to be set on each units in a group. I have updated the HuntPlayer.sqf below. // Save as HuntPlayer.sqf in mission folder - Where mission.sqm is. // Run from On Activation in trigger: execVM "HuntPlayer.sqf"; // Spawn FIFTY East units on marker "MARKER2" - You are a brave warrior, my son! _huntGroup = [markerPos "MARKER2", EAST, 50] call BIS_fnc_spawnGroup; _huntGroup setCombatMode "RED"; _huntGroup setSpeedMode "FULL"; _huntGroup deleteGroupWhenEmpty true; // setSkill doesn't work on groups. // Instead you have to setSkill for each unit in a group. { _x setSkill ["aimingAccuracy", 0.85]; _x setSkill ["aimingShake", 0.40]; _x setSkill ["aimingSpeed", 0.75]; _x setSkill ["reloadSpeed", 1]; } forEach (units _huntGroup); // Tell _huntGroup to stalk / hunt player / players group. _isHunting = [_huntGroup, group player] spawn BIS_fnc_stalk; // Debug hint to let you know if it has worked or not. // This could / should be removed when you know it works. if (_isHunting) then { hint "Player is being stalked!"; } else { hint "Something has gone wrong!"; };
  8. This should do what you want. // Save as HuntPlayer.sqf in mission folder - Where mission.sqm is. // Run from On Activation in trigger: execVM "HuntPlayer.sqf"; // Spawn FIFTY East units on marker "MARKER2" - You are a brave warrior, my son! _huntGroup = [markerPos "MARKER2", EAST, 50] call BIS_fnc_spawnGroup; _huntGroup setCombatMode "RED"; _huntGroup setSpeedMode "FULL"; // Tell _huntGroup to stalk / hunt player / players group. _isHunting = [_huntGroup, group player] spawn BIS_fnc_stalk; // Debug hint to let you know if it has worked or not. // This could / should be removed when you know it works. if (_isHunting) then { hint "Player is being stalked!"; } else { hint "Something has gone wrong!"; };
  9. What's that? I can't hear you. Can you make your font bigger, please? The first rule of Old Men Club is...
  10. @RCA3 Attempted to download v1.6.0 but getting "Google Drive - Access Denied. You need access. Ask for access, or switch to an account with access." message.
  11. Maff

    You've played to much Arma when:

    You've played too much Arma when a lightning bolt from Zeus deals you no damage.
  12. Maff

    You've played to much Arma when:

    Were you playing Arma at the time of this order, @pierremgi? YES: Insubordination justified! NO: Shame on you!
  13. Maff

    Need help for this fix

    I'll bet the holster mod is giving the error. You should let the developer know.
  14. Maff

    Need help for this fix

    What mods and mission are you running? Sharing the .RPT file will also help. See this topic for help in locating and sharing your RPT file.
  15. No bother, @bi_mg! Looking forward to seeing your work.
  16. I would say either ARMA 3 - MISSION EDITING & SCRIPTING or ARMA 3 - FIND OR OFFER EDITING.
  17. I made a mission on Zernovo years ago and would love to remake it in ArmA 3. I recently watched a YT video from ArmA 3 ( THREE ) on Zernovo from 2014. I done a quick search but never found an answer. Has the terrain been ported to ArmA 3? I'm away from my main PC so I cannot check... Would Zernovo work with CUP? Cheers!
  18. This sounds very interesting!! You can use GitHub or GitLab to upload your scripts. Either of these links can be easily viewed and navigated - Posting multiple sqf files on these forums can be a nightmare, especially when viewing or copy & pasting. Personally, I'd go for GitHub if you are new. Although I tend to use GitLab for the most part. I doubt many would mind testing your code. Post your links in the topic.
  19. Yes. Going by your topic title you want to execute 2 scripts from a unit's init field? That can be / is bad. This is possible. To confirm, This is Single Player only? Otherwise infinite vehicle ammo will be abused. It will be best to share the files. Domination has been modified, shared and modified over the years. And there may be modifications that you have made too.
  20. Maff

    Humanitarian players

    This is just a rough idea. Nothing has been tested. dude refers to a single unit, but can be changed to run on multiple units. Performing weapon check should be simple enough for the sober ones! 🤤 // AI won't treat like enemy - Can still be killed in crossfire. dude setCaptive true; // Increase weapon sway - More difficult to shoot accurately. dude setCustomAimCoef 5; // Increase weapon recoil. dude setUnitRecoilCoefficient 5; dude addEventHandler [ "InventoryClosed", { params ["_unit", "_container"]; COMMENT " Perform hasWeapon check. setCaptive false if has weapon / visible weapon. Check if a weapon is in hands or concealed. "; } ];
  21. Superb! I have had my internet disconnected more times than I count, and it is during those downtimes that I realised how much I relied on the BIKI. In the past i have tried to download the BIKI but it never ever worked out. Thank you, to all involved.
  22. I always joke about putting shooters in trees in my missions. I have a "Fighting in Woods and Forests" mission queued up. Time for a quick edit I think. Afterwards - I'll send 30 angry dead people your way, @johnnyboy!
×