Ranged entities

Started by Orandza on Sun, 08/14/2022 - 20:43

Topic category: Help with modding (Java Edition)

Last seen on 16:36, 21. Sep 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ranged entities
Sun, 08/14/2022 - 20:43

So I have an immovable entity whose only purpose is to shoot down phantoms. It works fine for the most part but I don't know how to make it target phantoms at a longer distance. I set it to watch closest phantom in radius of 100 blocks and shoot it down but it doesn't work. The range is way smaller than that in-game, probably like 10 blocks or something. Any help would be appreciated.

https://imgur.com/a/KhhrZcN

Last seen on 22:06, 3. Oct 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You can just make it shoot…
Sun, 08/14/2022 - 23:40

You can just make it shoot projectiles thru a procedure. So remove your "attack" ai task but keep the "watch entity" one. Then make a procedure like the one in this image:
https://imgur.com/A2doehT

You can put a "wait _ ticks on server side" procedure block after the "shoot projectile" block if you want a bit of a delay. (Remember 20 ticks is 1 second).

Hope this helps!

Last seen on 16:36, 21. Sep 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hmm, it doesn't seem to work…
Mon, 08/15/2022 - 12:53

Hmm, it doesn't seem to work. Tried putting this as the procedure for entity update tick, and I also tried using it "on loaded entity update tick" like shown in the image but the entity just doesn't shoot anything. Thing is, I can't find those blocks you used next to the "do" part of the block. Not the shoot from entity block, not the arrow of type block or even the "no entity" block. Searching them up shows no results and I can't find them from any of the menus. All I could do is this, and it doesn't work: https://imgur.com/a/0X2eDXR

Last seen on 22:06, 3. Oct 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Those blocks are new to…
Mon, 08/15/2022 - 14:29

Those blocks are new to mcreator. You have to download 2022.2 version. https://mcreator.net/download

Last seen on 16:36, 21. Sep 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Oh. That's weird, whenever I…
Mon, 08/15/2022 - 14:43

Oh. That's weird, whenever I checked for updates inside of MCreator, it would just say it's up-to-date. Well thanks, I'll try it out and report the results!

Last seen on 16:36, 21. Sep 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Okay, your method works, but…
Mon, 08/15/2022 - 20:26

Okay, your method works, but the entities usually seem to shoot in a totally different direction from where the phantom is. However, it appears that there's a follow range option which wasn't there in the version I had previously and it seems to have solved my problem. The arrows show by the entity are a little inaccurate but it's the best I'll get for now I suppose. Anyways, thanks a bunch.

Last seen on 22:06, 3. Oct 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Your welcome. And maybe if…
Mon, 08/15/2022 - 21:56

Your welcome. And maybe if you upped the speed on the projectile procedure block, it'll have a better chance of hitting it?

Last seen on 16:36, 21. Sep 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
No, using the procedure…
Tue, 08/16/2022 - 18:04

No, using the procedure doesn't make the entity miss by a little bit, it tends to just rapidly shoot at one spot, often in a completely different direction. The procedure was even set to 0 inaccuracy. I did make a custom projectile with better speed which works okay-ish with the regular attack options for the entity so I'll stick to that for now.