How to set the starting level of heroes and a fixed respawn time?

edited April 4 in Questions

I've tried changing the starting level in "npc_heroes_custom" using "level" however the hero didn't acquire the ability points from all those levels, only one ability point. I also dont know how to set a fixed respawn time.

Thanks in advance.

Comments

  • Posts: 182

    http://docs.moddota.com/lua_server/

    CDOTABaseGameMode:SetFixedRespawnTime( float flFixedRespawnTime )

    Set a fixed delay for all players to respawn after.

    usage:

    YourGameModeEntity:SetFixedRespawnTime( 3 )
    

    CDOTA_BaseNPC_Hero:HeroLevelUp( bool bPlayEffects )

    Levels up the hero, true or false to play effects.

    usage:

    local startingLevel = 4
    for i=1,startingLevel do
        YourHero:HeroLevelUp(false)
    end