Jump to content

Move object


SkatCh

Recommended Posts

local obj = createObject ( 1272, 0, 0, 0 ) 
  
function makeRotate ( ) 
    local x,y,z = getElementPosition ( obj ) 
    moveObject ( obj, 1000, x, y, z, 0, 0, 360 ) 
end 
setTimer ( makeRotate, 1000, 0 ) 

I recommand you to put it clientside, because serverside will cause lagg if you have a lot of objects to rotate.

Link to comment
local obj = createObject ( 1272, 0, 0, 0 ) 
  
function makeRotate ( ) 
    local x,y,z = getElementPosition ( obj ) 
    moveObject ( obj, 1000, x, y, z, 0, 0, 360 ) 
end 
setTimer ( makeRotate, 1000, 0 ) 

I recommand you to put it clientside, because serverside will cause lagg if you have a lot of objects to rotate.

Timers aren't really a great thing to use... I'd recommend using onClientPreRender, and besides that, the makeRotate function is doing absolutely nothing...

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...