Homing Missile 2.0 - JR 01

Homing Missile 2.0

screenshot

I remade my original Homing Example so it would be easier to use, more flexibility, and more precision. Homing Missile 2.0 will be replacing the Homing Missile Example on the Help Page. If you have used my old example, I suggest using this new one instead. A lot of the math/code has been redone and simplified with expressions.

Homing Missile 2.0:
Flowlab Game Creator - Homing Missile 2.0


The Homing Missile Bundle:

The new Bundle now has customization on how to control the homing missile, so you don’t have to try changing any code inside the bundle. As well, new expressions are used for more precision to point at the target within range. The turn speed (Rate input) is how much rotation it can turn each frame (and should be able to use decimals), so anything over 90 will be just like using the Point-At behavior. Also, to work with the emit behavior, the Rotate input has to be used to start the bundle (this could change to work automatically in the future). For the outputs, “shoot” outputs when the Bundle starts, and Rotate outputs the rotation of the Missile. I don’t have a specific reason for adding these outputs, so you may have more uses for them.

Speed - Sets the Forward Speed of the missile (default is 3)
Rotate - Sets the Rotation of the Missile (Must be used to start)
Rate - Turning Speed of the Missile (default is 4)
Tar X - X location of the Target
Tar Y - Y location of the Target

image


Visual Test

The Visual Test hasn’t changed. When you press F, you will be able to see the angles used 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


One last thing, make sure that the Forward Direction of the Missile is set to match the sprite. As well, Gravity must be off so it doesn’t fall off the level.

Let me know if you have any suggestions, questions, or feedback on the example.

7 Likes

S1CK!
Would love to test smiting with this! :blush:

2 Likes

I updated the Rate for a larger range of numbers, as well as made decimals as a Rate option.
Makes it easier to pick how fast you would want it to turn.

2 Likes

Update 5/10/22:
I put everything inside the bundle into a single expression.
The Bundle itself works exactly the same.

Before:

3 Likes