Show a variant variable in the frame

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Show a variant variable in the frame

Postby juhuwoorps » Fri Aug 22, 2008 7:05 pm

Hello!

Is there a way to show a variant variable in the frame?

I mean that I have reading this here in the forum, but I searched for it for an hour and can't find it :(

Thanks for help!:)
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby GM-Support » Fri Aug 22, 2008 7:31 pm

Hi,

First create some text by right-clicking on the frame background.

Then, put this code in the Frame Properties window (under the "advanced" tab):

Code: Select all
Text(1) = NAME_OF_YOUR_VARIANT_VARIABLE


Regards,
GM-Support
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby juhuwoorps » Fri Aug 22, 2008 8:34 pm

Hi!

This code only shows the variable status when the frame is loaded (e.g 0).
When the variable is changed+1 (also the variable status is 1) it shows any longer the 0. :(

Is there a way to show the changed status when it's modified?
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Mystery » Fri Aug 22, 2008 11:30 pm

Well, I don't know what exactly you wish to do, but you can check out this small example:

Create a variant variable, e.g. MyQuestion

Right click on the frame, and create some text (e.g. Here is my question)

Go to the Advanced Tab of the Frame Properties, and add

Code: Select all
MyQuestion = "How are you?"
Text(1) = MyQuestion


Add a hotspot on the frame, go to the Advanced Tab of the Hotspot Properties, and add
Code: Select all
MyQuestion = "Next Question."
Text(1) = MyQuestion


Add another hotspot, and add to the Advanced Tab of the Hotspot Properties
Code: Select all
MyQuestion = "Third Question."
Text(1) = MyQuestion


As you can see, the displayed text will change.

I hope that this little example helps :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby juhuwoorps » Sat Aug 23, 2008 8:38 am

Well, I will do this:

I have a variable test.
When the frame is started is test=0

I have a hotspot which counts test=test+1
I want to show the variable test in the frame.

If test=1 it should show 1,After the next click when test=2 it should show me the 2 and so on.

Edit:Ok I think I figured it out. :)
Yeah it works ! :)

Thanks for help!
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Mystery » Sat Aug 23, 2008 11:13 am

Glad you've figured it out :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests