User Tag List

Results 1 to 7 of 7

Thread: Falling damage with Plattform movement object?

  1. #1
    No Products Registered

    Join Date
    Jan 2007
    Location
    Sweden
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Falling damage with Plattform movement object?

    Simple question. What is the best way of making the choosen object take falling damage if it lands on an obstackle at a certain speed?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Falling damage with Plattform movement object?

    Are you interested more in how far it's fallen, or what speed it's travelling when it gets there? (Or are the two roughly equivalent?)

    You could continually set some value of the object to the current Y position as long as it isn't moving down the way, then subtract the current Y position from that value once its Y-speed is equal to zero again at the bottom of a fall and calculate the falling damage based on that difference.

  3. #3
    No Products Registered

    Join Date
    Jan 2007
    Location
    Sweden
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Falling damage with Plattform movement object?

    That would work... but it would be better if the pmobject had a "collisions with ground" additional to just "standing on ground". Then you could just compare with the Y-speed.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module
    Nifflas's Avatar
    Join Date
    Jul 2006
    Posts
    2,613
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Falling damage with Plattform movement object?

    Collision with ground would be the same as standing with ground, except that it's triggered only once. Those features are not added, because it's so easy to use "standing on ground" together with "one action when event loops", or if you prefer, have a flag that toggles whenever the player is in the air or standing on the ground (basically, if player is in air, set flag to on, if player is standing on ground, set flag to off and check for fall damage). It's really simple, and doesn't take more than one or two events.

  5. #5
    No Products Registered

    Join Date
    Jan 2007
    Location
    Sweden
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Falling damage with Plattform movement object?

    Standing on ground + Y Velocity >= 500 does not work for me. Seems logical, cuz if it has speed downwards it's not standing on ground. Do you get it to work? in that case i've missed something obvious..
    Anyway, i probably can fix it with some "Was recently falling in high speed" counter that resets a little after the actual fallingspeed.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF 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)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,367
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    Re: Falling damage with Plattform movement object?

    * alterable value A < Y velocity
    - set alterable value A to Y velocity

    * collision with ground
    + alterable value A > 500
    - kill player

    * collision with ground
    + alterable value A < 500
    -set alterable value A to 0

  7. #7
    No Products Registered

    Join Date
    Jan 2007
    Location
    Sweden
    Posts
    107
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Falling damage with Plattform movement object?

    Thanx!! Just what i needed! Worked great! When the game is finished you will be in the "thanks to:" list "Thanks to: Popcorn, for helping me with the fallingdamagecode."

    (ps. you too nifflas "for helping me with a whole bunch of codes")

Similar Threads

  1. RPG-like damage counters
    By camelman in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 18th April 2013, 07:33 PM
  2. Creating floating damage text with the Text Blitting Object - How?
    By edman3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th January 2013, 02:06 AM
  3. If bullet overlaps a certain object, damage the shooter of the bullet
    By StardustSpeedman in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 10th September 2012, 02:43 PM
  4. "Box2d" How to damage an object using velocty
    By leightonw87 in forum SWF/Flash Export Module Version 2.0
    Replies: 4
    Last Post: 17th February 2012, 04:07 PM
  5. Need Help with Player Damage
    By 122334shadow in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 1st December 2010, 08:06 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
  •