Jump to content

Script Help Request


Diomes2

Recommended Posts

I'm getting a CTD when entering the cell containing this script with about a 1/55 chance of this happening during normal gameplay - There is no warning.txt generated after this fail.

I know that it has something to do with the "DaysPassed" lines as the crash never happens if I remove them.

Also if I wait for several days I can enter the cell and everything functions normally again - has to be the 72hr cleanup 'fixing it'?

I can't get it to fail on purpose, so I'm not sure what exactly is causing the issue here.

If I rest for extended amount of time in the cell after  ( OnDeath == 1 ) nothing happens - Works as intended

If I rest for extended amount of time outside the cell after ( OnDeath == 1 ) when I re-enter everything is reset and the Boss is there again - Works as intended

If I do a combination of both when I re-enter everything is reset and the Boss is there again - Works as intended

Somehow I'm just not doing the right 'wrong' thing to get it to fail consistently.

I did notice that with the DayPassed removed from the script, There was 1/1000? chance that a Boss would not respawn after leaving and re-entering a cell.

I feel this has something to do with the 72hr maintenance, but I have no ideas on how to fix it.

Spoiler

Begin Dio_LPBoss030MudcrabDoor
    
    short doOnce
    short WaitDay
    
    if ( menumode == 1 )
        return
    endif

    if ( GetDisabled == 1 )
        if ( DaysPassed > ( WaitDay + 1 ) )
            if ( CellChanged == 1 )
                enable
                resurrect
                RA        ;MWEdit doesn't like this, but IDK why, works simple and effective
                Dio_LPbossdoor05->enable
                Dio_LPbossdoor06->enable
                set doOnce to 0
            endif
        endif
    endif
    
    if ( OnDeath == 1 )
        if ( doOnce == 0 )
            PlaceAtMe "sprigganup" 1 1 1; Visual effect
            PlaySound "Door Stone Open"
            set doOnce to 1
            set WaitDay to DaysPassed
            disable
        endif
    endif
    
    if ( doOnce == 2 )
        return
    endif
    
    if ( doOnce == 1 )
        PlaySound "Door Stone Open"
        Set doOnce to 2
        Dio_LPbossdoor05->disable
        Dio_LPbossdoor06->disable
    endif
    
End Dio_LPBoss030MudcrabDoor

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

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