Hello!Im using this code in a working script:

C#:
public enum CustomChamp
    {
        Abyss,
        Arachnid,
        ColdBlood,
        ForestLord,
        VerminHorde,
        UnholyTerror,
        SleepingDragon,
        Glade,
        Pestilence
    }
Its possible to turn this code into a randomized setup from the list?
C#:
[CommandProperty(AccessLevel.GameMaster)]
        public CustomChampType MonstersType { get { return m_MonstersType; } set { m_MonstersType = value; } }

Thank you so much!
 
I presume MonsterType is the enum element!
Code:
int i = Utility.RandomMinMax(0, 8);

MonsterType monster = (MonsterType)i;
 
You'll have to randomly pick one of the champ types at whatever point in your script the champ type gets decided. Each champ type already defines which monster types it contains; you just need to pick the type. The standard champ system already offers "randomized" as a champ type.

If you attach the complete script we'll know where that function should go.
 
Back