I just need to know if there's any way to give a player an effect once the first effect has worn off. I have a sort of booster that gives the player dolphins grace three for a short period of time, but after it expires I want to give the player dolphins grace one. Any ideas?
It's much closer to the second answer. I have particle effects that mark a "booster", and I have it set to give the player dolphin's grace 3 once they pass by it. I have that portion working, but after the boost activates, I have no way of giving the player dolphin's grace 1 again. I have this:
/execute at @p if block ~ ~-2 ~ minecraft:emerald_block run effect give @p minecraft:dolphins_grace 999999 1 true
(the players cross over an emerald block before the swimming portion, so this works fine.)
But once the effect of the speed boost happens, it doesn't go back to the normal effect of Dolphin's Grace.
I did not realize you might already have your way of doing this but I typed this all out before I got to the final commands. Idk how you are trying to apply dolphin's grace 1 but if you are doing so by command make sure you clear the effects from the player before reapplying dolphin's grace 1. Lower status effects don't usually override the larger effects. Note the bolded commands below.
That's my issue, I'm in Java. Should've specified, my bad. I have the command to effect a player with dolphins grace 3 as:
/execute at @p if block ~ ~-3 ~ minecraft:iron_block run effect give @p minecraft:dolphins_grace 5 3 true
which works. However, I set up a clock with a command block that gives a player leather boots, and clears it, but the command blocks are giving me issues when it comes to chaining. I set up something different ATM that does work, but it's not completely accurate.
I set a repeat command block with the above execute command with a slight delay to a command block that sets a redstone block to a circuit closer to where the player will be, so the tag @p is more accurate. It's timed so that once dolphins grace three wears off, it hits the player with this:
/effect give @p minecraft:dolphins_grace 999999 1 true
It works, but with several players it is bound to have issues. Any ideas?
EDIT: I think I just solved it! The way effects are made, if an effect that is a higher number than other is given to a player, the higher one will clear the previous, and take effect. If I just set a repeat command block to give dolphin's grace 1, after the boost occurs, it goes straight back. It was a simple solution I never even thought of, haha
I just need to know if there's any way to give a player an effect once the first effect has worn off. I have a sort of booster that gives the player dolphins grace three for a short period of time, but after it expires I want to give the player dolphins grace one. Any ideas?
I might be able to think of something but I will need to know more about your build.
Why can't you do it based off time? I.e if you give it to them for 15 seconds why can't you just apply dolphin 1 after 15 seconds?
Or is it something like where you swim by something you gain dolphin grace 2, and then after some time it returns to 1?
If it's closer to the second answer I should be able to help
It's much closer to the second answer. I have particle effects that mark a "booster", and I have it set to give the player dolphin's grace 3 once they pass by it. I have that portion working, but after the boost activates, I have no way of giving the player dolphin's grace 1 again. I have this:
/execute at @p if block ~ ~-2 ~ minecraft:emerald_block run effect give @p minecraft:dolphins_grace 999999 1 true
(the players cross over an emerald block before the swimming portion, so this works fine.)
But once the effect of the speed boost happens, it doesn't go back to the normal effect of Dolphin's Grace.
PreScript - please read carefully
I did not realize you might already have your way of doing this but I typed this all out before I got to the final commands. Idk how you are trying to apply dolphin's grace 1 but if you are doing so by command make sure you clear the effects from the player before reapplying dolphin's grace 1. Lower status effects don't usually override the larger effects. Note the bolded commands below.
______________________________________________________________________
So this is what I would do in Bedrock commands so you are going to have to translate
do your command
/execute @p ~~~ detect ~~-2~ emerald_block 0 effect @p dolphins_grace 3
then do in a Chain CB
/give @p leather_boots 1 1254
Then set a timer and at the end of your timer do the following in an ICB
/clear @p leather_boots 1254
Then in a Chain CB
/execute @p ~~~ effect @p clear
Then in a Chain CB
/execute @p ~~~ effect @p dolphins_grace 1
Your first command isn't a valid command. I think I can get it working with your leather boot idea, but if you have a command that works let me know.
That first command is the command you gave me. Im just providing the general structure of what would work.
Before applying dolphins grace 1, you need to clear the player of dolphins grace 3
Also note these commands are in bedrock
That's my issue, I'm in Java. Should've specified, my bad. I have the command to effect a player with dolphins grace 3 as:
/execute at @p if block ~ ~-3 ~ minecraft:iron_block run effect give @p minecraft:dolphins_grace 5 3 true
which works. However, I set up a clock with a command block that gives a player leather boots, and clears it, but the command blocks are giving me issues when it comes to chaining. I set up something different ATM that does work, but it's not completely accurate.
I set a repeat command block with the above execute command with a slight delay to a command block that sets a redstone block to a circuit closer to where the player will be, so the tag @p is more accurate. It's timed so that once dolphins grace three wears off, it hits the player with this:
/effect give @p minecraft:dolphins_grace 999999 1 true
It works, but with several players it is bound to have issues. Any ideas?
EDIT: I think I just solved it! The way effects are made, if an effect that is a higher number than other is given to a player, the higher one will clear the previous, and take effect. If I just set a repeat command block to give dolphin's grace 1, after the boost occurs, it goes straight back. It was a simple solution I never even thought of, haha
If you read my posts I said that twice already...
Please note when I said please read carefully. It would have saved you a lot of trouble