Code:
mob
proc
Damage(mob/a,mob/e)//a=fireball , e=enemy hit by fireball
if(a.m_eff) Effect(a,e)//m_eff is a text string given to the projectile ("fire" in this case)
e.m_hp-=a.m_dmg
Deathcheck(a,e)
Effect(mob/a,mob/e)
if(a.m_eff=="fire")
Burn(a.owner,e,80)//owner being the person who shot the fireball
Burn(mob/a,mob/e,chance)//a=mob that shot the fireball , e is the mob hit , chance is the %chance that the fire will spread
world<<"debug 1"
var/list/burnlist=new()
for(var/mob/enemy/e2 in oview(e,2))
burnlist+=e2
world<<"debug 2"
var/list/toburn=new()
var/per=1
while(per&&burnlist.len>0)
world<<"debug 3"
var/temp=pick(burnlist)//randomly select mobs from nearby...
toburn+=temp
burnlist-=temp
if(rand(1,100)>chance)
per=0//...until it (by random percentage) stops
for(var/mob/burn in toburn)//within those special few chosen to be lit on fire
world<<"debug 4"
spawn(rand(1,15))//see how long it's gonna take for the fire to spread
world<<"debug 5"
burn.overlays+='burn.dmi'//light 'em up
Burn(a,burn,chance/2)//now make them spread to other mobs, at a reduced percentage
Deathcheck(mob/a,mob/e)
if(e.m_hp<=0)
a.blocked=0
if(a.owner) a.owner<<"gold!"
del e
Now, when I execute, and shoot a fireball into a group of mobs, I get this:
debug 1 // the initially hit mob check to see who it's lighting on fire
debug 2
debug 2
debug 2 //there are 5 mobs around it
debug 2
debug 2
debug 3
debug 3 //it picks 3 of those
debug 3
debug 4
debug 4 //it selects those 3...
debug 4
//and does nothing with them.
As you can see, nothing after the spawn() is even looked at.
Any help would be appreciated.