share/hedgewars/Data/Maps/Knockball/map.lua
changeset 3058 2ebc20485344
parent 3013 dfc1f16aeb53
child 3197 e1fa864fd6ca
equal deleted inserted replaced
3057:e6e4c109ceb8 3058:2ebc20485344
    55 function onGameStart()
    55 function onGameStart()
    56 	ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0);
    56 	ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0);
    57 end
    57 end
    58 
    58 
    59 function onGameTick()
    59 function onGameTick()
    60 	if ball ~= nil then FollowGear(ball) end
    60 	if ball ~= nil and GetFollowGear() ~= nil then FollowGear(ball) end
    61 end
    61 end
    62 
    62 
    63 function onAmmoStoreInit()
    63 function onAmmoStoreInit()
    64 	SetAmmo(amBaseballBat, 9, 0, 0)
    64 	SetAmmo(amBaseballBat, 9, 0, 0)
    65 	SetAmmo(amSkip, 9, 0, 0)
    65 	SetAmmo(amSkip, 9, 0, 0)
    70 		ball = AddGear(GetX(gear), GetY(gear), gtBall, 0, 0, 0, 0)
    70 		ball = AddGear(GetX(gear), GetY(gear), gtBall, 0, 0, 0, 0)
    71 		if ball ~= nil then
    71 		if ball ~= nil then
    72 			CopyPV2(gear, ball)
    72 			CopyPV2(gear, ball)
    73 			SetState(ball, 0x200) -- temporary - might change!
    73 			SetState(ball, 0x200) -- temporary - might change!
    74 			SetTag(ball, 8) -- baseball skin
    74 			SetTag(ball, 8) -- baseball skin
       
    75 			FollowGear(ball)
    75 		end
    76 		end
    76 	end
    77 	end
    77 end
    78 end
    78 
    79 
    79 function onGearDelete(gear)
    80 function onGearDelete(gear)