gametechmods

Robot Arena => General Support => Topic started by: daleksec7 on April 07, 2017, 02:15:04 PM

Title: The arena changes randomly
Post by: daleksec7 on April 07, 2017, 02:15:04 PM
I was wondering if someone could help me,

I am making this arena which will have statick hazards (uneven floors, pits etc) and I want to make 3 versions of this so the pit is in the diffrent place or the static hazards are diffrent but they have the same out look, I was wondering if there was a way to make the game to randomly choose which GMF file to use each time its played

Thanks
Title: Re: The arena changes randomly
Post by: Badger on April 07, 2017, 02:36:20 PM
should be possible. If you look in the .py for the arena, and look on line 16, you should see:
Code: [Select]
        Arenas.SuperArena.__init__(self, "Arenas/arenaname/arenagmf.gmf")
change that to:

Code: [Select]
    randomnumber = random.randint(0,3)
    if randomnumber == 0:
        Arenas.SuperArena.__init__(self, "Arenas/arenaname/arenagmf1.gmf
    elif randomnumer == 1:
        Arenas.SuperArena.__init__(self, "Arenas/arenaname/arenagmf2.gmf
    else
        Arenas.SuperArena.__init__(self, "Arenas/arenaname/arenagmf3.gmf

Obviously, changing the filenames as needed.
Title: Re: The arena changes randomly
Post by: Badnik96 on April 07, 2017, 03:12:51 PM
that's a cool idea actually, hopefully it works out
Title: Re: The arena changes randomly
Post by: Asbestosstar on April 07, 2017, 04:44:38 PM
Wow, I want to do that.