Activeworlds Forums

Go Back   Activeworlds Forums > SDK and Programming > AWSDK

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-10-2009, 05:02 AM
coocoochen coocoochen is offline
Citizen
 
Join Date: Sep 2008
Posts: 14
Default HUD problem

Hi,

When I try to display HUD by bot, it displayed sometimes but disappeared in another time. But when I select the ground(edit texture) or use "Freelook mode", the HUD picture will be always displayed, it's really strange.

Does anybody know this problem? Thank you so much!

Attached screen capture:


No HUD displayed



Displayed while editing terrain


Displayed while using "Freelook mode"


My code: (I think it's no problem)
aw_int_set (AW_HUD_ELEMENT_ORIGIN, AW_HUD_ORIGIN_BOTTOM_RIGHT); //AW_HUD_ORIGIN_TOP_LEFT AW_HUD_ORIGIN_BOTTOM AW_HUD_ORIGIN_CENTER
aw_int_set (AW_HUD_ELEMENT_FLAGS, AW_HUD_ELEMENT_FLAG_CLICKS | AW_HUD_ELEMENT_FLAG_STRETCH);//AW_HUD_ELEMENT_FLAG_HIGHLIGHT |
//aw_int_set (AW_HUD_ELEMENT_FLAGS, AW_HUD_ELEMENT_FLAG_STRETCH);

aw_int_set (AW_HUD_ELEMENT_COLOR, RGB (255, 255,255));
aw_int_set (AW_HUD_ELEMENT_TEXTURE_OFFSET_X, 0);
aw_int_set (AW_HUD_ELEMENT_TEXTURE_OFFSET_Y, 0);
aw_int_set (AW_HUD_ELEMENT_TYPE, AW_HUD_TYPE_IMAGE);

aw_float_set (AW_HUD_ELEMENT_OPACITY, 0.9f);

aw_int_set (AW_HUD_ELEMENT_Z, 1);

aw_int_set (AW_HUD_ELEMENT_SESSION, session);

aw_int_set (AW_HUD_ELEMENT_ID, 203 );
aw_int_set (AW_HUD_ELEMENT_SIZE_X, 380); //380
aw_int_set (AW_HUD_ELEMENT_SIZE_Y, 260); //217
aw_int_set (AW_HUD_ELEMENT_X, -180);
aw_int_set (AW_HUD_ELEMENT_Y, -109);
aw_string_set (AW_HUD_ELEMENT_TEXT, "HUD_DlgQC2.png" );

int rc =aw_hud_create ();
if (rc!=0)
{
cout<<"Could not create control HUD:"<<rc<<endl;//my_flog.LogLine("Could not create HUD: %i", 0, rc);
}
else
{
cout<<"Create hud success."<<endl;
}
Reply With Quote
  #2  
Old 10-10-2009, 05:31 AM
Bruce Flea Bruce Flea is offline
Citizen
 
Join Date: Jul 2008
Posts: 282
Default

I've never seen this.

What build numbers are used (browser/sdk)?

Where do you create the HUD? (AW_EVENT_AVATAR_ADD?)

Is the bot in global mode?

...
Reply With Quote
  #3  
Old 10-12-2009, 12:16 AM
coocoochen coocoochen is offline
Citizen
 
Join Date: Sep 2008
Posts: 14
Default

Quote:
Originally Posted by Bruce Flea View Post
I've never seen this.

What build numbers are used (browser/sdk)?

Where do you create the HUD? (AW_EVENT_AVATAR_ADD?)

Is the bot in global mode?

...
Hi Bruce,
My AW browser build number is 1088(AW 5.0 version), and SDK in 77(4.2 version), but I also met this problem with previous versions;
I create the HUD in AW_EVENT_AVATAR_ADD event, also in AW_OBJECT_CLICK event;
The bot is running in global mode.

That's all, I wonder if you know what's the problem... tks
Reply With Quote
  #4  
Old 10-12-2009, 08:22 AM
Bruce Flea Bruce Flea is offline
Citizen
 
Join Date: Jul 2008
Posts: 282
Default

Are you passing aw_int(AW_AVATAR_SESSION) to the session variable?
Reply With Quote
  #5  
Old 10-13-2009, 12:53 AM
coocoochen coocoochen is offline
Citizen
 
Join Date: Sep 2008
Posts: 14
Default

Quote:
Originally Posted by Bruce Flea View Post
Are you passing aw_int(AW_AVATAR_SESSION) to the session variable?
Bruce, sure I did
Reply With Quote
  #6  
Old 10-13-2009, 07:21 AM
chrispeg chrispeg is offline
AW Staff
 
Join Date: Oct 1998
Posts: 701
Default

coocoochen, please contact Activeworlds Support.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -3. The time now is 07:33 PM.