I am looking to open a car door in my flowgraph project but no idea how to get the door and set it to open? I cant find any nodes for it and tried to use the vehicle editor to try and find out what LUA I could call to do it but closest thing I found was ``` ui.inputActions.moonhawk.doorLatch_L.title ``` but not sure how to set it to OPEN. Better yet. I would like the command that's used when a player clicks on the car door handle as that also adds some force to swing the door open. I can use the "Vehicle Custom Lua" node but need to know the commands.
This is a single line command to open all doors: Code: for k,v in pairs(controller.getControllersByType("advancedCouplerControl")) do if string.find(v.name, "door") then v.detachGroup() end end If you want to see what kind of couplers the car has use this in console: Code: for k,v in pairs(controller.getControllersByType("advancedCouplerControl")) do print(v.name) end If you want to open only a specific door you can use this when you know the name: Code: controller.getController("doorFLCoupler").detachGroup() Keep in mind that some cars may use different names for couplers so it might not work for all cars, for example the Piccolina: In this case you should use the first function and add string.find calls to look for multiple names, like this: Code: for k,v in pairs(controller.getControllersByType("advancedCouplerControl")) do if (string.find(v.name, "doorFL") or string.find(v.name, "doorL")) then v.detachGroup() end end
Just to update this WORKS! You can use the 'Custom Vehicle LUA node' in flowgraph to trigger this code.
just wanted to add, if you want to open then CLOSE a door, you can use; Code: controller.getController("Car_Hinge_Name").toggleGroup() This is like interacting with a door in walking mode.