Jump to content

Home

Puppet mod


Darth Weasel

Recommended Posts

I'm working on making a puppet mod for TSL, and currently I'm working on making the script that assigns it to a party member. Unfortuantly whenever I try to assign it to a party member, the script wont compile. Here's the script.

 

void ST_GivePuppet(NPC_KREIA, PUP_OTHER1, "st_puppet1") {

string sTag = "";

switch (nNPC) {

case NPC_ATTON: sTag = "atton"; break;

case NPC_BAO_DUR: sTag = "baodur"; break;

case NPC_CANDEROUS: sTag = "mand"; break;

case NPC_G0T0: sTag = "g0t0"; break;

case NPC_HANDMAIDEN: sTag = "handmaiden"; break;

case NPC_HK_47: sTag = "hk47"; break;

case NPC_KREIA: sTag = "kreia"; break;

case NPC_MIRA: sTag = "mira"; break;

case NPC_T3_M4: sTag = "t3m4"; break;

case NPC_VISAS: sTag = "visasmarr"; break;

case NPC_HANHARR: sTag = "hanharr"; break;

case NPC_DISCIPLE: sTag = "disciple"; break;

}

 

object oOwner = GetObjectByTag(sTag);

if (GetIsObjectValid(oOwner) && IsObjectPartyMember(oOwner)) {

location lLoc = Location(GetPosition(oOwner) + AngleToVector(GetFacing(oOwner)) * 2.0, GetFacing(oOwner)-180.0);

 

AddAvailablePUPByTemplate(nPUP, sTemplate);

AssignPUP(nPUP, nNPC);

object oPUP = SpawnAvailablePUP(nPUP, lLoc);

AddPartyPuppet(nPUP, oPUP);

 

SetNPCAIStyle(oPUP, NPC_AISTYLE_PARTY_SUPPORT);

}

}

 

Does anyone know whats wrong with it?:confused:

Link to comment
Share on other sites

The reason I asked was first off..the script you're showing is missing the the last few lines of stoffe's script...starting with the 'void main()' and the givepuppet function.. Second..did you take note of stoffe's note regarding the need to include the four .nss script files that need to be saved where your nwnnsscomp.exe compiler is i.e. Kotor Tool...assuming that is what you're using.

Link to comment
Share on other sites

Alright I tried what you said and I still got an error message. It said something about a bunch of the functions (Like switch for example) were invalid. Can anyone explain why this might be, maybe send me a script to assign this to Kreia? (Or if possible the main PC. That's who the puppet was intended for but due to certain limitations I've encountered I haven't been able to set a puppet to the PC.)

Link to comment
Share on other sites

  • 3 months later...

Alright I know I said that this mod would be released soon but somethings came up. If it wouldn't be too much of a bother could someone send me a script to assign a puppet character to T3-M4? I'll make the neccesary changes to the script to make it work with the puppets template. After that this mod will be for the most part done...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...