I attempted to make my own code....
but ran into a problem...
heres my code:
Actionscript Code:on(release)
{
hp += 50;
day += 1;
{
if (day=30)
{
else
this.enabled = false;
}
}
}
Printable View
I attempted to make my own code....
but ran into a problem...
heres my code:
Actionscript Code:on(release)
{
hp += 50;
day += 1;
{
if (day=30)
{
else
this.enabled = false;
}
}
}
Hi,
I think you might mean something like this
Actionscript Code:on (release) {
if (day == 30)
{
hp += 50;
day += 1;
}
else
{
this.enabled = false;
}
}
thank you :)
but do you know why my button isn't working? I added this code to my button:
on (release)
{
if (exp == 0)
{
hp -= 10;
_root.gotoAndPlay("talk 1");
}
else if(hp<10)
{
_root.gotoAndPlay ("no hp left");
}
}
but when I test my game, the button doesn't go to the talk frame....
Your code looks like it should work. My only guess is that the variable "exp" is not being set to the value of 0. Trace out the variables to make sure they are correct - trace(exp);
thank you, the problem was that I hadn't even declared my exp variable :)