Posted By: jpxtreme
how do you display variable to a panel - 01/17/11 10:24
i know this is a very basic question but I cannot seem to figure it out.
I have a panel in which I want to display the value of my variable viol_cntr. This variable counts how many violations the player has made through touching or going to an object.
I've tried to solve it using digits but the value won't increment to 1 it directly goes to 9. Maybe I've done it wrong please help me figure it out. Thanks!
PANEL* violations =
{
digits (210, 100, 1, *, 1, viol_cntr);
flags = VISIBLE;
}
function hit_event()
{
set(damageproperty,VISIBLE);
wait(-3);
reset(damageproperty,VISIBLE);
viol_cntr += 1;
}
action viol_damageprop()
{
my.emask |= ENABLE_IMPACT;
my.event = hit_event;
}
I have a panel in which I want to display the value of my variable viol_cntr. This variable counts how many violations the player has made through touching or going to an object.
I've tried to solve it using digits but the value won't increment to 1 it directly goes to 9. Maybe I've done it wrong please help me figure it out. Thanks!
PANEL* violations =
{
digits (210, 100, 1, *, 1, viol_cntr);
flags = VISIBLE;
}
function hit_event()
{
set(damageproperty,VISIBLE);
wait(-3);
reset(damageproperty,VISIBLE);
viol_cntr += 1;
}
action viol_damageprop()
{
my.emask |= ENABLE_IMPACT;
my.event = hit_event;
}