ID:179458
 
I know this sounds dumb, but how do I place objects randomly at runtime? Also, is there anyway to make a mob's proc work from startup?
Airson wrote:
I know this sounds dumb, but how do I place objects randomly at runtime? Also, is there anyway to make a mob's proc work from startup?

Random objects at runtime is simple. Just select a random turf and create a new object there.
  var/x = rand(1,world.maxx)
  var/y = rand(1,world.maxy)
  var/z = rand(1,world.maxz)
  var/turf/T = locate(x,y,z)

  new/obj/your/object(T)

I'm not sure I fully understand your second question. If you want a proc to start when the mob is created, call it from mob/New().


/Andreas