Hello boys and girls!
I need some help with making a square (16x16) follow the mouse pointer, I would appreciate if you could make your explanations detailed.
My project that I'm making (a MS paint clone that I call Helium) is part of my process/project to better understand Lua and it's functions and this project (Helium) is part of the graphical part of Löve.
I have loked around on the Löve forum and other forums for threads that could help me but I haven't found any that helps.
I will attach my project file and I will also make able for you to view my "step by step" goals with this project and feel free to suggest anything that I should add or skip on this project.
I thank you for your time!
[SOLVED]Help: making a square follow the mouse pointer
[SOLVED]Help: making a square follow the mouse pointer
- Attachments
-
- Helium description and goals.doc
- Project description and goals
- (16.5 KiB) Downloaded 156 times
-
- main.lua
- The project
- (639 Bytes) Downloaded 80 times
Last edited by nice on Tue Sep 09, 2014 4:17 pm, edited 1 time in total.
Have a good day!
Re: Help: making a square follow the mouse pointer
Making the square display on the location of the mouse cursor is as simple as doing this:
Code: Select all
-- Draws A 16x16 Square
love.graphics.rectangle("line", x, y, 16, 16)
Re: Help: making a square follow the mouse pointer
So I dosen't need a local statement?Plu wrote:Making the square display on the location of the mouse cursor is as simple as doing this:
Code: Select all
-- Draws A 16x16 Square love.graphics.rectangle("line", x, y, 16, 16)
Have a good day!
Re: Help: making a square follow the mouse pointer
Nevermind, I see it's not needed.
Thanks for your help!
Thanks for your help!
Have a good day!
Who is online
Users browsing this forum: No registered users and 3 guests