share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
changeset 15053 d131ec7be850
parent 15034 09c63d4bcf53
child 15054 6fc8f0a2929d
equal deleted inserted replaced
15052:773beead236f 15053:d131ec7be850
   250   AddEvent(CheckLost, {}, DoLost, {}, 0)
   250   AddEvent(CheckLost, {}, DoLost, {}, 0)
   251   AddEvent(CheckWon, {}, DoWon, {}, 0)
   251   AddEvent(CheckWon, {}, DoWon, {}, 0)
   252 end
   252 end
   253 
   253 
   254 function SkipMidAnimAlone()
   254 function SkipMidAnimAlone()
   255   AnimSetGearPosition(leaks, 2656, 1842)
   255   AnimSetGearPosition(leaks, 2656, 1845)
   256   AnimSwitchHog(leaks)
   256   AnimSwitchHog(leaks)
   257   AnimWait(dense, 1)
   257   AnimWait(dense, 1)
   258   AddFunction({func = HideHedge, args = {princess}})
   258   AddFunction({func = HideHedge, args = {princess}})
   259   AddFunction({func = HideHedge, args = {cyborg}})
   259   AddFunction({func = HideHedge, args = {cyborg}})
   260 end
   260 end
   271   end
   271   end
   272   ShowMission(loc("The Journey Back"), loc("Adventurous"), goal .. "|" .. hint .. "|" .. stuck .. "|" .. conds, 0, 7000)
   272   ShowMission(loc("The Journey Back"), loc("Adventurous"), goal .. "|" .. hint .. "|" .. stuck .. "|" .. conds, 0, 7000)
   273 end
   273 end
   274 
   274 
   275 function SkipStartAnim()
   275 function SkipStartAnim()
       
   276   AnimTurn(leaks, "Left")
   276   AnimSwitchHog(leaks)
   277   AnimSwitchHog(leaks)
   277 end
   278 end
   278 
   279 
   279 function PlaceCratesDuo()
   280 function PlaceCratesDuo()
   280   SpawnSupplyCrate(3090, 827, amBaseballBat)
   281   SpawnSupplyCrate(3090, 827, amBaseballBat)
   281   girderCrate1 = SpawnSupplyCrate(2466, 1814, amGirder)
   282   girderCrate1 = SpawnSupplyCrate(2366, 1814, amGirder)
   282   girderCrate2 = SpawnSupplyCrate(2630, 1278, amGirder)
   283   girderCrate2 = SpawnSupplyCrate(2630, 1278, amGirder)
   283   SpawnSupplyCrate(2422, 1810, amParachute)
   284   SpawnSupplyCrate(2322, 1810, amParachute)
   284   SpawnSupplyCrate(3157, 1009, amLowGravity)
   285   SpawnSupplyCrate(3157, 1009, amLowGravity)
   285   sniperCrate = SpawnSupplyCrate(784, 1715, amSniperRifle)
   286   sniperCrate = SpawnSupplyCrate(784, 1715, amSniperRifle)
   286 end
   287 end
   287 
   288 
   288 function PlaceMinesDuo()
   289 function PlaceMinesDuo()
   326     loc("Your hogs must survive!") .. "|" ..
   327     loc("Your hogs must survive!") .. "|" ..
   327     loc("Beware of mines: They explode after 5 seconds."), 1, 5000)
   328     loc("Beware of mines: They explode after 5 seconds."), 1, 5000)
   328 end
   329 end
   329 
   330 
   330 function SkipPastFlowerAnim()
   331 function SkipPastFlowerAnim()
   331   AnimSetGearPosition(dense, 2656, 1842)
   332   AnimSetGearPosition(dense, 2656, 1845)
   332   AnimSwitchHog(dense)
   333   AnimTurn(dense, "Left")
   333   AnimWait(dense, 1)
   334   AnimSwitchHog(leaks)
       
   335   AnimWait(leaks, 1)
   334   AddFunction({func = HideHedge, args = {cyborg}})
   336   AddFunction({func = HideHedge, args = {cyborg}})
   335 end
   337 end
   336 
   338 
   337 function AfterOutPitAnim()
   339 function AfterOutPitAnim()
   338   SetupCourseDuo()
   340   SetupCourseDuo()
   483   table.insert(startAnim, {func = AnimWait, args = {leaks, 3000}})
   485   table.insert(startAnim, {func = AnimWait, args = {leaks, 3000}})
   484   table.insert(startAnim, {func = AnimTurn, args = {leaks, "Left"}})
   486   table.insert(startAnim, {func = AnimTurn, args = {leaks, "Left"}})
   485   table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I wonder where Dense Cloud is..."), SAY_THINK, 4000}})
   487   table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I wonder where Dense Cloud is..."), SAY_THINK, 4000}})
   486   table.insert(startAnim, {func = AnimSay, args = {leaks, loc("He must be in the village already."), SAY_THINK, 4000}})
   488   table.insert(startAnim, {func = AnimSay, args = {leaks, loc("He must be in the village already."), SAY_THINK, 4000}})
   487   table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I'd better get going myself."), SAY_THINK, 4000}})
   489   table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I'd better get going myself."), SAY_THINK, 4000}})
       
   490   AddSkipFunction(startAnim, SkipStartAnim, {})
   488 
   491 
   489   midAnim = {}
   492   midAnim = {}
   490   table.insert(midAnim, {func = AnimWait, args = {leaks, 500}})
   493   table.insert(midAnim, {func = AnimWait, args = {leaks, 500}})
   491   table.insert(midAnim, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
   494   table.insert(midAnim, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
   492   table.insert(midAnim, {func = AnimSwitchHog, args = {cyborg}})
   495   table.insert(midAnim, {func = AnimSwitchHog, args = {cyborg}})
   495   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
   498   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
   496   table.insert(midAnim, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
   499   table.insert(midAnim, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
   497   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
   500   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
   498   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death! Muahahaha!"), SAY_SAY, 8000}})
   501   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death! Muahahaha!"), SAY_SAY, 8000}})
   499   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
   502   table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
   500   table.insert(midAnim, {func = AnimTeleportGear, args = {leaks, 2656, 1842}})
   503   table.insert(midAnim, {func = AnimTeleportGear, args = {leaks, 2656, 1845}})
   501   table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
   504   table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
   502   table.insert(midAnim, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
   505   table.insert(midAnim, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
   503   AddSkipFunction(midAnim, SkipMidAnimAlone, {})
   506   AddSkipFunction(midAnim, SkipMidAnimAlone, {})
   504 end
   507 end
   505 
   508 
   506 function SetupAnimAcceptedDied()
   509 function SetupAnimAcceptedDied()
   507   table.insert(startAnimAD, {func = AnimWait, args = {leaks, 3000}})
   510   table.insert(startAnimAD, {func = AnimWait, args = {leaks, 3000}})
   508   table.insert(startAnimAD, {func = AnimTurn, args = {leaks, "Left"}})
   511   table.insert(startAnimAD, {func = AnimTurn, args = {leaks, "Left"}})
   509   table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("I need to get to the other side of this island, fast!"), SAY_THINK, 5000}})
   512   table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("I need to get to the other side of this island, fast!"), SAY_THINK, 5000}})
   510   table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("With Dense Cloud on the land of shadows, I'm the village's only hope..."), SAY_THINK, 7000}})
   513   table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("With Dense Cloud on the land of shadows, I'm the village's only hope..."), SAY_THINK, 7000}})
       
   514   AddSkipFunction(startAnimAD, SkipStartAnim, {})
   511 
   515 
   512   table.insert(midAnimAD, {func = AnimWait, args = {leaks, 500}})
   516   table.insert(midAnimAD, {func = AnimWait, args = {leaks, 500}})
   513   table.insert(midAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
   517   table.insert(midAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
   514   table.insert(midAnimAD, {func = AnimSwitchHog, args = {cyborg}})
   518   table.insert(midAnimAD, {func = AnimSwitchHog, args = {cyborg}})
   515   table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
   519   table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
   517   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
   521   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
   518   table.insert(midAnimAD, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
   522   table.insert(midAnimAD, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
   519   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
   523   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
   520   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death, just like your friend! Muahahaha!"), SAY_SAY, 8000}})
   524   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death, just like your friend! Muahahaha!"), SAY_SAY, 8000}})
   521   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
   525   table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
   522   table.insert(midAnimAD, {func = AnimTeleportGear, args = {leaks, 2656, 1842}})
   526   table.insert(midAnimAD, {func = AnimTeleportGear, args = {leaks, 2656, 1845}})
   523   table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
   527   table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
   524   table.insert(midAnimAD, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
   528   table.insert(midAnimAD, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
   525   AddSkipFunction(midAnimAD, SkipMidAnimAlone, {})
   529   AddSkipFunction(midAnimAD, SkipMidAnimAlone, {})
   526 
   530 
   527   table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, ClearTrashForPrincessCage, {}}})
   531   table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, ClearTrashForPrincessCage, {}}})
   528   table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {2299, 1687, 2294, 1841}}})
   532   table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {2299, 1687, 2294, 1845}}})
   529   table.insert(failAnimAD, {func = AnimTeleportGear, args = {leaks, 2090, 1841}})
   533   table.insert(failAnimAD, {func = AnimTeleportGear, args = {leaks, 2090, 1845}})
   530   table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {cyborg, SetupKillRoom, {}}})
   534   table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {cyborg, SetupKillRoom, {}}})
   531   table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Left"}})
   535   table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Left"}})
   532   table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {princess, "Left"}})
   536   table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {princess, "Left"}})
   533   table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {leaks, "Right"}})
   537   table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {leaks, "Right"}})
   534   table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 1000}})
   538   table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 1000}})
   579   table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
   583   table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
   580   table.insert(pastFlowerAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
   584   table.insert(pastFlowerAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
   581   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
   585   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
   582   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
   586   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
   583   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
   587   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
   584   table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {cyborg, 2456, 1842}})
   588   table.insert(pastFlowerAnimAL, {func = AnimWait, args = {cyborg, 2000}})
   585   table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {dense, 2656, 1842}})
   589   table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {cyborg, 2456, 1845}})
       
   590   table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {dense, 2656, 1845}})
   586   table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
   591   table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
   587   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
   592   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
   588   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("To help you, of course!"), SAY_SAY, 4000}})
   593   table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("To help you, of course!"), SAY_SAY, 4000}})
   589   table.insert(pastFlowerAnimAL, {func = AnimSwitchHog, args = {dense}})
   594   table.insert(pastFlowerAnimAL, {func = AnimSwitchHog, args = {leaks}})
   590   table.insert(pastFlowerAnimAL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
   595   table.insert(pastFlowerAnimAL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
   591   table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
   596   table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
   592   AddSkipFunction(pastFlowerAnimAL, SkipPastFlowerAnim, {})
   597   AddSkipFunction(pastFlowerAnimAL, SkipPastFlowerAnim, {})
   593 
   598 
   594   table.insert(outPitAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(midCyborgPosDuo)}}, swh = false})
   599   table.insert(outPitAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(midCyborgPosDuo)}}, swh = false})
   641   table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
   646   table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
   642   table.insert(pastFlowerAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
   647   table.insert(pastFlowerAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
   643   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
   648   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
   644   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
   649   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
   645   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
   650   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
   646   table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {cyborg, 2456, 1842}})
   651   table.insert(pastFlowerAnimRL, {func = AnimWait, args = {cyborg, 2000}})
   647   table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {dense, 2656, 1842}})
   652   table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {cyborg, 2456, 1845}})
       
   653   table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {dense, 2656, 1845}})
   648   table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
   654   table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
   649   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
   655   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
   650   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You couldn't possibly believe that after refusing my offer I'd just let you go!"), SAY_SAY, 9000}})
   656   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You couldn't possibly believe that after refusing my offer I'd just let you go!"), SAY_SAY, 9000}})
   651   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You're funny!"), SAY_SAY, 4000}})
   657   table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You're funny!"), SAY_SAY, 4000}})
   652   table.insert(pastFlowerAnimRL, {func = AnimSwitchHog, args = {dense}})
   658   table.insert(pastFlowerAnimRL, {func = AnimSwitchHog, args = {dense}})
   710     hedgeHidden[hedge] = false
   716     hedgeHidden[hedge] = false
   711   end
   717   end
   712 end
   718 end
   713 
   719 
   714 function CondNeedToTurn(hog1, hog2)
   720 function CondNeedToTurn(hog1, hog2)
   715   xl, xd = GetX(hog1), GetX(hog2)
   721   local xl, xd = GetX(hog1), GetX(hog2)
   716   if xl > xd then
   722   if xl > xd then
   717     AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
   723     AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
   718     AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
   724     AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
   719   elseif xl < xd then
   725   elseif xl < xd then
   720     AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
   726     AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
   721     AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
   727     AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
       
   728   end
       
   729 end
       
   730 
       
   731 function NeedToTurn(hog1, hog2)
       
   732   local xl, xd = GetX(hog1), GetX(hog2)
       
   733   if xl > xd then
       
   734     AnimTurn(hog1, "Left")
       
   735     AnimTurn(hog2, "Right")
       
   736   elseif xl < xd then
       
   737     AnimTurn(hog2, "Left")
       
   738     AnimTurn(hog1, "Right")
   722   end
   739   end
   723 end
   740 end
   724 
   741 
   725 function SetupPlaceAlone()
   742 function SetupPlaceAlone()
   726   ------ AMMO CRATE LIST ------
   743   ------ AMMO CRATE LIST ------