nimrod_z
Member-
Content Count
297 -
Joined
-
Last visited
-
Medals
Everything posted by nimrod_z
-
Help Debug on a hideobject script.
nimrod_z replied to Vegatry's topic in ARMA 3 - MISSION EDITING & SCRIPTING
your error with switch is they are all missing : example case "dum1" : { { _x enableSimulation false; _x hideObject true; } forEach _dummygroup1; }; -
Multiplayer Dedicate Message
nimrod_z replied to Doodle's topic in ARMA 3 - MISSION EDITING & SCRIPTING
like I said, it was just an example :) if this is the actual script that is called from the addaction then your issue is if (!isServer) exitwith {}; that means only the server can use the addaction and that's not to likely on a dedicated server :) additional edit: if you ONLY want the server to create these items you could again put the script stuff that spawns the items into a function and use the BIS_fnc_MP again but this time set it to only execute on the server. (remember the previous 1 was only for clients).. spawnMorters = { _mortor2tuf = "Chemlight_green" createVehicle (position s5); _mortor2tuf setDir 0; waitUntil {!isNil {_mortor2tuf}}; _mortor2tufe = createVehicle ["SmokeShellGreen", getPos s5, [],1,"NONE"]; _mortor2tufe setDir 0; waitUntil {!isNil {_mortor2tufe}}; _mortor2tuff = "B_Mortar_01_F" createVehicle (position s5); _mortor2tuff setDir 180; waitUntil {!isNil {_mortor2tuff}}; }; now your script that action calls would look like this //nul = execVM "spawn_mortor1.sqf"; //Spawn Mortor playsound "drill"; // execute message to all clients [[],"sendMessage",true,false] call BIS_fnc_MP; // call server to spawn objects [[],"spawnMorters",false,false] call BIS_fnc_MP; -
wow, that's crazy bud.. never seen that before. I even tried to replicate what you showed with no luck at all by spawning big pile of items all on 1 holder _holder = createVehicle ["GroundWeaponHolder", position player, [], 0.5, "CAN_COLLIDE"]; _holder addMagazineCargoGlobal ["7Rnd_408_Mag",1]; _holder addMagazineCargoGlobal ["9Rnd_45ACP_Mag",1]; _holder addMagazineCargoGlobal ["Chemlight_blue",1]; _holder addMagazineCargoGlobal ["SmokeShell",1]; _holder addMagazineCargoGlobal ["HandGrenade",1]; _holder addMagazineCargoGlobal ["6Rnd_45ACP_Cylinder",1]; _holder addWeaponCargoGlobal ["srifle_EBR_MRCO_pointer_F", 1]; _holder addBackpackCargoGlobal ["B_FieldPack_oucamo", 1]; _holder addItemCargoGlobal ["V_PlateCarrierL_CTRG",1]; but it just has the inventory option and shows all listed items. I even tried spawning several items on top of each over each with there own wepholder and you could only pickup and see them one at a time but not the list like you show with multiple take actions. the one thing I did notice from your pics is it shows a take action for items that cant be seen for whatever reason. like the one pic had 3 take ammo actions and take ech helmet but pic only shows mags on ground. another pic did same thing only vest was missing and ammo showing. I couldn't replicate that effect as well. curious to know what causes this issue you have..
-
(player in thislist || guy in thislist) && (triggeractivated pasttrigger)
-
there needs to be a small sleep between when animation is freed and player is ordered to move. I just tried this in editor and it worked fine _p= [] spawn {bob enableAi "ANIM"; sleep 0.2; bob doMove (position player)};
-
Having trouble getting a command to run server wide.
nimrod_z replied to yibbachester's topic in ARMA 3 - MISSION EDITING & SCRIPTING
addactions are local effect only. so only the person that used it will have activated the script. but if you use the global versions of the commands to add mags, weps, items, then everyone in your mission will see the items in crate. _truck addWeaponCargoGlobal["M16",5]; _truck addMagazineCargoGlobal ["M16", 5]; _truck addItemCargoGlobal ["optic_ARCO", 10]; -
if you used UNITNAME disableAI "ANIM" to disable the animation you should be able to just re-enable it. UNITNAME enableAI "ANIM"
-
Multiplayer Dedicate Message
nimrod_z replied to Doodle's topic in ARMA 3 - MISSION EDITING & SCRIPTING
the function part (your message stuff) would have to go somewhere where every player would get it, so putting that in init.sqf would be safe bet. then you could just put the BIS_fnc_MP line directly into the script that is called when addaction is activated. I use it all the time like that since addactions are only local effect. using your original post as example //nul = execVM "spawn_mortor1.sqf"; //Spawn Mortor playsound "drill"; // execute message to all clients [[],"sendMessage",true,false] call BIS_fnc_MP; if (!isServer) exitWith {}; _mortor2tuf = "Chemlight_green" createVehicle (position s5); _mortor2tuf setDir 0; sleep 1.0; _mortor2tufe = createVehicle ["SmokeShellGreen", getPos s5, [],1,"NONE"]; _mortor2tufe setDir 0; sleep 1.0; _mortor2tuff = "B_Mortar_01_F" createVehicle (position s5); _mortor2tuff setDir 180; sleep 1.0; if (true) exitWith {}; and in your init.sqf // function to display message sendMessage = { _startuf = "<img size='4' image='icons\mortor1.paa' align='left'/><br/>"; _titletuf = "<t color='#FFFFFF' size='1.2' align='left'><br/>Mortor Support.</t><br/>"; _texttuf = "<t color='#58FA58' size='1.0' align='left'>A member of your sqaud is deploying a Mortor.<br/><br/>It is marked with green smoke and chemlight.</t><br/><br/>"; hintSilent parseText (_startuf + _titletuf + _texttuf); }; -
Multiplayer Dedicate Message
nimrod_z replied to Doodle's topic in ARMA 3 - MISSION EDITING & SCRIPTING
just curious, why jumping thru all the hoops with eventhandlers ? does BIS_fnc_MP not work on dedicated? BIS_fnc_MP was made just for these locality issues. and it makes it really easy to use. here is the parameters for that - just fyi :) Parameter(s): 0: ANY - function params 1: STRING - function name 2 (Optional): BOOL - true to execute on every client, false to execute it on server only OBJECT - the function will be executed only where unit is local [default: everyone] GROUP - the function will be executed only on client who is member of the group SIDE - the function will be executed on all players of the given side NUMBER - the function will be executed only on client with the given ID ARRAY - array of previous data types 3 (Optional): BOOL - true for persistent call (will be called now and for every JIP client) [default: false] with that you could just make a function that has your message then have BIS_fnc_MP execute it to all players. example // function to display message sendMessage = { _startuf = "<img size='4' image='icons\mortor1.paa' align='left'/><br/>"; _titletuf = "<t color='#FFFFFF' size='1.2' align='left'><br/>Mortor Support.</t><br/>"; _texttuf = "<t color='#58FA58' size='1.0' align='left'>A member of your sqaud is deploying a Mortor.<br/><br/>It is marked with green smoke and chemlight.</t><br/><br/>"; hintSilent parseText (_startuf + _titletuf + _texttuf); }; // execute message to all clients [[],"sendMessage",true,false] call BIS_fnc_MP; -
MHQVehicleInit - Vehicle Respawn script
nimrod_z replied to king_richard's topic in ARMA 3 - MISSION EDITING & SCRIPTING
to name it globally you can use missionNameSpace command. _vehicle = _classname createVehicle _vehiclepos; _vehicle setPos _vehiclepos; _vehicle setDir _vehicledir; // name vehicle globally _vehicle SetVehicleVarName _vehName; missionNameSpace setVariable [_vehName, _vehicle]; publicVariable _vehName; -
I've never had this happen as well. in my survival mission I have on average 7500+ items (weaponHolders) all over the map and each 1 has only ever had 1 action since arma 3 has been out. oh, and the shadow thing you mentioned as well has been around for a while. same mission was started in arma2 then when arma 3 came out I ported it over and both have had issues with the shadow of items being seen thru building some times.
-
Changed: Coefficient for walking / idling goats and sheep I know that animals seem to be a priority lately but any chance an AI person will run at full speed when unarmed sometime this year? it's only been like this since early alpha. tickets have been made in tracker and forgotten about and still nothing. currently the AI people only run when they are holding a weapon. simply place a ARMED unit in the editor with a waypoint and speed set to full for waypoint and he sprints at full speed. do the same thing again only removeAllWeapons from the AI and he now slowly jogs. I know its not a complete game breaker and im not on a rant, just wanted to bring this issue up again. civs jogging for cover with no sence of urgency in missions just looks really stupid. especially when the ARMED AI runs circles around them. anyway, thanks for all the hard work and constant updates BI. keep up the good work.
- 5179 replies
-
- branch
- development
-
(and 1 more)
Tagged with:
-
Execute code when unit reloads weapon
nimrod_z replied to AgentRev's topic in ARMA 3 - MISSION EDITING & SCRIPTING
however a player reloads fires this. it detects everything that is linked to reloading. whatever key you have it mapped to and the action menu. UPDATE: looks like I was wrong or it doesn't work with arma3. it doesn't detect reloading thru action menu. just mouse buttons and keys. -
Execute code when unit reloads weapon
nimrod_z replied to AgentRev's topic in ARMA 3 - MISSION EDITING & SCRIPTING
how about using keydown eventhandler and checking for reload action. waitUntil {!(isNull (findDisplay 46))}; menu = (findDisplay 46) displayAddEventHandler ["KeyDown", "if ((_this select 1) in actionKeys ""ReloadMagazine"") then {hint 'reload'}"]; -
Fuel (Gas) Station Disable
nimrod_z replied to DeadWeight85's topic in ARMA 3 - MISSION EDITING & SCRIPTING
you can use this to disable the fueling but I've never noticed a fuel station repair a vehicle.. /* 32 pump locations on altis create triggers on pump locations to disable auto refueling for vehicles. */ VIR_fuelPump_locations = [ [9205.75,12112.2,-0.0487213], [11831.6,14155.9,-0.0342026], [12024.7,15830,-0.0298138], [12026.6,15830.1,-0.0342979], [12028.4,15830,-0.0388718], [9025.78,15729.4,-0.0206451], [9023.75,15729,-0.027153], [9021.82,15728.7,-0.0293427], [16750.9,12513.1,-0.0525188], [6798.15,15561.6,-0.0441475], [6198.83,15081.4,-0.0912437], [14181.6,16549.3,0.00917625], [5023.26,14429.6,-0.0978947], [5019.68,14436.7,-0.0114822], [4001.12,12592.1,-0.0966644], [17417.2,13936.7,-0.10652], [3757.14,13477.9,-0.0540285], [3757.54,13485.9,-0.010498], [16875.2,15469.4,0.0373325], [16871.7,15476.6,0.0102873], [8481.69,18260.7,-0.0266876], [15297.1,17565.9,-0.2838], [14221.4,18302.5,-0.0697174], [15781,17453.2,-0.285282], [19961.3,11454.6,-0.0349312], [19965.1,11447.6,-0.0483704], [5768.99,20085.7,-0.0189667], [21230.4,7116.56,-0.0604248], [20784.8,16665.9,-0.0521202], [20789.6,16672.3,-0.0213318], [23379.4,19799,-0.0544052], [25701.2,21372.6,-0.0774155] ]; //------------------------------------------------------------------------------- { _trg=createTrigger["EmptyDetector",_x]; _trg setTriggerArea[5,5,0,false]; _trg setTriggerActivation["NONE","PRESENT",false]; _trg setTriggerStatements["true", "{if (_x isKindOf 'Land_fs_feed_F') then {_x enableSimulation false; _x allowDamage false}} forEach nearestObjects [thisTrigger,[],10]", ""]; /* _mrk = createMarker [format["%1_fuelpump", floor (random 100000)], _trg]; _mrk setMarkerShape "ICON"; _mrk setMarkerType "hd_dot"; _mrk setMarkerColor "ColorRed"; */ } foreach VIR_fuelPump_locations; here is a function to get any fuel pump location for any map. above code was for altis pump locations. /* put function in init file then execute with: call getFuelpumps; */ getFuelpumps = { _pos = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"); _blds=nearestobjects [_pos,["Land_fs_feed_F"], 20000]; _ary=[]; {_ary=_ary+[getpos _x]} foreach _blds; hint str _ary; copyToClipboard str _ary; };- 1 reply
-
- 2
-
Please help! Supplybox empty
nimrod_z replied to Qbz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
clearWeaponCargoGlobal this; clearMagazineCargoGlobal this; clearItemCargoGlobal this; clearBackpackCargoGlobal this; -
Question and community sharing (Massi Ammo Crate)
nimrod_z replied to legio4777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
here is an example of a scope crate, its just an ammo box that's emptied out from the script then filled with 50 scopes of every type. for what you are trying to do with the addaction is really not needed. even an empty crate still shows the inventory action so you can see inside the empty crate if you wanted. /* to use on ammo crate in editor place this execution line in the ammobox init line in editor and use: _n = [this] execVM "scopeCrate.sqf"; // since it's placed directly in the ammobox init line it knows that [this] referes to the object its in. you can name the crate as well. (if I name the box: wepcrate1) use: _n = [wepcrate1] execVM "scopeCrate.sqf"; to use in a script simply name your ammobox in the editor then use name of box to call script: [wepcrate1] execVM "scopeCrate.sqf"; */ wepItems = [ "acc_pointer_IR", "acc_flashlight", "optic_Aco", "optic_ACO_grn", "optic_ACO_grn_smg", "optic_Aco_smg", "optic_Arco", "optic_Hamr", "optic_Holosight", "optic_Holosight_smg", "optic_MRCO", "optic_SOS", "optic_Nightstalker", "optic_NVS", "optic_tws", "optic_tws_mg", "optic_DMS", "optic_Yorris", "optic_LRPS" ]; _crate = _this select 0; clearWeaponCargoGlobal _crate; clearMagazineCargoGlobal _crate; clearItemCargoGlobal _crate; clearBackpackCargoGlobal _crate; {_crate addItemCargoGlobal [_x,50];} foreach wepItems; notice I refered to the ammo box as _crate (_crate = _this select 0) then everything ammobox related after that is refered to as _crate in the script. now the only other difference in your script compared to mine is I decided to use an array to put in the classnames of the objects,weapons,mags whatever. this was done so you don't have to keep writing the same command over and over again. I also use global versions of the commands to add them to the crate for everyone to see and use from the start. addactions are local effect only and only the person using the script will see your weps being that your only using the local effect command versions as well. -
Question and community sharing (Massi Ammo Crate)
nimrod_z replied to legio4777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
your issue is in the very 1st line _box = _this select 1; clearWeaponCargo _this; clearMagazineCargo _this; clearItemCargo _this; 2 issues, 1st is your first line - it should be _box = _this select 0; 2nd - you told it that the object its suppose to work with is named _box but after that you refer to it as _this it should be refered to as _box all the way down not _this. -
Question and community sharing (Massi Ammo Crate)
nimrod_z replied to legio4777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
just curious why go thru all the addaction and individual script per person to put weapons in a crate? why not just use the global versions of add/remove weapons commands and just put them in the crate from the start for everybody? clearWeaponCargoGlobal clearMagazineCargoGlobal clearItemCargoGlobal clearBackpackCargoGlobal addWeaponCargoGlobal -
IR Strobe deletevehicle issues
nimrod_z replied to jinker's topic in ARMA 3 - MISSION EDITING & SCRIPTING
it's been a while since I tried in a3 but if these are like the glowsticks they cant be detected by nearestobject or entities. we are pretty much stuck with the light source until BI fixes this so we can detect and delete it. (like I said, I havnt had time to try recently so if this isn't the case anymore sorry for the old info) -
Question and community sharing (Massi Ammo Crate)
nimrod_z replied to legio4777's topic in ARMA 3 - MISSION EDITING & SCRIPTING
this addAction["<t color='#00ff00'>Weapons</t>", "this execVM 'AmmoBoxMasi.sqf'"]; -
Simple Vehicle Respawn Script [Arma3]
nimrod_z replied to tophe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I just did. what iceman posted should have worked. im using it that way in 2 scripts that create vehicles then runs the respawn script on them. heres just a snipit of the code I use - _veh = createVehicle [_car, getPos _road, [], 12, "CAN_COLLIDE"]; _veh setDir floor (random 360); _VarName = _vehName; _veh SetVehicleVarName _VarName; // name the vehicle global missionNameSpace setVariable [_vehName, _veh]; publicVariable _vehName; // run respawn script [_veh] execVM "VIR_vehicle_chk.sqf"; the syntax on my respawn is different just because I hardcoded everything for the particular mission. -
Simple Vehicle Respawn Script [Arma3]
nimrod_z replied to tophe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
yep, I saw that 1 but with the way the other is done it cuts out a lot of lines and still has same effect. but ,either 1 works. that's all that matters :) -
Simple Vehicle Respawn Script [Arma3]
nimrod_z replied to tophe's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I see lots of people asking about this script and when will it be fixed. well, it's been fixed for some time actually its just posted in the much earlier pages. the only thing in the script that needed updating was the "setvihicleinit" command stuff. I have always used this excellent script and it works far better then the one BIS has in game. here is a copy of the full script with the update so the init option can be used again. /* ========================================================= Simple Vehicle Respawn Script v1.7 by Tophe of Östgöta Ops [OOPS] Put this in the vehicles init line: veh = [this] execVM "veh_respawn.sqf" Options: There are some optional settings. The format for these are: veh = [this, Delay, Deserted timer, Respawns, Effect, Static] execVM "veh_respawn.sqf" Default respawn delay is 30 seconds, to set a custom respawn delay time, put that in the init as well. Like this: veh = [this, 15] execVM "veh_respawn.sqf" Default respawn time when vehicle is deserted, but not destroyed is 120 seconds. To set a custom timer for this first put the respawn delay, then the deserted vehicle timer. (0 = disabled) Like this: veh = [this, 15, 10] execVM "veh_respawn.sqf" By default the number of respawns is infinite. To set a limit First set the other values then the number of respawns you want (0 = infinite). Like this: veh = [this, 15, 10, 5] execVM "veh_respawn.sqf" By default the vehicle will respawn to the point where it first was when the mission started (static). This can be changed to dynamic. Then the vehicle will respawn to the position where it was destroyed. First set all the other values then set TRUE for dynamic or FALSE for static. Like this: veh = [this, 15, 10, 5, TRUE] execVM "veh_respawn.sqf" If you you want to set the INIT field of the respawned vehicle, first set all other values, then set init commands. Those must be inside quotations. Like this: veh = [this, 15, 10, 5, TRUE, "_this setDammage 0.5"] execVM "veh_respawn.sqf" Default values of all settings are: veh = [this, 30, 120, 0, FALSE] execVM "veh_respawn.sqf" Contact & Bugreport: harlechin@hotmail.com ========================================================= Updated for arma 3 - replaces (setvehicleinit) NOTES: (init) and (name) will only work correctly in MP / these do not work as expected in single player. when using custom (init) for vehicle to respawn with, note the example above - (this) should now be (_this) otherwise it will error in MP. explosion effect removed: because in arma 3 it created a missle that flew across map that impacts vehicle to cause exploision. ========================================================= */ if (!isServer) exitWith {}; // Define variables _unit = _this select 0; _delay = if (count _this > 1) then {_this select 1} else {30}; _deserted = if (count _this > 2) then {_this select 2} else {120}; _respawns = if (count _this > 3) then {_this select 3} else {0}; _dynamic = if (count _this > 4) then {_this select 4} else {false}; _unitinit = if (count _this > 5) then {_this select 5} else {}; _haveinit = if (count _this > 5) then {true} else {false}; _hasname = false; _unitname = vehicleVarName _unit; if (isNil _unitname) then {_hasname = false;} else {_hasname = true;}; _noend = true; _run = true; _rounds = 0; if (_delay < 0) then {_delay = 0}; if (_deserted < 0) then {_deserted = 0}; if (_respawns <= 0) then {_respawns= 0; _noend = true;}; if (_respawns > 0) then {_noend = false}; _dir = getDir _unit; _position = getPosASL _unit; _type = typeOf _unit; _dead = false; _nodelay = false; fnc_setVehicleInit = { private ["_netID","_unit","_unitinit"]; _netID = _this select 0; _unit = objectFromNetID _netID; _unitinit = _this select 1; _unit call compile format ["%1",_unitinit]; }; fnc_setVehicleVarName = { private ["_netID","_unit","_unitname"]; _netID = _this select 0; _unit = objectFromNetID _netID; _unitname = _this select 1; _unit setVehicleVarName _unitname; _unit call compile format ["%1=_This; PublicVariable ""%1""",_unitname]; }; // Start monitoring the vehicle while {_run} do { sleep (2 + random 10); if ((getDammage _unit > 0.8) and ({alive _x} count crew _unit == 0)) then {_dead = true}; // Check if the vehicle is deserted. if (_deserted > 0) then { if ((getPosASL _unit distance _position > 10) and ({alive _x} count crew _unit == 0) and (getDammage _unit < 0.8)) then { _timeout = time + _deserted; sleep 0.1; waitUntil {_timeout < time or !alive _unit or {alive _x} count crew _unit > 0}; if ({alive _x} count crew _unit > 0) then {_dead = false}; if ({alive _x} count crew _unit == 0) then {_dead = true; _nodelay =true}; if !(alive _unit) then {_dead = true; _nodelay = false}; }; }; // Respawn vehicle if (_dead) then { if (_nodelay) then {sleep 0.1; _nodelay = false;} else {sleep _delay;}; if (_dynamic) then {_position = getPosASL _unit; _dir = getDir _unit;}; sleep 0.1; deleteVehicle _unit; sleep 2; _unit = _type createVehicle _position; _unit setPosASL _position; _unit setDir _dir; if (_haveinit) then {[[netID _unit, _unitinit], "fnc_setVehicleInit", true, true] spawn BIS_fnc_MP;}; if (_hasname) then {[[netID _unit, _unitname], "fnc_setVehicleVarName", true, true] spawn BIS_fnc_MP;}; _dead = false; // Check respawn amount if !(_noend) then {_rounds = _rounds + 1}; if ((_rounds == _respawns) and !(_noend)) then {_run = false;}; }; }; and thank you very much Tophe for this great script of yours. -
the damage handlers are especially screwed up. there are several tickets on the feedback tracker from incorrect hit boxes to very strange damage distribution. I actually don't think they have ever worked properly in arma 3 yet. the last 2 dev updates have the damage handler selections reading arms and legs as all body hits, the only exception is the head still returns head hit. also the damage handler im using in a mission doesn't even always return the projectile properly, so the guy that just shot my character didn't actually fire a bullet evidently according to the damagehandler. overall the damage system seems to change daily. even though nothing is actually reported specifically in the changelog. some days are a lot better then others. they did mentioned they were changing the armor system to depend on what the unit is wearing, but so far that damage system has been WAY screwy.