Meltign Castle: Fix item spawn after 4 minutes; add restart rule.

liquid_container
Sven Eberhardt 2016-02-21 17:34:29 -05:00
parent 5963b9aed3
commit 65d6dd76a3
2 changed files with 5 additions and 4 deletions

View File

@ -3,8 +3,8 @@
func InitializeObjects()
{
CreateObject(Rule_KillLogs, 50, 50);
CreateObject(Rule_Gravestones, 50, 50);
CreateObject(Rule_Restart, 50, 50);
CreateObject(Goal_Melee, 50, 50);

View File

@ -47,6 +47,7 @@ func Initialize()
g_respawn_flags[flag.team] = flag;
}
// Weapon drops timer
g_num_avail_weapons = 6;
ScheduleCall(nil, Scenario.DoBalloonDrop, 36*8, 99999);
return true;
}
@ -61,13 +62,13 @@ local weapon_list = [ // id, vertex, offx, offy, deployy
[Boompack, 0, 0, 0, 0]
];
local num_avail_weapons = 6; // boompack available later
static g_num_avail_weapons; // boompack available later
func DoBalloonDrop()
{
// Random weapon
if (FrameCounter() > 36*60*4) num_avail_weapons = 7; // enable boompacks after some time
var wp = Scenario.weapon_list[Random(num_avail_weapons)];
if (FrameCounter() > 36*60*4) g_num_avail_weapons = 7; // enable boompacks after some time
var wp = Scenario.weapon_list[Random(g_num_avail_weapons)];
var x = LandscapeWidth()/4 + Random(LandscapeWidth()/2);
var y = 0;
var balloon = CreateObject(BalloonDeployed, x, y);