Don't know how to get final digit/final 2 digits of a number

Started by nicthenerd on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 day ago
Joined Apr 2025
Points:
36

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
Don't know how to get final digit/final 2 digits of a number

I am trying to make an effect that deals damage every 2 seconds (40 ticks), however I don't know how to get the last 2 digits of the world time. Please help me do this or provide an alternative (I'm kinda new :P) Help is greatly appreciated

Active 1 day ago
Joined Apr 2025
Points:
36

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
I'm using "On effect active…
Sun, 05/11/2025 - 05:56

I'm using "On effect active tick" btw

Active 1 day ago
Joined Apr 2025
Points:
36

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
uhhh nevermind that kills…
Sun, 05/11/2025 - 23:02

uhhh nevermind

that kills you in half a second

Active 1 month ago
Joined Feb 2022
Points:
570

User statistics:

  • Modifications: 3
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 45
This should work: takes the…
Mon, 05/12/2025 - 09:03

This should work:

code

takes the last 2 characters of a string; if you need it to be a number use the "Number from text" block in the "Math" category

Active 1 month ago
Joined Feb 2022
Points:
570

User statistics:

  • Modifications: 3
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 45
like this, if you need it to…
Mon, 05/12/2025 - 09:03

like this, if you need it to be a numbercode

Active 1 day ago
Joined Apr 2025
Points:
36

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 9
Thanks
Fri, 07/11/2025 - 07:18

Thanks