Need help with Ranger abilities.

Zonagle

New Member
Reaction score
1
As the title states, I'm making a ranger type hero, and there's a few triggered abilities I'd like some help with.

The first one is a passive aura, which deals additional damage each attack. The problem with this is, I assume since it's an aura, it'd effect other units, therefore giving them the effect as well, I do not want this. Secondly, it triggers each time the unit goes to fire an arrow, not when the unit's arrow actually connects with the target. I'd like the damage to trigger when the arrow actually hits the target. From what I've read, this isn't possible without some sort of event system, correct?


Trigger:
  • Test1
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Trueshot Aura) Equal to True
    • Actions
      • Set Trueshot_Aura_EnemyLoc = (Position of (Attacked unit))
      • Set Trueshot_Aura_Caster = (Attacking unit)
      • Set Trueshot_Aura_Victim = (Attacked unit)
      • Set Trueshot_AbilityLvl = (Level of Trueshot Aura for Trueshot_Aura_Caster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random real number between 1.00 and 100.00) Less than or equal to ((Real(Trueshot_AbilityLvl)) + 20.00)
        • Then - Actions
          • Unit - Cause Trueshot_Aura_Caster to damage Trueshot_Aura_Victim, dealing 500.00 damage of attack type Spells and damage type Normal
          • Special Effect - Create a special effect at Trueshot_Aura_EnemyLoc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions



The second one is somewhat similar to the first, however it's base on Searing Arrows. It doesn't trigger at all, I'm assuming this is because Searing Arrows doesn't count as being cast when the ability is used. What I want is a toggle-able spell, that drains mana with each shot fired, and once again, only deals the extra damage when the arrow actually connects.


Trigger:
  • Perfect Aim
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Perfect Aim |cffeee24f[Q]|r
    • Actions
      • Set Perfect_Aim_Caster = (Triggering unit)
      • Set Perfect_Aim_Target = (Target unit of ability being cast)
      • Unit - Cause Perfect_Aim_Caster to damage Perfect_Aim_Target, dealing (((Real((Intelligence of Perfect_Aim_Caster (Include bonuses)))) x (Real((Level of Perfect Aim |cffeee24f[Q]|r for Perfect_Aim_Caster)))) / 1.50) damage of attack type Pierce and damage type Fire


Thanks for any help you may provide.


Edit: Another spell that's giving me a problem. This spell works exactly like it's meant to, bar one problem. He keeps casting the spell, over and over until the target unit is dead.

Trigger:
  • Holy Explosion
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Holy Expoison
    • Actions
      • Set Holy_Explosion_Caster = (Triggering unit)
      • Set Holy_Explosion_TargetUnit = (Target unit of ability being cast)
      • Set Holy_Explosion_UnitGrp = (Units within 250.00 of (Position of Holy_Explosion_TargetUnit) matching ((((Matching unit) belongs to an ally of (Owner of Holy_Explosion_Caster)) Equal to False) and (((Matching unit) is alive) Equal to True)))
      • Unit - Cause Holy_Explosion_Caster to damage Holy_Explosion_TargetUnit, dealing 100.00 damage of attack type Chaos and damage type Divine
      • Special Effect - Create a special effect attached to the chest of Holy_Explosion_TargetUnit using Abilities\Spells\Orc\Disenchant\DisenchantSpecialArt.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Pause Holy_Explosion_Caster
      • Countdown Timer - Start Holy_ExplosionTimer[1] as a One-shot timer that will expire in 1.50 seconds
      • Countdown Timer - Start Holy_ExplosionTimer2[1] as a One-shot timer that will expire in 2.00 seconds



Trigger:
  • Holy Explosion 2
    • Events
      • Time - Holy_ExplosionTimer[1] expires
    • Conditions
    • Actions
      • Special Effect - Create a special effect attached to the overhead of Holy_Explosion_TargetUnit using war3mapImported\TheHolyBomb.mdx
      • Special Effect - Destroy (Last created special effect)
      • Set Holy_Explosion_Dummy = (Last created unit)


Trigger:
  • Holy Explosion 3
    • Events
      • Time - Holy_ExplosionTimer2[1] expires
    • Conditions
    • Actions
      • Unit - Unpause Holy_Explosion_Caster
      • Set Holy_Exploision_UnitGrp2 = (Units within 250.00 of (Position of Holy_Explosion_TargetUnit) matching ((((Matching unit) belongs to an ally of (Owner of Holy_Explosion_Caster)) Equal to False) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Holy_Exploision_UnitGrp2 and do (Actions)
        • Loop - Actions
          • Unit - Cause Holy_Explosion_Caster to damage (Picked unit), dealing 250.00 damage of attack type Chaos and damage type Divine
      • Custom script: call DestroyGroup(udg_Holy_Exploision_UnitGrp2)
      • Animation - Play Holy_Explosion_Caster's stand animation
 

jackall

You can change this now in User CP.
Reaction score
37
use the Unit - A Unit starts the effect of an ability instead of A unit starts casting an ability

1st spell. what with the Thunder_Circle_caster?
you should use integers not reals in the if/then/else
change the targets allowed for that skill to fit your preferences

2nd spell. do as i said at the beginning of my post

3rd spell. Set Holy_Explosion_Dummy = (Last created unit) is that unit created?
whats the spell based off of?
 

Joccaren

You can change this now in User CP.
Reaction score
54
For your aura that you want to only affect you, in the targets allowed section, select only 'Self'. Leave everything else unchecked
 

Zonagle

New Member
Reaction score
1
use the Unit - A Unit starts the effect of an ability instead of A unit starts casting an ability

1st spell. what with the Thunder_Circle_caster?
you should use integers not reals in the if/then/else
change the targets allowed for that skill to fit your preferences

2nd spell. do as i said at the beginning of my post

3rd spell. Set Holy_Explosion_Dummy = (Last created unit) is that unit created?
whats the spell based off of?

Sorry for the slow response, I fell asleep. Anyway!

Unless I read wrong, the problem with the first spell would still exist, that it deals damage when the ranger goes to attack, not when the arrow actually hits the target. Also, the Thunder_Circle_Caster is a variable from another spell, they're right next to each other, just a mistake.


The third spell is based off channel, and it doesn't use a dummy unit.

@ Joccaren: Thanks, I thought it was something simple that I overlooked.

Edit: Did some testing, the Perfect Aim spell now deals damage, but only when you manually click the spell, then click a unit. The bonus damage does not activate when left on auto-cast. It still deals the damage instantly, rather than when the arrow collides with the unit.
 

Joccaren

You can change this now in User CP.
Reaction score
54
Maybe use a dummy unit as the arrow and slide it towards the target? When a unit comes in X of the dummy unit, remove the dummy unit and damage the unit that came within range
 

Zonagle

New Member
Reaction score
1
Maybe use a dummy unit as the arrow and slide it towards the target? When a unit comes in X of the dummy unit, remove the dummy unit and damage the unit that came within range

That could work. Would you be able to provide an example trigger? I haven't tried something like that before.
 

Joccaren

You can change this now in User CP.
Reaction score
54
I don't know how to do the sliding part :( but there are tutorials on these forums for that ;).

For the Other Parts, try this (Done in freehand, tel me if its hard to understand) :

Trigger One:

Event: Unit begins casting a spell
Condition: Spell being cast equal to (Your Spell)
Actions: *Create one dummy arrow for (Owner of (Triggering Unit)) at (position of (Triggering Unit))
*Set (Last Created Unit) to (ArrowDummy)
*Do whatever slide tutorial you find in the forums here (I will post link if I find one)


Trigger Two:

Event: Unit Comes within 100 of (ArrowDummy)
Conditions: (Owner of (Triggering Unit)) is an enemy of (Owner of (ArrowDummy)) Equal to true
Actions: *Your effects of arrow hitting here
*Remove ArrowDummy from game
 

Zonagle

New Member
Reaction score
1

Joccaren

You can change this now in User CP.
Reaction score
54
Why is there a 'Set last created unit to Holy Explosion Dummy'? there is never a dummy created. Also, I assume that you are trying to make the Omniknight's Purification from DotA correct. Do you need to have the player casting the spell as the killer for any reason?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top