"Questions that don't deserve their own thread" thread
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: "Questions that don't deserve their own thread" thread
How would one create an element in love with STI and apply gravity and collisions with the world to said object.
Re: "Questions that don't deserve their own thread" thread
This is a great thread for my question.
I tried making a love file, however it seems main.lua has a hard time reaching my assets folder even though I have archieved the insides of the main folder. I'll attach the tried .love and for the sake of an unconditional guide there's a zip.
In this tutorial, is there some way of determining from player.x and player.y what tile one is on? I was thinking of using it for activating doors and such. I guess that will do.
Thanks for any help.
Bindie
I tried making a love file, however it seems main.lua has a hard time reaching my assets folder even though I have archieved the insides of the main folder. I'll attach the tried .love and for the sake of an unconditional guide there's a zip.
In this tutorial, is there some way of determining from player.x and player.y what tile one is on? I was thinking of using it for activating doors and such. I guess that will do.
Thanks for any help.
Bindie
- Attachments
-
- Room collision.zip
- (17.35 KiB) Downloaded 103 times
-
- Room collision.love
- (16.28 KiB) Downloaded 97 times
Re: "Questions that don't deserve their own thread" thread
Bindie wrote:This is a great thread for my question.
I tried making a love file, however it seems main.lua has a hard time reaching my assets folder even though I have archieved the insides of the main folder. I'll attach the tried .love and for the sake of an unconditional guide there's a zip.
In this tutorial, is there some way of determining from player.x and player.y what tile one is on? I was thinking of using it for activating doors and such. I guess that will do.
Thanks for any help.
Bindie
Code: Select all
x, y = floor( player.x / TILEWIDTH ), floor( player.y / TILEHEIGHT )
Re: "Questions that don't deserve their own thread" thread
Code: Select all
x = floor( player.y / TILEHEIGHT ), y = floor( player.x / TILEWIDTH )
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: "Questions that don't deserve their own thread" thread
No, the other way around. The y and x are flipped in your code. What was posted above is the correct way:Bindie wrote:If I understood you correctly, is this what you showed?Code: Select all
x = floor( player.y / TILEHEIGHT ), y = floor( player.x / TILEWIDTH )
Code: Select all
x, y = floor( player.x / TILEWIDTH ), floor( player.y / TILEHEIGHT )
Code: Select all
x = floor( player.x / TILEWIDTH ),
y = floor( player.y / TILEHEIGHT )
Code: Select all
a, b, c, d, e = valA, valB, valC, valD, valE
Code: Select all
a = valA
b = valB
c = valC
d = valD
e = valE
Re: "Questions that don't deserve their own thread" thread
Hey, I have been trying to implement bump.lua, how does world:move work? I think I have implemented the tiles in the world:update and my player image and through using world:move I thought there would be collision, however there could be more of that.
Someone out there with the solution?
Bindie
Someone out there with the solution?
Bindie
- Attachments
-
- Room collision - Kopia.zip
- (25.39 KiB) Downloaded 90 times
-
- Room collision.love
- (25.39 KiB) Downloaded 1340 times
Re: "Questions that don't deserve their own thread" thread
How does one make collisions on an image? I know its a noob question. I've been out of the forums for a while and forget if it's even possible.
http://xkcd.com/979/
Code: Select all
if signature = true then
print(signaturetext)
else
print("Error: Signature Not Found")
end
- HugoBDesigner
- Party member
- Posts: 403
- Joined: Mon Feb 24, 2014 6:54 pm
- Location: Above the Pocket Dimension
- Contact:
Re: "Questions that don't deserve their own thread" thread
That depends. You mean having an image where the pixels are tiles or detecting an image as a whole and applying collision?
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: "Questions that don't deserve their own thread" thread
Oh, hey, luaiscool, you can make your signature much shorter if you replace this:
With this:
Then you have no need for a signature exists boolean.
Code: Select all
if signature = true then
print(signaturetext)
else
print("Error: Signature Not Found")
end
Code: Select all
print(signaturetext or "Error: Signature Not Found")
Who is online
Users browsing this forum: Google [Bot] and 11 guests