23 lines
904 B
Plaintext
23 lines
904 B
Plaintext
//debugging
|
|
//AssignCommand(GetItemActivator(), SpeakString("Firing Module Event"));
|
|
void main ()
|
|
{
|
|
if(GetItemActivated() == GetObjectByTag("TalkingSword"))
|
|
{
|
|
//get object that activated item
|
|
object oActivator = GetItemActivator();
|
|
|
|
// some speech (for debugging too)
|
|
//AssignCommand(oActivator, SpeakString("Hi! I'm the sword."));
|
|
|
|
//create TalkingSwordAvator object
|
|
//ActionJumpToLocation and JumpToLocation don't seem to work with placeable objects...
|
|
object oSwordAvatar = CreateObject(OBJECT_TYPE_PLACEABLE, "talkingsworda001", GetLocation(oActivator), FALSE);
|
|
|
|
//for some reason if I swap oActvator and oSwordAvatar around it doesn't work.
|
|
AssignCommand(oActivator, ActionStartConversation(oSwordAvatar, "", FALSE));
|
|
|
|
//In the conversation script when the conversation ends, I destroy the object
|
|
|
|
}
|
|
} |