Ok it should actually be:
//Put this script OnEnter
void main()
{
object oPC = GetEnteringObject();
object oTarget = GetObjectByTag("PickQuest");
location lLocation = GetLocation(oTarget);
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(oPC, GetTag(oTarget));
if (DoOnce==TRUE) return;
SetLocalInt(oPC, GetTag(oTarget), TRUE);
if (GetLocalInt(oPC, "PickQuest")== TRUE)
{
CreateObject( OBJECT_TYPE_ITEM,"pick", lLocation);
}
}
The reason for this is that OBJECT_SELF as originally written refers to the trigger and we actually want to refer to the waypoint which is tagged PickQuest. Should be good to go now.
By the way I usually stick to True or False if it's just a yes or no answer, while it is not wrong to use 1 it is sometimes confusing, though 1 is the same as saying True, it is, I think better to keep things as clear and as simple as possible.
Also to be as clear a possible you should not say a waypoint called PickQuest. You should use name, or tag, or resref when referring to items, creatures, etc... as they can all be different. So a waypoint with the tag PickQuest.
Modifié par ffbj, 04 septembre 2011 - 12:06 .