dstuffle
September 14th, 2013, 18:35
When one of my controls is dragged, it kicks off a script. Part of that script is to use the ActorManager.getActor() function from the scripts/manage_actor.lua file. The parameters for this function are ActorType (the type of actor) and ether a string or a database node (in my case it's tying to use a database node).
My problem is that I don't know how to point to the database node I want to send it. The examples I have from other places in the ruleset I'm tweeking are like "window.getDatabaseNode()" and "window.windowlist.window.getDatabaseNode()" nether of which appear to be pointing to anything (when other code tries to use the referenced node, it throws an error when it tries to get a child [a nil value]).
How do I determine what (if anything) is at "window.getDatabaseNode()"? If I can find out where that is, I might be able to point the path to the right spot. I've tried to use the print() function to display what is returned from ActorManager.getActor("npc", window.getDatabaseNode()); but that also throws a nil error.
Or does there being no database node there mean that I forgot to specify a data attribute in the dragging control, or something?
Thanks.
My problem is that I don't know how to point to the database node I want to send it. The examples I have from other places in the ruleset I'm tweeking are like "window.getDatabaseNode()" and "window.windowlist.window.getDatabaseNode()" nether of which appear to be pointing to anything (when other code tries to use the referenced node, it throws an error when it tries to get a child [a nil value]).
How do I determine what (if anything) is at "window.getDatabaseNode()"? If I can find out where that is, I might be able to point the path to the right spot. I've tried to use the print() function to display what is returned from ActorManager.getActor("npc", window.getDatabaseNode()); but that also throws a nil error.
Or does there being no database node there mean that I forgot to specify a data attribute in the dragging control, or something?
Thanks.