Jump to content

Scripting help needed


kilkeeper7

Recommended Posts

Hello everyone,

 

I am creating a simple bunker home for myself. I want to make a script that works like if u have the key to the door, it wil let u in. But if u dont have the key

a screen pops up and says something like: The bunker is securley locked. Try looking around for notes. I am awful at scripting so i will apriciate is if someone helps me.

The door is called: 01BunkerMainentrance

The key is called: 01BunkerKeyMainentrance

 

Thanks!

Link to comment
Share on other sites

Begin OnActivate player ;Only run when the player uses the door

if player.getitemcount 01BunkerKeyMainentrance >= 1 ;if 01BunkerKeyMainentrance is not the Editor ID,put the Editor ID here...

activate

else

showmessage "Message ID" ;Without the "" ,create a message and put the Editor ID here

endif

end

 

place the script on the door.

Link to comment
Share on other sites

Begin OnActivate player ;Only run when the player uses the door

if player.getitemcount 01BunkerKeyMainentrance >= 1 ;if 01BunkerKeyMainentrance is not the Editor ID,put the Editor ID here...

activate

else

showmessage "Message ID" ;Without the "" ,create a message and put the Editor ID here

endif

end

 

place the script on the door.

 

 

Thanks man!

Link to comment
Share on other sites

Yea i made it likes this:

 

scn 01Bunkernokeymessage

 

Begin OnActivate player ;Only run when the player uses the door

if player.getitemcount 01BunkerKeyMainentrance >= 1 ;if 01BunkerKeyMainentrance is not the Editor ID,put the Editor ID here...

activate

else

showmessage "01Bunkernokey" ;Without the "" ,create a message and put the Editor ID here

endif

end

Link to comment
Share on other sites

I tested it again(substituing the Editor ID) and it worked again

if the script Don't save,it is a problem with your Editor ID,try changing the Editor ID to A01Bunkernokey ,there is a problem in GECK when you start with a number,if i remember right.

Edited by Aragron
Link to comment
Share on other sites

  • Recently Browsing   0 members

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