Sorry for the awful title of the thread but I have no clue what I would call it... Anyways, I have created a class and have made a few objects of that class and I want to make a certain code that will go through those objects depending on if it is their turn or not... my ideal code looks like this however it doesnt seem to work...
basically I cant figure out how to have it automatically go to the next Set since they are all labeled 1-10 or whatever how can I call up the next set using currSet in the way my code shows it? Set[currSet].count doesnt equate to Set1.count even if currSet = 1.Code:import eSet.as; var Set1:eSet = new eSet(10, 4, 1, 4, 1); var Set2:eSet = new eSet(8, 8, 3, 5, 1); currSet=1; me.enemySpeed = random(Set[currSet].enemySpeed)+Set[currSet].enemySpeedP; if(enemyPast>Set[currSet].count){ currSet+=1; enemyPast=0; }


Reply With Quote
