Search found 91 matches

by Refpeuk
Tue May 01, 2012 8:03 pm
Forum: Support and Development
Topic: Tile Collision Detection? Can't Figure out...HELP!
Replies: 2
Views: 1763

Re: Tile Collision Detection? Can't Figure out...HELP!

I wouldn't do it with a colour check. To check for a collision for a single point on a tilemap you do something like this: function iscolliding(mouseX, mouseY) if map[math.floor(mouseX/tilesize)][math.floor(mouseY/tilesize)] == 1,2,3,4 --(or whatever values are collision blocks) then return true end...
by Refpeuk
Tue May 01, 2012 6:52 pm
Forum: Support and Development
Topic: hump vector/camera error
Replies: 0
Views: 1282

hump vector/camera error

I've been banging my head against this error for a while, and don't really understand what it means. Add: wrong argument types(<vector> expected) It sounds really straightforward, except looking through the HUMP code I can see that it is actually asking for single number values like I'm giving it, n...
by Refpeuk
Fri Apr 27, 2012 12:59 am
Forum: Support and Development
Topic: Rotation issues
Replies: 0
Views: 1224

Rotation issues

Hi Guys, I'm working on a rather ambitious project where you build and then fly a spaceship. I just added the Newtonian physics for the ship (not with love.physics) and I'm having camera and frame of reference issues. Namely, I have a hard time translating between the camera's coordinate plane, the ...
by Refpeuk
Sat Apr 21, 2012 4:32 pm
Forum: General
Topic: !Free Avatars!
Replies: 36
Views: 18031

Re: !Free Avatars!

Cool!

Can you do steampunk?
by Refpeuk
Mon Apr 16, 2012 10:32 pm
Forum: Support and Development
Topic: How can I make my character jump?
Replies: 29
Views: 12490

Re: How can I make my character jump?

So sorry for my rather short and rude reply. Moral: never browse forums in a bad mood.
by Refpeuk
Sun Apr 15, 2012 10:15 pm
Forum: Support and Development
Topic: How can I make my character jump?
Replies: 29
Views: 12490

Re: How can I make my character jump?

This is probably one of the most commonly asked mechanical questions on this forum. Try the handy search function.
by Refpeuk
Wed Apr 11, 2012 10:25 pm
Forum: Support and Development
Topic: "Variable nil" error
Replies: 6
Views: 2340

Re: "Variable nil" error

It does, thanks!
by Refpeuk
Wed Apr 11, 2012 9:49 pm
Forum: Support and Development
Topic: "Variable nil" error
Replies: 6
Views: 2340

Re: "Variable nil" error

Oh right, I also meant to ask - if it was only recognizing two variables, why did it throw the error at py instead of px, which came first?
by Refpeuk
Wed Apr 11, 2012 7:21 pm
Forum: Support and Development
Topic: Creating Tables on Command
Replies: 5
Views: 1871

Re: Creating Tables on Command

make a function that is called every time you click the mouse that passes the mouse's coordinates like this: numclicks = 0 clickdata = {} function addclickdata(x, y) clickdata[numclicks] = {} clickdata[numclicks].x = x clickdata[numclicks].y = y numclicks = numclicks + 1 end EDIT: I used slightly di...
by Refpeuk
Wed Apr 11, 2012 5:51 pm
Forum: Support and Development
Topic: "Variable nil" error
Replies: 6
Views: 2340

Re: "Variable nil" error

Oh, I see. I thought it worked the same was as assigning multiple variables. Eg:

Code: Select all

local wmx,wmy = mouseworld(love.mouse.getPosition())
Thanks for that!