• Hey! Register here to create your account, engage with the community, and talk about what is new!

How do I make random custom death messages?

realRoforbYT

Forum adept
Joined
Oct 6, 2020
Messages
254
Reaction score
31
I want to add custom random death messages to Upgrade PvP but I don’t know how.
 
Solution
- Create a list named deathMessagesList when a player joins, and put every text variable in the chest that you want to use (write %killer and %victim instead of player names)
- On a player kill event, sort the list randomly and store the value at the first index of it in a variable (name it deathMessage for example), then send the variable to every player as a message
- Done

Jimmy_The_Knight

Well-known member
Joined
Dec 28, 2020
Messages
73
Reaction score
32
- Create a list named deathMessagesList when a player joins, and put every text variable in the chest that you want to use (write %killer and %victim instead of player names)
- On a player kill event, sort the list randomly and store the value at the first index of it in a variable (name it deathMessage for example), then send the variable to every player as a message
- Done
 
Last edited:
Solution

EvilsSouls

Forum adept
Overlord
Joined
Apr 16, 2021
Messages
208
Reaction score
18
or if you want a death massage out of vanilla you can also get a game value, and in event values there is death massage, you could use it as a death massage, but i would do it fancyer by doing set var text, do completeDeathMassage in the chest, a text that has &4 or whatever you want it for a color to be, and after that the game value in the chest. Than send Massage all players and the var completeDeathMassage. That would do that always when a player dies (if you put it in player event death) than the vanilla massage would pop up in chat.

NOTE: For it to do it with all death do it in the player event death, and player kill player event
 

silvxrcat

New member
Joined
Feb 9, 2021
Messages
15
Reaction score
5
- Create a list named deathMessagesList when a player joins, and put every text variable in the chest that you want to use (write %killer and %victim instead of player names)
- On a player kill event, sort the list randomly and store the value at the first index of it in a variable (name it deathMessage for example), then send the variable to every player as a message
- Done
or %index(deathMessagesList, 1)
 
Top Bottom