Jump to content

scripting question


fornarch

Recommended Posts

I was wondering what the scripting would be to make it so when the player tries to open a locked door a message box pops up. (I have to try and cover all possible angles for the quest im working on, a lot of work!)

Thanks for your help! Always easier to just ask here when I hit a trouble spot!

Link to comment
Share on other sites

scn YourDoorScript
BeginOnactivate
if isactionref player
messagebox "You can't pass muwahaha!"
endif
end

The door doesn't necessarily have to be locked for this, the player will never be able to open the door.

 

If you want the player to be able to go through when he has the key:

 

scn YourDoorScript
BeginOnactivate
if isactionref player && player.getitemcount YourKey >= 1
activate
endif
if isactionref player && player.getitemcount Yourkey == 0
messagebox "You can't pass muwahaha!"
endif
end

Link to comment
Share on other sites

scn YourDoorScript
BeginOnactivate
if isactionref player
messagebox "You can't pass muwahaha!"
endif
end

The door doesn't necessarily have to be locked for this, the player will never be able to open the door.

 

If you want the player to be able to go through when he has the key:

 

scn YourDoorScript
BeginOnactivate
if isactionref player && player.getitemcount YourKey >= 1
activate
endif
if isactionref player && player.getitemcount Yourkey == 0
messagebox "You can't pass muwahaha!"
endif
end

 

sweet...thanks, the 2nd one will work perfectly!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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