This content has been marked as final. Show 9 replies
ok well I got that working, ie
when removing an item it should also minus the appropriate cost, but i'm not sure how to do that.
I've attached my attempt at it here http://www.twistedpancreas.com/test/datagridWeapons.fla (the flash preview of it can be seen here http://www.twistedpancreas.com/test/datagridWeapons.swf ), but it's just minusing a static value at the moment (ie 5)
Can anyone help?
Thanks in advance
The simplest solution is to embed the cost of the item in the datagrid itself. Something like this is the approach I would take.
your're a true champ!!!
I've now incorporated that into my Character Generator here: http://www.twistedpancreas.com/test/characterGeneration004.html (which still needs some work, especially with text formatting, etc... do datagrids render fonts badly? I tried the font Impact and it came out un-antialiased and condensed).
Now some of the equipment has negative values to some of the input boxes (eg Chainmail is ARM +8, Ref -2, MV-1). If a user has typed a number into a input box (say Ref Lvl 5), can Flash then change that number later if a certain piece of equipment is chosen (as with Chainmail, thus Ref Lvl 5 would go to Ref Lvl 3)?
Thanks once again for all this help.
Because I tried
myRefTxt.text -= Number("2");
which seems to work, but when you add to the number
ie myRefTxt.text += Number("2");
it adds the 2 beside the input number
ie if you had inputted 3 into myRefTxt.text and then had a piece of equipment add 2, the input box says 32 :(
ok looks like it should be
myRefTxt.text =Number(myRefTxt.text)+ Number("2");
Ok now hopefully here's one of my last problems, and I've uploaded it to 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?
Thanks in advance.
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 thoughts? or am I not making sense?
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?
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/costProblem.fla