ID:148179
 
Ok, I have a proc to randomly place 7 objects on the map here, but it doesnt do anything, nope, not a damn thing.

var/dball = list(/obj/dball/dball1,/obj/dball/dball2,/obj/dball/dball3,/obj/dball/dball4,/obj/dball/dball5,/obj/dball/dball6,/obj/dball/dball7)

obj/proc/scatterballs()
var/X = rand(1,world.maxx)
var/Y = rand(1,world.maxy)
var/Z = 1
for(var/turf/T in locate(X,Y,Z))
if(T.allowball==1)
src.loc = locate(T)
dball-=src
else
src.scatterballs()


world
New()
..()
for(var/obj/dball/D in dball)
D.scatterballs()



Does anyone spot the reason, or lack of reason, that this proc does jack-squat?
You're never actually creating them...

Just change your world.New proc to this:

world
New()
..()
for(var/obj/dball/D in dball)
D = new()
D.scatterballs()
In response to SuperSaiyanGokuX
Oh..thanks. *feels stupid*
In response to Jotdaniel
Erm...still nothing.
In response to Jotdaniel
maybe its impossible
In response to Nave
one is only limited by one's imagination and knowledge...
In response to Jotdaniel
Jotdaniel wrote:
Erm...still nothing.

What does your code look like now?

Having not read SSGX's post, I can't exactly tell what he advised you to do. At least part of the problem is readily apparent to me though.

Lummox JR
Jotdaniel wrote:
for(var/turf/T in locate(X,Y,Z))

"locate(x,y,z)" returns a turf. Turfs cannot contain other turfs. =)

Get rid of that for loop, and just set <code>var/T=locate(X,Y,Z)</code> instead.