1

Scoreboard problem?

phoenix1515 4/2/14 6:16 am
567
4/11/2014 7:32 am
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

execute @[score_medic_min=5] ~ ~ ~ effect @a[score_medic=2] 10 5 4

Can someone tell me how to fix this?
Posted by
phoenix1515
Level 30 : Artisan Dragon
17

  Have something to say?

JoinSign in

10

phoenix1515
04/11/2014 7:31 am
Level 30 : Artisan Dragon
The problem was that I used @p instead of @a, all thanks for the help
1
byBrutec
04/10/2014 2:55 pm
Level 64 : High Grandmaster Crafter
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

=]
1
phoenix1515
04/11/2014 7:32 am
Level 30 : Artisan Dragon
I don't need teams cause mobs are not players, its for MvM
1
phoenix1515
04/04/2014 10:36 am
Level 30 : Artisan Dragon
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
1
Jmal116
04/03/2014 3:47 pm
Level 34 : Artisan System
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]
1
Rum+
04/03/2014 7:15 am
Level 51 : Grandmaster Architect
what about rm=1?
1
phoenix1515
04/03/2014 6:41 am
Level 30 : Artisan Dragon
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...
1
Jmal116
04/03/2014 8:27 am
Level 34 : Artisan System
Well, assuming everyone else has a score less than 6, you could do thisexecute @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.
1
phoenix1515
04/03/2014 10:10 am
Level 30 : Artisan Dragon
Thats the exact command I was using, but it doesn't work...
1
Jmal116
04/02/2014 4:22 pm
Level 34 : Artisan System
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 forexecute @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?
1

Welcome