-
Content Count
330 -
Joined
-
Last visited
-
Medals
Everything posted by mantls
-
Creating a custom action in scroll menu
mantls replied to padarom's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I was in no way offended :) -
Creating a custom action in scroll menu
mantls replied to padarom's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Once again you're right. Just too used to scripts and i believe it minimizes traffic, not sure though. -
setVelocityModelSpace & ragdoll unit
mantls replied to zooloo75's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I can only upvote this! especially the ragDoll command is something i would have expected to be in by now! Did you already open a ticket? -
Counter / Variable in addAction name
mantls replied to lexx's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Define a Variable in your init.sqf Init.sqf Actionsleft = 3; and then have something like yourAction.sqf [[color="#FF0000"]your Code...][/color] player removeAction [color="#FF0000"]yourAction[/color]; Actionsleft = Actionsleft -1; if (Actionsleft > 0) then { [color="#FF0000"]YourAction [/color]= player addAction ["[color="#FF0000"]YourAction[/color]", "[color="#FF0000"]YourAction[/color].sqf"]; }; -
Creating a custom action in scroll menu
mantls replied to padarom's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_unit addAction ["[u]MyAction[/u]", "[u]Myscript[/u].sqf/[u]MyCode[/u]", [], 0, false, true, "", "(_target distance _this) < [u]myDistance[/u]"]; There you go. -
Not a fan of Rose menus, they're basically the same as that scroll menu, just prettier and more limited in the amount of Actions supported. I think that ACE's approach was right, seperating Self Interaction from World Interaction with several mini menus (selfaction > explosives > place satchel, for example). That would be a rather small change that could save many lives and explosives aswell as improve overall Gameplay.
-
Advice on my bail-out script
mantls replied to kahna's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I have similar Script running on our Public Server running right now, without all the Fancy lights etc though also i'm using "nonSteerable_Parachute_F". If you land on a steep hill however you might end up hangin there slowly "sliding" down the hill. So i might add something in like. waitUntil {((getPosATL player select 2) < 2)}; sleep 2; MoveOut player; also how is the script called? via an AddAction? -
That M16 looks Sweet! I just hope it's sound will either be good or one of the BIS sounds...
-
Hey there, I'm having some problems with AddActions assigned to JIP's. I have tried several things: if (local player) then { player addeventhandler ["Respawn", { player addaction [("<t color=""#ED2744"">") + ("Paradrop") + "</t>", "NSS\ParaScript\Paradrop.sqf", "", 1, false, true,"", "((vehicle player) iskindof ""Air"") && (((position player) select 2) > 20)"]; }]; player addaction [("<t color=""#ED2744"">") + ("Paradrop") + "</t>", "NSS\ParaScript\Paradrop.sqf", "", 1, false, true,"", "((vehicle player) iskindof ""Air"") && (((position player) select 2) > 20)"]; }; works, but as expected not for JIPs para = { if (local player) then { player addeventhandler ["Respawn", { player addaction [("<t color=""#ED2744"">") + ("Paradrop") + "</t>", "NSS\ParaScript\Paradrop.sqf", "", 1, false, true,"", "((vehicle player) iskindof ""Air"") && (((position player) select 2) > 20)"]; }]; player addaction [("<t color=""#ED2744"">") + ("Paradrop") + "</t>", "NSS\ParaScript\Paradrop.sqf", "", 1, false, true,"", "((vehicle player) iskindof ""Air"") && (((position player) select 2) > 20)"]; }; }; [[],"para",true,true] spawn bis_fnc_mp; works for JIPs but creates some strange bugs, the AddAction is displayed several times and i believe that stacks up with playercounts. I've used bis_fnc_mp in another script where it works perfectly, though in that script the addActions were assigned to Objects instead of players. :'( Any Help is much appreciated, cheers.
-
it wasn't, was a seperate File i called from the init.sqf. Anyway that seems to have fixed it! Thank you very much, just learned something for the Future. cheers
-
That last bit of code is basically what i did, justwith the (!isNull player) check, right?
-
Could you give me an example on that? And yeah i guess the script runs several times, since it gets executed for every JIP i believe.
-
You'd probably hae to add another condition to if (not alive _x) then {_notalive = _notalive + [_x]}; } forEach _newworld; You need an Array with VarNames that servers as a Blacklist. private ["_delcode", "_currentworld", "_oldworld", "_newworld", "_notalive"]; [color="#FF0000"]_blacklist[/color] = [] _delcode = { private ["_crew"]; sleep 300; { if (not isNull _x) then { if (_x isKindOf "Ship" or _x isKindOf "Air" or _x isKindOf "LandVehicle") then { _crew = nearestObjects [_x, ["Man"], 20]; _crew = _crew + crew _x; deleteVehicle _x; { if (not alive _x) then {deleteVehicle _x}; } forEach _crew; } else { deleteVehicle _x; }; }; } forEach _this; }; _currentworld = []; while {true} do { sleep 3; _oldworld = _currentworld; _currentworld = + list wholeworld; _newworld = _oldworld - _currentworld; _notalive = []; { if (not alive _x && _x !in _[color="#FF0000"]blacklist[/color]) then {_notalive = _notalive + [_x]}; } forEach _newworld; if (count _notalive > 0) then {_notalive spawn _delcode}; try this, not sure if it works as I've just written this on the fly. cheers
-
Frist off, you should ask in the correct post! Second, make sure your that the contents of the download are stored like this Steam\Steamapps\Common\ArmA 3\@MK18_Mod1\addons\[stuff...].
-
How can I make this timer hint global?
mantls replied to clydefrog's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hm, and if you put the check inside the loop? _timeleft = 300; while {_timeleft > 0} do { hintsilent format ["Charge Explode in :%1", [((_timeleft)/60)+.01,"HH:MM"] call bis_fnc_timetostring]; if (disarm) exitWith{}; if (_timeleft < 1) exitWith{}; _timeleft = _timeleft -1; if (_timeleft <= 0) then { "M_Mo_82mm_AT" createvehicle getpos _object; {_x setdamage 1} foreach crew _object + [_object]; deleteVehicle _object; }; sleep 1; }; if (disarm) exitWith{}; -
Afaik, No. Works both ways but maybe only on the Server would be safer due to JIPs etc.
-
This is the one from Invade & Annex. clearBodies.sqf private ["_canDeleteGroup","_group","_groups","_units"]; while {true} do { sleep 60; debugMessage = "Cleaning dead bodies and deleting groups..."; publicVariable "debugMessage"; { deleteVehicle _x; } forEach allDead; debugMessage = "Dead bodies deleted."; publicVariable "debugMessage"; _groups = allGroups; for "_c" from 0 to ((count _groups) - 1) do { _canDeleteGroup = true; _group = (_groups select _c); if (!isNull _group) then { _units = (units _group); { if (alive _x) then { _canDeleteGroup = false; }; } forEach _units; }; if (_canDeleteGroup && !isNull _group) then { deleteGroup _group; }; }; debugMessage = "Empty groups deleted."; publicVariable "debugMessage"; }; Another good one is this one: cleanup.sqf private ["_delcode", "_currentworld", "_oldworld", "_newworld", "_notalive"]; _delcode = { private ["_crew"]; sleep 300; { if (not isNull _x) then { if (_x isKindOf "Ship" or _x isKindOf "Air" or _x isKindOf "LandVehicle") then { _crew = nearestObjects [_x, ["Man"], 20]; _crew = _crew + crew _x; deleteVehicle _x; { if (not alive _x) then {deleteVehicle _x}; } forEach _crew; } else { deleteVehicle _x; }; }; } forEach _this; }; _currentworld = []; while {true} do { sleep 3; _oldworld = _currentworld; _currentworld = + list wholeworld; _newworld = _oldworld - _currentworld; _notalive = []; { if (not alive _x) then {_notalive = _notalive + [_x]}; } forEach _newworld; if (count _notalive > 0) then {_notalive spawn _delcode}; }; NOTE: This one needs you to place a trigger called "wholeworld" down in your mission, set it as big as you want keep in mind that only units in this trigger will be deleted! I usually have it set as a Rectangle that covers the whole Map. cheers!
-
US Army & USMC Infantry Textures
mantls replied to sabre's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Hey, have to say im really digging the textures. Are you planning on retexturing the Indipendent Gear aswell? Edit: Just read it, oops. -
How can I make this timer hint global?
mantls replied to clydefrog's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What about: _timeleft = 300; while {_timeleft > 0} do { hintsilent format ["Charge Explode in :%1", [((_timeleft)/60)+.01,"HH:MM"] call bis_fnc_timetostring]; if (disarm) exitWith{}; if (_timeleft < 1) exitWith{}; _timeleft = _timeleft -1; sleep 1; }; if (disarm) exitWith{}; if (_timeleft <= 0) then { "M_Mo_82mm_AT" createvehicle getpos _object; {_x setdamage 1} foreach crew _object + [_object]; deleteVehicle _object; }; -
How can I make this timer hint global?
mantls replied to clydefrog's topic in ARMA 3 - MISSION EDITING & SCRIPTING
could you post your complete code? -
Oh yeah, that'd be great! Anyway, they look awesome and i can't wait for the release! Are they going to be signed?
-
The Invade & Annex Mission has 2 cleanup scripts running, 1 for Units and 1 for Items you should take a look at them. EDIT: Ok, looked it up. clearItems.sqf (from Rareks Invade & Annex) private ["_itemsToClear","_obj","_rad","_delay"]; _obj = getMarkerPos "respawn_west"; // get spawn - might as well _rad = 150; // radius outwards from center point to clear items. _delay = 120; // amount of time in-between clean-ups while {true} do { sleep _delay; debugMessage = "Clearing items from spawn..."; publicVariable "debugMessage"; [color="#FF0000"]_itemsToClear = nearestObjects [_obj,["weaponholder"],_rad]; { deleteVehicle _x; } forEach _itemsToClear;[/color] debugMessage = "Items cleared."; publicVariable "debugMessage"; }; I've marked the important bit for you. That should help you.
-
Are you sure that it's the Array that is not synced? Maybe test'em with a Hint. Im doing something similar in a mission of mine. However if i recall correctly forEach didn't work like i wanted it to. This is what i've done: _grids = _this select 0; _amount = count _grids; _counter = 0; while {_counter < _amount + 1} do { _mark = _grids select _counter; _mark setMarkerAlpha 0; _counter = _counter + 1; };
-
If only it'd be signed! :)