1
Scoreboard problem?
I'm working on a Mann vs Machine map for Minecraft, but while testing the Medigun I found a problem I couldn't solve: The Medigun can't heal nearby players, but the medic can heal himself if I change "@a[score_medic=2]" to "@a[score_medic=6].
Here is the main command thats used, the scoreboard "medic" is a dummy objective, the player who plays as medic has a "medic" score of 6. This command is activated by a hopper clock and the command block automaticly refreshes itself when the command is used succesfully
Can someone tell me how to fix this?
Here is the main command thats used, the scoreboard "medic" is a dummy objective, the player who plays as medic has a "medic" score of 6. This command is activated by a hopper clock and the command block automaticly refreshes itself when the command is used succesfully
execute @[score_medic_min=5] ~ ~ ~ effect @a[score_medic=2] 10 5 4Can someone tell me how to fix this?
10
The problem was that I used @p instead of @a, all thanks for the help
also you could use somthing like this :
execute @a[score_medic_min=1,score_medic=1] ~ ~ ~ effect @a[r=5,score_medic_min=0,score_medic=0] 10 5 4
so the intern things:
everybody with the score for medic=1 --> is the medic
everybody with the score for medic=0 --> is not an medic
also you should add the teams to it so they cant heal enemies!
execute @a[score_medic_min=1,score_medic=1,team=blue] ~ ~ ~ effect @a[r=5,score_medic_min=0,score_medic=0,team=blue] 10 5 4
=]
execute @a[score_medic_min=1,score_medic=1] ~ ~ ~ effect @a[r=5,score_medic_min=0,score_medic=0] 10 5 4
so the intern things:
everybody with the score for medic=1 --> is the medic
everybody with the score for medic=0 --> is not an medic
also you should add the teams to it so they cant heal enemies!
execute @a[score_medic_min=1,score_medic=1,team=blue] ~ ~ ~ effect @a[r=5,score_medic_min=0,score_medic=0,team=blue] 10 5 4
=]
I don't need teams cause mobs are not players, its for MvM
I don't think that will work cause its now executing the command on the nearest player with a score of 6 or higher, so all players with a score of 6 or higher (whats never more than one player) should not make much difference
Well, it looks like a lot of time could have been saved if I actually looked at your command closer Assuming that you just copy/pasted the command into PMC, then you're missing a player argument at the beginning. Currently you have /execute @[score_medic_min=6], but it should be /execute @a[score_medic_min=6]
what about rm=1?
Yes, thats what I wanted, forgot to add the range, but I do not want the medic himself to get the effect, but then it doesn't work anymore...
Well, assuming everyone else has a score less than 6, you could do this
execute @a[score_medic_min=6] ~ ~ ~ effect @a[r=5,score_medic=5] 10 5 4Since score_medic=5 searches for anyone with a score 5 or below, it would effect anyone else on the map, but not the medic himself, since his score is 6.Thats the exact command I was using, but it doesn't work...
What are you trying to make happen here? What essentially should happen with the current command is that whenever someone with a score of 5 or above is found, a command is executed that gives everyone on a the map with a score of 2 or above the effect.
If you want it to heal everyone within a certain radius, then this command would be what you're looking for
If you want it to heal everyone within a certain radius, then this command would be what you're looking for
execute @a[score_medic=6] ~ ~ ~ effect @a[r=5] 10 5 4This will give everyone within 5 blocks of the medic the potion effect, is this what you wanted to do?
