Jump to content

[HELP] Move gate


Recommended Posts

i am going to help you a little bit not give you the full script

this should help you

function createTheGate () 
  
         Thegat = createObject ( gateid, x, y, z, rx, ry, rz ) --here are the original cordinates when gate is closed,which creat the gate 
  
  
      end 
  
      addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) --this means when you start the resource the gate will be created 
  
  
  
  
  
 function openMyGate ( ) 
 moveObject ( Thegate, 2500, x, y, z ) -- the command open 
 end 
 addCommandHandler("youchose",openMyGate) -- the command that opens 
  
  
 function closeMyGate () 
 moveObject ( Thegat, 2500, x, y, z ) --the original coordinats  
 end 
 addCommandHandler("youchose2",closeMyGate) --the command that closes 

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