The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

> Adding kits with an ingame NPC
St_Vitruvius
post Apr 27 2007, 09:36 AM
Post #1





Forum Member
Posts: 5
Joined: 11-October 06




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:

CODE

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?

EDIT: SConrad and jastey both helped me on SHS and G3 respectively, both pointing me at:

CODE

ActionOverride(Player1,AddKit(I:Kit*KIT))


Now the class-name and the kit description is both missing..

Sincerelly
St_Vitruvius

This post has been edited by St_Vitruvius: Apr 27 2007, 10:02 AM
Go to the top of the page
 
Quote Post
 
Start new topic
Replies
St_Vitruvius
post May 1 2007, 06:09 PM
Post #2





Forum Member
Posts: 5
Joined: 11-October 06




I solved the problem! The solution was to make the NPC set a global variable in the d-file:

CODE

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:

CODE

IF
Global("SRPlayer1Elf_Knight","GLOBAL",1)
THEN
RESPONSE #100
SetGlobal("SRPlayer1Elf_Knight","GLOBAL",2)
ActionOverride(Player1,AddKit(SRElven_Knight))
SmallWait(5)
PauseGame()
END
Go to the top of the page
 
Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 23rd June 2025 - 07:20 PM