if(choice=="Take")
var/item
for(item as obj in view())
if(item in view())
walk_towards(src, item, 1)
Problem description:
I am trying to get it so that you can choose from a list of items in sight, but it's not working. How can I get it to do what I need it to do?
HOLY SWEET MOTHER OF GOD, I got it working. Nevermind. Thanks for at least taking the time to read this.
In var/path/V, the path (/obj) here specifies what type to look for. The reason for using oview() is that there's no point for walking to an object over on top.
Now note there's a problem here and that is that it resets its direction for each item looped. To make it go to one item at a time:
If no argument is define in the locate(), it takes the path defined in the variable, which is /obj in this case.