User Tag List

Results 1 to 9 of 9

Thread: Need quick help with player colliding with 2 of the same objects

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Need quick help with player colliding with 2 of the same objects

    Hey everyone,

    I've setup a little game where the player is an 'Active' object that is being moved by the Platform Movement Object.

    I have a 1 pixel tall and 16 pixel wide 'Active' object attached to the top of the player object at all times.

    Currently, when the collider on-top of the player touches a block object, the block bounces up and back down like in Mario.

    This works fine, but I don't want the collider to be able to push-up 2 brick blocks at a time when it touches both of them.

    I want it so the collider will only push up one brick block at a time.

    Any tips?

    I can give an example.mfa file out if needed.

    Thanks


    EDIT: Also, I have the same problem when my player lands on-top of an enemy.

    He is programmed to bounce off the enemy and destroy them and add 100 to the score which also works just fine.

    But if the player were to land on 2 enemies at the exact same time, it would destroy both of them and only add 100 to the score as opposed to 200.

    If somebody knows how to make it so only one enemy can be stomped at a time until the player object is falling again, please let me know.

    And/or make the score add 200 points instead of just 100 when landing on 2 enemies.

  2. #2
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody?

  3. #3
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleInstall 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 2016
    Location
    France
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    maybe your solution is in using flags on the different objects. ie : player hit ennemy, flag is on till some other thing happend (event, timer,...). Then flag is off. Add event that when flag for player is on, other object won't react.
    In my experience, there is always one object that can be hit at the same time. If 2 objects are at the same level, first object to be hit is the first drawn (you can check the number of the object when selecting it on the editing frame if it is not dynamicaly generated). But I may be wrong.
    small example with timer :
    test.mfa

    There is a lot of different ways to do what you want and there is a lot of people better than me to help you on this forum !

  4. #4
    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,307
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Add the "pick one of XXX object at random" condition to your collision event line.

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Feb 2014
    Posts
    1,031
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by mobichan View Post
    Add the "pick one of XXX object at random" condition to your collision event line.
    so if u jumped in the exact same place each time, wud that make it always pick the same block out of the 2, or wud it pick a random one of the 2 blocks each time?

  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,307
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Correct. It would be a random block affected each time you repeat the scenario. You would need to include other conditions to narrow it down. For example, add a position check.

  7. #7
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleInstall 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 2016
    Location
    France
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is called random for a reason
    But with only two block, what are the odds ?
    test02.mfa (with pick random)

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Feb 2014
    Posts
    1,031
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Nadapp View Post
    It is called random for a reason
    oh yh lol
    & cheers for the example. it works nice if u just take the random line out, coz in a game like mario u want to b able 2 learn it & speedrun it the same each. the flag thing u put in makes it work consistently the same way which is cool as i thought it might hav still detected both blocks at the same time but it didnt

  9. #9
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    106
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the help everyone

    I got exactly what I needed through Nadapp's example!

Similar Threads

  1. If player is NOT colliding with background
    By JTay in forum Fusion 2.5
    Replies: 4
    Last Post: 28th July 2015, 02:35 PM
  2. Char is not colliding properly with objects
    By vinians in forum Fusion 2.5
    Replies: 3
    Last Post: 26th April 2014, 02:23 AM
  3. How to make player completly stop after getting hurt and colliding with an obstacle
    By path in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd June 2012, 03:42 AM
  4. 2 Dynamic PMO objects colliding?
    By Krim in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 5th June 2011, 07:55 PM
  5. Detecting collisions without the objects colliding
    By Mantoid in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 18th November 2006, 09:28 PM

Tags for this Thread

Posting Permissions

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