Posted January 14, 20178 yr So yeah, i want to have an NPC that can change skins, lets say, when attacking. I have 2 skin files, 1 normal and 1 attacking skin. Is it possible?
February 16, 20178 yr Author im using MC 1.8 idk what mod version im using Edited February 16, 20178 yr by PigzKing
July 9, 20178 yr Try this Javascript example: var defaultSkin = "customnpcs:textures/entity/humanmale/mercenarysteve 2.png"; var attackSkin = "customnpcs:textures/entity/humanmale/magesteve.png"; function target(event) { event.npc.getDisplay().setSkinTexture(attackSkin); } function targetLost(event) { event.npc.getDisplay().setSkinTexture(defaultSkin); } Just replace the texture-paths with the two you want to use.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.