1 - Resurectee's come back in combat mode - so I am setting SetCombatState (oNPC, FALSE).
2- Resurrectee's respond to UT_TeamGoesHostile by entering combat mode, but fighting with the oPC (blue ring) as opposed to against the oPC (red ring). Those that were not resurrected fight the oPC as expected.
Following is some sample code of the resurrection steps (I've added some stuff trying to work around the above issues):
======
The following will get the NPC out of combat mode and put where I want them, but they do not go hostile against oPC when UT_TeamGoesHostile is issued. Rather they fight on the side of oPC.
=======
//
// Merchants go to home waypoints, start post combat ambient
if (IsDead(oNausica)== FALSE)
{
UT_QuickMoveObject(oNausica,"ap_dmo001_party_nausica_01", FALSE, FALSE, TRUE, TRUE);
Ambient_Start(oNausica,AMBIENT_SYSTEM_ENABLED,AMBIENT_MOVE_INVALID,AMBIENT_MOVE_PREFIX_NONE,4);
}
if (IsDead(oNausica)== TRUE)
{
ResurrectCreature(oNausica);
SetCreatureGoreLevel(oNausica,1.0);
SetCombatState(oNausica,FALSE);
UT_QuickMoveObject(oNausica,"ap_dmo001_party_nausica_01", FALSE, FALSE, TRUE, TRUE);
Ambient_Start(oNausica,AMBIENT_SYSTEM_ENABLED,AMBIENT_MOVE_INVALID,AMBIENT_MOVE_PREFIX_NONE,4);
}
=====
The following is from the script which is called from a conversation to make the NPC's go hostile.
As above, I have added some things trying to get the hostility right...Ignore the word usage (trap)
as I was just reusing some other code while troubleshooting - imagine trap = npc. Note - I the process
of troubleshoot, i switched from UT_TeamGoesHostile to UT_CombatStart as per below with the same
weird results
=====
//
// Woodlanders go Hostile
UT_TeamMerge(22,60);
UT_TeamMerge(41,60);
UT_TeamMerge(42,60);
UT_TeamMerge(43,60);
UT_TeamMerge(44,60);
UT_TeamMerge(45,60);
UT_TeamMerge(46,60);
UT_TeamMerge(47,60);
UT_TeamMerge(48,60);
UT_TeamMerge(50,60);
UT_TeamMerge(71,60);
//
// Borrowed my traps code to set hostility... ;-)
object[] arTraps = UT_GetTeam(60, OBJECT_TYPE_CREATURE);
int nTrapIndex;
int nAllTrapsCount = GetArraySize(arTraps);
for ( nTrapIndex = 0; nTrapIndex < nAllTrapsCount; nTrapIndex++)
{
object oTrap = arTraps[nTrapIndex];
UT_CombatStart(oTrap,oPC);
if (GetGroupId(oTrap) != GROUP_HOSTILE)
{
SetGroupId(oTrap,GROUP_HOSTILE);
}
}
Modifié par RecklezzRogue, 22 juin 2010 - 03:04 .





Retour en haut






