#Is there any ways to calculate players scoreboard?

1 messages · Page 1 of 1 (latest)

sterile mural
#

I want to make a system like this: if player 1 have a score of 3, and player 2 have a score of 4, a function should be executed when all values together add up to 7

open forge
#

Your scoreboard objectives name?@sterile mural

sterile mural
#

wave1

#

I want to make a wave system, i made it with one player, but when another player joins the world, the waves starts to duplicate

#

Each kill adds 1 wave point to the nearest player

open forge
#

Am eating. So wait a bit!

sterile mural
open forge
sterile mural
#

It's actually functions

#
execute at @a[r=256,tag=wave1,scores={wave1=5..}] run function coliseu/wave2
titleraw @a[r=256,tag=wave1] actionbar {"rawtext":[{"text":"Mate todas as criaturas: "},{"score":{"name":"*","objective":"wave1"}}]}
#

Thats the main function for wave1

#

After the player reaches 5 it will start wave2

#
tag @a add wave2
tag @a remove wave1
scoreboard players set @a wave1 0
open forge
#

Ok now am free

sterile mural
#

This is inside wave2 function

open forge
#

Wave1 was triggered by cmd block ?

sterile mural
#
scoreboard players add @a[tag=wave1,r=64] wave1 1
#

Entity death

sterile mural
#

After the player is sent to the arena, wave1 starts

open forge
#

Hmm are you even using cmd block?

#
  • cmd block and functions have a lots of difference in cmd . That's why am asking
sterile mural
#

It execute at players in a range of 256 blocks

sterile mural
#

That's what I always thought

open forge
#

Is that function is created by you?

sterile mural
#

I could replace it with command blocks, but it would be huge, because I plan to add 20 waves

sterile mural
open forge
#

Then forget about the cmds . Can you explain the details what do you want to happen in each situation.

open forge
#

Eg- if a player is on the radius to the cmd he want to run these cmd ,...

sterile mural
#

Imagine a wave system, each wave mobs spawns and you have to kill then

open forge
#

Step by step process. In each situation what gonna happen what not

sterile mural
#

After killing all of then, waves 2 starts

#

And that should continue

open forge
sterile mural
#

Zombies, skeletons, creepers etc

#

In wave 5 a boss will spawn at the center of the arena

open forge
#

So you can use a entity counter on mob . And if it reaches 0 the wave1 end wave2 start

sterile mural
#

Entity counter? How that works?

open forge
#

/scoreboard objectives add Count dummy
In chat
bao_cmd_repeat_unc
/scoreboard players reset @e[family=monster] Count
bao_cmd_chain_unc
/execute positioned x y z as @e[family=monster,r=<radius to x y z>] run scoreboard players add Hostile Count
This cmd can be used in a different way on function.

sterile mural
#

But that would work with more than one player?

open forge
#

It's count the entity on a radius and give that value to the dummy player

sterile mural
#

What is the dummy player? Never heard about it, at least I don't remember

open forge
#

Dummy player is on the scoreboard.
They are not players. But you can add /substrate values for them.

#

Do
/scoreboard objectives setdisplay sidebar Count
On chat

sterile mural
#

I'm opening minecraft

open forge
#

Invite me then 😂

sterile mural
#

That's a great idea

#

MrGAmEsYT6408 <- my gamertag

#

I'm creating a new world, the world with the addon takes too long to open

#

What is yours? so I can invite you

#

._.

open forge
sterile mural
#

Hey, thank you for helping me with this

#

I will let you know if the functions worked

#

Have a great night

open forge
sterile mural
#

It was 2am for me

#

I was so tired that I couldn't understand a thing you did

#

Now while I was adding functions I started understand it

#

Now I know how to keep it going, with that I can add infinite waves

#

You're a life saver

#

Thank you so much

sterile mural
#

Hey, I ran across another "problem", we didn't thought about what happens after the last wave, currently it just set the Count to 0, but when the count is set to 0 instantly the wave1 starts again

#

After the last wave, it should also teleport the player to the main lobby

#

I'm thinking of, instead of it setting the count to 0 after the reset, it run a function, that function would teleport the player and after that set it to 0

open forge
#

Then add the same cmd that used on wave but in this case tp player. And remove the end cmd that helps to go back to 0.