a Creature script for the a rogue:
case EVENT_TYPE_SPAWN:
{
SetGroupId(OBJECT_SELF, GROUP_NEUTRAL);
SetStealthEnabled(OBJECT_SELF, TRUE);
break;
}
a Trigger script:
case EVENT_TYPE_ENTER:
{
if ( IsPartyMember( GetEventCreator(ev) ) )
{
UT_TeamGoesHostile(4, TRUE);
DestroyObject(OBJECT_SELF, 0);
}
}
As a result the rogues will start attacking the player. But the stealth mode won't go a way. Player's party is geting a damage from the attacks but the patry remains in non-combatant state and won't engage in a battle. The red circles around the hostile creatures are missing. Shouldn't the stealth go a way when engaging in battle ?
I also tried to replace the UT_TeamGoesHostile with my own version of the script that will simply set the status using SetGroupId(xxx, GROUP_HOSTILE); but no change. It started to work when I removed the stealth by force using SetStealthEnabled(xxx, FALSE); in a trigger script.
Also EVENT_TYPE_COMBAT_INITIATED in creature script isn't called. At first I was trying to remove the stealth using SetStealthEnabled(OBJECT_SELF, FALSE); in that section of the script.
Modifié par BioSpirit, 20 décembre 2009 - 01:54 .





Retour en haut






