Jump to content

Moving Gate for Race


Recommended Posts

So you want a gate which moves every once and awhile?

-- Settings 
gPosX = 1225.944 -- Gate Position X 
gPosY = 1000 -- Gate Position Y 
gPosZ = 1000 -- Gate Position Z 
gRotX = 0 -- Gate Rotation X 
gRotY = 0 -- Gate Rotation Y 
gRotZ = 0 -- Gate Rotation Z 
gateSpeed = 1000 -- How long it takes the gate to move from point A to point B 
gateID = 969 
  
-- Defaults 
gate = createObject(gateID, gPosX, gPosY, gPosZ, gRotX, gRotY, gRotZ) 
  
setTimer( 
function() 
    moveObject(gate, gateSpeed-100, gPosX, gPosY, gPosZ+4) 
    setTimer(moveObject, gateSpeed+1000, 1, gate, gateSpeed-100, gPosX, gPosY, gPosZ) 
end, gateSpeed+1000, 0) 

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...