[Spell]Bash

Mike889

New Member
Reaction score
15
This is the new skill i'm working with. However i've got some problems with it =/
This skill is called bash, and it damages for (Skill Level) x Strenght of the Hero and also has a 5% chance per level to stun it's target, starting with 10% on level 1. However my skill is not damaging its target and i don't know how to make a % chance to stun. Only my floating text is working correct =/

Code:
Bash Level
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Bash (Swordsman)
    Actions
        Set ______BashLevel[(Player number of (Owner of (Triggering unit)))] = (______BashLevel[(Player number of (Owner of (Triggering unit)))] + 1)
        Set ______BashLevel_Copy[(Player number of (Owner of (Triggering unit)))] = (______BashLevel_Copy[(Player number of (Owner of (Triggering unit)))] + 1.00)

Thiss trigger add +1 to the variable BashLevel everytime you learn the Bash skill. I'm doing that because i haven't found out any other way to reference skill levels. BashLevel is Integer and BashLevel_Copy Real.

Code:
Bash
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Bash (Swordsman)
    Actions
        Set NoviceStrenght[(Player number of (Owner of (Triggering unit)))] = (Strength of (Triggering unit) (Include bonuses))
        Set ________SwordsmanAttack[(Player number of (Owner of (Triggering unit)))] = (Real(NoviceStrenght[(Player number of (Owner of (Triggering unit)))]))
        Set _Target = (Target unit of ability being cast)
        Set _Caster = (Triggering unit)
        Unit - Cause _Caster to damage _Target, dealing ((______BashLevel_Copy[(Player number of (Owner of _Caster))] + 1.00) x (Real((Strength of _Caster (Include bonuses))))) damage of attack type Hero and damage type Normal
        Set _TempPoint = (Position of _Target)
        For each (Integer A) from 0 to 100, do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ______BashLevel_Copy[(Player number of (Owner of _Caster))] Equal to 1.00
                        (Integer A) Less than or equal to 10
                    Then - Actions
                        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at _TempPoint facing Default building facing degrees
                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                        Unit - Add Dummy Stun (3 seconds) to (Last created unit)
                        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
                        Floating Text - Create floating text that reads  |cffFFCC00Bash!!|r above _Caster with Z offset 90.00, using font size 28.00, color (100.00%, 0.00%, 100.00%), and 10.00% transparency
                        Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
                        Floating Text - Change (Last created floating text): Disable permanence
                        Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ______BashLevel_Copy[(Player number of (Owner of _Caster))] Equal to 2.00
                                (Integer A) Less than or equal to 15
                            Then - Actions
                                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at _TempPoint facing Default building facing degrees
                                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                                Unit - Add Dummy Stun (3 seconds) to (Last created unit)
                                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
                                Floating Text - Create floating text that reads  |cffFFCC00Bash!!|r above _Caster with Z offset 90.00, using font size 28.00, color (100.00%, 0.00%, 100.00%), and 10.00% transparency
                                Floating Text - Set the velocity of (Last created floating text) to 25.00 towards 90.00 degrees
                                Floating Text - Change (Last created floating text): Disable permanence
                                Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        ______BashLevel_Copy[(Player number of (Owner of _Caster))] Equal to 3.00
                                        (Integer A) Less than or equal to 20
                                    Then - Actions
                                        Unit - Create 1 Dummy for (Owner of (Triggering unit)) at _TempPoint facing Default building facing degrees
                                        Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                                        Unit - Add Dummy Stun (3 seconds) to (Last created unit)
                                        Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
                                        Floating Text - Create floating text that reads  |cffFFCC00Bash!!|r above _Caster with Z offset 90.00, using font size 28.00, color (100.00%, 0.00%, 100.00%), and 10.00% transparency
                                        Floating Text - Set the velocity of (Last created floating text) to 25.00 towards 90.00 degrees
                                        Floating Text - Change (Last created floating text): Disable permanence
                                        Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                ______BashLevel_Copy[(Player number of (Owner of _Caster))] Equal to 4.00
                                                (Integer A) Less than or equal to 25
                                            Then - Actions
                                                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at _TempPoint facing Default building facing degrees
                                                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                                                Unit - Add Dummy Stun (3 seconds) to (Last created unit)
                                                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
                                                Floating Text - Create floating text that reads  |cffFFCC00Bash!!|r above _Caster with Z offset 90.00, using font size 28.00, color (100.00%, 0.00%, 100.00%), and 10.00% transparency
                                                Floating Text - Set the velocity of (Last created floating text) to 25.00 towards 90.00 degrees
                                                Floating Text - Change (Last created floating text): Disable permanence
                                                Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                                            Else - Actions
        Custom script:   call RemoveLocation (udg__TempPoint)

This is the skill trigger. It was supposed to damage for skill lvl x hero str and has a little chance to stun. However only the floating text is working =/
I want to make it MUI and MPI, what i need to change?
My skill is based of Storm Bolt (even the hero as the dummy skills)

Thanks very much =D
 

Flare

Stops copies me!
Reaction score
662
to reference skill levels, just use (Unit - Level of Ability for Unit). its an integer.

for a random chance, do a real (or integer comparison)

Random real number (or integer) between 1 and 100 less than or equal to 5x (Ability Level). Then, do your dummy spawning actions if that condition is true (with your integer A setup, you're gonna cast 10/15/20 stuns since integer A and B increase regularly (goes up one every time the loop actions complete).
 

Mike889

New Member
Reaction score
15
to reference skill levels, just use (Unit - Level of Ability for Unit). its an integer.

for a random chance, do a real (or integer comparison)

Random real number (or integer) between 1 and 100 less than or equal to 5x (Ability Level). Then, do your dummy spawning actions if that condition is true (with your integer A setup, you're gonna cast 10/15/20 stuns since integer A and B increase regularly (goes up one every time the loop actions complete).
Lol, thats why the enemys were instantly dying everytime i cast Bash =P
Thanks, i'll try that ^^

EDIT:
Code:
Bash
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Bash (Swordsman)
    Actions
        Set NoviceStrenght[(Player number of (Owner of (Triggering unit)))] = (Strength of (Triggering unit) (Include bonuses))
        Set _Target = (Target unit of ability being cast)
        Set _Caster = (Triggering unit)
        Unit - Cause _Caster to damage _Target, dealing ((Real((Level of Bash (Swordsman) for _Caster))) x (Real((Strength of _Caster (Include bonuses))))) damage of attack type Hero and damage type Normal
        Set _TempPoint = (Position of _Target)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random percentage) Less than or equal to (5.00 x (Real((Level of Bash (Swordsman) for _Caster))))
            Then - Actions
                Unit - Create 1 Dummy for (Owner of (Triggering unit)) at _TempPoint facing Default building facing degrees
                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                Unit - Add Dummy Stun (3 seconds) to (Last created unit)
                Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
                Floating Text - Create floating text that reads  |cffFFCC00Bash!!|r above _Caster with Z offset 90.00, using font size 28.00, color (100.00%, 0.00%, 100.00%), and 10.00% transparency
                Floating Text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
            Else - Actions
        Custom script:   call RemoveLocation (udg__TempPoint)


Hmm... now as it dosn't have waits i think it's MUI, MPI leakless and is much, much smaller!!
Omg, thanks Flare, i've learnt many things now ^^

+rep
+credits ^^
 

Flare

Stops copies me!
Reaction score
662
i hope you realise that you only once referred to _Caster in that trigger ^^
and you only referred to _Target once to get the location ^^. if you dont plan on using the variables, setting them tends to be a waste of time.

And i get the feeling that random percentage wont work properly (i think percentage in WC3 goes from 0.00 to 1.00. You may wanna check that. Use Math - Random Number if it doesnt work

spell should be MUI unless 2 units cast at exact same time, and i think it has to be MPI if its MUI
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top