Jump to content

script request - make npc disappear after dialogue


lowleveledclutter

Recommended Posts

so i've tried to .disable my npc through scripts in topics - game just crashes. i thought it is because i've tried to .disable him while still talking to him, so i tried to make him .cast a spell on himself to create a delay, but that too didn't work. and there's so many types of scripts and so many places to write them into i don't even know if it's possible to be done the way i'm trying to do it.

Link to comment
Share on other sites

Perhaps create a dummy quest and use a quest script like this:

 

scriptname NPCDelayedDisappearanceScript

short ReadyToDisappear
long TimeElapsed

BEGIN GAMEMODE

if ( ReadyToDisappear == 0 )
	Return
endif

set TimeElapsed to TimeElapsed + GetSecondsPassed

if ( TimeElapsed > 30 )
	MyNPCRef.disable
	set ReadyToDisappear to 0
	StopeQuest DummyQuestName
endif

END
In your GOODBYE topic, set ReadyToDisappear to 1 and then the quest script will do something 30 seconds later (or whatever period you choose).
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...