Hi all,
I'm trying to add a companion to my party. I have the following for scripts set up in the actions node of the conversation;
ga_roster_add_object
ga_roster_selectable
ga_roster_party_add
ga_reset_level
I got this from: http://www.nwn2tools.../companion.html
The companion gets added ok, but he won't follow my PC. If I switch and use him as the lead then my PC follows fine. He doesn't appear to attack either from what I can see. I've tried broadcasting commands to him but to no avail.
I have checked his default scripts and he has none listed which I'm pretty sure is the problem. How do I know which scripts go into which event?
I've had a look around for some tutorials on this but nothing seems to fit what I'm after.
Premier2k
Adding companions to party
Débuté par
Premier2k
, janv. 02 2012 09:20
#1
Posté 02 janvier 2012 - 09:20
#2
Posté 02 janvier 2012 - 09:25
When you create a blueprint that you want to be a companion, you have to put the companion scripts in the event fields on the property tabs. The easy way to do this is to go to the top of the blueprints secion, choose import, and import the companion scripts. If you have troubles finding the right scripts, just look at neeshka or Khelgar's scripts to see what I mean.
#3
Posté 02 janvier 2012 - 09:30
OK, thanks again M. Rieder
#4
Posté 03 janvier 2012 - 04:06
If your companions dont have the behaviour scripts they wont really do much of anything with out player control.
#5
Posté 03 janvier 2012 - 04:08
//ga_super_add
#include "ginc_param_const"
#include "ginc_debug"
#include "ginc_misc"
void main(string sRoster_Name, int bSelectable = 1)
{
//ga_roster_add_object
object oCharacter = GetTarget(sRoster_Name, TARGET_OWNER);
int bResult = AddRosterMemberByCharacter(sRoster_Name, oCharacter);
//ga_roster_selectable
bResult = SetIsRosterMemberSelectable(sRoster_Name, bSelectable);
//ga_roster_party_add
object oPC = (GetPCSpeaker()==OBJECT_INVALID?OBJECT_SELF:GetPCSpeaker());
bResult = AddRosterMemberToParty(sRoster_Name, oPC);
//ga_reset_level
object oCreature = GetObjectByTag( sRoster_Name );
int nXP = GetPCAverageXP();
SetXP(oCharacter, nXP);
ForceRest( oCreature );
}
This will simplify the conversation ga_* scripts as this will be the only one you need
#include "ginc_param_const"
#include "ginc_debug"
#include "ginc_misc"
void main(string sRoster_Name, int bSelectable = 1)
{
//ga_roster_add_object
object oCharacter = GetTarget(sRoster_Name, TARGET_OWNER);
int bResult = AddRosterMemberByCharacter(sRoster_Name, oCharacter);
//ga_roster_selectable
bResult = SetIsRosterMemberSelectable(sRoster_Name, bSelectable);
//ga_roster_party_add
object oPC = (GetPCSpeaker()==OBJECT_INVALID?OBJECT_SELF:GetPCSpeaker());
bResult = AddRosterMemberToParty(sRoster_Name, oPC);
//ga_reset_level
object oCreature = GetObjectByTag( sRoster_Name );
int nXP = GetPCAverageXP();
SetXP(oCharacter, nXP);
ForceRest( oCreature );
}
This will simplify the conversation ga_* scripts as this will be the only one you need





Retour en haut






