ID:177041
 
I'm making a medabots game and this is really bugging me:
Mobs follwing mobs...
Anyone know how i can make a player have a mob following him (his medabot)...
Any libs or jints'll do fine...

Layering...
When a player gains a medpart (limb) that medapart appears on his tin pet (skeliton) how would this be achieved??

-SpoOn
<code> mob var/mob/Follower //set to whoever is following you turf Entered(mob/M,turf/LastTurf) if(ismob(M)) if(M.Follower) walk_to(M.Follower, LastTurf, Lag = 1) </code>

Notice the mob is moving to the last turf that you were on. This will allow them to move between Z levels, if it stays directly behind you. So, you'll need a delay on player's movement, or they can be left behind. A better method would be to create an object, one per Z level, one per player, and the follower would move to that. If they are left behind, the object would stay at the exit point, the follower would move to it, and be moved to the same Z level as the person being followed, allowing it to continue following the mob that is being followed.
In response to Garthor
(Its me spoon)
Thanks gathor for the help but does anyone know about the 2nd question?
I've seen it done in other games (but with eyes and hair not limbs)
Where a player selects a colour hair and an icon is layered on top of him..
Hope that helps..
-Spoon (Yeah i know im thorg but my Forum id aint working..)
In response to Thorg
Look up overlays.
In response to Garthor
Thanks ,
But how do i add a follower?
At login i want a new follower to be produced next to him
(1,1,1) it can be of 2 types TINPET1 or TINPET2...
Any help will be apprechiated!
-Spoon