Board ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
ununduil // User Search
ununduil // User SearchProblems with updatingNov 18, 2002, 1:48am
AW_AVATAR_CHANGE is not being re-called after a citizen bounces,
When a citizen first enters it can pick up all the changes being made but after the citizen leaves and reenters , the bot does not detect any changes (like avatar changes). Do I need to refresh? If so how? Problems with updatingNov 19, 2002, 10:00pm
no its not that the call backs are getting messed up , there are no call
backs being used what I am trying to do is restrict anyone but my citizen number from using avatar 3 I have done the check when they enter or when it detects an avatar changes it can catch both no problem but if they leave the world and come back in it is almost like they get ignored now by the bot, and it does not pick up any avatar changes. if you want I can post the code if you think that will help.... [View Quote] Problems with updatingNov 21, 2002, 1:50am
I am also checking AW_AVATAR_ADD,
but I am not maintaining a session table I am merely getting the session as they change and altering the AV if needed. Should I be maintaining a session table haha sorry first time with the SDK, still learning the IN's and OUT's of it. But I do appreciate all the help. [View Quote] Problems with updatingNov 22, 2002, 8:13pm
Here is the code with, the citnumber world and PrivPass are garbage
*obviously* maybe I am overlooking something really dumb... god I hope so lol #include "aw.h" #include <stdio.h> #include <stdlib.h> void handle_avatar_add (void); void handle_avatar_change (void); void handle_avatar_delete (void); void set_avatar(int session,int type,int gesture); main (int argc, char *argv[]) { int rc; /* check command line if (argc < 3) { printf ("Usage: %s number password\n", argv[0]); exit (1); }*/ if (rc = aw_init (AW_BUILD)) { printf ("Unable to initialize API (reason %d)\n", rc); exit (1); } aw_event_set (AW_EVENT_AVATAR_ADD, handle_avatar_add); aw_event_set (AW_EVENT_AVATAR_CHANGE, handle_avatar_change); aw_event_set (AW_EVENT_AVATAR_DELETE, handle_avatar_delete); if (rc = aw_create (0, 0, 0)) { printf ("Unable to create bot instance (reason %d)\n", rc); exit (1); } //aw_int_set (AW_LOGIN_OWNER, atoi (argv[1])); aw_int_set (AW_LOGIN_OWNER, 12345678); //aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, argv[2]); aw_string_set (AW_LOGIN_PRIVILEGE_PASSWORD, "wouldn't you like to know"); aw_string_set (AW_LOGIN_APPLICATION, "Bot"); aw_string_set (AW_LOGIN_NAME, "Bot"); aw_bool_set (AW_ENTER_GLOBAL,true); if (rc = aw_login ()) { printf ("Unable to login (reason %d)\n", rc); exit (1); } if (rc = aw_enter ("beta")) { printf ("Unable to enter world (reason %d)\n", rc); exit (1); } aw_int_set (AW_MY_X, 1000); /* 1W */ aw_int_set (AW_MY_Z, 1000); /* 1N */ aw_int_set (AW_MY_YAW, 2250); /* face towards GZ */ if (rc = aw_state_change ()) { printf ("Unable to change state (reason %d)\n", rc); exit (1); } while (!aw_wait (-1)) ; aw_destroy (); aw_term (); return 0; } void handle_avatar_add (void) { aw_state_change (); char message[256]; sprintf (message, "Hello %s, welcome to beta",aw_string (AW_AVATAR_NAME)); aw_whisper (aw_int (AW_AVATAR_SESSION), message); printf ("avatar_add: %s %d\n", aw_string (AW_AVATAR_NAME),aw_int(AW_AVATAR_SESSION)); if (aw_int(AW_AVATAR_CITIZEN) != 12345678 && aw_int(AW_AVATAR_TYPE) == 3) { set_avatar(aw_int (AW_AVATAR_SESSION),0,0); } } void set_avatar (int session, int type, int gesture) { aw_int_set (AW_AVATAR_TYPE, type); aw_int_set (AW_AVATAR_GESTURE, gesture); if (aw_avatar_set (session)) printf ("Unable to set avatar for session %d\n", session); else printf ("Set avatar for session %d\n", session); } void handle_avatar_change (void) { if (aw_int(AW_AVATAR_CITIZEN) != 12345678 && aw_int(AW_AVATAR_TYPE) == 3) { set_avatar(aw_int (AW_AVATAR_SESSION),0,0); } } void handle_avatar_delete (void) { printf ("%s has left the scene\n", aw_string (AW_AVATAR_NAME)); } Problems with updatingNov 23, 2002, 5:39am
Bloody hell, at least I know I am not crazy lol thanx for all your help, I
realize the world server stuff but maybe that was it. Callbacks in MFCDec 6, 2002, 9:21pm
I am having some difficulties getting callbacks to work correctly in MFC
Callbacks in MFCDec 6, 2002, 9:24pm
Woops hit enter to quick on that one hehe, anyways
I have registered them in the dialog init and have a static member function acting as the callback function, but it never seems to get called, I can't seem to get the silly thing going, any help would be greatly welcomed. Thanx in advance Ununduil |