TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 4 of 4

Thread: SeamlessTeleporterTrap / PortalTrap

  1. #1
    Member
    Registered: Jan 2012
    Location: Gèrmany

    SeamlessTeleporterTrap / PortalTrap

    At the beginning I was just to stupid to use the StimTP version and so I tried to build a TeleportTrap which doesn't need links or other objects.

    I created two versions of TPTraps
    1. a seamless player teleporter trap
    2. a teleport everything seamless trap /Portaltrap
    EDIT: Thanks to Larry's post it's working now and I think PortalTrap is a much nicer name

    Seamless(Player)TeleporterTrap
    Just one object and no linking necessary.
    uses NVTrigOBB, NVRelayTrap; TrapMoveRelative (tnhScript)

    !!!For NVTrigOBB: The object must have an OBB physics model with the 'Is Edge Trigger' flag

    DesignNote
    [TrapMoveRelative settings e.g. z=24];(that is all you have to change see HERE for more options)

    NVTrigOBBTDest="[me]";
    NVTrigOBBTOn="TP";(can be everything expect TurnOn)
    NVTrigOBBPlayer=1;

    NVRelayTrapOn="TP";
    NVRelayTrapTDest="[me]";
    NVRelayTrapDelay=1; (see below)
    NVRelayTrapExclusiveDelay=1;

    NVLinkType="ControlDevice";
    NVLinkSource="[me]";
    NVLinkDest="Player"; (strange it also works without the ")
    NVLinkBuilderCount=1 (Is not really necessary but because the link is not removed I added this)


    And for the C&P friends:
    NVTrigOBBTDest="[me]";NVTrigOBBTOn="TP";NVTrigOBBPlayer=1;NVRelayTrapOn="TP";NVRelayTrapTDest="[me]";NVRelayTrapDelay=1;NVRelayTrapExclusiveDelay=1;NVLinkType="ControlDevice";NVLinkSource="[me]";NVLinkDest="Player";NVLinkBuilderCount=1

    I bet you might wonder why I use a RelayTrap here the problem is that sometimes the TrigOBB sent 2 TurnOns in a row => double distance teleport

    Here is a link to a short demoversion
    LINK

    ______
    Because an hour ago I found out that my teleport everything trap isn't working I wont post all my thinking and the loooong DesingNote.
    I just say this:
    TrigOBB can not be used in this situation and the Trap is activated by a PhysEnter message.
    Sadly PhysEnter is only sent when there is also NVSpy on the object.
    Maybe someone got an ideas how to solve my problem.
    _____

    EDIT:

    PortalTrap

    Short summary of this trap
    It activates when an object comes in its bounding box -> PhysEnter
    For tnhs TrapMoveRelative to work a CDLink is necessary
    Therefore NVLinkBuilder makes a CD to the closest object and now the fun begins because the object is teleported away NVLinkBuilder can't remove the link to the original object because it again looks for the nearest object.
    To solve that problem I'm using two NVMetaTraps the first one "marks" the teleported object and the second one looks for the mark and removes it - the NVLinkBuilder looks now for this mark to.
    I'm still looking for a better solution and I'm not 100% sure if it works in all situations -> see two post below


    PortalTrap BetaVersion
    As the trap above it a one object teleporter which teleports every object which comes in range.
    The teleportation is seamless so velocity, orientation ... is kept (expect you modify -> TrapMoveRelative)

    uses NVPhysMessage, NVRelayTrap; NVLinkBuilder; NVMetaTrap; NVMetaTrap2; TrapMoveRelative (tnhScript)

    DesignNote
    [TrapMoveRelative settings e.g. z=24];(that is all you have to change see HERE for more options)

    NVRelayTrapOn="PhysEnter";
    NVRelayTrapOff="TurnOn";
    NVRelayTrapTDest="[me]";
    NVRelayTrapDelay=1; (see above)
    NVRelayTrapExclusiveDelay=1;

    NVMetaTrapOn="PhysEnter";
    NVMetaTrapTarget="^physical"; (can be customized see below)
    NVMetaTrapMeta="TPMark";

    NVLinkType="ControlDevice";
    NVLinkSource="[me]";NVLinkDest="^TPMark";

    NVMetaTrap2On="Null";
    NVMetaTrap2Target="^TPMark";
    NVMetaTrap2Meta="TPMark"

    _____________

    And again for C&P - I changed the order so that the parameters you have to change are at the front.

    NVMetaTrapTarget="^physical";NVMetaTrapMeta="TPMark";NVLinkDest="^TPMark";NVMetaTrap2Target="^TPMark";NVMetaTrap2Meta="TPMark";NVRelayTrapOn="PhysEnter";NVRelayTrapOff="TurnOn";NVRelayTrapTDest="[me]";NVRelayTrapDelay=1;NVRelayTrapExclusiveDelay=1;NVMetaTrapOn="PhysEnter";NVLinkType="ControlDevice";NVLinkSource="[me]";NVMetaTrap2On="Null"


    Here is a link to a demo(.cow version) version: LINK
    Feel free to test it with every object around.

    Note: In my Demo I called the TPMark MetaProp Teleportable
    Remember to have the latest tnh and NVScript (v. 1.2.2)

    For customization:
    •Change all TPMark entries to the name of your metaproperty(if you want another name)
    •If you don't want that every physical(Archtype) is teleported you can change the archtype or make a new metaproperty e.g. Teleportable and give it to all objects/archetypes you want to teleport the then you just have to change the NVMetaTrapTarget from "^physical" to "^Teleportable" (with the ")
    Last edited by Daraan; 11th Mar 2012 at 11:40. Reason: added PortalTrap

  2. #2
    Member
    Registered: Aug 2007
    Location: LosAngeles: Between Amusements
    Um ...
    NVPhysMessages

    The object with this script will receive physics-related messages: PhysMadeNonPhysical, PhysMadePhysical, PhysCollision, PhysContactCreate, PhysContactDestroy, PhysEnter, PhysExit, PhysFellAsleep, PhysWokeUp.
    Don't feel bad. It took me a while to know to look for the NVscripts that enable receipt of special messages. R Soul and Yandros and others had to remind me several times.

  3. #3
    Member
    Registered: Jan 2012
    Location: Gèrmany
    Thank you I edited my first post and added the PortalTrap(much nicer name^^)

    But maybe there is a way to make it a bit more simpler.
    The biggest problem is the removing of the CDLink from the Trap to the teleported object

    I thought about a few alternatives to my MetaProperty version

    1.) NVTriggers also can kill random links
    "[ScriptName]TDest="&?ControlDevice" will send the message down a random ControlDevice link.
    If you want the randomly chosen link to be deleted, then use [ScriptName]KillLinks=1."

    I tried it with this setting:

    NVRelayTrapOn="PhysEnter";
    NVRelayTrapTDest="[me]";
    NVRelayTrapDelay=1;
    NVRelayTrapExclusiveDelay=1;

    NVLinkType="ControlDevice";
    NVLinkSource="[me]";
    NVLinkDest="^physical";

    NVRelayTrap2TDest="&?ControlDevice";
    NVRelayTrap2KillLinks=1;
    NVRelayTrap2Delay=1;

    the second RelayTrap is activated 1ms after PhysEnter and should kill the CD link 1ms after the teleport but it didn't work.

    2.) A second NVLinkBuilder script but NV mentioned nothing about multiple copies for this script
    ... blame you

    3.) Your ideas..

  4. #4
    Desperately Dodgy Moderator
    Registered: Nov 2001
    Location: The Wailing Keep
    I've done this in two missions before, Dance With The Dead (in two different places) and Mask of Agamemnon. As I recall, I just used TrapMoveRelative to teleport the player and any necessary objects as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •