share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
branchspacecampaign
changeset 9639 6b2ae2eaf1b2
parent 9638 9db28f0a3f8a
child 9640 a6a903a6c2b3
equal deleted inserted replaced
9638:9db28f0a3f8a 9639:6b2ae2eaf1b2
     2 --
     2 --
     3 -- This map works as a menu for the hero hog to
     3 -- This map works as a menu for the hero hog to
     4 -- navigate through planets. It portrays the hogs
     4 -- navigate through planets. It portrays the hogs
     5 -- planet and above the planets that he'll later
     5 -- planet and above the planets that he'll later
     6 -- visit.
     6 -- visit.
     7 
       
     8 -- TODO
       
     9 -- Save and Load All Check Points
       
    10 -- Save hero health
       
    11 -- Decide and implement if hero will use gas bombs...
       
    12 -- ofc add custom stats page
       
    13 -- PROBLEM : What if one makes a bad choice and wants to replay it map, how to reset?
       
    14 -- POSSIBLE SOLUTIONS: In game function keys, frontend button...
       
    15 
     7 
    16 HedgewarsScriptLoad("/Scripts/Locale.lua")
     8 HedgewarsScriptLoad("/Scripts/Locale.lua")
    17 HedgewarsScriptLoad("/Scripts/Animate.lua")
     9 HedgewarsScriptLoad("/Scripts/Animate.lua")
    18 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
    10 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
    19 
    11 
   278 		return true
   270 		return true
   279 	end
   271 	end
   280 	return false
   272 	return false
   281 end
   273 end
   282 
   274 
   283 -- TODO somehow make it to count fall damage
       
   284 function onMoonLanding(gear)
   275 function onMoonLanding(gear)
   285 	if GetHealth(hero.gear) and GetX(gear) > 1010 and GetX(gear) < 1220  and GetY(gear) < 1300 and GetY(gear) > 750 and StoppedGear(gear) then
   276 	if GetHealth(hero.gear) and GetX(gear) > 1010 and GetX(gear) < 1220  and GetY(gear) < 1300 and GetY(gear) > 750 and StoppedGear(gear) then
   286 		return true
   277 		return true
   287 	end
   278 	end
   288 	return false
   279 	return false
   336 		return true
   327 		return true
   337 	end
   328 	end
   338 	return false
   329 	return false
   339 end
   330 end
   340 
   331 
   341 -------------- OUTCOMES ------------------
   332 -------------- ACTIONS ------------------
   342 
   333 
   343 function heroBeforeTreePosition(gear)
   334 function heroBeforeTreePosition(gear)
   344 	AnimSay(gear,loc("Now I have to climb these trees"), SAY_SAY, 4000)
   335 	AnimSay(gear,loc("Now I have to climb these trees"), SAY_SAY, 4000)
   345 	AnimCaption(hero.gear, loc("Use the rope to get to the crate"),  4000)
   336 	AnimCaption(hero.gear, loc("Use the rope to get to the crate"),  4000)
   346 end
   337 end