Darth Weasel Posted April 11, 2010 Share Posted April 11, 2010 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? Link to comment Share on other sites More sharing options...
newbiemodder Posted April 11, 2010 Share Posted April 11, 2010 Did you follow stoffe's tutorial on puppets? http://www.lucasforums.com/showthread.php?t=151438&highlight=puppets Link to comment Share on other sites More sharing options...
Darth Weasel Posted April 12, 2010 Author Share Posted April 12, 2010 Uh yeah I did. In fact this is one of the scripts from that turtorial. Unfortuantly when I tried to compile it... nothing. Link to comment Share on other sites More sharing options...
newbiemodder Posted April 12, 2010 Share Posted April 12, 2010 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 More sharing options...
Darth Weasel Posted April 12, 2010 Author Share Posted April 12, 2010 Thats kind of strange, especially since I copied and pasted the script on, and yes I did extract the four .nss scripts. Link to comment Share on other sites More sharing options...
Darth Weasel Posted April 14, 2010 Author Share Posted April 14, 2010 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 More sharing options...
newbiemodder Posted April 15, 2010 Share Posted April 15, 2010 You cannot link a puppet to the PC only to party members. Link to comment Share on other sites More sharing options...
Darth Weasel Posted April 15, 2010 Author Share Posted April 15, 2010 Yeah that's what I thought, but I was hoping that there may be a way around that without breaking the law. Maybe some intense scripting or something like that as I'm not really sure of scriptings limitations. Link to comment Share on other sites More sharing options...
Hope Estheim Posted April 15, 2010 Share Posted April 15, 2010 You can make an NPC follow the PC and function like a puppet though... Link to comment Share on other sites More sharing options...
Darth Weasel Posted April 16, 2010 Author Share Posted April 16, 2010 You can make an NPC follow the PC and function like a puppet though... What exactly do you mean like that? Like the Call of Aid mod where the NPC doesn't count as a puppet but still follows the main PC? Link to comment Share on other sites More sharing options...
Hope Estheim Posted April 16, 2010 Share Posted April 16, 2010 Yes... that is exactly what I mean... and you can set it's field to Friendly_1 and it'll attack with your party members Link to comment Share on other sites More sharing options...
Darth Weasel Posted April 16, 2010 Author Share Posted April 16, 2010 not a bad idea... I'll try it out. Link to comment Share on other sites More sharing options...
Hope Estheim Posted April 16, 2010 Share Posted April 16, 2010 Haha... good luck Darth. (: (lmfao I can't resist) May the Tools serve you well. Link to comment Share on other sites More sharing options...
Darth Weasel Posted April 20, 2010 Author Share Posted April 20, 2010 Alright. I'm pleasantly suprised to say that this mod could very well be finished soon. There are only a few problems with scripting (as that is not my strong suit) but they are slowly being resolved. Link to comment Share on other sites More sharing options...
Darth Weasel Posted August 19, 2010 Author Share Posted August 19, 2010 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.