groupage? in Developer Help
|
|
Code:
proc/grp_walk(list/Mobs,turf/Trg) var/Size = Mobs.len var/DivideNum = 2 for(var/i=2 to 100) if(isloc(locate(Trg.x+round(Size/i,1),round(Trg.y+Size/i,1)))) DivideNum = i;break var/list/New_Locs = block(locate(Trg.x,Trg.y,Trg.z),locate(Trg.x+round(Size/DivideNum,1),round(Trg.y+Size/DivideNum,1),Trg.z)) for(var/i=1 to Size) walk_to(Mobs[i],New_Locs[i])
|
Problem description:
Well I am making a proc that makes a group of mobs move to a turf's location. But I'm having trouble making them all find good locations on the map. Anyone know how to fix this?
-Ryan
|
I'm not sure what you mean by good location on map. But if your talking about a random location where there is not another dense obj or mob, try this:
Depending on the size of your maps you can set min/max X,Y,Z variables accordingly.