Ranged Item: "When Bullet Hits Player" Activates When I Use the Ranged Item

Started by Doorknob on

Topic category: Help with MCreator software

Last seen on 21:36, 18. May 2020
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Ranged Item: "When Bullet Hits Player" Activates When I Use the Ranged Item

I have a ranged item that I've set up to send players to a certain dimension if they get hit by the bullet. The procedure only has the "Switch dimension for provided player to (my dimension)" block, and the procedure is only connected to "When bullet hits player". However, when I try to use the ranged item, it teleports me to that dimension. My only thoughts as to why this happens is because the "bullet" hits me as I shoot it. Does anyone have a solution to this? Any and all help is appreciated.

Last seen on 02:12, 24. Apr 2024
Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do "when bullet hits living…
Mon, 05/18/2020 - 17:38

Do "when bullet hits living entity" it fixes the glitch where it hits you and i'm pretty sure (i haven't tested it) it works on other players

Last seen on 10:38, 22. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I had the same problem- it…
Sun, 07/10/2022 - 22:25

I had the same problem- it seems like it counts it as a hit, (at least for anything but damage), when you throw it because the projectile spawns in your hitbox. You can fix this by making an 'if' block that requires the source entity not equal the target entity. (If block, followed by a 'not' block, connected to an entity logic block comparing the source and target entities.) That way, it'll only count if the entity it hits isn't the same as the entity that throws/shoots it.