示例#1
0
global func FixElevator(object elev, iDig)
{
    var fBurned = GetID(elev)==ELVB;
    var x=GetX(elev), y=GetDefBottom(elev);
    elev->RemoveObject();
    elev = CreateConstruction(ELEV, x,y, -1, 100, true); // Fürs Fundament...
    elev->CreateShaft(iDig);
    AddEffect("NoEnergyNeed", elev, 1, 1);
    if(!fBurned) elev->GetActionTarget()->SetComDir(COMD_Down);
    else
    {
        RemoveObject(LocalN("pCase", elev));
        elev->ChangeDef(ELVB);
        SetCategory(1, elev);
        SetObjectLayer(elev, elev);
        SetCon(100, elev);
        AddEffect("Rebuild", elev, 1, 1);
    }
}
示例#2
0
func OnPlaneFinished(object plane)
{
  // todo: outro
  plane->CreateObjectAbove(Airplane, 0,0, NO_OWNER);
  plane->RemoveObject();
}
示例#3
0
func FxSelfdestructionTimer(object target, effect, int timer)
{
	CreateParticle("Magic",RandomX(-4,4),RandomX(-4,4),0,0,12+Random(10),target->GetClrModulation());
 	if(timer>175) target->RemoveObject();
 	return 1;
}