Unknown Leak

jarekpl12

TH.net Regular
Reaction score
6
can somone tell me what is wrong here? thx The problem is that after I attack with normal attack (with 100% chance to crit that appears on my board) it doesn't crit.. I add also about 3 sec after attack untill remove 100% crit

Evasion & Critical chance is: Bash ability with 100% chance to stun and 2/2.5/3/3.5 multiple damage that stuns for 2 sec
Focus Shot is: Wind Walk ability

Code:
Focus Shot
    Event
        Unit - A unit Starts an effect of an ability
    Condition
        (Ability being cast) equal to Focus Shot 
    Action
        Unit - Order (Triggering unit) to Stop
        Trigger - Turn off Focus Shot per sec <gen>
        Trigger - Turn on Focus Shot per sec <gen>


Code:
Focus Shot per sec
    Event
        Time - Every 1.00 seconds of game time
    Condition
    Action
        Set FocusShotCount = (FocusShotCount + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Condition
                FocusShotCount equal to 1
            Then - Action
                Text - Create floating text that reads 1 above ArcherCaster with Z offset 0.00, using font size 14.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
                Text - Change (Last created floating text): Disable permanence
                Text - Change the fading age of (Last created floating text) to 0.01 seconds
                Tekst - Change the lifespan of (Last created floating text) to 1.50 seconds
                Special Effect - Create a special effect attached to the origin of ArcherCaster using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Remove Evasion & Critical Strike  from ArcherCaster
                Unit - Add Evasion & Critical Strike (Archer lvl 1) to ArcherCaster
            Else - Action
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FocusShotCount equal to 2
            Then - Action
                Text - Create floating text that reads 2 above ArcherCaster with Z offset 0.00, using font size 14.00, color (79.00%, 100.00%, 50.00%), and 0.00% transparency
                Text - Change (Last created floating text): Disable permanence
                Text - Change the fading age of (Last created floating text) to 0.01 seconds
                Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Special Effect - Create a special effect attached to the origin of ArcherCaster using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Remove Evasion & Critical Strike (Archer lvl 1) from ArcherCaster
                Unit - Add Evasion & Critical Strike (Archer lvl 2) to ArcherCaster
            Else - Action
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Condition
                FocusShotCount equal to 3
            Then - Action
                Text - Create floating text that reads 3 above ArcherCaster with Z offset 0.00, using font size 14.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
                Text - Change (Last created floating text): Disable permanence
                Text - Change the fading age of (Last created floating text) to 0.01 seconds
                Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Special effect - Create a special effect attached to the origin of ArcherCaster using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Special effect - Destroy (Last created special effect)
                Unit - Remove Evasion & Critical Strike (Archer lvl 2) from ArcherCaster
                Unit - Add Evasion & Critical Strike (Archer lvl 3) to ArcherCaster
            Else - Action
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Condition
                FocusShotCount equal to 4
            Then - Action
                Text - Create floating text that reads 5 above ArcherCaster with Z offset 0.00, using font size 14.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                Text - Change (Last created floating text): Disable permanence
                Text - Change the fading age of (Last created floating text) to 0.01 seconds
                Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Special effect - Create a special effect attached to the origin of ArcherCaster using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Special effect - Destroy (Last created special effect)
                Unit - Remove Evasion & Critical Strike (Archer lvl 4) from ArcherCaster
                Unit - Add Evasion & Critical Strike (Archer lvl 5) to ArcherCaster
                Trigger - Turn off (This trigger)
            Else - Action


Code:
Focus Shot attack
    Event
        Unit - A unit Is attacked
    Condition
        And - All (Conditions) are true
            Condition
                (Unit-type of (Attacking unit)) equal to |cffFFFF00Archer|r
                ((Attacking unit) has buff Focus Shot ) equal to TAK
    Action
        Trigger - Turn off Focus Shot per sec <gen>
        Set FocusShotCount = 0
        Unit - Remove Focus Shot  buff from ArcherCaster
        Unit - Remove Evasion & Critical Strike (Archer lvl 1) from ArcherCaster
        Unit - Remove Evasion & Critical Strike (Archer lvl 2) from ArcherCaster
        Unit - Remove Evasion & Critical Strike (Archer lvl 3) from ArcherCaster
        Unit - Remove Evasion & Critical Strike (Archer lvl 4) from ArcherCaster
        Unit - Remove Evasion & Critical Strike (Archer lvl 5) from ArcherCaster
        Unit - Add Evasion & Critical Strike  to ArcherCaster
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
I'm quite sure Critical Strike doesn't work when added in A unit is attacked events. The same ought to hold for Bash.
 

jarekpl12

TH.net Regular
Reaction score
6
its not added in A unit is attacked event just in event Time - Every 1.00 seconds of game time
It's removed by A unit is attacked
 

jarekpl12

TH.net Regular
Reaction score
6
ok my problem is when i increase lvl with trigger of Bash ability to lvl that has 100% chance to bash and deal 4x damage it never deals a critical... On the abilities board it shows me description from that lvl of ability (Gives 100% chance to deal 4x damage) but ability doesn't work at all... pls help if somone know what is going on
 

Smitty

Member
Reaction score
20
You're removing the ability when the unit is attacked, which happens before the actual attack is landed. In order to detect a unit landing an attack you either have to use an orb effect, or a system for detecting it.
 

jarekpl12

TH.net Regular
Reaction score
6
Even if i dont remove this ability it doesn't work... can u show me ur idea with orb effect? thx
 

Smitty

Member
Reaction score
20
Oh, I think it's the first trigger 'begins the effect of an ability'. I'm fairly sure passive attack modifiers don't count like that.
 

jarekpl12

TH.net Regular
Reaction score
6
This trigger sets Evasion & Critical Strike level (that's one ability) that has 100 levels (1% per ever level and at 96-100 levels critical chance is 100% and multiple damage is at 96-2x, 97-2.5x...100-4x) to level equal to 20% of Agility:


Code:
Bonus
    Events
        Time - Every 0.50 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching ((Level of Evasion & Critical Strike (Archer) for (Matching unit)) more than 0)) and do (Actions)
            Loop - Actions
                Unit - Set level of Evasion & Critical Strike (Archer) for (Picked unit) to ((Agility of (Picked unit) (Include bonuses)) / 5)



Now I cast ability (Wind Walk)

Code:
Focus Shot
    Events
        Unit - A unit Starts an effect of an ability
    Conditions
        (Ability being cast) equal to Focus Shot 
    Actions
        Trigger - Turn off Bonus <gen>
        Unit - Set level of Evasion & Critical Strike (Archer) for (Triggering unit) to 96
        Wyzwalacz - Turn off Focus Shot per sec <gen>
        Wyzwalacz - Turn on Focus Shot per sec <gen>


Now I set on other trigger to increase Evasion & Critical Strike ability by 1 per every 1 sec (96-100) till 100 level:

Code:
Focus Shot per sec (disabled)
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Set FocusShotCount = (FocusShotCount + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FocusShotCount equal to 1
            Then - Actions
                Text - Create floating text that reads 1 above ArcherCaster with Z offset 0.00, using font size 14.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
                Text - Change (Last created floating text): Disable permanence
                Text - Change the fading age of (Last created floating text) to 0.01 seconds
                Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Unit - Order ArcherCaster to Stop
                Special Effect - Create a special effect attached to the origin of ArcherCaster using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Special Effect - Destroy (Last created special effect)
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FocusShotCount equal to 2
            Then - Actions
                Text - Create floating text that reads 2 above ArcherCaster with Z offset 0.00, using font size 14.00, color (79.00%, 100.00%, 50.00%), and 0.00% transparency
                Text - Change (Last created floating text): Disable permanence
                Text - Change the fading age of (Last created floating text) to 0.01 seconds
                Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Unit - Order ArcherCaster to Stop
                Special Effect - Create a special effect attached to the origin of ArcherCaster using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Increase level of Evasion & Critical Strike (Archer) for ArcherCaster
            Else - Actions
         ....3th and 4th...
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                FocusShotCount equal to 5
            Then - Actions
                Text - Create floating text that reads 5 above ArcherCaster with Z offset 0.00, using font size 14.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
                Text - Change (Last created floating text): Disable permanence
                Text - Change the fading age of (Last created floating text) to 0.01 seconds
                Text - Change the lifespan of (Last created floating text) to 1.50 seconds
                Unit - Order ArcherCaster to Stop
                Special Effect - Create a special effect attached to the origin of ArcherCaster using Abilities\Spells\Other\Charm\CharmTarget.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Increase level of Evasion & Critical Strike (Archer) for ArcherCaster
                Trigger - Turn off (This trigger)
            Else - Actions

Now after i click to attack (my Evasion & Critical Strike ability should have 100 lvl and it has) i set off above trigger and turn back to level of Evasion & Critical Strike equal to 20% Agility:

Code:
Focus Shot attack
    Events
        Unit - A unit Is attacked
    Conditions
        And - All (Conditions) are true
            Conditions
                (Unit-type of (Attacking unit)) equal to |cffFFFF00Archer|r
                ((Attacking unit) has buff Focus Shot ) equal to Yes
    Actions
        Trigger - Turn off Focus Shot per sec <gen>
        Set FocusShotCount = 0
        (Wait 2.00 seconds) - tried without too
        Unit - Remove Focus Shot  buff from ArcherCaster
        Trigger - Turn on Bonus <gen>


ArcherCaster is here:

Code:
Archer caster
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        (Unit-type of (Triggering unit)) equal to |cffFFFF00Archer|r
    Actions
        Set ArcherCaster = (Triggering unit)
        Trigger - Turn off (This trigger)

And now is the problem... Evasion & Cricial Strike ability has 100 lvl at 5th charge and 100% chance to crit... but it doesn't crit -,-
 

afisakov

You can change this now in User CP.
Reaction score
37
A couple troubleshooting questions I come up with
1) Do the text messages appear above unit? (proof he is detected as archercaster)
2) Does the new crit ability appear on hero itself? (Proof he got new ability)
3) try turning off "Focus Shot attack" and see if subsequent attacks crit? (help diagnose if something is wrong with crit itself)
If crit works after 3, I have a possible theory why it isn't critting, the game may treat the windwalk bonus damage similarly to a critical strike, and criticals don't stack in wc3. If this proves to be the problem u would have to base focused shot off a diff ability and maybe havea dummy cast invis on hero to replicate effect.
 

Smitty

Member
Reaction score
20
Why is the unit type equal to '|cffFFFF00Archer|r'? Just checking that's what it's meant to be. Also... possibly more relevant, your 'focus shot per sec' trigger is disabled. Therefore it won't run. Even then, why do you turn it off and then on again instantly within the same trigger? that won't do anything. At all. Just a quick cursory look, will check it further but those are the screamingly obvious potential problems.
 

jarekpl12

TH.net Regular
Reaction score
6
Do the text messages appear above unit?
yes it does
Does the new crit ability appear on hero itself?
yes it does, but there is no new ability just the same with set lvl to 96-100... but it does, it appear lvl 96-100 on hero abilities board
try turning off "Focus Shot attack" and see if subsequent attacks crit?
i checked it: it does not
If crit works after 3, I have a possible theory why it isn't critting, the game may treat the windwalk bonus damage similarly to a critical strike, and criticals don't stack in wc3
- think it's my problem... gonna check...thx +rep

yeah it works:) windwalk colides with critical strike ability or bash even if windalk's backstab damage is disabled
 

Smitty

Member
Reaction score
20
I'm pretty sure it doesn't treat it as a critical strike, I vaguely remember something like this before. Check it though. And try what I said ;)
 
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