I believe this is relatively new addition seeing there are no documentations nor github examples, so I fiddled around with it to see if I can help fix the crash bug on my custom game(my game is crashing upon picking hero, probably related to invisiblebox overriding method that I have been using). I assumed what it does is notifying hero to apply the applicable wearables to current model(so attach nothing to non-dota model), and it worked as I expected on tools client : http://i.imgur.com/HXvBdFb.png
However, it does not work at all when the same version was run on main client : http://i.imgur.com/i9PDZqI.jpg. Notice the floating dota 2 cosmetics around heroes.
Refer to above code for how I used it, and please leave documentation on these new APIs if possible. Thank you.
However, it does not work at all when the same version was run on main client : http://i.imgur.com/i9PDZqI.jpg. Notice the floating dota 2 cosmetics around heroes.
Code:
hero:SetGold(0, false) LevelAllAbility(hero) hero:AddItem(CreateItem("item_blink_scroll", nil, nil) ) -- Give blink scroll hero.CStock = 10 hero.RespawnPos = hero:GetAbsOrigin() print(hero:GetPlayerOwnerID()) local heroName = FindName(hero:GetName()) hero.name = heroName GameRules:SendCustomMessage("Servant <font color='#58ACFA'>" .. heroName .. "</font> has been summoned. Check your Master in the bottom right of the map.", 0, 0) -- The problematic part starts here hero:NotifyWearablesOfModelChange(false) -- Tried true as well, in which case it does absolutely nothing even in tools client hero:ManageModelChanges() -- Still not sure what it does, adding this does not seem to make a difference hero:RespawnUnit() -- Just an insurance to de-freeze the model from T-shape