Fox261098 Posted January 12, 2016 Share Posted January 12, 2016 How to make a moving object like a train or ship object move to somewhere.Can somone make an example pls..!! Link to comment
killeryoyo Posted January 12, 2016 Share Posted January 12, 2016 local x,y,z = 2096.3, 1721, 12.7 local easing = "OutBounce" local time = 2000 local gate = createObject(980, x,y,z, 0, 0, 63) local marker = createMarker(x,y,z, "cylinder", 12, 0, 0, 0, 0) function moveGate(hitPlayer, matchingDimension) moveObject(gate, time, x+4.9, y+9.6, z, 0, 0, 0, easing) end addEventHandler("onMarkerHit", marker, moveGate) function moveBack() moveObject(gate, time, x, y, z, 0, 0, 0, easing) end addEventHandler("onMarkerLeave", marker, moveBack) This is a example of a moving gate, when the player hits the marker. the object moves. This is the main thing you can use to move a object. moveObject. Good luck. Link to comment
Fox261098 Posted January 12, 2016 Author Share Posted January 12, 2016 local gate = createObject(980, x,y,z,rx,ry,rz) local marker = createMarker(x,y,z, "cylinder", 12, 0, 0, 0, 0) function moveGate() moveObject(gate, 3000,x,y,z) end addEventHandler("onMarkerHit", marker, moveGate) local gang = getElementData(player, "gang") or false; if (gang ~= false and gang == "The Gang Name") then end end) function moveBack() moveObject(gate, 3000,x, y, z,) end addEventHandler("onMarkerLeave", marker, moveBack) this is for dayz will it work too= 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