#auto compact
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1722532134: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
Run the function as all players
and how ?
execute as @a run function YOUR FUNCTION
as @a does it as all players
you can filter players who this applies to by giving them a tag
and changing @a to @a[tag=YOUR TAG]
So I want you to be able to activate or deactivate the function using a book
Ok, that's a totally different question then
As I do comands with books, I just don't know how to activate or deactivate it
This is 3 things at once:
- make one item from a full stack
- execute a ticking function as all players (with a tag)
- provide a book interface for each player to tag themselves
All of these can be tackled on their own. I highly suggest you start with one and then tackle the others
Id implore you to start implementing one of those and ask questions upfront or when you’re stuck, not for all 3 things at once
Hoe I can make each player to Tag themselves
Based on PuckiSilver's guidance, probably a click event in a book
And how I can make an Player Tag
You can add/remove tags for any entity using the /tag command
tag <targets> add <name>
Adds a tag to the targets.
tag <targets> list
Lists all tags on the targets.
tag <targets> remove <name>
Removes a tag from the targets.
Then you can check it in selectors
@e[tag=<name>]
In books you can make clickable text that runs commands using regular json text components
This is a nice richt text generator:
Minecraft Tools has a really intuitive and easy GUI editor for JSON text and tellraw editor which makes creating nice-looking tellraw messages super easy
But if you simply run the tag command in the book, only people with operator rights will be able to use it
So you need to use /trigger and trigger scoreboards
I Hage this scoreboard
To add a trigger scoreboard, just use trigger as the scoreboard criteria
scoreboard objectives add <name> trigger
scoreboard players enable @a axenetherite
execute as @a[scores = {axenetherite = 1..}] run function pack:upgrade/axenetherite
Then you need to enable it for all players, you can do that in a tick function for now
scoreboard players enable @a <name> (I think?)
And yea, you can react to it like that
@?[scores={…}] or execute if score …
Oh and the command in the book has to then be /trigger <name> set <value>
But how can the players give themselves a day?
Give a day? You mean only be able to run it once a day or what?
i mean tag sry
Ah
- run trigger command through book
- react to the specific value in tick function
- tag any player with trigger score at specific value
2 and 3 here are pretty much 1 command
Do I have to make a separate book entry for each player?
No
The book has a command to set the trigger value - let’s say to 3
Then, in tick you react to any player, that has that value set to 3
And if that’s the case - do the tag logic
A scoreboard value always has a score holder, a score board and a value
For trigger, the score holder is always the player triggering it
how i make all this in commands
i will make this like that 2:26 but with a book https://www.youtube.com/watch?v=bPFPUGorD5Y
✘ Meine Bücher & Equipment: https://amzn.to/2qB4qnY
● Werde Kanalmitglied: https://bit.ly/2ULNREl
✘ Spark Merch Shop: https://teespring.com/de/stores/sparkofphoenix
● Social Network Links:
📌 Kanal Abonnieren: http://bit.ly/VN5L5A
📷 Instagram: http://bit.ly/2grHigT
⏰ TikTok: https://bit.ly/3eAZzsA
🐦 Twitter: http://bit.ly/QO9Vai
📘 Facebook: http...
You need a load function
Create the scoreboard in the load function
You need a tick function
You need to give the player/let the player craft the book
You need to enable the score in tick
You need to react to the score
scoreboard objectives add stone_compact trigger
scoreboard players enable @a stone_compact
execute as @a[scores = {stone_compact = 1..}] run function pack:cobblecompact
say ello
what does the function do you call? what scoreboard is the "Level" scoreboard?
tag @s add cobble_compact
How can I give the tag to the player who wants to activate it tag @a add cobble_compact
How can I do if a player has 64 items in their inventory, they are deleted and he gets 1 new item?
?
anyone here?