Author Topic: Area Transtion floating string  (Read 339 times)

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
Area Transtion floating string
« on: April 17, 2011, 10:58:31 pm »


               I have a area trasition and i want floating text to say "You make your way up the branches"Then wait 3 seconds and jump them  to the next area.

So i just put a script in the on area transtion click?

Or will it mess up the area transtion if i put one in there?
               
               

               


                     Modifié par Builder_Anthony, 17 avril 2011 - 09:58 .
                     
                  


            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Area Transtion floating string
« Reply #1 on: April 18, 2011, 02:31:47 am »


               // delayed_port_oc
//Goes in the OnClick Event of a Area Transition Trigger (Requires Waypoint!)

  //Settings
  const string sMsg = "Enter Msg Here";
 const string sDestination = "Enter Tagname of Waypoint Here";
const float fDelay = 3.0; //Seconds Till Telelported to Waypoint

//Do Not Edit Anything Below
void main()
{
    object oPC = GetClickingObject();
    float fFloat = fDelay;
    //FALSE = Don't show to other PCs in Party
   FloatingTextStringOnCreature(sMsg, oPC, FALSE);
    object oWay = GetWaypointByTag(sDestination);
   DelayCommand(fFloat, AssignCommand(oPC, ClearAllActions()));
    fFloat += 0.1;
   DelayCommand(fFloat, AssignCommand(oPC, ActionJumpToObject(oWay)));
}
               
               

               


                     Modifié par _Guile, 18 avril 2011 - 02:35 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Area Transtion floating string
« Reply #2 on: April 18, 2011, 05:48:32 am »


               why not just use:

// Get the destination (a waypoint or a door) for a trigger or a door.
// * Returns OBJECT_INVALID if oTransition is not a valid trigger or door.
object GetTransitionTarget(object oTransition)


Instead of making the script search through all the objects in the module in order to find the waypoint
               
               

               
            

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
Area Transtion floating string
« Reply #3 on: April 19, 2011, 02:16:43 am »


               Could someone edit that in there for me?
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Area Transtion floating string
« Reply #4 on: April 19, 2011, 03:07:50 am »


               I also would not delay actions given to the PC unless there is 100% no way around it.  It is to easie to fall into that trap and bog the module down with everything being delayed.  

This should work in the Transistion, With the transistion set up the standard way.

void main()
{
   object oPC = GetClickingObject();

   FloatingTextStringOnCreature("You make your way up the branches", oPC, FALSE);
  
   AssignCommand(oPC, ClearAllActions());
   AssignCommand(oPC, ActionWait(3.0));
   AssignCommand(oPC, ActionJumpToLocation(GetLocation(GetTransitionTarget(OBJECT_SELF))));
   AssignCommand(oPC, ActionDoCommand(SetCommandable(TRUE,oPC)));

   SetCommandable(FALSE,oPC);
}
               
               

               
            

Legacy_Builder_Anthony

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +0/-0
Area Transtion floating string
« Reply #5 on: April 20, 2011, 12:04:19 am »


               I guess i can force the pc to play a animation of look far.Ill take out the wait and throw that on the line instead.Just curious lightfoot what was your name in the old forums?By the way thanks gulie i appreciate the help.
               
               

               


                     Modifié par Builder_Anthony, 19 avril 2011 - 11:04 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Area Transtion floating string
« Reply #6 on: April 20, 2011, 12:31:46 am »


               My Name on the Old Forums. Was Lightfoot8.

The forums shows me as joining in jan of 2007.  But that is just the date I activated the GameSpy account for that login name.  I do not think I made any posts to the BioBoards untill 2009 or so.  As a matter of fact I did not even know they where there untill around 2009.  It really would have been nice if I knew they where there before that,  Most of the stuff I learned about scripting I did by just diving in.  It seams I found the boards Just before the end of the glory days.  It is too bad most of the people did not make the transistion.  

  It is funny at times though when one of the board member makes a post where it is ovious that they think everyone who plays or builds NWN is an active member of the forum community.  The fact in my opion is that NWN the BioBoards have never consisted of more then 50% of the Builder/Players out there.  And that is a high estimate.  
               
               

               


                     Modifié par Lightfoot8, 19 avril 2011 - 11:53 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Area Transtion floating string
« Reply #7 on: April 20, 2011, 12:56:30 am »


               You could remove the SetCommandable FALSE.   The only differance would be that the player could walk away from the tree.  And if they did move away it would clear there action buffer and they would no longer transistion.