I am having a rough time figuring out why this will not work….. The energyPickUp is a class and it is part of var energyPickupList:Array = new Array();
what I would like to do, is have the (player) instance cause the pickup to remove itself on contact, but I can;t even get the trace to return for me :/
here is the code for the hittest… maybe I have something messed up… If you need any of the other parts of my code relating to the class I will give it to you. This is just the part specifically related to the array hittest.
(this is all inside the main game loop except for the array variable listed above)
if (energyPickupList.length > 0)
for (var m:int = 0; m < energyPickupList.length; m++)
trace(“player touching energyPickup”);
energyPickupList[m].removeSelfHit(); playerHP = playerHP + energyPickupFill;