| View previous topic :: View next topic |
| Author |
Message |
Slappy101 I post too much
Reputation: 1
Joined: 19 Jun 2007 Posts: 2602
|
Posted: Fri Oct 03, 2008 3:18 am Post subject: some AS2 questions... |
|
|
i'm currently working on an rpg and I need some code that will make it so the max hp is 100 and if hp is at 0, it goes to a different scene, the hp is in a dynamic txt box labeled hp. Also, I need a setup so when the dynamic txt box labeled Exp reaches 200, the dynamic txt box labled Level increases by 1 and the Exp txt box is reset to 0...
_________________
|
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Fri Oct 03, 2008 9:09 am Post subject: |
|
|
if (hpvar = 0) {
_root.GotoAndPlay("scenelabel");
}
_root.hp.text = hpvar;
if (exp > 200){
levelvar += 1;
Level.text = levelvar;
expvar = 0;
Exp.text = expvar;
}
if you know anything about acitonscript, my stuff will make sense
just declared integers for your hp, exp, and level to make it easy, you can then change the integer value, then change the textbox text
_________________
|
|
| Back to top |
|
 |
Slappy101 I post too much
Reputation: 1
Joined: 19 Jun 2007 Posts: 2602
|
Posted: Fri Oct 03, 2008 8:57 pm Post subject: |
|
|
thx, i got it working b4 though, +repped
_________________
|
|
| Back to top |
|
 |
|