Change Player Speed without Item

Started by Squidsquisher on

Topic category: Help with modding (Java Edition)

Last seen on 18:27, 4. May 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Change Player Speed without Item

I am attempting to make a mod (a bit like Origins) wherein the class you select initially affects your gameplay.

How would I go about creating the first class (let's call it the "Aqua" class)? Ideally I would have it so players with the "Aqua" class would swim faster in water, and be able to shoot Guardian lasers.

My main problems are adding tags to players and giving them abilities without the need of a held item.

Any help is greatly appreciated!

Last seen on 17:44, 19. May 2024
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey the way you do this is…
Tue, 04/13/2021 - 21:59

Hey the way you do this is with a Variable. I will list the steps below.

1. go to the Variables tab (below resources on the very left)

2. create a new Variable named what ever you want (i would suggest naming it after the "class")

3. for Variable type = Logic : for Variable scope = Player Persistente

4. once the variable is made change the initial value to False

5. go back to mod elements

6. create a new procedure (this procedure will be for adding the class to the player / the link below is an example of such a procedure)

https://drive.google.com/file/d/1xwzLCSVRPhKs09tI7-TsuBnItM-kbkbw/view?…

NOTE: this particular procedure is tied to an item so that it adds the effect on rick click in the air

7. create a second procedure (this procedure will contain the effects for the "class" / the link below is an example of such a procedure)

https://drive.google.com/file/d/14L5wOf7EB-7DH9vEXhsTv3OlRxKUBd41/view?…

NOTE: for your procedure to add water swiming you could give the player dolphins grace

8. for your mod i would add a key bind that opens a GUI with buttons that give a selected "class" on press. Second have the buttons check the player for (a list of Variables pertaining to the "classes") and if all are false only then does it give the class selected

P.S. for the lazer thing you will have to make that your self but to activate it you would have a keybind that checks for if the player has (the Variable that pertains to the "class" = true) and if so does the custom effect