Creating Laser Attacks

Hello all,
I am currently attempting to make a stationary laser attack, one that span the entire game board and that would stay for several seconds without moving. Does anyone have any knowledge on how to do so?
Any help would be incredibly appreciated. Thank you!

2 Likes

Being stationary and spanning a few seconds seems pretty easy, but I’m not sure the context here.
Spawning an object from X point to just shoot doesn’t work for you? I’m also not sure what the “game board” is, though the size likely does not matter.

2 Likes

Red inferno has something similar in debug mode, i think pugs procedural animation example might be helpful for a beam attack

2 Likes

Are you basically wanting a laser that shoots in a set direction for a few seconds before turning off?

You could have it so it spawns a ton of projectiles in a line so it looks like a laser, but instead it’s a ton of rectangular projectiles.

You could also have an attached object that stretches really long so it looks like a laser beam. And then just use a raycast from the original object to detect and send a message to any enemy/player that comes in contact with it while the laser is active.

2 Likes

The size is several hundred blocks and should remain for a few seconds, so maybe some sort of spawn rigging system may work. Thanks for the idea. The bigger issue is that it can shoot at 45 degree intervals, so even if that does work, it’ll look janky on the diagonals.

I was thinking maybe an attached object, but the game board is a bit too big for that. And yes, I have thought about projectiles, but I already have a dynamic lighting system in place so I’m trying to keep resource consumption to a minimum. Additionally, the laser fires through walls (without destroying them).

Yeah I still don’t know the full context, but it sounds like using Attach, changing the size, and messaging by Raycast works perfectly fine

this works for visualizing the line if you need.

1 Like

Here are some old laser examples I have.

2 Likes

Thank you very much! I will use these.

1 Like