-- Checkpoint Marker script -- o Create a checkpoint marker object, initially in a deactiavted ( red colour ) state -- o On receiving an ACTIVATE message, becomes actives and changes colour to green -- o On receiving a DEACTIVATE message, becomes deactivated and changes colour to red -- o Sends a COLLECT message when the player gets near and the markers is in the active state function InitCheckpointMarker_NoArrow() print("Initing Crusty CheckpointMarker_NoArrow pickup") end function CreateCheckpointMarker_NoArrow(myID) return coroutine.create(UpdateCheckpointMarker_NoArrow) end function UpdateCheckpointMarker_NoArrow(myID) local dt=0 local reason=0 local x,y,z=Object.GetPosition(myID); y = y + 2.75 local Orbit1ID=Object.CreateChildScriptedObject(myID,"CheckpointMarkerOrbit3",x,y,z) local Orbit2ID=Object.CreateChildScriptedObject(myID,"CheckpointMarkerOrbit4",x,y,z) Object.CreateSphereTouchfield(myID,0,0.5,0,3.00) Object.UpdateOnReceiveMessage(myID,true) Object.SetUpdateRate(myID,0) Object.SendEventToObject(Orbit1ID,5) Object.SendEventToObject(Orbit2ID,5) Object.UpdateOnSphereTouchfield(myID,false) while true do dt,reason = coroutine.yield() if reason == 1 then -- spheretouch Object.SetCollected(myID,0) elseif reason == 4 then -- activate Object.SendEventToObject(Orbit1ID,4) Object.SendEventToObject(Orbit2ID,4) Object.UpdateOnSphereTouchfield(myID,true) elseif reason == 5 then -- deactivate Object.SendEventToObject(Orbit1ID,5) Object.SendEventToObject(Orbit2ID,5) Object.UpdateOnSphereTouchfield(myID,false) end end end