Spell dealing damage based on stats

pwnagenub2

New Member
Reaction score
3
I'm making a spell from shockwave which sends out the wave originally when casted, dealing minor damage, then 6 seconds later it sends out another one dealing damage based on int. I've read several tutorials on how to do it but on this one part I can't see to find the "(2.00 x (Real((Strength of (Casting unit) (Include bonuses)" but I can find everything else.

I also have no clue how to make the variables for the spell.

thanks.
 

trees123

New Member
Reaction score
6
Unit - Cause (Triggering unit) to damage (Target unit), dealing ((Real((Strength of (Triggering unit) (Exclude bonuses)))) x 1.00) damage of attack type Spells and damage type Normal



Use Action - Damage Target Or Area depending on spell, then click on "dealing damage" part. Use Arithmetic as the multiplier and click on the first "1.00" change it to "Convert Integer to Real" and click the "Point Value of Footman" to "Hero - Attribute", and your voila.
 

pwnagenub2

New Member
Reaction score
3
Here's the triggers I copied from that other one.
Code:
Shock Wave
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to [C]harged Bolt 
    Actions
        Set sw_caster_point = (Position of (Triggering unit))
        Set sw_target_point = (Target point of ability being cast)
        Unit - Create 1 dum fag for (Owner of (Triggering unit)) at sw_caster_point facing sw_target_point
        Unit - Add [C]harged Bolt  to (Last created unit)
        Unit - Set level of [C]harged Bolt  for (Last created unit) to (Level of [C]harged Bolt  for (Triggering unit))
        Unit Group - Add (Last created unit) to sw_dummy_group
        -------- The custom Value times the distance in which it moves is the final distance that the shock wave travels. Modify to increase range --------
        Unit - Set the custom value of (Last created unit) to (50 + (5 x (Level of [C]harged Bolt  for (Triggering unit))))
        -------- The life of the shock wave dummy is your attributes. You can modify how this works --------
        Unit - Set life of (Last created unit) to ((Real((Intelligence of (Triggering unit) (Include bonuses)))) + ((Real((Agility of (Triggering unit) (Exclude bonuses)))) + (Real((Intelligence of (Last created unit) (Exclude bonuses))))))
        Trigger - Turn on Movement <gen>
        Custom script:   call RemoveLocation(udg_sw_caster_point)
        Custom script:   call RemoveLocation(udg_sw_target_point)


Code:
Movement
    Events
        Time - Every 0.02 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in sw_dummy_group and do (Actions)
            Loop - Actions
                Set sw_dummy = (Picked unit)
                Set sw_dummy_point = (Position of (Picked unit))
                Unit - Move (Picked unit) instantly to (sw_dummy_point offset by 25.00 towards (Facing of (Picked unit)) degrees)
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Custom value of (Picked unit)) Equal to 0
                    Then - Actions
                        Unit - Remove (Picked unit) from the game
                        Unit Group - Remove all units of sw_target_group from sw_target_group
                    Else - Actions
                        Unit Group - Pick every unit in (Units within (100.00 + (10.00 x (Real((Level of Unknown (A001) for sw_dummy))))) of sw_dummy_point matching ((((Matching unit) belongs to an enemy of (Owner of sw_dummy)) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) is and do (Actions)
                            Loop - Actions
                                Unit - Cause sw_dummy to damage (Picked unit), dealing (Life of sw_dummy) damage of attack type Spells and damage type Normal
                                Unit Group - Add (Picked unit) to sw_target_group
        Custom script:   call RemoveLocation(udg_sw_dummy_point)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in sw_dummy_group) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions

They're still not doing any damage when it hits the target.
 

Dirac

22710180
Reaction score
147
Your spell is not even close to MUI/MPI so you could create a new var called sw_Target, and store the target unit of ability being cast there
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top