GoDziOTHC
11-30-2011, 03:25 PM
I've already implemented stats in as3 but they do not refresh when I make a change within a running app (using +/- buttons that are implemented aswell). The thing is that the secondary stats should be calculated using the main ones. All the calculations already sit there, f.ex.
var FFGP:Number = (PHSQ* 0.3 + RSPN* 0.5 + WSDM* 0.2);
The display looks like that
addEventListener (Event.ENTER_FRAME, FFGPShow);
function FFGPShow (event:Event){FFGPDisplay.text = String (FFGP);}
In short whenever i raise/lower any of the 3 main skills in-game, the secondary ones remain unchanged and when I change values directly in AS its all calculated correctly.
I was thinking about creating an array for all secondary skills and then refreshing all of them whenever a +/- button is pressed but no idea where to start
One of the forum users suggested using getters and setters to calculate it all dynamically but....
Really wish to continue the project, so all help greatly appreciated
Matt
var FFGP:Number = (PHSQ* 0.3 + RSPN* 0.5 + WSDM* 0.2);
The display looks like that
addEventListener (Event.ENTER_FRAME, FFGPShow);
function FFGPShow (event:Event){FFGPDisplay.text = String (FFGP);}
In short whenever i raise/lower any of the 3 main skills in-game, the secondary ones remain unchanged and when I change values directly in AS its all calculated correctly.
I was thinking about creating an array for all secondary skills and then refreshing all of them whenever a +/- button is pressed but no idea where to start
One of the forum users suggested using getters and setters to calculate it all dynamically but....
Really wish to continue the project, so all help greatly appreciated
Matt