Jump to content

Moving Gate. Help!


Phoenixx

Recommended Posts

function createTheGate () 
    gate1 = createObject ( Object ID, x, y, z ) 
    gate2 = createObject ( Objecy ID, x, y, z ) --use rotx roty rotz after the z ex createObject( 986, 234, 11, 1, 90, 180, 0 ) 
end 
addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) 
  
function openMyGate ( ) 
   moveObject ( gate1, Object ID, x, y, z ) 
   moveObject ( gate2, Object ID, x, y, z ) 
       setTimer ( movingMyGateBack, seconds, 1 ) 
end 
addCommandHandler("password",openMyGate) 
  
function movingMyGateBack () 
   moveObject ( gate1, Object ID, x, y, z ) 
   moveObject ( gate2, Object ID, x, y, z ) 
end 

Link to comment

Look i already have downloaded map , so I want create map like that .

Content of Map:

Source is in zip, inside it :

corparation.map;

client.lua :

function createThelift ()

mylift = createObject ( 3095, -2027.8459, 157.1302, 82.555, 0, 0, 0 )

end

addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createThelift )

function openMylift ()

moveObject ( mylift, 8000, -2027.8459, 157.1302, 32.1, 0, 0, 0 )

end

addCommandHandler("liftgodown555",openMylift)

function movingMyliftBack ()

moveObject ( mylift, 8000, -2027.8459, 157.1302, 82.555, 0, 0, 0 )

end

addCommandHandler("liftgoup555",movingMyliftBack)

function createTheGate1 ()

myGate1 = createObject ( 980, -2016.75, 176.81, 29.47, 0, 0, 90 )

end

addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate1 )

function openMyGate1 ()

moveObject ( myGate1, 3000, -2016.75, 165, 29.47, 0, 0, 0 )

end

addCommandHandler("openbase555",openMyGate1)

function movingMyGateBack1 ()

moveObject ( myGate1, 3000, -2016.75, 176.81, 29.47, 0, 0, 0 )

end

addCommandHandler("closebase555",movingMyGateBack1)

AND META.XML

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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