User Tag List

Results 1 to 2 of 2

Thread: Set direction for each projectile once.

  1. #1
    No Products Registered

    Join Date
    Nov 2015
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Set direction for each projectile once.

    I have created a simple frame in my game where there is a good ship and a bad ship. Each ship has separate health and health bars that follow them. They also can be multiplied and act independently within the game. When their health bars reach zero they are destroyed. I have them randomly select a different ship to look at and rotate towards then fire a bullet (with bouncy ball movement).

    Here is where my problem is.

    How do I set the direction of each projectile once independently from one another and not have a constant "Homing" property?

    The homing property is interesting and ill use it for a variation of ship. but for now i want a regular behaving bullet.

    Ive tried giving the bullet a behavior that had:

    +Run this event once [set direction of bullet = to (angle of {battleship}/11.25)] angle divided by 11.25 for a 32 direction conversion. and the battleship is the object that is firing the bullet.

    In hopes that it would happen once each time a bullet was created by the behavior nested within each battleship. But it doesn't work. While an "always" condition makes the bullets work a bit better but it changes mid flight as the ships themselves change position from one another.

    I only have the vanilla MMF2 2.0.

    Thanks in advance for the help!

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Popcorn's Avatar
    Join Date
    Jun 2006
    Location
    Norway, Bergen
    Posts
    2,374
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    Hey!
    Instead of Run this event once, try When Flag 0 is Off -> Set flag 0 On and set direction towards battleship

    Hint: You can use the Clickteam movemencontroller to do the angle conversion for you

    You could also give the bullet an initial angle, and always make it move in that direction using trigonometry and a static movement. This would be more accurate than a 32 direction movement.

Similar Threads

  1. Replies: 9
    Last Post: 23rd May 2015, 12:08 AM
  2. Beam Projectile?
    By Pixzel in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 10th August 2010, 11:02 PM
  3. Help lobbing a projectile
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd January 2010, 04:32 PM
  4. Targeted projectile flying a curve
    By Random in forum File Archive
    Replies: 9
    Last Post: 7th January 2009, 02:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •