right click only working once

Started by EtsuEunji on

Topic category: Help with MCreator software

Active 5 years ago
Joined Oct 2019
Points:
651

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
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

Active 4 years ago
Joined Aug 2019
Points:
1023

User statistics:

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

Can you show your procedure?

Active 5 months ago
Joined Apr 2014
Points:
1223

User statistics:

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

Are you right clicking in air or block?

Active 5 years ago
Joined Oct 2019
Points:
651

User statistics:

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

i'm using the right click in air

Active 5 months ago
Joined Apr 2014
Points:
1223

User statistics:

  • Modifications: 2
  • Forum topics: 27
  • Wiki pages: 1
  • MCreator plugins: 0
  • Comments: 656
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

Active 5 years ago
Joined Oct 2019
Points:
651

User statistics:

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

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

Active 4 years ago
Joined Aug 2019
Points:
1023

User statistics:

  • Modifications: 0
  • Forum topics: 31
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 450
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.

Active 4 years ago
Joined Aug 2019
Points:
1023

User statistics:

  • Modifications: 0
  • Forum topics: 31
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 450
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.

Active 5 years ago
Joined Oct 2019
Points:
651

User statistics:

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

thanks, i'll try that :0

 

 

Active 5 years ago
Joined Oct 2019
Points:
651

User statistics:

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

it was that, thank so much