View Single Post
heliumdream
Senior Member
Join Date: Aug 2006
Old 08-30-2019 , 10:45   Re: [New] Cooldown Display - modded shnvault & heroes package
Reply With Quote #2

Second Note:

This framework can work with additional cooldown heroes not on the list, but requires updating and modifying the hero itself to include a global array variable that gets keyed with players ids and stores game_time stamps, this informs the modded nvault package about when a player pushed which hero. I would suggest checking a hero with Cooldown Display already implemented to ensure you do it correctly.

You then also need to be sure to further modify and edit the nvault package in several places, setting up variables for your newly supported hero, a forward, and adding the new heroes variables to the else if checks inside the displayPowers function (starts line 2802)

Again, good luck!

---

Third Note:

I noticed if you run bots, occasionally they have strange ids, well outside the expected range. This causes all kinds of heroes to throw console errors, virtually all related to unexpected ids.
I patched every hero where this was occurring, by adding a check to see if the is user is connected...
Code:
if ( !shModActive() || !is_user_alive(id) || !is_user_connected(id)) return
I believe bots aren't connected, so checking their connected status prevents them from passing their bad ids into the hero functions.
I haven't extensively tested these changes, it has sured up the console errors, but I'm not certain if doing this has broken anything else...

I only recently added bots, and know I had very stable code that wasn't throwing errors previous to adding bots...so I went to some lengths to get the console back to stable.
__________________

Last edited by heliumdream; 08-31-2019 at 10:16.
heliumdream is offline