sell system for Buildhelper

edited July 2015 in Support

hey guys, i try to create a sell system so my Towers can be Sold. The problem is that when i simply use caster:RemoveSelf() to get rid of the Tower the Blockingvolume still stays (i think it is called gridNavBlockers in Buildhelper) can someone tell me how to get rid of the Blockingvolume?

Comments

  • Posts: 1,670

    The concept of Modding Community doesn't go well together with Competitive Business
    My Project Page || My GitHub Profile ||

  • edited July 2015 Posts: 38

    hey that sounds good,but when i use this ability nothing happens after the Channel:

    "sell_tower"
        {
            "AbilityBehavior"   "DOTA_ABILITY_BEHAVIOR_NO_TARGET | DOTA_ABILITY_BEHAVIOR_CHANNELLED "
            "BaseClass"             "ability_datadriven"
            "AbilityTextureName"            "alchemist_goblins_greed"
            "AbilityCastPoint"              "0.0"
            "MaxLevel"                  "1"
            "AbilityManaCost"               "0"
            "AbilityChannelTime"    "2"
            "OnChannelSucceeded"
            {
                "RunScript"
                {
                    "ScriptFile"            "scripts/vscripts/buildinghelper.lua"
                    "Function"          "building:RemoveBuilding"
                }
            }
        }
    
  • Posts: 1,670

    You can't call a function from KV like that. It should be like this:

    "RunScript"
    {
        "ScriptFile"            "buildinghelper.lua"
        "Function"          "RemoveBuilding"
    }
    

    Lua:

    function RemoveBuilding(event)
        local building = event.caster
        building:RemoveBuilding(true)
    end
    

    The concept of Modding Community doesn't go well together with Competitive Business
    My Project Page || My GitHub Profile ||

  • edited July 2015 Posts: 38

    hey, thank you,the building is now removed but i get some error massages:

    [ W VScript              ]: Script Runtime Error: scripts/vscripts/samplerts.lua:485: attempt to call method 'IsBuilding' (a nil value)
    [ W VScript              ]: stack traceback:
    [ W VScript              ]:     scripts/vscripts/samplerts.lua:485: in function <scripts/vscripts/samplerts.lua:449>
    [ W VScript              ]:     [C]: in function 'ForceKill'
    [ W VScript              ]:     scripts/vscripts/buildinghelper.lua:466: in function 'RemoveBuilding'
    [ W VScript              ]:     scripts/vscripts/buildinghelper.lua:455: in function <scripts/vscripts/buildinghelper.lua:453>
    

    since everything is working fine i guess i can ignore them? Because i don't see the problem in ForceKill or RemoveBuilding...and i don't get why IsBuilding shouldn't be a nilValue since my "Tower" is a creep that just can't move