I've built a mod for redirection cubes.
So, these cubes do everything a normal cube would, except it doesn't do the thing it was designed to do: redirect lasers.
Download link: https://www.dropbox.com/s/ij1r8dtzjouws ... cubes.love
Laser.lua: http://pastebin.com/4z8JncSp
I'm pretty sure the problem is in laser.lua, where it doesn't properly check for collision with redirection cubes (called laserboxes in the .lua files).
Can anyone help me with making the cubes redirect lasers?
Thanks.
About redirection cubes - requesting help
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
Midnight...
Anyways, what you want to do is check for collide with lasers. If it collides, it creates new laser in the direction it redirects it to.
Anyways, what you want to do is check for collide with lasers. If it collides, it creates new laser in the direction it redirects it to.
I tried that. No sure if it was me, but it would not draw the laser with it.BobTheLawyer wrote:Midnight...
Anyways, what you want to do is check for collide with lasers. If it collides, it creates new laser in the direction it redirects it to.
- cavejohnson99
- Posts: 185
- Joined: 09 May 2012, 08:37
Maurice said in IRC that you can't check for box:directioncollide with lasers. Thanks anyway.
- BobTheLawyer
- Posts: 2232
- Joined: 01 May 2012, 21:00
I would need a new laser...cavejohnson99 wrote:Maurice said in IRC that you can't check for box:directioncollide with lasers. Thanks anyway.
- cavejohnson99
- Posts: 185
- Joined: 09 May 2012, 08:37
That sounds like a really good idea, but I'm too dumb to do that. Also I have a lack of time right now, and my buggy computer doesn't help.
Edit: I know this probably won't work, but can I make a boolean in checkrect(x, y, width, height, {"player", "box", "goomba", "koopa"}) that checks if laserbox == true or false to check laser collision with laserbox?
Edit: I know this probably won't work, but can I make a boolean in checkrect(x, y, width, height, {"player", "box", "goomba", "koopa"}) that checks if laserbox == true or false to check laser collision with laserbox?