share/hedgewars/Data/Missions/Training/Basic_Training_-_Shotgun.lua
changeset 7877 b3fb94986255
parent 7165 aad1aea05f1e
child 8043 da083f8d95e6
equal deleted inserted replaced
7876:a366fbe91b58 7877:b3fb94986255
    44 	FindPlace(gear, true, 0, LAND_WIDTH)
    44 	FindPlace(gear, true, 0, LAND_WIDTH)
    45 	
    45 	
    46 	-- move the target to a higher vertical position
    46 	-- move the target to a higher vertical position
    47 	-- to ensure it's not somewhere down below
    47 	-- to ensure it's not somewhere down below
    48 	x, y = GetGearPosition(gear)
    48 	x, y = GetGearPosition(gear)
    49 	SetGearPosition(gear, x, 500)
    49 	SetGearPosition(gear, x, 0)
    50 end
    50 end
    51 
    51 
    52 function onNewTurn()
    52 function onNewTurn()
    53 	ParseCommand("setweap " .. string.char(amShotgun))
    53 	ParseCommand("setweap " .. string.char(amShotgun))
    54 end
    54 end
    86 
    86 
    87 	-- Create the player team
    87 	-- Create the player team
    88 	AddTeam(loc("Shotgun Team"), 14483456, "Simple", "Island", "Default")
    88 	AddTeam(loc("Shotgun Team"), 14483456, "Simple", "Island", "Default")
    89 	-- And add a hog to it
    89 	-- And add a hog to it
    90 	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
    90 	player = AddHog(loc("Hunter"), 0, 1, "NoHat")
    91 	SetGearPosition(player, 2334, 1254)
    91 	SetGearPosition(player, 1210, 230)
    92 end
    92 end
    93 
    93 
    94 -- This function is called when the round starts
    94 -- This function is called when the round starts
    95 -- it spawns the first target that has to be destroyed.
    95 -- it spawns the first target that has to be destroyed.
    96 -- In addition it shows the scenario goal(s).
    96 -- In addition it shows the scenario goal(s).