Independent global variables???

Started by SmashManiac, Sat 10/01/2004 20:20:46

Previous topic - Next topic

SmashManiac

I think that there is three types of global integer variables you can create:

- In the interaction editor (there's "Global 1" already there)
- The SetGlobalInt and GetGlobalInt functions
- An int variable in the script header

I have absolutely no problem to communicate my integers declared in the header and GlobalInts functions, but I'm only able to access them in the script. Also, I'm only able to access the global variables from the interaction editor with the interaction editor.

Am I wrong? Is there a way to change an integer variable with "Game - Set variable value" and check it in a script, or change an integer in the script and check it in a "Conditional - If a variable is set to an certain value"?

Scorpiorus

Yep, the only thing you can do is to read an interaction editor variable from the text script:

GetGraphicalVariable (string variable_name);

Returns the value of the interaction editor VARIABLE_NAME variable. This allows your script to access the values of variables set in the interaction editor.
Example:

if (GetGraphicalVariable("climbed rock")==1)
  { code here }

will execute the code only if interaction variable "climbed rock" is 1.
See Also: GetGlobalInt

~Cheers

SmashManiac

Thanks! I would have never imagined it was called a graphical variable! That would help for creating my template!

...but sadly what I really need is a SetGraphicalVariable function, or something that will do the same thing. Since nothing of that name exists, I now highly doubt I can do it. Am I wrong again?

Scorpiorus

Quote...but sadly what I really need is a SetGraphicalVariable function, or something that will do the same thing.
there is no such I'm afraid.

Ishmael

This is the reason I use only scripts, it is much clearer and easily manageable. (Unless you screw the scripts and loose track of it....) To be hones, I don't have much clue on how to use then interaction editor......

(Inrelative post, I know, but I had the odd feeling that I had to bring this up...... sorry.)
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

SMF spam blocked by CleanTalk