1. SPS Accounts:
    Do you find yourself coming back time after time? Do you appreciate the ongoing hard work to keep this community focused and successful in its mission? Please consider supporting us by upgrading to an SPS Account. Besides the warm and fuzzy feeling that comes from supporting a good cause, you'll also get a significant number of ever-expanding perks and benefits on the site and the forums. Click here to find out more.
    Dismiss Notice
Dismiss Notice
You are currently viewing Boards o' Magick as a guest, but you can register an account here. Registration is fast, easy and free. Once registered you will have access to search the forums, create and respond to threads, PM other members, upload screenshots and access many other features unavailable to guests.

BoM cultivates a friendly and welcoming atmosphere. We have been aiming for quality over quantity with our forums from their inception, and believe that this distinction is truly tangible and valued by our members. We'd love to have you join us today!

(If you have any problems with the registration process or your account login, please contact us. If you've forgotten your username or password, click here.)

Burning Men

Discussion in 'Neverwinter Nights (Classic)' started by Megaman1986, Dec 18, 2002.

  1. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
    I was on this server called "Kathra's Temple", and inside the temple, men couldn't sit on chairs without getting burned.
    How did they do that?
    Is it also possible to lock doors, and only make them open for a specific gender, or a specific PERSON?

    [ December 19, 2002, 11:52: Message edited by: Taluntain ]
     
  2. Mithrandir Gems: 3/31
    Latest gem: Lynx Eye


    Joined:
    Jun 4, 2002
    Messages:
    64
    Likes Received:
    0
    Not to sure but I think in the scripts there is a command to check for gender and then do different things depending on what it gets as an answer. (eg: males, burn them. females, do nothing)
     
  3. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
    But can doors be locked except for specific persons?
    Oh, and when I make a door that requires a key, I can't seem to relock it ingame, which results in people wandering about areas I don't want them in.
     
  4. Mithrandir Gems: 3/31
    Latest gem: Lynx Eye


    Joined:
    Jun 4, 2002
    Messages:
    64
    Likes Received:
    0
    For the door thing I think you have to turn on relockable (or something like that)in proporties. :)
     
  5. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
    I did, but even then I couldn't relock it succesfully.
     
  6. Zorac Gems: 11/31
    Latest gem: Bloodstone


    Joined:
    Nov 6, 2000
    Messages:
    412
    Likes Received:
    0
    Making it work for only a specific person isn't harder than doing it for a specific gender/whatever.

    And why not let the door autolock when it is closed?
     
  7. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
    'Cuz I am a big fat n00b that doesn't know how to do such things.
     
  8. Errol Gems: 23/31
    Latest gem: Black Opal


    Joined:
    Oct 23, 2001
    Messages:
    1,547
    Likes Received:
    0
    Gender:
    Male
    Well, since non of these people have given you any scripts, i thought I would.

    Here's the script to make a door shut itself after 5 seconds. Stick it in the OnOpen script slot in the door.
    Code:
     
    void main()
    {
      object oDoor = GetObjectByTag(OBJECT_SELF);
      DelayCommand(5.0, ActionCloseDoor(oDoor));
      SetLocked(oDoor, TRUE);
    }
    I'll explain it here for you, so you can do this yourself in future, ok?

    void main()
    This is the header of all scripts (nearly). It basically tells us that the script does something.

    object oDoor = GetObjectByTag(OBJECT_SELF);
    This line means that when you say: oDoor, is the same as saying: GetObjectByTag(OBJECT_SELF). So whenever you say "oDoor", you actually mean the object the script is assigned to.

    DelayCommand(5.0, ActionCloseDoor(oDoor));
    This tells the script to wait 5 Seconds, then do the Action: Close Door. The line then refers to the door to close in brackets, which happens to be "oDoor". oDoor actually means the object the script is assigned to remember?
    This means that you can put this script in any door, and it will work, instead of putting the name of your door in loads of different scripts.

    SetLocked(oDoor, TRUE);
    This line says that after having closed the door after 5 seconds, it is set as Locked. You then refer to what object to set as locked, and in this case it's "oDoor" again. I then tell it that this command is TRUE. If it was FALSE, the door would remain unlocked.

    ------------

    I hope that script serves you well for closing and locking your door. :)
    To make doors openable by a specific gender, you need to modify the OnOpen script to say that the door should only open, if its a Female or Male opening it. This is possible, but maybe I'll tell you another time. (ie. I don't know, and can't be bothered to find that out)

    Hope the script's ok.
    Goph:)
     
  9. Mark Nelson Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Aug 12, 2002
    Messages:
    28
    Likes Received:
    0
    Well trying this script my self I get a declaration error on this line:
    object oDoor = GetObjectByTag(OBJECT_SELF);
    Maybe it is something that I am doing wrong but I copied and pasted it from the above to an ONOpen file that I made called onopen1. So what is wrong with the script that it won't compile?


    :confused: :confused:
     
  10. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
    I tried the script...
    Sorry, didn't work.
    The door didn't close on itself, and when I closed it, it remained unlocked.
     
  11. Zorac Gems: 11/31
    Latest gem: Bloodstone


    Joined:
    Nov 6, 2000
    Messages:
    412
    Likes Received:
    0
    The OnOpen is run by the door so it is probably enough to skip the 'object oDoor...' line and just substitute oDoor with OBJECT_SELF in the rest of the script.

    You get an error because GetObjectByTag takes a string as argument.
     
  12. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
    I have no idea what you just said... :confused:
    All I know is that something everybody can do, is something I suck at.
    I WANT MY DOORS TO CLOSE!
    Stupid doors...

    PS: I also need a script that tells an NPC to undress, can someone tell me what script I need for that?

    [ December 21, 2002, 08:42: Message edited by: Megaman1986 ]
     
  13. Zorac Gems: 11/31
    Latest gem: Bloodstone


    Joined:
    Nov 6, 2000
    Messages:
    412
    Likes Received:
    0
    Ok, lets keep this simple and take it one step at a time.
    Code:
      
    void main()
    {
     DelayCommand(10.0, ActionCloseDoor(OBJECT_SELF));
     }
    Attach this as the doors OnOpen script. It will close the door by itself 10s after you opened it.
     
  14. Capt. Tripps Gems: 9/31
    Latest gem: Iol


    Joined:
    Mar 11, 2001
    Messages:
    341
    Likes Received:
    0
    You do need a string for GetObjectByTag. Just rewrite the command as
    Code:
     object oDoor = GetObectByTag("yourdoorstag"); 
    subsitute the tag for your door in "yourdoorstag" (you must put it between the quotation marks)and the script should work.

    [ December 21, 2002, 08:54: Message edited by: Capt. Tripps ]
     
  15. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
    Ah, now it works.
    OK, next problem: making seats.
    How do I do that?
    If I just put in a chair, I can't sit on it.
    And I can't find a 'seat' placeable.
     
  16. Zorac Gems: 11/31
    Latest gem: Bloodstone


    Joined:
    Nov 6, 2000
    Messages:
    412
    Likes Received:
    0
    You need to attach a script to the OnUsed slot on the chair. I think the script should look something like this:
    Code:
    void main ()
    {
       AssignCommand (GetLastUsedBy (), ActionSit (OBJECT_SELF));
    }
      
    Haven't got my disc handy so I can't test at the moment.

    [ December 21, 2002, 09:58: Message edited by: Zorac ]
     
  17. Capt. Tripps Gems: 9/31
    Latest gem: Iol


    Joined:
    Mar 11, 2001
    Messages:
    341
    Likes Received:
    0
    I could have sworn we posted these scripts just a couple of weeks ago. Anyway in the OnUsed script for an usable chair:
    Code:
    void main()
    {
      object oChair = OBJECT_SELF;
      if(!GetIsObjectValid(GetSittingCreature(oChair)))
      {
        AssignCommand(GetLastUsedBy(), ActionSit(oChair));
      }
    }  
    The if command makes sure no-one else is sitting in the chair first.
     
  18. Errol Gems: 23/31
    Latest gem: Black Opal


    Joined:
    Oct 23, 2001
    Messages:
    1,547
    Likes Received:
    0
    Gender:
    Male
    OK, could I just ask; Are you making a PW? Because if you are, then boy, get a scripting guide. :rolleyes
     
  19. Megaman1986 Gems: 2/31
    Latest gem: Fire Agate


    Joined:
    Dec 18, 2002
    Messages:
    27
    Likes Received:
    0
  20. Errol Gems: 23/31
    Latest gem: Black Opal


    Joined:
    Oct 23, 2001
    Messages:
    1,547
    Likes Received:
    0
    Gender:
    Male
    Persistent World.
    No matter, here's the revised version of the Script for Closing and locking doors.

    Code:
     
    void main()
    {
      DelayCommand(5.0, ActionCloseDoor(OBJECT_SELF));
      SetLocked(OBJECT_SELF, 1);
    }
     
    Stick it in the OnOpen script for the door, it will close after 5 seconds and lock itself.
     
Sorcerer's Place is a project run entirely by fans and for fans. Maintaining Sorcerer's Place and a stable environment for all our hosted sites requires a substantial amount of our time and funds on a regular basis, so please consider supporting us to keep the site up & running smoothly. Thank you!

Sorcerers.net is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to products on amazon.com, amazon.ca and amazon.co.uk. Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.