dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AC2 For A Megaman Like Game?

  1. #1
    Junior Member
    Join Date
    Aug 2015
    Posts
    26

    AC2 For A Megaman Like Game?

    OK so in flash 8 using AS2, I wanna make a flash game with a similar style to Megaman Zero. I found a platformer tut ( https://www.youtube.com/watch?v=0SwLJXvsM48 ) however when I use the script he posted below, my character just falls clear right through the floor. I can move the screen, but he won't stop falling. I also found another tut ( https://www.youtube.com/watch?v=2IRACXwgzn4 ) but need a little more coding, here is what I need to learn:

    How to get the character to STOP falling through the floor
    How to give the character both a shooting attack and a melee up close attack
    Jumping up against walls
    Sliding
    Breaking objects that gives you a HP (gotta pick up after breaking it free)
    How to deal damage, both from the enemies and the character (keep in mind want to be able to have two attacks, one is shooting from afar)
    A working AI, a enemy that moves in a pattern and a working boss with only 1 hurtable spot.
    A level that scrolls as you move (Vcam follows you, want the player to use the arrow keys to move btw) but ends with a wall so you don't fall off.
    A jump and fall animation and even a animation for when you land (so a script for jumping---falling---land)
    Working player and enemy HP (altho only the player and bosses will have HP Bars shown, the enemies you can't see)

    If anyone can help me with this, I'll be very grateful. Keep in mind I will have cutscenes before and after each lvl, so also need to know how to switch from cutscene to lvl and visa. Also a user messaged me offering help, but as that was sent months ago I'm not sure if he's even here still, if he and is and sees this will you know what all I need help with now.

  2. #2
    Junior Member
    Join Date
    Aug 2015
    Posts
    26
    75 views, yet no comments? I assume no one here knows how to help me, guess I'm forced to search Google and just hope I can find the scripts needed. I don't want to wait for weeks on end again, I'm used to getting zero help but hopefully someone will offer some soon. Rash here? Don't mean to be, but far too many times my posts are ignored...at other sites I mean, like I tried to get help working in RPG Maker but no one would bat a eye to really help just for free (luckily that project isn't dead).

    If anyone knows a AS2 for one of the things I listed, then please reply, 75 views but 0 replies isn't a good sign for me...so hoping someone can help, I am not going to sit around just waiting this time though, tired of just waiting just to give up on the idea after no one seems interested in helping...and yeah that guy who offered me help months ago. I'm not even sure my 2 replies were sent, they aren't in the inbox and I saw he was active yesterday and still no reply. Either he didn't see the messages or they indeed did not go through and the submit button is not send after all.

  3. #3
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,803
    So, to start with, I'd recommend you look at going with AS3. If nothing else, it has better performance. Just had to get that out of the way.
    How to get the character to STOP falling through the floor
    This has quite a few tutorials that you can look at: http://www.flashgametuts.com/tutoria...in-as2-part-1/
    It would be simple to add each platform into an array to check to see if your character is touching them and then to stop jumping. That tutorial is fairly good.
    How to give the character both a shooting attack and a melee up close attack
    The shooting attack you have to consider several things. 1) Create a sprite that moves how the attack should. 2) It's starting point is good. 3) Add each bullet into an array that the enemies check against. Checking how close the enemies would be good for this (collision detection can be complex). The next simplest way to check for collision would be a rectangular. 4) When the bullet hits the enemy you want the enemy to apply whatever penalties you have from the bullet. This could be a stunning penalty or a health penalty.

    Physical attacks would be similar. But it depends on how you want things to work. The simplest would be if the character is facing towards the enemy, if the character is close enough, then apply the penalty (subtracting the health, making the enemy move back from the hit, stunning the enemy).
    Jumping up against walls
    This is a bit more of a challenge doing. Here's an example that you can check out the logic of: http://wiki.scratch.mit.edu/wiki/Wall-Jumping
    It's in a different language but it should be readable.
    Sliding
    This is a bit different to regular movement. Probably have the character move at a certain speed for a certain amount of time that stops when you release the down key.
    Breaking objects that gives you a HP (gotta pick up after breaking it free)
    This is similar to the bullet collision. You just have to increase the number indicating health. (Check for max health if you want to be careful).
    How to deal damage, both from the enemies and the character (keep in mind want to be able to have two attacks, one is shooting from afar)
    When it comes down to it, health is just a number. How you handle health is really quite flexible. I mentioned how to handle it in the attacks.
    A working AI, a enemy that moves in a pattern and a working boss with only 1 hurtable spot.
    The AI is covered in the platformer tutorial above. The 1 vulnerable spot goes back to setting conditions for the bullet to collide with the enemy. You could just use math to figure out if the attack gets close enough to the spot. You could also make the boss composed of a bunch of parts working together with only one of them being vulnerable
    A level that scrolls as you move (Vcam follows you, want the player to use the arrow keys to move btw) but ends with a wall so you don't fall off.
    I think that the simplest way to handle this kind of thing is to have a global position that everything else is positioned against but the tutorial should cover this.
    A jump and fall animation and even a animation for when you land (so a script for jumping---falling---land)
    Look at sprite animation. Essentially you can have several different animations on a timeline with a starting and stopping point. This is common in flash. So standing animation starts on frame 1 and ends on frame 25. 26 to 50 could be walking and so on.
    Something like this: http://flashtutor.org/index.php/anim...-as2-in-flash/
    Working player and enemy HP (altho only the player and bosses will have HP Bars shown, the enemies you can't see)
    HP is basically a variable. You just need to keep on checking it to see if the character has dies (health <= 0). The health bar could be handled several ways. I'm sure you could find several good examples online but you could just use actionscript to draw a rectangle and change the size based upon a percentage of the bar.scalex = current health / max health.
    .

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center