• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Triggered Evasion by True Strike

Status
Not open for further replies.
Level 7
Joined
Jan 30, 2011
Messages
267
i want to use triggered evasion in my map and i planned to do it this way:
every unit, that has a chance to evade, has a 100% evasion ability
when a unit with that evasion is attacked, there are 2 possibilities:
1. the attacker gets true strike ability (hit)
2. true strike ability gets removed (dodge)
true strike is based on bash
the system seems to work so far but i havent done very much tests yet, so i would like to know if there are any known issues with this system
(note: all orb effects and other attack modifiers (crit, bash, etc...) are triggered, so that it cant collide)
 
that is inefficient...

just use bribes damage detection and use the event that fires before the damage is dealt. then run a random numer from 1 to 100 check if the attack is evaded or not if yes set damage to 0 and make a floating text if not deal the damage.
 
@ruler: no, true strike will stay until the unit attacks the next time
then it will be removed if its a misshit
@clapto: i know that i can easily prevent the dmg by dmg engine (im using nes' dmg mod effect), but i want to do it with real evasion^^ (attack sounds, etc...)
 
JASS:
library DodgeSystem initializer init
    private function dodge takes nothing returns nothing
        local real random = GetRandomReal(0, 1)
        if(random > 0.3) then
            call UnitAddAbility(GetAttacker(), 'A000')
        else
            call UnitRemoveAbility( GetAttacker(), 'A000'  )
        endif     
    endfunction

    private function init takes nothing returns nothing
        local trigger trig = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ( trig, EVENT_PLAYER_UNIT_ATTACKED )
        call TriggerAddAction( trig, function dodge )
    endfunction
endlibrary

a simple, quickly written version of my system (not optimized and nothing, just to see the idea)
 
Status
Not open for further replies.
Back
Top