Jump to content

Northup

Member
  • Content Count

    59
  • Joined

  • Last visited

  • Medals

Community Reputation

6 Neutral

About Northup

  • Rank
    Lance Corporal

Profile Information

  • Gender
    Male
  • Location
    Kansas City

Recent Profile Visitors

617 profile views
  1. Northup

    Safezone

    Thanks for the suggestion! I suppose a marker would be more efficient than a trigger. This should be fairly easy to start with, I'm trying to iterate as I go. Not sure if I will have the same issue I had with the trigger, if so I will report back. The issue was that the player exiting a vehicle within the trigger caused them to be vulnerable for 10 seconds. The vehicle would not remain invulnerable. To extrapolate it out, It's basically a KOTH style safezone.
  2. I am trying to implement a safezone. Rules of safezone: Players who spawn inside safezone are invulnerable until they leave the safezone trigger. If they return there is a 10 second delay before they are invincible again. I managed to get that part working. // Create trigger centered on the safezone marker for vehicles _safezoneTriggerVehicle = createTrigger ["EmptyDetector", getPos _logic]; _triggerSize = [(_markerSize select 0), (_markerSize select 1), 0, false, 100]; _safezoneTriggerVehicle setTriggerArea _triggerSize; _safezoneTriggerVehicle setTriggerActivation ["ANY", "PRESENT", true]; _safezoneTriggerVehicle setTriggerStatements [ "this && {count (thisList select {alive _x && (_x isKindOf 'LandVehicle' || _x isKindOf 'Air')}) > 0}", " { if (_x isKindOf 'LandVehicle' || _x isKindOf 'Air') then { _x allowDamage false; hint format ['%1 is now invulnerable', _x]; }; } forEach (thisList select {alive _x && (_x isKindOf 'LandVehicle' || _x isKindOf 'Air')}); ", " { if (_x isKindOf 'LandVehicle' || _x isKindOf 'Air') then { _x allowDamage true; hint format ['%1 is now vulnerable', _x]; }; } forEach (thisList select {alive _x && (_x isKindOf 'LandVehicle' || _x isKindOf 'Air')}); " ]; However, I also need this to apply to players who get in vehicles, any vehicles spawned by the player (not yet implemented), as well as any vehicle being driven by a player. I've tried the following, but the vehicle and player don't become invincible again after reentering the trigger: // Create trigger centered on the safezone marker for vehicles _safezoneTriggerVehicle = createTrigger ["EmptyDetector", getPos _logic]; _triggerSize = [(_markerSize select 0), (_markerSize select 1), 0, false, 100]; _safezoneTriggerVehicle setTriggerArea _triggerSize; _safezoneTriggerVehicle setTriggerActivation ["ANY", "PRESENT", true]; _safezoneTriggerVehicle setTriggerStatements [ "this && {count (thisList select {alive _x && (_x isKindOf 'LandVehicle' || _x isKindOf 'Air')}) > 0}", " { if (_x isKindOf 'LandVehicle' || _x isKindOf 'Air') then { _x allowDamage false; hint format ['%1 is now invulnerable', _x]; }; } forEach (thisList select {alive _x && (_x isKindOf 'LandVehicle' || _x isKindOf 'Air')}); ", " { if (_x isKindOf 'LandVehicle' || _x isKindOf 'Air') then { _x allowDamage true; hint format ['%1 is now vulnerable', _x]; }; } forEach (thisList select {alive _x && (_x isKindOf 'LandVehicle' || _x isKindOf 'Air')}); " ]; I assume its something to do with the changing state of the player on the vehicle, but am not sure. I have combed through forums over the last 2 days, and all I find are old, generally outdated examples. Same with youtube. Any guidance would be appreicated: full script: https://pastebin.com/AExnxN2h
  3. Thank you Larrow! Yes. Entry_1 always exits to Exit_1 and Exit_1 always enters to Entry_1.
  4. I've got a safeZone script I am working on. Players spawn on a base, and should be able to use bunkers as "elevators" to other parts of the base via add action, at which point they will be teleported to the corresponding bunker object. I've looked at the wiki for both BIS_fnc_holdActionAdd and I've narrowed it down to the custom arguments, but I have no idea how to extrapolate that. I am using the bunker names to help the script determine which bunker should send a player to. The action is added, but having trouble passing the destination variable. _baseEntry1 = objNull; _baseEntry2 = objNull; _baseExit1 = objNull; _baseExit2 = objNull; //Initialize Elevators _syncedobjs = synchronizedObjects _logic; { if (toLower str _x find "base_exit_1" == 0) then { _baseExit1 = _x; } } forEach _syncedobjs; _syncedobjs = synchronizedObjects _logic; { if (toLower str _x find "base_exit_2" == 0) then { _baseExit2 = _x; } } forEach _syncedobjs; _syncedobjs = synchronizedObjects _logic; { if (toLower str _x find "base_entry_1" == 0) then { _baseEntry1 = _x; } } forEach _syncedobjs; _syncedobjs = synchronizedObjects _logic; { if (toLower str _x find "base_entry_2" == 0) then { _baseEntry2 = _x; } } forEach _syncedobjs; diag_log format["logic instance: %1", _logic]; diag_log format["_baseExit1: %1", _baseExit1]; diag_log format["_baseExit1 position: %1", getPosATL _baseExit1]; diag_log format["_baseExit2: %1", _baseExit2]; diag_log format["_baseExit2 position: %1", getPosATL _baseExit2]; diag_log format["_baseEntry1: %1", _baseEntry1]; diag_log format["_baseEntry1 position: %1", getPosATL _baseEntry1]; diag_log format["_baseEntry2: %1", _baseEntry2]; diag_log format["_baseEntry2 position: %1", getPosATL _baseEntry2]; // Code executed when action is performed _actionCode = { private ["_baseEntry1"]; // Define _baseEntry1 as a private variable to access it within this code block // Teleport [0, "BLACK", 1, 1] spawn BIS_fnc_fadeEffect; sleep 0.5; player setPosATL (getPosATL _baseEntry1); [1, "BLACK", 1, 1] spawn BIS_fnc_fadeEffect; }; // Add action to the object _baseExit1 _baseExit1 addAction [ "Exit to Helipad", // Title of the action _actionCode, // Code executed when action is performed [_baseEntry1], // Additional parameters: passing _baseEntry1 6, // Priority of the action true, // Show in the action menu true, // Hide the action on completion "", // Condition for the action to be available "alive player" // Condition for the action to be shown ];
  5. Solved. Didn't know about factions either. Stored the faction as a variable in the player once they are "in game". in initplayerlocal.ini: params[ "_player" ]; //Draw player side icons [] spawn NUP_fnc_playerMarkers; waitUntil {getClientStateNumber > 7}; player setVariable ["playerFaction", faction player]; in fn_playerMarkers: if (isServer) then { waitUntil { !isNull findDisplay 12 }; ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", { private ["_color", "_playerFaction"]; diag_log format ["step 1 faction player: %1",_playerFaction]; _playerFaction = player getVariable "playerFaction"; switch (_playerFaction) do { case "BLU_F": { _color = [0, 0.3, 0.6, 1]; // Blue color for BLUFOR }; case "OPF_F": { _color = [0.5, 0, 0, 1]; // Red color for OPFOR }; case "IND_F": { _color = [0, 0.5, 0, 1]; // Green color for Independent }; default { _color = [0.4, 0, 0.5, 1]; // Purple color for Civilian }; }; Edit: Big thanks to you Larrow for again pointing me in the right direction.
  6. It doesn't exist, not there. That's how I display the other GPS icons. I was trying gps and map by process of elimination. And yes, I meant side, not team. I wasn't aware that ICON would do that. As for groups, I was reading about them but hadn't gotten that far with it yet. Brilliant. o7 Edit: Only potential issue with markers vs icons is inability to change fonts.
  7. I have a custom player marker system. For the most part, it functions fine. However I had to implement some workarounds. 4 sides PVP only (Blufor, Opfor, Independent and Civilian.) Simply put, it creates markers on the map and gps minimap for each teammate, in addition to one for the player. However, since I am making use of civilians as a playable faction, they occasionally showed up with Blufor's team markers until I set side relations and -10000 rating for each civilian. Once that was solved I ran into a new issue: (I didn't know this) Players apparently become civilians from the moment they die until they respawn - meaning civilian positions would be relayed to a non civilian player. As such, I figured I might be able to make the regular markers only appear when the player is alive. That worked. So I also figured I could make some OTHER markers display based on _oldUnit in onPlayerRespawn. But I get nothing. My intent is to have RespawnOnStart = 0, so that _oldunit would have a chance to be set, because while I am sure there's a way to get the team the player selected in the lobby and display markers based on that but I wouldn't quite know where to begin. onPlayerRespawn.sqf params ["_oldUnit", "_killer", "_respawn", "_respawnDelay"]; _miniMapEH = ((uiNamespace getVariable "RscCustomInfoMiniMap") displayCtrl 101) ctrlAddEventHandler ["Draw", { private ["_color"]; switch (side _oldUnit) do { case west: { _color = [0, 0.3, 0.6, 1]; // Blue color for BLUFOR }; case east: { _color = [0.5, 0, 0, 1]; // Red color for OPFOR }; case independent: { _color = [0, 0.5, 0, 1]; // Green color for Independent }; default { _color = [0.4, 0, 0.5, 1]; // Purple color for Civilian }; }; // Loop through all playable units to draw icons for each player on the same side { if (side _x == side _oldUnit) then { // Draw colored dot icons for team players on the map _this select 0 drawIcon [ "\A3\ui_f\data\map\markers\military\dot_CA.paa", // Icon path _color, // Color based on player's side getPosASLVisual _x, 32, // Icon width 32, // Icon height getDirVisual _x, "", // Empty text 1, // Scale 0.04, // Text size "PuristaMedium", // Text font "right" // Text align ]; _this select 0 drawIcon [ "\A3\ui_f\data\map\vehicleicons\iconManVirtual_ca.paa", // Icon path [1, 1, 1, 0.65], // White color with 65% opacity getPosASLVisual _x, 25, // Icon width 25, // Icon height getDirVisual _x, name _x, // Name 1, // Scale 0.04, // Text size "PuristaMedium", // Text font "right" // Text align ]; }; } forEach allUnits; }]; diag_log format ["_oldUnit Side: %1", side _oldUnit];
  8. Q1. Not sure, but probably not. Q2. Arma has to sync an exceptionally large amount of data between the server and client. It's not so much the bandwidth these days as it is that the systems Arma was programmed to work on didn't have things like 3d vcache, and multicore processing wasn't anywhere near what it is today. Arma mostly runs on a single core, where clock speed, ram, network and vcache are king. Q3. That's impossible to answer unless you can somehow predict what players (or AI for that matter) are going to be doing at every exact moment during a match. That said, C4G recently held an event for KOTH servers that saw them increase the playercount to 150 on some servers. People complained, and there was an increase in desync, but not enough that I was personally bothered by it. That's the thing though. I have a 7800x3d, and I use a custom memalloc. Generally in the AO on a full infantry server, I can get 60 mostly solid fps if my viewdistance is lowered to around 1500-1000. VD down to 200 gets me 100+. There's also a public King of the Hill server maintained by Dwarden, iirc. That has something like 150 player slots. It's rarely full but when it is, it can be an interesting experience. Check it out if you can. All that is to say that your client's fps will largely be a result of their own hardware. Making a blazingly fast, state of the art server with space lasers still wouldn't overcome the limits of outdated client hardware.
  9. Northup

    ChatGPT is Awesome

    It certainly helps bridge the curiosity gap that would otherwise compel some to give up, but it has way too many issues to be reliable. It invents commands that don't exist, and will then gaslight you about their existence. It has trouble understanding more of the convoluted ways Arma works under the hood. Like anything, it does a lot better if you do things in very small segments with lots of logging. It will insist your defined variable lack of capitalization is the issue, especially when it isn't.
  10. Hmm. Might make use of setterrainheight and triggers. Name the triggers something like terrainTrigger_%1. Make sure trigger c - trigger area Z size is 0.002, set itz height pos to 0. Make sure it is level with ground in vr when you save it as a comp. Then, reference those triggers in your script: private _triggerNames = [terrainTrigger_01, terrainTrigger_02, terrainTrigger_03, terrainTrigger_04]; { private _triggerPos = getPosWorld _x; private _triggerSize = triggerArea _x; private _height = _triggerPos select 2; private _position = getPosWorld _x; private _triggerLength = (_triggerSize) # 0; private _triggerWidth = (_triggerSize) # 1; private _triggerAngle = (_triggerSize) # 2; private _pos = [(_position#0 + cos(_triggerAngle) * _triggerLength + sin(_triggerAngle) * _triggerWidth), (_position#1 - sin(_triggerAngle) * _triggerLength + cos(_triggerAngle) * _triggerWidth)]; private _positionsAndHeights = []; _pos pushBack _height; for "_i" from 0 to (_triggerLength * 8) do { private _pos2 = _pos; for "_j" from 0 to (_triggerWidth * 8) do { _positionsAndHeights pushBack _pos2; _pos2 = _pos2 vectorAdd [-0.25 * sin(_triggerAngle), -0.25 * cos(_triggerAngle), 0]; }; _pos = _pos vectorAdd [-0.25 * cos(_triggerAngle), 0.25 * sin(_triggerAngle), 0]; }; setTerrainHeight[_positionsAndHeights, true]; } forEach _triggerNames; The downside is I'm not near math smart enough to smooth the edges, so you'll have to find a relatively open area to minimize jarring transitions (don't place it partially on a hill.
  11. New to this stuff, but maybe changing the naming convention for markers based on what they are for might work (opforSpawn_1, independentSpawn_6, etc,) store them to arrays, then run the function separately on each array.
  12. Hi all. Starting a new mission, and I want the weather to be configurable by an authorized in game admin via the parameters menu. Since it's a multiplayer mission, I want to ensure all clients match the intended setting. In description.ext: class Params { class BR_TimeOfDay { title = "Environment: Time of Day"; values[] = {0,4,8,12,16,18,20,24}; texts[] = {"Random Time of Day", "Dawn","Mid Morning","Noon","Afternoon","Evening","Night","Midnight"}; default = 0; }; }; In initServer.sqf: // === Get the BR_daytime variable from Params in description.ext _BR_Time = ["BR_TimeOfDay"] call BIS_fnc_getParamValue; // === Check if host selected random. If so, select a random value from the options available, if not, use the value they selected, set date on server and broadcast to all clients. if (_BR_Time == 0) then { _randomTime = [4, 8, 12, 16, 18, 20, 24] call BIS_fnc_selectRandom; [_randomTime] call BIS_fnc_paramDaytime; diag_log format["_randomTime value: %1", _randomTime]; // Debug output ["setDate", [2024, 10, 10, _randomTime, 0]] call BIS_fnc_MP; } else { [_BR_Time] call BIS_fnc_paramDaytime; diag_log format["_BR_Time value: %1", _BR_Time]; // Debug output ["setDate", [2024, 10, 10, _BR_Time, 0]] call BIS_fnc_MP; }; The code "works" but I get a hint error: [BIS_fnc_MP] Error: type Array, expected string, on index 1, in ["setDate"[2024,10,10,8,0],0,false,false] In this case, the "8" in ["setDate"[2024,10,10,8,0],0,false,false] does represent the correct value being passed, so I am at a loss as to what is causing it. The same is true when "random" is selected. The time of day changes, but I still get a hint error. 8:22:15 "3den Enhanced: Debug Options initialized." 8:22:57 A null object passed as a target to RemoteExec(Call) 'bis_fnc_objectvar' 8:23:00 Starting mission: 8:23:00 Mission file: SomeName%2eAltis 8:23:00 Mission world: Stratis 8:23:00 Mission directory: C:\Users\Username\Documents\Arma 3\mpmissions\SomeName%2eAltis.Stratis\ 8:23:01 No more slot to add connection at 033057 (3386.8,5735.4) 8:23:01 d:\bis\source\stable\futura\lib\network\networkserver.cpp NetworkServer::OnClientStateChanged:NOT IMPLEMENTED - briefing! 8:23:03 "_BR_Time value: 8" 8:23:04 Mission id: 1c9cc5d519ba6c4a31aabc2dc1d86b6da522b887
  13. Northup

    Removed

    Removed
  14. Ok. So I've got a mission I had to add icons to the player map and GPS. Depends on how you are running the mission. If it's a self hosted thing on your own PC, things that would work in that environment won't work the same way in a dedicated server environment. I'm learning this is true for a lot of stuff: Weather, Time, and.... drawing stuff on the map and GPS. Long and short of it is, anything you draw needs to be drawn on all client machines. Here's a snippet of some code I use to draw an icon on the player map and GPS. Works in a dedicated server environment. Should work regardless. //Draw on Map waitUntil {!isNull findDisplay 12}; findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", { _ALP_towers = missionNamespace getVariable "ALP_triggerTowers"; { _this select 0 drawIcon [getMissionPath format ["\images\tower%1_ca.paa", (_forEachIndex + 1)], [1,1,1,1], (getPos (_x select 0)), 24, 24, 0, "", 1, 0.03, "TahomaB", "right"]; } forEach _ALP_towers; }]; //Draw on GPS private _displays = uiNamespace getVariable ["igui_displays", []]; { private _ctrl = _x displayCtrl 101; if (!isNull _ctrl && ctrlType _ctrl == 101) then { _ctrl ctrlAddEventHandler ["Draw", { _ALP_towers = missionNamespace getVariable "ALP_triggerTowers"; { _this select 0 drawIcon [getMissionPath format ["\images\tower%1_ca.paa", (_forEachIndex + 1)], [1,1,1,1], (getPos (_x select 0)), 24, 24, 0, "", 1, 0.03, "TahomaB", "right"]; } forEach _ALP_towers; }]; }; } forEach _displays; I have this code running in initplayerlocal. This is a mission with no addons, no mods, pure vanilla.
×