protected func Initialize() { // Zufällige Größe if (Random(5)) DoCon(-Random(20) - 40); else DoCon(-Random(50) - 20); // Zufällige Form SetAction("Grass"); SetPhase(Random(2)); if (!Random(20)) SetPhase(2); // Zufällige Richtung if (Random(2)) SetDir(DIR_Right); // Drehung nach Erdoberfläche var x_off = 18 * GetCon() / 100; var y_off = 15 * GetCon() / 100; var slope = GetSolidOffset(-x_off, y_off) - GetSolidOffset(x_off, y_off); SetR(slope); // Höhe anpassen while (!GBackSolid(0, 5)) SetPosition(GetX(), GetY() + 1); // Gras bleibt hinter Bäumen MoveBehindTrees(); ScheduleCall(0, "ListenToTime", 1); }
protected func Initialize() { Roll(); if (!Random(3)) DoCon(-Random(40)); return(1); }
protected func Initialize() { DoCon(Random(50)); if (Random(2)) SetGraphics("1"); return; }
func Decaying() { if (GetCon()<20) RemoveObject(); else DoCon(-5); return true; }
// Sets the completion of this to new_con. global func SetCon(int new_con, int precision, bool grow_from_center) { return DoCon(new_con - GetCon(), precision, grow_from_center); }
protected func Decaying() { DoCon(-2); }
private func Melt() { DoCon(-2); CastPXS("Water",8,0); }
protected func Initialize() { DoCon(-20-Random(50)); }