Return2()
for(var/mob/m in world)
if("[m.name]([m.keyn])" == src.trainer)
var/pokemon/p = src
src.client.mob = m
m.PokeParty += p
m.CanSend = 1
return m
Sendout(mob/m)
src.loc = locate(m.x,m.y,m.z)
src.trainer = "[m.name]([m.keyn])"
src.owner = m
m.client.mob = src
Problem description:
Basically, I can send out the pokemon fine, all is well.
But when I goto return it, the pokemon stays at it's location, and there's one extra in the list (As if it duplicated.). How do I make it vanish like it was when you first got the pokemon (IE, only in list), and how do I prevent duplication?
Edit: Fixed the duplicates, but what about it not vanishing?
As for "returning" it, set its loc to null.
Also, instead of locate(m.x,m.y,m.z), just use m.loc.