Jump to content

script can't find my key


fjbarton59

Recommended Posts

Hello. i am modding an existing script to issue a key to player to open a trapdoor to a room i made. I added..

 

it's a system script so i don't want to add any properties to it, the script is below

 

My line is "game.getplayer().AddKeyIfNeeded(WhiterunBreezehomeCellarKey)"

 

 

E:\Program Files\The Elder Scrolls V Skyrim\Data\Scripts\Source\temp\TIF__000F3921.psc(12,32): variable WhiterunBreezehomeCellarKey is

 

I created the door and the key but why doesn't the script recognise it? Is it a scope thing? If so how do i make the script see it?

 

Thanks

 

 

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment

;NEXT FRAGMENT INDEX 1

Scriptname TIF__000F3921 Extends TopicInfo Hidden

 

;BEGIN FRAGMENT Fragment_0

Function Fragment_0(ObjectReference akSpeakerRef)

Actor akSpeaker = akSpeakerRef as Actor

;BEGIN CODE

game.getplayer().removeitem(gold, HDWhiterunAlchemy.value as int)

decoratemarker.enable()

oldmarker.disable()

game.getplayer().AddKeyIfNeeded(WhiterunBreezehomeCellarKey)

;END CODE

EndFunction

;END FRAGMENT

 

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

 

int Property GoldAmount Auto

 

MiscObject Property Gold Auto

 

ObjectReference Property DecorateMarker Auto

 

GlobalVariable Property HDWhiterunAlchemy Auto

 

ObjectReference Property oldmarker Auto

Link to comment
Share on other sites

  • Recently Browsing   0 members

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