-------------------------------------------------------------- -- (SERVER SIDE) Trigger for Course Finish -- -- Finishes 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("goal 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_finish", senderID = msg.objectID } end end return msg end