BioWare
BioWare Info BioWare Games Support Forums BioWare Store
BioWare Forums Home
BioWare Forums Home

Dragon Age (Old)

You are viewing a single post. Please do not take this post out of context.
Read the full topic: Scripting language - OO?

Author Scripting language - OO?
Georg Zoeller
Senior Technical Designer


Joined: 27 May 2003
From: Austin, TX
Posted: Saturday, 29 May 2004 05:11AM
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.

actually, if you want to, you can easily use one script for all events. Just message everything to a single OnUserDefined event and do the code there

int nEvent = GetUserDefinedEventNumber()

if (nEvent == 1)
{
oTarget = GetEnteringObject
}
else if (nEvent == 2)
{
oTarget = GetExitingObject
}

and so on.
_________________
georg zoeller
senior rules and systems monkey
[da | me]
My custom NWN content

ceterum censeo ambulatiuncula esse delen
  Profile: Georg Zoeller   Send Message To: Georg Zoeller

 

BioWare Store
Hide/Show

You can log in to view your messages.

Hide/Show

5,992,186 BioWare Users:
  51 Logged In
  1 Hidden
  414 Guests

9,000,788 posts in the forums

Newest Forum Topics:
1. Toolset Running Very Slow When P... (NWN2: Builders - NWN2 Toolset)

2. Edwin Romance (Baldur's Gate II Gameplay (Spoilers!))

3. Need soloing, and mod advice (Baldur's Gate Gameplay (Spoilers!))

4. Best rogue build? (NWN 1: General Discussion (No Spoilers Allowed))

5. "Sky" Covers Up Ground in Toolse... (NWN2: Builders - NWN2 Toolset)

Current time is: (set time)
Tue, 09 February 2010 05:30PM