Ah, fair enough, and my mistake - it was silly of me to not think of that, I feel. ^^;
It should be fairly simple: First, let’s find out how far the code is getting by putting simply “print” statements at various points in the code. Second, once we do get to the active code, let’s see what results, if any, we are getting by printing those results.
Perhaps try something like this:
(Notes:
- I’ll place “print” statements in both of the below functions since we don’t know, if I recall correctly, which, if any, might be being executed.
- When I print values, note the use of “str()” to convert objects to strings; while not generally called for in print statements that only print objects, it is called for when concatenating with strings, I believe.)
def pick(self,handler):
print "Picking..."
if(handler.getNumEntries()>0):
print "Picking: We have entries."
handler.sortEntries()
print "Picking: Results: " + str(handler.getEntries())
picked=handler.getEntry(0).getIntoNodePath()
picked=picked.findNetTag('collisiontag')
if not (picked.isEmpty()):
print "Picking: The picked node is not empty, and is: " + str(picked)
self.interact(picked)
def combat(self,handler):
print "Combat..."
if(handler.getNumEntries()>0):
print "Combat: We have entries"
handler.sortEntries()
print "Combat: Results: " + str(handler.getEntries())
picked=handler.getEntry(0).getIntoNodePath()
picked=picked.findNetTag('instance')
type=picked.getTag('type')
if not (picked.isEmpty()):
print "Combat: The picked node is not empty, and is: " + str(picked)
self.damage(picked,type)
(If you’ve changed the above methods since your second post in this thread (I think that it was), then the above may want for modification.)
[/quote]