User Tag List

Results 1 to 5 of 5

Thread: collision work on one side of an object help

  1. #1
    No Products Registered

    Join Date
    Sep 2011
    Posts
    20
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    collision work on one side of an object help

    how do make a collision action of an object work on only one side?
    ex: say you are creating a boss for your game, and it's weak spot is on the boss' back. how do you make the boss' back it's weak point?

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: collision work on one side of an object help

    I would use another object and have it invisible to detect collisions in that area.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: collision work on one side of an object help

    If you don't need precision, my preference would be:

    Enemy is overlapping Player
    +Y Coordinate of Enemy > Y("Player")
    --> Enemyestroy

    Enemy is overlapping Player
    +Y Coordinate of Enemy <= Y("Player")
    --> Playerestroy

    That'll give you simple goomba-stomping behavior. If you do need precision (say you have to touch a glowing red orb on the boss or something) then use Jeff's method

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleXNA Export Module
    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)
    gkinfinity's Avatar
    Join Date
    May 2011
    Location
    USA
    Posts
    284
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: collision work on one side of an object help

    Just have an event that always sets an invisible object (essentially a hitbox) over a certain part of your enemy. In other words, do what Jeff said.

    The method Ultimate Walrus suggested could work too although you'd probably also want to account for both the character's and enemy's X positions as well.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    824
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: collision work on one side of an object help

    Just to clarify the method I suggested would work with n amount of enemies, whereas making the hitbox for more than one enemy would require spread value/fastloops (still a perfectly fine thing to do... I'm just sayin')

    Another alternative if you need precision is to use a different frame of your active as the collision mask for the weak spot. Then, in order:
    *Set to the frame of your collision mask
    *Test for collision
    *Set back to the frame you actually want to display
    This should work for n amount of enemies without fastloops. I have an example of this type of thing on my website

Similar Threads

  1. [bug] collision Detection dont work After resume
    By StingRay in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 12th March 2013, 11:11 AM
  2. Moving objects and then checking for collision doesn't work during frame start
    By crusher in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 8th July 2012, 04:48 PM
  3. [Possible Bug] FastLoops with a side of Object Ordering
    By ProdigyX in forum Android Export Module Version 2.0
    Replies: 1
    Last Post: 25th June 2012, 12:50 PM
  4. [Phyzix] Why doesn't my collision work ?
    By Surmulot in forum File Archive
    Replies: 3
    Last Post: 14th January 2008, 12:34 PM
  5. My collision detection just. dosn't. work.
    By gum in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st November 2006, 05:45 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
  •