i need help

Started by TheGlitchedVoid on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i need help

im making a mod for my friend and i, and i wanna make a overlay that when you either hit a hotkey or shift and scroll it cycles through 

different abilities and which ever one your on thats the one that gets used, is that possible with mcreator? if so how

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is possible, but would be…
Thu, 11/02/2023 - 02:23

It is possible, but would be kind of complicated. You would need to make an overlay for the player, and then make images for different abilities. Then, you would need display conditions for each of the images to make it appear like the player was scrolling through them.

For a sort of simple example, where you just want to display an image that shows whichever ability is currently selected, you could make a player-persistant number variable, (I'll call it 'selected_ability,') that keeps track of what ability the player currently has selected. (You can add variables in the workspace- a player persistant variable is a permanent variable that's specific to a player, and doesn't reset on death.) 

You would then make a custom overlay, and place each of the images for each ability on the screen, possibly with a 'selected' and 'unselected' variant. Then, for each one you would need to make a display condition. (A procedure that returns either true, or false.) For the display condition of ability #1, you would want to return true if the player's current 'selected_ability' equals one, and otherwise return false. (And the opposite for the 'unselected' version of ability #1.) 

Lastly, you would need to add custom Keybinds to switch abilities, and would just need to make a procedure that increases or decreases 'selected_ability' by one whenever the corresponding key is pressed, and resets the number if it goes below one or above the number of possible abilities. (So there's always at least one ability selected- unless you want one of the options to be no ability.) 

As an added bonus to making a variable like this, you can also use 'selected_ability' in other procedures to determine which ability the player has selected.

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you very much, and not…
Fri, 11/03/2023 - 20:05

thank you very much, and not trying to bug or anything, but could u possible show me the procedure(s)? i think i know what youre talking about but, i dont wanna mess it up lmao