| Mirage Source http://miragesource.net/forums/ |
|
| 'Randomised' map fill http://miragesource.net/forums/viewtopic.php?f=201&t=1992 |
Page 1 of 1 |
| Author: | Coke [ Fri Jun 08, 2007 1:59 am ] |
| Post subject: | 'Randomised' map fill |
Basically i have 4 grass tiles and when thrown all over the map randomly it looks really nice... however it takes ages and i'v only done three test maps and they were to post on here! My question, is it possible to have a map fill that will randomly place these over the map on the ground, would save so much time. If it is possible, some help with the coding would be good xD If it isnt, looks like i'm going to have to have a fill that specifically puts them over the map in pre-set locations, which will take forever to code -.- Cheers! Foxy |
|
| Author: | Lea [ Fri Jun 08, 2007 2:24 am ] |
| Post subject: | Re: 'Randomised' map fill |
Make a grass attribute that randomly selects what number tile to put |
|
| Author: | Leighland [ Sat Jun 09, 2007 12:26 am ] |
| Post subject: | Re: 'Randomised' map fill |
get the locations of the tiles on the tile sheet and blt them to the .ground using some for loops. Code: For x = 1 To max_mapx For y = 1 To max_mapy f = Int(Rnd(3) * 3) With Map.Tile(x, y) Select Case f Case 0 .Ground = ' tile 1 Case 1 .Ground = ' tile 2 Case 2 .Ground = ' tile 3 Case 3 .Ground = ' tile 4 End Select End With Next y Next x Obviously just a mock up but that's how I would do it. |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|