Here's what I got so far: This is just for the object: Water.
var/obj/O=/obj/Water3
for(O in oview(3,src))
var/obj/Thunder/C=new(O.loc)
for(var/mob/M in range(0,C))
if(M!=src||M!=src.Ally)
src.Electrify(M)
ID:156727
![]() Aug 8 2010, 2:16 pm
|
|
How would I go about looking for objects and turfs in someones view and creating thunder over that object/turf?
Here's what I got so far: This is just for the object: Water. var/obj/O=/obj/Water3 |
![]() Aug 8 2010, 2:38 pm
|
|
You'd want for(var/obj/Water3/O in oview(3,src))
|
Garthor wrote:
You'd want for(var/obj/Water3/O in oview(3,src)) Alright I got that down but how would I include the loop to also look for "turf/Water"? |
For multiple types, you'll need to broaden the scope of the search and then filter them manually, so:
for(var/atom/A in oview(3,src)) |
Garthor wrote:
For multiple types, you'll need to broaden the scope of the search and then filter them manually, so: for(var/atom/A in oview(3,src)) Thank you ^.^ It's working 100%. |