Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //the frames you have need labels (without quotes, of course)
- //in this case i use enemyAttackN where N can be 1, 2 or 3
- on(release) {
- var rand = Math.floor(Math.random() * 3 + 1);
- if(rand == 1) {
- gotoAndPlay("enemyAttack1");
- } else if(rand == 2) {
- gotoAndPlay("enemyAttack2");
- } else if(rand == 3) {
- gotoAndPlay("enemyAttack2");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement