How to add "Contains" to a function?
Two.E
Member Posts: 599
Hello GS Community,
Does anyone know if it is possible to add "Contains" to an equation function?
I am looking to write something like this:
(Game.Attribute "Contains" 1) and (Game.Attribute "Contains" 2) and (True) or (False).
Which means it will return True if the attribute contains both the value 1 and 2.
Otherwise return False.
Also, is it possible to find a list of all possible operations that are supported? Such as Not equal to, equal to or less than etc?
(Note: I am aware I can use a rule and add multiple conditions, but for want I am trying to achieve I need to check multiple conditions at once using an equation.)
Thanks in Advance!
Two.E
Comments
Assuming I've understood you correctly, you can do it with the textFind function.
Here's a pretty good list: https://www.tutorialspoint.com/lua/lua_operators.htm
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline Perfect! Exactly what I was trying to achieve and that looks like a fantastic place to read more.
GSLearn.com | Templates | Free Demos | Udemy Course
Glad to have helped!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Ooooh, I just learned you can use # for string length. Thanks, @Armelline!
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User