ID:165699
 
Okay heres the problem...I want to spawn multiple clones at once...like say 16 in this case..as u might have guessed tajuu kage bunshin...well anyway i may hear some critizing from some of you and I want to clearly state now..I don't want to hear it, I don't care what you have to critize about my game and its a wots rip..yes many...back to the point..When I try to spawn them the delay thats not in code takes 30-50 secs for it to appear..let me show you and take a good look..
   //this part should be indented..not sure why its not ignore that plz
var/mob/npcs/Bunshin/K = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/L = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/M = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/N = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/O = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/P = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/Q = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/R = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/S = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/T = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/U = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/V = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/W = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/X = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/Y = new /mob/npcs/KBunshin
var/mob/npcs/Bunshin/Z = new /mob/npcs/KBunshin
usr.KbunshinN += 2
usr.bunshin += 4
usr.Chakragain()
if(K)
K.name = "[usr.name]"
K.original = usr
K.icon = usr.icon
K.overlays += usr.overlays
K.loc = locate(usr.x-1, usr.y, usr.z)
flick("smoke2",K)
K.max_exp = 2
K.exp = 2
K.tai = usr.tai/5
K.health = 1
sleep(1)
if(L)
L.name = "[usr.name]"
L.original = usr
L.icon = usr.icon
L.overlays += usr.overlays
L.loc = locate(usr.x-2, usr.y, usr.z)
flick("smoke2",L)
L.max_exp = 2
L.exp = 2
L.tai = usr.tai/5
L.health = 1
sleep(1)
if(M)
M.name = "[usr.name]"
M.original = usr
M.icon = usr.icon
M.overlays += usr.overlays
M.loc = locate(usr.x+1, usr.y, usr.z)
flick("smoke2",M)
M.max_exp = 2
M.exp = 2
M.tai = usr.tai/5
M.health = 1
sleep(1)
if(N)
N.name = "[usr.name]"
N.original = usr
N.icon = usr.icon
N.overlays += usr.overlays
N.loc = locate(usr.x+2, usr.y, usr.z)
flick("smoke2",N)
N.max_exp = 2
N.exp = 2
N.tai = usr.tai/5
N.health = 1
//The list for those continues on I'm shortening it to condense my message


Now as you can plainly see theres a lot to be made..is it a strain on the server or can the proc just be reading it slowly for some reason?
Doing all that at once will lag seriously, yes. That's alot to do.
In response to Pyro_dragons
Why is there a sleep(1) after each NPC values edited?

And god, that's ugly: You defined+created the variable objects in the long format... and seeing as how most of the values are the same for each mob, just modifying New() of that mob to do that information is a lot less hassle than typing it out for each and everyone.

- GhostAnime
You can easily shorten this if you'd use a for() loop. =)
In response to Android Data
O ok..never occured to me thx guys