Jump to content

Bobblehead Stand script to fire off an unlock door?


amokrun1

Recommended Posts

Greetings,

I am working on a mod with a Bobblehead search. I have a Bobblehead stand in a cell that I want to unlock a nearby door once all 20 Bobbleheads have been placed on the stand. It has to be once all positions on the stand are filled, and not simply when the last Bobblehead has been found and looted. I am using the vanilla BobbleheadStandScript but my efforts to tweak it have proven ineffective as to achieving the above. Can anyone please help me with this?

Link to comment
Share on other sites

Thought I would post the script I have, abbreviated. This unlocks the object but when 9 are placed or when 19 are placed. 20 does not work. Maybe someone can see why?

 

 

scn GBobbleheadStandScript

begin OnActivate
if IsActionRef player == 1

if ( BH10.HaveAGL == 1 )
    AGLRef.Enable
endif

; like this for each of the Bobbleheads

if BH10.Carrying == 1
    Set BH10.Carrying to 0

   if ( BH10.HaveAGL == 1 )
        AGLRef.Enable
        Player.RemoveItem BucksBobbleheadAGL 1
        Set BH01.BobblesDisplayed to ( BH01.BobblesDisplayed + 1 )                                    
            if ( BH01.BobblesDisplayed == 20 )
                playsound UILockpickingUnlock
                PlaySafeREF.unlock
        endif
    endif

;again, like this for each of the Bobbleheads

else
    ShowMessage BobbleheadNone
endif
endif
end

Link to comment
Share on other sites

  • Recently Browsing   0 members

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