home *** CD-ROM | disk | FTP | other *** search
- function step()
- {
- _X = stuckTo._x + x_offset;
- _Y = stuckTo._y + y_offset;
- if(timerShrink-- < 0)
- {
- m_size *= 0.99;
- }
- _xscale = _yscale = m_size;
- if(m_size < 10)
- {
- destroy();
- }
- _rotation = (random(100) - 50) / 10;
- if(timerSmoke-- < 0)
- {
- timerSmoke = 6;
- _parent._parent.addDebris("smoke_raise",_X,_Y - _height / 2,random(360),m_size * 1.5);
- }
- if(timerDamage-- < 0)
- {
- timerDamage = 20;
- if(stuckTo.etype != "fire" && stuckTo.etype != "steel" && stuckTo.etype != "meteor")
- {
- stuckTo.takeDamage(Math.floor(m_size / 20) + 1,_X,_Y);
- }
- }
- }
- function destroy()
- {
- this.unloadMovie();
- }
- var timerShrink = 100;
- var timerSmoke = 0;
- var timerDamage = 20;
-