local EventAction_MapLoading = { -- 最大等待时间 WaitTime = 5; FinishEvent = 0; } -- 触发器激活时,将执行Action的Execute function EventAction_MapLoading:Execute(...) if not UGCGameSystem.IsServer() then return end -- 这里由于是经典图则直接传送到目标位置进行加载即可 -- 获取Map索引 self.MapIndex = UGCGameSystem.GameState:GetMapKey() -- 重置所有玩家 UGCGameSystem.SendModeCustomEvent("ResetAllPlayer") -- 注册毒圈信息 local MapInfo = MapConfig.MapInfo[self.MapIndex].MiniMapInfo local MapCentre = MapInfo.MapCentre SignalCircleConfig.RegisterCircleInfo(6, {X = MapCentre.X, Y = MapCentre.Y}, MapInfo.IsRandomCircle, MapInfo.CircleIndex) -- 保存载具信息 MyVehicleSystem.SaveAllVehicleTF(self.MapIndex) -- 延迟开局 UGCEventSystem.SetTimer(UGCGameSystem.GameState, function() UGCEventSystem.SendEvent(self.FinishEvent) end, self.WaitTime) return true end -- 其他逻辑 -------------------------------------------------------------------------------------------- return EventAction_MapLoading