RedBeard
Member
Im trying to make a summon familiar ability which I got to work well enough but it only spawns it once.
I'm trying to get spawn one at a time but repeat process after minion dies(spawn new minion)
I'm trying to get spawn one at a time but repeat process after minion dies(spawn new minion)
Code:
#region Summon Familiar
public void SummonFamiliar()
{
if (this.Map == null)
return;
if (m_SpawnedFamiliar)
{
m_Familiar = null;
return;
}
if (m_SpawnedFamiliar)
{
if (m_Familiar != null && m_Familiar.Deleted)
m_Familiar = null;
return;
}
if (Hits < HitsMax / 2)
{
this.Say("Kal Xen Bal [Summon Familiar]");
switch (Utility.Random(5))
{
case 0:
this.m_Familiar = new VampireBatPK(this);
break;
case 1:
this.m_Familiar = new DarkWolfPK(this);
break;
case 2:
this.m_Familiar = new ShadowWispPK(this);
break;
case 3:
this.m_Familiar = new DeathAdderPK(this);
break;
case 4://default:
this.m_Familiar = new HordeMinionPK(this);
break;
}
this.FixedParticles(0x3728, 1, 10, 9910, EffectLayer.Head);
m_Familiar.PlaySound(m_Familiar.GetIdleSound());
((BaseCreature)this.m_Familiar).Team = this.Team;
this.m_Familiar.MoveToWorld(this.Location, this.Map);
this.m_SpawnedFamiliar = true;
}
else if (this.m_Familiar != null && this.m_Familiar.Deleted)
{
this.m_Familiar = null;
}
}