share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
branchspacecampaign
changeset 9416 8d0054adf0c6
parent 9412 b4717f50846e
child 9418 6e0831e42e12
equal deleted inserted replaced
9414:6dd0f43a8602 9416:8d0054adf0c6
     5 -- crates. It is told that one crate contains the
     5 -- crates. It is told that one crate contains the
     6 -- lost part.
     6 -- lost part.
     7 
     7 
     8 -- TODO
     8 -- TODO
     9 -- maybe use same name in missionName and frontend mission name..
     9 -- maybe use same name in missionName and frontend mission name..
       
    10 -- in this map I have to track the weapons the player has in checkpoints
    10 
    11 
    11 HedgewarsScriptLoad("/Scripts/Locale.lua")
    12 HedgewarsScriptLoad("/Scripts/Locale.lua")
    12 HedgewarsScriptLoad("/Scripts/Animate.lua")
    13 HedgewarsScriptLoad("/Scripts/Animate.lua")
    13 
    14 
    14 ----------------- VARIABLES --------------------
    15 ----------------- VARIABLES --------------------
    15 -- globals
    16 -- globals
    16 local campaignName = loc("A Space Adventure")
    17 local campaignName = loc("A Space Adventure")
    17 local missionName = loc("Desert planet, lost in sand!")
    18 local missionName = loc("Desert planet, lost in sand!")
    18 local checkPointReached = 1 -- 1 is normal spawn
    19 local checkPointReached = 1 -- 1 is normal spawn
       
    20 -- crates
       
    21 local btorch1Y = 60
       
    22 local btorch1X = 2700
       
    23 local btorch2Y = 1800
       
    24 local btorch2X = 1010
       
    25 local rope1Y = 970
       
    26 local rope1X = 3200
       
    27 local rope2Y = 1900
       
    28 local rope2X = 680
       
    29 local rope3Y = 1850
       
    30 local rope3X = 2460
       
    31 local portalY = 480
       
    32 local portalX = 1465
       
    33 local constructY = 1630
       
    34 local constructX = 3350
    19 -- hogs
    35 -- hogs
    20 local hero = {}
    36 local hero = {}
    21 local ally = {}
    37 local ally = {}
    22 local smuggler1 = {}
    38 local smuggler1 = {}
    23 local smuggler2 = {}
    39 local smuggler2 = {}
    88 function onGameStart()
   104 function onGameStart()
    89 	--AnimWait(hero.gear, 3000)
   105 	--AnimWait(hero.gear, 3000)
    90 	FollowGear(hero.gear)
   106 	FollowGear(hero.gear)
    91 	
   107 	
    92 	AddAmmo(hero.gear, amRope, 10)
   108 	AddAmmo(hero.gear, amRope, 10)
       
   109 	
       
   110 	-- spawn crates	
       
   111 	SpawnAmmoCrate(btorch1X, btorch1Y, amBlowTorch)
       
   112 	SpawnAmmoCrate(btorch2X, btorch2Y, amBlowTorch)
       
   113 	SpawnAmmoCrate(rope1X, rope1Y, amRope)
       
   114 	SpawnAmmoCrate(rope2X, rope2Y, amRope)
       
   115 	SpawnAmmoCrate(rope3X, rope3Y, amRope)
       
   116 	SpawnAmmoCrate(portalX, portalY, amPortalGun)
       
   117 	SpawnAmmoCrate(constructX, constructY, amConstruction)
       
   118 end
       
   119 
       
   120 function onAmmoStoreInit()
       
   121 	SetAmmo(amBlowTorch, 0, 0, 0, 1)
       
   122 	SetAmmo(amRope, 0, 0, 0, 1)
       
   123 	SetAmmo(amPortalGun, 0, 0, 0, 1)	
       
   124 	SetAmmo(amConstruction, 0, 0, 0, 1)
    93 end
   125 end
    94 
   126 
    95 function onGearDelete(gear)
   127 function onGearDelete(gear)
    96 	if gear == hero.gear then
   128 	if gear == hero.gear then
    97 		hero.dead = true
   129 		hero.dead = true