Using Display text to display a variable attribute in one state
dkatz621
Member Posts: 9
Hey everyone! I've been at this for over an hour now and am at my wits end. The problem I am having is this:
I am trying to create an actor that when touch is pressed displays a game variable, lets call this variable price.
Now, price changes every few seconds, but I want the price that is displayed to remain the price that was there when the player hit the button.
All of my attempts at using boolean attributes, separate actors, etc have failed. I either create a display text that instantly goes away. Or, the display text says, but continues to update the price in real time.
What can be done?
Dan
I am trying to create an actor that when touch is pressed displays a game variable, lets call this variable price.
Now, price changes every few seconds, but I want the price that is displayed to remain the price that was there when the player hit the button.
All of my attempts at using boolean attributes, separate actors, etc have failed. I either create a display text that instantly goes away. Or, the display text says, but continues to update the price in real time.
What can be done?
Dan
Best Answer
-
gyroscope I am here.Posts: 6,598
@dkatz621
Hi Dan, make another real attribute, let's call this ShowPrice
So in the button you press, put your Display Text behaviour, with ShowPrice (selected via the expression editor, as you know, I'm sure).
--now add
Rule: when touch is pressed
Change Attribute scene.ShowPrice to scene.variable price
Edit: ah, you figured it out yourself, great!""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Answers