Namorek Posted May 21, 2010 Share Posted May 21, 2010 How Attach Element and MoveObject? Vehicle Attach Corona,Arror,.... move object up and down help me !! Please give me Code! Link to comment
dzek (varez) Posted May 21, 2010 Share Posted May 21, 2010 learn lua? begging us for doing whole script for you wont help i think.. there was a lot of scripts moving objects in two ways here, look in this forum for them.. and just add attach object, and thats all this could help you (click on the function name to get more help) attachElements moveObject Link to comment
Namorek Posted May 21, 2010 Author Share Posted May 21, 2010 learn lua? begging us for doing whole script for you wont help i think..there was a lot of scripts moving objects in two ways here, look in this forum for them.. and just add attach object, and thats all this could help you (click on the function name to get more help) attachElements moveObject Yes Lua bur please give me Code look you my idea http://img339.imageshack.us/img339/604/beztytuuxej.jpg you know?? Link to comment
Dark Dragon Posted May 21, 2010 Share Posted May 21, 2010 i think what you're looking for is setElementAttachedOffsets Link to comment
robhol Posted May 21, 2010 Share Posted May 21, 2010 I think that isn't really gonna help him. How's he supposed to understand a wiki page when he apparently didn't even get the basic gist of varez' post? Link to comment
Namorek Posted May 21, 2010 Author Share Posted May 21, 2010 i think what you're looking for is setElementAttachedOffsets AttachElement is Ok but no Move Object i Please Vehicle>Attach>(Object is MoveObject) Link to comment
Dark Dragon Posted May 21, 2010 Share Posted May 21, 2010 if you want it to move but still be relative to the element it's attached to there is no other way than using setElementAttachedOffsets Link to comment
dzek (varez) Posted May 21, 2010 Share Posted May 21, 2010 1. sit down 2. breath deeply 3. start thinking 4. take some break 5. start thinking again 6. open https://wiki.multitheftauto.com/ and use your FORCE! i dont knw the other ppl point of view, but personally i think it's waste of time to fullfilling requests of lazy ppl Link to comment
karlis Posted May 22, 2010 Share Posted May 22, 2010 lol, varez will be mad, but ill try local x,y,z,object= --offsets and object here function moveUp() setTimer(function() z=z+0.2 setElementAttachedOffsets(object,x,y,z) end,200,40) setTimer(moveDown,8000,1) end function moveDown() setTimer(function() z=z-0.2 setElementAttachedOffsets(object,x,y,z) end,200,40) setTimer(moveUp,8000,1) end just call one of the functions to start the move Link to comment
Namorek Posted May 22, 2010 Author Share Posted May 22, 2010 lol, varez will be mad, but ill try local x,y,z,object= --offsets and object here function moveUp() setTimer(function() z=z+0.2 setElementAttachedOffsets(object,x,y,z) end,200,40) setTimer(moveDown,8000,1) end function moveDown() setTimer(function() z=z-0.2 setElementAttachedOffsets(object,x,y,z) end,200,40) setTimer(moveUp,8000,1) end just call one of the functions to start the move Nice Job but no has Attach Vehicle Link to comment
Pinda Posted May 22, 2010 Share Posted May 22, 2010 do you actually know what to do with that script karlis made for you ? Link to comment
Namorek Posted May 22, 2010 Author Share Posted May 22, 2010 What? I do not know Karlis! Who is he? End of good about it because you do not work and you do not understand about tomorrow removed topic. Link to comment
karlis Posted May 22, 2010 Share Posted May 22, 2010 my god! why you need moving checkpoint if you dont know how to attach objects Link to comment
Namorek Posted May 22, 2010 Author Share Posted May 22, 2010 car = createVehicle(400,0,0,5) marker = createMarker(0,0,0,"ring") offset = 2 max_offset, min_offset = 10, 2 bool = true obnizacz = 0.05 attachElements(marker, car, 0, 0, offset) addEventHandler("onClientRender", getRootElement(), function () if bool then if offset >= max_offset then bool = false else offset = offset + obnizacz end else if offset <= min_offset then bool = true else offset = offset - obnizacz end end setElementAttachedOffsets(marker, 0, 0, offset) end) + local x,y,z,object= --offsets and object here function moveUp() setTimer(function() z=z+0.2 setElementAttachedOffsets(object,x,y,z) end,200,40) setTimer(moveDown,8000,1) end function moveDown() setTimer(function() z=z-0.2 setElementAttachedOffsets(object,x,y,z) end,200,40) setTimer(moveUp,8000,1) end = My Code is good?? But How Attach+Move=..... Help!! Link to comment
karlis Posted May 23, 2010 Share Posted May 23, 2010 1) use the [ lua] [ /lua] tags!really annoying noobs cant get that 2)your code is invalid, the moving speed is depending on fps, and that will cause general unsync and look not the best 3)you still dont get YOU CANT MOVE AN OBJECT WITCH IS ATTACHED 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