Quote: Posted 05/29/04 04:47:19 (GMT) by bloboj
Quote: Posted 05/29/04 04:39:45 (GMT) by Georg Zoeller
You need to call GetEnteringObject about 1 time per trigger. So what would be the advantage of typing
oEnter = this.EnteringObject
to
oEnter = GetEnteringObject
there is no advantage to it. Yes, it looks more modern and such, but that's hardly anything that would justify framework rewrites and retraining people.
Well, you've answered Enigmatic's question, I suspect, but there is another problem with calling GetEnteringObject in a script. You can't use the same script in an OnEnter script or a OnDamaged script.
How about a function like: GetTriggeringObject, or maybe a GetPrimaryTriggeringObject and GetSecondaryTriggeringObject. The meaning of these functions would then vary depending on where the script was placed.
I can't really argue that this would be more "modern", though. It's simpler and more elegant, but it might also be more confusing for a newbie scripter. Perhaps you'd want a
#define GetEnteringObject GetPrimaryTriggeringObject
somewhere.