Redstone scoreboard allowing students to trade xp or level for team points.

52 views
Skip to first unread message

Sunnyside12

unread,
Nov 12, 2015, 11:23:13 AM11/12/15
to Minecraft Teachers


Greetings everyone! I have been working on creating a system of team points. My thoughts are to make it similar to Harry Potter House Points but streamline it so that students can redeem xp for team points. Team points will be displayed on the sidebar. I created teams based on students table groups (Table1, Table2,.....Table7.) Each team is assigned a color and I changed the display of student names to their team color. I have command blocks programmed to assign students who push a button to a corresponding group. Now I am trying to create a command block system that will allow the student to trade xp, earned in educational quests, for team points. My thoughts are to utilize the /testfor command but it doesn't seem to be cooperating. Here is what I have done:

I have a button leading to a command block with redstone. The first command block has command of :/testfor @p[lm=1]

There is a redstone comparator behind it pointing towards the next block whose command is /xp -1L @p followed by a redstone repeater and the final command block

with a code of /scoreboard players add GoldTeam TeamScore 1


<Color>Team is the name of the "fake" player assigned to each group to give the objective points to so they display in the sidebar.

TeamScore is the name of the objective points that is displayed in the sidebar. 

 

The process after the /testfor works just fine. When I try to use the button previous to the test for the comparator seems to get stuck. Any thoughts on what I am doing wrong? I am using the CustomNPC mod, which I need to keep using or else figure out a whole other team point system if it is a conflict. 

EduElfie

unread,
Nov 12, 2015, 5:33:31 PM11/12/15
to Minecraft Teachers
I have had this problem several times, the command block that is doing the testfor needs to be triggered again when there is not someone with >1 level for the comparator to turn off, this will then allow the process to go through again..... Basically you need a delayed signal going back to the testfor block, but you also need to ensure that there is not a player at the location you are testing with >1 levels. If you are going to only take down 1 level at a time and a student has 10, that is going to cause you an issue.

As a fix, a messy one, but a fix none the less, I would be using a testfor at a specific location, and then as part of your string after the testfor teleporting the person at those coordinates off that location and it is after that teleport you need to trigger the testfor block again to clear the comparator state before anyone else can get to that location.

Another suggestion would be a 'loop' of metal doors, as students go through each metal door they lose one level, it gets added to their team, when they have no levels left the get teleported out of the 'loop' of doors. But again you need to ensure only one person is in your loop at any given stage.

Elfie.

Michael Harvey

unread,
Nov 12, 2015, 6:19:33 PM11/12/15
to Minecraft Teachers
I created something similar once that may help. In my world, dummy players named for the teams scored a point any time a player on the corresponding color team died. Perhaps you could substitute in an experience level of 1? My system works with a clock, so it is not triggered with a button. I tried to keep the entire thing close enough to spawn at it would stay loaded. I attached screenshots.

I had the following variables:
playerDeaths - deathCount
playerDeaths2 - dummy
teamDeaths - dummy


The command block and 3 wool in the foreground make up the clock. The command is:
testfor @a[score_playerDeaths_min=1,team=Blue]      // Try  replacing with lm=1

The background CBs do "the math" automatically. Going counter-clockwise, starting from the bottom, the commands are:

/scoreboard players remove @a[score_playerDeaths_min=1,team=Blue] playerDeaths 1       //This removes the death from the deathCount variable.  You could do /xp -1L @a[lm = 1]
/scoreboard players add @a[score_playerDeaths_min=1,team=Blue] playerDeaths2 1           // This adds a point to the dummy variable for individual scores. You may not need it.
/scoreboard players add BlueTeam teamDeaths 1                     // This adds a point to the team score

If I setDisplay to playerDeaths2, I can see individual scores, even though the deathCount variable will just keep going back and forth between 0 and 1.
If I setDisplay to teamDeaths, I can see the total accumulated deaths per team.

I'm not sure if this will give you the solution you want but it's another approach that might be worth exploring. Good luck,
Mike
2015-11-12_17.37.53.png
2015-11-12_17.38.03.png

Sunnyside12

unread,
Nov 13, 2015, 11:40:13 AM11/13/15
to Minecraft Teachers
Thanks everyone! I am going to dive back in today and hopefully using your expertise get it working. I appreciate all the feedback. I'll let ya know if I get it going.
Reply all
Reply to author
Forward
0 new messages