Open Source Platform
for interconnected virtual worlds

Content Scripting Python HUD

From RexWiki

Contents

Large text message

The following example function shows how to send a large text message to the client which shows for 5 seconds.

def EventTouch(self,vAvatar):
    hellostr = "Hello " + vAvatar.GetFullName()
    vAvatar.ShowInventoryMessage(hellostr)

Scrolling text message

The following example function shows how to send a scrolling text message to the client which shows for 15 seconds.

def EventTouch(self,vAvatar):
    hellostr = "Hello " + vAvatar.GetFullName()
    vAvatar.ShowScrollMessage(hellostr,15)

Text box message

The following example function shows how to send a scrolling text message to the client which shows for 10 seconds.

def EventTouch(self,vAvatar):
    hellostr = "Hello " + vAvatar.GetFullName() + ". How are you today? Hope you are well."
    vAvatar.ShowTutorialBox(hellostr,10)

Fade in, fade out

The following example function shows how to do fadein-fadeout. The screens fades to black in 2 seconds, stays as black for 4 seconds and fades out to normal in 6 seconds. The total time this fadein-fadeout takes is 2+4+6=12 seconds.

def EventTouch(self,vAvatar):
    vAvatar.DoFadeInOut(2,4,6)