More script updates for FJ
authortiyuri@gmail.com
Sat, 07 Aug 2010 13:09:32 +0100
changeset 3732 ec1c81d8c05a
parent 3731 f336f8d52f7e
child 3733 447860ec0093
More script updates for FJ
share/hedgewars/Data/Maps/FlightJoust/map.lua
--- a/share/hedgewars/Data/Maps/FlightJoust/map.lua	Sat Aug 07 12:44:55 2010 +0100
+++ b/share/hedgewars/Data/Maps/FlightJoust/map.lua	Sat Aug 07 13:09:32 2010 +0100
@@ -1,4 +1,5 @@
 local hogs = {}
+local spawncrate = 0
 
 function mapM_(func, tbl)
     for i,v in pairs(tbl) do
@@ -47,7 +48,7 @@
         SetGearPosition(h, 3500-(i-1)*offset, 1000)
     end
 
-    SpawnHealthCrate(1800, 1200)
+    SpawnHealthCrate(1800, 1150)
 end
 
 function onAmmoStoreInit()
@@ -64,8 +65,15 @@
     end 
 end
 
+function onGameTick()
+    if (TurnTimeLeft == 9999 and spawncrate == 1) then
+        SpawnHealthCrate(1800, 1150)
+        spawncrate = 0
+    end
+end
+
 function onGearDelete(gear)
     if GetGearType(gear) == gtCase then
-        SpawnHealthCrate(1880, 1150)
+        spawncrate = 1
     end
-end
+end
\ No newline at end of file