Expression to variable
![Yarik](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
http://i.pixs.ru/storage/1/8/2/GameBox37p_4437714_2334182.png
for me to use this variable is inconvenient
http://i2.pixs.ru/storage/1/9/9/GameBoxijp_6285490_2334199.png
may use it like?
for me to use this variable is inconvenient
http://i2.pixs.ru/storage/1/9/9/GameBoxijp_6285490_2334199.png
may use it like?
Comments
game.Box (chosen from via the Editor, not typed) +self.1 + self.j
Also, a small tip, to make your attribute names with more information (actual words) because if you're project gets complex with lots of single letters, it'd be easy to get confused.
Hope that helps.
Edit: or if attributes are text, concatenate (join one after the other) as TSB wrote.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
"game.Box..self.i..self.j" Empty
"game.Box...self.i..self.j" Invalid Expression
"game.Box..(self.i)..(self.j)" Empty
"game.Box...(self.i)..(self.j)" Invalid Expression
Why can not
i think problem is not .. or +
if write game.Name or game.Box.37 then shows Invalid Expression
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Box.37 this is not name, name is 37,
Box is size for variable, like self.Position or self.Size
37,i,j - I tried it with Index and real
So, as far as I can make out Name is a text attribute, 37 is a text attribute and Box is a variable attribute: integer, real or index.
Fo this example, lets say the following values are: Name = John; Box = 37;and we'll give i the value of 28; and j the value of 290.
So using the Expression Editor in a Display Text Behaviour, if you put, (as TSB said):
Name...Box...i...j you'll get:
John3728290
If you put Name..." "...Box..." "...i..." "...j you'll get:
John 37 28 290
Still confused what your actual values are but hope that's helped.
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
game attributes
real game.11 = 478
real game.27 = 996
real game.34 = 754
actor attribute
real self.i
real self.j
display text: game.(self.i)(self.j)
if i=1 j=1 then show 478
if i=2 j=7 then show 996
if i=3 j=4 then show 754
is similar to a static array
game.11 = 478
game.27 = 996
game.34 = 754
self.i
selfj
if i=1 j=1 then show 478
if i=2 j=7 then show 996
if i=3 j=4 then show 754
478, 996 and 754 need to be put into attributes, presumably either self.i or self.j?
Display Text: (self.i)..(self.j)
Say self.i becomes 478 and self.j becomes 996, then you'll get displayed:
478996
If you want 478 996 then put:
Display Text: (self.i).." "..(self.j)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
wanted to work with a static array
but I forgot that I can not enter the expression into the first slot "Chang Attribute "
but even so thank you very much