Jump to content

GECK: Showmessage but still locked controls


dubiousintent

Recommended Posts

Been working on getting "New Vegas Bounties III" to work for myself. Made progress but now I'm hung on why I can't get control over my mouse when a "showmessage" box appears, even though I have added several "enableplayercontrol" lines. Here are the last debug print log entries I've added showing progress:

Leaving [aaCoffinRoomExitTriggerSCRIPT], aaNVB3Main04.CoffinBark = [15], DoOnce =[1].
Starting [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [0], Quest [aaNVB3Main04] QStage [5] FadeIn & Enable Controls.
In [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [0], Quest [aaNVB3Main04] QStage [5] disabling Town Actor references.
In [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [0], Quest [aaNVB3Main04] QStage [5] deleting Town Actor references.
Setting [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [0], Quest [aaNVB3Main04] QStage [5], [aaFinalBHSaloonParentMarkerREF.enable].
In [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [0], Quest [aaNVB3Main04] QStage [5], showing [aaPostComaMessage].
Leaving [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [1], Quest [aaNVB3Main04] QStage [5].
Starting [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [1], Quest [aaNVB3Main04] QStage [5], and enabling controls.
Leaving [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [2], Quest [aaNVB3Main04] QStage [5].

And here is the essential script:

 

scn aaDoolinEndEnterTriggerSCRIPT

short DoOnce

Begin OnTrigger Player

; if (DoOnce == 0) && (GetStage aaNVB3Main04 == 5) - DUB disabled and restructured
if (DoOnce == 0)
    ; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
    PrintD "Starting [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], Quest [aaNVB3Main04] QStage [" + $(GetStage aaNVB3Main04) + "] FadeIn & Enable Controls."
    enableplayercontrols  ; DUB added
    imod FadeInFromBlack2sISFX  ; DUB added
    
    If (GetStage aaNVB3Main04 == 5)
        ; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
        PrintD "In [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], Quest [aaNVB3Main04] QStage [" + $(GetStage aaNVB3Main04) + "] disabling Town Actor references."
        ;
        ; imod FadeInFromBlack2sISFX - DUB relocated
        aaDoolinShackIntDoorREF.lock 255
... (other disables)
        aaSusanGreenREF.disable
        ;
        ; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
        PrintD "In [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], Quest [aaNVB3Main04] QStage [" + $(GetStage aaNVB3Main04) + "] deleting Town Actor references."
        ;
        aaNVB3RandallREF.markfordelete
... (other markfordeletes)
        aaSusanGreenREF.markfordelete
        ;
        aaFinalBHSaloonParentMarkerREF.enable
        ;
        ; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
        PrintD "Setting [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], Quest [aaNVB3Main04] QStage [" + $(GetStage aaNVB3Main04) + "], [aaFinalBHSaloonParentMarkerREF.enable]."
        ;
    endif    ;DUB
    

    If (GetQuestRunning aaNVB3Main04) == 0
        ; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
        PrintD "In [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], with Quest [aaNVB3Main04] not running, QStage [" + $(GetStage aaNVB3Main04) + "], starting [Quest aaNVB3Main04]."
        startquest aaNVB3Main04
    endif
    ;
    ; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
    PrintD "In [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], Quest [aaNVB3Main04] QStage [" + $(GetStage aaNVB3Main04) + "], showing [aaPostComaMessage]."
    ;
    showmessage aaPostComaMessage
    enableplayercontrols    ; DUB added
    ;
    set DoOnce to 1

else    ; DoOnce == 1
    ; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
    PrintD "Starting [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], Quest [aaNVB3Main04] QStage [" + $(GetStage aaNVB3Main04) + "], and enabling controls."
    ;
    enableplayercontrols
    set aaNVB3Main04.ThorneBark to 1
    aaThorneFinalREF.evp
    aaDoolinShackIntDoorREF.unlock
    set DoOnce to 2
    disable
    markfordelete

endif
; NVSE required - Dubious: PrintD (string:expression), DBPrint (formatted string)
PrintD "Leaving [aaDoolinEndEnterTriggerSCRIPT] with DoOnce = [" + $(DoOnce) + "], Quest [aaNVB3Main04] QStage [" + $(GetStage aaNVB3Main04) + "]."

END

 


The screen behind the message box is still blacked out, so the IMDO has not completed it's fade-in. But the script seems to hang at that point (after two loops). Do I need to gate the "disable" and "markfordelete" (which was not gated by the original author)?

 

-Dubious-

Edited by dubiousintent
Link to comment
Share on other sites

I would start with changing the line:
Begin OnTrigger Player

to

Begin OnTriggerEnter Player
the 'OnTrigger' block type runs every frame that the player is in the trigger. So the part after the 'else' is running every frame. May be a problem if 'enableplayercontrols' runs every frame.
'ONTriggerEnter' block type only runs one frame when entered by the player
Link to comment
Share on other sites

Thanks. That's interesting info, but this script needs to loop at least twice to set all the necessary conditions.

 

Trying it out did lead me to my solution. One of my problems has been that scripts seem to fail to progress while still looping. (It was erratic, hanging at different points suggesting a memory problem.) Turns out one of the "result scripts" wasn't compiled, and that threw things off. Compiling that script and some skipping over some dialog finally enabled me to get past the hang. No idea if it would help anyone else. But I did determine that earlier hangs were to do with way game time was tracked and resolved with the global game fix in the "JIP LN NVSE Plugin v52".

 

-Dubious-

Link to comment
Share on other sites

  • Recently Browsing   0 members

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