-
Posts
18 -
Joined
-
Last visited
Everything posted by Tonnzza
-
Marker1 and marker2 doesn't move gates. What could be wrong? -- Ovet- gate1 = createObject(1965, 1899.8000488281, -1702.5, 27, 0,0,90) gate2 = createObject(1965, 1898.3000488281, -1702.4897460938, 27, 0,0,90) gate3 = createObject(1965, 1896.8000488281, -1702.4809570313, 27, 0,0,90, doublesided) -- Markerit -- hitMarker1 = createMarker ( 1897.9, -1701.3000488281, 25.5, "cylinder", 1.5, 255, 255, 0, 170 ) hitMarker2 = createMarker ( 1897.6999511719, -1704, 25.5, "cylinder", 1.5, 255, 255, 0, 170 ) function moveGateUpA( hitElement, matchingDimension ) moveObject(gate1, 5000, 1901.3, -1702.5, 27, 0,0,0) moveObject(gate2, 5000, 1901.3, -1702.4897460938, 27, 0,0,0) moveObject(gate3, 5000, 1901.3, -1702.4809570313, 27, 0,0,0) end addEventHandler( "onMarkerHit", hitMarker1, moveGateUpA ) function moveGateDownA( leaveElement, matchingDimension ) setTimer ( timerReady, 10000, 1 ) end addEventHandler( "onMarkerLeave", hitMarker1, moveGateDownA ) function timerReady() moveObject(gate1, 5000, 1899.8000488281, -1702.5, 27, 0,0,0) moveObject(gate2, 5000, 1898.3000488281, -1702.4897460938, 27, 0,0,0) moveObject(gate3, 5000, 1896.8000488281, -1702.4809570313, 27, 0,0,0) end addEventHandler( "onMarkerLeave", hitMarker1) function moveGateUpB( hitElement, matchingDimension ) moveObject(gate1, 5000, 1901.3, -1702.5, 27, 0,0,0) moveObject(gate2, 5000, 1901.3, -1702.4897460938, 27, 0,0,0) moveObject(gate3, 5000, 1901.3, -1702.4809570313, 27, 0,0,0) end addEventHandler( "onMarkerHit", hitMarker2, moveGateUpB ) function moveGateDownB( leaveElement, matchingDimension ) setTimer ( timerReady, 10000, 1 ) end addEventHandler( "onMarkerLeave", hitMarker2, moveGateDownB ) function timerReady() moveObject(gate1, 5000, 1899.8000488281, -1702.5, 27, 0,0,0) moveObject(gate2, 5000, 1898.3000488281, -1702.4897460938, 27, 0,0,0) moveObject(gate3, 5000, 1896.8000488281, -1702.4809570313, 27, 0,0,0) end addEventHandler( "onMarkerLeave", hitMarker2)
-
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)