07-16-2011, 04:25 AM
I have an item "glass_container" that I would like to have usable on more than one entity in a level. heres the script:
void OnStart ()
{
AddUseItemCallback("", "glass_jar", "thing1", "Funk01", false);
}
void Funk01(string &in asItem, string &in asEntity)
{
RemoveItem("glass_jar");
//other stuff
}
How do I get more than one entity named "thing1" for this to work? Or, do I need to make a bunch of callbacks like:
{
AddUseItemCallback("", "glass_jar", "thing1", "Funk01", false);
AddUseItemCallback("", "glass_jar", "thing2", "Funk03", false);
AddUseItemCallback("", "glass_jar", "thing3", "Funk03", false);
}
for each entity I want usable? halp!
void OnStart ()
{
AddUseItemCallback("", "glass_jar", "thing1", "Funk01", false);
}
void Funk01(string &in asItem, string &in asEntity)
{
RemoveItem("glass_jar");
//other stuff
}
How do I get more than one entity named "thing1" for this to work? Or, do I need to make a bunch of callbacks like:
{
AddUseItemCallback("", "glass_jar", "thing1", "Funk01", false);
AddUseItemCallback("", "glass_jar", "thing2", "Funk03", false);
AddUseItemCallback("", "glass_jar", "thing3", "Funk03", false);
}
for each entity I want usable? halp!