1

Increasing Potion Effect?

Drake__archer 7/22/24 3:52 pm
276
7/24/2024 9:47 pm
I'm trying to make a thing with Command Blocks where if you have the Strength effect, then every second or so, the level of said Strength effect goes up by 1.

I figured out the timer thing, but I don't know how I would get the level of the player's effect to increase.

I tried using scoreboards and area effect clouds, but that was too complicated, and I couldn't get it to work.

Could someone please help me figure this out?

Any help would be greatly appreciated!
Posted by
Drake__archer
Level 14 : Journeyman Modder
11

  Have something to say?

JoinSign in

2

MonkeManII
07/24/2024 9:47 pm
He/Him • Level 36 : Artisan Procrastinator Nerd
as a last resort... this is terrible.
have 256 commands that are like
effect give @.a[scores={strength=0}] strength infinite 0
effect give @.a[scores={strength=1}] strength infinite 1
effect give @.a[scores={strength=2}] strength infinite 2
... all the way up to ...
effect give @.a[scores={strength=255..}] strength 255

again only use this as a last resort.
256 commands/tick is NOT ideal.
1
michaelo
07/22/2024 6:02 pm
Level 36 : Artisan Taco Chef
Hmm, you were doing the right things, but I imagine the issue was with the area effect cloud (AEC). I was just testing summoning one now, and there's quite a few bits of data you might need to specify/change depending on how you go about doing this.

I originally thought you could just summon an AEC for one tick, but from testing it seems it needs to be around for a few ticks to actually apply the effect, so the player would need to be standing pretty still. I guess the other option is to summon a temporary AEC that follows the player around, but then you would have to control the timing of the potion effect duration with something else (which you might be doing, or maybe not).

Could you explain a few things about what actually happens in what you're making? E.g. how you get the effect, what the player is doing, how long it lasts, etc. I'll do a bit more tinkering though as I've never really used AECs for anything other than a marker entity (before marker entities were added lol).
1

Welcome