Jump to content

Gate problem *SOLVED*


SkullBreaker

Recommended Posts

I've made this script for a gate with a marker. When I enter the marker, the gate opens. But when I leave the marker, it does not close the gate. This is my script:

local gate = createObject ( 980, 1366.9, -1401.6, 15.2, 0, 0, 89.75 ) 
local marker = createMarker ( 1366.6, -1402.6, 13.0, "cylinder", 25, 200, 50, 0, 0 ) 
  
addEventHandler( "onMarkerHit", marker, 
function() 
    moveObject(gate, 5000, 1366.9, -1401.6, 9 ) 
end 
) 
addEventHandler( "onMarkerLeave", marker, 
function() 
    Moveobject (gate, 5000, 1366.9, -1401.6, 15.2 ) 
end 
) 
  

I personally cannot see what the problem is, so it would be really helpful if someone can help me out! Thanks!

Edited by Guest
Link to comment

It was probably the "Moveobject", now I have:

local gate = createObject ( 980, 1366.9, -1401.6, 15.2, 0, 0, 89.75 ) 
local marker = createMarker ( 1366.6, -1402.6, 13.0, "cylinder", 25, 200, 50, 0, 0 ) 
  
addEventHandler( "onMarkerHit", marker, 
function() 
    moveObject(gate, 5000, 1366.9, -1401.6, 9 ) 
end 
) 
addEventHandler( "onMarkerLeave", marker, 
function() 
    moveObject(gate, 5000, 1366.9, -1401.6, 15.2 ) 
end 
) 

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