Solved I want to make an item that scans enemy HP

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Idiosyncratic

Member
Feb 21, 2017
62
0
0
USA
I'm having trouble making an item that scans enemy HP. This is my current code:

on right click on entity:
player is holding a book named "&2Scan"
player has 3 redstone
send "&dEnemy has &c%{clicked entity health}%/%{clicked entity max health}% &dhealth." to player

What am I doing wrong?
The message shows up as "Enemy has <none>/<none> health."
 
remove the { } from %clicked entity health% and %clicked entity max health%
expressions don't use those brackets only variables do

also the expressions might be %clicked entity's health% and %clicked entity's max health%
I haven't tested them but that seems about right
 
Last edited by a moderator:
  • Like
Reactions: Idiosyncratic
Thank you for that, but how do I make it show it in HP rather than hearts?
 
Oh yes sorry, I want to make it show not in hearts, but in the actual HP variable.
 
2017-02-21_20.17.58.png
2017-02-21_20.17.47.png
 
Status
Not open for further replies.