1 icon 2 abilities

edited April 26 in Questions

Holla! I want to make ability that works different if u cast on point or self, like new invoker's talent cataclysm and sunstrike, any ideas how to make it? Im actually pretty bad at modding and just copy skills, so i didnt found cataclysm in spell library, and similar skill I found just pugna's decrepify or enchantress enchant, but they probably dont works that way. So I also would be grateful for link to new spell library.

Comments

  • Posts: 858

    cataclysm isn't another ability, it just checks if the cast position == himself (which is what happens when you double click an ability) if so it does the "cataclysm" stuff, simple if statement

    MAKE CUSTOM GAMES GREAT AGAIN

    Finished-
    kv checker - https://arhowk.github.io
    panorama video series - https://moddota.com/forums/discussion/2021/inclusive-panorama-tutorial-quest-box

    My pet project This Cursed World/Crestfallen (name pending)
    https://moddota.com/forums/discussion/986/this-cursed-world-rpg#latest

  • Posts: 2
    • Hooray! Thank u a lot for respond! is it looks like this, how to call castposition, is it variable? would it work with 2 statements like 2)
    1)
    local caster = keys.GetAbsOrigin()
    local point = ability:GetCursorPosition()
    if castposition??? == point then
        CreateLinearProjectile(handle_1)
    else
        CreateTrackingProjectile(FindUnitsInRadius)
    end
    2)
    If castposition == point then
        CreateLinearProjectile(handle_1)
    end
    if castposition == caster then
        CreateTrackingProjectile(FindUnitsInRadius)
    end
    

    also i wanna make armor, weapon and buying another will replace current, player cant have more then one item of this class, how can i assign them classes?