Variables

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

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

Variables

Postby Lyberodoggy » Tue Dec 23, 2008 4:54 pm

To shadowhunter or GM who know the source of AM:

Is there any Array storing the variable names and values?
Or in order to access them I need to see through a file?

EDIT: I 've found a project file named variables. I can see that there are some variable names in it... How could I load them in AM during runtime?
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby GM-Support » Wed Dec 31, 2008 1:07 pm

Hi,

Yes, there is an array that stores the variables names and values.

Here is how to access the variables of type "integer":
Code: Select all
For i = 1 To WindowObject.Variables.Count
   MsgBox "Variable name: " + WindowObject.Variables.Item(i).Name
   MsgBox "Variable value: " + CStr(WindowObject.Variables.Item(i).Value)
Next


And here is how to access the variables of type "variant":
Code: Select all
For i = 1 To WindowObject.VariablesVariant.Count
   MsgBox "Variable name: " + WindowObject.VariablesVariant.Item(i).Name
   MsgBox "Variable value: " + CStr(WindowObject.VariablesVariant.Item(i).Value)
Next


If you modify the value of some variables, the hotspots visibility should be automatically updated accordingly. However, if it does not, you can force the update by executing the following code:
Code: Select all
Action.UpdateHotspotsState



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

Postby Lyberodoggy » Wed Dec 31, 2008 1:52 pm

Oh this is great! Thanks!
Yes I thought there should be an array... :) Having seen how the rest of the engine works it's obvious.

Anyways I 'll try to use this to make the custom save/load system I 've developed a little better...

This should be included in the help file! it's just great
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby GM-Support » Wed Dec 31, 2008 1:56 pm

Lyberodoggy wrote:Anyways I 'll try to use this to make the custom save/load system I 've developed a little better...

Sounds great! Good luck!

Lyberodoggy wrote:This should be included in the help file! it's just great

Ok, I will add it asap. Thanks!
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby Lyberodoggy » Wed Dec 31, 2008 2:22 pm

Hehe, no problem :wink:
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests