ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Re: bot classes (Sdk)
Re: bot classes // SdkgrimbleMay 21, 2002, 10:01am
I'm not trying to convince you. Your comment was that it was simpler to
create bot classing C++, which is not correct. The simplest of the two options is clearly using VB. Its true that VB has no implementation of polymorphism and subclassing, but that is a totally different subject and not relevent here. You'll have to forgive me for not understanding what "I cant imagine running 2 different callbacks in the same setting for 1 AW Event, in any language." might mean. If you have more than one bot running within the same application, the application must use some mechanism to route the events to the correct bot class. The SDK cannot do it because you cannot connect the callback to a member function of the class, so it has to be outside the class. Since you can have more than one instance of the bot, some form of registration with a central "active bot instances" list is required, so that the events for a particular instance can be routed to the class representing that instance. An example would be a simple bot that tracks avatar movements. This could be instantiated twice int he same application, one for each of two worlds. Same events are registered with the SDK for both bots, but you wouldn't want the messages intended for the bot in world #1 being delivered to the bot tracking world #2. As for DLLs, since we're talking about encapsulating SDK function in a class, the DLL in question would need to expose that class in a suitable way. VB can create COM based DLLs and applications for in-process and out-of-process objects ... more easily and quicker than the same task in C++. [View Quote] |