silentwarrior
18th August 2014, 15:46
Hi everyone! I am trying to make some menus and I came up with a situation which an itemdef that has already a dvartest on it, to need another dvartest.
For example I have this:
itemDef
{
name
"item10"
visible
1
rect
0 0 35 22
origin
ORIGIN_CHOICE10
forecolor
GLOBAL_UNFOCUSED_COLOR
type
ITEM_TYPE_BUTTON
text
"^3Ammo Pack"
textfont
UI_FONT_NORMAL
textscale
.30
textstyle
ITEM_TEXTSTYLE_SHADOWED
textaligny
20
dvartest
"items"
showDvar
{ "10" }
action
{
play "mouse_click";
}
onFocus
{
play "mouse_over";
}
}
So this itemdef appears when the dvartest "items" becomes "10".
and now I want to add to it 1 more dvartest:
dvartest
"players"
showDvar
{ "3" }
So the itemdef to appear when both conditions are appropriate ("items" = 10 , "players" = 3). If one of them is different I want it to disappear.
Is it possible to add 2 dvartests in the same itemdef? I tried some combinations like:
dvartest
"items"
showDvar
{ "10" }
dvartest
"players"
showDvar
{ "3" }
or
dvartest
"items","players"
showDvar
{ "10" },{ "3" }
but didn't worked.
I know it is possible if I add a different menudef, and add the second dvartest into the menudef, but I am trying to find a way t avoid multiple menudefs.
Thanks in advance!
For example I have this:
itemDef
{
name
"item10"
visible
1
rect
0 0 35 22
origin
ORIGIN_CHOICE10
forecolor
GLOBAL_UNFOCUSED_COLOR
type
ITEM_TYPE_BUTTON
text
"^3Ammo Pack"
textfont
UI_FONT_NORMAL
textscale
.30
textstyle
ITEM_TEXTSTYLE_SHADOWED
textaligny
20
dvartest
"items"
showDvar
{ "10" }
action
{
play "mouse_click";
}
onFocus
{
play "mouse_over";
}
}
So this itemdef appears when the dvartest "items" becomes "10".
and now I want to add to it 1 more dvartest:
dvartest
"players"
showDvar
{ "3" }
So the itemdef to appear when both conditions are appropriate ("items" = 10 , "players" = 3). If one of them is different I want it to disappear.
Is it possible to add 2 dvartests in the same itemdef? I tried some combinations like:
dvartest
"items"
showDvar
{ "10" }
dvartest
"players"
showDvar
{ "3" }
or
dvartest
"items","players"
showDvar
{ "10" },{ "3" }
but didn't worked.
I know it is possible if I add a different menudef, and add the second dvartest into the menudef, but I am trying to find a way t avoid multiple menudefs.
Thanks in advance!