2 Attachment(s)
Simple Snap to Grid Example
[size:14pt]Snap to Grid Example [/size]
This is simple snap to grid example using the mouse. Just click and hold the left mouse button on the block. When you release the mouse button the block will be dropped on the grid. This is based on a 32X32 grid.
I hope this example will help someone. It will also be placed on my website.
Marv
Re: Simple Snap to Grid Example
Re: Simple Snap to Grid Example
Re: Simple Snap to Grid Example
Re: Simple Snap to Grid Example
Thanks, I am humbled by all the great feedback.
Marv
Re: Simple Snap to Grid Example
Like I said before... simply brilliant. This is good for level editors. (Like you said!)
Re: Simple Snap to Grid Example
Nice example, i noticed though you grid is offset by 1x1 changing the position of X/Y to 0 fixes this though. :)
Re: Simple Snap to Grid Example
Atom, I just snapped the Grid to MMF2's Built in Grid moving the topleft corner of it to 0,0 thus another way to fix this insignificant problem.
Re: Simple Snap to Grid Example
Thank you Atom for your comment. I will change that on my website example.
Marv
Ok, that problem has been fixed on the website example.
Re: Simple Snap to Grid Example
Awesome! It's amazing how simple it is with a simple formula.
Re: Simple Snap to Grid Example
Is there a way you can make it snap to this grid? This grad has some pixels in between.
http://i44.tinypic.com/2wrj3ad.jpg
I tried everything but no go.
Re: Simple Snap to Grid Example
Quote:
Originally Posted by nivram
Thank you Atom for your comment. I will change that on my website example.
No problem, thanks for all of your great examples :)
Re: Simple Snap to Grid Example
Quote:
Originally Posted by weka
Is there a way you can make it snap to this grid? This grad has some pixels in between.
Yes you can actually do that, it's just a matter of... OMG! THATS RUNESCAPE RUN AWAY!!!
[color:#888800]**** DragonGuy Leaves Chat ****[/color]
Re: Simple Snap to Grid Example
@weka
for this you just add a offset to the grid by adding a value:
e.g:
(xmouse/32*32) + 48
(xmouse/32*32) + 76
You do not change the XY size in the animation editor but make the gfx that is visible smaller so it fits into those blu areas in the inventory. It's just a visual trick, nothing more.
Re: Simple Snap to Grid Example
nivram,
Really, really, really nice! Thanx much for your efforts and especially thnx for sharing them! :)
Re: Simple Snap to Grid Example
Your welcome. I love helping people, or at least try.
Marv