how to set up shooting conditions?

Started by WelonTrees on

Topic category: Help with modding (Java Edition)

Last seen on 16:24, 14. Dec 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to set up shooting conditions?

I make a mod. I need to create conditions for shooting so that my pistol does not fire under certain conditions. I don't know what procedures are responsible for the shooting conditions.This is where I need help.

Last seen on 16:24, 14. Dec 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I watched the video. Where…
Tue, 01/05/2021 - 12:27

I watched the video. Where can I find additional terms? In plugins? Or are they already in MCreator?

 

Any block that returns logic…
Tue, 01/05/2021 - 15:20

Any block that returns logic value can be a condition, or combination of them.

Last seen on 16:24, 14. Dec 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I cannot find a block that…
Wed, 01/06/2021 - 23:33

I cannot find a block that returns a boolean and is responsible for shooting a ranged object. Of course there is one block, but it does not return a boolean value.

Last seen on 16:24, 14. Dec 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block that returns logic…
Thu, 01/07/2021 - 21:55

Block that returns logic value*

Last seen on 16:56, 15. Apr 2024
Joined Feb 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Klemen means that you can…
Sun, 09/25/2022 - 00:01

Klemen means that you can set up your own conditions if you make a procedure and return true/false on it, then you can call it elsewhere and it will work as a condition. For example you can create a procedure that checks for full diamond armor, and then call that in another procedure like:

if (playerHasDiamondArmor == true) {
//Do stuff
}

you can add for example a variable or an nbt tag to your player and use it as cooldown, so if the variable is 0 for example, allows shooting. The variable will be set to like 100 whenever you shoot, and make a procedure that decreases it by 1 every player tick for example, you now have a working cooldown for your gun. Hope it helps