Thread: Door Scripts
View Single Post
  #2  
Old 07-13-2004, 08:58 PM
Silver Knight Silver Knight is offline
The Ice Cream Social
Silver Knight's Avatar
Join Date: Jun 2001
Location: SoCal
Posts: 541
Silver Knight is on a distinguished road
Send a message via AIM to Silver Knight
This really should be in the scripting forum.
But whatever.

However, I will not give you the whole script.
Rather a psuedocode for it.
Essentially, it is like this.
NPC Code:

if (created) {
Initialize Variables,etc;
}
if (Player says the right thing) {
Set the door to be unlocked;
Or if they say the thing to close
Set the door to locked;
}
if (playertouchsme) {
if (Check if Open) {
Open;
}
if not open
Display message;
}


There.
Something like that, but with real code instead.
I could just give you the script, but you don't learn like that, you'll end up a much better scripter if you experiment and find what works and what doesn't.

Hint: Don't use if (playersays(stuff)) ever!
__________________