Following
by Steven Doxey · in Technical Issues · 03/13/2007 (5:08 pm) · 5 replies
How can I get an object to follow the player object? We would like to have an animal follow our character around when it is hit by a charming attack. It is for a platformer game. We don't have any jumping mechanic, so the animal would just have to follow the main character across platforms and up either ramps or ladders.
#2
03/27/2007 (9:35 pm)
A simple way for TGE is the .setMoveDestination(%playeryouwanttofollow); and keep rescheduling it. Allthough like Lee said navigating obstacles is tougher.
#3
03/28/2007 (1:21 pm)
Thanks for the replies. I'm using TGB, Lee. Does .setMoveDestination(%playeryouwanttofollow) work for TGB as well Christian?
#4
03/28/2007 (1:22 pm)
Sorry, i've never used TGB. Hoefully someone else will know that one.
#5
03/29/2007 (12:42 pm)
Try it and let us know!!
Torque Owner Lee Latham
Default Studio Name
Presumeably we're talking about a bot, essentially, here. The tricky bit would be navigating obstacles...but again that would depend on whether we're talking 2d or 3d. 2d, you might get away with A* path finding or something like that.