Charging Mana/Magic On Key Press

Started by octopusplop on

Topic category: Help with modding (Java Edition)

Last seen on 01:17, 17. May 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Charging Mana/Magic On Key Press


Hi,

I have been struggling with this for a while and havent found a solution.

I want to make it so as you hold down a keybind (Ex: C) your mana increases by +1

The way I made it I have to keep tapping C for my mana to increase by +1 which isnt how I want it to work

Last seen on 13:01, 14. Nov 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi, i think you can use tick…
Sun, 10/22/2023 - 11:36

Hi, i think you can use tick procedure with boolean global variable "holding key"

Last seen on 01:17, 17. May 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I was able to fix it I…
Sun, 10/22/2023 - 17:33

I was able to fix it I basically made a variable that turns true when im charging and false when i release thank you though