User Tag List

Results 1 to 10 of 10

Thread: Help with item after it gets hit/explodes

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Nov 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with item after it gets hit/explodes

    Hi there,
    So, my game project is going very well, but one of the seemingly more obvious things isn't going so well-lol.

    So, when my spacecraft gets hit from an enemy bullet, I set up the collission routine for the bullet and spacecraft, and it begins explosion anim sequence, lowers 1 life and then continues. Excellent!

    But, how do I handle the movement and visualization of the spacecraft?
    It is a single active image- no multi frames. When it is hit, it loads a new spacecraft and lives work correctly, but I never lose movement of the spacecraft and instantly have the new one to move, while the explosion is still finishing its sequence. I need to figure out how to stop the spacecraft before drawing the new one.

    I have tried stop movement, stop anim, destroy, etc. Of course, destroy is perfect but then I try to restore anim and it does not show a new spacecraft- like destry is permanent :-).

    I want it to hit, make its sound, disappear spacecraft, show explosion, then load new spacecraft.

    The closest I can get is to set a frame pause after explosion and press space to continue, which is nice except I can still move the craft until pause happens.

    Sorry for such a newbie question, but everything else is going awesome- just this one glitch.

    Thanks!

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    New Condition then click on the explosion

    Last explosion has been destroyed
    -Create your spacecraft

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker Multimedia Fusion 2

    Join Date
    Nov 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Marv,
    Thanks for the fast reply! :-)
    Well, each time the craft is hit from a bullet, it should generate the explosion; not just the last time.
    Enemy Fires > Hits my ship > # of lives minus 1 > anim explosion > loads new ship
    Number of lives = 5
    Everything works but ship immediately redrawn and moves.
    Would like for the ship to disappear when the explosion appears, and new ship appear at end of explosion.

  4. #4
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Oct 2006
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you're doing could probably be accomplished without even destroying the ship. Simply manually change the animation to the explosion, ignore player control while the animation is playing, then restore control and reset your animation to the ship when the exploding animation is complete.

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    This is how I handle any character when it gets hit and you need to regenerate it. Your case the ship gets hit and explosion takes place and destroys the ship. Here's what I do,.I have another active object off the play area,..when the ship takes a hit,.it's destroyed,.then you set alterable value A of the object off the play area to 1. Then I set these conditions up. Alterable value of active is = or greater than 1 add one to alterable value A ignore player control. When Alterable value A = (lets say) 200,create ship at X Y and restore control, set Alterable value of active object to 0 again. The other thing you need to do is set it where if Alterable value of active = 0 then bullet will destroy the ship. If Alterable value is greater or = to 1 it doesn't get destroyed. Then when the ship is regenerating it won't be effected by a hit from a bullet until Alterable value of the off screen active reaches 400. This will give you time to move to a safe spot. There are so many ways I do this. This is just one way. Some times I create a force field around the ship when all this is taking place.
    Here is a quick example of the above. Good effect for regeneration. Look in the event editor for explanation and also in the frames.

    http://www.mediafire.com/?7ks1objjfohkong

  6. #6
    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,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    what is probably happening is the event IS setting the movement speed to 0 and stopping the movement, but you have not disabled the players input, so immediately the player can keep moving the ship, even when it's exploding.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I left out a few things in the above post,..typing to fast and not thinking!..LOL

    This is how I handle any character when it gets hit and you need to regenerate it. Your case the ship gets hit and explosion takes place and destroys the ship.
    Here's what I do,.I have another active object off the play area called "Regeneration Ship active Object",..when the ship takes a hit,.it's destroyed,.then you set alterable value A of the Regeneration Ship active Object to 1. Then I set these conditions.... Alterable value of Regeneration Ship active Object is = or > than 1, add one to alterable value A "Regeneration Ship active Object". When Alterable value A = (lets say) 200 we create the ship at X Y position. Now the Alterable A of the Regeneration Ship active Object is still adding 1 to it and the ship is recreated on the play field.

    You need to set it where if Alterable value A of the Regeneration Ship active Object = 0, bullet will destroy the ship if hit. Also set up this,If Alterable value A of Regeneration Ship active Object is greater or = to 1 it doesn't get destroyed. Then when the ship is regenerating it won't be effected by a hit from a bullet until Alterable value of the Regeneration Ship active Object reaches 400. (400 is just what I set it for) and added,.when Alterable value A of Regeneration Ship active Object is = or > than 400,.set alterable value of Regeneration Ship active Object back to 0. Then the cycle starts over again. Doing it this way will give you time to move to a safe spot, so you don't get hit from a bullet or whatever.

    There are so many ways I do this. This is just one way. Sometimes I create a force field around the ship when all this is taking place and with a few added conditions,.it makes for great effects.

    Here is a quick example of the above. Good effect for regeneration. Look in the event editor for explanation and also in the frames.

    http://www.mediafire.com/?7ks1objjfohkong

  8. #8
    Clicker Multimedia Fusion 2

    Join Date
    Nov 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I really appreciate the feedback. Wow, what a great community! :-)
    I haven't quite figured out alt var's yet, so that will take more time to understand. I actually 'get it' from a programming angle, but implementation needs a lightbulb moment-lol.
    Yes, disabling player input helped!
    Using a combo of this and movement instead of destroy seems to have this resolved. When hit, explodes and makes sound and moves player off screen. a press key to continue returns player to original location. This routine changes once if last life ends, and once if enemies crash into player, in which case it gives choice to restart level. This seems to be working- just have to loop in the last commands.
    This was a day and 1/2 brain teaser so I really appreciate the help!
    It would have been easier if not layered on other tricky things at the same time. I didn't realize the default "500" object limit being the reason behind testing of added variable items didn't work. Changed the number and bam many items were already programmed right just not appearing bc 2 many things testing in a single frame at once. Now I think the frame has many 70 items total.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    KLiK-iT's Avatar
    Join Date
    Sep 2011
    Location
    New Jersey
    Posts
    2,852
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    The more time you spend with MMF the better you'll get. It will all come in time. Alterable values are a must and you'll see after awhile,.that they are necessary in most cases when you're building your projects. Did you take a look at the example I posted. Good way of doing what you were looking for. You mentioned pressing a key to move your object back on screen after it takes a hit,.yes that works,.but it's not bug free. Say,.when you press the key and at that same moment a bullet is fired from an enemy,.it hit's your ship, you lose a life again,.not good IMO. The way I set it up,..it gives you a little time to move before the hit bullet/destroy resets. If you would like to upload your project here or PM me with a link,.I will set this up for you and post it back here or PM you back with the download link. Let me know.

  10. #10
    Clicker Multimedia Fusion 2

    Join Date
    Nov 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi there,
    That's very kind of you. I definitely wish to understand alterables. Ive read a lot actually; just isn't clicking. But, I'm continuing to make progress so until I'm backed into a corner things are going well thus far. The pause is working without leaving the player vulnerable and the game is pacing well for now. I'm about to post my next trouble spot, but yes MMF2 is a great program! I would say 80% of my time as a newbie to this program has been productive, and only 20% frustration and head scratching. Having spent many months with other programs in development, MMF2 has been the quickest learning curve and exactly what is needed for this project.
    Quote Originally Posted by TheSmanman View Post
    The more time you spend with MMF the better you'll get. It will all come in time. Alterable values are a must and you'll see after awhile,.that they are necessary in most cases when you're building your projects. Did you take a look at the example I posted. Good way of doing what you were looking for. You mentioned pressing a key to move your object back on screen after it takes a hit,.yes that works,.but it's not bug free. Say,.when you press the key and at that same moment a bullet is fired from an enemy,.it hit's your ship, you lose a life again,.not good IMO. The way I set it up,..it gives you a little time to move before the hit bullet/destroy resets. If you would like to upload your project here or PM me with a link,.I will set this up for you and post it back here or PM you back with the download link. Let me know.

Similar Threads

  1. Black hole sucks in stars then explodes [particles]
    By SolarB in forum File Archive
    Replies: 4
    Last Post: 9th December 2012, 01:41 AM
  2. Box2D - When item explodes, affect body/shape near
    By Tuna in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 16th March 2010, 01:18 AM
  3. Item Identification
    By nivram in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 24th October 2009, 03:15 PM
  4. Get item name with ini++
    By MikeB in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th June 2009, 09:02 PM
  5. TreeView : A way to set ID to a specified item ?
    By Rushino in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 11th July 2006, 03:08 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
  •