OK I’m somewhat descent at Actionscript, but I’m brand new to arrays. I know very little about them. It seems at the moment I’m going to have to make use of them.
Here’s what I’m doing:
I’m creating a flash game in which you are a UFO flying over a group of cows and you have to abduct them. It’s a top view game so I have the grass moving from top to bottom and I have a movie with 5 cows and theres a controller in the _root movie that creates a random variable:
_root.cows = random(5);
Now everytime the controller movie gets to a certain frame, that frame tells the cow movie to play a certain cow (Moving from top to bottom) based on the current variable.
What’s happening is when there is a repeat, the cow disapears and jumps back to the top. Seeing how there’s only 5 cows you can tell this happens a lot.
Now I’ve researched this a bit and found that I can create an array of random numbers and splice each one as I’ve used it. I’ve tried this, copied different codes and I can’t get it to work.
I’m probably placing it wrong or something, but being a man who is used to his variables, maybe I’m doing something the wrong way. Please explain, if anyone can, how I can do this…and if possible explain as if talking to a third grader. thanks