Jump to content

Help Script commands to open doors


ander17

Recommended Posts

  
yourGatesName = createObject ( Object id, x, y, z, rotX, rotY, rotZ) 
  
[color=#0040FF][b]function[/b][/color] openGate (source) 
        [color=#FF0000][b]moveObject[/b][/color] (yourGatesName, int time, new pos X, new pos Y, new pos Z)   -- example time = 3500, and the coordinates where you want the object to end up 
       [color=#FF0000][b]outputChatBox[/b][/color] ("You opened your gate!" source, 255, 255, 255) --optional, but its my habit to see if the function was made right 
[color=#0040FF][b]end[/b][/color] 
addCommandHandler ("open", openGate ) -- OR doors? 
  

for automatic gates

  
[color=#0040FF][b]local[/b][/color] firstGateMarker = createMarker  ( x, y, z, "corona", size, R, G, B, Alpha ) --Outside the door 
[color=#0040FF][b]local[/b][/color] secondGateMarker = createMarker ( x, y, z, "corona", size, R, G, B, Alpha ) -- Inside the door 
yourGatesName = createObject ( Object id, x, y, z, rotX, rotY, rotZ) 
[color=#0040FF][b]function[/b][/color] 
[color=#FF0000][b]moveObject[/b][/color] (yourGatesName, int time, new pos X, new pos Y, new pos Z)  
[color=#0040FF][b]end[/b][/color] 
addEventHandler( "onMarkerHit", firstGateMarker, yourGatesName) 
addEventHandler( "onMarkerHit", secondGateMarker, yourGatesName ) 
  
  

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