Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Global Numbers

Page: 1 of 1
 Fallen Guardian
05-24-2011, 10:21 PM
#1
So I understand well enough how to use global booleans, but just what are numbers, and how do you use them?
 Fastmaniac
05-25-2011, 9:01 AM
#2
It's common use in Plots, take Bastila's Plot for example... Everytime you are done speaking to her a global number increases by 1 (Don't know which one exactly). So when you enter the cantina on tatooine this number is checked and if it's greater than a certain amount (means you are far enough with Bastila's dialog) her mother will spawn. I don't know if it's like that, but it's a good example.

But the best example for that is the Exchange attention in TSL. Evertime you do something for or against the Exchange the attention increases. If it's greater than 7 Visquis will call.

There are two functions for that:

int GetGlobalNumber([name of Global]);

Gets the Global number and it can be stored in an integer variable

and

void SetGlobalNumber([name of Global],[Value] );

Sets a Global number to the specified value

Hope that's what you were looking for.

Fastmaniac
 Fallen Guardian
05-25-2011, 10:21 AM
#3
Yeah it was. I only have one question. When you get the global number, does it check what number your at?
 Fastmaniac
05-25-2011, 10:33 AM
#4
when you check it, it gets the number that is currently assigned to the name of the number. Example (I like doing that:D):

Name: DAN_JEDI_PLOT Number: 7

int a = GetGlobalNumber("DAN_JEDI_PLOT");


Now the variable a has the value 7 and you can work with that (ie less than, greater than, etc).

Fastmaniac
 Fallen Guardian
05-26-2011, 1:14 AM
#5
Alright thanks!
 Fastmaniac
05-26-2011, 10:03 AM
#6
No Problem;) Anytime...
Page: 1 of 1