Daxtreme Posted March 10, 2018 Posted March 10, 2018 (edited) 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 Is Time Stop interfering with Wait()? For those who are curious, here's what I'm working on: edit: Also, I'm testing with SCS on right now. My script is installed last in weidu Edited March 10, 2018 by Daxtreme Quote
Avenger Posted March 12, 2018 Posted March 12, 2018 Try moving SetGlobal("TSFired","LOCALS",1) after the smallwait. Quote
Daxtreme Posted March 13, 2018 Author Posted March 13, 2018 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 Quote
Recommended Posts
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.