A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Creating Game.... Need Help

  1. #1
    BradyWhite.net Kac's Avatar
    Join Date
    Nov 2000
    Location
    Orem, UT
    Posts
    576
    I'm trying to create a fighting game, street fighter type game... I'm doing it very basic
    (push "d" move right, "a" move left, "r" attack)

    I just have a few questions...(I'm a newbie, got flash 5 two weeks ago)

    1. How do you tell a picture to move left or right when a command is pressed? I have basic knowledge of mouse event actionscript but need help. (I need a good telltarget tutorial... if you have a link plz give it to me)

    2. When a picture is against another picture and they hit the attack command, how do you make it known that the pictures are actually touching... from a programming standpoint. When Pic A touches Pic B and they hit the attack command, how do you know if it hit them or missed?

    3. When a picture hits another picture and they hit the attack command, I want the player's percentage displayed. I have done one movie with text variables in them, but how do you get a mathematically solved variable into a text field? (ex. attack does 15% damage so I want to subtract the 15% from the total life)

    I will have more questions when things pop out at me that I don't know how to do, so please bear with me.

    Thanks for all your help here at the message board!!!

  2. #2
    can anyone sew my main?
    Join Date
    Aug 2000
    Posts
    182

    mmmmmmmmmmm

    HAve you tried the tell target tutorial here on flashkit?

    http://www.flashkit.com/cgi-bin/tuto...ump.cgi?ID=168


    heres one for the collision detection

    http://www.flashkit.com/cgi-bin/tuto...ump.cgi?ID=131

    make sure you make it with a Fei-long character and tell me where it is LOL-I havent seen that game in years!
    [Edited by cyberskydive on 12-07-2000 at 06:32 AM]

  3. #3
    Senior Member Olorin's Avatar
    Join Date
    Aug 2000
    Posts
    1,151
    Some very basic tips/scripts:

    Turn your character into a movieclip, and put this code in it:

    OnClipEvent(enterframe){
    if (Key.isDown(Key.LEFT){
    this._x = this._x - 5
    }
    if (Key.isDown(Key.RIGHT){
    this._x = this._x + 5
    }
    }

    This will make your character move left or right when the appropriate arrow key is pressed.

    The fighting part is a bit more difficult, let's take punching as an example:

    You'll have to make another movieclip containing a fist. When a key is pressed, this fist should appear in the right place
    (you have to create several keyframes in your character's movieclip, and one of them should contain the fist) When a punch key is pressed, tell the movieclip to go to that frame. Now you can use the "hittest" function to check if the fist is overlapping the enemy.

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