Im not a very good scripter but i created this sysetm that was designed to reward the player when a npc entered a trigger. The problem i am having is i want the trigger to be run when the npc enters the trigger via its unique tag, and I dont have any clue how to do that. would anyone know how I could change it to grab the npc instead?
The issue right now is that the trigger will run regardless if the npc is nearby or not so it repeats, or loops infinitely.
The script is here below
void main()
{
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Have "NPC_Help" say something.
AssignCommand(GetObjectByTag("Sad_Help"), SpeakString("<Insert End Dialogue Here>"));
// Give 12 gold (to party) to the PC.
GiveGoldToAll(oPC, 12);
GiveXPToAll(oPC, 80);
// Destroy an object (not fully effective until this script ends).
DestroyObject(GetObjectByTag("Sad_Help"));
ah thats what it was! as i understand this the object is the target that is entering the trigger, we get the target by its tag and the rest is history it seems thank you for the help Aqvilinus! you just saved me a weeks worth of a headache of trying to figure it out on my own
so i added a combination of your script with my own, and it now works. Im not sure why it didnt compile, it just gave me an error and didnt look at it thoroughly at the time.