Stat bases dps spells

muddy19

New Member
Reaction score
1
Yes i have been looking and i can never find the information that i need. How do i make a spell that deals dps and is based on a stat?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
could you explain a little bit more? is there only 1 hero per player? has the spell got to be MUI?

however save the hero and the target into a unit variable and damage the target depening on the heroes stats every second. Time - Periodic time event.
 

muddy19

New Member
Reaction score
1
It causes your heroes agiX10 damage per second for 10 seconds. Im gonna try your idea and see if it will work thanks.
 

LightChaosma

New Member
Reaction score
60
it wont, you cant use agi in the object editor like that, you have to go with accames way, and trigger it. then agian, does it need to be MUI? (is it possible that more then 1 unit cast the skill at the same time?)
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
I expect every player got only one hero with that spell.


those 2 triggers should work:
Code:
Spell1 Init
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to YourSpell
    Actions
        Set Hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
        Set Target[(Player number of (Owner of (Triggering unit)))] = (Target unit of ability being cast)
        Set Count[(Player number of (Owner of (Triggering unit)))] = 0
Code:
Spell2
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        Count[(Integer A)] Greater than or equal to 0
                    Then - Actions
                        Unit - Cause Hero[(Integer A)] to damage Target[(Integer A)], dealing (10.00 x (Real((Agility of Hero[(Integer A)] (Include bonuses))))) damage of attack type Spells and damage type Normal
                        Set Count[(Integer A)] = (Count[(Integer A)] + 1)
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                Count[(Integer A)] Greater than or equal to 10
                            Then - Actions
                                Set Hero[(Integer A)] = No unit
                                Set Target[(Integer A)] = No unit
                                Set Count[(Integer A)] = -1
                            Else - Actions
                    Else - Actions
Hero = Unit variable with array
Target = Unit variable with array
Count = Integer variable with array

this is NOT MUI
this is MPI
this is leakless

Edit: Wooops, havent posted the second trigger ^^ here is it.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
yes. this spell can be used by each player. BUT only by 1 unit of each player, no player can use this spell with 2 different units same time.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
the variable "counter" is set to -1 after it reaches 10. this will stop the trigger for working, also the unit variables are set to "No Unit" so it wont damage anyone anymore.
 
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