
Anyway, I've gotten as far as writing a NPC and writing usecode for him. I've just done a barebones function for now, that I'll expand on once I get it working. The code compiles fine, but Exult segfaults when I try to initiate a conversation with him (event == 1). The function gets run and exits normally on an event of 0, however.
Here's the message I get:
Running usecode 0401 () with event 1
Segmentation fault
I believe it is crashing on the "say( "Hello..." );" line, but I don't know why. Any ideas?
The usecode function I wrote appears below.
-Karl
---
Narrator 0x401 ()
{
if( event == 0 )
{
// no-op for now
return;
}
else if( event != 1)
return;
UI_show_npc_face( item );
say( "Hello..." );
UI_add_answer( "Bye" );
converse
{
if( response == "Bye" )
break;
}
UI_remove_npc_face( item );
}