Detect collisions for STI with bump by layer id
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
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
- (159.48 KiB) Downloaded 164 times
Code: Select all
local code = "broken"
function love.update(dt)
if code == "broken" then
print("god is dead")
elseif code ~= "broken"
print("lmao as if that'll happen, it's def still broken")
end
end
-
- Party member
- Posts: 730
- 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.
Who is online
Users browsing this forum: Ahrefs [Bot] and 5 guests