Jump to content

Script triggering intermittently?


Recommended Posts

I've tried to extended a AR1900.bcs with the following code, but on Tazok's death, Kivan's dialog block is intermittently (unpredictably) being triggered...

IF
InParty("Kivan")
Global("CanKillTazok","GLOBAL",0)
HasItem("MIHP1","Tazok")
THEN
RESPONSE #100
SetGlobal("CanKillTazok","GLOBAL",1)
ActionOverride("tazok",DestroyItem("MIHP1"))
END

IF
Global("FoughtTazok","GLOBAL",0)
HPPercentLT("Tazok",50)
THEN
RESPONSE #100
ClearAllActions()
StartDialogueNoSet([PC])
END

IF
InParty("Kivan")
!Dead("kivan")
Dead("Tazok")
Global("TazokDead","GLOBAL",0)
THEN
RESPONSE #100
Wait(2)
ActionOverride("Kivan",StartDialogueNoSet([PC]))
SetGlobal("TazokDead","GLOBAL",1)
END

I have similarly added the following to Kivan's dialog file

APPEND ~KIVANJ~

IF WEIGHT #-1 ~

Global("TazokDead","GLOBAL",0)~ 
THEN BEGIN TazokDead
SAY #32796 //It is done. Deheriana, amin liy, esta aul i' haly en' Arvandor. May you find peace... and I find acceptance.
IF ~~ 
THEN DO ~
EraseJournalEntry(32894)
EraseJournalEntry(27212) 
EraseJournalEntry(32760) 
AddJournalEntry(%Kivan's bandit hunt 
Kivan was finally able to avenge his wife. May Deheriana find peace and Kivan find acceptance.%,QUEST_DONE)
SetGlobal("TazokDead","GLOBAL",1)
SetGlobal("bd_tazok_dead","AR0125",1)~ 
EXIT
END
END

I have attached the relevant files for review, any assistance would be greatly appreciated.

Cheers,

a.

Setup-Kivan.tp2 AR1900.baf Kivan.d

Edited by a.greene
Link to comment

Presumably, FoughtTazok is meant to be set by the dialogue that block starts ... but who's talking? This is an area script; if you want a specific character to talk (or to stop acting), you need an ActionOverride.

And of course, if that block is triggering repeatedly and telling nobody to talk, the following block with Kivan's response to Tazok's death is never reached.

TAZOK.BCS, in the original, contains this block:

IF
	Global("FoughtTazok","GLOBAL",0)
	HPPercentLT(Myself,50)
THEN
	RESPONSE #100
		ClearAllActions()
		StartDialogueNoSet([PC])
END

It looks like you've tried to move this to the area script, but it doesn't work properly when run from a neutral perspective.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...