OR and AND Gates

Started by Goldorion on Sun, 07/15/2018 - 00:04

Topic category: Help with MCreator software

Last seen on 14:24, 26. Oct 2020
Joined Aug 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
OR and AND Gates
Sun, 07/15/2018 - 00:04

Hello,

I just know what is the AND and OR Gates in the Logic Operations in the Procedure Section.

 

Can you explain me please ?

 

Goldorion

Last seen on 11:41, 17. Oct 2020
Joined Jun 2016
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
They are logic gates used in…
Sun, 07/15/2018 - 06:08

They are logic gates used in MCreator, scratch, any type of programming and maths.

OR means that one of the two "things" (well, I'm not English so I don't know how to call them) should be true, but it works if both of them are true too.

AND means that both of the "things" should be true

 

Examples:

 

If (has item in player inventory = tnt) OR (has item in player inventory = fire_charge)

do explode

 

This way when the player has a tnt, a fire charge or both of them in his inventory, he explodes.

 

If ( is thundering) AND (has player item in inventory = fire_charge)

Strike lightning

Remove 1 item from player inventory (fire_charge)

 

This way, if the weather is lightning and you have a fire charge in the inventory, the fire charge will be removed and you will strike a lightning

If the weather is not lightning or if you don't have fire charge in your inventory you won't do any lighting

 

I hope it helped

(Sorry for bad English)

Last seen on 02:57, 26. Oct 2020
Joined Jun 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Nice They are also used for…
Sat, 02/08/2020 - 06:17

Nice

They are also used for redstone