-------------------------------------------------------------- -- (SERVER SIDE) Trigger for Course Cancel -- -- Cancels the course for the player -------------------------------------------------------------- -------------------------------------------------------------- -- Includes -------------------------------------------------------------- require('ai/AG/L_AG_SCENE_2_INCLUDE') -------------------------------------------------------------- -- Object specific constants -------------------------------------------------------------- -------------------------------------------------------------- -- Called when object is loaded into the level -------------------------------------------------------------- --function onStartup(self) --print("cancel trigger startup") --end -------------------------------------------------------------- -- On Collision -------------------------------------------------------------- function onCollisionPhantom(self, msg) -- if a player is colliding with us if (msg.objectID:IsCharacter().isChar == true) then -- get the manager local manager = GetCourseManager(self) -- notify manager of collision if (manager) then manager:FireEvent{ args = "course_cancel", senderID = msg.objectID } end end return msg end