-
Posts
18 -
Joined
-
Last visited
Posts posted by Tonnzza
-
-
How i make gate for swat team that only swats would get it open?
-
-
-
-
-
-
-
-
-
-
Another marker does not open a port for what could be wrong?
--gate-- gate1 = createObject(980, -1980.5789794922, 283.62588500977, 37, 0,0,90) gate2 = createObject(980, -1980.5789794922, 293.22588500977, 37, 0,0,90) -- Markers -- hitMarker1 = createMarker(-1985.8018798828, 288.45, 33.54, 'cylinder', 3, 255, 0, 0, 150) hitMarker2 = createMarker(-1976.7435302734, 288.45, 33.54, 'cylinder', 3, 255, 0, 0, 150) function moveGateUpA( hitElement, matchingDimension ) local x1, y1 = getElementPosition( gate1 ) local x, y = getElementPosition( gate2 ) moveObject( gate1, 5000, x1, y1, 43) moveObject( gate2, 5000, x, y, 43) end addEventHandler( "onMarkerHit", hitMarker1, moveGateUpA ) function timerReady(s) local x, y = getElementPosition( gate1 ) local x2, y2 = getElementPosition ( gate2 ) moveObject(gate1, 5000, x, y, 37 ) moveObject(gate2, 5000, x2, y2, 37 ) end function moveGateDownA( leaveElement, matchingDimension ) setTimer ( timerReady, 10000, 1, source ) end addEventHandler( "onMarkerLeave", hitMarker2, moveGateDownA )
-
-
Oh now it's working. the fault was in meta.xml. Thx.
-
I tried it but it's not working. :\
-
There are no errors in debugscript 3.
-
I'm trying to do the gate. What is wrong with this code?
--gate-- gate1 = createObject(980, -1980.5789794922, 283.62588500977, 37, 0,0,90) gate2 = createObject(980, -1980.5789794922, 293.22588500977, 37, 0,0,90) -- Markers -- hitMarker1 = createMarker(-1985.8018798828, 288.45, 33.54, 'cylinder', 3, 255, 0, 0, 150) hitMarker2 = createMarker(-1976.7435302734, 288.45, 33.54, 'cylinder', 3, 255, 0, 0, 150) function moveGateUpA( hitElement, matchingDimension ) moveObject(gate1, 5000, -1980.5789794922, 283.62588500977, 40, 0,0,90) end addEventHandler( "onMarkerHit", hitMarker1, moveGateUpA ) function moveGateDownA( leaveElement, matchingDimension ) setTimer ( timerReady, 10000, 1 ) end addEventHandler( "onMarkerLeave", hitMarker1, moveGateDownA ) function timerReady() moveObject(gate1, 5000, -1980.5789794922, 283.62588500977, 37, 0,0,90) end addEventHandler( "onMarkerLeave", hitMarker1) function moveGateUpB( hitElement, matchingDimension) moveObject(gate2, 5000, -1980.5789794922, 293.22588500977, 40, 0,0,90) end addEventHandler( "onMarkerHit", hitMarker2, moveGateUpB ) function moveGateDownB( leaveElement, matchingDimension ) setTimer ( timerReady, 10000, 1 ) end addEventHandler( "onMarkerLeave", hitMarker2, moveGateDownB ) function timerReady() moveObject(gate2, 5000, -1980.5789794922, 293.22588500977, 37, 0,0,90) end addEventHandler( "onMarkerLeave", hitMarker2)
-
Marker gates problem..
in Scripting
Posted
Marker1 and marker2 doesn't move gates. What could be wrong?