Stream
01-03-2008, 04:29 PM
I've created a trigger to fire a script to make an NPC walk to the PC and start a conversation. The trigger is set up fine but I'm having some trouble with the script.
This is the script;
void main() {
object oNPC=GetObjectByTag("Deadly_IC_Sul_1");
object oPC=GetFirstPC();
int bRun=FALSE;
if (GetJournalEntry("deadlyictra")==70);
return;
vector MoveTo = GetPosition(oPC);
location lExit=Location(MoveTo,0.0f);
ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionForceMoveToLocation(lExit,bRun));
AssignCommand(oNPC, ActionStartConversation(GetFirstPC(), "", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0));
}
How it is there, the script won't fire - but if I remove the part about a journal entry the script will then fire. Obviously I need to keep it in as I don't want the trigger to fire the script unless the quest is at the right entry.
The script complies fine whether the journal entry part is in or not.
If anyone's got any ideas I'd really appreciate it as I can't for the life of me think what the problem is.
Kind Regards
--Deadly Stream
This is the script;
void main() {
object oNPC=GetObjectByTag("Deadly_IC_Sul_1");
object oPC=GetFirstPC();
int bRun=FALSE;
if (GetJournalEntry("deadlyictra")==70);
return;
vector MoveTo = GetPosition(oPC);
location lExit=Location(MoveTo,0.0f);
ActionDoCommand(SetCommandable(TRUE,oNPC));
AssignCommand (oNPC,ActionForceMoveToLocation(lExit,bRun));
AssignCommand(oNPC, ActionStartConversation(GetFirstPC(), "", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0));
}
How it is there, the script won't fire - but if I remove the part about a journal entry the script will then fire. Obviously I need to keep it in as I don't want the trigger to fire the script unless the quest is at the right entry.
The script complies fine whether the journal entry part is in or not.
If anyone's got any ideas I'd really appreciate it as I can't for the life of me think what the problem is.
Kind Regards
--Deadly Stream