Custom Global Variables

Post » Sun Jan 30, 2011 8:00 am

Lo,

I'm currently trying to knock up some dialogue which modifies a couple of custom Globals I've created. Take 3 Globals I've created, say A, B and C.

A = 100
B = 50
C = 25

If you answer the first topic, you get say, +25 to A, B and C (so they'd then become 125, 75 and 50).

If you answer the second topic, you lose 25, i.e. (75, 25 and 0).

Now the script I'd put would be in the result script of that topic, and it would say something like... (assuming we're talking about +25)

short DoOnceif DoOnce == 0showMessage AAAplus25set AAAA to AAAA + 25set AAAB to AAAB + 25set AAAB to AAAC + 25set DoOnce to 1endif


Then when I call another topic, to show a custom message which shows the Global Variables, they should in theory have changed right? Yet it still shows the default variables I've set in the Globals.

The script I'd call would be;

ShowMessage AAAshowGlobals, AAAA, AAAB, AAAC


What am I doing wrong?
User avatar
BRIANNA
 
Posts: 3438
Joined: Thu Jan 11, 2007 7:51 pm

Post » Sat Jan 29, 2011 8:43 pm

I'm currently trying to knock up some dialogue which modifies a couple of custom Globals I've created. Take 3 Globals I've created, say A, B and C.


First off I love your wording :P

Second off, make sure you put this script in the result script of your dialog topic. Also you dont need a DoOnce variable in there, so take out the 'if' and the 'short' as it runs the script at the END of the dialog block, and only runs it once. Unless you want it to only show the message and change the variables once no matter how many times they pick the topic. So my guess is you put the script in a spot where its not running so not updating the variables, therefor only showing you the default ones in the message.
User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm


Return to Fallout 3