Changing text in Tables

alarm656alarm656 Member Posts: 291
edited October 2013 in Working with GS (Mac)
Hi everyone can someone explain how to change the text?

I have created Table (TBText) and inside of table I created 2 text attributes 2rows and 2 columns.
Row1 & Columns1 has text: "The door is locked"
Row2 & Columns2 has text: "It's not used here"

I have a 3 actors. (Message, Door and Key)
I have 2 Global Boolean and 1 Text attributes. I called boolean attribute "key-own" and show-message, text attribute called "DisplayMessage"

Message actor has rule: Attribute game.show-message is true
Behavior: Display Text. Text: game.DisplayMessage

Door actor has following rules:

Rule1. Actor receives event touch pressed

Change attribute: game.show-message to true
Change attribute: game.DisplayMessage to TableCellValue(TBText,1,1) //"The door is locked"


Rule2. Actor receives event touch pressed
Attribute game.key-own true

Change attribute: game.show-message to true
Change attribute: game.DisplayMessage to TableCellValue(TBText,2,2) //"It's not used here"

//My second rule gives me the text from first rule.

Please help me.

Comments

Sign In or Register to comment.