User Tag List

Results 1 to 8 of 8

Thread: Double event

  1. #1
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Double event

    I have a Mario game, and sometimes Mario jumps into two boxes at once or on two enemies at once. This seems to make some bugs in my game. If Mario jumps on and kills two enemies at once, a random enemy somewhere else loses his movement abilities and gets stuck in spot. If I jump into a box that creates a coin, only one of the boxes creates a coin and most likely, only one of the boxes will give coin credit. Also if I jump into breakable boxes, I have made a start loop event, and creates a lot of "box pieces" with pinball movement. If I jump into two of these at once, one of them will follow the event properly and create random pieces around, while the other will shoot the pieces super fast and with no gravity in the selected directions. Is it an easy way to prevent all this?

    PS: What is the easiest way to delete an object when its not overlapping another object anymore? My enemies have a square they follow around (Always: set position at 0.0 from this square) but then I want this enemy object to be destroyed when its not overlapping anything anymore. Suggestions??

  2. #2
    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: Double event

    I don't know what is the best solutions in your game, but what I use to do to make sure a loop is creating particles on the correct enemy / box, is to store the target object's fixed value in a counter. Then in the loop, I find the object with that value.

    This way I am sure that there is always only one target.

    You could use this tecnhique to remove the detector square as well.
    You could also have an extra condition and action when you kill the enemy:
    + Player kills Enemy
    + Square is overlapping Enemy
    - Destroy Enemy
    - Destroy Square

  3. #3
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Double event

    If you want it to work fine with multiple things at once you could do some ForEach loops here and there and it can work fine
    Working as fast as I can on Fusion 3

  4. #4
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Double event

    Quote Originally Posted by Popcorn
    You could also have an extra condition and action when you kill the enemy:
    + Player kills Enemy
    + Square is overlapping Enemy
    - Destroy Enemy
    - Destroy Square
    Do you mean like having two similar events?

  5. #5
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Double event

    Quote Originally Posted by LB
    If you want it to work fine with multiple things at once you could do some ForEach loops here and there and it can work fine
    I also use ForEach loop on the coin boxes already.. And its not really helping :p But I think I have another unprofessional idea. Do you have an easy way to destroying everything thats not overlapping a certain object anymore?

  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: Double event

    Doesn't this work?
    You know you can negate conditions, right?

    * [Negate] Object 1 is overlapping Object 2
    - Object 1: Destroy

    Another approach:
    * Always:
    - Object 1:Set flag 0 off

    * Object 1 is overlapping Object 2
    - Object 1: Set flag 0 on

    * Object 1: Flag 0 is off
    - Object 1: Destroy

  7. #7
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Double event

    I am familiar to the fourth selection on the right click menu, called Negate. The problem is, the object is not destroyed before none of the objects are overlapping anything anymore.

    But the second seems to work! It will take some time, but I believe its the best way to prevent double events from happening! Thanks a lot

    Edit: I forgotten to share my idea, so that didnt make much sense I guess. I have squares as enemies, with an enemy animation following it around. I replace this square with a church-formed 6-edged square thing, so that Mario will just hit this "church tower", while he is still a few pixels above the lower part on the enemy next to him. I guess I can use this technique on the boxes aswell, so that he just hits one box at a time.

  8. #8
    No Products Registered

    Join Date
    Mar 2009
    Posts
    412
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Double event

    Ok I BADLY need a working event now, that works even if the player overlaps too many.

    I made this file:
    http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=202287&#Post202 287

    Look at the amount of green squares, and the score of player 1. What would you guys do to fix this?

Similar Threads

  1. Double event
    By FlinkGigitty in forum File Archive
    Replies: 3
    Last Post: 20th August 2010, 10:58 PM
  2. Double-tap
    By Na in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th May 2010, 02:36 PM
  3. Double tap a key
    By Nick in forum File Archive
    Replies: 8
    Last Post: 31st May 2008, 12:33 PM
  4. Double marque de sélection dans Event list Editor
    By Surmulot in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd March 2007, 12:11 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
  •