Hey!
I was trying my skills at scripting today, as my ordinary scripter is away. It didn't go well, lol. So, I thought I'd present my problem to you, the REAL scripters
'>
Basically there are two steps; one special faction and one script. I created a special faction for the creature in mind, and then the script that is OnEnter in the area the creature lives.
The faction is hostile to all creatures and PC's. Here's how it should work:
Upon entering the Baelnorn's home, the creature attacks all but elves and half-elves.
The problem I have is that when an elf enters the encounter trigger, nothing happens; no Baelnorn spawns. But, when a non-elf enters, the Baelnorn spawns and attacks, as it should. What did I do wrong? Here's the script I made:
object oTarget;
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if ((GetRacialType(oPC)==RACIAL_TYPE_ELF)||
(GetRacialType(oPC)==RACIAL_TYPE_HALFELF))
{
oTarget = GetObjectByTag("Baelnorn");
AdjustReputation(oPC, oTarget, 100);
}
}
Can you please help me figure out why the elf PC doen't spawn the Baelnorn?
Thanks for your time
'>
-Snottling