The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.36 / 5.00 33,851 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 12,195 ViewsHey, I'm making a stat menu for my game, and I can't get it to stop subtracting "Available Points"
on (release) {
if (_root.availablepoints>0) {
_root.strength+=1
}
_root.availablepoints-=1
}
That's my script, and it'll stop adding to Strength once 'availablepoints' reaches 0, but it won't stop subtracting from availablepoints. Can someone help?
At 10/10/08 03:22 PM, Gdark1 wrote: Hey, I'm making a stat menu for my game, and I can't get it to stop subtracting "Available Points"
on (release) {
if (_root.availablepoints>0) {
_root.strength+=1
}
_root.availablepoints-=1
}
That's my script, and it'll stop adding to Strength once 'availablepoints' reaches 0, but it won't stop subtracting from availablepoints. Can someone help?
Because you've close the if statement before you've subtracted 1 from avaliablepoints.
on (release) {
if (_root.availablepoints>0) {
_root.strength+=1
_root.availablepoints-=1
}
} Egad! I would never have thought to have two '}'s.
Lul.
Thanks! =D
Wait!
Then what's wrong with this?
on (release) {
if (_root.availablepoints>0) {
_root.availablepoints+=1
_root.strength-=1
}
}
on (release) {
if (_root.availablepoints>0) {
_root.availablepoints+=1;
_root.strength+=1;
}
}
lol you put _root.availablepoints+=1; insted of _root.availablepoints-=1; that means it will add. you got them backwards