Dash forwards with procedures *SOLVED*

Started by theTacocat88 on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 months ago
Joined Sep 2022
Points:
496

User statistics:

  • Modifications: 1
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 59
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 theTacocat88 on Thu, 07/18/2024 - 15:45
Active 1 month ago
Joined Oct 2023
Points:
395

User statistics:

  • Modifications: 11
  • Forum topics: 16
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 66
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.

 

Active 1 month ago
Joined Oct 2023
Points:
395

User statistics:

  • Modifications: 11
  • Forum topics: 16
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 66
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.

Active 2 months ago
Joined Sep 2022
Points:
496

User statistics:

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

Thanks! I will try this in my code.

Active 2 months ago
Joined Sep 2022
Points:
496

User statistics:

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

It worked! Thank you!

Active 6 months ago
Joined Jan 2023
Points:
319

User statistics:

  • Modifications: 0
  • Forum topics: 1
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
is there a way to have the…
Sat, 03/08/2025 - 20:56

is there a way to have the dash build up more distance the longer the key is pressed kinda like sonic adventure

 spin dash