#Trying to make title fade in, then fade out and then another title player

1 messages · Page 1 of 1 (latest)

spiral talon
#
title @s title {"color":"white","text":"Wake Up"}

title @s title {"color":"white","text":"The World Needs You Now"}

title @s title {"color":"white","text":"More Than Ever"}

title @s title {"color":"white","text":"Who Do You Want To Be ?"}

title @s title {"color":"white","text":"/trigger to select race"}

Or please just lmk what language mcfunction is written in / wiki so I can dig in

hexed ermineBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1728489816:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

valid burrow
#

You'll need a scoreboard timer to separate when each of these title commands gets run, and may also want/need to modify the title fade times with title @s times <fadeIn> <stay> <fadeOut>

#

Mcfunction is the language, but we do have a wiki where you can look up the syntax of specific commands
https://minecraft.wiki/

spiral talon
valid burrow
#

No

#

times is a separate subcommand of title

#

It does not get defined per message, but per player

spiral talon
#

like I kinda understand but am not sure how to apply it is my first time doing such thing here

hollow quartz
#

you first run a command that sets the times, then you run the command that displays the title

#

and after the scoreboard timer runs out, you run the commands to show the other titles

spiral talon
#
title @s times <10> <10> <10>

title @s title {"color":"white","text":"Wake Up","bold":true}

title @s times <10> <10> <10>

title @s title {"color":"white","text":"The World Needs You Now","bold":true}

title @s times <10> <10> <10>

title @s title {"color":"white","text":"More Than Ever","bold":true}

title @s times <10> <10> <10>

title @s title {"color":"white","text":"Who Do You Want To Be ?","bold":true}

title @s times <10> <10> <10>

title @s title {"color":"white","text":"/trigger to select race","bold":true}

That way ?

#

so after 10 ticks it shows the other title

#

I get the idea but I didn't use that language before

valid burrow
#

No, you only need to set the times once, at the beginning

#

And then you need to use a scoreboard timer to count how many ticks until the next title command should be run

#

Which also means this function necessarily needs to be ticking

spiral talon
#

scoreboard timer ?

valid burrow
#

Yes, it's where you create a scoreboard with the dummy criteria, then increment that score by 1 every tick for the player (optionally, only under certain conditions). Then you can use execute if score @s matches <score> run ... to only run the command that follows when their score equals a specific value. Where 20 = 1 second if you're running it every tick

hollow quartz
#

also, when someone tells you give @s <insert item here>, then that becomes give @s stone, not give @s <stone>

spiral talon
#

how do I make a scoreboard with the dummy criteria tho ?

valid burrow
#

Using the scoreboard command

#

This would be a great time to learn about the command and it's syntax in the wiki, as you requested 🙂

spiral talon
#
scoreboard objectives add timer dummy

execute if score @s matches 60 run

title @s title {"color":"white","text":"Wake Up","bold":true}

Wiki has a lot of things said so what I understood is this
I added timer objective to scoreboard, and I set execute if score @s matches 60, it will run the title

#

thats right ?

hollow quartz
#

the syntax is execute if score @s <objective> matches 60 run <command>

#

you left out the objective and the command

#

(for objective, you enter whatever ID you gave the objective when you created it, so in your case, timer)

spiral talon
#

thought the command was the title part

hollow quartz
#

you still have to put that there

#

in the text that you sent, you've put the title part as a separate command, instead of being part of the execute command

spiral talon
#
scoreboard objectives add timer dummy

execute if score @s timer matches 60 run title @s title {"color":"white","text":"Wake Up","bold":true}

That way ?

hollow quartz
#

yes

spiral talon
hollow quartz
#

now all that's left is to keep incrementing the player's timer score on each tick, so that the score eventually reaches 60

spiral talon
#

basically in 3 seconds if am not mistaking

#

for other titles I do same things but add like 40 so when it reaches 100 it plays next time and so on

valid burrow
#

Yep

spiral talon
#

how do I make title fade in tho ?

valid burrow
#

That's what the times defines

#

Titles fade in and out normally anyway, but if their fade in/out times are set too low, it may be hard to tell

spiral talon
#

oh alright

#

Tyvm

#
scoreboard objectives add times dummy
scoreboard players add @s times 1

execute if score @s times matches 1 run title @s title {"color":"white","text":"Wake Up","bold":true}

execute if score @s times matches 60 run title @s title {"color":"white","text":"The World Needs You Now","bold":true}

execute if score @s times matches 120 run title @s title {"color":"white","text":"More Than Ever","bold":true}

execute if score @s times matches 180 run title @s title {"color":"white","text":"Who Do You Want To Be ?","bold":true}

execute if score @s times matches 240 run title @s title {"color":"white","text":"/trigger to select race","bold":true}

This works perfectly well now