- Joined
- Nov 12, 2017
- Messages
- 8
Hello Boyz,
I am currently working on a Labyrinth type of map. Inside this Labyrinth there will be 6 shrines where the players can acquire a skill after praying to the gods. Each shrine can only give one ability to the first player who comes to visit it. After that the according shrine triggers will be disabled.
However, while the shrine locations are distinct, the ability a shrine will offer should be randomized each game. (at map initialisation)
And this is where I have issues implementing a working scheme.
My initial idea was to do following:
1. I create An Ability Array "ShrineAbilities" which is 6 slots large (from 0 - 5 )
2. I order each slot to one of my abilites.
3. I create An Integer "RandomNumber" that saves a random number (using the inbuild function for it).
4. I create another Ability Array "ShrineDefiniteAbilites" where the randomed abilites will be put in for later use.
Then I would start a loop:
For each integer X from 0 to 5 do
- set "RandomNumber" = (Random Integer Number between 0 and (5-X)
- set ShrineDefiniteAbilites(X) = (ShrineAbilites(RandomNumber) // I can realise it till this point
Next, since an ability has been assigned I want the variable "ShrineAbilites" become smaller by one.
Lets say the randomed number would be 2, then the second ability will be assigned to my first slot.
Now I want to remove the slot of the second ability from "ShrineAbilites" so I can restart the loop without assigning the same ability twice.
I tried to work with Booleans but I dont find anything really sufficient. And I think there should be a better possibility than writing down every possibility with "if and else" statements.
I use the GUI for 99% of my time.
Any Ideas? Maybe I am overlooking something.
If you want me to clarify things I will try to do that.
I am currently working on a Labyrinth type of map. Inside this Labyrinth there will be 6 shrines where the players can acquire a skill after praying to the gods. Each shrine can only give one ability to the first player who comes to visit it. After that the according shrine triggers will be disabled.
However, while the shrine locations are distinct, the ability a shrine will offer should be randomized each game. (at map initialisation)
And this is where I have issues implementing a working scheme.
My initial idea was to do following:
1. I create An Ability Array "ShrineAbilities" which is 6 slots large (from 0 - 5 )
2. I order each slot to one of my abilites.
3. I create An Integer "RandomNumber" that saves a random number (using the inbuild function for it).
4. I create another Ability Array "ShrineDefiniteAbilites" where the randomed abilites will be put in for later use.
Then I would start a loop:
For each integer X from 0 to 5 do
- set "RandomNumber" = (Random Integer Number between 0 and (5-X)
- set ShrineDefiniteAbilites(X) = (ShrineAbilites(RandomNumber) // I can realise it till this point
Next, since an ability has been assigned I want the variable "ShrineAbilites" become smaller by one.
Lets say the randomed number would be 2, then the second ability will be assigned to my first slot.
Now I want to remove the slot of the second ability from "ShrineAbilites" so I can restart the loop without assigning the same ability twice.
I tried to work with Booleans but I dont find anything really sufficient. And I think there should be a better possibility than writing down every possibility with "if and else" statements.
I use the GUI for 99% of my time.
Any Ideas? Maybe I am overlooking something.
If you want me to clarify things I will try to do that.