User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: What to do about a simultaneous collision?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    477
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)

    What to do about a simultaneous collision?

    Hi

    I have a problem with a simultaneous collision as follows:

    • I have 5 players and 5 boxes.
    • Each player must collect a box.
    • When each player has collected his box, the level ends.
    • Everything is moving at a reasonable speed


    The Code is:
    • when the player overlaps the box I subtract 1 from a variable
    • delete box & player
    • when the variable = zero the level ends.


    Now what happens on rare occasions is that 1 player will run into 2 boxes at the very same split second.
    The boxes can also be overlapping each other when the player runs into them - so literally it is the very same split second.
    In this case the level will still end normally as they both will deduct 1 from the variable and the player and both boxes are deleted.

    But then there is a player left in the level without a box.

    And well, I just don't want 1 player to be able to collect 2 boxes.

    But I don't have any ideas on how to prevent this.

    Any suggestions?

    Thanks

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,822
    Mentioned
    7 Post(s)
    Tagged
    2 Thread(s)
    Without seeing the MFA its hard to say but I might try to add a condition for only one action when conditions loop on the collision to see if that has an effect.

  3. #3
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    You can use the condition "Pick one of Box" found in "Pick or Count" to only work on one box in one event (therefore, the player won't accidentally collect 2 boxes)
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    477
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Thanks Jeff & BartekB

    @BartekB - I don't know how I would incorporate your suggestion into a collision event.

    But expanding on your suggestions

    I had: Player 1 collides with a "Group.Boxes" - and I've now seen that if I split that to say Player 1 collides with Box 1 and then Player 1 collides with Box 2 etc. then 99% of the time it won't take both boxes - even when I placed the boxes virtually on top of each other.

    (It did only once take both boxes anyway...)

  5. #5
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    like so:
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    477
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    Thanks a lot.

    That's an awesome illustration

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    477
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    I had this as follows:

    Collision between Player and Qualifier (group.boxes)
    Pick one of Qualifier (group.boxes)

    But this now will pick a box at random - that may or may not be in collision with the player.

    So I can't use this.

  8. #8
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    This doesn't sound right.

    The following boxes get scoped with the Collision, then out of all of them that have been scoped, only one is picked...
    Can you send an mfa or upload a screenshot of the condition?
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    It seems it works to me, just use overlap instead of collision (to keep scope). Give a look to the example attached.
    Attached files Attached files

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    477
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    I had a look at your example, thanks faber, but the conditions / movements aren't the same as in my game.

    Attached is an example of approximately the code I'm using for the movements and the exact code for the collision.

    It often destroys one of the stars that isn't in the collision. But not every time - so you might have to run it a few times to see it.
    Attached files Attached files

Page 1 of 2 1 2 LastLast

Similar Threads

  1. "Simultaneous" changes to the same variable - Only some changes applied?
    By Nelien in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 18th January 2014, 11:20 PM
  2. MMF2: 2 player simultaneous co-op?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 28th December 2012, 01:05 AM
  3. 2 Player Simultaneous Mode?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 12th March 2011, 02:58 AM
  4. Simultaneous key commands to get to next frame?
    By Maximum in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 30th November 2009, 01:47 AM
  5. multiple simultaneous timers possible?
    By Mudstick in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd July 2008, 12:25 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
  •