Mirage Source
New Map Layers - Printable Version

+- Mirage Source (https://mirage-engine.uk/forums)
+-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61)
+--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18)
+---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17)
+---- Thread: New Map Layers (/showthread.php?tid=1458)



New Map Layers - Stomach Pulser - 13-12-2007

Hello, I followed Asrrin29's Adding New Map Layers Tutorial http://www.sylphonline.com/enginefiles/Mirage_Tutorial_Backup/Temporary%20Archive%20(Read%20Only)/Add%20More%20Layers.html and after completing it, I went into mirage and decided to test it out. It worked whilst I was in the map editor, but, once I pressed send, the map got randomized with random attributes and tiles. It is random every time I press send. Any help?


Re: New Map Layers - Matt - 13-12-2007

Also delete all your maps. Or write a converter to convert to the new rec.


Re: New Map Layers - Stomach Pulser - 13-12-2007

Dave Wrote:server and client side TileRecs need to be the same.
They are
Perfekt Wrote:Also delete all your maps. Or write a converter to convert to the new rec.
I didn't have any maps, but I deleted map one anyways.

But, it is still being randomized, but it only deletes anything I have done and randomizes it.


Re: New Map Layers - Matt - 13-12-2007

Check your save packets. Seems they're twisted a bit.


Re: New Map Layers - Stomach Pulser - 13-12-2007

Thank you, for some reason, I added this code into the MapData Packet, but it didn't save that, so I only had the old code. I fixed the error, and it now works perfectly!
Code:
For y = 0 To MAX_MAPY
            For x = 0 To MAX_MAPX
                SaveMap.Tile(x, y).Ground = Val(Parse(n))
                SaveMap.Tile(x, y).Mask = Val(Parse(n + 1))
                SaveMap.Tile(x, y).Anim = Val(Parse(n + 2))
                SaveMap.Tile(x, y).Mask2 = Val(Parse(n + 3))
                SaveMap.Tile(x, y).M2Anim = Val(Parse(n + 4))
                SaveMap.Tile(x, y).Fringe = Val(Parse(n + 5))
                SaveMap.Tile(x, y).FAnim = Val(Parse(n + 6))
                SaveMap.Tile(x, y).Fringe2 = Val(Parse(n + 7))
                SaveMap.Tile(x, y).F2Anim = Val(Parse(n + 8))
                SaveMap.Tile(x, y).Type = Val(Parse(n + 9))
                SaveMap.Tile(x, y).Data1 = Val(Parse(n + 10))
                SaveMap.Tile(x, y).Data2 = Val(Parse(n + 11))
                SaveMap.Tile(x, y).Data3 = Val(Parse(n + 12))
                
                n = n + 13
            Next x
        Next y

Thanks alot!