1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
/**
Chunk of Lava
Hot molten stone from the inner earth.
@author Maikel
*/
local mat;
protected func Initialize()
{
AddEffect("IntEvaporate", this, 100, 1, this);
// Add light to the chunk.
SetLightRange(60, 40);
SetLightColor(FIRE_LIGHT_COLOR);
// Lava chunk is on fire.
//Incinerate(); // TODO: Wait for decent graphics
return;
}
protected func Hit()
{
if (!mat)
mat="DuroLava";
CastPXS(mat, GetCon() / 2, 35);
return RemoveObject();
}
private func FxIntEvaporateTimer(object target, proplist effect, int time)
{
// Some smoke trail.
Smoke(0, 0, 5);
Smoke(0, -5, Random(7));
if (time > 75)
{
Hit();
return -1;
}
return 1;
}
// Volcanoes aren't stored. But store lava chunks because authors might use them
// in other places.
//func func SaveScenarioObject() { return false; }
/*-- Proplist --*/
local Name = "$Name$";
|