Jump to content

Moving Gate


micheal1230

Recommended Posts

Here, try this..

col  = createColTube (-1868.6999511719, -3104.1999511719, 54.900001525879, 10, 3) -- enter your cooderates here for your colshape please note 10 and 3 is to do with the size of the shape. 
root = getRootElement () 
  
othergate1 = createObject ( 2951, -1868.5, -3104.1999511719, 54.700000762939, 0, 0, 318.5) -- enter the ID of the object followed by the coordinates 
                                 -- note the rotx y and z may not be required so you just remove these. x y and z is where you would put your cordinates. 
  
  
function Open ( pla ) 
    if getElementType ( pla ) == "player" then 
        if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then 
            moveObject (othergate1, 2500, -1868.5, -3104.1999511719, 56.900001525879)    -- here is where you enter the coordinatess of the new location of the object, 2200 = the speed of the movent. 
        end 
    end 
end   
addEventHandler ( "onColShapeHit", col, Open) 
  
function Close ( pla ) 
    if getElementType ( pla ) == "player" then 
        if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(pla)), aclGetGroup ( "Admin" ) ) then 
            moveObject (othergate1, 2500,-1868.5, -3104.1999511719, 54.700000762939) -- here is where you copy the coordinates of the orginal location of the object, 2951 = the timer of movent. 
        end 
    end 
end 
addEventHandler ( "onColShapeLeave", col, Close ) 

Only copy the rotation coordinates to the createObject

1. Go in map editor and go to where you want the gate to be

2. Get a object you want to be the gate

3. Place it in place

4. Double click it and get the coordinates and paste it in the col zone and in the createObject and the moveObject and the moveObject where it says move back to

5. Move the gate to were it should be when opened and double click the object and copy those coordinates into the moveObject, the one that says where it's moving to

If your still having trouble, pm me and I'll make it for you for free. You could send me your map or five me the coordinates. Hope I helped, or will help :D

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