Jump to content

Home

Yep, more questions


Fiestainabox

Recommended Posts

How do you cange the Appearence of the PC, then switch it back?

Kind of like controlling B4D4.

 

And then:

 

How do you warp The PC to a diferent Module?

 

last but not least.

 

How do I set up custom modules, so when the Pc walks to a certain area, to move to the next?

Link to comment
Share on other sites

They are a lot of ways to warp you. First of all my favourite build-in dialog teleporter. Here is the basic spipt:

// Start a new module called "601dan"
void main()
{
   StartNewModule("603dan");
}

Here is script that will teleport you on specific waypoint (my favourite):

// Start new module called 012abc on waypoint 012abc_1
void main()
{
         StartNewModule("012abc","sw_012abc_1");
}

Here is script to play movie when teleporting:

void main()
{
// Send you to the your 603dan after
// the movie's name is "credits"
StartNewModule("603dan","", "credits");
}

Now just attach your script to new reply (create it).

Other way is extremely easy. It is with doors

Open your *.git file, find Door List, Now see "LinkedToModule"? Set in it's Value(s) your module's name (like 101per). TransitionDestin. Set in it's StringRef row in your Dialog.tlk. It will be dispayed when you will open the door. It is very often uses in KI.

Link to comment
Share on other sites

For the first: if you're talking about K2 you'll need to fix a bug in globalcat.2da; when Obsidian wiped the globalcat they accidentally deleted the 3 globals used by the 2 UT_ functions in this script: K_PARTY_STORED (Boolean), K_PARTY_STORE1 (Number), K_PARTY_STORE2 (Number). This isn't the prettiest or safest code but it works for what we need it to do :)

//@author: TSLRP - Dash & Razor
#include "k_inc_utility"
void StorePartyAndSetPC( int nNewPC, location lSpawn, string sTemplate = "" ){
if ( GetNPCSelectability( nNewPC ) == -1 ) {
	return;
}

  	UT_StoreParty();

object oNPC = OBJECT_INVALID;

if( sTemplate != "" ){
	oNPC = CreateObject( OBJECT_TYPE_CREATURE, sTemplate, lSpawn );
}
if( oNPC == OBJECT_INVALID ){
	oNPC = SpawnAvailableNPC( nNewPC, lSpawn );
}

AssignCommand( oNPC, ClearAllActions() );
AddAvailableNPCByObject( nNewPC, oNPC );

//switch the PC to the NPC
SwitchPlayerCharacter( nNewPC );
}

void RestorePartyAndResetPC(){
SwitchPlayerCharacter( NPC_PLAYER );
UT_RestoreParty();
}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...