View Single Post
06-24-15, 08:47 AM   #2
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Originally Posted by Resike View Post
Is it possbile to only create a virtual object if it's does not exists with that global name?
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.

Last edited by Mayron : 06-24-15 at 08:58 AM.
  Reply With Quote