The Daily Click ::. Forums ::. Klik Coding Help ::. Variable Jumping.
 

Post Reply  Post Oekaki 
 

Posted By Message

Marvel Hero



Registered
  15/08/2003
Points
  412
1st November, 2003 at 17:33:17 -

Does anyone know how to make a characters jump hieght dependent on how long the jump buttons pressed?

 
n/a

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
1st November, 2003 at 19:31:51 -

It's a bit trickey if you havent done it before. Someone might know a faster/easier way...?

I do it by setting up an alterable value to store how long the key can be pressed for... It's sort of hard to explain, so I'll upload an example..........

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
1st November, 2003 at 19:53:42 -

Bleh, there's a problem with the new beta that's come out, when I try to do it MMF crashes. I'll have to report it and get back to you on that example.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
2nd November, 2003 at 03:19:41 -

If you don't mind not using your own custom engine, use the PMO that can implement variable jumping.

Or custom:
~pressed ctrl - alterable value a = 10

~repeat while ctrl is pressed - alt.b = alt.b + 1
+altb<20

player collides with ground - alt.b = 0

Then just add your own gravity and that should work, providing you use alterable val a as your jumping counter. Btw i just thought of this then and i haven't tested it so it might not work :/.

-Andy

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
2nd November, 2003 at 03:57:41 -

Andy: That's more or less what I do.

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
2nd November, 2003 at 10:56:38 -

i got a tut on my site

http://www.geocities.com/algamesuk/vj.zip

thats one possible way

 
.

Keatonian



Registered
  15/07/2002
Points
  571
2nd November, 2003 at 11:05:36 -

Have A for Vert movement and C for jump counter.

Bottom collider overlapping ground:
Set A to 0
Set C to 5
Set Flag 1 On

Always:
Set Y pos of player to (Y pos + A)

Repeat while pressing shift:
+C is greater then 0
+Flag 1 is on
+every 4/100 second
Subtract 1 from C
Subtract 1 from A

Bottom collider is not touching ground:
+ (X) Repeat while pressing shift
Set Flag 1 off

Simple as Pie (and pie is easy)
AA: is that what you said? I tried to explain it more
deeply if so. Otherwise I post this as another way.

(PS: I left B for Horz movement)

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Kris

Possibly Insane

Registered
  17/05/2002
Points
  2017
2nd November, 2003 at 11:27:08 -

from what ive heard pie can be quite difficult

 
"Say you're hanging from a huge cliff at the top of mt. everest and a guy comes along and says he'll save you, and proceeds to throw religious pamphlets at you while simultaniously giving a sermon." - Dustin G

Keatonian



Registered
  15/07/2002
Points
  571
2nd November, 2003 at 11:44:06 -

Even if its hard for you, its worth it

 
-Above post is ancient and probably irrelevant-

An old account of mine, recently cleared out. It's a blast to the past, the age was marked as 14 when I found it. If you know where to look, you can track me. Au revoir.

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
2nd November, 2003 at 15:37:24 -

It's not that hard, just have to think around clickteam products. Make sure it's only done when the jumping animation is playing, otherwise the character will float slowly towards the ground.


 
Craps, I'm an old man!
   

Post Reply



 



Advertisement

Worth A Click