-
Content Count
1194 -
Joined
-
Last visited
-
Medals
Posts posted by stanhope
-
-
Do you have a microphone lying around that uses a 3.5mm jack you can test something with? Or does your setup have a headset 3.5mm port instead of/on top of the headphones and microphones ports?
-
From createVehicleCrew:
QuoteCreates vehicle crew corresponding to vehicle's faction.
So, spawn some NATO crew members and move them into the vehicle.
-
For 1: call a function that checks the player's inventory against what they had originally from take & inventory closed EHs. And remove everything they shouldn't have
For 2: use a getInMan & seatSwitchedMan EHs and eject the player out of the vehicle if they're not allowed to.
-
I'd assume that on a milsim server that wouldn't be needed but here you go:
https://www.google.com/search?q=arma+3+ace+3+arsenal+blacklist => https://ace3mod.com/wiki/framework/arsenal-framework.html#11-adding-virtual-items
- 2
-
you need to remote exec your script to the server and your fade effects to the client
So in init.sqf put:
YourPrefix_fnc_teleportFade = { [0,"BLACK",0.1,3] call BIS_fnc_fadeEffect; player SetPos ((getPos t1) vectorADD ([random[0, 12.5, 25], random[-1.5, 0, 1.5], 0])); [1, "BLACK",5,1] call BIS_fnc_fadeEffect; 0=[[["near the coast... ","align = 'center' size = '0.7' font='PuristaBold'"],["","<br/>"],["5 days later","align = 'center' size = '0.7'","#aaaaaa"]]] spawn BIS_fnc_typeText2; }; YourPrefix_fnc_teleportPlayersToSub = { setDate [2012, 9, 1, 4, 30]; 0 setFog [0.4, 0.1, 25]; [] remoteExecCall ["YourPrefix_fnc_teleportFade", 0]; };
And make your addaction the following:
this addAction ["To U-Boat",{[] remoteExec ["YourPrefix_fnc_teleportPlayersToSub", 2]},[],1,false,true,"","_this distance _target < 3"];
The init of a vehicle is executed every time someone joins, so you don't need to remote exec there (iirc)
Untested.
-
There's also no value lost? I just tested it with the code in Robustcolor's reply. Sometimes the first is marginally faster, sometimes it's marginally slower. It basically comes down to personal preference.
-
Either of these should do the trick as long as you're only using 2 groups per sector:
Spoiler{ private _sector = _x; private _groupName = format["grp-sctr-%1", _forEachIndex]; { private _grp = [...] call BIS_fnc_spawnGroup; private _pos = _x; if (_forEachIndex == 0) then { _grp setGroupId [format ["%1-building", _groupName]]; //do code for building group }; if (_forEachIndex == 1) then { _grp setGroupId [format ["%1-road", _groupName]]; //do code for road group }; } forEach _sector; } forEach _sectorArray; /////////// OR //////////////////// { private _sector = _x; private _groupName = format["grp-sctr-%1", _forEachIndex]; private _pos = _sector select 0; private _bldGrp = [...] call BIS_fnc_spawnGroup; _bldGrp setGroupId [format ["%1-building", _groupName]]; //do code for building group private _pos = _sector select 1; private _roadGrp = [...] call BIS_fnc_spawnGroup; _roadGrp setGroupId [format ["%1-road", _groupName]]; //do code for road group } forEach _sectorArray;
Untested
-
Because it reduces code complexity and gitlab yells at me when I push code that's too complex (well, only for school assignments, course of habit I guess)
-
Something like this?
{ private _sector = _x; private _groupName = format["grp-sctr-%1", _forEachIndex]; { private _grp = createGroup [east, true]; //spawn units etc. _grp setGroupId (format ["%1-%2", _groupName, _forEachIndex];); } forEach _sector; } forEach _sectorArray ;
Untested
- 1
-
-
Just take that sleep out then I guess
- 1
-
The code you provided has an extra "}];" in it which will throw a syntax error, here's a version without the syntax error (still untested):
Spoilerprivate _EHCode = { params ["_unit", "_hitSelection", "_damage","_source","_projectile","_hitPartIndex", "_instigator", "_hitPoint"]; private _damageMultiplierHead = 0.3; private _damageMultiplierBody = 0.25; private _damageMultiplierLimbs = 0.15; private _damageMultiplierOverall = 0.25; private _limitHead = 1.0; private _limitBody = 0.25; private _limitLimbs = 0.1; private _limitOverall = 0.25; private _oldDamage = 0; if (_hitSelection isEqualTo "") then {_oldDamage = damage _unit} else {_oldDamage = _unit getHit _hitSelection}; private _newDamage = _damage - _oldDamage max 0; private _incomingDamage = _newDamage; private _playerHealth = damage _unit; if (_newDamage > 0 && !(_projectile isEqualTo "")) then { private _damageMultiplier = _damageMultiplierBody; private _upperLimit = _limitBody; switch (_hitSelection) do { case "face_hub"; case "head": { _damageMultiplier = _damageMultiplierHead; _upperLimit = _limitHead; }; case "arms"; case "hands"; case "legs": { _damageMultiplier = _damageMultiplierLimbs; _upperLimit = _limitLimbs; }; case "": { _damageMultiplier = _damageMultiplierOverall; _upperLimit = _limitOverall; }; default { _damageMultiplier = _damageMultiplierBody; _upperLimit = _limitBody; }; }; _newDamage = _newDamage * _damageMultiplier; if (_newDamage > _upperLimit) then { _newDamage = _upperLimit; }; _damage = _oldDamage + _newDamage; }; if ( isPlayer _unit ) then { if ( lifeState _unit == "INCAPACITATED" ) then { _damage = _oldDamage; } else { _this set[ 2, _damage ]; _damage = _this call bis_fnc_reviveEhHandleDamage; }; }; _damage }; while {true} do { { if (_x getVariable ["damage_modifier_EH_applies", false]) then {continue;}; _x addEventHandler ["HandleDamage", _EHCode]; _x setVariable ["damage_modifier_EH_applies", true]; uiSleep 0.1; } forEach allUnits; uiSleep 5; };
If this also throws errors, go to "%localAppData%\Arma 3" (open windows explorer and put it in the bar at the top), open the newest .rpt file you find in there and find the error message in there and share it here. (In a spoiler like I did with the code)
- 2
-
Try something like:
while {true} do { { if (_x getVariable ["damage_modifier_EH_applies", false]) then {continue;}; _x addEventhandler ["HandleDamage", { /*Add your eventhandler code here*/ }]; _x setVariable ["damage_modifier_EH_applies", true]; uiSleep 0.1; } forEach allUnits; uiSleep 5; };
Untested
- 2
-
{ private _veh = _x; if (!((getPos _veh) inAreaArray "myMarker")) then {continue;}; if (count crew _veh > 0) then {continue;}; if (({_x distance2d _veh < 10} count allPlayers) != 0) then {continue;}; deleteVehicle _x; } forEach _vehicles
Something like that? Untested
- 1
-
3 hours ago, HartofARMA said:to apply these modifiers globally (to all units starting or spawned in later during a mission) via singleplayer init.sqf script or other mission start script.
How are these units created? Do you spawn them with script, via zeus, ...?
The easiest way to add that EH to all units would be via a while true loop over allUnits that adds it to any unit that doesn't have it yet. The best way to do it would be to create your own function that you call instead of createUnit when your mission wants to create a unit and apply the EH in that function.
- 2
-
-
-
Does it happen on any other servers? Does it happen when playing vanilla? Does it tell you which file has a wrong signature?
-
There's an error in the script TV\Youtube\Scripts\action1.sqf contains:
tv setobjecttextureglobal [0,"TV\Youtube\Videos\action1.ogv"]; ["TV\Youtube\Videos\action1.ogv",[10,10]] spawn bis_fnc_playvideo; [/code] tv say3D 'bip';
that [/code] needs to be removed.
-
Could you share the code you're using? It looks like you've copied some BB code from the error message.
- 1
-
_hospitals = (nearestObjects [_target, ["C_Van_02_medevac_F"], 10] ); if (count _hospitals < 1) exitwith {hint "You are not at hospital."}; _hospital = _hospitals select 0; hint format ["%1", _hospital]; sleep 10; if (isNull _hospital) exitwith {hint "You are not at hospital."};
Something like this might work? Untested
-
Have you verified your game files? (steam, right click on arma, properties, local files, verify integrity)
Does this also happen when you're playing without mods?
-
Others might not be able to fix whatever issue you had on their own. Please don't delete your topic just because you found the fix, share the fix as well.
- 5
-
Spoilerparams ["_center"]; private _towns = nearestLocations [getPos _center,["nameCity","nameVillage","nameLocal"],10000]; private _randomTown = { params ["_list"]; _idx = selectRandom _list; _pos = locationPosition _idx; _mrk = createMarker [text _idx,_pos]; _mrk setMarkerShape "Ellipse"; _mrk setMarkerSize size _idx; _mrk setMarkerColor "ColorRed"; _mrk }; private _randomBuilding = { params ["_pos"]; _buildings = nearestObjects [_pos,["House","Building"],300]; _building = selectRandom _buildings; _buildingPos = getPosASL _building; _mrk = createMarker [str(_buildingPos),_buildingPos]; _mrk setMarkerShape "Ellipse"; _mrk setMarkerSize [10,10]; _mrk setMarkerColor "ColorBlue"; _buildingPos }; for "_i" from 1 to 4 do { private _mrk = [_towns] call _randomTown; for "_j" from 1 to 5 do { private _buildingPos = [getMarkerPos _mrk] call _randomBuilding; private _grp = [_buildingPos,east,(configfile >> "CfgGroups" >> "East" >> "CUP_O_RU" >> "Infantry_Ratnik_Winter" >> "InfSentry")] call BIS_fnc_spawnGroup; [_grp,_buildingPos,300,5,[],true] call lambs_wp_fnc_taskPatrol }; }; true
Untested
Arma 3 SEAL Team helicopter evacuation?
in ARMA 3 - QUESTIONS & ANSWERS
Posted
Pretty sure you could get something like that purely through script, it probably wouldn't look that good though.