PDA

View Full Version : bomb disposal game


roobarb187
03-14-2005, 10:17 AM
Hi i am working on a very boring bomb disposal game at college. the aim of the game is to find the bomb before it explodes (within 10 clicks). my teacher has asked me to work out the necessary code to randomize the bombs when the game is reset. there are 21 bombs on stage which are just movie clips. 20 bombs are 'dead' and one is 'alive'. can anyone help me?!? thanks

webguy
03-14-2005, 04:40 PM
var arrayOfBombs = [b1,b2,b3];

var randNum = Math.random(arrayOfBombs.length)+1;

var liveBomb = arrayOfBombs[randNum];



webG