AaronPwner
Member
- Reaction score
- 0
[SOLVED] Using variables in a string or text message.
I am practicing triggers before trying to create a map, and am making a quest that can vary from game to game (You need to get a fruit for the "king" but the "Fruit" can vary between 5 different choices).
But what I can't figure out is how to display my fruit choice in the text message, as it is ordered into arrays.
My current (problem part, not all of it!) code is:
However it comes out as displayed with the whole FruitsArray jazz, how can I make it so it only displays the number in the array?
I am practicing triggers before trying to create a map, and am making a quest that can vary from game to game (You need to get a fruit for the "king" but the "Fruit" can vary between 5 different choices).
But what I can't figure out is how to display my fruit choice in the text message, as it is ordered into arrays.
My current (problem part, not all of it!) code is:
Trigger:
- ...
- Set FruitChoice = (Random integer between 1 and 5)
- Quest - Display to (All players) the Quest Update message: (|cffffcc00The King wants you to collect: + FruitsArray[(FruitChoice)])|r
- ...
However it comes out as displayed with the whole FruitsArray jazz, how can I make it so it only displays the number in the array?