| 03-15-2005, 03:01 PM | #1 |
I want to know the easiest way to make random heros pick clicking on the "random hero" botton. |
| 03-15-2005, 05:51 PM | #2 |
probably would involve setting up a unit array, with each hero stored in the array. When the player hits, have the game generate a random number and use that for the variable subscript to randomly pick from a hero in the array. |
| 03-15-2005, 06:30 PM | #3 |
Guest | First put all heroes type in an unit type array (set hero_type[1]=beastmaster, set hero_type[2]=naga... etc.) Then do this: A: A unit finishes construction C: Unit type of (constructed unit) equal to (random hero) E: Replace (constructed unit) with a (hero_type[random integer between (1) and (number of heroes)]) with (max life of new unit) |
