Presice mob Proyectiles?

Started by Warlerys on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Presice mob Proyectiles?

Hello, i need help :c

im making a turrets mod, the issue is when i created a Sniper Turret, their shoots aren't accuracy when shoots for medium and long distances to enemies.

i tried all...

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There's literally nothing…
Thu, 08/29/2024 - 13:14

There's literally nothing you can do about it. accuracy isn't configurable. 

What you could do though is having the entity shoot a projectile when it sets its attack target, reply if you wanna try so I explain it to you

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I have actually figured out…
Thu, 08/29/2024 - 14:28

I have actually figured out a way to make more accurate projectiles, but it is basically using a procedure to override the entire entity attacking system. I will try to remember to make a tutorial about it at some point.

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hello again, too late, i…
Mon, 09/02/2024 - 17:28

hello again, too late, i fixed it! but don't worry, thanks for all :D

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How did you fix it?
Tue, 09/10/2024 - 10:09

How did you fix it?

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, I was going to create…
Tue, 09/10/2024 - 14:29

Sorry, I was going to create a forum post with a procedure template that allows accurate ranged attacks, but I wasn't able to figure out how to upload files on a forum post without using a third-party hosting service, which I don't really feel safe using.

The general system that I made for accurate attacks was to have the ranged entity run a procedure every second or two.

That procedure would, if the ranged entity was targeting something for attack, get the coordinates of the attack target, then make the ranged entity face that direction and fire a projectile with 0 inaccuracy value, using the procedure block for an entity to shoot a projectile.

The difficult part was the ranging system, so that the ranged entity will look higher up the further away the target is.

A possible workaround would be to just have the projectile shoot with a lot of power, otherwise you need to do a lot of calculations, I basically just experimented with different values until it worked.

I hope this helps you to make your own ranged attack system.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah thank you very much, I…
Tue, 09/10/2024 - 16:55

Yeah thank you very much, I still have a question though: how do you make the entity run the procedure every few seconds? I think that could be done with the "entity sets attack target" through "wait" procedure blocks, making it shoot that way. 

My projectile has a lot of power so ranging system is not a problem.

 

Also there is no way of uploading files through MCreator Forum Posts, I tried to in past, but it is not possible. 

I advise you make the forum post anyway and find a way to upload those files somewhere, because this is a very important issue and a procedure template is very needed.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The timer is done through an…
Tue, 09/10/2024 - 16:57

The timer is done through an nbt number tag. I check on every entity update tick to see if tag is greater than a number(I use 30), and if it is, I use an advanced procedure block to call the attacking procedure, then I reset the tag to 0. If the tag is less than 30, I increase the tag by 1.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, so you use NBT tags,…
Tue, 09/10/2024 - 17:03

Oh, so you use NBT tags, kinda the skeleton key for complex procedures.

Thank you, I hope you make that forum post because many people struggle with the shooting system.