village borders
i could have sworn i'd seen this suggested somewhere
village borders Posted on: 01/17/2015 5:26pm
Quote Post
Never let a computer tell me shit.

i know I saw someone suggest this, but I cant find where. Idea is simple, a border around the outside of your village, to aid in the distinguishing of villages from their surroundings. I liked the Idea, so I whipped up a sloppy solution.


the code is this. call it from function mapmove when tile.name !=null

 function drawUserTile(tileName,x,y){ $('#' + tileName).css('border', 'none').css('background-color', '#' + mapdata[x][y].n).attr('title', mapdata[x][y].name).attr('data-original-title', mapdata[x][y].name).tooltip('fixTitle'); if(x>1){ if(mapdata[x-1][y].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-left', 'thick dotted gold'); } } if(x<25){ if(mapdata[x+1][y].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-right', 'thick dotted gold'); } } if(y>1){ if(mapdata[x][y-1].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-top', 'thick dotted gold'); } }  if(y<25){ if(mapdata[x][y+1].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-bottom', 'thick dotted gold'); } } }


 




I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"

RE: village borders Posted on: 01/17/2015 8:39pm
Quote Post
TIM the Enchanter
Level: 1
ADR Info

Nice!

And here I had planned on building this as an image system. I still plan on doing the larger image deal (especially for an overworld view), but this'll work for now! :)

Thanks man.





Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez