Hi All,
Hopefully this is not a duplicate question as i have searched and I have the terminology correct but i am trying to get a nested variable working, here is a crude example of the code that I am attempting to get working.
- Variables -
ActiveTeam = 1
Team1Colour = Red
Team2Colour = Green
Team3Colour = Blue
- Program Output -
Your team Colour = Team(ActiveTeam)Colour
I really hope that makes sense.
Thanks
Ben
Nested Variable
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Nested Variable
Hello,
It sounds like you maybe need a multi dimensional array.
TeamColours[2][3]
Would give you two teams each with three colour values.
You would then reference like this.
Red = TeamColours[ActiveTeam][0]
Green = TeamColours[ActiveTeam][1]
Blue = TeamColours[ActiveTeam][2]
It sounds like you maybe need a multi dimensional array.
TeamColours[2][3]
Would give you two teams each with three colour values.
You would then reference like this.
Red = TeamColours[ActiveTeam][0]
Green = TeamColours[ActiveTeam][1]
Blue = TeamColours[ActiveTeam][2]
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel