Unique Hero Selection

FootysMaXeD

New Member
Reaction score
0
Hello, when I first began my map, I thought that this system would be a fail-safe way to make a unique hero system.

http://world-editor-tutorials.thehelper.net/herotavern.php

It turns out, it is not! There is a system of triggers in that map that seems like it would work. It works something like this:
When a hero is randomed, that hero is effectively removed from the randomed array. This is done by changing the Random_Data[Random_Hero] = Random_Count (which is the max # of heroes), and then reducing the # on Random_Count - 1. For some reason that I havn't figured out, this trigger does not create unique heroes when -randoming or even when doing -AR. Multiple heroes continue to appear.

There are also other problems in creating unique hero selection. SD_Ryoko never considers PICKED heroes. When a hero is chosen from the tavern (when mode is not -AR obviously), that hero is NOT removed from the random hero array. So when the next player decides he will -random, there is a chance he gets the same hero.

The reverse is also a separate problem of it's own. When a hero is -random'ed, he is NOT removed from the Taverns, and therefore can still be picked. This part of the problem I have solved. What I did was create a trigger that sets a Unit Array variable to each of my heroes, one by one.
Hero[1] = Mountain King
Hero[2] = Keeper of the Grove
When a hero is randomed, that hero is then "Removed from all marketplaces" and can no longer be duplicated in that reverse process.

So my questions are these:
1. Why is SD_Ryoko's brilliant system not functioning correctly? Does it have something to do with WE problems? You can test his map, and you will find that there will duplicate heroes sometimes even when you do -AR mode.
2. How can I detect what hero is chosen from the taverns when a player picks a hero, and then remove that specific hero from my Random Array?

Thanks
 

Never_Quit

New Member
Reaction score
16
1. Bad code?

2. I would leave the units in the array, but add another if then else multiple function that checks to see if the unit is present on the map, if so re-run the randomize.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top