ID:176354
 
Well i'm working on something and i had this.

if(O in oview(1,M))
//otherstuff

But it doesn't seem that i can use the if here because its not checking for anything. Can someone tell me how to make a if that checks if something's in a oview of 1?
Unowuero wrote:
Well i'm working on something and i had this.

if(O in oview(1,M))
//otherstuff

But it doesn't seem that i can use the if here because its not checking for anything. Can someone tell me how to make a if that checks if something's in a oview of 1?

Assuming you have M and O properly defined, I believe this should work.
Unowuero wrote:
Well i'm working on something and i had this.

if(O in oview(1,M))
//otherstuff

But it doesn't seem that i can use the if here because its not checking for anything. Can someone tell me how to make a if that checks if something's in a oview of 1?

This should be fine, unless what you want is to look for a certain kind of object, not a specific one. In that case you'd want to use locate():
if(locate(/obj/mytype) in oview(1,M))
...
But if O is already a specific object and you want to see if it is in range, then your code should be fine.

Lummox JR
In response to Lummox JR (#2)
Yah thx Lummox JR, i was looking for a specific object. Well 3 of them but with your help would it matter? Wait i would just do it 3 times! Beautiful.