Author Topic: in conversation teleport  (Read 392 times)

Legacy_kuronue bloodlust

  • Full Member
  • ***
  • Posts: 217
  • Karma: +0/-0
in conversation teleport
« on: April 15, 2014, 05:43:27 am »


               

now I got it to work before but i'm not good with scripting and I lost my modules and have to rebuild so I forgot the one line script I used to transport a player to a Set location (example a dungeon accessible only through conversations with a NPC)


 


in other words I forgot how I did it.... >////< and I can't find a solution that matches what I remember so PLEASE HELP



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
in conversation teleport
« Reply #1 on: April 15, 2014, 07:38:40 am »


               AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("#####"))));

where ##### is the tag of the target waypoint in the new area.
               
               

               
            

Legacy_kuronue bloodlust

  • Full Member
  • ***
  • Posts: 217
  • Karma: +0/-0
in conversation teleport
« Reply #2 on: April 15, 2014, 08:08:35 am »


               


AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetObjectByTag("#####"))));


where ##### is the tag of the target waypoint in the new area.




variable defined without type.


 


To elaborate; I am trying to get a Player to a way point when they select a certain option!


example


 


NPC:Question


     Player: answer one (sends to waypoint)


     Player: Answer two [ends conversation]


 


last know somewhat functional script


 


void main()

{

object oPC = GetPCSpeaker();

object oJumpTo = GetObjectByTag("#######");

AssignCommand(oPC,JumpToObject(oJumpTo));

}


 


Problem you don't get to say otherwise or select an answer.



               
               

               
            

Legacy_Wensleydale

  • Jr. Member
  • **
  • Posts: 78
  • Karma: +0/-0
in conversation teleport
« Reply #3 on: April 15, 2014, 10:24:16 am »


               

Here's the script I use courtesy of Lilac Soul's Script Generator:



/*   Script generated by
Lilac Soul's NWN Script Generator, v. 2.3

For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625    */

//Put this on action taken in the conversation editor
void main()
{

object oPC = GetPCSpeaker();

object oTarget;
location lTarget;
oTarget = GetWaypointByTag("Oubliette_2_Crypt");

lTarget = GetLocation(oTarget);

//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either

if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;

oTarget=GetFirstFactionMember(oPC, FALSE);

while (GetIsObjectValid(oTarget))
   {
   AssignCommand(oTarget, ClearAllActions());

   AssignCommand(oTarget, ActionJumpToLocation(lTarget));
   oTarget=GetNextFactionMember(oPC, FALSE);
   }

}


It's attached to a signpost. When the player clicks on it, a conversation is started and one of the options triggers this script. Should do the business for you -- just change "Oubliette_2_Crypt" to the name of your waypoint.



               
               

               
            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
in conversation teleport
« Reply #4 on: April 15, 2014, 02:13:46 pm »


               


variable defined without type.


 


To elaborate; I am trying to get a Player to a way point when they select a certain option!


example


 


NPC:Question


     Player: answer one (sends to waypoint)


     Player: Answer two [ends conversation]


 


last know somewhat functional script


 


void main()

{

object oPC = GetPCSpeaker();

object oJumpTo = GetObjectByTag("#######");

AssignCommand(oPC,JumpToObject(oJumpTo));

}


 


Problem you don't get to say otherwise or select an answer.




 


You need to create that conversation tree for multiple options.


 


[OWNER] Where on the island shall I teleport you to?


- "To the Rainbow Palm Tree!"


- "To the Pond of Ripples!"


- "Into the Cave of Light!"


- "I'm going to stay here for now."


 


On each selection the player can make, you would put the associated teleport script that would jump the player to the specified waypoint for each selection. This script goes in the ACTIONS TAKEN TAB of that line.


 


"To the Rainbow Palm Tree!" would be a script under ACTIONS TAKEN that teleports the player to your specified waypoint.


"To the Pond of Ripples!" would be a different script under ACTIONS TAKEN.


 


... and so forth.


 


FP!


               
               

               
            

Legacy_kuronue bloodlust

  • Full Member
  • ***
  • Posts: 217
  • Karma: +0/-0
in conversation teleport
« Reply #5 on: May 10, 2014, 03:03:57 am »


               


You need to create that conversation tree for multiple options.


 


[OWNER] Where on the island shall I teleport you to?


- "To the Rainbow Palm Tree!"


- "To the Pond of Ripples!"


- "Into the Cave of Light!"


- "I'm going to stay here for now."


 


On each selection the player can make, you would put the associated teleport script that would jump the player to the specified waypoint for each selection. This script goes in the ACTIONS TAKEN TAB of that line.


 


"To the Rainbow Palm Tree!" would be a script under ACTIONS TAKEN that teleports the player to your specified waypoint.


"To the Pond of Ripples!" would be a different script under ACTIONS TAKEN.


 


... and so forth.


 


FP!




Thank you all for the generous help but I finally figured out what I was doing wrong and got the teleprompter fixed but the hack-pack is now messed up and I'm trying to get a fix for that. if I can get a custom content pack made thou that would all change anyhow but still thank you for your help and input i would also liek this somehow archived for future reference not just my sake but others as well.


 


the text reads


-[introduction to area here]


   option one player decided to go in


         npc warning


                player oked


                       end dialouge on npc (script here)


  says no end dialouge


 


apparently placement still matters; im gonna see if i can get  my hackjob of a hack server up and running at 100% or at least get work started on a custom content pack for it.