Connecting Tech Pros Worldwide Forums | Help | Site Map

Character Generator Problem

Newbie
 
Join Date: Nov 2008
Posts: 4
#1: Nov 30 '08
Hi there I have a question for my Character Generator I'm making for a Tabletop game I'm developing, and I've uploaded the problem file here http://www.twistedpancreas.com/test/strongProblem.fla (http://www.twistedpancreas.com/test/strongProblem.swf).

You get to type in your Str value and then later on could choose a Trait like Strong (ie type in a value next to Strong then click Strong), problem is I have the Str input value in a onEnterFrame (so that you get instant feedback on how much the Str value costs), and so when the Strong trait value gets added to the Str value it appears for a millisecond then reverts to what was originally typed.

How do I get the Strong value to remain added to the Str value?

Because i would have thought the Strong button code inside "traits_mc" would have this:

gStrCost = Number(gStrCost) + (Number(myStrongTxt.text));

but that doesnt seem to work :(

Any help would be appreciated.

Thanks in advance.

Newbie
 
Join Date: Nov 2008
Posts: 4
#2: Dec 2 '08

re: Character Generator Problem


Ok someone on another forum suggested I put a trace in "traits_mc" at frame 21 AS and I got

gStrCost = 0 : myStrongTxt.text = 0

which seems fine and then they said to replace Number() with parseInt() but that didn't seem to work, see my updated file here: http://www.twistedpancreas.com/test/strongProblem1.fla

can anyone help?
Newbie
 
Join Date: Nov 2008
Posts: 4
#3: Dec 4 '08

re: Character Generator Problem


well it looks like

strongStr = (Number(_root.myStrTxt.text)) + (Number(myStrongTxt.text))

_root.myStrTxt.text = strongStr;

does the trick to adjust the Str Lvl stat, see http://www.twistedpancreas.com/test/costProblem.swf

but it shouldn't adjust the Str Lvl cost beside it, anybody got any ideas on how I could avoid that? Updated file is here http://www.twistedpancreas.com/test/strongProblem.fla
Newbie
 
Join Date: Nov 2008
Posts: 4
#4: Dec 4 '08

re: Character Generator Problem


Quote:

Originally Posted by pancreasboy View Post

http://www.twistedpancreas.com/test/strongProblem.fla

make that http://www.twistedpancreas.com/test/costProblem.fla
Reply