Jump to content

Mr H.

Member
  • Content Count

    597
  • Joined

  • Last visited

  • Medals

Everything posted by Mr H.

  1. Declaring your scripts as functions in a server only mod will save you massive headaches! (And is better practice /more efficient than execVM)
  2. Units thislist is the problem just use thislist
  3. Mr H.

    profileName to objVar

    I'm guessing his question is for multiplayer. How to get profileName from a remote player. Since profilename is local to a player's machine you can't directly know who's who on a remote machine. You have to gather them in a public var. {_allNames =missionNameSpace getVariable ["allNames",[]]; _allnames pushbackUnique [profileName,player]; missionNameSpace setVariable ["allNames",_allNames,true]} RemoteExec ["Call",0];
  4. Execute this code every time you want to put a marker ! This does answer your question! moduleName_keyDownEHId = (findDisplay 46) displayAddEventHandler ["KeyDown",{ if ((_this select 1) isEqualTo 32) exitWith { _markerName = createMarker ["markername", player]; _markerName setMarkerType "hd_dot"; }; }]; Everytime you press "M" key, this will create a marker on your pos. That's just an example, you can call it anyway you like, this will make a new marker and not erase the old one.
  5. What you ask is literally the example from the biki https://community.bistudio.com/wiki/createMarker a little searching before asking wouldn't hurt 😉 _markerName = createMarker ["markername", player]; _markerName setMarkerType "hd_dot";
  6. Mr H.

    Finding the water depth

    Yup, now the ministry of free time (aka angry girlfriends) is calling me away from the computer but maybe water level is defined somewhere in cfgworlds too.
  7. Mr H.

    Finding the water depth

    Seems to me there's no solution for your problem I've tried on Diyalah with https://community.bistudio.com/wiki/getPosASLW the values returned are slightly better (-1 swimming at the surface). But do not seem exact. If you want an "universal solution" then getPosASL select 2 should work on MOST maps, if you want a specific solution for diyala, maybe get an estimate of the ASL pos of the river surface and substract from that.
  8. Mr H.

    Finding the water depth

    It is indeed, I was just checking just now
  9. Mr H.

    Finding the water depth

    The river on diyala is at sea level! The following seems to confirm what I said. and here: https://feedback.bistudio.com/T77197
  10. Mr H.

    Finding the water depth

    I don't think that's possible in arma, AFAIK all water bodies have to be at sea level (don't quote me on that there might be modders that have done otherwise).
  11. Mr H.

    Finding the water depth

    ((getPosASL _unit) select 2) will return you the depth then. If you want a positive value just add abs: abs ((getPosASL _unit) select 2)
  12. Mr H.

    Finding the water depth

    There's a hardcoded limit for lineIntersectsSurfaces so it won't work beyond 5000m bu that should never happen. Also returns wrong results when there's an object between surface and ocean floor, I haven't bothered fixing it yet, works fine otherwise.
  13. Mr H.

    Finding the water depth

    TAG_fnc_returnDepth = { params ["_pos"]; _pos = [_pos select 0,_pos select 1,0]; _inter = lineIntersectsSurfaces [_pos, _pos vectorAdd [0,0,-4999]]; if (_inter isEqualTo []) exitWith {systemchat "depth error";0}; _depth =((((_inter) select 0) select 0) select 2); _depth }; _waterDepth = [position myDiver] call TAG_fnc_returnDepth;
  14. It worked when creating locally before. I'll change that and report back!
  15. So: I used to create the CAS module like this: _center = createCenter sideLogic; _group = createGroup _center; _pos = _requestedPosFormated; _cas = _group createUnit ["ModuleCAS_F",_pos , [], 0, ""]; _cas setDir random [0,180,360]; _cas setVariable ["vehicle",_vehicle,true]; _cas setVariable ["type", _typeOfAttack,true]; This used to work up until recent Arma updates, but now it doesn't anymore. Has someone else encountered the issue ? Found a fix?
  16. Don't know if it's relevant but BI made their own hunting function: https://community.bistudio.com/wiki/BIS_fnc_stalk
  17. I see that you used https://community.bistudio.com/wiki/BIS_fnc_moduleCAS I'll have a look at it. For the record my whole script is here https://github.com/MisterHLunaticwraith/MRHMilsimTools/blob/master/Addons/MRHFireSupport/Functions/fn_MilsimTools_FireSupport_FireCAS.sqf
  18. Yes, the script was working fine until an earlier arma release. The release broke it and then Larrow gave me a solution that worked (see above). It worked fine for a while until the latest update broke it again. I haven't had time to experiment with fixes since I'm working on something else right now but I "reopened" the thread in case someone had any kind of information
  19. _center = createCenter sideLogic; _group = createGroup _center; _pos = _requestedPosFormated; _cas = _group createUnit ["ModuleCAS_F",_pos , [], 0, ""]; _cas setDir random [0,180,360]; _cas setVariable ["vehicle",_vehicle,true]; _cas setVariable ["type", _typeOfAttack,true]; _cas setVariable [ "bis_fnc_initModules_disableAutoActivation", false, !isServer ]; this seems to be broken again with the latest update, the CAS won't spawn. Does anyone know more about this ?
  20. Mr H.

    Addon Server Key

    With DSSignFile create a private key In your directory \SteamLibrary\SteamApps\common\Arma 3 Tools\DSSignFile you will then get two keys: One is .biprivatekey and the other is .bikey. Keep the private bikey somewhere safe and don't share it. The .bikey goes in the "keys" directory of your addon. When you pack your pbo with addonbuilder go to options>>path to private key file and link it to your private bikey. Then on the main screen tick "sign outpout pbo file". Upon packing you get a signed pbo with a key for it in the same directory. This key goes in the addons folder of your mod along with your pbo. And that's it!
  21. The syntax for your remote execution is incorrect. Also you can use addMPeventHandler (not addEventHandler )to have the "killed" handler trigger everywhere.
  22. textureList[]= must be present otherwise the textures won't show
  23. Got it working @HptFw. MoinxDGamer: class cfgVehicles { //#include"\MRHTestObjects\Cube\cfgVehicle.hpp" class C_Boat_Transport_02_F; class TestBoat_R : C_Boat_Transport_02_F { displayName = "testBoat"; scope=2; side =1; scopeCurator=2; textureList[]= //must be added for the texture to show { "test", 1 }; hiddenSelectionsTextures[]= { "\MRHTestObjects\red.paa", "\MRHTestObjects\green.paa" }; }; }; https://imgur.com/a/CvMBnsj
  24. The base for your boat has 2 textures: one for the interior and one for the exterior hiddenSelections[]= { "Camo_1", "Camo_2" }; hiddenSelectionsTextures[]= { "\A3\Boat_F_Exp\Boat_Transport_02\Data\Boat_Transport_02_exterior_CO.paa", "\A3\Boat_F_Exp\Boat_Transport_02\Data\Boat_Transport_02_interior_2_CO.paa" }; So you should have two also. 1 is exterior, 2 is interior
  25. mmmm that seems correct. Maybe the path to your texture is wrong? maybe - is not a valid character for an addon you would have to call it CoastGuard instead of Coast-Guard. Does it work for other vehicles, uniforms in your addon?
×