PDA

View Full Version : map making



Dhryn
March 17th, 2006, 01:36 PM
I am making a sideways scrolling map, and I know it is possible to make a small map and get flash to duplicate it so that it flows like a long map.

I was wondering if it was possible to make several small maps and get flash to duplicate them in a random order so that every time the game is played, the map will display differently.

I have been looking for a solution and was thinking about numbering them 1 to what ever amount I make, then use the random number function in flash to randomize the map played, however I don’t know if this is possible or how to write it properly to make it work.

Can some one please give me a push in the right direction?

bombsledder
March 17th, 2006, 04:45 PM
that or you could put them in an array

mapInstance=[map1,map2,map3,map4]

map=mapInstance[random(mapInstance.length)]

//now just load map

bombsledder
March 17th, 2006, 04:45 PM
crap i double posted sorry .....

Dhryn
March 17th, 2006, 04:52 PM
In the section that says map1,map2... do I enter the names of the maps.

and in the //now just load map part, do I use an 'attachmovie'

sorry not very good at this, do you know any tutorials on attachmovie, that would be very useful.

bombsledder
March 17th, 2006, 10:44 PM
don't know tutorials since its been years since i took a flash tutorial, but i would try actionscript.org or kirupas tutorials, now since i don't know how your format is, tile/art w/e

if your map is a movie, then give its its export name, in there and if its an array for tiles, then just plug that it... not thinking straight today maybe i could post a .fla later that will help