All pastes #2108462 Raw Edit

Someone

public text v1 · immutable
#2108462 ·published 2012-02-01 01:49 UTC
rendered paste body
/*

	Set local string to the tag of a WP
	"std_plc_transition_target" 

*/

void main()
	{

	string target = "std_transition_target";
	string k_message = "std_transition_message";
	
	object oPC = GetLastUsedBy();
	object oLadder = OBJECT_SELF;
	
	
	string tag = GetLocalString( oLadder, target);
	if ( tag == "")
		{
		// panic!		
		return;
		}
	
	object oWP = GetWaypointByTag( tag );
	if ( !GetIsObjectValid( oWP ) )
		{
		// panic
		return;
		}
		
	string sMessage = GetLocalString( oLadder, k_message);
	if ( sMessage != "" )
		FloatingTextStringOnCreature( sMessage, oPC, FALSE );
		
	AssignCommand( oPC, 
		JumpToObject( oWP, 0 )
		);
		
	}