I don't know for certain, as I've never read the code for both of those functions, maybe if you look them up you would be able to define the difference for yourself, I'd be willing to guess they both use a loop, as they both need to cycle through all objects in the area, probably...
However, get first object in shape would only need to check one object, taking the first object in the specified area, which seems like it would be far more efficient than GetNearestCreature, which would then need to calculate distance, which is definitely more CPU Intensive, as it must use the recourse hog GetDistanceBetween() function...
Hope this helps..
(Though, I'm not saying this is accurate, as I have never looked at these two functions' actual code)
Modifié par _Guile, 20 mai 2012 - 03:58 .