Skip to content

Compiler question

nullsetnullset Member Posts: 38
What value is returned with: IF ~Global("someglobalname","GLOBAL",0)~, when "someglobalname" does not exist yet? TRUE, FALSE, or a quantum superposition? Or is the condition ignored?

Comments

  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    This would return TRUE
  • nullsetnullset Member Posts: 38
    Thank you muchly, AstroBryGuy! I have been overly cautious, creating the global before testing, but I found instances where the test was made without finding where the global was created. Now I know, thanx to you.
  • nullsetnullset Member Posts: 38
    Another technical question. When is an ID evaluated? At compile time, new game time, or run time? In other words, if I change the value in a .IDS file, will it take effect in an already running game? Or do I have to start another game? Or do I have to reinstall the relevant mods? Any help here appreciated.
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @nullset, IDS and other resource files are read and evaluated when the game launches. If you mean IDS values in something like a save game (kit, class, race, etc.), then you'll need to start a new game or edit the save game.
  • nullsetnullset Member Posts: 38
    Thanx, Troodon80! What I have done is add BANTER_TIME, TALK_TIME, and FLIRT_TIME to GTIME.IDS and wanted to know when I could change the intervals. If I read you right and want to change these values, I must start a new game. This is good, if not great. At least, I don't have to reinstall my mods but just start a new game.
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @nullset, as I said, it really depends on what you want to do with them. If, for example, you only want to use those identifiers in a script or dialogue (and I can't imagine what else one would use GTIMES.IDS for), then you don't need to start a new game—just relaunch the game executable.

    e.g.

    SetGlobalTimer("CHAR_BANTER","GLOBAL",BANTER_TIME)

    That doesn't require a new game.
Sign In or Register to comment.