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
Before you make a thread asking for help, read this.
Post Reply
User avatar
EnbyAdams
Prole
Posts: 1
Joined: Mon Jun 10, 2019 7:53 pm

Detect collisions for STI with bump by layer id

Post by EnbyAdams »

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
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Detect collisions for STI with bump by layer id

Post by bobbyjones »

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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 5 guests