Unable to set name of villager

  • 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 comminuty!

    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.

pepper82

Member
Jan 26, 2017
272
1
18
41
I am trying to set the name of a villager or villager baby after I spawned it:

spawn 1 villager at player's location
set name of last spawned entity to "123"

It does not work!

Also tried

set display name of last spawned entity to "123"

Why?
 
version:
v2.2-dev25

code_language.skript:
command /testmob:
    trigger:
        spawn 1 baby villager at player's location
        set name of last spawned entity to "123"
[doublepost=1493558388,1493557852][/doublepost]Actually I am unable to see any names above villager's head. But it's not a resource pack issue (I dont use one). Is this a minecraft bug?
 
1.11.2 (Paper Spigot)

Well, now I see names above villagers. But only when manually placing a villager using a renamed spawn egg.

I am still unable to see names above villagers when spawning them using skript.
[doublepost=1493559249,1493558812][/doublepost]spawn 1 zombie
set {_last} to last spawned entity
broadcast "%{_last}%"

RESULT: zombie

spawn 1 villager baby
set {_last} to last spawned entity
broadcast "%{_last}%"

RESULT: <none>

Seems like a bug to me, but I need a solution for this until tomorrow. So any workarounds??
 
Have you tryied
code_language.skript:
spawn a zombie #location
set the display name of the last spawned zombie to "#cool name"
??
 
Try this.
code_language.skript:
command /testmob:
    trigger:
        spawn 1 baby villager at player's location
        set name of spawned entity to "123"
 
Status
Not open for further replies.