So, a while back, 10January 2017, PB2 got a new update. This update contained some new abilities with the settings, the ability to let players spawn with certain slots in DM and TDM and a bunch of new variable trigger actions.
In this topic I won't talk about the first two items, but about the new triggers for those who do not understand what they mean or don't know how to use them.
The new triggers are more math based and work with variable letters and simple functions.
They require some think work to work with, but when you know how the system works they can be very useful to make more complicated maps and make things that in the past required a lot of triggers a lot easier.
For those who are new in level editing or don’t know how to work with the var. trigger actions:
First we should split up the var. triggers in two categories:
(1) The ones that ask information, or change the values of variables. (1-10)(19,20)(23)(25,26)(28)(32-51)(53-56)
(I marked the stars of these in green (scroll down to see these))
(2) The ones that use these variables to accomplish something in your map. (11-18)(21,22)(24)(27)(29-31)(‘displaying in text’ as well)
(I marked the stars of these in red (scroll down to see these))
(52 is a special case)
Only working with the (1) var. trigger actions, or only working with the (2) var. trigger actions won’t be any help in your map at all. In order to accomplish something you’ll have to combine using these trigger actions.
As basic, let’s try making a credit/money system.
- To start we’ll need some begin value, this can be done with the “Var > Set variable 'A' to value 'B'” trigger action (the first one). You put down a timer with 0 delay in your map, activate a trigger with it and use the “Var > Set variable 'A' to value 'B'” as first trigger action.
In ‘parameter ‘A’’ you fill in how you want to call your variable, I’ll use ‘Money_Var’ in this example.
In ‘parameter ‘B’’ you fill in what the value will be, if you want the player to start with 0 money, you fill in 0.
Result --> Money_Var = 0 (at the start of the match)
- A second thing we want to do is find a way to give the player money during the match.
This can be done with the “Var > Add value 'B' to variable 'A'” trigger action (third one).
Let’s say the player earns money by pressing a button: Put a region (green button) in your map and connect it to a trigger (with infinite calls (not necessary)), as first trigger action you use “Var > Add value 'B' to variable 'A'”, you fill in the variable (‘Money_Var’ in this case) in ‘parameter ‘A’’ and the value you want to add in ‘parameter ‘B’’ (I’m gonna use the value 5 in this example)
Result -->
- After pressing the button once: Money_Var = 5
- After pressing the button twice: Money_Var = 10
- …
- Now the player has some money he could buy something, as example he can buy a gun with a price of 10 ‘money’ when he presses a button.
Add a region (green button) in your map and connect it with a trigger, in this trigger you use “Var > Continue trigger action execution only if variable 'A' has greater value than value 'B'” as first trigger action(make sure it isn’t the one with ‘greater value than VARIABLE ‘B’), in ‘parameter ‘A’’ you fill in the name of the variable, and in ‘parameter ‘B’’ a number, one lower than the actual price (because the trigger action says “… GREATER value than value ‘B’…”, so in this case that number would be 9.
For the second trigger action you are gonna subtract the 10 from the variable, you can simply do this by using the “Var > Add value 'B' to variable 'A'” trigger action and putting -10 in the ‘parameter ‘B’’.
For the third trigger action you’re gonna teleport the gun to the region.
Result -->
- If Money_Var = 5 --> Nothing happens --> Money_Var = 5
- If Money_Var = 10 --> You get the gun --> Money_Var = 0
- If Money_Var = 15 --> You get the gun --> Money_Var = 5
- …
This example was very simple, but I think you should get a basic view on how they work with this :P
The following list explains most of the new trigger actions (for the colours of the stars, open the spoiler above and look at (1) and (2)):
1)
✸ Var > Set variable 'A' to value 'B'
- If you fill in any letter/or word in 'Parameter A', and a number in 'Parameter B', this trigger will equal the letter from parameter A with the number of parameter B.
Examples are:
* 'Parameter A': X and 'Parameter B': 1 --> X=1
2)
✸ Var > Set value of variable 'A' to value 'B' if 'A' is not defined
- This is basically the same as the action above, but this only equals 'A' to 'B' if 'A' has no value yet or has no value anymore.
Example:
* 'Parameter A': X and 'Parameter B': 1
--> If X=[No value], than the value of X will change in 1 --> X=1
--> If X=ℝ (Every possible number), than the value of X won't change in 1
3)
✸ Var > Add value 'B' to variable 'A'
- This is a sum, it will do Value 'A' + Value 'B'
Example:
* 'Parameter A': X (You can change this value with the previous (and this) trigger actions, lets say it is 4 now) and 'Parameter B': 5 --> X= 4+5 =9 (If you use the trigger action again, it will count 5 by 9, ...)
(You cannot use other letters with a value to add to X.)
4)
✸ Var > Multiply value of variable 'A' by value 'B'
- Like it says, it multiplies value 'A' by value 'B' (Value 'A' * Value 'B')
Example:
* 'Parameter A': X (lets use the same value as in the previous example) and 'Parameter B': 2 --> X= 4*2 =8
5)
✸ Var > Add value of variable 'B' to value of variable 'A'
- Almost the same as in (3).
'Parameter B' can't be a number now, you'll have to add a letter with a value here.
Example:
* 'Parameter A': X (lets say it is 1) and 'Parameter B': Y (lets say it is 2) --> X= X+Y = 1+2 =3
6)
✸ Var > Multiply value of variable 'A' by value of variable 'B'
- Almost the same as in (4).
'Parameter B' can't be a number now, you'll have to add a letter with a value here.
* Example:
'Parameter A': X (lets say it is 2) and 'Parameter B': Y (lets say it is 3) --> X= X*Y = 2*3 = 6
7)
✸ Var > Set value of variable 'A' to random number with floating point in range 0..B
- This makes 'A' a random number between 0 and the value of 'B', be careful since this can also give you decimal numbers.
Example:
* 'Parameter A': X and 'Parameter B': 5 --> X= random number between 0 and 5 (like 0.1 or 0.2 or 1 or 1.5 or ... (haven't tested yet howmany decimals))
8 )
✸ Var > Set value of variable 'A' to random integer number in range 0..B-1
- This will make 'A' a random (integer) number between 0 and 'B'-1 (These numbers won't have decimals)
Example:
* 'Parameter A': X and 'Parameter B': 5 --> X= random (integer) number between 0 and 4 ('B'-1) (like 1 or 2 or 3 or 4)
9)
✸ Var > Round value of variable 'A'
- This is a simple one, if 'A' has a value with decimals, it will make 'A' the integer the closest to your decimal number. Can be useful if you want integers in (7).
Examples:
* 'Parameter A': X (lets say it is 1.3) --> X= 1
* 'Parameter A': X (lets say it is 1.7) --> X= 2
10)
✸ Var > Floor value of variable 'A'
- This is also a simple one, if 'A' has a value with decimals, it will delete the decimals and keep the integer. With other words, it rounds the value of the number down.
Example:
* 'Parameter A': X (lets say X is 1.7) --> X= 1
11)
✸ Var > Continue trigger action execution only if variable 'A' is greater than variable 'B'
- If 'A' is bigger than 'B', than all the following actions in the same trigger will work, if not, than the following actions won't work.
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 5) and 'Parameter B': Y (lets say Y is 4) --> X > Y --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': Y (lets say Y is 5) --> X < Y --> 'Action 2 type',... do not work.
12)
✸ Var > Continue trigger action execution only if variable 'A' is less than variable 'B'
- The inverse of the trigger action above. When the value of 'A' is tinier than the value of 'B', than the following actions will work.
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': Y (lets say Y is 5) --> X < Y --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 5) and 'Parameter B': Y (lets say Y is 4) --> X > Y --> 'Action 2 type',... do not work.
13)
✸ Var > Continue trigger action execution only if variable 'A' is equals variable 'B'
- The following trigger actions in the same trigger will only work if the value of 'A' is equal to the value of 'B'
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': Y (lets say Y is 4) --> X = Y --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': Y (lets say Y is 5) --> X ≠ Y --> 'Action 2 type',... do not work.
14)
✸ Var > Continue trigger action execution only if variable 'A' does not equals to variable 'B'
- The following trigger actions in the same trigger will only work if the value of 'A' is not equal to the value of 'B'
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': Y (lets say Y is 5) --> X ≠ Y --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': Y (lets say Y is 4) --> X = Y --> 'Action 2 type',... do not work.
15)
✸ Var > Continue trigger action execution only if variable 'A' has greater value than value 'B'
- The following trigger actions in the same trigger will only work if the value of 'A' is bigger than 'B' (the difference with the previous trigger actions is that 'B' is a number and not a letter here)
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 5) and 'Parameter B': 4 --> X > 4 --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': 5 --> X < 5 --> 'Action 2 type',... do not work.
16)
✸ Var > Continue trigger action execution only if value of variable 'A' is less than value 'B'
- The inverse of the trigger action above. The following trigger actions in the same trigger will only work if the value of 'A' is tinier than 'B'
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': 5 --> X < 5 --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 5) and 'Parameter B': 4 --> X > 4 --> 'Action 2 type',... do not work.
17)
✸ Var > Continue trigger action execution only if value of variable 'A' equals value 'B'
- The following trigger actions in the same trigger will only work when the value of 'A' is equal to 'B'
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': 4 --> X = 4 --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': 5 --> X ≠ 5 --> 'Action 2 type',... do not work.
18 )
✸ Var > Continue trigger action execution only if value of variable 'A' does not equals to value 'B'
- The following trigger actions in the same trigger will only work if the value of 'A' is not the same as 'B'
Examples:
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': 5 --> X ≠ 5 --> 'Action 2 type',... works.
* ('Action 1 type') 'Parameter A': X (lets say X is 4) and 'Parameter B': 4 --> X = 4 --> 'Action 2 type',... do not work.
19)
✸ Var > Set value of variable 'A' to value of region 'B' X position of left-top corner point
- This trigger action will equal the letter filled in in 'A' to the X position of the left-top corner point of region 'B'
The x-and y-position can be found if you click on the region and look under the ID.
If you move the region during a match thanks to another trigger, the x position will also change and will appear in 'A' as well when using this trigger action.
Example:
* 'Parameter A': X and 'Parameter B': Region*1 (which is, lets say, located at the coördinats (20, 60)) --> X= x-coördinats = 20
20)
✸ Var > Set value of variable 'A' to value of region 'B' Y position of left-top corner point
- Same as above, but now with the y-position
The x-and y-position can be found if you click on the region and look under the ID.
If you move the region during a match thanks to another trigger, the y position will also change and will appear in 'A' as well when using this trigger action.
Examples:
* 'Parameter A': X and 'Parameter B': Region*1 (which is, lets say, located at the coördinats (20, 60)) --> X= y-coördinats = 60
21)
✸ Var > Set x position of 'A' region left-top corner point to value of variable 'B'
- This will move the region to the x-coördinats 'B'
Examples:
* 'Parameter A': Region*1 (with, lets say, the coördinats (20, 60)) and 'Parameter B': X (lets say X is 40) --> Region*1 will move to the coördinats (40, 60) now.
22)
✸ Var > Set y position of 'A' region left-top corner point to value of variable 'B'
- Same as the trigger action above, but with the y-coördinats.
Examples:
* 'Parameter A': Region*1 (with, lets say, the coördinats (20, 60)) and 'Parameter B': X (lets say X is 40) --> Region*1 will move to the coördinats (20, 40) now.
23)
✸ Var > Set value of variable 'A' to hitpoints value of player 'B'
- This trigger will make the value of 'A' equal to the amount of hitpoints a player has.
Example:
* 'Parameter A': X and 'Parameter B': Player*1 (lets say he/she has 500 hp) --> X= 500
24)
✸ Var > Skip next trigger action if value of 'A' does not equals value 'B'
- This trigger action will deactivate the next trigger action in the same trigger if the value of 'A' is not the same as 'B'
The trigger actions after the deactivated action will still work fine.
Examples:
* ('Action 1 type') 'Parameter A': X (lets say this is 4) and 'Parameter B': 5 --> X ≠ 5 --> 'Action 2 type' won't work, 'Action 3 type',... will work.
* ('Action 1 type') 'Parameter A': X (lets say this is 4) and 'Parameter B': 4 --> X = 4 --> 'Action 2 type' will work as well as the following actions in the same trigger.
25)
✸ Var > Set variable 'A' value to remainder after division by value 'B' (only positive numbers)
Variable 'A' is a number, this number will be splitted in two parts, one of the parts is the biggest number that can be substracted from the original number while being divisible by value 'B' without making decimal outcomes, the other part is the remainder, the value of variable 'A' will be the remainder. (examples are less confusing)
Examples:
* 'Parameter A': X (with for example value 24) and 'parameter B': 5 --> X = 4 (because: 24 = 20 + 4 --> 20 is the biggest number divisible by 5, 4 is the remainder)
* 'Parameter A': X (with for example value 25) and 'parameter B': 5 --> X = 0 (because: 25 is perfectly divisible by 5 without having a remainder)
26)
✸ Var > Set value of variable 'A' to value of variable 'B'
The same as in 1), but here you have to fill in a variable as 'B', and not a value anymore.
Example:
* 'Parameter A': X and 'parameter B': Y (lets say Y is 2) --> X=2 (because Y=2)
27)
✸ Var > Make an explosion with power of value of variable 'A' at region 'B'
This trigger action will make an explosion in region 'B', the power of this explosion will be the number of variable 'A'
Examples:
* 'Parameter A': X (lets say X is 5) and 'parameter B': 'region*1' --> A (little) explosion with a power of 5 will happen in 'region*1'
* 'Parameter A': X (lets say X is 50) and 'parameter B': 'region*1' --> A (big) explosion with a power of 50 will happen in 'region*1'
28 )
✸ Var > Set variable 'A' value to remainder after division by value of variable 'B' (only positive numbers)
Variable 'A' is a number, this number will be splitted in two parts, one of the parts is the biggest number that can be substracted from the original number while being divisible by the value of variable 'B' without making decimal outcomes, the other part is the remainder, the value of variable 'A' will be the remainder. (examples are less confusing)
Examples:
* 'Parameter A': X (with for example value 24) and 'parameter B': Y (with for example value 5) --> X = 4 (because: 24 = 20 + 4 --> 20 is the biggest number divisible by 5, 4 is the remainder)
* 'Parameter A': X (with for example value 25) and 'parameter B': Y (with for example value 5) --> X = 0 (because: 25 is perfectly divisible by 5 without having a remainder)
29)
✸ Var > Force Gun 'A' spawn value of variable 'B' projectiles per shot
This trigger action will change the projectile amount per shot from a gun to the value of variable 'B'.
With other words: When having a gun and clicking once it will shoot 'B' projectiles at the same time.
Example:
* 'Parameter A': gun*1 and 'parameter B': X (lets say X is 3) --> The gun will shoot 3 projectiles per shot.
30)
✸ Var > Change Gun 'A' accuracy to value of variable 'B' degress
Kinda obvious like the one above, only difference is that this trigger will change the gun accuracy to the value of variable 'B' instead of the amount of projectiles.
31)
✸ Var > Change Gun 'A' projectile power to value of variable 'B'
Kinda obvious like the two above, only difference is that it will change the projectile power to the value of variable 'B'
32)
✸ Var > Divide variable 'A' by value 'B'
This will divide the value of variable 'A' by the value of 'B', however, this can also be done with the multiply trigger by multiplying with numbers between 0 and 1 (like dividing a number by 2 = multiplying the number by 0.5)
Example:
* 'Parameter A': X (lets say X is 8 ) and 'parameter B': 2 --> X = 4 (because 8/2 = 4)
33)
✸ Var > Divide variable 'A' by value of variable 'B'
This will divide variable 'A' by the value of variable 'B', same as above, but here 'B' is a variable.
Example:
* 'Parameter A': X (lets say it is 8 ) and 'parameter B': Y (lets say it is 2) --> X = 4 (because: X/Y = 8/2 = 4)
34)
✸ Var > Set value of variable 'A' to result of power function with value of variable 'A' and power of value of variable 'B'
This will do 'A' ^ 'B' (X multiplying by X for Y times, example: 4^3 = 4³ = 4*4*4 = 64)
Example:
* 'Parameter A': X (lets say X is 5) and 'parameter B': 2 --> X = 25 (because: 5^2 = 5² = 5*5 = 25)
35)
✸ Var > Set value of variable 'A' to result of power function with value of variable 'A' and power of value 'B'
Same as above, but 'B' isn't a variable, just a number.
Example:
'Parameter A': X (lets say X is 5) and 'parameter B': 2 --> X = 25
NOTE FOR 34) and 35), if you want to take SQUARE ROOTS from numbers, you'll have to fill in 0.5 in parameter 'B', if you want CUBE ROOTS from numbers you could fill in 0.3333333333333333333333 in 'B'.
36)
✸ Var > Set value of variable 'A' to result of sin function with value of variable 'B' (in radians) as parameter
This will take the sine of the value of variable 'B' and make 'A' this number. (sine and cosine can be used in circles, waves, repeating stuff, ...)
Example:
* 'Parameter A': X and 'parameter B': 2 --> X = 0.909 (because: sin(2) = 0.909)
37)
✸ Var > Set value of variable 'A' to result of cos function with value of variable 'B' (in radians) as parameter
Same as above, but here you work with the cosine of 'B'.
Example:
* 'Parameter A': X and 'parameter B': 2 --> X = -0.416 (because: cos(2) = -0.416)
38 )
✸ Var > Set value of variable 'A' to slot of current player
This will change the value of variable 'A' into the slot of your character. (the first placed 'player' in your map is slot 0, the second placed 'player' in your map is slot 1,...)
Examles:
* 'Parameter A': X and 'player*1' (the player placed first in the map) uses the trigger --> X = 0
* 'Parameter A': X and 'player*8' (the eighth placed player in the map) uses the trigger --> X = 7
39)
✸ Var > Set value of variable 'A' to 1 if game is in multiplayer mode and to 0 in else case
When playing the map in multiplayer the value of variable 'A' will be 1, when playing the map in singleplayer 'A' will be 0.
40)
✸ Var > Set value of variable 'A' to 1 if my player is spectating the match as spectator and 0 in else case
When a you are spectating a match instead of actually joining the match, variable 'A' will be 1, if you join the match the variable will be 0.
41)
✸ Var > Set value of variable 'A' to 1 if LOW PHYSICS settings is enabled and 0 in else case
When the player has gone to his settings and enabled 'low physics', 'A' will be 1, if not, 'A' will be 0.
---New character triggers won't be explained since they are no variable triggers.---
42)
✸ Var > Set value of variable 'A' to number of alive players in region 'B'
When a group of players is located in region 'B' this trigger will count the amount of (alive) players and set that number as variable 'A'.
Example:
* 'Parameter A': X and 'parameter B': region*1 --> when 5 alive people and one dead one are located in region*1, X = 5
43)
✸ Var > Set string-value of variable 'A' to login name of player-initiator
When a player IN MULTIPLAYER uses this trigger, variable 'A' will change into his/her login name
Example:
* 'Parameter A': X --> A player with the login name 'Eric Gurt' joins the game and presses a button that activates this trigger --> X = Eric Gurt
44)
✸ Var > Set string-value of variable 'A' to displayed name of player-initiator
When a player uses this trigger in multiplayer or singleplayer, 'A' will be the displayed name of the player (the name above the character)
Example:
* 'Parameter A': X --> A player with the name 'Example[Clan X]' joins a game (the clan tag was added later to his name) and presses a button that activates this trigger --> X = Example[Clan X]
45)
✸ Var > Set string-value of variable 'A' to multiplayer match name
If somebody starts a match with a certain match name in multiplayer, this match name will be variable 'A'.
Example:
* 'Parameter A': X --> A player starts a match with the name 'saw pass: 123' in the server --> X = saw pass: 123
46)
✸ Var > Set value of variable 'A' to 1 if string-value of variable 'A' contains string-value 'B' and to 0 in else case
When the sting-value of 'A' contains sting value 'B', 'A' will change into 1, when not, 'A' will change into 0. (It can be used to give certain users certains stuff, or ban some players or player groups from your map)
Example:
* 'Parameter A': X (lets say X is 'Guest-254845') and 'parameter B': Guest --> A = 1 (because 'Guest-254845' contains the word 'Guest')
* 'Parameter A': X (lets say X is 'Guest-254845') and 'parameter B': Apple --> A = 0
47)
✸ Var > Set value of variable 'A' to 1 if string-value of variable 'A' contains string-value of variable 'B' and to 0 in else case
Same as above, but 'B' is a variable here.
Example:
* 'Parameter A': X (lets say X is 'Guest-254845') and 'parameter B': Y (lets say Y is 'Guest') --> A = 1 (because X contains Y)
48 )
✸ Var > Set value of variable 'A' to length of string-value of variable 'B'
This will count the characters in the string-value of variable 'B' (also counts spaces)
Example:
* 'Parameter A': X and 'parameter B': Y (lets say Y is 'test 123') --> X = 8 (because: 'test 123' counts 8 characters)
49)
✸ Var > Add string-value 'B' at the end of string-value of variable 'A'
This will merge an existing string-value ('A') with a new string-value ('B') (with this action you could change the names of players with a certain function in the map, or display all the players with a certain function via a text, ...)
Example:
'Parameter A': X (lets say X is 'player X') and 'parameter B': (base protector) --> X = player X (base protector)
50)
✸ Var > Set value of variable 'A' to 1-A
This will substract the value of variable A from 1.
Example:
* 'Parameter A': X (lets say X is 4) --> X = -3 (because: 1-4 = -3)
51)
✸ Var > Set value of variable 'A' to -A
This will make the value of variable 'A' positive or negative, depending on if 'A' is positive or negative.
Examples:
* 'Parameter A': X (lets say X is 3) --> X = -3
* 'Parameter A': X (lets say X is -3) --> X = 3
52)
✸ Var > Set trigger 'A' as player chat message receiver
The trigger you select will be a trigger that gets all the messages said in the chat.
This will be important for the following trigger actions...
53)
✸ Var > Set string value of variable 'A' to login name of player who says text
MAKE SURE YOU SET THIS TRIGGER AS CHAT MESSAGE RECEIVER FIRST (with trigger action 52) in this tutorial)!
When a player says something in the in-game chat, than variable 'A' will become his/her login name.
Example:
* 'Parameter A': X --> a player with the name 'darkstar 1' joins the game and says something in the chat --> X = darkstar 1
54)
✸ Var > Set string value of variable 'A' to displayed name of player who says text
MAKE SURE YOU SET THIS TRIGGER AS CHAT MESSAGE RECEIVER FIRST (with trigger action 52) in this tutorial)!
Same as the trigger action above, but now the variable will be the displayed name (the name above your character's head).
55)
✸ Var > Set value of variable 'A' to slot index of player who says text
MAKE SURE YOU SET THIS TRIGGER AS CHAT MESSAGE RECEIVER FIRST (with trigger action 52) in this tutorial)!
If a player says something in the in-game chat, the variable will become the slot of the player (the first added player in your map will be slot 0, the second player will be slot 1,...)
Example:
* 'Parameter A': X --> The player which is added as fourth in the map says something in the chat --> X = 3
56)
✸ Var > Set sting-value of variable 'A' to text being said
MAKE SURE YOU SET THIS TRIGGER AS CHAT MESSAGE RECEIVER FIRST (with trigger action 52) in this tutorial)!
If somebody says something in the in-game chat, variable 'A' will become this text. (This trigger is used as basic for the command systems)
Example:
* 'Parameter A': X --> Somebody says 'hola' in the chat --> X = hola
✸ DISPLAYING VARIABLES IN A TEXT
Displaying values of variables in a text created with the 'Show text 'A' in chat with color 'B'' or 'Show hint with text 'A'' is not that hard, what you do is just filling in the variable in the text, than the value will display in it. Note, everything with the same name as the variable will also show up as the value of the variable
Example:
* Variable: X1 (lets say the value of it is 5) and Text: 'The value of the variable is X1.' --> Text showing up: The value of the variable is 5.
How it isn't done: Text: 'The value of X1 is X1.', this will show up as: The value of 5 is 5.
I might add some creations with these triggers to this post in the future, but like I said, I don't have much to show yet.
I wish you many luck with making your maps.
--- If you have any questions or if I did/said something wrong in this forum post, please let me know in the comments or via PM, I will try to answer or edit the post---