Dash forwards with procedures *SOLVED*

Started by The_CAT_9801 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dash forwards with procedures *SOLVED*
Thu, 07/18/2024 - 15:45 (edited)

I am making a mod with a spear in it (a new one, not the one referred to in another one of my forum topics) that you can dash into enemies with when pressing R, but I can't figure out how to make it so you dash forwards, and not in just one direction.

This is how I want the keybind to work:

  1. Key is pressed
  2. Key is released
  3. Player dashes forward
  4. Enemy player or enemy dashed at takes damage
  5. Player stops dashing

Edit: So I figured out how to make the player dash, here is the image of my code:

https://imgur.com/a/TH4fury

I have the code to damage enemies but it won't work. Any help is appreciated.

Thanks!

Edited by The_CAT_9801 on Thu, 07/18/2024 - 15:45
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Imgur: The magic of the…
Thu, 07/18/2024 - 03:57

Imgur: The magic of the Internet <-clickable

https://imgur.com/a/dbO3W9C <-also clickable

 

the connected/top one/procedure is for moving and the one below is for the damage i recommend adding multiplication equations to the look vectors if you want to control them more/ make them weaker or stronger.

 

Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also I did the [=false]…
Thu, 07/18/2024 - 03:58

also I did the [=false] instead of [not] since for some reason the not one doesn't work for me too.

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! I will try this in…
Thu, 07/18/2024 - 15:05

Thanks! I will try this in my code.

Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It worked! Thank you!
Thu, 07/18/2024 - 15:45

It worked! Thank you!

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Imgur: The magic tomb of the…
Tue, 12/10/2024 - 08:58

Imgur: The magic tomb of the mask <-clickable

https://imgur.com/a/dbO3W9C <-also clickable

 

the connected/top one/procedure is for moving and the one below is for the damage i recommend adding multiplication equations to the look vectors if you want to control them more/ make them weaker or stronger.

Thank you. I'm glad I found your comment here.