So I have global variables and functions in a custom script.
How do I access the global variables and functions from a UI created trigger? I look under the variable and function menus but don't see my them listed.
That is a really good point, and brings up some noteworthy facts about their IDE and compiler.
A work around (not a fix) would be to make your script take in the variables you want to use elsewhere, and simply use those variables within the script. (aka function parameter like). The whole scripting library is C based, so I don't know if you can use pointers or not... or if it's going to create instanced variables with limited scope or what...
If that doesn't work... I'm not sure how but I'd really like to know...
The GUI doesn't know about any custom scripts you write. You can still access those variables, functions, whatever, so long as you use the "custom script" actions within the GUI.
GUI Generated functions follow a gf_<script identifier> convention, preceded by libName if inside of a library. If checked as native it will just use the script identifier as the entire name.
So I have global variables and functions in a custom script.
How do I access the global variables and functions from a UI created trigger? I look under the variable and function menus but don't see my them listed.
Thanks
That is a really good point, and brings up some noteworthy facts about their IDE and compiler. A work around (not a fix) would be to make your script take in the variables you want to use elsewhere, and simply use those variables within the script. (aka function parameter like). The whole scripting library is C based, so I don't know if you can use pointers or not... or if it's going to create instanced variables with limited scope or what...
If that doesn't work... I'm not sure how but I'd really like to know...
The GUI doesn't know about any custom scripts you write. You can still access those variables, functions, whatever, so long as you use the "custom script" actions within the GUI.
I believe it is something like gv_Varname or lv_Varname for local vars
The Varname being the script identifier of the variable in question
For functions it will be the script identifier aswell (possible with func_ infront of it, not sure)
Not experienced with custom script but I picked that up
AzothHyjal got it right I think... it's obviuous now, but I wondered why it'd allow for a "custom script" in a variable placeholder
@SweetZombieJesus: Go
GUI Generated functions follow a gf_<script identifier> convention, preceded by libName if inside of a library. If checked as native it will just use the script identifier as the entire name.
Short Summary