Question about @clearChoice error.

All about user interface, be it customizing built-in UIs or adding new ones.
Post Reply
booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

Question about @clearChoice error.

Post by booksuny »

Hello. I am making QTE using the transparent option button.

Code: Select all

; BUTTON FOR QTE FOR CONTINUOUS ATTACK.
; This is a transparent button. Not visible to the user.
@if QTE=="up"
    @choice "W" button:MapButtons/att_UP_alpha0 pos:0,0 handler:ButtonArea goto:.QTE_att_succ
    @choice "A" button:MapButtons/att_Left_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_fail
    @choice "S" button:MapButtons/att_Down_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_fail
    @choice "D" button:MapButtons/att_Right_alpha0 pos:500,-100 handler:ButtonArea goto:.QTE_att_fail
@elseIf QTE=="left"
    @choice "W" button:MapButtons/att_UP_alpha0 pos:0,0 handler:ButtonArea goto:.QTE_att_fail
    @choice "A" button:MapButtons/att_Left_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_succ
    @choice "S" button:MapButtons/att_Down_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_fail
    @choice "D" button:MapButtons/att_Right_alpha0 pos:500,-100 handler:ButtonArea goto:.QTE_att_fail
@elseIf QTE=="down"
    @choice "W" button:MapButtons/att_UP_alpha0 pos:0,0 handler:ButtonArea goto:.QTE_att_fail
    @choice "A" button:MapButtons/att_Left_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_fail
    @choice "S" button:MapButtons/att_Down_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_succ
    @choice "D" button:MapButtons/att_Right_alpha0 pos:500,-100 handler:ButtonArea goto:.QTE_att_fail
@elseIf QTE=="right"
    @choice "W" button:MapButtons/att_UP_alpha0 pos:0,0 handler:ButtonArea goto:.QTE_att_fail
    @choice "A" button:MapButtons/att_Left_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_fail
    @choice "S" button:MapButtons/att_Down_alpha0 pos:-500,-100 handler:ButtonArea goto:.QTE_att_fail
    @choice "D" button:MapButtons/att_Right_alpha0 pos:500,-100 handler:ButtonArea goto:.QTE_att_succ
@endIf

@wait 1
@clearChoice

@goto .QTE_att_fail

@stop

However, the following error occurs in the @clearChoice part:

Naninovel script battlegame at line #161: Failed to clear ButtonList choice handler: handler actor with the provided ID doesn't exist.
UnityEngine.Debug:LogFormat (UnityEngine.LogType,UnityEngine.LogOption,UnityEngine.Object,string,object[])

I went through the manual and searched for forums, but I couldn't figure out a solution.
Is there a solution?

idaot
support
Posts: 275
Joined: 01 Aug 2020 08:25

Re: Question about @clearChoice error.

Post by idaot »

It's stated in the @clearChoice guide (https://naninovel.com/api/#clearchoice) that if no handlerId is specified in the command, it will grab the default handler specified in the Choice Handlers configuration, which is ButtonList by default.

Post Reply