"Remove 1 item of inventory" removes 2 items:/

Started by GendarmyY on

Topic category: Help with MCreator software

Last seen on 22:52, 11. Mar 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"Remove 1 item of inventory" removes 2 items:/
Fri, 07/03/2020 - 12:40 (edited)

I've created this procedure for an item I've also created:

[link does'nt work anymore]

As you can see, I've made an item that when you right click on a mob with it, it give them slowness and plays a sound, but also remove 1 of this item of the player inventory so that it looks like you used the item and now it broked. The problem is, it actually removes 2 items of the inventory and idk why. I've tried to put 0 or 0.5 but it basically removed nothing.

If someone could possibly know the reason of that for happening, it would be really appreciated ! :)

 

Edited by GendarmyY on Fri, 07/03/2020 - 12:40
Last seen on 22:52, 11. Mar 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The link didn't worked, so I…
Fri, 07/03/2020 - 12:39

The link didn't worked, so I'm going to write the procedure myself:

Event trigger - triggered by external call

or when (global trigger): "Player right clicks on entity"

 

If: Item in main -hand of [Source entity] = (the item I've created)

do: Add potion with level [250] duration [20] ambient [false] to [Event/target entity] type [SLOWNESS]

      Play at x y z level: [0.7] pitch: [1] sound: (my custom sound)

      Remove [1] (the item I've created) from [Source Entity] inventory

 

Last seen on 18:53, 2. Apr 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Right click procedures…
Fri, 07/03/2020 - 12:40

Right click procedures trigger twice. So, in order to fix this, click on the "template library" text, (above the procedure types) and scroll to the bottom, and you will find this: "Strike lightning each 10th time procedure is called". Click on it, and you will get the procedure stuff. Change all the 10 to 2, and remove the strike lightning stuff, and place your custom procedure there.

Last seen on 22:52, 11. Mar 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do I need the "remove 1 item…
Fri, 07/03/2020 - 12:45

Do I need the "remove 1 item from inventory" procedure or I can just delete it ?

Last seen on 18:53, 2. Apr 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need it.
Fri, 07/03/2020 - 12:46

You need it.

Last seen on 22:52, 11. Mar 2024
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It worked ! Thank you really…
Fri, 07/03/2020 - 12:53

It worked ! Thank you really much ! :)