ID:178688
Apr 17 2002, 12:21 pm
|
|
Is there a way to lets say you build a house but there is no power so citizens dont come, but if there is a power plant 9 tiles away the people for that house will come. Is there a way to set this?
|
In response to Strange Kidd
|
|
I tried it but i seem to get errors. Any other suggetions. And how would you add pop to the person who made it. I cant use usr or src
|
In response to Strange Kidd
|
|
if i use this:
Power_Plant for(var/turf/Residental/T in oview(9)) if(src.loc==T) Pop += 20 I got about 14 errors. Hmmm... |
In response to Tazor07
|
|
Are you calling this on a proc or what because I am not seeing where it is being called.
|
In response to Super16
|
|
i didnt know you needed to make a proc
|
In response to Super16
|
|
Hmmm when i tryed using New() as the proc the power plant still didnt seem to add pop for every residental in 9 tiles:
PowerPlant icon = 'Turf.dmi' icon_state = "PowerPlant" New() for(var/turf/Residental/T in oview(9)) if(src.loc==T) Pop += 20 |
obj/House
for(var/obj/power_plant/O in oview(9))
if(src.loc==o)
//do rest here
this might work might not ask an oldbie if this will work