Why do we NEED missiles support in the editor

Currently, if you want to spawn a missile, there are 2 ways to do it:

  1. Create a custom dummy ability, which spawn a missile, and whenever you need to spawn one, create the dummy, give it the ability and make it cast it.

pros:

  • it’s fairly simple to do it.

cons:

  • most of the abilities, that spawn missiles have extra effects, such as stuns. Setting the stun duration in the editor to 0 does NOT remove the stun completely, so these missiles will always have an unwanted mini-stun.
  • if you want to create an ability with a custom effect, the ONLY viable ability you can use is Acid Bomb, as it applies a custom buff, and it doesn’t have a stun. You need to detect when a unit takes damage, and check if it has this buff to know if the damage was from the missile you created. Then you also need to remove the buff, so it doesn’t trigger from other sources of damage, and then apply whatever you want.
    Tracking the damage source and their stats and stuff can be a bit difficult this way, as you need to keep the dummy alive longer, and save stuff related to the actual caster in variables, that can be retrieved from the dummy (either hashtable, either using custom indexing)

It’s no longer that simple, and Acid Bomb being the only ability that can be used for missiles with custom effects is extremely inconvenient.

  1. Use custom missile systems/libraries.

pros:

  • you can do almost everything you may want with these.

cons:

  • it’s heavier performance-wise. Especially if a big amount of missiles are being managed at the same time.

People using the editor know that native functions are faster than custom made ones. So it’d be nice if we get native functions to spawn and manage these missiles.

After thinking about it a bit more, it seems like the best way to apply them would be something like this:

  • missile UnitSpawnMissile(unit shooter, unit target, string art, real speed, real arc, boolean homing)
  • missile SpawnMissile(string art, real spawnX, real spawnY, real spawnZ, real speed, real targetX, real targetY, real targetZ, real arc)
  • missile SpawnUnitMissile(string art, real spawnX, real spawnY, real spawnZ, unit target, real speed, real arc, boolean homing)

And there should also be functions such as:

  • MissileAddDamage(missile missile, real damage, real AoE, attackType aType, damageType dType)
  • MissileAddOnHit(missile missile, real radius, code calledFunction)

NOTE: as I see it, this should trigger whenever the missile comes in contact with a unit, and not only when it hits its target. For ONLY hitting the target, the next one should be used:

  • MissileAddOnDestinationReach(missile missile, code calledFunction)

And then we should also have some natives such as:

  • missile GetTriggerMissile()
  • integer GetMissileId(missile missile)
  • unit GetMissileShooter(missile missile)
  • unit GetMissileTarget(missile missile)
  • real GetMissileX(missile missile)
  • real GetMissileY(missile missile)
  • real GetMissileZ(missile missile)
  • real GetMissileOrientation(missile missile)
  • SetMissileSpeed(missile missile, real speed)
  • DestroyMissile(missile missile)
  • SetMissileTarget(missile missile, unit target)
  • SetMissileDestination(missile missile, real targetX, real targetY, real targetZ)

With these you can do some good stuff like making a missile switch its target mid-flight. Like you can shoot a missile in a general direction, and if it gets near an enemy - home into them.
And tons of other stuff.

And, along with these, we also really need an “Attack is Launched” event. Since, if we want to spawn multiple custom missiles when a unit attacks, currently there is only 1 semi-viable way to do it:

  1. set the unit’s weapon type to be instant
  2. give the unit a passive ability, that prevents it from missing (based on critical strike), as missing its target will cause the attack to not do anything at all.
  3. make an event to detect when a unit takes damage, and use as conditions "the shooter has the custom anti-miss ability)
  4. set as actions “set the event damage to 0” and spawn your custom missiles.

I admit it was a lot harder before we got the native “set event damage to 0”, as we also needed several rows of code, as well as a timer, that expires after 0 seconds (next frame), which was quite clunky.

But with the event “Attack is Launched”, we can:

  • skip steps 1 and 2
  • make it work for ANY unit, in a lot more situations
  • make it less prone to bugs
3 Likes

You want to sound like the authority on this and yet your information is out of date. You didn’t mention how the Reforged era patches let you make a missile using a moving effect model without a dummy unit.

But as far as I know BlzGetLocalUnitZ never returns the true visual Z height so a flying unit who has occluded above trees to a higher height value cant have their height accurately queried by any function even in the new APIs, which means that no missile system manipulating its own moving model can ever 100% accurately fly to a target unit.

Regardless, I really get the impression that the developers don’t want to spend more time on this kind of change because it’s difficult to measure the payout for doing it.

1 Like

I am simply someone who really wants to see this into the editor, so I can finally improve 1 library I created long ago. And continue working on my map.

I admit I must’ve missed this change. But if it’s just moving special effects, then you still need to calculate their position every frame in order to know when it has reached its target. It’d be just like a missile system/library, where you don’t have to manually change the projectile’s position, after calculating where it should be.

Sounds like the perfect time to fix that.
But they can not add Z for all I care (although it’d still be nice to have it). They can just use the terrain height by default.

And yet this is the change I’ve been eagerly awaiting ever since they started patching WC3 again, and it’s the change that I need, so I can continue working on my custom map.

I agree with you OP but it’s highly unlikely that the editor will ever reach that level of usability as Blizzard doesn’t have the resources working on it - for now the Acid Bomb method, which I have been using, works okay…

IMO the bigger problem here is that a lot of the functions relating to “get position Z of something” just does’t work.

Yeah most of these discussions end in the realization that Blizzard doesn’t have the resources to do it. Isn’t there some way we could all sell short on ATVI stocks as we come to realize the Blizzard half is run out of resources? I mean, that way all the players of Warcraft franchise could at least become profiteers as one last great part of their Warcraft experience.