The Daily Click ::. Forums ::. Klik Coding Help ::. What is the best way to do a mouse controlled object on a grid?
 

Post Reply  Post Oekaki 
 

Posted By Message

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
14th August, 2011 at 20:28:50 -

I want the aimer for a game to be set to a 64 by 64 grid which i got working with the built in movement. but when the player moves out of the starting frame the object falls behind the position of the mouse. What is the best way to handle this?

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49566

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
14th August, 2011 at 21:46:36 -

Set X Position of Aimer to xmouse/64*64
Set Y Position of Aimer to ymouse/64*64

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
14th August, 2011 at 22:45:08 -

Thanks that works it is set to a 64 grid but its 32 pixels lower and to the right of the actual level frame for some reason

 
n/a

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
15th August, 2011 at 00:23:36 -

Set X Position of Aimer to 32 + (xmouse/64*64)
Set Y Position of Aimer to 32 + (ymouse/64*64)

that should fix your problem

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
15th August, 2011 at 02:45:27 -

works great thanks!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click