35 lines
947 B
Plaintext
35 lines
947 B
Plaintext
void main()
|
|
{
|
|
location lTargetLoc;
|
|
effect eLight = EffectVisualEffect(VFX_IMP_LIGHTNING_M);
|
|
int nXPos, nYPos;
|
|
object oTargetArea = GetArea(OBJECT_SELF);
|
|
vector vNewVector;
|
|
int x=0;
|
|
object oMonster;
|
|
float DELAY = 2.0;
|
|
|
|
|
|
if(GetLocalInt(OBJECT_SELF,"IS_ACTIVE") == 0)
|
|
{
|
|
for(x=0;x<3;++x)
|
|
{
|
|
vNewVector = GetPositionFromLocation(GetLocation(OBJECT_SELF));
|
|
nXPos = Random(10) - 5;
|
|
nYPos = Random(10) - 5;
|
|
|
|
vNewVector.x += nXPos;
|
|
vNewVector.y += nYPos;
|
|
|
|
lTargetLoc = Location(oTargetArea, vNewVector, 0.0);
|
|
|
|
oMonster = CreateObject(OBJECT_TYPE_CREATURE, "stormrider", lTargetLoc, TRUE);
|
|
DelayCommand(DELAY,ApplyEffectToObject(DURATION_TYPE_INSTANT,eLight,oMonster));
|
|
}
|
|
|
|
SetLocalInt(OBJECT_SELF,"IS_ACTIVE",1);
|
|
DelayCommand(600.0,SetLocalInt(OBJECT_SELF,"IS_ACTIVE",0));
|
|
}
|
|
|
|
}
|