I can't seem to figure out how to make my npc function like a chest that gives you the gold sword. this is what I'v come up with so far:
NPC Code:
// NPC made by Pants
if (created) {
setimg goldchest.png;
}
//#CLIENTSIDE
if (playertouchsme) {
lay goldensword;
setimg goldchest_open.png;
destroy;
}
Thanks for your help I'm very new to this.
I also have it glowing so I want to make it stop glowing when It gives up the gold sword. Heres the script for the glow:
NPC Code:
// NPC made by Stefan Knorr
if (created) {
setimg light2.png;
dontblock;
}
//#CLIENTSIDE
if (playerenters) {
setcoloreffect 1,1,,0.25;
drawaslight;
}