Strength effect +1

Started by Steve381489 on

Topic category: Help with MCreator software

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Strength effect +1
I want to make an effect that while active gives me another effect during the day and gets stronger at noon and decreases until
6 pm. I want the player to gain +1 strength effect every second from 6 am to noon, and from noon onwards to lose -1
until 6 pm, where it will be at 0 intensity, and will remain at 0 until 6 am.

I did a procedure that checks if it's day when the ticket is activated, if it's day I check the time of day, if
If that's the time of day, I'll add +1 strength, but I don't know how to add another 1 strength taking into account
the previous number, and if it's a block of programming for each number it will be huge, because I want to add +1 strength to the
each second.

Does anyone know how I can do this without the procedure becoming huge?

NOTE: 6h = 0 ticks
     7h = 1000 ticks
     8h = 2000 ticks
     9 am = 3000 ticks
     10am = 4000 ticks
     11 am = 5,000 ticks
     Noon = 6000 ticks

NOTE: Sorry if my English is not very good, I'm using Google Translate
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This is doable. Set up a…
Sat, 09/23/2023 - 19:12

This is doable. Set up a numeric global trigger on the player-lifetime.

Then in your procedure where you have the potion effect, change the strength number to "get global variable" (located under "custom variable" tab).

Then set up a line called "set global variable to [get global variable + 1]" that way it adds 1 to the number already there. You can do the same with subtracting this number.