Jump to content

Moving gate.


razvan2299

Recommended Posts

gate = createObject(980, x, y, z, rx, ry, rz)-- 980 is the object number, x the x-coordinate, y-coordinate, z-coordinate, rx,ry,rz are the rotations. 
  
function gateOpen() 
moveObject( gate, 2000, x, y, z )-- gate is the object which we want to move, 2000 is the time the gate needs to move to the new coordinates. x,y,z are the coordinates where the gate should move . 
end 
addCommandHandler("gateo", gateOpen)--Command /gateo to open the gate 
  
function gateClose() 
moveObject( gate, 2000, x, y, z )--again the same thing just type here the x,y,z from above. so the gate gets where it was at the beginning. 
end 
addCommandHandler("gatec", gateClose)--Command /gatec to close the gate 

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