Search found 3 matches

by Willi
Thu Jan 27, 2022 6:24 pm
Forum: Support and Development
Topic: Store and keep track of colliders x,y - windfield
Replies: 3
Views: 2095

Re: Store and keep track of colliders x,y - windfield

Found a solution! for _,a in pairs(arrow_flug) do a.x = a.x - 5 if a.collider:enter('Player') then player.leben = player.leben - 1 table.remove(arrow_flug, _) a.collider:destroy() elseif a.x < 10 then table.remove(arrow_flug, _) a.collider:destroy() player.punkte = player.punkte + 1 end end No probl...
by Willi
Thu Jan 27, 2022 5:42 pm
Forum: Support and Development
Topic: Store and keep track of colliders x,y - windfield
Replies: 3
Views: 2095

Re: Store and keep track of colliders x,y - windfield

I have read that you should store the colliders in a table and delete them after a set amount of time. I have tried that but could not work it out... I keep trying!
by Willi
Thu Jan 27, 2022 3:31 pm
Forum: Support and Development
Topic: Store and keep track of colliders x,y - windfield
Replies: 3
Views: 2095

Store and keep track of colliders x,y - windfield

Hello guys, I started learning lua and love2d this month. In my little game you can controll a character on the left hand side of the screen and move him up and down. Arrows spawn randomly on the right side and fly towards the player. My problem is i dont know how to create independent colliders and...