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.)

How to make a portal?

Discussion in 'Neverwinter Nights (Classic)' started by Emporer Laggius, Nov 2, 2002.

  1. Emporer Laggius Gems: 1/31
    Latest gem: Turquoise


    Joined:
    Oct 14, 2002
    Messages:
    16
    Likes Received:
    0
    [​IMG] hod do i make a portal thet when entered, sends me to a designated waypoint, in thia case, the tag is "jim" and also hod do u do it for a trigger. i meen the non-area transition trigers.

    [ November 02, 2002, 19:40: Message edited by: Taluntain ]
     
  2. Thorin Gems: 9/31
    Latest gem: Iol


    Joined:
    Jan 3, 2002
    Messages:
    303
    Likes Received:
    0
    you need to create a script under the on-enter. The script would move the player by using actionjumptoobject
     
  3. Errol Gems: 23/31
    Latest gem: Black Opal


    Joined:
    Oct 23, 2001
    Messages:
    1,547
    Likes Received:
    0
    Gender:
    Male
    [​IMG] (Look at this Thorin! Figured out all by myself! :D )

    Right, the tag has nothing to do with it. Create a Generic Trigger in your module, and place it in the portal bit.
    Then, make a Waypoint at the place where you want the portal to lead to, and call it PORTAL_EXIT in it's tag.

    Then go to the Trigger's properties, and put this in it's OnEnter script:

    Code:
     void main()
    {
        object oPC = GetEnteringObject();
        location lWaypoint = GetLocation(GetWaypointByTag("PORTAL_EXIT"));
        AssignCommand(oPC, JumpToLocation(lWaypoint));
    }
    I will explain this script here, so that you can maybe make your own or whatever.

    object oPC = GetEnteringObject();
    basically tells us that 'oPC' is the same as the thing that enters the trigger, so every time you want to refer to who entered the trigger, you say oPC.

    location lWaypoint = GetLocation(GetWaypointByTag("PORTAL_EXIT"));
    tells us that 'lWaypoint' is the same location as the Waypoint's Tag PORTAL_EXIT. So instead of typing GetLocation(GetWaypointByTag("PORTAL_EXIT") you can simply say 'lWaypoint' instead.

    AssignCommand(oPC, JumpToLocation(lWaypoint));
    is pretty simple. It gives the object 'oPC' (the thing that entered the trigger remember) a command, which is to Jump to the Location called 'lWaypoint' which is the simple term for saying PORTAL_EXIT.

    I hope that clears it up.
    Goph :D

    [ November 02, 2002, 11:11: Message edited by: Gopher ]
     
  4. Thorin Gems: 9/31
    Latest gem: Iol


    Joined:
    Jan 3, 2002
    Messages:
    303
    Likes Received:
    0
    Really nice script Gopher. But herer are some improvements to it.

    First as Gopher stated you use the GetLocation the reason for that is the GetWaypoint command does not work when it has to find a waypoint in a different area, you have to use a GetLocation command if you are sending a person between areas.

    Second you can add a little line at the bottom of the code, if you want this portal to work only once:
    DestroyObject(OBJECT_SELF);

    Also if you want your portal to have some special effects you can use something simmilar to this:
    ApplyEffectAtLocatio(DURATION_TYPE_INSTANT,EffectVisualEffect(VFX_IMP_UNSUMMON), locSpellTarget);
    //that is all one line of code

    ActionWait(2.0);

    Then your jumptolocation command. This will provide you with a nice special effect while the person goes to the next location
     
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.