ok, I got a problem, basicly I have a kind off dialog system where you can choose between option a,b,c,d with the arrowkeys. So while I wait for input I have a loop that will keep the rest of the functions from triggering until some input has been done.
But when it comes to call TriggerSleepAction the function stops completely and skips the rest of the function.
Here's the entire function
I can supply more info if needed
JASS:
loop
exitwhen NPC.Dialog_Outputvalue !=""
call BJDebugMsg ("NPC.Dialog_Outputvalue is still not set")
call TriggerSleepAction (0.4)
endloop
But when it comes to call TriggerSleepAction the function stops completely and skips the rest of the function.
Here's the entire function
JASS:
public method Dialog_Init takes boolean cinematic,real duration returns nothing
local integer x = 1
call BJDebugMsg ("Dialog_Init")
loop
exitwhen x>4
set NPC.Dialog_Outputresponse[x] = this.Response[x]
set NPC.Dialog_Outputresponsetitle[x] = this.Responsetitle[x]
set x=x+1
endloop
set NPC.Dialog_Outputvalue = ""
call EnableTrigger (NPC.Dialog_Choiceup)
call EnableTrigger (NPC.Dialog_Choicedown)
call EnableTrigger (NPC.Dialog_Choiceright)
call EnableTrigger (NPC.Dialog_Choiceleft)
call NPC.Displaychoice ()
call BJDebugMsg ("NPC.Displaychoice")
loop
exitwhen NPC.Dialog_Outputvalue !=""
call BJDebugMsg ("NPC.Dialog_Outputvalue is still not set")
call TriggerSleepAction (0.4)
endloop
call ClearTextMessages ()
call TransmissionFromUnitWithNameBJ ( GetPlayersAll (), this.U, GetUnitName(this.U), null, NPC.Dialog_Outputvalue, bj_TIMETYPE_SET, duration, true)
set x=1
loop
exitwhen x>4
set NPC.Dialog_Outputresponse[x] = ""
set NPC.Dialog_Outputresponsetitle[x] = ""
set x=x+1
endloop
set NPC.Dialog_Outputvalue = ""
//call BJDebugMsg ("Dialog Success")
endmethod
I can supply more info if needed