## Detect collisions for STI with bump by layer id

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Prole
Posts: 1
Joined: Mon Jun 10, 2019 7:53 pm

### Detect collisions for STI with bump by layer id

Hiya friends, is it possible to check for collisions with specific STI tile layer ids with bump? If not, how can I differentiate between enemy collisions and collisions with the map? Current code is attached, enemies aren't programmed yet.
Attachments
thingy.love

Code: Select all

local code = "broken"
function love.update(dt)
if code == "broken" then
elseif code ~= "broken"
print("lmao as if that'll happen, it's def still broken")
end
end


bobbyjones
Party member
Posts: 712
Joined: Sat Apr 26, 2014 7:46 pm

### Re: Detect collisions for STI with bump by layer id

I haven't used it in a while but I believe the collision object returns the items the took place in the collision. That's how I handled it.
Check out my most recent medium post, please give feedback.