Homing Missile Example

NOTICE:
This post was remade for after the switch to Discourse, so I can edit the correct formatting and adding the images back into the post.


screenshot

About many of you know me and know that I have a large library of Examples, either from testing around Flowlab or making something to help in the Forums. Many of my example’s are really helpful but were quickly made, so one of my goals is to expand and re-create my examples to make it easier to use, copy, and understand how the behavior’s work.

Today, I have completely remade my “Homing Missile Example” from the ground up. I tried to simplify everything as possible for everything else that was used, especially on the main mechanic.
Link: Flowlab Game Creator - Homing Missile Example


The “Homing Missile” Bundle:

The main mechanic of this example is for the “Homing Missile” Bundle, and can be found in the “Missile” object. Only the “Homing Missile” Bundle is needed if you plan to copy/paste into your own games. The bundle is divided into 5 other bundles to make it easier to understand how it works. These bundles use the angle of the projectile (missile) and the angle of the target, and then compares them to either turn left or right. Once the projectile is the same angle as its target, it will head strait to it. There are a few more bundles inside of these, but they are not made to be changed or edited.


Visual Test!

When you press F, you will be able to see the angles as described above as the game is played live. This was also to help understand how the bundle works and how it is used, take a look while in the bundle!

test small


Need To Know

  • The one thing that you really need to know for this to work, is that you set the target by these extractors in the “AngleTo” section. Make sure to set the Name & Type into the extractors.
  • If you want to turn faster or slower, look at the " Turn Right " and " Turn Left " bundles and change the number block (Turn Left has to be a negative number).
  • Another thing to know is that the “Movable” checkbox does not have to be on. Turning the checkbox on will let the object go through other non-movable objects, such as walls, but will still be solid and move other objects out of the way. Also make sure “affected by gravity” is off.


I have many more examples, but this is the first to revamp as a full example.
See other games, tests, and examples I’ve made here: Flowlab Game Creator - your games

If you have any questions, suggestions, confused, or need help, then please leave a comment down below! I would be happy to help any way I can.

6 Likes

Great example! Thanks for sharing :slight_smile:

2 Likes

The old post got messed up from changing Forums and also it wouldn’t let me edit it.

I still had the images, so I just made a new posts to correct everything.

I should’ve uploaded the images outside of the forum, most of your examples are still intact @PixelPizza.

1 Like

The old forums didn’t support .gifs, so I had to upload them to other websites.
The fact that they are still intact was a lucky coincidence ahah :sweat_smile:

1 Like