share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua
changeset 7144 6e3974128631
parent 7135 4d863aadd0b2
child 7229 c34516ec0f27
equal deleted inserted replaced
7143:cd86f95b46c9 7144:6e3974128631
   233 local fMod = 1000000 -- use this for dev and .16+ games
   233 local fMod = 1000000 -- use this for dev and .16+ games
   234 
   234 
   235 -- some console stuff
   235 -- some console stuff
   236 local shellID = 0
   236 local shellID = 0
   237 local explosivesID = 0
   237 local explosivesID = 0
   238 local luaGameTicks = 0
       
   239 
   238 
   240 -- gaudyRacer
   239 -- gaudyRacer
   241 local boosterOn = false
   240 local boosterOn = false
   242 local roundLimit = 3	-- no longer set here (see version history)
   241 local roundLimit = 3	-- no longer set here (see version history)
   243 local roundNumber = 0
   242 local roundNumber = 0
   349 
   348 
   350 local rCirc = {}
   349 local rCirc = {}
   351 local rCircX = {}
   350 local rCircX = {}
   352 local rCircY = {}
   351 local rCircY = {}
   353 local rAlpha = 255
   352 local rAlpha = 255
   354 local rPingTimer = 0
       
   355 local radShotsLeft = 0
   353 local radShotsLeft = 0
   356 
   354 
   357 local vCircActive = {}
   355 local vCircActive = {}
   358 local vCircHealth = {}
   356 local vCircHealth = {}
   359 local vType = {}
   357 local vType = {}
  1157 
  1155 
  1158 function onGameTick20()
  1156 function onGameTick20()
  1159 
  1157 
  1160 
  1158 
  1161 	--WriteLnToConsole("Start of GameTick")
  1159 	--WriteLnToConsole("Start of GameTick")
  1162 	luaGameTicks = luaGameTicks + 1 -- GameTime
       
  1163 
  1160 
  1164 	HandleCircles()
  1161 	HandleCircles()
  1165 
  1162 
  1166 	-- derp
  1163 	-- derp
  1167 	--if shockwaveHealth > 0 then
  1164 	--if shockwaveHealth > 0 then
  2130 	end]]
  2127 	end]]
  2131 
  2128 
  2132 
  2129 
  2133 	if rAlpha ~= 255 then
  2130 	if rAlpha ~= 255 then
  2134 
  2131 
  2135 		rPingTimer = rPingTimer + 1
  2132 		if GameTime%100 == 0 then
  2136 		if rPingTimer == 100 then
       
  2137 			rPingTimer = 0
       
  2138 
  2133 
  2139 			rAlpha = rAlpha + 5
  2134 			rAlpha = rAlpha + 5
  2140 			if rAlpha >= 255 then
  2135 			if rAlpha >= 255 then
  2141 				rAlpha = 255
  2136 				rAlpha = 255
  2142 			end
  2137 			end