Changing text in Tables
alarm656
Member Posts: 291
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.
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
if player has a key but wrong key but he doesn't know that the key is not for this door. he will try to open door with key which he found and he has a active item(key) in inside of inventory, he touches the door but he sees the another text "it's not used here")))
So if wrongkey = 1
Change attri: table change text. Doesn't work
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
https://www.dropbox.com/s/yiqsx281x4y5cyf/table text changer2.zip
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮