I don't think that PI's forced chat for npcs works properly, I had to redo mine.
|
Ok.. I'm very new, and I finally got an NPC to say something above it's head!
The problem is, I really want to make it say more than one thing, and on a timer, cause right now, it chats and the text never disappears or changes. This is what I have in NPCHandler.java (P.I):
if (npcs[i].npcType == 81) { //NPC ID here.
npcs[i].forceChat("Moo.");
}
Once again I'm very new to coding, so please be nice. If you could write me out how to make the messages timed and how to add more than one message it'd be greatly appreciated! Thanks!
I don't think that PI's forced chat for npcs works properly, I had to redo mine.
Code:if (npcs[i].npcType == 81) { //NPC ID here. int cowChat = Misc.random(3); switch(cowChat) { case 1: npcs[i].forceChat("Moo."); break; case 2: npcs[i].forceChat("I wish I was a dog"); break; case 3: npcs[i].forceChat("Wait I speak english and understand thought process?"); break; default: npcs[i].forceChat("Come at be bro!"); break; } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |