Need help with dynamic spells

Blood_Wraith

New Member
Reaction score
2
I was wondering how you would make a spell dynamic, as in making it deal (Number of Hero level) + (Hero Intelligence) X 6 + 110.

So if my Hero was level 50, and had 75 Intelligence, it would do 860 damage with the ability. I need this to work for healing spells as well, if that's any different. Also I need any Intelligence bonus applying items to add to the Intelligence factor, if it doesn't detect that automatically.

Any help would be appreciated :)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
if it is a single target spell... do this...
Trigger:
  • Spell damage/heal
    • Events
      • A unit finishes casting an ability
    • Conditions
      • Ability being cast = AbilX
    • Actions
      • If then else
        • If
          • Owner of casting unit is an enemy of owner of target of ability being cast
        • Then
          • Unit - Cause casting unit to damage target unit of ability being cast dealing ((Real(Level of casting unit)) + (Real(Intelligence of casting unit x 6)) + 100)
        • Else
          • Unit - Set life of target unit of ability cast equal to (life of target unit of ability cast + ((Real(Level of casting unit)) + (Real(Intelligence of casting unit x 6)) + 100))
 

Blood_Wraith

New Member
Reaction score
2
Thanks! It works for my single target damage spell but for the heal spell it just sets his health to a certain number no matter what IE my cure spell heals (Hero level + Hero Intelligence x 6) + 110, my hero was level 5 and had 6 Intelligence, so it set my targets HP to 176 no matter what. I need the trigger to heal the unit by this amount, NOT set it to that amount.
 

Blood_Wraith

New Member
Reaction score
2
Oh yeah, woops. Thanks, it works now. Anything I need to know if I want this to work with multi target spells? (AKA Chain Lightning, Forked Lightning, Healing Wave, Rain of Fire, Flame Strike) Also have some rep.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
it gets a lot more complicated with multitarget, ill set something up when i get home
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
alright for an aoe it is very different than a forked lightning or chain lightning

with forked lightning/chain lightning you would need to trigger the entire ability

with the aoe you would be dependant on whether or not u wanted it mui, multi unit instanceable, works with multiple casters at different locations at one time...
 

Inflicted

Currently inactive
Reaction score
63
well however you group them, range or triggered bounce of lightning.

Then just add to a temp unit group, and deal the damage to the group.

Triggered Lightning isn't fun tho :/
AoE is quite easy tho.


(Remember to remove the unit group after to remove leaks etc)
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
both chain lightning and forked lightning are easy to trigger... u just need to know how, but it gets stickier when you start adding dynamic damage and MUI
 

Blood_Wraith

New Member
Reaction score
2
Could someone give me an example of how this would work with chain lightning/chain heal atleast? And if you can give me an example of an AOE spell, that would be great!
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
i have an example of this here its a thread where i helped grags do this

as far as this... what type of aoe? frost nova where it deals damage in an aoe around a target? or stomp where it does a flat aoe, or storm where it does aoe damage over time in an area? or even like cleave where it does aoe damage on attacks, be more specific man, every single one of those is triggered WAY different
 

Ayanami

칼리
Reaction score
288
For any spells, I suggest using Starts the effect of an ability rather than Finishes casting an ability. Also, use Triggering unit instead of Casting unit. Using Triggering unit is faster.

If you're wondering what's the difference between the difference between the ability events, it's the order.

Being casting -> Starts the effect -> Finishes casting

Begins casting an ability fires the trigger before mana calculation. Thus, you can easily use the spell without using mana (press S right before spell is actually cast). Thus, this obviously not used.

Starts the effect of an ability fires right when mana calculation is done. This is by far the most accurate way to detect when a spell is cast.

Finishes casting an ability fires right after mana calculation is done. In most cases, should be pretty similar to Starts the effect of an ability. However, you should still use Starts the effect of an ability.

Triggering unit basically refers to the unit related to the event. So in Starts the effect of an ability, Triggering unit refers to the Casting unit. Another example is the event A unit is attacked. Triggering unit refers to the unit being attacked, as the event states such. You could use Casting unit and Attacked unit, but Triggering unit is actually faster.
 

Blood_Wraith

New Member
Reaction score
2
Well okay, I guess I figured it out myself, sort of, well it works. I did:

Unit - A unit Starts the effect of an ability

(Ability being cast) Equal to Bolt 1 (All)

Unit - Cause (Casting unit) to damage circular area after 0.00 seconds of radius 500.00 at (Position of (Target unit of ability being cast)), dealing ((((Real((Hero level of (Casting unit)))) + (Real((Intelligence of (Casting unit) (Include bonuses))))) x 6.00) x 0.50) damage of attack type Spells and damage type Normal

It damages units within a 500 radius of the targeted unit, and it only damages enemies, so that's good. Also thanks for the tip of using Starts the effect of an ability instead of using Begins casting.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
can you post your triggers in these tags next time? [noparse]
Trigger:
  • paste them here
[/noparse]
and i know this thread was yours, but be careful when posting on old posts, thats necroing, try to make new threads instead :/
 
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