St_Vitruvius Posted April 27, 2007 Share Posted April 27, 2007 I've been trying, unsuccesfully, to figure out how to add kits to a character in BG2 via an ingame NPC, the tutor, to the PC. The trouble is, that: AddKit(I:Kit*KIT) only adds the specified kit to the creature running the script. I want my tutor to add the kit to the pc during a dialogue, where he checks for different conditions. The dialogue and the conditions are allready in place and apparantly working just fine. I just need to figure out how to add the kit. I believe I have to make him add a script to the PC, that uses the AddKit, but I can't find a way to do that either.. Can anyone help me out? Have anyone tried doing something like this? Sincerelly St_Vitruvius Link to comment
jastey Posted April 27, 2007 Share Posted April 27, 2007 Did you try "ActionOverride(Player1, AddKit(..))" ? Link to comment
St_Vitruvius Posted April 27, 2007 Author Share Posted April 27, 2007 No, but I did now.. Thanks.. Do you know why the class-name and the kit description is missing? There's just a black field.. And do you know how to get them back? Link to comment
St_Vitruvius Posted April 27, 2007 Author Share Posted April 27, 2007 It might be helpfull if I deisplayed the contents of the tp2 and the d, so I've posted it on TeamBG where I've asked for help too.. (It's much easier to see what's going on as it doesn't wrap long lines of code..) Link to comment
St_Vitruvius Posted May 1, 2007 Author Share Posted May 1, 2007 I solved the problem! The solution was to make the NPC set a global variable in the d-file: IF ~~ THEN BEGIN yesAkhVelar SAY @22 IF ~~ THEN DO ~SetGlobal("SRPlayer1Elf_Knight","GLOBAL",1)~ EXIT END And then, adding a script to the NPC doing the rest: IF Global("SRPlayer1Elf_Knight","GLOBAL",1) THEN RESPONSE #100 SetGlobal("SRPlayer1Elf_Knight","GLOBAL",2) ActionOverride(Player1,AddKit(SRElven_Knight)) SmallWait(5) PauseGame() END Link to comment
Mike1072 Posted May 8, 2007 Share Posted May 8, 2007 I'm doing the exact same thing you are right about now, and I don't see why your first bit of code wouldn't work. Mine is identical aside from the ActionOverride targeting LastTalkedToBy() instead of Player1 and it's working great. Your solution isn't excessively complicated, though. EDIT: The last 4 hours of my life have been wasted trying to figure out what I was doing incorrectly with my ActionOverride(LastTalkedToBy(),AddKit(SWASHBUCKLER) action when the problem was instantly fixed with BG2 Fixpack's Super Happy Fun Lucky But-Kind-of-Annoyed-They-Didn't-Find-This-Earlier Modder Pack component. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.