Mirage Source

Free ORPG making software.
It is currently Wed Jun 05, 2024 3:41 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: CurX and CurY are wrong
PostPosted: Thu Oct 23, 2008 8:36 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
The mouse position isn't right...it's making you hover over that exact X and Y to work, and not the whole tile area...just open the map editor and watch the outline as you move the mouse. Also notice the X and Y with /loc when you go over your sprite and see that they aren't the same X and Y. Here's the fix:

Code:
CurX = Int(X / PIC_X)
CurY = Int(Y / PIC_Y)

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Mon Oct 27, 2008 10:09 am 
Offline
Newbie

Joined: Wed Oct 22, 2008 2:46 pm
Posts: 3
Google Talk: shlink@shibber.net
It works fine for me. Shows the same correct result with and without the Int(). But I went ahead and left it in there for fanciness. 8)

_________________
It is what it is,
therefore,
I do what I do.


Top
 Profile  
 
PostPosted: Tue Oct 28, 2008 3:11 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
You need to make it round or else it doesn't work right. That's why you do Int or CInt or whatever...trust me. Just try it yourself and you'll see that the mouse x,y acts weird.

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
PostPosted: Tue Oct 28, 2008 3:48 pm 
Offline
Pro
User avatar

Joined: Mon May 29, 2006 3:26 pm
Posts: 493
Location: São Paulo, Brasil
Google Talk: blackagesbr@gmail.com
GIAKEN wrote:
You need to make it round or else it doesn't work right. That's why you do Int or CInt or whatever...trust me. Just try it yourself and you'll see that the mouse x,y acts weird.

Giaken, the \ command is integer division.
Int(x/y) ==== x\y
http://msdn.microsoft.com/en-us/library/b6ex274z(VS.80).aspx

_________________
http://www.blackages.com.br
Image
Dave wrote:
GameBoy wrote:
www.FreeMoney.com
I admit I clicked. I immediately closed upon realizing there was, in fact, no free money.
Robin wrote:
I love you and your computer.Marry me.


Top
 Profile  
 
PostPosted: Tue Oct 28, 2008 3:54 pm 
Offline
Persistant Poster
User avatar

Joined: Thu Mar 29, 2007 10:30 pm
Posts: 1510
Location: Virginia, USA
Google Talk: hpmccloud@gmail.com
I understand that...alright I think I get it now. I never use \ or Mod so... :D

_________________
Nean wrote:
Yes harold. Give it to me.

Image
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group