The Daily Click ::. Forums ::. Klik Coding Help ::. HELP NEEDED! How do i do a Rockman X (Megaman X) Style Dash and Dash Jump?
 

Post Reply  Post Oekaki 
 

Posted By Message

Axel Z Raiser

10

Registered
  27/07/2013 23:51:10
Points
  11
30th July, 2013 at 30/07/2013 15:52:48 -

Hi, let me introduce myself, my name is Axel and am new to these forums and its nice to meet you all.

I would like to know if there is a way to do a dash like in Rockman X (Megaman X) by pressing a key and the player not doing anything except only jumping when the dash is executed and i would also like to know how to increase the momentum of the jump when the dash is executed. Any help would be greatly appreciated oh and if possible , i would like it to use PMO because i am a beginner and i found fast loops a little complicated. If needed here is a sample of my game with basic movements:
Left Arrow - Move Left
Right Arrow - Move Left
Z - Jump

http://www.mediafire.com/download/mdvyahevrwuvmqo/Rockman_X_Engine_Version_0.0.1_Basic_Movement.mfa

 
n/a

-Liam-

Cake Addict

Registered
  06/12/2008
Points
  556

Wii OwnerIt's-a me, Mario!Hero of TimeStrawberry
30th July, 2013 at 30/07/2013 16:04:00 -

Hi, welcome to the forums. I'm terrible at MMF, so you should wait for someone else to respond, but...

I'd do it be turning on a flag when the key is pressed. When the flag is on, a value will constantly increase. When this value hits certain numbers, you'd tell the X Velocity to increase. When it reaches the highest value you'd like, you reset the X Velocity to normal and turn the flag off. You can also throw some animation events into the mix, too.

Again, wait for someone else to respond, as I always do everything wrong...

 
Image

Tell 'em Babs is 'ere...

Axel Z Raiser

10

Registered
  27/07/2013 23:51:10
Points
  11
30th July, 2013 at 30/07/2013 16:09:18 -

I know about flags and velocity however how would i make the character move by pressing the dash key only and nothing else? oh and thanks for replying

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th July, 2013 at 30/07/2013 16:23:56 -

Liam's idea looks like it would work pretty well for something akin to a Super Metroid dash. TO make a dash button, however, all you need is a flag that gets set on when the dash key is pressed and toggled off after a certain amount of time (however long you want the dash to last).

For example:
http://pastebin.com/raw.php?i=JTH2f2n2

(replace anything in all caps with constants of your choosing)

As a side note: It is really a lot easier to use fast loops than PMO for a lot of things, as it gives you more freedom with movement. ThatGuyOverThere123 has a really great series on platformers using fastloops, it's how I and I'm sure many others here learned. THe first video is herehttp://www.youtube.com/watch?v=H0X0SCSnTOg

Edited by monkeytherat

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Axel Z Raiser

10

Registered
  27/07/2013 23:51:10
Points
  11
30th July, 2013 at 30/07/2013 16:31:03 -

Thank you very much for posting however sorry if i asked this question again but how do i make the player move by not pressing the left or right but only be pressing the dash button and allow the player to jump during the dash keeping the momentum of the dash while jumping like in Rockman X(Megaman X) and thanks for the code however i am doing a Rockman X (Megaman x) Fan game so the dash is really important. Oh and i tried fast loops before and many times i had alot of bugs/glitches with animation and coliders. However thanks for the video.

Edited by Axel Z Raiser

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th July, 2013 at 30/07/2013 16:40:53 -


Originally Posted by Axel Z Raiser
Thank you very much for posting however sorry if i asked this question again but how do i make the player move by not pressing the left or right but only be pressing the dash button and allow the player to jump during the dash keeping the momentum of the dash while jumping like in Rockman X(Megaman X) and thanks for the code however i am doing a Rockman X (Megaman x) Fan game so the dash is really important. Oh and i tried fast loops before and many times i had alot of bugs/glitches with animation and coliders. However thanks for the video.



My code does that, I'm not sure what the problem is.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Axel Z Raiser

10

Registered
  27/07/2013 23:51:10
Points
  11
30th July, 2013 at 30/07/2013 16:50:58 -

I understand however i dont understand some of the events or what they are (forgive i am a noob) like: Stun and dash timer. If you could send me an example than i would understand a bit more about eventing. However , your I thank you alot for putting that code up.

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th July, 2013 at 30/07/2013 17:15:43 -

Oh, I see. I unfortunately do not have mmf2 installed on my computer at the moment, but perhaps I can explain my syntax.

when I say something like player.dash_timer or player.stunned, I am talking about an active called "player" with an alterable value called "dash_timer" or a flag called "stunned". In this example, the active "player" has 2 flags: "dash_flag" and "stunned". "dash_flag" is set on when Rockman is dashing and off when he is not. The same goes for "stunned". "player" also has some alterable values: "dash_timer", "stun_timer", and "direction". The timers are just used to keep track of how long Rockman is supposed to be stunned or dashing for. I only use these instead of the built in timer because I found that the timer not only can be hard to use but also less flexible. When I write "If a == b", it means "check if a is equal to b". However, If I write "a = b" it means "set a to be equal to b". A "->" sign means that the following is the result if the previous statement is true. For example, "If a == b -> b += 5" means "if a and b are the same, add 5 to b" Finally, anything in ALL CAPS means that it's just a placeholder and you should fill in whatever number you think works best.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Axel Z Raiser

10

Registered
  27/07/2013 23:51:10
Points
  11
30th July, 2013 at 30/07/2013 17:23:47 -

I see! Thanks a million sorry for not understanding it properly. You are a life saver One last question is does it work with PMO? if not i will have to study more about fast loops.

Edited by Axel Z Raiser

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th July, 2013 at 30/07/2013 17:33:05 -

I don't personally use PMO, but I'm sure it will work perfectly fine with it. This method doesn't rely on anything to do with fast loops, so I see no reason that it wouldn't.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th July, 2013 at 30/07/2013 17:33:08 -

I don't personally use PMO, but I'm sure it will work perfectly fine with it. This method doesn't rely on anything to do with fast loops, so I see no reason that it wouldn't.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Axel Z Raiser

10

Registered
  27/07/2013 23:51:10
Points
  11
30th July, 2013 at 30/07/2013 17:43:39 -

Thanks Aloooot! i have been diging on the internet to know how to do this, i will mention you in the credits of my engine. and thanks again it helps alot how do i add points to your account?

 
n/a

monkeytherat

Hero of Time Jr

Registered
  07/11/2010
Points
  1293

VIP MemberI donated an open source project
30th July, 2013 at 30/07/2013 17:47:07 -

You are very welcome and thank you I believe you can donate points to a user from their profile, but that really isn't necessary; I would rather you keep your points for yourself.

 
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program.
The rest of them will write Perl programs.

Axel Z Raiser

10

Registered
  27/07/2013 23:51:10
Points
  11
30th July, 2013 at 30/07/2013 18:24:21 -

Thanks a lot guys , really great help

 
n/a
   

Post Reply



 



Advertisement

Worth A Click