User Tag List

Results 1 to 5 of 5

Thread: Pretty simple multi-instance pairing problem

  1. #1
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    FlipSwitchX's Avatar
    Join Date
    Feb 2012
    Location
    California
    Posts
    206
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Pretty simple multi-instance pairing problem

    I have 2 enemy sprites and they have 2 hitboxes.

    So when I jump on one hitbox and kill it, Ive autopaired the HP to the sprite, so the corresponding sprite also gets destroyed, BUT, its hitbox is destroyed instantly while the sprite is left doing the disappearing animation, which i want, but since its hitbox is no longer there, it gets synced to the hitbox of the other enemy sprite which is still alive.

    I was just wondering if there was a simple and common solution to a conundrum such as this? Thank you very much for reading my problemo =)

  2. #2
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,127
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    there's a bunch of ways to do this, it all depends how you've got it set up... but without knowing how you have paired them..one simple solution would be to destroy both the hit detector and enemy sprite at the same time, then create a new sprite (a totally different object) of the enemy dieing animation at the main enemy sprites location.

  3. #3
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    FlipSwitchX's Avatar
    Join Date
    Feb 2012
    Location
    California
    Posts
    206
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    I use an Always -> set Alterable value hitbox to alterable value sprite, and vice versa.

    I did come up with a solution where the hitbox receives the number of the animation and frame from its corresponding sprite and is deleted on the last frame of the sprites dying animation, but it just doesn't feel right to me. Like there should be a better way.

    *but i also don't want to have an additional dying animation object for every enemy in the game. Maybe I'll just make the sprite the hitbox as well for most enemies. Thanks for the input though!

  4. #4
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform 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)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,127
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Or you could make a delay before you destroy the hit box.. for example

    hit box HP = 0 - add 1 alterable value B

    Alterable value B=100 - destroy hitbox

    You can change the 100 to be higher or lower, depending on how long the animation is, just as long as the hitbox is around long enough for the sprite to keep in sync with the hit box.

  5. #5
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    FlipSwitchX's Avatar
    Join Date
    Feb 2012
    Location
    California
    Posts
    206
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Right that is more simple. Or i could have just shared the HP of the hitbox with the sprite and then only set the sprites position to a hitbox if its HP>0.
    Don't know why I didn't think of that sooner, wow, well at least we came up with multiple solutions =) thanks!

Similar Threads

  1. Instance Communicator - Multi-users => crash
    By ouly in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th September 2010, 12:57 PM
  2. A pretty bad problem.
    By Nusua in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd May 2009, 01:54 PM
  3. Pretty annoying problem.
    By Nusua in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 14th March 2009, 09:30 AM
  4. Requesting a pretty simple extension.
    By SEELE in forum Extension Development
    Replies: 2
    Last Post: 8th July 2008, 07:45 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
  •