Failed.Bard wrote...
object GetNearestCreature(int nFirstCriteriaType, int nFirstCriteriaValue, object oTarget=OBJECT_SELF, int nNth=1, int nSecondCriteriaType=-1, int nSecondCriteriaValue=-1, int nThirdCriteriaType=-1, int nThirdCriteriaValue=-1 )
Looking at that, it looks like you're missing the nNth portion of it. You'll need to add a 1 after GetEnteringObject().
I'm surprised it didn't give an error when you compiled it with it missing that.
As LightFoot8 said default value for nSecondCriteriaType and nSecondCriteriaValue is PLAYER_CHAR_IS_ALIVE,TRUE, this is special behavior since 1.69. But this means that you wont find dead PC by this! If you want to find PC in any state you have to repeat the call with parameters for DEAD if you find OBJECT_INVALID.
Also I would not used GetEnteringObject() as a object to look from rather OBJECT_SELF. You cant be sure that it was NPC who entered trigger, it could be the PC you are looking for.
Modifié par ShaDoOoW, 31 août 2011 - 10:06 .