ID:144882
 
Code:
var/obj/buildable/O = new src.type(usr.loc)
for(var/area/outside/X in range(3,O))
new /area/light(X.loc)


Problem description:
Ok, so this is how it is suppose to work, I lay down a lamp post and 3 tiles around that lampost I want to create a patch of area/light. Any idea why this isn't working?? no errors.
var/obj/buildable/O=new src.type(usr.loc)
for(var/area/outside/X in block(locate(O.x-3,O.y-3,O.z),locate(O.x+3,O.y+3,O.z)))new/area/light(X)

<small>Untested, 12 am.</small>

-- Data
In response to Android Data
tahts a bad bad bad android_date. it doesnt work!
In response to Android Data
Android Data wrote:
> var/obj/buildable/O=new src.type(usr.loc)
> for(var/area/outside/X in block(locate(O.x-3,O.y-3,O.z),locate(O.x+3,O.y+3,O.z)))new/area/light(X)
>


<code>block()</code> returns turfs, so good luck finding any /area objects in there.

Since only on instance of an area is in existance, you have to loop through the turfs within the 3 tile radius and place areas under the turfs seperatly.

var/obj/buildable/O = new src.type (usr.loc)
for(var/turf/T in view(3, O))
new /area/light (T)


~~> Unknown Person