Targeting Invulnerable Towers

Ran into this problem when trying to stun buildings.

"OnChannelSucceeded"
        {
            "ActOnTargets"
            {
                "Target"
                {
                    "Center"    "CASTER"
                    "Radius"    "GLOBAL"
                    "Teams"     "DOTA_UNIT_TARGET_TEAM_BOTH"
                    "Types"     "DOTA_UNIT_TARGET_ALL | DOTA_UNIT_TARGET_COURIER | DOTA_UNIT_TARGET_OTHER"
                    "Flags"     "DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES | DOTA_UNIT_TARGET_FLAG_INVULNERABLE"
                }

                "Action"    
                {
                    "RunScript"
                    {
                        "ScriptFile"    "heroes/hero/stun.lua"
                        "Function"      "Stun"
                    }
                }
            }
        }

This outcome I'm looking for is that when the no target ability is activated all towers get stunned (including fountain). However only the first towers (the ones that aren't invulnerable) get stunned. I have also tried including DOTA_UNIT_TARGET_BUILDING however that doesn't seem to work. If anyone knows of a flag or target type that i'm missing that would be appreciated.

Comments

  • Posts: 19

    Shitty thing happens when invulnerability is involved. Just run a script under OnChannelSucceeded and do it in lua.

  • Posts: 4

    Gotta love dota 2 modding :D :D

  • Posts: 183

    iirc the built in stun modifier ignores invulnerable targets. if you used your own modifier that stuns it should work.