Jump to content

saddle

Member
  • Content Count

    106
  • Joined

  • Last visited

  • Medals

Posts posted by saddle


  1. It has saved frames a lot with my friends if I hide areas just beyond visual ranges in the jungle. I am going to try set it up for 1000 meters beyond radius of all players all terrain objects do not show, or objects of a choosing such as the trees, and then it shows all objects within the meters that way it only shows what is used and renders nothing else https://community.bistudio.com/wiki/nearestTerrainObjects

    Another solution i tend to do is completely hide whole cities if you fly past them with a helicopter for example, you are not going to be in the city and it lags quite a bit at times, so i just switch all buildings off.

    But hiding trees it would be needing to be cluttered hide modules all over the map, and that slows down the server by a lot.


  2. 42 minutes ago, j0nes said:

    2 questions, because now it sounds like youre using both the EH 'EntityCreated' &&  "GroupCreated" which will result in a lot of calls.
    1. are you only spawning vehicles in Zeus or with another script also?
    2. if the vehicles are spawned with another script, are they available to edit via Zeus after theyve spawned in?
     

     

    1.

    I am spawning men(groups) and vehicles by script as well as zeus.

    So I am working on applying DS to all units, whether grouped, or singular, men as well as vehicles.

     

    addMissionEventHandler ["GroupCreated", {
      params ["_group"];
      _group spawn {
        params ["_grp"];
        waitUntil {sleep 0.5; units _grp isNotEqualTo [] or isNull _grp};
        _grp enableDynamicSimulation true;
      };
    }];

    This works fine, but it only applies to infantry groups so far. Infantry are spawning in groups, and vehicles are spawning as single units.

     

    2. Yes, everything can be edited as Zeus. Can be commanded, customized, killed off, ect.

    I just need to make them selectable through a module in the Achilles mod called Add/Remove Editable Units first sometimes.

     


  3. 4 hours ago, pierremgi said:

    enableDynamicSimulation

     

    MEH "entityCreated" fires very often. You could use "groupCreated" instead.

     

    
    addMissionEventHandler ["GroupCreated", {
      params ["_group"];
      _group spawn {
        params ["_grp"];
        waitUntil {sleep 0.5; units _grp isNotEqualTo [] or isNull _grp};
        _grp enableDynamicSimulation true;
      };
    }];

     

     

    That works!

    I could not find VehicleCreated for spawned in vehicles so I assume it is EntityCreated


  4. Hey there guys,

     

    I am looking around and wondering if anyone knows how to set up Dynamic Simulation, for ALL non-player units in the session, at all times. .. maybe a sleep or check timer where it applies it in periods for all non player units. Both from the start of the session and when you spawn them in mid session, through script or by Zeus

    Micro managing activating dynamic simulation on any and all units is a bit tedious for me as Zeus

     


  5. Hey everyone!

     

    I am looking at different options to improve the performance during my arma sessions.

    Frequently, I make use of the hide objects module for various purposes.

    Now I am wondering if this module, or a code, can be used in a radius around players .. effectively hiding certain objects beyond the distance from players?

     

    That way you would only immediately render what you can see, and nothing else beyond what is around you.


  6. Hey guys,

     

    quick question.

    I have been looking around all over and not managed to find an answer.

     

    When I am hosting a session as zeus, when I as the zeus die, and my body gets deleted .. for example blown up or the auto clean-up removes my body, it also removes my zeus access with my former body and in mid sessions I lose all zeus permissions.

    Is there something I can do to completely prevent this, or give myself back zeus access in mid session?

     

    I am using the Game Master module with #adminLogged.

     

     

    Thanks


  7. Hello everyone,

     

     

    thanks for taking the time.

    In short, I am working on an immersive zombie experience for my friends.

     

    I want to run the following mods together:

    • Ryan Demons and Zombies
    • Max Zombies
    • Ravage

    All of which uses different AI settings and such things as variables it seems.

    I want to use them all for the biggest variety for the experience .. or else I could just stick to a single one.

     

    But spawning in these zombies as Zeus or through Mod/Script is my challenge.

    these mods, despite being on the same side EAST in this case, they will attack each other even though they are all same side and zombies.

    I am looking for a way to make this not the case.

     

    After doing some reading, Max wrote in the comments of his mod that you will need to apply these parameters to a unit init;

    _Unit setVariable ["Zombie",true];
    _Unit setVariable ["Angry",true];

     

    but that is just covering his mod.

    I have added this to a script to ensure these variables are applied to each unit ... but when I spawn them in as Zeus, they do not have that variable.

     

     

     

     

    I am thinking ... the easiest way might just be for me to run a script that apply whichever variable you define, on all units and classnames you define .. for all the units in these mods in this case, in all instances where a unit spawns in whether it be by Zeus or another method.

    Any tip or feedback is greatly appreciated.

     

     

     


  8. About me:

     

    Age: 33

    Male, Sweden

     

    Fluent in English and have basic speech in many languages.

    Any other question speak to me.

     

     

    Looking for:

     

    Now looking to explore new unit(s) and test some waters.

    Willing to give most things a try.

     

    Open to discuss designated roles.

    Open for different mods, themes and other experiences.

     

    Active community/group

    English language

    Interested in PvE mostly, a few exceptions

    Interested in official or unofficial scenarios with goals and objectives, not game modes such as King of the Hill or Antistasi

    Easy going outside the game conduct and maturity is what I will be looking for

    If Milsim, able to separate in character and out of character conduct

     

     

    Experience:

     

    - Arma veteran with 5.000 hours on Arma 3 alone now looking to explore new unit(s).

    - Deep experience in the Zeus role and custom Mission creation.

    - TFAR/ACE3

    - Plot developments and narration.

     

    Drop me a message anytime.

    Initial contact will be via Forums.

     

    Availability:

    European Time Zones only.

    Flexible most evenings. 


  9. 20 hours ago, TeTeT said:

    Hi, 

     

    I've never attempted this, but probably cutRsc with remoteExec will do the trick? https://community.bistudio.com/wiki/cutRsc https://community.bistudio.com/wiki/remoteExec

     

    Maybe there are much better or easier ways to do this nowadays? But I guess at the core you want to display a global variable content on all clients? For sending a variable content to other clients, https://community.bistudio.com/wiki/publicVariable is invaluable.

     

    Good luck,
    TeTeT

     

    Yes, I want a simple number displayed for All Players in the session, like in a corner of the screen, that I as the host can change the numbers simply plus or minus and it will show for instance typing into the global statement "something +200" and it will show 200 in the numbers.

     


  10.  

     

    Hey guys,

     

    I am wondering if there is a way to show a custom value, such as a simple number on the screen for All Players in the session

    and that can be altered during the session by the host Zeus, by something like the Esc button Extended Debug Console and executing statements.

     

    My idea is I want to control a visible number for all players, that when we sell or buy an item, or gain a number of points, I can add and remove plus or minus numbers on the get go.

     

     

    Any tips or ideas much appreciated 


  11. On 9/13/2023 at 1:27 PM, pierremgi said:

    As far as a matter of cheating, I like the idea player can loose room by unusable mags, deleted.

     

     

    Yes. you can set the max nbr of mags (current mag only as above, compatible mags ), but also how/when the counter is reset. For example, the counter can be reset once mags are deleted.

    Note: the above code count each mag (for primary weapon), so it's an overall count for the whole mission, and, no matter the player takes 2 or 3 mags from time to time, the countdown is ticking.

    That can be a too big restriction.

     

    Here is a new version, deleting above the max, at first reload!

     

    
    MaxPrimaryWeaponMags = 10;
    MaxHandGunMags = 3;
    MaxMissiles = 1;
    MaxHandGrenades = 3;
    MaxLaunchGrenades = 2;
    CompatThrowGrenades = compatibleMagazines "throw" select {!("_ir_" in toLowerANSI _x or "chemlight" in toLowerANSI _x)};
    
    AAA_fnc_manageMags = compileFinal "
      params ['_plyr','_compats','_restricted',['_empty',FALSE]];
      {_plyr removeMagazines _x} count _compats;
      {_plyr addMagazines [_x,1]} count _restricted;
      if _empty then {
        _plyr setAmmo [currentMuzzle _plyr,0];
        reload _plyr;
      };
    ";
    
    player addEventHandler ["Reloaded", {
      params ["_plyr", "_wpn", "_muzzle", "_newMag", ["_oldMag",["",0,-1,0]]];
      private _empty = (_oldMag #1 == 0);
      private _mag = _oldMag #0;
      private _compatMags = magazines _plyr select {_x in compatibleMagazines [currentWeapon _plyr,currentMuzzle _plyr]};
      _compatMags append [currentMagazine _plyr];
      _compatMags = _compatMags - [""];
      private ["_restricTedMags","_compatGrenades","_restricTedGrenades"];
    
      call {
        if (_wpn == primaryWeapon _plyr) exitWith {
          call {
            if (getNumber (configfile / "CfgMagazines" / _mag / "type") == 256 ) exitWith {
              if (count _compatMags > MaxPrimaryWeaponMags) then {
                _restricTedMags = _compatMags select [0,MaxPrimaryWeaponMags - 1];
              [_plyr,_compatMags,_restricTedMags,_empty] call AAA_fnc_manageMags;
              };
            };
            if (getNumber (configfile / "CfgMagazines" / _mag / "type") == 16 ) exitWith {
              if (count _compatMags > MaxLaunchGrenades) then {
                _restricTedMags = _compatMags select [0,MaxLaunchGrenades - 1];
                [_plyr,_compatMags,_restricTedMags,_empty] call AAA_fnc_manageMags;
              };
            };
          };
        };
        if (_wpn == "throw") exitWith {
          _compatGrenades = magazines _plyr select {_x in CompatThrowGrenades};
          if (count _compatGrenades > MaxHandGrenades) then {
            _restricTedGrenades = _compatGrenades select [0,MaxHandGrenades - 1];
            [_plyr,_compatGrenades,_restricTedGrenades] call AAA_fnc_manageMags;
          };
        };
        if (_wpn == handGunWeapon _plyr) exitWith {
          if (count _compatMags > MaxHandGunMags) then {
            _restricTedMags = _compatMags select [0,MaxHandGunMags - 1];
            [_plyr,_compatMags,_restricTedMags,_empty] call AAA_fnc_manageMags;
          };
        };
        if (_wpn == secondaryweapon _plyr) exitWith {
          _restricTedMags = _compatMags select [0, MaxMissiles - 1];
          if (count _compatMags > MaxMissiles) then {
            [_plyr,_compatMags,_restricTedMags,_empty] call AAA_fnc_manageMags;
          };
        };
      };
    }];

     

     

    Just did some extensive testing of this.

    You have just helped me resolve one of my biggest headaches in hosting Arma sessions, and I hope many others will enjoy your talents.

    Thank you so muchpierremgi, big props to you. 


  12. Thanks so far,

     

    sooner or later I make a mistake or miss out on something and then it's too late, players are going to find some way to bypass if they can do it, so indeed I need something that enforce and makes sure it stays limited.

     

    On 9/11/2023 at 2:26 PM, pierremgi said:

    For a session, you could count how many times a player reloads his weapon.

    For example, in initPlayerLocal.sqf:


     

    
    MaxPrimaryWeaponMags = 10;
    player addEventHandler ["Reloaded", {
      params ["_unit", "_weapon", "_muzzle", "_newMagazine", "_oldMagazine"];
      if (_weapon == primaryWeapon _unit) then {
        MaxPrimaryWeaponMags = MaxPrimaryWeaponMags -1;
        if (MaxPrimaryWeaponMags < 2) then {
          player removeMagazines (_newMagazine #0);
        };
      };
    }];

    Works for each type of magazines. You can check for whole compatible mags.

     

    I have been testing this, works great. Maybe if I modify it somehow so that if players has above a certain number of mags, say 10, the excess number of mags above 10 will be removed after a reload and set to 10?

    That way no matter how much mags you grab, you will be set back to a maximum number of mags each reload - if the number surpass 10.

    I let the players know the rules, they loot excessive number of mags it will be set back, and then if they decide to try to go past it - it will be enforced without disrupting anything else.


  13. Hello everyone,

     

    For a long while now, I have struggled with trying to manage the maximum number of inventory space on players as a mission maker.

    Despite my best efforts, players still find ways when I am Zeus to either pick a container where they can have like 40 mags, or loot one later on in some way.

     

    I am wondering if there is a way that by scripting, limit the number of magazines all players in a session can pick up.

    For instance, if you set a limit of 10 magazines, either by stating which mag class names or just having all Cfg ammo you will not be able to add any more and get something like a message saying "I can't carry any more ammo. This is getting too heavy." regardless if you have more inventory space or not.

     

     

    Tips or thoughts appreciated 🙂

     

     


  14. Hey guys, so I am fond of this script and wondering if anyone knows if there is a Group version for the mod? Such as turning this into a convoy version

    I am looking for something like this script, but being able to instead random between different vehicles, instead random with different groups, how many vehicles, and what vehicles that would be amazing

    Just the same, the random convoy reaches the maximum range and de-spawn, and then another spawn within the maximum range range

     

    I was peeking at this script

     

     


  15. 12 hours ago, Harzach said:

     

    To be clear, I merely pointed out specific problems and their specific solutions. I have not approached your code as a whole.

     

    I also missed this:

    
    addMissionEventHandler ["Killed",//

    No mission EH of type "Killed" exists. There is, however, an "EntityKilled" MEH:

    
    addMissionEventHandler ["EntityKilled", {
    	params ["_unit", "_killer", "_instigator", "_useEffects"];
    }];

     

     

    Thanks for clearing that up, I made a little progress;

     

    addMissionEventHandler ["EntityKilled",
    {
        params ["_killed", "_killer", "_instigator"];
        
    
        if (_killed isKindOf "CAManBase" && {side group _killed isEqualTo east}) then
        {
            _score = _score +1;
            format ["%1 kills: %2", _killer, _score] remoteExec ["hint", 0];
            
        };
    }];

    The hint is properly triggering and displaying now, however I am getting a 

    Scalar NaN

    where the _score is located in the hint message.

     

    I presumed that it has not been bound to the proper value, or it has need to be shown to addScore(?), so I made many more attempts including trying to add this code

     

    [_killer,{_score addScore +1} remoteExec ["Call",_killer];

     

    I know the score is set to 0. But I presume I have not told the game that _score is at 0.

    I presume the game knows the value is supposed to +1, but from what value.

    I tried to experiment and troubleshoot with this but did not manage to solve it yet.

     

    Will troubleshoot throughout the day. 🙂


  16. 2 hours ago, Harzach said:

    "Score" is a scripting command. You can't use it as a variable.

     

    Also, you can't just make up your own params for an EH. The killed EH's params are:

    
    params ["_unit", "_killer", "_instigator", "_useEffects"];

    So your "_score" param is just returning the instigator.

     

    
    score + 1;
    
    // SHOULD BE
    
    _score = _score +1;

     

    This syntax is incorrect:

    
    format ["%2 Kills: %3", _killed _killer%2 _score%3] remoteExec ["hint", 0];

    Better:

    
    format ["%1 Kills: %2", _killer, _score] remoteExec ["hint", 0];

    Read this: https://community.bistudio.com/wiki/format

     

     

     

    No success so far. But thanks for responses up to this point. I am learning some more about how variables are working.

    I did a lot of troubleshooting and tweaking of the code after making the corrections you pointed out above, as it did not work yet still.

    Managed to get the hint displaying once and then I made a change in the code hehe and I have not managed to get the hint to show up again.

     

    At first it said something along the lines of duplicate variable when entering a game session, so I am going to look around in my files for that.

    Will continue tomorrow.


  17. 15 hours ago, Dramacius said:
    
    format ["%1 %2 message", variable%1, variable%2] remoteExec ["hint", 0];

    will disaply a hint for all players

     

     

    Trying to add

    score = 0;

    to initPlayerLocal.sqf

     

    and

    { this addEventHandler ["Killed",{  params ["_unit", "_killer"]; score = score + 1; systemChat format ["%1 has been killed by %2. Current Score %3", _unit, _killer, score]; }]; } forEach allUnits;

    to Init.sqf

     

    and then 

    format ["%1 %2 message", variable%1, variable%2] remoteExec ["hint", 0];

    into the player unit's intialization field.

     

    is this all ai units you mean?

     

     

    I am probably doing something wrong, because it is not working sorry.

×