~~NOTOC~~ ====== RegisterScript ====== RegisterScript(<-name) ===== Description ===== Registers the current script instance with a name. This name can be used with [[GetRegisteredScriptVar]]. If the same name is used as another script instance, this call will deregister the other script instance and replace it with the new one. A script on a unit is a unique instance. Each global script instance is also unique. :!: Note that registering a script is NOT persistent. It will not be saved in a save game file. You must reregister a script. ===== Examples ===== RegisterScript("MyScript")