Jump to content

mantls

Member
  • Content Count

    330
  • Joined

  • Last visited

  • Medals

Everything posted by mantls

  1. Once again you're right. Just too used to scripts and i believe it minimizes traffic, not sure though.
  2. 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?
  3. 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"]; };
  4. mantls

    Tanks

    sooooo true.
  5. _unit addAction ["[u]MyAction[/u]", "[u]Myscript[/u].sqf/[u]MyCode[/u]", [], 0, false, true, "", "(_target distance _this) < [u]myDistance[/u]"]; There you go.
  6. mantls

    Action Menu - must do better

    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.
  7. 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?
  8. mantls

    RH wip Thread

    That M16 looks Sweet! I just hope it's sound will either be good or one of the BIS sounds...
  9. 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.
  10. mantls

    JIP and AddAction

    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
  11. mantls

    JIP and AddAction

    That last bit of code is basically what i did, justwith the (!isNull player) check, right?
  12. mantls

    JIP and AddAction

    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.
  13. mantls

    Clean up Script

    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
  14. mantls

    MK18 Mod 1

    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...].
  15. 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{};
  16. mantls

    Clean up Script

    Afaik, No. Works both ways but maybe only on the Server would be safer due to JIPs etc.
  17. mantls

    Clean up Script

    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!
  18. Hey, have to say im really digging the textures. Are you planning on retexturing the Indipendent Gear aswell? Edit: Just read it, oops.
  19. 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; };
  20. could you post your complete code?
  21. mantls

    New Shemaghs

    Oh yeah, that'd be great! Anyway, they look awesome and i can't wait for the release! Are they going to be signed?
  22. mantls

    Clean up Script

    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.
  23. mantls

    JIP build array

    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; };
  24. mantls

    A3B Countermeasures Fix

    If only it'd be signed! :)
×