Topic category: Help with Minecraft modding (Java Edition)
Hey, I'm did a "system" to a player having a second life/change in my custom dimension. Here's a quick explanation:
- Asgard -> name of my custom dimension; cannot respawn here
- AsgardEmpowerment -> Its the effect/buff to have a second life/change in my dimension.
- AsgardEmpowermentCooldown -> Its the effect/debuff to indicate the AsgardEmpowerment is in cooldown
- The cooldown is 15 seconds, for debug purposes.
To do this I did the followed:
2 global variables:
- AsgardDeaths -> tracks the number of a players deaths in the dimension(varies from 0 to 1)
- AsgardCooldownRemainTicks -> saves the remaining ticks of the effect that I created as the cooldown
- Used so when the player respawns they'll still the cooldown active
Procedures:
- AsgardEmpowermentEffectGive -> https://imgur.com/a/qQvQm6f
- AsgardEmpowermentTimer -> https://imgur.com/a/FM6goJF
My biggest problem here, that I'm having a headache to solve, is that when the player respawns after he died with the AsgardEmpowermentCooldown/debuff already counting down, when the cooldown is over, I came back to Asgard and I'm still dying, even with the AsgardEmpowerment/buff active.
I also need to give AsgardEmpowerment/buff back to the player when the AsgardEmpowermentCooldown/debuff is over and the player's still Asgard(PS:. I made this happen a couple of times, but I always screw this up when I try to fix the main problem).
I appreciate if anyone could help me,
Thank you!!!
I think you need to restore the player to full (or only some...) health at some point. Otherwise, the player is still going to be at 0 health. What you have seems like it should work, though...
Also, there is an Infinity block under Math > Random (0-1] block. You might be able to use that instead of "9999".
Woops. Yes I do that. I just an If condition because it was a specific thing from the mod. I updated the link
Ohh tyy, never noticed that before
Still not working. If someone could help me pls. I have been stuck with this problem for a while