TreasureHunt: Improve game end check and some map simplifications

install-platforms
Sven Eberhardt 2018-01-10 21:30:15 -08:00
parent 5fc07df757
commit b15a8234b1
4 changed files with 638 additions and 385 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,21 @@
// Goal timer: Barrel has to be brought to the plane
// Doesn't matter if container or not.
#appendto MetalBarrel #appendto MetalBarrel
func Exit(...) public func Initialize(...)
{ {
// dropping at plane? then put into plane AddTimer(this.CheckForPlane, 20);
if (Contained() && Contained()->GetAlive()) return _inherited(...);
}
private func CheckForPlane()
{
var plane = FindObject(Find_ID(Airplane), Find_AtPoint());
if (plane)
{ {
var plane = FindObject(Find_ID(Airplane), Find_AtPoint()); ScheduleCall(nil, Global.GameCall, 1,1, "OnPlaneLoaded", plane, this);
if (plane) RemoveTimer(this.CheckForPlane);
{
ScheduleCall(nil, Global.GameCall, 1,1, "OnPlaneLoaded", plane, this);
}
} }
return inherited(...); }
}