Started by
dkrdjdi
on
Topic category: User side tutorials
I tried several methods, but the following methods worked.
https://imgur.com/s3HnhIX
1. Create conditions using the NBT tag.
2. I added a procedure
Set it as a global trigger 'Entity is attacked' and set it as follows.
3. Go to the Trigger tab of the custom entity and set the trigger for On entity tick update.
Edited by dkrdjdi on Fri, 01/10/2025 - 11:01
I highly recommend using synced entity data instead of NBT tags.
This may also help: https://www.youtube.com/watch?v=AybUiMcnq-U
Also check out https://www.youtube.com/watch?v=qwz15lLhxGQ
Thank you for the tutorial. I solved it safely.
Glad to hear that! ;)
Ok here's a better way to set up attack animations that doesn't use the tick event I used a custom attribute (press the + in the workspace its the third one down form the left) as a flag since it synced between both client and server so with this you only need two procedures for all the mobs you want to have a attack animation in a specific Mod! I used "strongmobs:" since that was my mods id.
First: Create The Global Procedure
https://imgur.com/a/Tq7Jna5
Second: Create the check for the attribute
https://imgur.com/a/4tOkLTh
Third: Don't forget to add it to you mob!
https://imgur.com/a/1NyFBUn
Ps: The Wait Block determines how long the Animation will remain true (So how long it will play for) and when the next animation can start. If the attribute is still true by the time the mob attacks again it wont play. 15 ticks works for me but if you have a longer attack animation its a good idea to wait longer or make it shorter if you have a really fast attack.