Set S-Variable

<kuid2:160293:101005:5>

Author: trev999
Kind: drivercommand
Build: 2.9
Size: 15.77KB
Uploaded: 2023-10-07
Loadings:
2
-
0
+

Set S-Variable

Version 1.5 2015-05-15
A Driver schedule command to create or change the value of 'Session Variables' using a new format.
Add the InputTable rule to your session and then add new entries with the following format:

For variable names use: svname,[varname]
For operations use: svar,[op],[value]
All terms are separated by commas.

Valid operators are: set, inc, dec, ran,
where
set means set variable to value
inc means increase variable by value
dec means decrease variable by value
ran means set variable to a number between 1 and value

Example Meaning
svname, threshold Define variable name
svname,My Variable
svname,$myString

svar,set,2 Set variable value to 2
svar,inc,3 Increase variable value by 3
svar,dec,5 Decrease variable value by 5
svar,ran 6 Set variable to a random number 1-6
svar,set,ABC Assign text to variable $myString
svar,set,threshold (threshold contains a number)
svar,set,$myString (myString contains letters)

Once a set of command entries is added to the InputTable rule, they will appear in the Set S-Variables command menu.

Session variable values may be integers or variable names or text strings. Do not use floating point (decimal) numbers.
Inc and Dec operations can not be done on text strings.
Thanks to Atila Barut for the original framework and to Lots_Trains for beta testing.

Author: trev999

    Set S-Variable
  • config.txt 2.85KB
  • setsvariablecommand.gs 5.05KB
  • setsvariableschedulecommand.gs 4.57KB
  • tag.texture.txt 39 bytes
  • tag.tga 64.02KB
  • thumbnail.jpg 6.32KB

Freeware. No warranty. No commercial use allowed without the author's permission.

User photos

No one has added a photo of this object yet