ID:166489
 
Is there a way to create another mob of the same type of another variable?

var/mob/A = new/mob/Troop

How would you go about creating another mob of the same type using a variable without having to do var/mob/B = new/mob/Troop again?
You could try this, not to sure if it will work.

mob/proc/spawn100guys()
var/howmany=0
while(src)
if(howmany>=100)break
var/mob/a=new /mob/Troop(src.loc)
howmany++
sleep(10)//wait a second before next guy
<dm>

That could work, but it would just spawn a bunch where you stand.
In response to Evidence
Well, what i wanted to do was to make a mob asigned to a variable each, however I found a way. Thanks.