User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: How to make an enemy shoot directly at the player?

  1. #11
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: How to make an enemy shoot directly at the player?

    You can also do :
    Always
    - Bullet look in direction of player

    This will make a directional missile that will not miss the target.

  2. #12
    Clicker

    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,700
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Re: How to make an enemy shoot directly at the player?

    Fudge Francois. Why didn't I think of that. I use this method using a boomarang on the return journey of it back to the player.

    Marv
    ​455 MMF2 & CTF 2.5 Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #13
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to make an enemy shoot directly at the player?

    For proper 360 degree movement, you can set the angle of the bullet to:

    Code:
    atan2(Y("Bullet")-Y("Target"),X("Target")-X("Bullet"))
    and with the angle set, you can set the X position to

    Code:
    X("Bullet")+5*cos(Angle("Bullet"))
    where 5 is your speed in pixels per frame, likewise for the Y position

    Code:
    Y("Bullet")+5*sin(Angle("Bullet"))
    In builds of MMF2 prior to 248, atan2 was not supported. I'm not sure if TGF2 has it at all, so for angle you would instead use:

    Code:
    2*aTan((sqr((X("Target")-X("Bullet")) pow 2+(Y("Bullet")-Y("Target")) pow 2)-(X("Target")-X("Bullet")))/(Y("Bullet")-Y("Target")))

  4. #14
    Clicker

    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,700
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Re: How to make an enemy shoot directly at the player?

    Excellent Jacob, and thanks. So throw away the boomerang return way?

    Marv
    ​455 MMF2 & CTF 2.5 Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  5. #15
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to make an enemy shoot directly at the player?

    Yeah, it's not really needed if you want 360 degrees. Also, you can do the same by constantly setting the Angle to the formula above.

  6. #16
    Clicker The Games Factory 2

    Join Date
    Jul 2010
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    on the bottom of the directions on the sprite menu (Ya know, the square with the eight directions?) there is a little bar with a slider that goes left to right. The further right you pull it, the more directions you'll be able to have and make cleaner, more direct firing sequences. Just set it to look at the player, and it will fire automaticly.

  7. #17
    No Products Registered

    Join Date
    Mar 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Francois View Post
    You can also do :
    Always
    - Bullet look in direction of player

    This will make a directional missile that will not miss the target.
    Doesn't work. It still only allows 32 directions.

  8. #18
    No Products Registered

    Join Date
    Mar 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry old thread...

  9. #19
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export ModuleInstall Creator Pro
    Shadeve's Avatar
    Join Date
    Aug 2011
    Location
    GA USA
    Posts
    216
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Is there a way to do 360 degree aiming with Clickteam Bouncing Ball movement?

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. How to make shoot-effect in MMF2!!!!! PLEASE HELP!!!!! ;D
    By Sphotof in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 11th November 2012, 12:26 AM
  2. How to make a rotating cannon shoot?
    By FlinkGigitty in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th April 2010, 12:45 PM
  3. How do I make this smiley shoot in right way?
    By FlinkGigitty in forum File Archive
    Replies: 1
    Last Post: 4th February 2010, 09:20 PM
  4. How can I make my character shoot?
    By Davidddd in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 21st April 2008, 03:12 AM
  5. How do I make the character shoot
    By cosmicco in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 23rd October 2007, 10:45 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
  •