Something like this:
Probably add a check for tiles or whatever to make sure only that NPC targets the playerCode:for (NPC npc : World.getNPCs()) { if (npc.getId() == idhere) { npc.setTarget(player); } }
|
I'm trying to make the NPC attackl the player after a certain option is chosen in dialogue.
How ould i go about doing that?
Code:@Override public void run(int interfaceId, int componentId) { switch(stage) { case -1: sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE, "Let's fight!", "Nothing."); stage = 0; break; case 0: switch (componentId) { case OPTION_1: sendPlayerDialogue(Mood.NORMAL, "Let's fight!"); stage = 1; break; case OPTION_2: sendPlayerDialogue(Mood.NORMAL, "I want nothing. Goodbye."); stage = -2; break; } break; case 1: //add Barbarian attack me here end(); break; default: end(); break; } }
Something like this:
Probably add a check for tiles or whatever to make sure only that NPC targets the playerCode:for (NPC npc : World.getNPCs()) { if (npc.getId() == idhere) { npc.setTarget(player); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |