Сообщений: 523
|
Опубликовано: 10.10.2014, 00:55:59
--Cocons Up --Map by Alexbond
function Initialise()
SendMessage("Commentary.NoDefault") bronzetime = (60 * 1000) * 9999 silvertime = (60 * 1000) * 25 goldtime = (60 * 1000) * 20
SetData("Camera.StartOfTurnCamera","Default") SetData("Camera.Path.IgnoreInput", 1) SetData("Mine.DudProbabilty", 0.1) SetData("Mine.MinFuse", 1000) SetData("Mine.MaxFuse", 5000) SetData("TurnTime", 0) SetData("RoundTime", 1500000) CrateCount = 0 CratesCollected = false SetData("Camera.StartOfTurnCamera","Default") SetData("Camera.GameOverCamera", "Orbit") SendStringMessage("Camera.Disable", "Orbit") SendStringMessage("Camera.Disable", "Blimp") CrateSpawn()
SetupWormsAndTeams() SetupInventories() Intro() --startt()
end
function SelectRandomWind() SetData("Wind.Speed", 0.0) end
function SituationText() SetData("Text.TestComment", "It might be difficult situation for you!") SetData("CommentaryPanel.Comment", "Text.TestComment") SendMessage("CommentaryPanel.ScriptText") end
function SituationAnim() SendIntMessage("Worm.ResetAnim", 0) SetData("Worm.ScriptAnim", "Horror") SendIntMessage("Worm.QueueAnim", 0) end
function Intro() CameraFly = 1 SendMessage("EFMV.Start") StartTimer("SituationAnim", 10) StartTimer("SituationText", 1000) SetData("Camera.Path.Knots.Position", "Pos1") SetData("Camera.Path.Knots.LookAt", "Look1") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro2", 4500) end
function SpiderText() SetData("Text.TestComment", "Spider mom looks little hungry...") SetData("CommentaryPanel.Comment", "Text.TestComment") SendMessage("CommentaryPanel.ScriptText") end
function Intro2() CameraFly = 1 StartTimer("SpiderText", 1500) SetData("Camera.Path.Knots.Position", "Pos2,Pos3") SetData("Camera.Path.Knots.LookAt", "Look2") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 500) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro3", 4000) end
function ExistText() SetData("Text.TestComment", "But exist exit from this situation") SetData("CommentaryPanel.Comment", "Text.TestComment") SendMessage("CommentaryPanel.ScriptText") end
function ExistAnim() SendIntMessage("Worm.ResetAnim", 0) SetData("Worm.ScriptAnim", "Angry3") SendIntMessage("Worm.QueueAnim", 0) end
function Intro3() CameraFly = 1 StartTimer("ExistText", 500) ExistAnim() SetData("Camera.Path.Knots.Position", "Pos1") SetData("Camera.Path.Knots.LookAt", "Look1") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro4", 3200) end
function BabyText() SetData("Text.TestComment", "Colllect six spider babies...") SetData("CommentaryPanel.Comment", "Text.TestComment") SendMessage("CommentaryPanel.ScriptText") end
function BabyText2() SetData("Text.TestComment", "and bring them back to the mother!") SetData("CommentaryPanel.Comment", "Text.TestComment") SendMessage("CommentaryPanel.ScriptText") end
function Intro4() CameraFly = 1 BabyText() SetData("Camera.Path.Knots.Position", "Pos4") SetData("Camera.Path.Knots.LookAt", "Crate1") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro4_1", 1000) end
function Intro4_1() CameraFly = 1 SetData("Camera.Path.Knots.Position", "Pos5") SetData("Camera.Path.Knots.LookAt", "Crate2") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro4_2", 1000) end
function Intro4_2() CameraFly = 1 StartTimer("BabyText2", 500) SetData("Camera.Path.Knots.Position", "Pos6") SetData("Camera.Path.Knots.LookAt", "Crate3") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro4_3", 1000) end
function Intro4_3() CameraFly = 1 SetData("Camera.Path.Knots.Position", "Pos7") SetData("Camera.Path.Knots.LookAt", "Crate4") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro4_4", 1000) end
function Intro4_4() CameraFly = 1 DinnerAnim() SetData("Camera.Path.Knots.Position", "Pos8") SetData("Camera.Path.Knots.LookAt", "Crate5") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro4_5", 1000) end
function Intro4_5() CameraFly = 1 SetData("Camera.Path.Knots.Position", "Pos9") SetData("Camera.Path.Knots.LookAt", "Crate6") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("Intro5", 1000) end
function DinnerText() SetData("Text.TestComment", "Then maybe you not end as next dinner!") SetData("CommentaryPanel.Comment", "Text.TestComment") SendMessage("CommentaryPanel.ScriptText") end
function DinnerAnim() SendIntMessage("Worm.ResetAnim", 0) SetData("Worm.ScriptAnim", "Disbelief1") SendIntMessage("Worm.QueueAnim", 0) end
function Intro5() CameraFly = 1 StartTimer("DinnerText", 1000) SetData("Camera.Path.Knots.Position", "Pos1") SetData("Camera.Path.Knots.LookAt", "Look1") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 0) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SendMessage("Camera.Path.Start") CamLoop = StartTimer("startt", 3500) end
function Spider() SetData("Text.TestComment", "It's time for dinner!") SetData("CommentaryPanel.Comment", "Text.TestComment") SendMessage("CommentaryPanel.ScriptText") end
function SpiderFailure() --CameraFly = 1 SendMessage("EFMV.Start") StartTimer("Spider", 500) SetData("Camera.Path.Knots.Position", "Pos11,Pos12") SetData("Camera.Path.Knots.LookAt", "Look2") SetData("Camera.Path.Loop.Position", 0) SetData("Camera.Path.Loop.LookAt", 0) SetData("Camera.Path.Steps.Position", 250) SetData("Camera.Path.Steps.LookAt", 0) SetData("Camera.Path.Tension.Position", 0) SetData("Camera.Path.Tension.LookAt", 0) SetData("Camera.Path.IgnoreInput", 1) SendMessage("Camera.Path.Start") StartTimer("End", 1500) --FailureMessages() end
function End() SendMessage("GameLogic.Mission.Failure") end
function CrateSpawn() SetData("Crate.Spawn", "Crate1") SetData("Crate.Type", "Weapon") SetData("Crate.NumContents", 0) SetData("Crate.Contents", "kWeaponBazooka") SetData("Crate.Index", 1) SetData("Crate.Pushable", 0) SetData("Crate.TeamDestructible", 10) SetData("Crate.TrackCam", 0) SendMessage("GameLogic.CreateCrate")
SetData("Crate.Spawn", "Crate2") SetData("Crate.Type", "Weapon") SetData("Crate.NumContents", 0) SetData("Crate.Contents", "kWeaponBazooka") SetData("Crate.Index", 2) SetData("Crate.Pushable", 0) SetData("Crate.TeamDestructible", 10) SetData("Crate.TrackCam", 0) SendMessage("GameLogic.CreateCrate")
SetData("Crate.Spawn", "Crate3") SetData("Crate.Type", "Weapon") SetData("Crate.NumContents", 0) SetData("Crate.Contents", "kWeaponBazooka") SetData("Crate.Index", 3) SetData("Crate.Pushable", 0) SetData("Crate.TeamDestructible", 10) SetData("Crate.TrackCam", 0) SendMessage("GameLogic.CreateCrate")
SetData("Crate.Spawn", "Crate4") SetData("Crate.Type", "Weapon") SetData("Crate.NumContents", 0) SetData("Crate.Contents", "kWeaponBazooka") SetData("Crate.Index", 4) SetData("Crate.Pushable", 0) SetData("Crate.TeamDestructible", 10) SetData("Crate.TrackCam", 0) SendMessage("GameLogic.CreateCrate")
SetData("Crate.Spawn", "Crate5") SetData("Crate.Type", "Weapon") SetData("Crate.NumContents", 0) SetData("Crate.Contents", "kWeaponBazooka") SetData("Crate.Index", 5) SetData("Crate.Pushable", 0) SetData("Crate.TeamDestructible", 10) SetData("Crate.TrackCam", 0) SendMessage("GameLogic.CreateCrate")
SetData("Crate.Spawn", "Crate6") SetData("Crate.Type", "Weapon") SetData("Crate.NumContents", 0) SetData("Crate.Contents", "kWeaponBazooka") SetData("Crate.Index", 6) SetData("Crate.Pushable", 0) SetData("Crate.TeamDestructible", 10) SetData("Crate.TrackCam", 0) SendMessage("GameLogic.CreateCrate") end
function Crate_Collected() CrateCount = CrateCount + 1 SendMessage("Commentary.Clear") SendMessage("Commentary.NoDefault") DisplayCollectComment() if CrateCount == 6 then WON() end end
function DisplayCollectComment() local Comment = { "That's it!", "Keep going!", "Just a few more!" } SendMessage("RandomNumber.Get") local RandomNumber = GetData("RandomNumber.Uint") local MyRandomNumber = math.mod(RandomNumber, 3) + 1 -- SendMessage("Commentary.Clear") SetData("Text.TestComment", Comment [MyRandomNumber]) SetData("CommentaryPanel.Comment", "Text.TestComment") SetData("CommentaryPanel.Delay", 3000) SendMessage("CommentaryPanel.TimedText") end
function startt() CameraFly = 0 StartFirstTurn() SendMessage("EFMV.End") end
function StartTurn() done_once_per_turn_functions = false SendMessage("Timer.StartHotSeatTimer") SendMessage("GameLogic.ActivateNextWorm") SendMessage("Weapon.Create") SetWind() SendMessage("GameLogic.Turn.Started") TurnStarted() RunAILogic() else end
function StartFirstTurn() WaitUntilNoActivity = false SendMessage("Timer.StartGame") SendMessage("EFMV.End") StartTurn() end
function Camera_Path_Stopped() if CameraFly == 1 then SendMessage("Commentary.Clear") CameraFly = 0 CancelTimer(CamLoop) if TimerControl == 1 then CancelTimer(TextTime) TimerControl = 0 end SendMessage("EFMV.End") StartFirstTurn() end end
function TurnEnded() RoundTimeRemaining = GetData("RoundTimeRemaining") if (RoundTimeRemaining == 0 or RoundTimeRemaining < 0) and StartedSuddenDeath == false then SpiderFailure() end CheckOneTeamVictory() end
function CheckOneTeamVictory() SendMessage("WormManager.GetActiveTeamCount") TeamCount = GetData("TeamCount") if TeamCount == 0 then SpiderFailure() else StartTurn() end end
function FailureMessages()
SendMessage("Commentary.Clear") SendMessage("Commentary.NoDefault") -- makes up a random number between 1 and 5 SendMessage("RandomNumber.Get") RandomNumber = GetData("RandomNumber.Uint") MyRandomNumber = math.mod(RandomNumber, 5) + 1 if MyRandomNumber == 1 then SetData("CommentaryPanel.Comment", "Miss.Generic.Lose1") SendMessage("CommentaryPanel.ScriptText") elseif MyRandomNumber == 2 then SetData("CommentaryPanel.Comment", "Miss.Generic.Lose2") SendMessage("CommentaryPanel.ScriptText") elseif MyRandomNumber == 3 then SetData("CommentaryPanel.Comment", "Miss.Generic.Lose3") SendMessage("CommentaryPanel.ScriptText") elseif MyRandomNumber == 4 then SetData("CommentaryPanel.Comment", "Miss.Generic.Lose4") SendMessage("CommentaryPanel.ScriptText") elseif MyRandomNumber == 5 then SetData("CommentaryPanel.Comment", "Miss.Generic.Lose5") SendMessage("CommentaryPanel.ScriptText") end end
function WON() timetook = GetData("ElapsedRoundTime") if timetook < bronzetime then Movie = 1 if timetook < silvertime then Movie = 2 if timetook < goldtime then Movie = 3 end end end if Movie == 1 then SetData("MCa.LastGameTime", 1) SetData("GameOver.AwardMovie","bronze") elseif Movie == 2 then SetData("MCa.LastGameTime", 2) SetData("GameOver.AwardMovie","silver") elseif Movie == 3 then SetData("MCa.LastGameTime", 3) SetData("GameOver.AwardMovie","gold") end SendMessage("GameLogic.Mission.Success")
end
function SetupWormsAndTeams() GM = QueryContainer("GM.GameInitData") lock, team = EditContainer("Team.Data00") team.Active = true team.Name = GM.T1_Name team.FlagGfxName = GM.T1_Flag team.GraveIndex = GM.T1_Grave team.TeamColour = 0 CloseContainer(lock)
lock, worm = EditContainer("Worm.Data00") worm.Active = true worm.Name = GM.T1_W1_Name worm.SfxBankName = GM.T1_Speech worm.Spawn = "Worm1" worm.Energy = 100 worm.WeaponFuse = 3 worm.WeaponIsBounceMax = false worm.TeamIndex = 0 CloseContainer(lock)
SendMessage("WormManager.Reinitialise") end
function SetupInventories() lock, inventory = EditContainer("Inventory.Team00") --inventory.Teleport = -1 --inventory.Jetpack = -1 inventory.Binoculars = -1 inventory.Parachute = -1 inventory.SkipGo = 0 inventory.Surrender = 0 CloseContainer(lock) endДобавлено (10.10.2014, 00:55) --------------------------------------------- I will update this post soon. With explanation how this script work.
|
|
|
|