ID:159343
 
OK, it seems in all my verbs, whenever I do something it displays a list of every possible one. Like, if I go to catch something, it displays a list of every mob close enough to catch. How do I remove this list?
I assume you're dealing with something like oview()?

Care to copy the code? What exactly are you trying to do? Auto select the closest mob instead of selecting from the list?
In response to Ruben7
Ruben7 wrote:
I assume you're dealing with something like oview()?

Care to copy the code? What exactly are you trying to do? Auto select the closest mob instead of selecting from the list?

Return(var/mob/M as mob in oview())
set name="Return Pokemon"
set category="Pokemon Commands"
if(M.owner == "None")
usr<<"That is not your Pokemon"
else
contents2 +=M
M.loc = null
usr<<"[M.name] returned"


Yes, oview, and yes auto select closest mob, but I also want to make another that selects everything possible for when they log off.
In response to Xyphon101
Xyphon101 wrote:
Ruben7 wrote:
I assume you're dealing with something like oview()?

Care to copy the code? What exactly are you trying to do? Auto select the closest mob instead of selecting from the list?

Return(var/mob/M as mob in oview())
> set name="Return Pokemon"
> set category="Pokemon Commands"
> if(M.owner == "None")
> usr<<"That is not your Pokemon"
> else
> contents2 +=M
> M.loc = null
> usr<<"[M.name] returned"

Yes, oview, and yes auto select closest mob, but I also want to make another that selects everything possible for when they log off.




Return()
set name="Return Pokemon"
set category="Pokemon Commands"

for(var/mob/pokemon/M in oview())
if(M.owner != "None")
contents2 +=M
M.loc = null
usr<<"[M.name] returned"
return


Auto selects closet pokemon that doesn't have none as owner in view.


The view and range procs should already order their return list by distance, so using a sorting thing would be pointless.