- Joined
- Sep 1, 2009
- Messages
- 7
Proccing spells - chance to cast on attack - need new approach not listed in forums
I've been trying to update (that is, "recreate") a RoC Tower Defense into a TFT version, and add some new abilities with the enhanced editor.
Our team's hope is that we will be able to have some towers have a chance to cast spells on their attacks (that is, proc spells like chain lightning, cripple, etc.). The only auto-cast spells that seem to trigger without the caster being attacked (that I can find) are Bloodlust and the missile enhancers (searing arrows, cold arrows, black arrow, parasite, orb of annihilation, etc.), and I know of no way to adjust these to cast a spell like Chain Lightning, and suspect it might be impossible.
The standard approach to proc a spell on attack is to write some triggers based on "whenever a unit takes damage" which then runs a check as to the damage source to decide if an additional spell should be triggered. However, with a Tower Defense, it has been our experience that many towers attacking many units and running a trigger like this often would be a sure fire way to lag the game into unplayability.
The second approach to accomplish something like this is to use the "Orb of Lightning" and adjust the spell from Purge to whatever we want. This would be a highly promising approach, if not for the bug that causes the spells to never proc when the attacking unit is auto-attacking (rather than force-attacking a specific unit or ground).
My recent attempts at forcing a tower to effectively use the proccing ability on a modified Orb of Lightning were somewhat promising at first. I gave the tower an inventory (for ease of testing) and used the modified orbs, but at first the only way I could get the spells to proc was if I force-attacked a specific unit, and such micro-management is not in the spirit of a tower defense.
Secondly, I attempted to give the tower the ability to force-attack-ground (as a melee unit would, not as an artillery unit would) by giving the tower the impression it could move. (Towers will complain about distant ground being "out of range" if they have no movement.) This worked great initially, as I had test targets within range of the tower, but further testing showed that the towers would move with 1 movement speed when targets were not in range, despite attempting to decrease their movement speed by 100% through aura buffs (Tornado) and upgrades (Ghoul Frenzy) and having set the gameplay constant for the minimum movement speed of buildings to 0.
I thought I might be able to modify Entangling Roots to take advantage of the forced inability to move. Throwing the Entangling Roots buff onto an aura I believe causes the same problem as before - the towers can still move with 1 movement speed. Forcibly casting Entangling Roots on the tower will disable its ability to move, but it also disables its ability to attack, and without the ability to attack the spells will not be able to be procced by the Orb of Lightning. (Note: Mixing an Entangling Roots aura buff with a direct cast of Entangling Roots caused TFT to horribly crash, and should be avoided.
)
So, I am potentially looking for a few things, but any solution that causes lag is worthless to us:
Honestly, I am pissed off at Blizzard that they never bothered to make something like Searing Arrows that triggered direct spells when the missile struck.
Additionally their voodoo magic in the Orb of Lightning is restricted to force-attacks, which makes no sense to me.
It seems like life would be a lot easier for map makers if one of these two problems were fixed.
This is my first venture into this forum, and if you guys can solve my problem, I will love you forever.
I've been trying to update (that is, "recreate") a RoC Tower Defense into a TFT version, and add some new abilities with the enhanced editor.
Our team's hope is that we will be able to have some towers have a chance to cast spells on their attacks (that is, proc spells like chain lightning, cripple, etc.). The only auto-cast spells that seem to trigger without the caster being attacked (that I can find) are Bloodlust and the missile enhancers (searing arrows, cold arrows, black arrow, parasite, orb of annihilation, etc.), and I know of no way to adjust these to cast a spell like Chain Lightning, and suspect it might be impossible.
The standard approach to proc a spell on attack is to write some triggers based on "whenever a unit takes damage" which then runs a check as to the damage source to decide if an additional spell should be triggered. However, with a Tower Defense, it has been our experience that many towers attacking many units and running a trigger like this often would be a sure fire way to lag the game into unplayability.

The second approach to accomplish something like this is to use the "Orb of Lightning" and adjust the spell from Purge to whatever we want. This would be a highly promising approach, if not for the bug that causes the spells to never proc when the attacking unit is auto-attacking (rather than force-attacking a specific unit or ground).
My recent attempts at forcing a tower to effectively use the proccing ability on a modified Orb of Lightning were somewhat promising at first. I gave the tower an inventory (for ease of testing) and used the modified orbs, but at first the only way I could get the spells to proc was if I force-attacked a specific unit, and such micro-management is not in the spirit of a tower defense.

Secondly, I attempted to give the tower the ability to force-attack-ground (as a melee unit would, not as an artillery unit would) by giving the tower the impression it could move. (Towers will complain about distant ground being "out of range" if they have no movement.) This worked great initially, as I had test targets within range of the tower, but further testing showed that the towers would move with 1 movement speed when targets were not in range, despite attempting to decrease their movement speed by 100% through aura buffs (Tornado) and upgrades (Ghoul Frenzy) and having set the gameplay constant for the minimum movement speed of buildings to 0.
I thought I might be able to modify Entangling Roots to take advantage of the forced inability to move. Throwing the Entangling Roots buff onto an aura I believe causes the same problem as before - the towers can still move with 1 movement speed. Forcibly casting Entangling Roots on the tower will disable its ability to move, but it also disables its ability to attack, and without the ability to attack the spells will not be able to be procced by the Orb of Lightning. (Note: Mixing an Entangling Roots aura buff with a direct cast of Entangling Roots caused TFT to horribly crash, and should be avoided.

So, I am potentially looking for a few things, but any solution that causes lag is worthless to us:
- A way of auto-casting Chain Lightning on enemy units that are not attacking the caster.
- A way to trigger a spell on an attack from a specific tower without the lag caused by running a trigger for every attack from every tower to every unit in the game.
- A way to allow an immobile tower to attack-ground outside of its range, possibly by giving the tower positive base-movement, only to disable the movement, while maintaining the attack-ground option.
- A way to continue to allow the ability to attack while under the Entangling Roots spell, while keeping the incapacitation of movement.
- A creative non-laggy approach to our problem that I have not considered.
Honestly, I am pissed off at Blizzard that they never bothered to make something like Searing Arrows that triggered direct spells when the missile struck.

This is my first venture into this forum, and if you guys can solve my problem, I will love you forever.

Last edited: