Second Life

Started by LeZ on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Second Life
Thu, 06/29/2023 - 13:16 (edited)

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:

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!!!

Edited by LeZ on Thu, 06/29/2023 - 13:16
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think you need to restore…
Wed, 06/28/2023 - 17:39

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".

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Woops. Yes I do that. I just…
Thu, 06/29/2023 - 13:16

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

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Still not working. If…
Sun, 07/02/2023 - 15:43

Still not working. If someone could help me pls. I have been stuck with this problem for a while