The Daily Click ::. Forums ::. Klik Coding Help ::. How would I make my character pick up an object?
 

Post Reply  Post Oekaki 
 

Posted By Message

JetpackLover



Registered
  01/03/2007
Points
  212
1st March, 2007 at 02:40:32 -

Like how its done in Super Mario 2(American)

I tried a few ways, and got decent results, but the hit detection between the boxes is buggy.

I need it so the boxes have their own gravity(or platform movement)

I just want to be able to pick up blocks, throw them, and stack them, and for them to have workable gravity.

I tried this, but it doesn't allow stacking, or gravity(platform movement)

upon pressing ctrl
+ player overlapping box
-> box: set animation to "carried"

+ animation "carried" of box is playing
-> box: set position relative to player

+ while ctrl is not pressed
+ animation "carried" of box is playing
-> box: set animation to "thrown"
-> box: set movement to pinball
-> box: set direction to
-> box: set speed to 50 or whatever

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


steve



Registered
  13/09/2002
Points
  200

VIP Member
1st March, 2007 at 03:59:00 -

Well, this is where default movements start to screw up your game. Are you quite new to all this? If so I recommend learning how to use custom movements for both the main character and the boxes otherwise, you will have problems with stacking/gravity etc. I assume you are using FUSION2 as you mentioned the "pinball movement" - tell us more about what you are trying to achieve.



Image Edited by the Author.

 
n/a

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
1st March, 2007 at 04:11:15 -

I used the pinball movement for some fireballs and it didn't work consistently enough. If you don't have slopes and all that a 360 degree movement will work for items bouncing and fastloops for items colliding if that's what you're after.

Image Edited by the Author.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

JetpackLover



Registered
  01/03/2007
Points
  212
1st March, 2007 at 04:19:20 -

I'm not that new at this, but there are somethings that are above my knowledge.

My character was going to have custom movement, but I decided to go with the Platform extension, as it suited my needs.

For the box throwing I have been switching between movements in this order. While the box is on the floor it has default platform, and when you pick it up it doesn't have any movement, and when you throw it, it has pinball movement, rinse repeat. Well I can pick up, and throw, thats all fine and dandy, but when I want to stack thats when things get jacked up. if I stack a bunch and try to take one, the character will take one, and the others will either float, or fall(messily) or in a rare occasion fuse with the other box.

The events I am using are

+Character is overlapping box
+Repeat while Z is pressed
-Set position of box relative to character

+Character is overlapping box
+(negate) repeat while Z is pressed
-Set movement to pin ball

+Box collides with floor
+Box collides with Box2
-set movement to default platform

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
1st March, 2007 at 05:10:12 -

Default platform movement is to blame I think.

Since you'd rather use the PMO instead of custom movement, why don't you use another PMO to handle boxes falling (if you use a fastloop, you probably could use one PMO). The default platform movement can't handle collisions, or lack thereof, worth shit.

Edit: Ugh, not using the pmo or the default movement for the stacking would be the best, all you need is gravity anyways, nothing complex.

Image Edited by the Author.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

JetpackLover



Registered
  01/03/2007
Points
  212
1st March, 2007 at 06:08:46 -

I'm at my wits end here...does anyone have a set of events that I can tweak maybe?

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
1st March, 2007 at 06:54:04 -

"I'm at my wits end here...does anyone have a set of events that I can tweak maybe?"

"-set movement to default platform" <TWEAK THIS EITHER BY USING ANOTHER PMO OR BY DOING CUSTOM MOVEMENT. If you say you don't like the way the default movement handles stacking and gravity then change it.

Or you can ignore every comment here and hope someone else gives you the same answer.

Image Edited by the Author.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

JetpackLover



Registered
  01/03/2007
Points
  212
1st March, 2007 at 08:26:45 -

but...I'm not ignoring anything, and I don't know how to do custom gravity, and I have looked at the tutorials, but there is just so many different ways of doing it, and I became really confused.

 
http://www.invincibletime.com/

Devlog for HD MMF Game Omulus. Check it out because it's gonna be awesome. http://omulus.tumblr.com/

Follow me on the twitters https://twitter.com/JetpackLover


Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
1st March, 2007 at 16:14:40 -

Actually if you want you could probably implement easier gravity. I'll make you something tonight maybe.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

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
1st March, 2007 at 16:38:22 -

My character was going to have custom movement, but I decided to go with the Platform extension, as it suited my needs.

I would also seriously suggest you try a custom movement. I've done so recently and any default movements just can't compare. You can do so MUCH with a custom movement when you know how.

Oh, and you can do easy-ass gravity in two lines of code!

>Always
+box is not overlapping the background
+flag 0 is off

Add 1 to box's Y position (it will fall as long as it doesn't hit the ground)

>Always
+box is overlapping the background
+flag 0 is off

Set flag 0 to on, set the box's Y position to (Y position - 1), play the "hitting the ground" sound


And that's all! So easy, even I can think of it! You need to set the box's Y position to Y position - 1 so that it won't stop inside the ground but on top of it. You can even have the game make a "box hitting the ground" sound for this event since it'll only play once instead of a bazillion times because of the flag.



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!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
1st March, 2007 at 16:48:38 -

"Super Mario 2(American)"

lol, as if the European or Japanese versions didn't have picking up items.

 
Old member (~2004-2007).

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
1st March, 2007 at 19:16:07 -

Uh, no, the Japanese SMB2 didn't involve picking things up. The Western SMB2 is basically a sprite hack of Doki Doki Panic, while the Japanese SMB2 is the one we call Lost Levels. In Super Mario 2 (US) is how we refer to our version to AVOID CONFUSION.

 
n/a

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
1st March, 2007 at 20:18:03 -

You can get a good version of Lost Levels on Super Mario All-Stars for the SNES. That's how I first saw it. It has poison mushrooms that can shrink (or kill) you, and incredibly tough jumps (the one is world 4 I can't get past.) The story is that Nintendo thought that US gamers were too unskilled / stupid and couldn't handle SMB2, so they made Doki-Doki panic in the likeness of Mario & co. and voila!

I like SMB2 (US), I don't get why so many people hate that game in general. Same for Simon's Quest, Adventure of Link.. Three sequels that did a 180 degree turn from their first games.

 
--

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

Radix

hot for teacher

Registered
  01/10/2003
Points
  3139

Has Donated, Thank You!VIP MemberGOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!
1st March, 2007 at 20:27:32 -

The story is that Nintendo thought that US gamers were too unskilled / stupid and couldn't handle SMB2, so they made Doki-Doki panic in the likeness of Mario & co. and voila!

Or, more likely, they just decided to use Mario for the localisation for marketing purposes.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click