Edgarsnorajona Posted March 31, 2010 Share Posted March 31, 2010 How can i create moving objects in my DD map like a lift? Can someone give me a example please? Link to comment
lukkie[BE] Posted March 31, 2010 Share Posted March 31, 2010 BUMP I also want to know that If please someone can take the time, I know how to add a lua script, but giving an example script with a bit of information would be pleased Link to comment
Jason_Gregory Posted March 31, 2010 Share Posted March 31, 2010 You can create a Serverside Script with the "moveObject" Function. https://wiki.multitheftauto.com/wiki/MoveObject But i think theres a Way to move Objects without creating a Script, i´ve seen a Tutorial before but i dont remember where Heres a Video for rotation Objects http://www.xiii-mta.nl/index.php?topic=1228.0 Link to comment
lukkie[BE] Posted March 31, 2010 Share Posted March 31, 2010 Thats an interresting tutorial, but you cant adjust the speed and is only for horizontal rotating But still thanks. Link to comment
Edgarsnorajona Posted April 1, 2010 Author Share Posted April 1, 2010 Can someone show the line that was like you put in your map file? Link to comment
eAi Posted April 1, 2010 Share Posted April 1, 2010 You can adjust the speed by setting 'time'. Link to comment
lukkie[BE] Posted April 2, 2010 Share Posted April 2, 2010 So I only have to include a script in the .zip So Questions: How is it called when my map is called i.e. "race-LukkieMap" How would the script be when I have 2 objects to rotate? I only have to enter bool moveObject ( object theObject, int time, float targetx, float targety, float targetz) and make it to bool moveObject ( object <object name>, int 2000, float 500, float 800, float 70) or simply moveObject (<object name>, 2000, 500, 800, 70) and nothing above or under it? And does it return automatically? Too many questions I know but I really want to know it Link to comment
dzek (varez) Posted April 2, 2010 Share Posted April 2, 2010 last one you have to create object via script, or at least get your object from the game, which probably be harder to do for you.. and if you need object moving more than once, you need few lines of script, not just once.. search, there was another topic like that few days ago Link to comment
lukkie[BE] Posted April 2, 2010 Share Posted April 2, 2010 (edited) I guess this will work Only I still need an interval to make a life return. Objectname123 = createObject(3458, -2464.9296875, 1522.9167480459, 6.1990437507629) moveObject(Objectname123, 4000, -2464.9296875, 1522.9167480469, 27.570457458496) end Edited April 3, 2010 by Guest Link to comment
dzek (varez) Posted April 3, 2010 Share Posted April 3, 2010 get MTA Script Editor, it will catch some of your errors (syntax errors).. in that 3 lines script, "end" is not needed.. you shold "end" loops, functions, etc Link to comment
lukkie[BE] Posted April 3, 2010 Share Posted April 3, 2010 Is this the right code? function ClientStarted () setSkyGradient( 255, 0, 0, 255, 0, 0) end function ObjectsRotateStart () moveObject(rotate1, 10000, -4475.867188, -2251.131836, 494.547363, 0, 180, 0) moveObject(rotate2, 10000, -4475.867188, -2251.131836, 494.547363, 0, 180, 0) end setTimer(ObjectsRotateStart, 10000, 0) addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ClientStarted ) addEventHandler( "onClientResourceStart", getResourceRootElement(getThisResource()), ObjectsRotateStart ) 2 objects with the id rotate1 and rotate2 will be rotating 360 degrees in 20 seconds; right? Link to comment
dzek (varez) Posted April 3, 2010 Share Posted April 3, 2010 if rotate1 and rotate1 is defined, all should be ok, i didnt test it, did you? just test it:) Link to comment
lukkie[BE] Posted April 3, 2010 Share Posted April 3, 2010 I am unable to test it since I always get errors: Failed to load editor_test Changing to a random map Failed to load race-Strangersv2-lukkie 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