• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

yet another knockback spell

Status
Not open for further replies.
[I still need help!] yet another knockback spell

i need a knockback spell that uses the Damage detection system, which will 100% of attacks (Passive SPell) will do a tiny 50 push to units, but not a stun, i need it sort of like "Warlocks" where the unit can still cast spells or move around and attack.

if anyone can do this for me i would very much appreciate it
 
Last edited:

Cokemonkey11

Code Reviewer
Level 29
Joined
May 9, 2006
Messages
3,511
yes you just copy it.


It's using vJass, so the syntax button will give tons of errors. Just save it, I'm assuming there won't be any errors then.

I made a huge ugly "hashtable" (function) of units that deal piercing damage, since there's no way to get them from object editor data, so you can modify that trigger to make it faster or affect more units.

Glad you like,
 

Cokemonkey11

Code Reviewer
Level 29
Joined
May 9, 2006
Messages
3,511
Change

JASS:
    private function i takes nothing returns nothing
        set tDDKB=CreateTrigger()
        call TriggerAddAction(tDDKB,function a)
    endfunction
endscope

to

JASS:
    private function c takes nothing returns boolean
        return GetUnitTypeId(GetAttacker())=='hpea' //replace peasant with unit xyz rawcode.
    endfunction
    
    private function i takes nothing returns nothing
        set tDDKB=CreateTrigger()
        call TriggerAddCondition(t,Condition(function c))
        call TriggerAddAction(tDDKB,function a)
    endfunction
endscope
 
Status
Not open for further replies.
Top