User Tag List

Results 1 to 10 of 10

Thread: changing hitbox size

  1. #1
    No Products Registered

    Join Date
    Dec 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    changing hitbox size

    okay for my platformer game I am trying to make a character be able to slide under an object. When down and X are pressed the character changes into a sliding animation where the hitbox is supposed to be half as high and the character slides forwards. The problem is I can't figure out a way to do this without the hitbox giving a weird error that sort of forces the character ever frame somewhat into the ground or something

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    Sounds like a hotspot problem!

  3. #3
    No Products Registered

    Join Date
    Dec 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    here's the mmf http://www.megaupload.com/?d=7WE2TYZF

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2007
    Location
    USA
    Posts
    691
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    lol u mean mfa

  5. #5
    No Products Registered

    Join Date
    Dec 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    yupp that's what I mean

  6. #6
    Clicker Fusion 2.5

    Join Date
    May 2008
    Location
    In Your Cheese
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    What you could do is use a seperate object for hit detection, and resize that object accordingly.

  7. #7
    No Products Registered

    Join Date
    Dec 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    Quote Originally Posted by Docilemouse
    What you could do is use a seperate object for hit detection, and resize that object accordingly.
    I think that's what I did, could you check my mfa to see what I did wrong?

  8. #8
    Clicker Fusion 2.5

    Join Date
    May 2008
    Location
    In Your Cheese
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    Hmmm... This is very weird. Unfortunately, i'm not very familiar with the platform extension you're using, so i'm pretty much at a loss...

    ...Okay. After messing around with it for a while I think I've sort of figured out the issue. When the hit detection switches to the Sliding hit detection object, the ground collisions go screwy for some reason. I don't know why.

    If this were my game, Instead of making a whole other object for hit detection when sliding, I would just add another animation or frame to the standing hit detector, and switch the animation when the player is sliding.

    -Animation of player "Sliding" is playing
    ->change animation of hit detector to "Sliding detection"

    Of course, the detector's sliding animation should be shorter.

    Hope this helps, and good luck on the game. What you have so far is fun already. =)

  9. #9
    No Products Registered

    Join Date
    Dec 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    thanks a bunch man
    unfortunatly when I try doing that I get another weird error (the code is all under "basic" at the top) could you try to get this working and upload an example or something? this isn't making sense to me at all
    heres my attempt
    http://www.megaupload.com/?d=B5YY9DAY

  10. #10
    Clicker Multimedia Fusion 2

    Join Date
    Jun 2007
    Location
    Suffolk, UK
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing hitbox size

    Okay,

    adjusted file

    the problem is a combination of the collision box's sliding animation frame and the change to sliding code.
    The collision box's slide animation frame is bigger than the stopped frame (the whole frame not just the actual coloured parts). With the hotspot of both at <0,0>, this means that when the player changes to sliding, since the slide frame is bigger, the bottom of the collision box is no longer at ground level but slightly below it.

    I've experimented a couple of different fixes, changing sizes of the different frames and then adjusting some of the positioning code and the easiest way I found to fix it, was to change the height of the 'stopped' animation and to crop the width of the 'slide' animation.
    * I've increased it's height (added transparent pixels above it) making it the same height as the sliding frame and the players animation frames.
    * changed event 5 so that the positioning is <-5,0> instead of <-5,4>
    * changed event 9 so that positioning is <-7,0> instead of whatever it was before
    * changed event 10 so that positioning is <-2,0> instead of whatever it was before

    Note: I haven't changed the positioning in event 8 for the left and right wall detectors. You may need to adjust them.
    Note2: I didn't read through every event in your code so you may need to make the odd adjustment but that will only be where something is positioned in reference to the collision box and will usually just mean reducing the Y position by approx 4 or 5 pixels

    Er, I think that's it

Similar Threads

  1. Changing size of the play area
    By Crayons in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 15th July 2012, 06:04 PM
  2. Changing Window size
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 2nd February 2012, 02:08 PM
  3. Changing frame window size
    By MechatheSlag in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 30th August 2008, 06:54 PM
  4. Active changing size for mussashimits
    By Hristos in forum File Archive
    Replies: 1
    Last Post: 24th February 2008, 08:41 PM
  5. Changing frame size
    By uprize in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th April 2007, 09:57 AM

Posting Permissions

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