Guardian laser like attack

Started by aoooodi2 on

Topic category: Help with MCreator software

Active 6 months ago
Joined Oct 2020
Points:
700

User statistics:

  • Modifications: 1
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 26
Guardian laser like attack

Im making a guardian variant and want it to shoot a laser, exactly like the normal one. How can i do this with code?

Active 1 year ago
Joined Mar 2023
Points:
291

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 12
Inspecting the game files I…
Sat, 08/05/2023 - 15:05

Inspecting the game files I found that Gaurdian lazers are actually entities. You could make a small 1x1 laser like entity that spawns repeatedly using a formula until it reaches the player and if there is a block in its spawning path or if the player is raising a shield no damage will be taken.