User Tag List

Results 1 to 8 of 8

Thread: Some help in object gravity?

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Some help in object gravity?

    Hi there! I've attached an example of my situation here.

    I have a mushroom object that I want to go jump on creation, then fall down. Currently I do this by fastloop movement so that it will never sink into the ground. The problem is that once one mushroom is touching the ground, gravity is set to 0 for all the mushrooms constantly, so they keep falling slowly. I don't know why it does this to all of them. I tried using spreadvalues in ID and selecting them by loopindex, and this kept the speed, but it had the side effect that mushrooms that were already on the ground fell through.

    Does anyone know how one should handle this?
    Attached files Attached files

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tell me more about the game.
    Is it big? Complex? Scrolling? Moving Platforms?
    How are the Shrooms supposed to act?

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,144
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Sometimes I 'cheat' with with this by giving the object with gravity a platform movement with a speed of 0, jump strength of 0 and assigning it to player 2, 3 or 4 in a 1 player game (or player 3 or 4 in a 2 player game etc.), and sometimes I add an 'ignore control' action for that player to be extra safe. The only downside to this is to give it the 'jump' you need to make sure you either 'stop' the movement or set the gravity to 0 while it is jumping otherwise the platform movement's gravity mostly overrides your vertical positioning. This could also be done with the vector movement.

  4. #4
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not big or complex yet. The only problem I have with the mushrooms is gravity, horizontal movement or moving platforms I can deal with. It is scrolling.

    The mushrooms are supposed to behave in the way that when they are created, they jump up, then fall down, once.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im guessing all Shrooms have their own Gravity_ Alterable Value...?
    In that case you could try:

    If Shroom overlaps Backdrop
    - Shroom set Y position to 'Y position - Gravity_'
    - Set Gravity_ to Max(1,Gravity_ / 2.0)

    May make an example later on if you dont get it.

  6. #6
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    King:_cool, if you check my example that's pretty much the solution I'm using. The problem i'm having is that when one shroom collides with the background, all shrooms get adjusted gravity, meaning I can't properly discriminate between objects while inside the "shroom loop", and I can't figure out how to incorporate a working loopindex reference.

  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Didnt check out the example bfore now.
    Here ya go.

    You pixel perfect collision without any loops or extencions.
    You can also alter how much Gravity is increased each Frame ( see Shrooms AltValue ).
    Shroom are also able to collide with the ceiling of the Platforms ( while bouncing up ) without any problems.
    Attached files Attached files

  8. #8
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Apr 2012
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    King_Cool, that is absolutley brilliant! I can employ this method of gravity in many other things too, you're a genious!
    Thank you very much! If there were any trophies I could give away, I would.

Similar Threads

  1. Fusion 2.5 Object Gravity Question
    By scottige in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 12th December 2013, 07:16 PM
  2. How to add gravity jumping using PMO object
    By path in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th May 2013, 11:31 PM
  3. Platform Movement Object, reverse gravity/jumping?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th October 2012, 06:08 PM
  4. gravity object
    By arfa in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 26th April 2011, 01:35 AM
  5. Advanced Game Board Object:: Problem with gravity
    By pinacoladaxb in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th November 2008, 04:50 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
  •