Question on "Contains" Rule: When Text Contains XXYZ
VoidedSky
Member Posts: 1,095
Hello all! Do any of you know howI can do the following:
CODE
---Rule: when game.text contains XXYZ (IN ANY ORDER! XXZY, YXZX, YZXX, XZXY,ZXYX, etc....)
--Do ...........
END CODE
Is there any way to have GS find out if it contains all of the characters, but in any order? Sometimes, game.text will need to contain multiple of each letter, like shown above. Any ideas?
Thanks
~CTM
CODE
---Rule: when game.text contains XXYZ (IN ANY ORDER! XXZY, YXZX, YZXX, XZXY,ZXYX, etc....)
--Do ...........
END CODE
Is there any way to have GS find out if it contains all of the characters, but in any order? Sometimes, game.text will need to contain multiple of each letter, like shown above. Any ideas?
Thanks
~CTM
Comments
~CTM
X = 100
Y = 10
Z = 1
If you are looking for a combination of 2 X's, 1 Y, and 1 Z, then the sum of the four letter combination would be 211.
Here's a demo for you:
Text Combinations
Cheers!
@Asymptoteell, I tried that, but you only need one X for it to think there is two Xs.
Thanks guys.
~CTM
Here it is from my Dropbox account:
letterCombinations.zip
All the best.