Hey guys! It is me again!
So I have been wondering how I should go about doing this properly… basically I have a doctor entity which I made for my game. And I wanted to mess around with another aspect to my game which will probably be some kind of pick up item, like coins, gems etc.
This code I currently have works but it throws a yellow message when I debug saying “col:13 Warning: Duplicate variable definition.”
However, it acts just like I need it to act… I am wondering if I went about executing the code correctly, here is my code in the World.as file which basically just creates 5 doctor entities and allows me to walk into each one and have them recycle from the stage.
for (var i: int = 0; i < 5; i++)
{
doc = new theDoc;
add(doc);//adds Doc!
doc.x = 420 * i;
doc.y = 240;
}
Please let me know what you guys think! Thanks