Yeah, here's what my subdevil does in Hasslevania and it works well:
What I did is to make a little invisible active picture always set to a few pixels behind Rovert (the hero). If he's facing right, it's something like "box set to Rovert X - 10" and if he's facing left it's something like "box set to Rovert X + 42". I say 42 because he's about 32 pixels wide himself.
And then you can always set the object or creature to look towards that invisible box. Voila!
(This will just make him follow you though, and not attack or anything else)
Edited by the Author.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
Deleted User
17th November, 2007 at 09:31:53 -
You can just make it follow the player's movement (like in Chrono Trigger). Otherwise, you'll have to create a platform movement for the other character, and you'll be dealing with a lot of detectors and programming possible scenarios where the character will have to attack or jump.
I just cloned the movement bits from the original character and placed them onto the following character. Replace the joystick or whatever you're using the control the player with a little follow system. With my game I've got it recording the players movement, but it cuts free of that when attacking an enemy. It then starts up a new system to get back to the player which includes calculating the vertical distance from the Player 2 to 1 and works out if it should jump or climb to get back to them.
Just make the following character use a PMO object, make him jump when he hits a wall, and follow the directions of the player, blah blah blah you can mock me but it works.
I made something like this once, i just made the other character mimmick the players movement with a small delay (because the other play always stood just behind.
And it worked well despite the simplicity.
Although you might need to add some extra events to handle accidentally losing your friend or if they need to do things like auto attack etc.
I just had a go at a system that makes him follow you, but memorises your jumps. So when you jump, a marker is left and a string gets recorded inside it like this:
"000111100111222200111"
That's basically your control state for every frame during the jump.
0 = not moving
1 = left
2 = right
This way he copies your jumps exactly, so he doesn't get stuck when you do a precision jump to a complex platform or area. But if he misses one jump marker, he gets out of sync and spazzes out.
It also looks rubbish having him imitate you when you jump for no reason (if you're just messing around, he picks up all your pointless jump markers and hops around exactly as you did).
It's annoying. I'll probably end up trying to build an engine that combines all the possible methods.
Originally Posted by Dr. Jamesa Claus I just cloned the movement bits from the original character and placed them onto the following character. Replace the joystick or whatever you're using the control the player with a little follow system. With my game I've got it recording the players movement, but it cuts free of that when attacking an enemy. It then starts up a new system to get back to the player which includes calculating the vertical distance from the Player 2 to 1 and works out if it should jump or climb to get back to them.