So I found this callback in beamstate.lua, and need help deciphering it: Code: Original: obj:attachCoupler(val.cid, val.couplerTag or '', val.couplerStrength or 1000000, val.couplerRadius or 0.2, val.couplerTargets or 0) Mine: obj:attachCoupler('IntTruck', 'IntTrailer', 1000000, 0.2, 0) I'm pretty sure I have the wrong arguments, but it isn't crashing the game, so that's a plus. EDIT: The correct syntax would be: Code: obj:attachCoupler(val.couplerID (numerical), val.couplerTag (string), val.couplerStrength, val.couplerRadius, val.couplerTargets) So this would be a correct function: Code: obj:attachCoupler(243, '', 1000000, 0.2, 0) Thanks to @thomatoes50 for the clarification.
val.cid is an integer You can find the id by looping over nodes Code: for k,v in pairs(v.data.nodes) do if v.name == 'IntTruck' then --do end end