User Tag List

Results 1 to 2 of 2

Thread: Found Bug in Old Code Related to Destroying Objects

  1. #1
    Clicker 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
    May 2015
    1 Post(s)
    0 Thread(s)

    Found Bug in Old Code Related to Destroying Objects

    I've got a game I've been working on for a while now and I stumbled across a bug I've never noticed before. It's a simple game where you run forever and you hop across randomly generated platforms. If you smack into the side of a platform or you fall, you die. I have a detector object just at the bottom of the frame for when you fall. When the character's "hitbox," which is what I use to determine if he hit a wall and should die, touches the detector, the actual player sprite is supposed to be destroyed and it creates a little particle effect. At one point I discovered that the player's sprite does not get destroyed, it just falls below the frame too fast for me to see if it actually happens. Normally, this wouldn't be a problem, however I'm working on a "combat mode" where 2 players take each other on one on one and the screen splits in half. When player 1, the top screen, dies he just drops down into player 2's screen. The code is as follows:

    Collision between (Player Hitbox) and (Group.Good)
    Flying Sprite of (Player 1 Sprite) = 0 [this is power up related]
    Create Particles 1, 2, 3, and 4
    Destroy Player 1 Sprite

    I've tried doing varying things like changing Group Good to the detector itself, or making it "Overlapping" instead of "Collision between," but so far nothing is working. Does anybody know how to fix this?

  2. #2
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    1 Post(s)
    0 Thread(s)
    It sounds like the player is moving too fast and is actually skipping past the collision detection. How is your movement set up? If you use fastloops, you can confirm that your player moves 1 pixel at a time so it will always hit the wall.

    Here's an example tutorial. The section "Bullet with perfect collision detection" explains what I'm talking about:

    Also instead of having an invisible wall offscreen to detect when the player dies, you can just test the position of the player to see when he falls off the bottom of the screen.

Similar Threads

  1. Need Help Destroying Created Objects
    By mason1204 in forum Fusion 2.5
    Replies: 5
    Last Post: 29th September 2016, 08:35 PM
  2. Active Objects Not Destroying
    By breana in forum HTML5 Export Module 2.5
    Replies: 2
    Last Post: 12th November 2014, 08:28 AM
  3. unintentionally destroying 2 overlapping objects
    By wizlore in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 21st November 2011, 09:08 AM
  4. Destroying specific objects which have been create
    By Apex in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 4th September 2011, 01:59 AM
  5. Destroying string objects
    By Corentin in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 5th March 2007, 10:37 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