User Tag List

Results 1 to 7 of 7

Thread: help with extremely simple sword fighting (not an AI problem)

  1. #1
    Clicker Multimedia Fusion 2 DeveloperAndroid Export Module

    Join Date
    May 2010
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help with extremely simple sword fighting (not an AI problem)

    I'm making a very simple sword fighting system for use in one of the levels of my game. I have the AI movement pretty much completed, and I also have the basic sword attack and an air attack.

    I'm working on a blocking move now, where the player can hold down a button and block an attack from one side. Doing this properly means modifying the way my enemies attack, and that is where I'm having trouble.

    I need to make an enemy attack where when the enemy enters into a box around the player, they leap toward the player and attack one time and then leap away.

    This game is a side-scrolling platformer btw.

    Any help would be appreciated, and if I need to give more details, let me know. Thanks!

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export Module
    ChrisBurrows's Avatar
    Join Date
    May 2011
    Location
    Tasmania, Australia
    Posts
    622
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is relatively simple. The exact code depends on your animations, the size of your objects, the width of the box around your player, etc. Upload your mfa and we can help you out.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperAndroid Export Module

    Join Date
    May 2010
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here:

    https://www.dropbox.com/s/bsvgju40a0...ord_combat.mfa

    Don't make fun of my attempt at AI.

    Line 8 and 9 in the behavior for "Enemy" is probably where you'd start.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperAndroid Export Module

    Join Date
    May 2010
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can anyone help?

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Jul 2010
    Location
    Yonkers, New York, USA
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    Make two boxes.

    Call one, left trigger, and the other one, right trigger.

    Have the left trigger box move a set distance to the left of the player, plus or minus a random amount. Do the same with the right trigger. The random amount is so that the enemy won't always be predictable when attacking.

    Create a movement path that is a leap to the right.

    Set a condition for both trigger boxes so that when an enemy collides with the left trigger box, and it is not doing the attack right movement/animation, it triggers the jump and the corresponding animation.

    When the movement has reached its end, reverse it.

    Repeat the process for the other side.

    Of course that's off the top of my head, and it most likely won't work right away, but that's how I would start.

  6. #6
    Clicker Multimedia Fusion 2 DeveloperAndroid Export Module

    Join Date
    May 2010
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That basically worked, thanks for the help!

  7. #7
    Clicker Multimedia Fusion 2

    Join Date
    Jul 2010
    Location
    Yonkers, New York, USA
    Posts
    121
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm glad everything worked out. I know the feeling...

Similar Threads

  1. Sword Fighting
    By JimmyTHicks in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 13th February 2013, 05:48 PM
  2. HACK - Simple sword fightin for 1 or 2 players
    By butterfingers in forum SWF/Flash Export Module Version 2.0
    Replies: 10
    Last Post: 11th January 2013, 06:21 AM
  3. Object Frame Animation Problem (Zelda Sword)
    By RetroRain in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd December 2010, 07:53 AM
  4. Major color problem, help is extremely wanted!
    By Jacob_Miller in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 30th January 2010, 12:07 AM
  5. Sword fighting
    By haim in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 13th December 2007, 06:39 PM

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
  •