A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: need help on this, i beg you ppl, plz plz help, very easy questions

Hybrid View

  1. #1
    Member
    Join Date
    Mar 2002
    Posts
    36
    Ok everybody,

    I need to finish a flash 5 2d fighting game as soon as possible so please help me clear and quick . thanx ppl

    heres my problem:

    1. i had an ok lifebar but it just aint good enough (its probably because i did it myself ). I need a new one, it has to be a normal lifebar but with one difference (maybe all lifebars hav this, i dont know, if so its not a difference) it needs to be a bar but also has to have a remaining health number keeping, so at the end of a fight if the player wins the computer knows how much life the winner has left and add this number to a experience points total. Get it? What i need is a lifebar which also keeps the remaining health so it can easily be counted up to a total points number. Ok thats my first problem. Please post a clear actionscript text or send me an fla or just give me some advice or a different option.

    2. I need to know how i can do more then 1 keypress. So when space is pressed he punches but when space+control is pressed he kicks.

    3. I need a code for when the character passes the enemy on the x scale he flips over horizontally and faces to the right instead of to the left.

    Thanx ppl,

    appreciate it,

    Rui

  2. #2
    ....he's amazing!!! lesli_felix's Avatar
    Join Date
    Nov 2000
    Location
    London UK
    Posts
    1,506
    1. Maybe if you find the code for a preloader with percent loaded, you can adapt it. There's loads of open-source preloaders, have a browse through the tutorials/movies section.

    2. Have you tried just using two separate key-detections?

    If ((Key.isDown(Key.CONTROL))
    and ((Key.isDown(Key.SPACE))) {
    gotoAndPlay(specialmove)}

    3. Here's a simple way of doing it:

    If (maincharacter._x < enemycharacter._x) {
    maincharacter._xscale = -maincharacter._xscale}

    Remembering to use instance names, rather than movieclip names.


    Also, it's a lot easier for people in this forum to help you if they can see what you've already got.

    Hope this all helps.

  3. #3
    Senior Member
    Join Date
    Feb 2001
    Posts
    314
    1. I think you're approaching this backward. Rather than starting with a life bar and conisidering the number secondary, the number should be the main thing you keep track of. And the life bar is just a visual respresentation of the the number.

    Here's one approach:

    You'll need a variable for health (let's call the variable "health") and a movie clip for the life bar. The movie clip can be nothing more than a simple graphic of a bar.

    Start by setting health variable to 100. And attach this script to the life bar movie clip:

    _xscale = _root.health;

    That way, when the game starts, the life bar will be full size (100%).

    Whenever a fighter gets hit, decrease the health variable:

    if([player got hit]){
    health -= 10;
    }

    That would decrease his health by 10. Of course you can use whatever number you want.

    And as soon as health drops to 90, then the life bar's _xscale will change to 90, which will change to graphic to 90% of it's original width.


    2. What lesli said . . .

    Here's a suggested slight improvement, though:

    Code:
    if (Key.isDown(Key.SPACE)){
       if (Key.isDown(Key.CONTROL)){
          gotoAndPlay("kick");
       }else{
          gotoAndPlay("punch");
       }
    }
    That'll take care of both possibilities. If SPACE is pressed, you'll either kick (if CONTROL is also pressed) or you'll punch (if CONTROL isn't pressed.


    3. Again, what lesli said.


    Good luck! Fighting games are difficult (here's mine: http://www.frothworks.com/fightocracy.html )

  4. #4
    Member
    Join Date
    Feb 2002
    Posts
    51
    Thanx for all your help ppl, but as detailed as it was i still cant get it working. Can i send the .fla to any of you or someone else who can help me? So you can do it for me? None of the three things worked. I would really appreciate it. Mail me your email number and ill send over the fla.

    Thanx ppl,
    Rui

  5. #5
    Member
    Join Date
    Mar 2002
    Posts
    36
    I just made a stupid mistake, lol. I posted my latest post using my other account. The post reiniercash made was my post but in my reiniercash account. So the post reiniercash made was my post but using my other account. I dont know why i still use both accounts. I lost the password to my reiniercash account and made a new account as RrRrR, i found my password again lately for my reiniercash account and started using it again. Now im using both lol. So if you think you can help me out mail to:

    cryingdevil666@hotmail.com my RrRrR account

    or

    reiniercash@hotmail.com my reiniercash account.

    Thanx ppl,
    Rui

    (i signed the last post with "reinier", thats my real name. My nickname is Rui, so i sign my posts using one of the two)

    Was this confusing enough for you??????????????????????????????

    lol, sorry ppl, thanx for your time

  6. #6
    ....he's amazing!!! lesli_felix's Avatar
    Join Date
    Nov 2000
    Location
    London UK
    Posts
    1,506
    If the fla isn't too big, send it to flash@proanimate.com

    If it's more than 500k, ask me first. I'm on a slow dial-up connection.

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