ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Getting Co-Ordinates based on Session ID? (Sdk)
Getting Co-Ordinates based on Session ID? // Sdkandon m. colemanAug 3, 1999, 6:53pm
if (msg2.Find("follow me") >=0)
{ /* if (msg2.Find("follow me") >=0) <FIGURE OUT HOW TO RETRIEVE SESSION CO-ORDS> */ } That's what I have so far =P Can you help me here? Thanks, Andon Coleman walter knupeAug 3, 1999, 7:53pm
All you can do is store the coords for each session id when you get them in
your aw_avatar_add and aw_avatar_change events in some kind of array or list, and then retrieve them using the session id as needed. Walter aka Faber Andon M. Coleman <gizmo98 at earthlink.net> schrieb in im Newsbeitrag: 37a72986.0 at homer... > if (msg2.Find("follow me") >=0) > { > /* if (msg2.Find("follow me") >=0) <FIGURE OUT HOW TO > RETRIEVE SESSION CO-ORDS> */ > } > > That's what I have so far =P > > Can you help me here? > > Thanks, > Andon Coleman > > walter knupeAug 4, 1999, 4:17pm
If you using a list instead of an array, you have no problesm with an
unpredicted increase in the avatar number, but since you can specify the maximum number of avatars your're interested in, you can use an array pretty save. 50 avatars is default, so a 50 entries sized array should be pretty safe :) Walter aka Faber Andon M. Coleman <gizmo98 at earthlink.net> schrieb in im Newsbeitrag: 37a86911.0 at homer... > That would seem to take up extra memory, and an unpredicted overflow in > the size of the array would cause an access violation error . . . > > Shouldn't there be a way to retrieve them by calling an SDK function, > Roland? How does the AW Client do it? > > -Andon Coleman > > andon m. colemanAug 4, 1999, 5:36pm
That would seem to take up extra memory, and an unpredicted overflow in
the size of the array would cause an access violation error . . . Shouldn't there be a way to retrieve them by calling an SDK function, Roland? How does the AW Client do it? -Andon Coleman tom russellAug 4, 1999, 10:33pm
Here's a way to keep track of avatars in the area of your running instance.
I think this applies to what you're doing. It's a code snippet from Ed Sumerfield's AWCPP wrapper. #include <map> using namespace std; typedef struct { AvatarThem *avatar; // this is an object with members for session, position, etc. void *context; // just space to store relevant info. } StoreContent; typedef map <int, StoreContent *, less<int> > AvatarStorage; [View Quote] dthknightAug 5, 1999, 1:11am
|