Schokokex / addon_template_butt

A template for Dota But Mods. Initiated by Baumis Twitch/Youtube channel and the community.
https://www.twitch.tv/l34um1
22 stars 13 forks source link

on level up events.lua #16

Closed Schokokex closed 4 years ago

Schokokex commented 4 years ago

No, I'm using the Events script from the template. The event "on leveling up" I'm making heroes getting bonus stats when they level up, but it don't work for the host's hero. I thought it was poorly coded, so I tried to rewrite the code, but the best I made was every hero get bonus stats when one hero level up, instead of only the hero that level up get stats I could manually change the stats again of every hero, but that takes time Stats gain* The weird part is that it only happens at valve's server. If you open your addon at your PC to test, it works fine.

Schokokex commented 4 years ago
local playerEntindex = keys.player
local playerUnit = EntIndexToHScript(playerEntindex)
local heroUnit = playerUnit:GetAssignedHero()