Jump to content

Photo

StartDialogue and Time Stop


2 replies to this topic

#1 Daxtreme

Daxtreme
  • Members
  • 120 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 09 March 2018 - 08:43 PM

hey guys,

 

you know that cowled wizard who has an auto-time stop when low hp?

 

well I'm trying to give her some dialogue before she leaves.

 

The problem is, it works... but not with Wait()

 

Here's her script, which is SCRIPT_CLASS just under override, which are just some SHOUTS

IF
	HPLT(Myself,15)
	!Global("TSFired","LOCALS",1)
THEN
	RESPONSE #100
		SetGlobal("TSFired","LOCALS",1)
		ReallyForceSpell(Myself,WIZARD_TIME_STOP)  // SPWI909.SPL (Time Stop)
		SmallWait(10)
		StartDialogueNoSet(LastSeenBy(Myself))
END

When I remove the wait, it works every time.

 

When I add the wait, it works... sometimes. If she's casting a spell when the time stop procs, for instance, she just skips the dialogue part entirely and keeps on chaining nasty spells.

 

Any way around this? Because I'd really like for it to be a delay before she starts speaking, but if the success rate is 50% then that sucks and I'll be forced to not do it :p Is Time Stop interfering with Wait()?

 

For those who are curious, here's what I'm working on:

Spoiler

 

 

edit: Also, I'm testing with SCS on right now. My script is installed last in weidu


Edited by Daxtreme, 09 March 2018 - 09:54 PM.


#2 Avenger

Avenger
  • Modders
  • 3805 posts
  • Gender:Male
  • Location:Hungary

Posted 12 March 2018 - 01:54 PM

Try moving SetGlobal("TSFired","LOCALS",1) after the smallwait.



#3 Daxtreme

Daxtreme
  • Members
  • 120 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 12 March 2018 - 04:46 PM

if I do that though, isn't there a risk that the Time Stop will fire twice?

 

What about using a timer?

 

Here's what I came up with: 

IF
	GlobalTimerExpired("zalladlg","LOCALS")
	!Global("zallaout1", "LOCALS",1)
THEN
	RESPONSE #100
	SetGlobal("zallaout1", "LOCALS",1)
		StartDialogueNoSet(LastSeenBy(Myself))
END


IF
	HPLT(Myself,15)
	!Global("TSFired","LOCALS",1)
THEN
	RESPONSE #100
		SetGlobal("TSFired","LOCALS",1)
		ReallyForceSpell(Myself,WIZARD_TIME_STOP)  // SPWI909.SPL (Time Stop)
		SetGlobalTimer("zalladlg","LOCALS",2)
		Wait(2)
END

The dialog seems to work all the time, however the Wait period is a bit unpredictable. Sometimes she waits, sometimes she doesn't :p 





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users