User Tag List

Results 1 to 4 of 4

Thread: Problems with Shoot an Object

  1. #1
    No Products Registered

    Join Date
    Feb 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problems with Shoot an Object

    I have a few problems with shooting an object. First of all, sometimes when I shoot an object at the same time I am running, the animation will freeze and the unit will be unable to do anything.

    Also, how can I set how often I can shoot? I want different guns to shoot at different speeds, so is there any way to do this?

    Finally, how can I make the shots more accurate? Sometimes the bullet appears from the gun of my animation, and other times the bullet appears behind him. The bullets don't always reach their target, and sometimes they aren't even close. I want to have more control over where the bullet hits in terms of the target, but I want to give the AI a little bit of randomness in their shot as well. How would I go about doing this?

    *edit* I am using MMF2 Build 243

    Thanks a lot.

  2. #2
    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: Problems with Shoot an Object

    To set how often you can shoot, you'll have to put an extra condition under your firing event - say, some sort of counter or alterable value of your player ("FireTime") <= 0. Then, when firing, set this counter to a value above 0 - and also continually subtract from it while its value is above 0.

    The issue with bullets appearing behind you is probably because of a misplaced Action Point in your player animations (or possibly the Hot Spot of your bullet). By default, the "Shoot an Object" action can only fire in one of 32 directions - to get around this you'll have to use Create an Object and handle the movement yourself.

  3. #3
    No Products Registered

    Join Date
    Feb 2007
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problems with Shoot an Object

    Ok, I understand what you are saying, but how would I go about doing that? I can create a bullet at the location relative to my player that I want the bullet to come from, but how should I define his movements? Also, how do I keep a counter to destroy the bullet after it travels a certain distance, such that it doesn't fly across the map and kill something way out of sight?

  4. #4
    No Products Registered

    Join Date
    Jun 2006
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Problems with Shoot an Object

    If you just want the standard 32 directions, you could just go for a bouncing ball movement for the bullet.

    For the bullet range, you can do this:
    In the frame editor, define an alterable value for your bullet called "lifeSpan" or something like that. Set it to the number of frames you want that bullet to "live" for. If you havent changed the frame rate, then 50 frames = 1 second.

    Then in your event editor, make these events:
    Bullet is in play area
    -Subtract 1 from lifeSpan("Bullet")

    lifeSpan("Bullet") less than or equal to 0
    -Destroy bullet

    That should work.

Similar Threads

  1. shoot an object
    By taciturn in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd October 2008, 10:53 PM
  2. What's the best way to shoot an object?
    By Ravenius in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th May 2008, 06:43 PM
  3. shoot an object
    By Nate in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st February 2008, 02:21 PM
  4. Shoot object not straight...?
    By Blue66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th January 2008, 02:23 PM
  5. bug with shoot an object action!
    By rurkryber in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 22nd January 2007, 06:26 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
  •