NovaCrew Posted December 25, 2022 Share Posted December 25, 2022 Is there a way to attach a moving object to a vehicle? For example a ramp that will move up and/or down when you press a button. Link to comment
waves Posted December 25, 2022 Share Posted December 25, 2022 https://wiki.multitheftauto.com/wiki/AttachTrailerToVehicle Do you mean this? Link to comment
AngelAlpha Posted December 25, 2022 Share Posted December 25, 2022 (edited) Use attachElements and then setElementAttachedOffsets with render event Edited December 25, 2022 by AngelAlpha Link to comment
Trust aka Tiffergan Posted December 30, 2022 Share Posted December 30, 2022 To do this, you will need to use the attachElements Here is an example of how you can use the attachElements function to attach a ramp to a vehicle: local ramp = createObject(1239, 0, 0, 0) -- Create the ramp object local vehicle = createVehicle(400, 0, 0, 0) -- Create the vehicle attachElements(ramp, vehicle, 0, 2, -1) -- Attach the ramp to the vehicle Link to comment
TMTMTL Posted December 30, 2022 Share Posted December 30, 2022 Hi. This can be done using timers, attachElements and setElementAttachedOffsets. Here's an example of mine: - TM 3 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now