User Tag List

Results 1 to 6 of 6

Thread: Conditional destroying

  1. #1
    No Products Registered

    Join Date
    May 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conditional destroying

    Hello everyone

    I've been working with MFD2 for some time and I decided to make a classic space shooting game with enemies spawning as active objects around the player and approaching from different angles.

    I want to make a behavior which will cause player's spaceship to be destroyed if he gets into a collision with another spaceship (lets just call it shipA) while shipA is playing walking animation. I have created an animation for appearing ships which can give some time for player to react to changing environment.

    Here is the problem : player's ship doesn't get destroyed in case of a collision with shipA if there is another shipA on the screen playing the "appear" animation.

    The command i was using is :
    conditions:
    *Collision between ship and shipA
    *shipA animation Appearing is over
    event:
    *ship Destroy

    Is there a way to fix this or do I need a new active object for EVERY ship that is about to spawn and new command for each of them?

  2. #2
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    EE's Avatar
    Join Date
    Sep 2009
    Posts
    200
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Conditional destroying

    You could try:
    --(negate)shipA animation appearing is playing
    +ship overlaps shipA:

    -Destroy ship

    //EE

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Pineapple's Avatar
    Join Date
    Oct 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Conditional destroying

    Why bother with checking which animation isn't playing, when you're testing for the walking animation? My guess is that testing for the appearing animation is what's negating the ship destroy event.

    Try:
    Player collides with enemy ship
    +Enemy ship is playing Walking animation

    :destroy player's ship
    ----
    Or something like:

    Ship appear animation is over: set flag 1 on

    player collides with enemy
    +enemy ship flag 1 is on

    :destroy ship

  4. #4
    No Products Registered

    Join Date
    May 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Conditional destroying

    Both of the suggestions don't work. Sometimes there are 30 or more ships on the screen and they keep spawning, so there is almost always a ship playing "appearing" animation, which makes the command impossible. The thing with flag won't work for the same reason.

    I've heard that MF can make these problems with cloned objects, but I thought I could avoid the problem with using 2 conditions. Looks like I was wrong.

  5. #5
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    EE's Avatar
    Join Date
    Sep 2009
    Posts
    200
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Conditional destroying

    Works perfectly for me.

    --(negate)shipA animation appearing is playing
    +ship overlaps shipA:

    -Destroy ship

    Have you tried exactly this?

    //EE

  6. #6
    No Products Registered

    Join Date
    May 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Conditional destroying

    Awww now i get it!

    I used "finished playing" instead of negating the "playing".

    This fixed my problem! Thanks ALOT

Similar Threads

  1. List Object - Conditional Data Check
    By Mikegames in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 4th May 2012, 08:34 PM
  2. Is there a way to have "IF ELSE" conditional events in Fastloops?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 29th November 2011, 11:21 PM
  3. One last problem, with destroying
    By csj1 in forum File Archive
    Replies: 2
    Last Post: 5th April 2009, 02:54 PM
  4. Destroying
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th March 2009, 09:41 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
  •