• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Rocket System v 1.0d

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Imadori
This little system provides more... intresting rockets.




This little system can be usefull.... Or... Maybe not...
Just look at this +)

Give me a credits, plz, if you use this system in your map....

Keywords:
Rockets, Path-finding, modern, warfare, system, triggers, attack modifier.
Contents

Rocket System v 1.0d (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Rocket System v 1.0d | Reviewed by Maker | 16th Jun 2013 NEEDS FIX Fix the leaks and use proper indexing [tr] Things that leak Hashtables and MUI Dynamic...
these rockets are supposed to be homing, right? I'm assuming semi-accurate homing (hence being dodgeable) but yeah, the way you've done this, is really not that great, you can just use Cos(Angle between units(missile to target) - facing angle of unit (would be your missile)) < 1 to detect if the missile is not on track and then just alter the turning angle of the missile a little bit to be more like the desired angle.

(Cos(0) = 1 so you will only get this result, when the unit is right infront of the missile) instead of all those other checks, also, use co-ordinates not locations when dealing with projectile-based systems. (really should use co-ordinates all the time)

Note: checking if it's equal to 1 may be a bit -too- accurate (may be forever slightly wobbling, so I'd suggest using something like 0.95/0.98 to get a bit more leniency)

Edit: in addition to this, when modifying the fly-height of rockets, you can also use a formula to alter the height of the projectiles more correctly so that they don't change height in a way which does not match their target, you do this by using some basic formulas: e.g. Time = Distance/Velocity , note for the purposes of this you're using horizontal velocity and horizontal distance. you use this to work out how long it'll take for the projectile to reach it's target , once you know this, you now need to work out the vertical (upward or downward) velocity it needs to match, you do this be re-arranging the formula to Velocity = Distance / Time (this time velocity is for the vertical velocity you want and this is now the vertical Distance you need to cover. since you already know how long you have, and how much distance, you need to increment the height by the time, divided by the total distance.

Here is a practical example:

Rocket Horizontal Velocity = 5
Rocket Start Height = 50
Distance to target = 500
Target Height = 300
Rocket Height Change = ?
Time = ?
Rocket Vertical Velocity = ?

Time = Distance to target / Rocket Horizontal Velocity
Time = 500 / 5
Time = 100

Rocket Height Change = Target Height - Rocket Start Height
Rocket Height Change = 300 - 50
Rocket Height Change = 250

Rocket Vertical Velocity = Rocket Height Change / Time
Rocket Vertical Velocity = 250 / 100
Rocket Veritcal Velocity = 2.5

All these measurements are in seconds

If I made a mistake anywhere here on my calculations, can somebody point it out for me (sick so brain isn't at 100%) XD

Edit2: Also for homing, you will need to constantly be recalculating this, as for your projectiles to not go over the top or under a target which moves
 
Last edited:
Top