--print("TreasureMap_Controller_1") require "lua/entity.lua" require "lua/utilities.lua" require "lua/GameElement_MineField/TreasureMapPath.lua" myTime = 0 treasureMapPoints = {} for i=0,32 do treasureMapPoints[i+1] = object("_3_TreasureMap_Controller_waypoint_" .. i) end isPathOpen = false --Treasure Map source objects to clone mapStartPieceName = "Map_Start" mapLinePieceName = "Map_Line_Piece" mapEndPieceName = "Map_End" while tick() do myTime = myTime + dt if trigger.received(1,"ShowPath") then print("Show path!") isPathOpen = true end if trigger.received(1,"HidePath") then print("Hide path!") isPathOpen = false treasureMapDeletePath() end if isPathOpen == true then treasureMapPathTick() end end --shutdown()