the spell is not working at all, somethings wrong

rax_7

New Member
Reaction score
1
this is a passive spell like evasion

Code:
Passive Drunken Haze
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to attacked_unit
    Actions
        Set Percent = 1
        If ((Level of Drunken Haze  for (Attacking unit)) Equal to 1) then do (Set Chance = (Random integer number between 1 and 75)) else do (Do nothing)
        If ((Level of Drunken Haze  for (Attacking unit)) Equal to 2) then do (Set Chance = (Random integer number between 1 and 65)) else do (Do nothing)
        If ((Level of Drunken Haze  for (Attacking unit)) Equal to 3) then do (Set Chance = (Random integer number between 1 and 55)) else do (Do nothing)
        If ((Level of Drunken Haze  for (Attacking unit)) Equal to 4) then do (Set Chance = (Random integer number between 1 and 45)) else do (Do nothing)
        If ((Level of Drunken Haze  for (Attacking unit)) Equal to 5) then do (Set Chance = (Random integer number between 1 and 35)) else do (Do nothing)
        If ((Level of Drunken Haze  for (Attacking unit)) Equal to 6) then do (Set Chance = (Random integer number between 1 and 25)) else do (Do nothing)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                Chance Equal to Percent
            Then - Actions
                Unit - Create 1 Beer for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing 90.00 degrees
                Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Drunken Haze (Attacked unit)
                Wait 0.50 seconds
                Unit - Remove (Last created unit) from the game
            Else - Actions
                Do nothing

attack_unit is a variable. Beer is a dummy unit with druken haze ability. i dont know what happen. i did everything exactly as the sample map. but the sample map works fine, mine doesnt work at all.
and Set Chance = (Random integer number between 1 and 75, is this mean the chance is 75% or 25%?
 

Psiblade94122

In need of sleep
Reaction score
138
is the variable attacked_unit set to anything?

because is attacked_unit is set to nothing, then it will always return as false and it wont run at all
 

UnknowVector

I come from the net ... My format, Vector.
Reaction score
144
Neither, at level 1, you have a 1/75 chance, at level 6 a 1/25. You are comparing directly to percent, its possible you never actually triggered the spell. Also, killing the last created unit after a wait is not a good idea, after that wait, the last created unit might not be the unit you created before the wait.

Maybe you should describe exactly what you want this spell to do.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
>and Set Chance = (Random integer number between 1 and 75, is this mean the chance is 75% or 25%?

Here are the abilities chances:

1 = 1.3%
2 = 1.5%
3 = 1.8%
4 = 2.2%
5 = 2.8%
6 = 4%

I think, unless I did the math wrong. Eh, I probably did. But anyways, they are still low chances.

To check it, try creating an array variable (integer) and set them as a random integer from (Percent you desire) to 100. Then do this:
Code:
    if VAR[ARRAY#] is Less than or equal to (Percent Desired) then 
        Actions
    else 
        ACTIONS

That's really bad, pseudo code. Sorry. :p

EDIT: I took forever to post this... I got pwned..
 

rax_7

New Member
Reaction score
1
Ohhh,if you are right, then no wonder i dont see any effect, its rarely see in 1.3% chance. i will try to set it higher. thanks. i thought 1 and 75% means either 75% or 25%. now i see. thanks.
 

Choppa

www.warcraft-gamers.po.gs
Reaction score
59
What's Percent set to?

Set Chance = (Random integer number between 1 and 75) isnt 75%
 
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