Forum Topic: more than urgent help

(233 views • 2 replies)

This topic is 1 page long.

<< < > >>
None

onlyproductions

Reply To Post Reply & Quote

Posted at: 4/9/06 06:54 PM

onlyproductions LIGHT LEVEL 10

Sign-Up: 10/30/05

Posts: 813

lol anyway i have a stamina bar and put this script to it
onClipEvent (enterFrame) {
_yscale = _root.stam;
if (this._yscale<100) {
_yscale += 12;
trace("weee");
}
}
for some reason the yscale only goes up by one but i want it to go up by one continuisly until the yscale reaches 100

.

BBS Signature

None

DJStatika

Reply To Post Reply & Quote

Posted at: 4/10/06 07:05 AM

DJStatika NEUTRAL LEVEL 04

Sign-Up: 04/19/05

Posts: 43

well is _root.stam increasing? somehow? if not it will always be 1 more than _root.stam


None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 4/10/06 07:13 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 9,716

Yeah, it'll always be like _yscale = stam + 12; instead you should do:
onClipEvent (enterFrame) {
_root.stam += 12;
_yscale = _root.stam;
}
Though if you only want to do it at the beginning you should do an onEnterFrame function.

haXe AliceML Box2dLite Learn AS
#ngprogramming at irc.freenode.net
OVER NINE THOUSAAAAND!!!


All times are Eastern Standard Time (GMT -5) | Current Time: 01:29 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!