[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
 
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).
 
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 ^^
 
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.
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good

      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