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.
The "Homing Missile" Bundle
Link: Flowlab Game Creator - Homing Missile Example
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.
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!
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 off will let the object go through other 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.