Hello,
I made a script to move an object onmarkerhit, since I didn't know how to place the colshapes (Bad me.).
But, if I enter the marker (debugscript 3 is on) it doesn't show an error message, but the gate won't move.
Also if I start it in console, it doesn't show an error message.
This is what I have:
local marker1 = createMarker ( 1253.0999755859, -1399, 12, 'cylinder', 11, 222, 222, 1, 225 )
local gate1 = createObject ( 980, 1252.8000488281, -1399.0999755859, 14.800000190735, 0, 0, 90 )
function moveObject ( hitElement, matchingDimension )
if getElementType ( hitElement ) == "player" then
moveObject ( gate1, 3000, 1252.8000488281, -1413, 14.800000190735 )
end
end
function moveObjectBack ()
if getElementType ( hitElement ) == "player" then
moveObject ( gate1, 3000, 1252.8000488281, -1399.0999755859, 14.800000190735 )
end
end
addEventHandler ( "onMarkerHit", marker1 , moveObject )
addEventHandler ( "onMarkerLeave", marker1, moveObjectBack )
I hope somebody can help me, or can tell me how and where to place the colShapes.