This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-07-19 20:46:12

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

help with snapping sprites

I'm trying to make the settlers of catan game for scratch. I've made the maps load randomly so now I need a way to have the settlements and cities snap into the corners of each hex.

I don't know how to do this without making tons of new sprites for each individual corner.
Is there a way to do this in one, two, or three sprites?


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#2 2012-07-19 21:41:18

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Re: help with snapping sprites

bullelk12 wrote:

I'm trying to make the settlers of catan game for scratch. I've made the maps load randomly so now I need a way to have the settlements and cities snap into the corners of each hex.

I don't know how to do this without making tons of new sprites for each individual corner.
Is there a way to do this in one, two, or three sprites?

That's a difficult grid to snap to...I'll see if I can find an engine that could do that but...it'll be math heavy probably.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

#3 2012-07-20 04:51:11

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: help with snapping sprites

Darthpickley made a Minesweeper project that uses a hex grid.  Maybe you could see if any of his method would work for your purposes?


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2012-07-26 17:50:01

thebriculator
Scratcher
Registered: 2011-07-11
Posts: 500+

Re: help with snapping sprites

I got exactly what you're looking for. (link to project)
It's quite similar to yours, surprisingly.


.     http://tiny.cc/2cwgpw    http://tiny.cc/viwgpw    http://tiny.cc/iwwgpw

Offline

 

Board footer