Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post Posted: September 23rd, 2017, 8:54 pm 
 

Joined: April 15th, 2017, 10:48 am
Posts: 5
i want to control snek with mouse. For this reason i must change some int to float.
Where can i do?


Attachments:
UYG 15.rar [9.72 MiB]
Downloaded 14 times
Top 
 Profile  
Reply with quote  
 Post Posted: September 24th, 2017, 12:45 am 
User avatar

Joined: January 19th, 2017, 10:28 pm
Posts: 509
Location: Idiot from northern Europe
I don't quite understand what problem you're having.

But you could prob just typecast to int for the mouse position.

like
Int x = int(wnd.mouse.GetPosX());

_________________
I just like to thumb my nose at millionaires.
If I was rolled I'd bust them heads up.


Top 
 Profile  
Reply with quote  
 Post Posted: September 24th, 2017, 6:16 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3514
Location: Japan
Yumtard wrote:
I don't quite understand what problem you're having.

But you could prob just typecast to int for the mouse position.

like
Int x = int(wnd.mouse.GetPosX());


I think he wants to convert from int to float :)

Not sure why you would want to convert the mouse coords into float in the first place... Just use the int output from GetPosX(). Snek is not really a 'floaty' game to begin with.

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: September 24th, 2017, 7:40 am 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2908
Location: Oklahoma, United States
I think he wants to modify it so it makes smooth movement, like slither.io.

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com


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

Board index » Everything


 
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:
cron