right click only working once

Started by EtsuEunji on

Topic category: Help with MCreator software

Last seen on 18:04, 17. Oct 2019
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
right click only working once

So i added an effect on the right click of the swords that adds a potion effect to the player. The problem comes when i try to use the effect again, it doesn't work.

There is another post with the same problem and although i followed the procedures in the same way it still doens't work

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can you show your procedure?
Wed, 10/16/2019 - 09:40

Can you show your procedure?

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Are you right clicking in…
Wed, 10/16/2019 - 18:03

Are you right clicking in air or block?

Last seen on 18:04, 17. Oct 2019
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i'm using the right click in…
Wed, 10/16/2019 - 18:04

i'm using the right click in air

Last seen on 03:03, 6. Feb 2024
Joined Apr 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Then as long as you are not…
Wed, 10/16/2019 - 18:09

Then as long as you are not clicking it on a block it should work
However, try to make If statement that will gonna check if Entity that uses it is entity player

Last seen on 18:04, 17. Oct 2019
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
with the procedure: is…
Wed, 10/16/2019 - 18:37

with the procedure: is current entity (sub) type of entity player?

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The only thing that I can…
Wed, 10/16/2019 - 19:18

The only thing that I can see that might be wrong is that you are using the double == sign instead of the single one. Unlike in programming where = is for setting a variable and == is for comparing, in the procedures = is also for comparing and == includes metadata. My guess is that because you deal damage for the sword and ALSO check for meta data, it specifically checks whether you have the sword + in its full health state in your hand, where as if you'd only have 1 = it would only check for the sword and possibly not the durability state?

But this is just a guess honestly.

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
At least, that would explain…
Wed, 10/16/2019 - 19:20

At least, that would explain why it only works the first time as with the meta data at first the sword is in full durability state thus the == metadata corresponds.

Try hitting a mob with your sword. If the potion no longer works (thus even not the first time) now the durability has been altered, then you know to change it to the single = sign.

Last seen on 18:04, 17. Oct 2019
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks, i'll try that :0    
Thu, 10/17/2019 - 17:49

thanks, i'll try that :0

 

 

Last seen on 18:04, 17. Oct 2019
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it was that, thank so much
Thu, 10/17/2019 - 18:05

it was that, thank so much