#I can't change an entity's scoreboard

1 messages · Page 1 of 1 (latest)

narrow sundial
#

I am creating a mod that has an entity, this entity starts with a scoreboard called pinata_test_appeae set to 0, the entity detects how many dirt blocks are around it, if it has 30 dirt blocks or more it executes a command that sets the scoreboard pinata_test_appear to 1, when pinata_test_appear is at 1 it spawns an entity, in this entity when it is spawned it executes a command that sets the pinata_test_appeae scoreboard to 2, I did this to avoid more than one entity being spawned. everything was working fine but when i went to test a new version, and for some reason it doesn't work anymore the entity is summoned but the scoreboard is not set to 2 and when i used setdisplay scoreboard i noticed that the pinata_test_appeae scoreboard was not changing and it was always at zero (scoreboard was changing in old versions)


execute as @s if score @s pinata_test_appear matches 0 run execute as @e[type=test:arc] if score @s dirt matches 30.. run scoreboard players set @e[type=test:req] pinata_req1 1

execute if entity @s[scores={pinata_req1=1}] run scoreboard players set @s pinata_test_appear 1

execute as @s if score @s pinata_test_appear matches 1 run summon test:pinata_test 10 -60 0```

test:arc is the entity that detects dirt blocks

test:req is the entity that executes the commands mentioned above

test:pinata_test is the summoned entity

```scoreboard players set @e[type=test:req] pinata_test_appear 2```

^ This is the command pinata_test runs when it spawns

As you can see in the image, the entity does not stop being summoned
slow vapor
#

Maybe use this
bao_cmd_repeat_unc
Execute as @e[type=test:arc] run testfor @e[type=item,name=dirt,r=2]
bao_cmd_chain_con
Execute as @a at @s run scoreboard players add @e/@a/@p/@s <score> 1

If not work pls ask me again

glad magnet
#

If everything was working before then, the first thing I would do is to change the name of that longer scoreboard to something that's under 16 characters. Try that because I found that certain things over 16 characters do not work right

narrow sundial
narrow sundial
glad magnet
#

since it did not change values, have you confirmed that it is making it into this function? Is this a function or in command blocks?

narrow sundial
#

It's a function.

What do you mean by "have you confirm that it is making it into this function?"

If you want to know is if the commands in the function are being executed, well a part of the command is.

glad magnet
#

okay, so what was the version change you are talking about... from 1.19.83 to 1.20.0?

narrow sundial
#

The mod version, I changed something in the mod and downloaded the new version and from 1.0.0 it went to 1.0.1

glad magnet
#

Downloaded?

narrow sundial
#

I'm using bridge to make the mod so for me to get a new version of my mod I have to download it (I feel like there's an easier way to test mods instead of downloading them all the time).

glad magnet
#

I do not use bridge, so I am not familiar with the process, but I do know that if your BP folder is inside development_behavior_packs and your RP inside development_resource_packs then it is just a matter of opening/closing the world. I thought bridge automatically had your folders in those locations.

narrow sundial
#

I found it, I have to link my bridge folder to the mojang

#

Nevermind, it's only for the pc version

glad magnet
#

So I take it you are on a phone?

narrow sundial
#

Yep

glad magnet
#

You may want to connect with others on this discord who use bridge on a phone. I have never heard your complaint before, so maybe there are solutions.

narrow sundial
#

Hmm

glad magnet
#

about having to download.

narrow sundial
#

Ah, the download is not a problem, that's how it works

glad magnet
#

But something changed versions..tho not sure how that is a problem... but somehow it is. Are you sure you do not have 2 cached versions of the pack

#

I would do somthing to the function file, have it say something so that I know for sure it is running it, that particular one

narrow sundial
#

In the behavior and resource minecraft storage I can only see one, and when I download a new version the bridge updates the mod version automatically

narrow sundial
#

I put a say command in the function and it seems to work

narrow sundial
narrow sundial
#

I have tested recreating the function using command blocks and it works the way it should if the command
execute if entity @s[scores={pinata_req1=1}] run scoreboard players set @s pinata_appear 1
is conditional.

Do the commands run in order? Maybe if I change their order the command might work

narrow sundial
#

Did not work.

I think the reason why pinata_appear is always at 0 even when there are other commands setting the scoreboard to 1 or 2 is because pinata_req1 is being set to 0 every second and when pinata_req1 is at 0, Pinata_appear will also be at 0

#

It wasn't, it's still the same thing, always stuck at zero but every now and then flitting the number 1 but always managing to spawn the entity even if the number 1 doesn't appear

narrow sundial
#

Fixed...

#

I just had to have changed the set to add in a command that I didn't show