Aller au contenu

Photo

conversation oddness


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
i have two NPC's that both have conversations attached to them. It's possible to initiate conversation with the closes npc, UNLESS the player runs away into a room a bit away and comes back, then that NPC is unresponsive. The other NPCs conversation doesn't fire at all. When i put a new NPC in another closer to the first NPC i could initiate conversation with him. Also conversations can only be initiated once and after that the NPC turns unresponsive. .

#2
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
there seems to be something wrong with the script i've put in the module. When i changed back to module_core the conversation system worked fine again. Not sure whats wrong with the code. suppose this should be in the script forum though.

#include "events_h"
#include "global_objects_h"
#include "utility_h"
#include "sys_chargen_h"
void main()
{
//keep track of whether the event has been handled
int nEventHandled = FALSE;

event ev = GetCurrentEvent();
switch(GetEventType(ev))
{
case EVENT_TYPE_MODULE_START:
{
// preloads resources needed for character generation
PreloadCharGen();

// initiates character generation
StartCharGen(GetHero(),0);



break;
}
case EVENT_TYPE_CHARGEN_END:
{

object oHero = GetHero();



Chargen_ClearInventory(oHero);
EquipItem(oHero, UT_AddItemToInventory(R"clothes.uti"));

break;
}


}


// if this event wasn't handled by this script fall through to the core script
if(!nEventHandled)
{

HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}

}

Modifié par gordonbrown82, 07 janvier 2010 - 06:51 .


#3
gordonbrown82

gordonbrown82
  • Members
  • 544 messages
oh i get it now sorry for bothering you folks.