PDA

View Full Version : [AS3] how can I have my score use a percent?


universecity1
05-19-2009, 10:31 PM
hi
taking a while but Im still workin on a game.
how can I have my score use a percent
example
deff +=100; def_amount.text=String(deff); adds 100 points correctly..

how would I have it add (or subtract) 10 percent of whatever the score is?

this is for a rpg.

thanks in advance...

Heloed
05-19-2009, 10:40 PM
deff = (deff * 1.1) //Adds 10%
deff = (deff * .9) //Subtracts 10%

universecity1
05-20-2009, 03:13 AM
works like a charm. I see youre available for freelance? I'll prolly need some help for my game, lets talk! [email protected] if interested. thanks again