I have a small dungeon that has 6 events in it (one is a trap, another grants an HP potion, another boosts MP, etc - nothing super fancy).
I can already make it so that I can trigger a random event; I created a variable that chooses a random number between 1 and 6 and then it runs the event corresponding to the number that was picked. So, for example, if the random variable picked the number 2, it gives the player a nice HP potion.
But then in another area of the dungeon the random variable sometimes chooses the same number as it chose the previous time. But what I want to happen is for the random variable to be "smart" enough to disregard any random numbers it already picked and therefore cycle through all 6 possible events without repeating a number.
For example in the first event the player got a potion and in the second event the player triggers a trap, and so on until all 6 events have played out and none repeat (thus preventing the player from having sprung 6 traps).
This is a repeatable dungeon by the way so that's why I'm trying to make this random so it's at least a little different each time through, otherwise I would just assign one event to one trigger. I'm trying to keep the player from knowing that "the potion is always on this tile" and "the trap is always on this other tile".
I hope I explained this well enough and I always appreciate everyone's help!
Have a great day!
I can already make it so that I can trigger a random event; I created a variable that chooses a random number between 1 and 6 and then it runs the event corresponding to the number that was picked. So, for example, if the random variable picked the number 2, it gives the player a nice HP potion.
But then in another area of the dungeon the random variable sometimes chooses the same number as it chose the previous time. But what I want to happen is for the random variable to be "smart" enough to disregard any random numbers it already picked and therefore cycle through all 6 possible events without repeating a number.
For example in the first event the player got a potion and in the second event the player triggers a trap, and so on until all 6 events have played out and none repeat (thus preventing the player from having sprung 6 traps).
This is a repeatable dungeon by the way so that's why I'm trying to make this random so it's at least a little different each time through, otherwise I would just assign one event to one trigger. I'm trying to keep the player from knowing that "the potion is always on this tile" and "the trap is always on this other tile".
I hope I explained this well enough and I always appreciate everyone's help!
Have a great day!