Powered by Invision Power Board

 
    Reply to this topicStart new topicStart Poll

> Triple Jumping in Game Maker, also other stuff
United States
Spritanium
Posted: Aug 2 2008, 06:57 PM
Quote Post


ايم مثلي ال
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 4437
Member No.: 959
Joined: 8-April 05

Status: (0d) [--]


I read through other topics on triple jumping, but I still need some help. I would like to have a triple jump variable that goes up once every time the player hits the ground after a jump, but I don't know how I would do this.

I also need to know the simplest way of making wallkicking work. I've never been able to figure it out.

The final thing I need to know is much less complex. I just need to know how to make the player ease in and out of movement (i.e. making him slide slightly after he stops running).

Also, don't give me code, just explain a way of doing these things. If you give me code, I'll be tempted to copypasta. Then I won't learn anything, will I?

So yeah, it'd be cool if someone could explain any of this to me.


--------------------
PMEmail PosterAOLYahooMSN
Top
United States
Pucifur
Posted: Aug 2 2008, 07:04 PM
Quote Post


Standard Member
[S][*][*][*][*]
[*][*][*][*][*]
[*][*][*][*][*]


Group Icon
Group: Site Staff
Posts: 6357
Member No.: 1035
Joined: 10-May 05

Status: (0d) [--]


Wall kicking is simple.

Check for two things in the jump button:
1. Place below the player is free
2. Place directly to the left or right of the player is occupied by a wall

If both these conditions are met:
1. Set the vertical speed to a negative number
2. Set the horizontal speed to a positive or negative number, respectively (depending on which side the wall the player is kicking off of is on).



For triple jumps, make a variable like "jump". In the step event:
1. Check to see if the ground is directly below the player
2. If it is, have jump equal 3

In the jump button:
1. If the variable jump is greater than 0, subtract 1 from the variable jump.

This way, the triple jump is reset every time the player is directly above the ground, and if jump hits 0, you can't jump in the air anymore.

This post has been edited by Pucifur on Aug 2 2008, 07:12 PM


--------------------
- P - U - C - I - F - U - R -
got one
user posted image
PMEmail Poster
Top
United States
Spritanium
Posted: Aug 2 2008, 07:14 PM
Quote Post


ايم مثلي ال
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 4437
Member No.: 959
Joined: 8-April 05

Status: (0d) [--]


QUOTE (Pucifur @ Aug 2 2008, 05:04 PM)

For triple jumps, make a variable like "jump".  In the step event:
1. Check to see if the ground is directly below the player
2. If it is, have jump equal 3

In the jump button:
1. If the variable jump is less greater than 0, subtract 1 from the variable jump.

This way, the triple jump is reset every time the player is directly above the ground, and if jump hits 0, you can't jump in the air anymore.


How would I make it so the value of jump actually effects the height of the jump?

This post has been edited by Spritanium on Aug 2 2008, 07:16 PM


--------------------
PMEmail PosterAOLYahooMSN
Top
United States
Pucifur
Posted: Aug 2 2008, 07:17 PM
Quote Post


Standard Member
[S][*][*][*][*]
[*][*][*][*][*]
[*][*][*][*][*]


Group Icon
Group: Site Staff
Posts: 6357
Member No.: 1035
Joined: 10-May 05

Status: (0d) [--]


QUOTE (Spritanium @ Aug 2 2008, 07:14 PM)
What do you mean by "less greater"?

Also, how would I make it so the value of jump actually effects the height of the jump?

It was a typo. I've fixed the post.

And in the jump key:
1. If the variable jump is 3, set the vspeed to -7
2. If the variable jump is 2, set the vspeed to -5

And so on.


--------------------
- P - U - C - I - F - U - R -
got one
user posted image
PMEmail Poster
Top
United States
orange452
Posted: Aug 2 2008, 07:18 PM
Quote Post


...and brotha, I hurt people...
[*]

Group Icon
Group: Members
Posts: 519
Member No.: 3337
Joined: 21-February 07

Status: (0d) [--]


jump key:
if jump=0
{
jump=1
vspeed=8+myjump
}


step:
if position_meeting(x,y+1,ground_obj) and jump=1 and vspeed>0
{
jump=0
myjump+=2
alarm[0]=10
}
if myjump>=3
{
myjump=0
}



alarm 0:
if vspeed=0
{
myjump=0
}

do you get that?


--------------------
user posted image
************************************************************
PMEmail PosterUsers Website
Top
United States
Pucifur
Posted: Aug 2 2008, 07:19 PM
Quote Post


Standard Member
[S][*][*][*][*]
[*][*][*][*][*]
[*][*][*][*][*]


Group Icon
Group: Site Staff
Posts: 6357
Member No.: 1035
Joined: 10-May 05

Status: (0d) [--]


QUOTE (orange452 @ Aug 2 2008, 07:18 PM)
code

He specifically asked for no code.


--------------------
- P - U - C - I - F - U - R -
got one
user posted image
PMEmail Poster
Top
United States
Spritanium
Posted: Aug 2 2008, 07:30 PM
Quote Post


ايم مثلي ال
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 4437
Member No.: 959
Joined: 8-April 05

Status: (0d) [--]


QUOTE (Pucifur @ Aug 2 2008, 05:17 PM)
It was a typo.  I've fixed the post.

And in the jump key:
1. If the variable jump is 3, set the vspeed to -7
2. If the variable jump is 2, set the vspeed to -5

And so on.

You've been really helpful, but I still have a problem :[

For whatever reason, the character automatically does a triple jump for every jump. If you want, I can PM you the gmk so you can see what I did wrong.

By the way, the wall kicking worked perfectly, thank you

This post has been edited by Spritanium on Aug 2 2008, 07:31 PM


--------------------
PMEmail PosterAOLYahooMSN
Top
United States
Pucifur
Posted: Aug 2 2008, 07:31 PM
Quote Post


Standard Member
[S][*][*][*][*]
[*][*][*][*][*]
[*][*][*][*][*]


Group Icon
Group: Site Staff
Posts: 6357
Member No.: 1035
Joined: 10-May 05

Status: (0d) [--]


QUOTE (Spritanium @ Aug 2 2008, 07:30 PM)
You've been really helpful, but I still have a problem :[

For whatever reason, the character automatically does a triple jump for every jump. If you want, I can PM you the gmk so you can see what I did wrong.

Sure, I'll take a look at it. Could very well be my fault, actually.


--------------------
- P - U - C - I - F - U - R -
got one
user posted image
PMEmail Poster
Top
United States
Spritanium
Posted: Aug 2 2008, 07:40 PM
Quote Post


ايم مثلي ال
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 4437
Member No.: 959
Joined: 8-April 05

Status: (0d) [--]


QUOTE (Pucifur @ Aug 2 2008, 05:31 PM)
Sure, I'll take a look at it. Could very well be my fault, actually.

PM'd it to you.


--------------------
PMEmail PosterAOLYahooMSN
Top
United States
orange452
Posted: Aug 2 2008, 07:48 PM
Quote Post


...and brotha, I hurt people...
[*]

Group Icon
Group: Members
Posts: 519
Member No.: 3337
Joined: 21-February 07

Status: (0d) [--]


did you look at my post?


--------------------
user posted image
************************************************************
PMEmail PosterUsers Website
Top
United States
Spritanium
Posted: Aug 2 2008, 07:53 PM
Quote Post


ايم مثلي ال
[*][*][*][*][*]


Group Icon
Group: Members
Posts: 4437
Member No.: 959
Joined: 8-April 05

Status: (0d) [--]


QUOTE (orange452 @ Aug 2 2008, 05:48 PM)
did you look at my post?

QUOTE (Pucifur)
He specifically asked for no code.


This post has been edited by Spritanium on Aug 2 2008, 08:01 PM


--------------------
PMEmail PosterAOLYahooMSN
Top
United States
Pucifur
Posted: Aug 2 2008, 08:08 PM
Quote Post


Standard Member
[S][*][*][*][*]
[*][*][*][*][*]
[*][*][*][*][*]


Group Icon
Group: Site Staff
Posts: 6357
Member No.: 1035
Joined: 10-May 05

Status: (0d) [--]


You had the wall jumping numbers backwards. It should have started at 3 and worked its way down to 0.

However, you may be wondering why I set global.variable_triplejump to "2". I did this because the step event reset the jumps to 3 immediately after the jump. To avoid having 4 jumps, I just subtracted a number straight off the top, so the counter starts at two.

In other words, the first jump counts towards one of the three, so you only need two more jumps in the air.


--------------------
- P - U - C - I - F - U - R -
got one
user posted image
PMEmail Poster
Top
United States
SuperMarioMaster
Posted: Aug 2 2008, 08:24 PM
Quote Post


It's been real
[*]

Group Icon
Group: Members
Posts: 2145
Member No.: 4476
Joined: 22-September 07

Status: (0d) [--]


Oh hey, I made my own triple jumping example
It uses super simple code

But yea thats still code


--------------------
PMEmail Poster
Top
Canada
Mewizkuit
Posted: Aug 2 2008, 10:00 PM
Quote Post


CHARMANDER
[*][*][*][*]

Group Icon
Group: Members
Posts: 4397
Member No.: 2508
Joined: 16-August 06

Status: (0d) [--]


QUOTE (orange452 @ Aug 2 2008 @ 05:48 PM)
did you look at my post?

QUOTE (Pucifur)
He specifically asked for no code.

I loled for some reason.


--------------------
QUOTE
whenever i feel like clicking "reply"
i stop and think to myself, "why"
will it be a post to be remembered by?
or will i scare off a n00b and tell him to die?
PMEmail PosterMSN
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

  Topic Options Topic Options Reply to this topicStart new topicStart Poll

 




[ Script Execution time: 0.0561 ]   [ 13 queries used ]   [ GZIP Enabled ]   [ Server Load: 0.42 ]