LCpl N. Harrison
Member-
Content Count
5 -
Joined
-
Last visited
-
Medals
Community Reputation
11 GoodAbout LCpl N. Harrison
-
Rank
Rookie
-
Help Adding Event Handler (Solved)
LCpl N. Harrison replied to LCpl N. Harrison's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I managed to fix it last night, forgot to reply this morning. I ended up moving the event handler code to its own variable, and spawning the variable from inside of the main variable. This fixed the locality issue (somehow, frankly I don't understand why). -
Help Adding Event Handler (Solved)
LCpl N. Harrison replied to LCpl N. Harrison's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Regrettably it didn't work, even in the editor. -
Help Adding Event Handler (Solved)
LCpl N. Harrison replied to LCpl N. Harrison's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the reply! I actually tried that initially, but my understanding was that it only worked for tracked/wheeled vehicles, which seemed to be the case when I tried it myself. I did not, however, try disabling FSM, as that page suggests. Do you know for sure that it works on boats? -
LCpl N. Harrison started following Help Adding Event Handler (Solved)
-
Help Adding Event Handler (Solved)
LCpl N. Harrison posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Really at a loss here, probably should've asked sooner. Thank you in advance to anyone who helps. So, I'm trying to spawn a boat in via a function executed from a server-side addon, and prevent the AI inside from dismounting when the vehicle is disabled. While I am aware this is the Mission Editing board, I felt my issue sorta spans both mission editing and addon editing, so I just picked one. After some experimentation and research, I decided the best method for this would be to add a "GetOut" event handler that moves the dismounting unit back into the boat. Here is the method I am using to spawn (and lock) the boat: _boatModel = selectRandom(getArray(_eventSetting >> "pe_boatClasses")); _boat = createVehicle[_boatModel, _pos]; _boat lock true; It works perfectly fine, I just wanted to provide it for reference. As for the event handler: _boat addEventHandler ["GetOut", { private _veh = _this select 0; private _seat = _this select 1; private _unit = _this select 2; if (_seat isEqualTo "driver") then { _unit moveInDriver _veh; } else { _unit moveInCargo _veh; }; }]; They are in the same scope, so referencing _boat should not be an issue, and the actual process of moving units back into the boat when they dismount works when I add it into the init of a vehicle in the editor. I am guessing there is a locality issue I am not completely able to wrap my head around here, because I see on the biki that "It can be assigned to a remote vehicle but will only fire on the PC where the actual addEventHandler command was executed." My issue I haven't work much with event handlers before, and certainly haven't ever tried to use them in a server-only addon, so I am hoping someone will be able to point me in the right direction here. -
Tophe's Arma Dedicated Server Tool (TADST)
LCpl N. Harrison replied to tophe's topic in ARMA 3 - SERVERS & ADMINISTRATION
How did you get it working?