-
Content Count
91 -
Joined
-
Last visited
-
Medals
Community Reputation
21 ExcellentAbout Northup
-
Rank
Corporal
Profile Information
-
Gender
Male
-
Location
Kansas City
Recent Profile Visitors
-
You do not need the GUI editor for the progress bar. The editor sucks imo. Below is an example of a function that will create a progress bar on the fly. Folder setup: TAG ﹂ Functions fn_myFunctionNameHere.sqf functions.fncs functions.fncs: class TAG_someName { tag = "TAG"; class someName { file = "TAG\functions"; class myFunctionNameHere {}; }; }; in description.ext: class CfgFunctions { #include "TAG\functions\functions.fncs" }; Full function: https://pastebin.com/XbxthJ6P Here are the relevant parts of that function pertaining to a progress bar:
-
A few questions about player voice (radio protocol)
Northup replied to dupa1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/setPitch https://community.bistudio.com/wiki/pitch https://community.bistudio.com/wiki/setIdentity Start there. setPitch and setIdentity are local effect, so either would need to be remoteExec on each client. -
{ _x allowDamage true; } forEach allUnits;
-
Button Click event handler works and doesn't work (respawn)
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
100%. Spent too much time looking at it and not seeing the obvious. IDC appears to be the culprit. I did read that in the biki, and tried changing it, but must not have had things setup correctly when testing. Assumed changing it to 1 (IDC_OK) would work. Didn't seem to. Double checked now, and decided to try an unreserved number as you suggested. Tested and error code - which means it is working. Thanks! -
Button Click event handler works and doesn't work (respawn)
Northup posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Working on a custom MP respawn function, placed inside onPlayerRespawn Pretty straightforward: - On death, we immediately move the _newUnit to [0,0,0] - Create a camera on the body of the _oldUnit - Create an included dialog that displays a map and a button that says respawn. - Add button event handler that when clicked moves _newUnit to an HQ building. - Add addaction to player corpse so that a friendly player can "heal". Issue is when clicked, respawn button just closes the dialog - which means it is doing something, and that something is at the end of the event handler, so I am unsure why everything else appears to be skipped: params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; _newUnit setPos [0, 0, 0]; _newUnit allowDamage false; _newUnit enableSimulation false; [0, 1, true, false] call NUP_fnc_cinematicBorder; // Create camera to focus on the dead body _camera = "camera" camCreate (getPosATL _oldUnit); _camera cameraEffect ["INTERNAL", "BACK"]; _camera camPrepareTarget _oldUnit; _camera camCommitPrepared 0; _camera camPrepareRelPos [0, 0, 3]; _camera camPrepareFOV 0.5; _camera camCommitPrepared 0; // Open the RespawnDialog createDialog "RespawnDialog"; // Disable scoring UI private _scoreHUD = uiNamespace getVariable "ScoreHUD"; if (!isNull _scoreHUD) then { _scoreHUD closeDisplay 1; }; // Pass variables to the dialog private _display = findDisplay 9500; // RespawnDialog display _display setVariable ["NUP_camInstance", _camera, true]; _display setVariable ["NUP_newUnitInstance", _newUnit, true]; _display setVariable ["NUP_oldUnitInstance", _oldUnit, true]; // Fetch the map control and set its position to the player's position private _map = _display displayCtrl 9501; // Map control (_CT_MAP) if (!isNull _map) then { _map ctrlMapAnimAdd [0, 0.1, getPosATL _oldUnit]; // Set the map to player's position ctrlMapAnimCommit _map; }; // Fetch the dialog controls private _respawnButton = _display displayCtrl 2; // Respawn button (_CT_BUTTON) private _eventHandlerID = -1; // Attach functionality to the Respawn Button _respawnButton ctrlAddEventHandler ["ButtonClick", { params ["_control"]; // Retrieve variables from the dialog private _display = findDisplay 9500; private _camera = _display getVariable ["NUP_camInstance", objNull]; private _newUnit = _display getVariable ["NUP_newUnitInstance", objNull]; private _oldUnit = _display getVariable ["NUP_oldUnitInstance", objNull]; private _eventHandlerID = _display getVariable ["NUP_EventHandlerID", -1]; // Debug validation if (isNull _camera) exitWith { hint "Error: Camera instance is null!"; }; if (isNull _newUnit) exitWith { hint "Error: New unit instance is null!"; }; if (isNull _oldUnit) exitWith { hint "Error: Old unit instance is null!"; }; // Retrieve the player's faction private _playerFaction = _oldUnit getVariable ["playerFaction"]; private _respawnMarker = switch (_playerFaction) do { case "BLU_F": { "start_WEST" }; case "OPF_F": { "start_EAST" }; case "IND_F": { "start_INDEP" }; default { "start_CIVILIAN" }; }; private _markerPos = getMarkerPos _respawnMarker; // Building search logic private _buildingClasses = [ "Land_Cargo_HQ_V1_F", "Land_Cargo_HQ_V3_F", "Land_Medevac_HQ_V1_F", "Land_Cargo_House_V1_F", "Land_Cargo_Tower_V1_F", "Land_i_Shed_Ind_F" ]; private _nearestBuildings = nearestObjects [_markerPos, _buildingClasses, 100]; private _allBuildingPositions = []; { private _buildingPositions = [_x] call BIS_fnc_buildingPositions; _allBuildingPositions = _allBuildingPositions + _buildingPositions; } forEach _nearestBuildings; // Determine respawn position private _respawnPos = if (count _allBuildingPositions > 0) then { selectRandom _allBuildingPositions } else { _markerPos }; // Move player to respawn position _newUnit allowDamage true; _newUnit enableSimulation true; _newUnit setPosATL _respawnPos; // Cleanup the camera if (!isNull _camera) then { _camera cameraEffect ["TERMINATE", "BACK"]; camDestroy _camera; }; // Delete the old unit after 60 seconds [_oldUnit] spawn { sleep 60; deleteVehicle _oldUnit; }; // Remove the ButtonClick event handler inside itself _control ctrlRemoveEventHandler ["ButtonClick", _eventHandlerID]; // Close the dialog closeDialog 0; }]; // Add revive action to the dead body _oldUnit addAction [ "Revive Player", // title { params ["_target", "_caller", "_actionId", "_arguments"]; // script _arguments params ["_camera", "_oldUnit", "_newUnit"]; [_target, _caller, _camera, _oldUnit, _newUnit] call NUP_fnc_revivePlayer; }, _arguments, // arguments 1.5, // priority true, // showWindow true, // hideOnUse "", // shortcut "side _this == side _target", // condition 2, // radius false, // unconscious "", // selection "" // memoryPoint ]; // Set the safezone delay back to false so respawning players at HQ are protected immediately. _newUnit setVariable ["NUP_safezoneDelay", false]; _newUnit setVariable ["NUP_disableCommandChat", true]; _newUnit setVariable ["vehicle", 0]; [] call NUP_fnc_playerMarkers; // Apply the saved loadout if it exists private _savedLoadout = _newUnit getVariable ["NUP_savedLoadout", nil]; if (!isNil "_savedLoadout") then { _newUnit setUnitLoadout _savedLoadout; }; I tested also by replacing all functions inside the event handler with a hint. Got nothing. Used very similar approach in another dialog and it worked well enough. Any tips would be appreciated! Also, here is the rsc: class RscRedeployment { idd = 9000; // Display identification enableSimulation = 1; // 1 (true) to allow world simulation to be running in the background, 0 to freeze it enableDisplay = 1; // 1 (true) to allow scene rendering in the background class controls { // Add the black bar at the top class HeaderBar { idc = -1; type = CT_STATIC; style = ST_CENTER; x = safeZoneX + safeZoneW * 0.05; // Align with the map y = safeZoneY + safeZoneH * 0.01; // Slightly above the map w = safeZoneW * 0.9; // Match map width h = 0.05; // Height of the bar colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])",1}; //background colorText[] = {1, 1, 1, 1}; // White text font = "PuristaMedium"; sizeEx = 0.04; // Text size text = "INFANTRY REDEPLOYMENT SYSTEM"; // Text content shadow = 0; // No shadow }; class _CT_MAP { access = 1; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified) idc = 9001; // Control identification (without it, the control won't be displayed) type = CT_MAP_MAIN; // Type style = ST_PICTURE; // Style default = 1; // Control selected by default (only one within a display can be used) blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect. x = safeZoneX + safeZoneW * 0.05; y = safeZoneY + safeZoneH * 0.05; w = safeZoneW * 0.9; h = safeZoneH * 0.8; sizeEx = GUI_GRID_CENTER_H; // Text size font = GUI_FONT_NORMAL; // Font from CfgFontFamilies colorText[] = {0,0,0,1}; // Text color tooltip = ""; // Tooltip text tooltipColorShade[] = {0,0,0,1}; // Tooltip background color tooltipColorText[] = {1,1,1,1}; // Tooltip text color tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color moveOnEdges = 1; // Move map when cursor is near its edge. Discontinued. // Rendering density coefficients ptsPerSquareSea = 5; // seas ptsPerSquareTxt = 20; // textures ptsPerSquareCLn = 10; // count-lines ptsPerSquareExp = 10; // exposure ptsPerSquareCost = 10; // cost // Rendering thresholds ptsPerSquareFor = 9; // forests ptsPerSquareForEdge = 9; // forest edges ptsPerSquareRoad = 6; // roads ptsPerSquareObj = 9; // other objects scaleMin = 0.001; // Min map scale (i.e., max zoom) scaleMax = 1.0; // Max map scale (i.e., min zoom) scaleDefault = 0.16; // Default scale alphaFadeStartScale = 2; // Scale at which satellite map starts appearing alphaFadeEndScale = 2; // Scale at which satellite map is fully rendered maxSatelliteAlpha = 0.85; // Maximum alpha of satellite map text = "#(argb,8,8,3)color(1,1,1,1)"; // Fill texture colorBackground[] = {1,1,1,1}; // Fill color colorOutside[] = {0,0,0,1}; // Color outside of the terrain area (not sued when procedural terrain is enabled) colorSea[] = {0.4,0.6,0.8,0.5}; // Sea color colorForest[] = {0.6,0.8,0.4,0.5}; // Forest color colorForestBorder[] = {0.6,0.8,0.4,1}; // Forest border color colorRocks[] = {0,0,0,0.3}; // Rocks color colorRocksBorder[] = {0,0,0,1}; // Rocks border color colorLevels[] = {0.3,0.2,0.1,0.5}; // Elevation number color colorMainCountlines[] = {0.6,0.4,0.2,0.5}; // Main countline color (every 5th) colorCountlines[] = {0.6,0.4,0.2,0.3}; // Countline color colorMainCountlinesWater[] = {0.5,0.6,0.7,0.6}; // Main water countline color (every 5th) colorCountlinesWater[] = {0.5,0.6,0.7,0.3}; // Water countline color colorPowerLines[] = {0.1,0.1,0.1,1}; // Power lines color colorRailWay[] = {0.8,0.2,0,1}; // Railway color colorNames[] = {1.1,0.1,1.1,0.9}; // Unknown? colorInactive[] = {1,1,0,0.5}; // Unknown? colorTracks[] = {0.8,0.8,0.7,0.2}; // Small road border color colorTracksFill[] = {0.8,0.7,0.7,1}; // Small road color colorRoads[] = {0.7,0.7,0.7,1}; // Medium road border color colorRoadsFill[] = {1,1,1,1}; // Medium road color colorMainRoads[] = {0.9,0.5,0.3,1}; // Large road border color colorMainRoadsFill[] = {1,0.6,0.4,1}; // Large road color colorGrid[] = {0.1,0.1,0.1,0.6}; // Grid coordinate color colorGridMap[] = {0.1,0.1,0.1,0.6}; // Grid line color widthRailway = 0; fontLabel = GUI_FONT_NORMAL; // Tooltip font from CfgFontFamilies sizeExLabel = GUI_GRID_CENTER_H * 0.5; // Tooltip font size fontGrid = GUI_FONT_SYSTEM; // Grid coordinate font from CfgFontFamilies sizeExGrid = GUI_GRID_CENTER_H * 0.5; // Grid coordinate font size fontUnits = GUI_FONT_SYSTEM; // Selected group member font from CfgFontFamilies sizeExUnits = GUI_GRID_CENTER_H * 0.5; // Selected group member font size fontNames = GUI_FONT_NORMAL; // Marker font from CfgFontFamilies sizeExNames = GUI_GRID_CENTER_H * 1; // Marker font size fontInfo = GUI_FONT_NORMAL; // Unknown? sizeExInfo = GUI_GRID_CENTER_H * 0.5; // Unknown? fontLevel = GUI_FONT_SYSTEM; // Elevation number font sizeExLevel = GUI_GRID_CENTER_H * 0.5; // Elevation number font size showCountourInterval = 1; // Show Legend class Task { icon = "#(argb,8,8,3)color(1,1,1,1)"; color[] = {1,1,0,1}; iconCreated = "#(argb,8,8,3)color(1,1,1,1)"; colorCreated[] = {0,0,0,1}; iconCanceled = "#(argb,8,8,3)color(1,1,1,1)"; colorCanceled[] = {0,0,0,0.5}; iconDone = "#(argb,8,8,3)color(1,1,1,1)"; colorDone[] = {0,1,0,1}; iconFailed = "#(argb,8,8,3)color(1,1,1,1)"; colorFailed[] = {1,0,0,1}; size = 8; importance = 1; // Required, but not used coefMin = 1; // Required, but not used coefMax = 1; // Required, but not used }; class ActiveMarker { color[] = {0,0,0,1}; // Icon color size = 2; // Size in pixels }; class LineMarker { textureComboBoxColor = "#(argb,8,8,3)color(1,1,1,1)"; lineWidthThin = 0.008; lineWidthThick = 0.014; lineDistanceMin = 3e-005; lineLengthMin = 5; }; class Waypoint { coefMax = 1; // Minimum size coefficient coefMin = 4; // Maximum size coefficient color[] = {0,0,0,1}; // Icon color icon = "#(argb,8,8,3)color(0,0,0,1)"; // Icon texture importance = 1; // Drawing importance (when multiple icons are close together, the one with larger importance is prioritized) size = 2; // Size in pixels }; class WaypointCompleted: Waypoint{}; class CustomMark: Waypoint{}; class Command: Waypoint{}; class Bush: Waypoint{}; class Rock: Waypoint{}; class SmallTree: Waypoint{}; class Tree: Waypoint{}; class BusStop: Waypoint{}; class FuelStation: Waypoint{}; class Hospital: Waypoint{}; class Church: Waypoint{}; class Lighthouse: Waypoint{}; class Power: Waypoint{}; class PowerSolar: Waypoint{}; class PowerWave: Waypoint{}; class PowerWind: Waypoint{}; class Quay: Waypoint{}; class Transmitter: Waypoint{}; class Watertower: Waypoint{}; class Cross: Waypoint{}; class Chapel: Waypoint{}; class Shipwreck: Waypoint{}; class Bunker: Waypoint{}; class Fortress: Waypoint{}; class Fountain: Waypoint{}; class Ruin: Waypoint{}; class Stack: Waypoint{}; class Tourism: Waypoint{}; class ViewTower: Waypoint{}; onCanDestroy = ""; onDestroy = ""; onSetFocus = ""; onKillFocus = ""; onKeyDown = ""; onKeyUp = ""; onMouseButtonDown = ""; onMouseButtonUp = ""; onMouseButtonClick = ""; onMouseButtonDblClick = ""; onMouseZChanged = ""; onMouseMoving = ""; onMouseHolding = ""; onDraw = ""; }; class _CT_BUTTON { deletable = 0; fade = 0; access = 0; type = CT_BUTTON; text = "CANCEL"; // Default text (empty) colorText[] = {1,1,1,1}; // White text colorDisabled[] = {1,1,1,0.5}; // Disabled text color x = safeZoneX + safeZoneW * 0.1; // Left side of the map y = safeZoneY + safeZoneH * 0.9; // Same vertical level as Redeploy w = safeZoneW * 0.2; // Button width h = safeZoneH * 0.05; // Button height colorBackground[] = {0,0,0,1}; // Black background colorBackgroundDisabled[] = {0,0,0,0.5}; // Disabled background colorBackgroundActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.77])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.51])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.08])",1}; colorFocused[] = {0,0,0,1}; // Focused background (black) colorShadow[] = {0,0,0,0}; // No shadow colorBorder[] = {1,1,1,1}; // White border soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1}; soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1}; soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1}; soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1}; idc = 1; style = ST_CENTER; // Center text shadow = 0; font = "PuristaMedium"; // Use a consistent font sizeEx = 0.05; // Standard text size offsetX = 0; offsetY = 0; offsetPressedX = 0.002; offsetPressedY = 0.002; borderSize = ; }; class RedeployButton: _CT_BUTTON { idc = 2; // Redeploy button ID text = "REDEPLOY"; x = safeZoneX + safeZoneW * 0.7; y = safeZoneY + safeZoneH * 0.9; w = safeZoneW * 0.2; h = safeZoneH * 0.05; font = GUI_FONT_NORMAL; soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1}; soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1}; soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1}; soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1}; onButtonClick = ""; }; }; }; -
addAction disappears with barrel objects
Northup replied to kibaBG's topic in ARMA 3 - MISSION EDITING & SCRIPTING
1. Pelvis is misspelled. I'm surprised you didn't get an error. 2. Your first addaction had an invisible character that precluded it from running. If you copied it from here, that is probably where you got it. 3. Now it adds the addactions, however once you pick it up, the object loses it's addaction, as it is attached to the player. To solve this, you need to assign the second addaction to the caller, not the object, and remove it when the caller drops it. Example (tested): // Create the barrel on the server _crate = createVehicle ["Land_MetalBarrel_F", position helipad, [], 0, "NONE"]; _crate enableDynamicSimulation false; _crate addAction [ "<t color='#FFFF80'>Pickup</t>", { params ["_target", "_caller", "_actionId", "_arguments"]; _target attachTo [_caller, [0, 2, 1], "Pelvis"]; _caller addAction [ "<t color='#FFFF80'>Drop</t>", { params ["_target", "_caller", "_actionId", "_arguments"]; { detach _x; _x enableSimulationGlobal true; } forEach attachedObjects _caller; _caller removeAction _actionId; } ]; }, nil, 1.5, false, false, "", "true", 3, false, "", "" ]; -
Playing Music over addaction
Northup replied to Fipler's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Derp. Youre right. My bad. Thanks for the correction @pierremgi -
Playing Music over addaction
Northup replied to Fipler's topic in ARMA 3 - MISSION EDITING & SCRIPTING
If it's MP: this addAction ["Play Vietnam", {["Vietnam"] remoteExec ["playMusic", _caller];}]; I was wrong. -
[Solved] RemoteExec on player vehicle in trigger
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ok, so I figured it out. I wasn't paying close enough attention to the repair script. All of the titleTexts and hints need to be remote exec'd, and the script can just be called. [["<t color='#00ff00' size='2'>Repairing Damage...</t><br/>", "PLAIN", -1, true, true]] remoteExec ["titleText", owner _driver]; -
[Solved] RemoteExec on player vehicle in trigger
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah, a little titletext and a few of sleeps basically, in addition to rearming, repairing and refueling. I tried the original and had no result. Assumed it wasn't firing on player. 1. The trigger itself is part of a composition spawned in with Larrow's Eden Comp Spawn, which is called in zoneSelect. In initSafezone, I snag and update the trigger, and call addVehicleServices, where I apply setTriggerActivation and setTriggerStatements posted above. It's a bit complex. InitSever>zoneSelect>LARs_fnc_spawnComp>initSafezone>addVehicleServices. //get the repair trigger private _triggerList = _flag nearObjects ["EmptyDetector", 150]; // Filter only triggers with names starting with "NUP_repairTrigger_" private _repairTriggers = _triggerList select { (toLower (name _x) find "nup_repairtrigger_") isEqualTo 0 }; // Call NUP_fnc_addVehicleServices for each repair trigger { private _repairTrigger = _x; // Ensure the trigger name matches private _triggerName = toLower (name _repairTrigger); if (_triggerName find "nup_repairtrigger_" isEqualTo 0) then { // Call NUP_fnc_addVehicleServices passing the side and the repair trigger [_repairTrigger] call NUP_fnc_addVehicleServices; }; } forEach _repairTriggers; 2. I added a pastebin link to a previous post maybe 30 seconds before I got the notification for this. https://pastebin.com/hAyCkrfL Mission Link: https://drive.google.com/file/d/14ETgJGqbO3z3HL6CC-n4hwb-cGThFv7E/view?usp=sharing BTW Happy Thanksgiving @pierremgi. -
[Solved] RemoteExec on player vehicle in trigger
Northup replied to Northup's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_repairTrigger setTriggerActivation ["ANY", "PRESENT", true]; Tried both of those. Neither seemed to work. The mission is MP. NUP_fnc_repairVehicle: https://pastebin.com/hAyCkrfL -
[Solved] RemoteExec on player vehicle in trigger
Northup posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have a repair trigger. Trying to figure out how to remoteExec to client (driver) of the vehicle the repair script. Crude example: // Set trigger condition and statements _repairTrigger setTriggerStatements [ //"{_x isKindOf 'LandVehicle' || _x isKindOf 'Helicopter' && speed _x < 1} count thisList > 0", // Condition (testing cond. below.) "{(_x isKindOf 'LandVehicle' || _x isKindOf 'Helicopter') && speed _x < 1 && damage _x > 0} count thisList > 0",// Condition "call {_handle = [(thisList select 0), thisTrigger] call NUP_fnc_repairVehicle;}", // Activation "" // Deactivation (empty) ]; works fine in local hosted, not dedicated, obviously. Tried: " [(thisList select 0), thisTrigger] remoteExec ['NUP_fnc_repairVehicle', owner _x] ;", // Activation I'm just a tad stumped. Any takers? -
How to gradually overcast (cloud cover) on dedi ?
Northup replied to kibaBG's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe something like: // Initial values private _startingOvercast = 0.3; private _increment = 0.0208; // Increase per step private _interval = 300; // 5 minutes in seconds // Skip 24 hours to simulate mission start skipTime -24; // Set initial overcast to _startingOvercast (0.3) over 24 hours (86400 seconds) [86400, _startingOvercast] remoteExec ["setOvercast", 0, true]; // Skip time forward 24 hours to make sure weather is applied skipTime 24; // Sync client weather to server 0 = 0 spawn {sleep 0.1; simulWeatherSync;}; // Overcast adjustment loop [_startingOvercast, _increment] spawn { params ["_startingOvercast", "_increment"]; for "_i" from 0 to 23 do { // 24 updates over 2 hours private _targetOvercast = _startingOvercast + (_i * _increment); // Set overcast to the calculated target value on all clients [0, _targetOvercast] remoteExec ["setOvercast", 0, true]; // Apply to both server and clients forceWeatherChange; sleep 300; // Wait 5 minutes before the next update }; }; remoteExecing overcast on JIP since syncing is broken. rest of changes are made with info on wiki: 1: Arma 3's volumetric clouds cannot be instantly changed (it would take up to a few seconds to do a full recompute). Therefore, 0 setOvercast 0 will not have the desired effect. You can use skipTime to get to the desired cloud coverage. NOTE: To get instant, seamless overcast change to overcast 1 advance the time 24 hours with skipTime while setting overcast transition time to 86400 seconds (24 hours) - Killzone_Kid (12:08, 15 August 2013) 2: With removal of simulSetHumidity, in order to add instant cloud cover, execute simulWeatherSync with delay (for now). -
Northup changed their profile photo
-
Make radio play a song
Northup replied to Maguila.gm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Description.ext: class CfgSounds { sounds[] = {}; class Track01 { name = "Track01"; sound[] = {"\Music\song1.ogg", db+10, 1.0}; titles[] = { 0, "*HEADBANGING*" }; // subtitles titlesFont = "LCD14"; // OFP:R - titles font family titlesSize = 0.05; // OFP:R - titles font size forceTitles = 1; // Arma 3 - display titles even if global show titles option is off (1) or not (0) titlesStructured = 1; // Arma 3 - treat titles as Structured Text (1) or not (0) }; }; In init of radio object: this say3D "Track01"; Example Mission: https://drive.google.com/file/d/15NAzb88tuGvRh8ZK2O4LOy8m0z9Dgcv6/view?usp=sharing Could also name the radio "radio1" and, in initServer: radio1 say3D "Track01"; Just remember to remove the line from radio1's init if doing it that way. -
_weather = ["Weather", -1] call BIS_fnc_getParamValue; if (_weather == -1) exitWith { hint "Weather parameter not found!"; }; switch (_weather) do { case 0: { skipTime -24; 0 setOvercast 0; //clear sky skipTime 24; [0,0] remoteExec ["setOvercast", -2, true]; //remoteExec for JIP 0 setRain 0; 0 setFog 0; forceWeatherChange; [1] remoteExec ["skipTime", -2, true]; //remoteExec for JIP [-1] remoteExec ["skipTime", -2, true]; //remoteExec for JIP 999999 setRain 0; 999999 setFog 0; 0 = [] spawn { sleep 0.1; simulWeatherSync; }; //To force instant cloud cover }; case 1: { skipTime -24; 86400 setOvercast 0.5; skipTime 24; [0,0.5] remoteExec ["setOvercast", -2, true]; 0 setRain 0; 0 setFog 0; forceWeatherChange; [1] remoteExec ["skipTime", -2, true]; [-1] remoteExec ["skipTime", -2, true]; 999999 setRain 0; 999999 setFog 0; 0 = [] spawn { sleep 0.1; simulWeatherSync; }; }; case 2: { skipTime -24; 86400 setOvercast 0.6; skipTime 24; [0,0.6] remoteExec ["setOvercast", -2, true]; 0 setRain 0; 0 setFog 0.1; forceWeatherChange; [1] remoteExec ["skipTime", -2, true]; [-1] remoteExec ["skipTime", -2, true]; 999999 setRain 0; 999999 setFog 0.1; 0 = [] spawn { sleep 0.1; simulWeatherSync; }; }; case 3: { skipTime -24; 86400 setOvercast 1; skipTime 24; [0,1] remoteExec ["setOvercast", -2, true]; 0 setRain 0.5; 0 setFog 0; forceWeatherChange; [1] remoteExec ["skipTime", -2, true]; [-1] remoteExec ["skipTime", -2, true]; 999999 setFog 0; 0 = [] spawn { sleep 0.1; simulWeatherSync; }; }; }; The above seems to work instantly for me. Haven't tested in dedicated.