SkullBreaker Posted February 22, 2015 Share Posted February 22, 2015 (edited) 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 February 22, 2015 by Guest Link to comment
SkullBreaker Posted February 22, 2015 Author Share Posted February 22, 2015 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
SkullBreaker Posted February 22, 2015 Author Share Posted February 22, 2015 It's solved! Anyway thanks if you read this! Link to comment
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