kevincouto6 Posted January 7, 2018 Posted January 7, 2018 -- ------------------------------------------------------------------------------------------------------------------------------ local uMainGate = createObject ( 980, 1213.7659912109, -2042.3292236328, 66.699996948242, 0, 0.24169921875, 89.741821289063 ) local uColShape = createColCircle ( 1213.7659912109, -2042.3292236328, 10, 10 ) setElementDoubleSided(uMainGate, true); -- ------------------------------------------------------------------------------------------------------------------------------ local function open (element) if getElementType(element) ~= 'player' then return end moveObject ( uMainGate, 1500 , 1213.7340087891, -2049.1142578125, 66.699996948242 ) end end local function close (element) if getElementType(element) ~= 'player' then return end moveObject ( uMainGate, 2000, 1213.7659912109, -2042.3292236328, 66.699996948242 ) end end -- ------------------------------------------------------------------------------------------------------------------------------ addEventHandler ( "onColShapeHit", uColShape, open) addEventHandler ( "onColShapeLeave", uColShape, close) -- ------------------------------------------------------------------------------------------------------------------------------
Moderators IIYAMA Posted January 7, 2018 Moderators Posted January 7, 2018 2 end's too much. One in both of the functions.
KaMi Posted January 7, 2018 Posted January 7, 2018 local uMainGate = createObject ( 980, 1214.0751953125, -2037.2841796875, 67.3203125, 0, 0.24169921875, 89.741821289063 ) local uColShape = createColCircle ( 1213.7659912109, -2042.3292236328, 10, 10 ) setElementDoubleSided(uMainGate, true); -- ------------------------------------------------------------------------------------------------------------------------------ function open () moveObject ( uMainGate, 1500 , 1213.7340087891, -2049.1142578125, 66.699996948242 ) end function closer() moveObject ( uMainGate, 2000, 1214.0751953125, -2037.2841796875, 67.3203125 ) end -- ------------------------------------------------------------------------------------------------------------------------------ addEventHandler ( "onColShapeHit", uColShape, open) addEventHandler ( "onColShapeLeave", uColShape, closer) -- ------------------------------------------------------------------------------------------------------------------------------ is this what you are looking for?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now