Whats the difference between this 2 triggers?

Lifee

New Member
Reaction score
46
What is the difference between this 2 triggers and wich one is better to use ?
Trigger:
  • Firebolt
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Firebolt
    • Actions
      • Set Firebolt_Damage = ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 4.00)
      • Wait until (((Target unit of ability being cast) has buff Stunned (Pause)) Equal to True), checking every 0.10 seconds
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing Firebolt_Damage damage of attack type Spells and damage type Normal


Trigger:
  • SlashStrike
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to SlashStrike
    • Actions
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Real((Strength of (Casting unit) (Include bonuses)))) x 2.00) damage of attack type Spells and damage type Normal
 

BAkil

New Member
Reaction score
9
Okay well the top one triggers once a unit casts a spell called Firebolt.
It then sets a variable called Firebolt_Damage to the casters Intelligence x 4, which will be used in the future.
Since the Firebolt has to travel to and hit the unit before doing damage, this effect must be replicated in the trigger. That is what the Wait until action is for, it will keep checking until the unit is stunned by the Firebolt before continueing.
It then deals damage based on the Firebolt_Damage variable set earlier.

The bottom trigger is similar, but does the damage instantly. Since it does this, a variable does not need to be set. The damage dealt is also different, being 2xStrength of the caster rather than 4xIntelligence.

The main difference is the wait time. The Firebolt will not deal damage until it impacts the target because of it's slow travel time, however the SlashStrike comes into effect as soon as it is cast, damaging the target straight away. Other than that, the amount of damage dealt is different (4xIntelligence for Firebolt and 2xStrength for SlashStrike).
 

Jedi

New Member
Reaction score
63
First one won't work, because you can't use (Target unit of ability being cast) after a wait.Difference is just that.
 

Lifee

New Member
Reaction score
46
Wich one is better to use ?And should i create all my spells like this with variables or no variables?
 

BAkil

New Member
Reaction score
9
It depends on what your spell is.
Someone mentioned that the first one has a problem with it, but otherwise that would be suitable for spells with travel time.

The second one is not suitable for spells with travel time. If you used that then your hero would cast the firebolt and the target will take the damage way before the firebolt reaches them. However this is perfectly fine for spells which don't need to travel, such as special melee swings or whatever.
 

educator

New Member
Reaction score
9
the top one (if it works) would bug heavily (tooo many things could stuff it up eg. if another unit uses an ability that uses that buff, if another unit casts the ability)

and yes u shoul use variables (the bottom 1 is better)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
i wouldnt recommend any of both to create a summoning spell.
 
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