Search found 4 matches
- Mon Jun 03, 2024 4:05 pm
- Forum: Support and Development
- Topic: Directional collision rules
- Replies: 8
- Views: 2822
Re: Directional collision rules
Yeah, I thought that was what I was doing, lol. I am very new to Lua, I have gone through only one tutorial on how it works. I thought the second part of the code, the " for i =#enemies " part would make it cycle through the list of enemies and delete the one(s) that had dead == true. But ...
- Sat Jun 01, 2024 6:59 pm
- Forum: Support and Development
- Topic: Directional collision rules
- Replies: 8
- Views: 2822
Re: Directional collision rules
Well I made some progress on it. I had the player query a small area at the bottom of its hitbox. If that query collides with an 'Enemy' collision class, it deletes that enemy. My problem now is that it deletes every enemy, lol. and it still resets the player as if he was killed by the enemy. So now...
- Fri May 31, 2024 2:13 pm
- Forum: Support and Development
- Topic: Directional collision rules
- Replies: 8
- Views: 2822
Re: Directional collision rules
Awesome, thank you for the reply. Like I said I'm very new to coding so this will probably take me a while to figure out how to implement, but it was a great explanation on how to think about this and model it. I appreciate that you took the time to explain the concepts instead of just throwing code...
- Thu May 30, 2024 2:23 pm
- Forum: Support and Development
- Topic: Directional collision rules
- Replies: 8
- Views: 2822
Directional collision rules
I'm working on a basic platformer, I am very new to coding and love2d. I've successfully built out a platformer where collisions are detected and if the player hits an enemy the player is sent back to the start of the level, but I want there to be an option for the player to kill enemies. Is there a...