Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / tile question...again

Author
Message
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 12th Feb 2003 23:11
Ok, so my tiles are 32 x 32 pixels and when i click they appear at the mouse coordinates...but i want them to appear evenly spaced

how would i make DBpro round up (or down) to the nearest multiple of 32 depending on the mouse coords?

there's some mathematical method isnt there
You could take over the world with a programming language like this...
...not that I would attempt to...yes, that'll do...
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 12th Feb 2003 23:12
why do i click the post button twice???

You could take over the world with a programming language like this...
...not that I would attempt to...yes, that'll do...
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 12th Feb 2003 23:50
You could do something like :



As for why you click on the button twice - its Microsofts fault - Bill Gates wants to take over your life.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 13th Feb 2003 01:32
You could do it like that, but sadly it won't work You want it to be sort of "locked" to a grid, right? In which case try this:

x=mousex()/32*32
y=mousey()/32*32

This will make sure you only paste every 32 pixels in X and Y.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
Pyromaniac
21
Years of Service
User Offline
Joined: 8th Jan 2003
Location: United Kingdom
Posted: 13th Feb 2003 17:41
Thanks rich, that worked great ^_^

*throws iMac apples at Bill, while he's being attacked by a horde of rabid Linix penguins*

^_^

You could take over the world with a programming language like this...
...not that I would attempt to...yes, that'll do...

Login to post a reply

Server time is: 2024-11-24 02:24:41
Your offset time is: 2024-11-24 02:24:41