Chance on attack give buff?

Broshir

New Member
Reaction score
2
Hi, i want to make a spell, lets call it Rage.


tooltip:
"When you attack there is 15% that you will enter a berserker rage which increases attack speed by 30% for 5 seconds (can only occur once every 10 seconds)."

Clearifying:
im making a passive buff which allows you to enter the berserker rage, and when u attack, there should be 15% to add a buff called berserker rage which increases attack speed by 30% (duration 5sec) and it should be cooldowned for 10sec (after the buff has been added), so, u can get the buff, have it for 5 seconds, 5seconds without it and then be able to get it again.

Can some1 help me make this spell? i have no idea where to start at all :/

thanks =)
 

DK's Pride

New Member
Reaction score
7
Code:
Events
    Unit - A unit Is attacked
Conditions
    And - All (Conditions) are true
        Conditions
            (Level of (Ur Spell) for (Attacking unit)) Not equal to 0
            ((Attacked unit) is A structure) Equal to False
            
Actions
    Set CastingUnit = (Attacking unit)
    Set CasterLoc = (Position of CastingUnit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Random integer number between 1 and 100) Less than or equal to 15
        Then - Actions
            Unit - Create 1 Dummy unit for (Owner of CastingUnit) at CasterLoc facing Default building facing degrees
            Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            Unit - Add Berserker Rage to (Last created unit)
            Unit - Order (Last created unit) to Berserker Rage CastingUnit
        Else - Actions
            Do nothing
    Custom script:   call RemoveLocation (udg_CasterLoc)


I think this would do it, if there anything u dont understand or anything i forgot just ask :p
 

Broshir

New Member
Reaction score
2
Code:
Events
    Unit - A unit Is attacked
Conditions
    And - All (Conditions) are true
        Conditions
            (Level of (Ur Spell) for (Attacking unit)) Not equal to 0
            ((Attacked unit) is A structure) Equal to False
            
Actions
    Set CastingUnit = (Attacking unit)
    Set CasterLoc = (Position of CastingUnit)
    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        If - Conditions
            (Random integer number between 1 and 100) Less than or equal to 15
        Then - Actions
            Unit - Create 1 Dummy unit for (Owner of CastingUnit) at CasterLoc facing Default building facing degrees
            Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            Unit - Add Berserker Rage to (Last created unit)
            Unit - Order (Last created unit) to Berserker Rage CastingUnit
        Else - Actions
            Do nothing
    Custom script:   call RemoveLocation (udg_CasterLoc)


I think this would do it, if there anything u dont understand or anything i forgot just ask :p
excuse me for being a newb but, i dont know (most) of the stuff that u linked, i mean, i dont know on what category i can find em, can u clearify? im really sorry but i want this spell =p and also i will learn from mistakes(or just noobiness)
 

DK's Pride

New Member
Reaction score
7
excuse me for being a newb but, i dont know (most) of the stuff that u linked, i mean, i dont know on what category i can find em, can u clearify? im really sorry but i want this spell =p and also i will learn from mistakes(or just noobiness)

can i maybe send it to you then?, cause im not good at explaining (bad english) :/

if u want i can make the entire spell actually :)
 

Broshir

New Member
Reaction score
2
can i maybe send it to you then?, cause im not good at explaining (bad english) :/

if u want i can make the entire spell actually :)

=) i mail u on this site

DK's pride, read the mail i sent u on the site, its important :), g2g now cu
 

Crusher

You can change this now in User CP.
Reaction score
121
Nice...maybe I need this spell too so can you post demo here please to me?+Rep for sure.
 

DK's Pride

New Member
Reaction score
7
View attachment Rage-3.w3x

Here, if theres any bugs or something like that plz tell me =)


When u import it to your map, first do this

Go to: Files, preferences, and press on "Automaticly create unknown variables while pasting triggers".

Then just Copy/Paste the triggers :)

Edit: woops forgot to save the map before i put it in here, if u had downloaded it then download it again :)
 

Romek

Super Moderator
Reaction score
963
Code:
    And - All (Conditions) are true
        Conditions
            (Level of (Ur Spell) for (Attacking unit)) Not equal to 0
            ((Attacked unit) is A structure) Equal to False

Why the "And" function?
If you list the conditions normally, they still all have to be true.

So, remove the And block, and put the conditions in normally :)
 

DK's Pride

New Member
Reaction score
7
Lol :D didnt know that, i thought only 1 needed to be true exept you used and funktion xD

Well we all learn more everyday
 

Romek

Super Moderator
Reaction score
963
Lol :D didnt know that, i thought only 1 needed to be true exept you used and funktion xD

Well we all learn more everyday
Nope. They're all true unless you use "Or" Conditions :)
 
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