User Tag List

Results 1 to 4 of 4

Thread: trying to destroy a object when shoot twice

  1. #1
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    trying to destroy a object when shoot twice

    hey i am trying to have it when you shot active object 4 twice it is destroyed. I tried to make it when the object is created, it sets alternable value A to 2. Then i made it when you fire it creates a explosion from the crosshair. When this hits object four it subtracts 1 from alternable value. Then when alternable value A = 0 it is meant to destroy object 4. Now for some reson it is only taking one shot to kill them.. i do not undestand why and if anyone has any soloutions to having it kill a object in two hits i would appreciate it alot. thx

  2. #2
    No Products Registered

    Join Date
    Nov 2006
    Location
    Australia
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: trying to destroy a object when shoot twice

    Also i can not use a counter to destroy it because there is going to be alot of them.

  3. #3
    No Products Registered

    Join Date
    Nov 2006
    Location
    San Francisco, USA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: trying to destroy a object when shoot twice

    what command are using to subtract 1 from the alterable value? if its collision/overlap it might be doing it all once because the 2 objects are still touching. my suggestion is put a limit on it--maybe 1 or 2 secs--or the length of the explosion animation. also you can set it so when the explosion is touching the object it turns the object flag on, when its not touching an explosion the object flag is turned off. only subtract 1 when the flag is off.

    my MMF experience is limited so there might be better ways to do it (if my solutions work at all)

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: trying to destroy a object when shoot twice

    I think what rhoymand says may be right. I would actually create a separate invisible object that's placed where the player clicks and use that to check against hits, destroying it at the end of each event loop.

    Also, this is just down to personal preference, but I find that setting a value when an object is created and subtracting it down to 0 again can get messy (though you can get rid of the need to set it up like this by setting the starting value in the object's Properties now) - what I usually do is start from 0 and count up when an object is "hurt", destroying it when its value is greater than or equal to the hit limit.

Similar Threads

  1. Move & Destroy - Demo - Shoot-em up
    By AftPeakTank in forum Android Released Games & Apps
    Replies: 14
    Last Post: 21st October 2014, 02:06 PM
  2. How to destroy object Sensor?
    By Decoamorim in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th July 2013, 03:59 AM
  3. Help with Destroy Object
    By lucaoo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th September 2011, 03:49 AM
  4. Destroy Object..
    By MostDreaded in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 14th January 2011, 05:18 AM
  5. [Bug] Destroy object if too far from frame
    By Sphax in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 23rd May 2007, 07:04 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
  •