User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: Need help, shooting object toward other object!

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Need help, shooting object toward other object!

    I am trying to make one object shoot toward another object. The problem is that the accuracy of the shooter is terrible. What am i doing wrong? If i move to some positions he can fire spot on, but often its way to the left or right.


  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Paul_Boland's Avatar
    Join Date
    Jun 2006
    Location
    Waterford, Ireland.
    Posts
    2,739
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    This is because MMF can only shoot in 32 directions, each one being 11.25 degrees apart so shooting 360 degrees is a problem. The way to handle this is, instead of Object A shooting a Bullet to Object B, do this...

    In the Frame Editor, select the Bullet and apply Ball Movement to it. Give it the same speed as your bullets travel.

    Now, in the Event Editor you change how Bullets are shot. When the player shoots, instead of Object A shooting the Bullet object, create a Bullet at Object A relative to the gun (point of shooting). Always set the Bullet to look At Object B. The Bullet will now travel to Object B, making a course direction as it goes (you won't notice this), and it will hit Object B.

    If you want Object A to be able to shoot multiple objects (and not just Object B), you'll have to lay code for each object so each shot Bullet goes to its target.
    KnightTrek Productions
    http://www.knighttrek.com

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    Actually, I think his problem has to do with hotspots. Go into the image editor and check the hotspot on your target

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    Paul: Thanks! I will try that later and report back!

    Riky: No i think Paul explained it with the 32 directons, checking the hotspots was the first thing i did But thanks for the input!

  5. #5
    Clicker iOS Export Module

    Join Date
    Feb 2010
    Location
    Behind the tree!
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    It's a common question. Try using the search button, there are lots of 360 degree shooting examples on the forum.

    The 360 degree movement object may also be helpful.
    link to extension forum

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    I've always found the Vector Movement to be the easiest way to shoot in 360-degrees. It's built-in to MMF, and you just need to give your object the Vector Movement and then control it via the Clickteam Movement Controller object. I can make an example if you need.

  7. #7
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    Quote Originally Posted by Jaffob
    I've always found the Vector Movement to be the easiest way to shoot in 360-degrees. It's built-in to MMF, and you just need to give your object the Vector Movement and then control it via the Clickteam Movement Controller object. I can make an example if you need.
    Please do if you can, i would be ver gratefull!

    I Hope its possible in my situation though. I have a caracter at the right side of the screen who stands still, his rifle will move up and down according to the angle the mouse is in, So i want a shot to be fired from the rifle toward where i have the mouse pointer, the crosshair.

    Paul: I think the metod you described does not work in my case because the bullet should be shoot at the directon of the mouse pointer that is moving freely.

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    Here you go.

    View MFA

  9. #9
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export Module
    Outcast's Avatar
    Join Date
    Jan 2011
    Location
    Sweden
    Posts
    3,237
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    Quote Originally Posted by Jaffob
    Here you go.

    View MFA
    Wow thanks that worked perfectly!

    One question only about the condition!, i have seen the condition "only one action when event loops" many times, but never understod what it does?

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Need help, shooting object toward other object!

    It basically stops the condition from running constantly if it's true. Try removing it from my example, and you will see that it shoots a thick stream of bullets if you hold down the mouse button. That condition stops this from happening. If you add it to the "Always" condition, it becomes almost the same as a "Start of Frame" condition. It's really useful for a lot of different things.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. 360 Shooting with PMO Object and animation?
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 5th January 2013, 09:06 PM
  2. [BUG] Shooting an object and deleting it
    By RickyRombo in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 11th April 2010, 01:52 AM
  3. Pick up object and shooting
    By Mycale in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th August 2009, 12:04 PM
  4. Questions with shooting an object
    By flamewavex in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 4th March 2007, 06:18 PM
  5. Shooting An Object
    By JonesGJ in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 13th November 2006, 09: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
  •