Rule, text expression, *is*

TryangleTryangle Member Posts: 37
edited December 2014 in Working with GS (Mac)

What I want to do:
Move a text from a table cell into an object text attribute, and then a rule that reads the object text attribute so when the object text attribute is "done" (when the text attribute reads "done", then perform a task.

The problem:
I cannot get the text expression to work with is. It only works with contains.

What I've tried:
- First letter uppercase and first letter lowercase
- When attribute instead of when text expression
- Single word and multiple words with and without spaces

To note:
I can successfully run the task if I use contains instead of is, but this may be a problem where the permutation of words in a text are the same.

Am I not understanding how is works, or is it bugged?

Best Answer

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    Here it is with a self attribute. I constrained the attribute because I'm not sure how you have your rules set up to change the attribute but, again, it still works with is.

    If you're still having trouble with it, upload your project file (.zip it first) to a file-sharing site such as mediafire and then post the download link here and I'll take a look at it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Here's a demo of a condition that checks a table cell value against the string "done" using is. Click anywhere to toggle the table row # between 1 and 2.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • TryangleTryangle Member Posts: 37
    edited December 2014

    I see what you are doing, but its not what I am trying to do. Based on what your table name was, here is what I am trying to do:

    Change attribute self.text_placeholder to tablcecellvalue(game.|T|Data, 2,1)

    When text expression self.text_placeholder is "done"
    Display text self.text placeholder

    I am incrementing across table values, so that if a text in the cell is a certain word/sentence, then it performs a certain behavior. Here, displaying the text in the placeholder. Why is the text expression unable to identify the text saved in the object text attribute?

    It only works if I do

    When text expression self.text_placeholder contains "done"

  • TryangleTryangle Member Posts: 37

    Hmm... well, its odd that I can't get strings of characters to save in an object text attribute. But I can make this work, so thanks for taking time to help.

Sign In or Register to comment.