View Single Post
06-24-15, 09:15 AM   #3
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Mayron View Post
If you mean you want a way to check whether a global already exists before creating a virtual object with that name then I don't think that's possible in XML but a global template name for a virtual function is not added to the _G global table I think. So a template's name will not override a global variable name.

Unless you mean you want to create a virtual object with a name that already exists as a global?

If you try to create a new virtual object by reusing a global name of another virtual object then it will not override it, instead the new virtual object you are trying to create will just be ignored. If the global name you are using for this new virtual object is already defined but is not associated to another virtual object then this is fine.
I'm pretty sure it's added the the global table, since you can only reach it with that reference. But i could be wrong.

Last edited by Resike : 06-24-15 at 09:18 AM.
  Reply With Quote