"Hero changed" event

I suggest to add “Hero changed” event. It will greatly reduce the number of rules in some game modes. It won’t be necessary to create three billion rules for each hero.

For example, in game mode when player changes hero, you (game mode developer) need to update variables. So you need to create one rule, which performs same actions, for each hero.

For now, you can create a Global Variable, I’ll call it PlayerHeroes, and if Hero Of Event Player != Value In Array (PlayerHeroes, index=Slot Of Event Player), then Set Global Variable At Index (PlayerHeroes, index=Slot Of Event Player, value=Hero Of Event Player).

For simplicity, if you’re not using FFA, I would make this global variable twice, one for Team 1 and one for Team 2, so you don’t have to have one complicated rule with 10 conditions and actions to determine team and add 6 to the slot of event player.

1 Like

Good idea! Thank you!

This, but instead of using a global array, use a player variable. So each player only saves his own hero.

2 Likes

That would be even simpler, Go with this Hexus. Keep the code extra small :slight_smile:

1 Like