I've had troubles with two onhearbeat scripts, one that keeps damaging you when you enter an area or trigger and one that rewards you, as long as you are within the area/trigger.
The issue is when I leave the area or trigger, they keep firing. I am not quite sure how to stop it.
Be it either within the script itself or another onexit script that stops it, I would appreciate the help.
Here's an example of what I used: (I used it on onheartbeat event of the area/trigger)
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
if (GetItemPossessedBy(oPC, "Item01")!= OBJECT_INVALID)
RewardPartyXP(10, oPC, FALSE);
I usually download already made scripts for different purposes and learn from them, but the ones I found are far to complex to be used for such a simple event. Thanks in advance.