The Daily Click ::. Forums ::. Klik Coding Help ::. Follow
 

Post Reply  Post Oekaki 
 

Posted By Message

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
17th November, 2007 at 08:54:31 -

Hello
I was wanting to code an object/creature that follows you everywhere, in a platform game.
Anyone know a good way to code this?

 
lol

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
17th November, 2007 at 09:09:02 -

lol, I once actually tried doing this with PMO objects and it worked rather well IMO, n00bish some might say, but it worked.

 
n/a

Hayo

Stone Goose

Registered
  15/08/2002
Points
  6946

Game of the Week WinnerHas Donated, Thank You!VIP MemberGOTM 3RD PLACE! - APRIL 2009Weekly Picture Me This Round 27 Winner!Weekly Picture Me This Round 41 Winner!Weekly Picture Me This Round 45 Winner!
17th November, 2007 at 09:10:04 -

I am doing this in Fishhead 4 by recording the player movement.

 
www.hayovanreek.nl

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
17th November, 2007 at 09:27:21 -

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)

Image 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.

Image Edited by the Author.

 

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
17th November, 2007 at 09:34:22 -

Ooops! I kind of assumed that your object or critter would be flying. If he's walking my method will look silly to say the least.

 
--

"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!

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
17th November, 2007 at 10:05:37 -

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.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
17th November, 2007 at 10:12:56 -

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.

 
n/a

Hayo

Stone Goose

Registered
  15/08/2002
Points
  6946

Game of the Week WinnerHas Donated, Thank You!VIP MemberGOTM 3RD PLACE! - APRIL 2009Weekly Picture Me This Round 27 Winner!Weekly Picture Me This Round 41 Winner!Weekly Picture Me This Round 45 Winner!
17th November, 2007 at 10:14:28 -

Or use a path movement

 
www.hayovanreek.nl

Ski

TDC is my stress ball

Registered
  13/03/2005
Points
  10130

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!KlikCast HelperVIP MemberWii OwnerStrawberryPicture Me This Round 28 Winner!PS3 OwnerI am an April Fool
Candy Cane
17th November, 2007 at 11:26:49 -

Lol I just made this using PMO http://www.uploading.com/files/QTVMMCYL/PMO_FOLLOW.zip.html

Don't lol at me

It kinda works still a bug but I guess it needs fastloops or whatever you coding folk call them.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
17th November, 2007 at 11:38:02 -

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.

 
.

Tim

I'm on here way too much

Registered
  25/08/2006
Points
  132

You've Been Circy'd!Clickzine StaffSilverNova MemberVIP MemberTurtle Power!Evil klikerWii OwnerHero of TimeGhostbuster!Pokemon Ball!
17th November, 2007 at 13:35:02 -

Funnily enough, Phizzy made quite a good thing on this featuring some cucumbers... If you have a search you might be able to find it?

 
http://www.SilverNova.co.uk


DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
17th November, 2007 at 17:40:53 -

Wow, this is deceptively tough to do...

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.

 
191 / 9999 * 7 + 191 * 7

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
17th November, 2007 at 18:18:59 -

Interesting ideas

 
lol

alastair john jack

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
17th November, 2007 at 18:40:14 -


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.



I think I'll do something like that.

 
lol
   

Post Reply



 



Advertisement

Worth A Click