Fallen Guardian Posted May 25, 2011 Share Posted May 25, 2011 So I understand well enough how to use global booleans, but just what are numbers, and how do you use them? Link to comment Share on other sites More sharing options...
Fastmaniac Posted May 25, 2011 Share Posted May 25, 2011 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 Link to comment Share on other sites More sharing options...
Fallen Guardian Posted May 25, 2011 Author Share Posted May 25, 2011 Yeah it was. I only have one question. When you get the global number, does it check what number your at? Link to comment Share on other sites More sharing options...
Fastmaniac Posted May 25, 2011 Share Posted May 25, 2011 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 Link to comment Share on other sites More sharing options...
Fallen Guardian Posted May 26, 2011 Author Share Posted May 26, 2011 Alright thanks! Link to comment Share on other sites More sharing options...
Fastmaniac Posted May 26, 2011 Share Posted May 26, 2011 No Problem;) Anytime... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.