Search found 58 matches

by Dr.Tyler O.
Fri Oct 10, 2014 1:15 am
Forum: Support and Development
Topic: Mouse position isn't accurate with graphics translation.
Replies: 5
Views: 3951

Re: Mouse position isn't accurate with graphics translation.

Post the code.... or a love file and we can help you! That is going to be my signature from now on because I'm kind of tired of typing it in threads that ask a question but never post the code or a love file... Your code can't be that amazing that someone here is going to steal it... Because if it ...
by Dr.Tyler O.
Fri Oct 10, 2014 12:12 am
Forum: Support and Development
Topic: Mouse position isn't accurate with graphics translation.
Replies: 5
Views: 3951

Mouse position isn't accurate with graphics translation.

In the game that I'm making, you right click and a menu pops up right next to the mouse that gives you a list of options for the object you right clicked (similar to something like this: http://www.zybez.net/img/genimg/gettingstart/graveoptions.png). But when I added love.graphics.translate() to mak...
by Dr.Tyler O.
Wed Sep 17, 2014 3:23 am
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411439

Re: "Questions that don't deserve their own thread" thread

slime wrote:Turning the Fixture into a sensor might be what you want, rather than using collision filtering.
But, from my understanding, sensors don't collide with anything. I need to make it so that the body only collides with static bodies.
by Dr.Tyler O.
Tue Sep 16, 2014 11:13 pm
Forum: Support and Development
Topic: "Questions that don't deserve their own thread" thread
Replies: 905
Views: 411439

Re: "Questions that don't deserve their own thread" thread

Is it possible to use Fixture:setFilterData() while still letting those fixtures produce collision callbacks? I'm aware that it sounds silly but the collision callbacks are what I'm using to detect whether the players in my video game touch items. I just don't want the items to slow the player down ...
by Dr.Tyler O.
Tue Sep 16, 2014 1:27 am
Forum: Support and Development
Topic: [SOLVED]Remove an object from a table.
Replies: 11
Views: 12220

Re: Remove an object from a table.

Plu wrote:This isn't really true; no two objects are the same unless they are literally references to the very same object.
Thank you so much for the explanation. I can't believe I didn't realize that before.
by Dr.Tyler O.
Sun Sep 14, 2014 9:57 pm
Forum: Support and Development
Topic: [SOLVED]Remove an object from a table.
Replies: 11
Views: 12220

Re: Remove an object from a table.

rmcode wrote:Finding solutions to problems in your code is your job ;)
That's true, and if I can't solve the problem myself then I ask for help from people who can help me solve those problems and learn from my mistakes.
by Dr.Tyler O.
Sun Sep 14, 2014 9:30 pm
Forum: Support and Development
Topic: [SOLVED]Remove an object from a table.
Replies: 11
Views: 12220

Re: Remove an object from a table.

I think what you are asking for can't be done, because there is no way for your code to tell which coin it should remove (and that's the problem you are facing IIUC). Yes, that's the problem. If it can't be solved by doing it this way, are there any other ways of doing this? Love is a game framewor...
by Dr.Tyler O.
Sun Sep 14, 2014 7:15 pm
Forum: Support and Development
Topic: [SOLVED]Remove an object from a table.
Replies: 11
Views: 12220

Re: Remove an object from a table.

davisdude wrote:

Code: Select all

table.remove( coins, Index )
Where Index is the index of the coin in the table.
I'm aware of table.remove() but I have to remove a specific object that depends on the order in which the player touches the coins.
by Dr.Tyler O.
Sun Sep 14, 2014 6:38 pm
Forum: Support and Development
Topic: [SOLVED]Remove an object from a table.
Replies: 11
Views: 12220

[SOLVED]Remove an object from a table.

I have some code here that spawns a coin and adds it to a table so that all of the coins can be drawn with a for loop. When the player touches a coin it needs to delete that coin specifically and that's a problem because all of the objects in the table are exactly the same. coins = {} function spawn...
by Dr.Tyler O.
Sat Sep 13, 2014 11:50 pm
Forum: Support and Development
Topic: [Solved]Fixing rotation with drawn images.
Replies: 0
Views: 1403

[Solved]Fixing rotation with drawn images.

A few of my friends and I have been developing a game lately and we've ran into a problem. When you draw an image over a body it places the top left pixel of the image in the center of the body. The way that I decided to fix it was to just subtract half of the x and y values of the body so that the ...