0

Make skeletons shoot only at specified scoreboard team


I am trying to make a tower with skeletons. The skeletons in the tower will shoot at every player they see. The problem: I want only 1 group of skeletons (not @e[type=Skeleton]) to shoot at scoreboard team, called team1, for example. If we have a second team, called team2, for example, the skeletons MUST NOT attack them.

Note

I am doing this on a 21 core server, which has anti clock - you can not run clock redstone!

  • You still can run clock redstone, you jsut put 2 hoppers aiming into each other and put one thing into them and place comparator to one of them. Bingo you have (maybe slow) clock that won't be affected by those silly plugins xD – Antoine Hejlík Feb 11 '17 at 12:02
  • @AntoineHejlík this is what I am currently using for clocks ;-) (there is even one more way), and the plugin isn't that stupid. It is part of a big project I develope and it reduces so much lag + physical server proccesses – Zefir Zdravkov Feb 11 '17 at 16:28
1

Based on the the information you've provided, you should be able to /summon the skeletons or use the /entitiydata command and add Team:"(team2)" to their attributes. The skeletons don't attack players on the same team as them, so they'd only attack people on team 1 (assuming you only have 2 teams, this should work fine).

  • What is the right command syntax for 'entitydata' ? And the query selector must obtain a group of 5 skeletons, and if a sceleton got hurt by one from its team, it should ignore it. – Zefir Zdravkov Feb 13 '17 at 5:23
  • I wouldn't use entitydata to add an entity to a team, I'd use /scoreboard teams join <team> @e[type=skeleton,tag=<tag>] to make all skeletons with the tag <tag> join <team> – Venya Feb 13 '17 at 21:52
  • Yeah, I tried the scoreboard command, but it didn't work for me. Said it only allowed players. The syntax for should be /entitydata @e[type=skeleton,tag=<tag>] {TeamName:"team2"}. If the scoreboard command works, my bad. – Caleb Feb 13 '17 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.