Advertisement
Skylinerw

@thejarren - Defaulting Entity Scores

Apr 7th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Since entities aren't automatically tracked on scoreboards (they don't even default to 0), you'll have to insert them manually. Setting them to 0 using the "set" method won't be useful since their score would only ever be 0. However, you can use the "operation" method to get around this without hurting the actual score itself.
  2.  
  3. Semi-Required objective (personally I would use this objective solely for math-based functions, but you can use pre-existing objectives):
  4.  
  5. /scoreboard objectives add MATH dummy
  6.  
  7. Required fake player to track:
  8.  
  9. /scoreboard players set #ZERO 0
  10.  
  11. And then your operation method to track entity scores (does not affect any outcomes as you're merely adding 0):
  12.  
  13. /scoreboard players operation @e[type=Creeper] OBJECTIVENAME += #ZERO MATH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement