Hey, have been trying to figure out how to set this up for hours. Could I ask for someone who know how to write a lua script for some help? I have been copying and pasting different lua commands into the triggerbox window, but I`m flying blind here. I have been trying the commands with (data) (kdata) and (tdata) Have no idea what it does. I have no idea what the Parkingbrake command is, (how to toggle the parkingbrake) have been looking around the lua folder in the game folder. If anyone that know the script would post the code here I would be very grateful.
Thank you, but where do I add that to the trigger box window? I tried different things, but none of them worked. did I say I have no coding experience Code: local function handbrake(data) if data.event == 'enter' and data.triggerName == 'handbrake' then be:input.toggleEvent('parkingbrake') end end handbrake Code: local function handbrake(tdata) be:getObjectByID(tdata.subjectID):queueLuaCommand('input.toggleEvent('parkingbrake')') end handbrake Code: local function handbrake(tdata) be:getObjectByID(tdata.subjectID):input.toggleEvent('parkingbrake') end handbrake
You're welcome, tbh I don't really know about any trigger box window, is that map related maybe ? Nope, heheh So, as I don't know where you are writing your function all I can say is that I tried the handbrake event by editing the pickup trigger for the tailgate by simply replacing the openDoor event by the handbrake event and that worked. So clicking the tailgate trigger acted upon the handbrake The trigger code for pickup tailgate is in the pickup_tailgate jbeam file. But again, I don't have map (map trigger) modding experience.
Yes it is in the map editor. you add the lua trigger box to your map, and add the script in the lua window.