1

Objective minimum value help

Jnaejnae's Avatar Jnaejnae8/10/15 1:37 pm
1 emeralds 186 6
8/10/2015 5:50 pm
Jmal116's Avatar Jmal116
Im making a minigame, and it has classes. The way I set it up currently is that you pick your team, which only teleports you to the class room of the desired team (a or b). Then when you select a class it actually joins you to a scoreboard team made specifically for that class and team. Then you go to your team colours room from there. When both teams are ready, I have commands that give to people only of one class each, remove everyone from their class scoreboard teams, and then I assign everyone in room a to team a, and room b to team b.

I notice that you lose some class specific effects when you die, even with keep inventory on. I cant just have another clock to constantly apply the effect, because now the classes are all in one team so there is no way to identify one class from another. I need every class to be in the same scoreboard team during gameplay or else I cant disable friendly fire and the way win detection works isnt compatible. You cant be in more teams at once, so I was wondering if you can have MULTIPLE OBJECTIVES. I use objectives to keep score, so this idea wont work at all if you cant have more than one objective. I was thinking that I would set an objective to 1 when someone chooses a class, a separate objective for each class. That way I can reapply class effects when a person dies.

The help I need is that I know if you want a command to only effect one team you can do /command @a[team:(team)] However is there anyway I can do the same thing? Is there an objective tag that works like this one? If not maybe and execute or testfor command could work just as well as long as it does what I wish without messing up my game. The help would be appreciated.
Posted by Jnaejnae's Avatar
Jnaejnae
Level 38 : Artisan Architect
268

Create an account or sign in to comment.

6

Jmal116
08/10/2015 5:50 pm
Level 33 : Artisan Engineer
Jmal116's Avatar
Yes, you can have multiple objectives in your world. I've got like 30 in mine from various things.

Also, keep in mind that just using score_obj_min=# will target anyone with a score above that, so you will end up targeting multiple different classes. If you want to test for exactly a certain score, combine it with score_obj=#. For example:effect @a[score_obj_min=2,score_obj=2] <effect>Will give the effect to the class with a score of two. Those with a score of 1 or 3 will not get the effect.
1
ZachDevv
08/10/2015 5:37 pm
Level 18 : Journeyman Mage
ZachDevv's Avatar
I'm not 100% sure if this is what you were looking for, but I found this tutorial on how to make classes with scoreboard objectives. (Sorry I wasn't of much use, but I'm not too good with commandblocks!)
http://www.reddit.com/r/Minecraft/comments/1cm91i/tutorial_complex_questsclasses_with_scoreboard/
1
Bertiecrafter
08/10/2015 1:49 pm
Level 70 : Legendary Engineer
Bertiecrafter's Avatar
first off its @a[team=(team)]

secondly...
use score_(Objective)_min=#...

for ex /execute @a[score_objective_min=1] ~ ~ ~ /effect (effect)
1
Jnaejnae
08/10/2015 5:32 pm
Level 38 : Artisan Architect
Jnaejnae's Avatar
Thanks, pretty sure it worked. Now I gotta test run it ;p
1
Jnaejnae
08/10/2015 2:10 pm
Level 38 : Artisan Architect
Jnaejnae's Avatar
First off, I kinda knew that. Musta been a typo. I use the = symbol in my command blocks so its working fine.

secondly thanks for the good help. I will test it out and update you if it worked
1
Jnaejnae
08/10/2015 1:40 pm
Level 38 : Artisan Architect
Jnaejnae's Avatar
Basically I want a /execute (if "objective x = minimum of 1} then /effect (ect.)
I already have a redstone signal emitting when someone dies so it wont be hard to implement.
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome