Tutorial: Random activators selector tutorial - ssomar1607/ExecutableItems GitHub Wiki
Tutorial to how to make a random activators (with the same option) selector
Only in the case you have many complex activators, if its just simple activators with 2-3 commands, you can use the custom command RANDOM RUN (check the wiki of the custom commands)
REQUIREMENTS
- ExecutableItems
1) Select in your mind the option you want for your activator, during this tutorial I will take the option PLAYER_ALL_CLICK.
2) Create a variable, named for example: randActivator, with default value on 0
3) Create an activator with the option choose (for me PLAYER_ALL_CLICK)
4) Then in this activator, go in the Variables modification part
- Create a new variable modification
- Select the variable previously created randActivator
- Set ty type of modification on SET
- and in modification set the placeholder
%rand:1|X%
but replace X by the amount of the activators that you will created in the random list - for example
%rand:1|3%
Okay so now, each time the activator will be activated, the variable randActivator will take a value between 1 and 3 (includes).
5) Create the others activators
- Now you just need to create your others activators, that will be selected randomly
- THEY MUST BE CREATED after the activator created in the part 4, to be written in the config after this activator
- Why ? because the activators are runned in the order of their creation, so the activator that chooses the random variable must be runned first.
AND these activators must have a placeholder condition:
- "New placeholder cdt"
- Type :
PLAYER_NUMBER
- First part:
%var_randActivator_int%
- Comparator:
EQUALS
- Second part:
X
(example with 3 activators, the first must have X replace by 1, the second X replace by 2 ....) - don't touch to the others features, if you dont need it
- Then save the condition
- Type :
I hope you understand now a bit how it works,
If the guide wasn't clear enough or there was a mistake, please contact me (Ssomar) in discord.