• Hey! Register here to create your account, engage with the community, and talk about what is new!

How do I deal damage to a player if the player touches a particle ray?

French_bread_gud

New member
Joined
Aug 21, 2021
Messages
3
Reaction score
0
I am trying to do a simple ray attack where the player can shoot a beam that deals damage to other players upon colliding with them, how can I do that?
 
Solution

French_bread_gud

New member
Joined
Aug 21, 2021
Messages
3
Reaction score
0
I'm pretty sure there's a Select Object (purpur block) which allows you to select entities that intersect a raycast.
I did that, but now the player takes damage upon casting the ray as well, I will attach some images of the code:
1629672721787.png1629672746227.png
1629672753599.png
1629672760586.png
1629672768952.png
1629672778167.png
I tried having the ray start 1.5 blocks forward from the player eye location, but that did not work as well.
 

stinkey

Forum adept
Joined
Sep 8, 2020
Messages
225
Reaction score
74
Solution

tavor

New member
Joined
Sep 1, 2022
Messages
3
Reaction score
0
Well. When you place player action damage choose victiom. It worked fine to me. I just didn't succeed in doing the same things to an entity.
 
Top Bottom