User Tag List

Results 1 to 7 of 7

Thread: how do i make a hitbox for fighitng-game?

  1. #1
    No Products Registered

    Join Date
    Oct 2009
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how do i make a hitbox for fighitng-game?

    i wanna create a double-dragon game where u fight multiple enemies.

    currently i use one active object as the enemy (and applied the enemyselection example to it found here: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=180911#Post1809 11 thx LB!)

    the problem is that i have several objects that are dependant on the enemy, like one squarebox-object at his left side, and one squarebox-object at his right side which determines the players position when he hits. but when i use several enemies they all die because the squares beside them affect everyones lives.

    is there a way to test the distance between the enemy and his appointed square boxes so that they ONLY affect the enemy closest to them?

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i make a hitbox for fighitng-game?

    It would probably be simpler to use a single hitbox on your enemy. It can be any shape, so there really is no reason to use more than one for the left/right sides. And to determine if the player is at the right height, just use a Y position check against the enemy. You could even do an X position check to control how far away you are from an enemy to hurt them.

    If you only want to hurt one enemy at a time, just use the "Pick object at random" along with the overlapping condition. That will make MMF only hit one enemy (of that type) at a time.

  3. #3
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i make a hitbox for fighitng-game?

    mobichan has a good idea. You can also try the Advanced Direction Object for distance.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  4. #4
    Clicker Multimedia Fusion 2Install Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jan 2010
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i make a hitbox for fighitng-game?

    Fastloops.

    At the start, spread a value over the enemies, then run this fastloop:

    [Value of ENEMY = Loop Index] + [Detector is overlapping ENEMY] --> Set Value of Detector to Value of ENEMY


    Then, just use fastloops to manage each one individually.

  5. #5
    No Products Registered

    Join Date
    Oct 2009
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i make a hitbox for fighitng-game?

    thx for the tip ! got it working now

    another quick question, how do i rezise objects ? like if i want an object to grow bigger in-game

  6. #6
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i make a hitbox for fighitng-game?

    You can either set the scale of the object to a variable, then increase the variable over time. Or you could animate the scaling by changing the size of each frame by hand and then just play that animation.

  7. #7
    No Products Registered

    Join Date
    Oct 2009
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: how do i make a hitbox for fighitng-game?

    nice, thx !

    instead of creating a new topic i wanted to keep asking questions in this one.

    so here is another question:
    how do i make the same kind of objects (like 2 cloned enemies) keep away from eachother? like if they collide they should walk away a bit from eachother or at least "glide" apart.

Similar Threads

  1. Can you define a character's hitbox?
    By YeOldeLuke in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th December 2013, 04:51 AM
  2. Tower Defense hitbox issue
    By Zarpo in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 25th May 2013, 10:49 AM
  3. Embedded detection hitbox not working with fastloops?
    By EE in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th May 2012, 12:47 PM
  4. Hitbox collision pushback question
    By PandaExplosion in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 12th April 2009, 03:18 PM
  5. changing hitbox size
    By Winston in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 9th November 2008, 05:17 PM

Posting Permissions

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