Jump to content

Northup

Member
  • Content Count

    85
  • Joined

  • Last visited

  • Medals

Community Reputation

19 Good

About Northup

  • Rank
    Corporal

Profile Information

  • Gender
    Male
  • Location
    Kansas City

Recent Profile Visitors

2234 profile views
  1. 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, "", "" ];
  2. Welp, then that's why it doesn't work. How/Where is CP defined in your mission? I am assuming you have a param for it in description.ext. Whatever that param is, it's value has to be retrieved in the script that handles that param. One super duper easy way to see if/where/how this param value is applied elsewhere is to first located is to use notepad++, open description.ext, find the parameter you want to look into, select and copy it, hit ctrl+f, click the 'Find in Files' tab, paste it. Change the 'Directory' to your mission folder root and click the 'Find All' button. That will show you any references to that variable in any script present in your mission folder. If you don't see it, there's your issue. Below is example of a parameter being defined in description.ext and retrieved elsewhere. Description.ext: class Params { //Changes speed of holdaction that captures the flag class NUP_flagCapSpeed // THIS IS THE VARIABLE WE WILL RETRIEVE ELSEWHERE { title = "Flag Capture Speed"; values[] = {1, 10, 15, 30}; texts[] = {"1 second (Testing)", "10 seconds", "15 seconds", "30 seconds"}; default = 1; }; }; Then, in my holdAction script, I have this line: _duration = ["NUP_flagCapSpeed", 5] call BIS_fnc_getParamValue; And a bit further down in that same script: ... //Interrupt { params[ "_flag", "_caller" ]; _baseMarker = _flag getVariable "NUP_baseMarker"; [ _flag, 1 ] remoteExec [ "setFlagAnimationPhase", 0, format[ "capFlagPhase_%1", _baseMarker ] ]; _sideID = _flag getVariable "TER_flagSide"; _fileFlag = ["flag_csat_co", "flag_nato_co", "flag_aaf_co", "flag_fd_purple_co", "flag_white_co"] select (_sideID call BIS_fnc_sideID); _flag setFlagTexture format ["\a3\data_f\flags\%1.paa", _fileFlag]; }, [], _duration, // HERE IS THE PARAMVALUE FROM MISSION PARAMETERS, PASSED AS A LOCAL VARIABLE 1.5, false ] call BIS_fnc_holdActionAdd; Point is, something being present in the mission parameters doesn't matter much if there isn't another script retrieving the variable and doing something with it. Same thing applies to the 2x param. I am assuming that CP is your mission's currency. Any currency system is going to be mission specific, created for that mission. As far as Arma is concerned, currency doesn't exist and there is no built in currency system in Arma 3. Disabling player fatigue is easy enough, though from what I found with a quick Google search, fatigue is antiquated and it'd probably be better to disable player stamina. In description.ext, I'd add another param to the params section: class Params { //Changes speed of holdaction that captures the flag class NUP_flagCapSpeed { title = "Flag Capture Speed"; values[] = {1, 10, 15, 30}; texts[] = {"1 second (Testing)", "10 seconds", "15 seconds", "30 seconds"}; default = 1; }; class TAG_myNewPlayerStaminaParam // THIS IS THE NEW STAMINA VARIABLE WE WILL RETRIEVE IN ONPLAYERRESPAWN.SQF { title = "Player Stamina"; values[] = {true, false}; texts[] = {"enabled", "disabled"}; default = false; }; }; Then, in onPlayerRespawn.sqf: params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"]; _staminaSetting = ["TAG_myNewPlayerStaminaParam", false] call BIS_fnc_getParamValue; _newUnit enableStamina _staminaSetting; So as you can see, it's a bit more involved than just selecting a value. Please post your code so that someone can help point you in the right direction.
  3. Derp. Youre right. My bad. Thanks for the correction @pierremgi
  4. If it's MP: this addAction ["Play Vietnam", {["Vietnam"] remoteExec ["playMusic", _caller];}]; I was wrong.
  5. 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];
  6. 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.
  7. _repairTrigger setTriggerActivation ["ANY", "PRESENT", true]; Tried both of those. Neither seemed to work. The mission is MP. NUP_fnc_repairVehicle: https://pastebin.com/hAyCkrfL
  8. 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?
  9. 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).
  10. Northup

    Make radio play a song

    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.
  11. _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.
  12. waitUntil {getClientStateNumber == 10}; https://community.bistudio.com/wiki/getClientStateNumber
×