WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Two questions (networking) (https://forum.worldviz.com/showthread.php?t=1948)

TrashcanPatrol 04-02-2009 02:15 PM

Two questions (networking)
 
Hi, I'm creating a Vizard file in which I have two people connect online and are able to chat and view each other's avatars.
I have a few questions about what can be done with networking...
The first question is, is there any way that you are able to have multiple avatars selectable by each of the players?
The second question is, is there any way to have the two players spawn up at different points?
Also, would it be possible to change an avatar's actions to somehow move whenever someone moves? For example, if I am using vcc_male and I press Up to move (I have the vizcam.FlyNavigate on), when I move forward the other person would see my avatar's legs move in the animation set for the avatar. When I stop moving forward, the other person sees my avatar resume the "standing", regular animation. Is that possible?
That's about all I can think of for now... hope they made sense because what I'm trying to say might not have come out right.

TrashcanPatrol 04-02-2009 02:57 PM

One more thing, is there any way I can have the inbox and outbox text use word wrap so it does not go through the screen and become unviewable? I'm basing the model for this file off of the Duck network chat tutorial, if that makes it easier...

Jeff 04-03-2009 01:40 PM

If you want the user to choose from one of several avatars once that user chooses their avatar send that data over and then the other user can load the appropriate avatar.

There are probably a few ways to solve your second question. One easy way might be to use a timer and if the avatar has not changed position for a certain length of time change the animation

This will move the text down to the next lext after if has reached 10 characters

Code:

if len(draft_text) == 10:
        draft_text += '\n '


TrashcanPatrol 05-05-2009 02:07 PM

Quote:

Originally Posted by Jeff (Post 7581)
If you want the user to choose from one of several avatars once that user chooses their avatar send that data over and then the other user can load the appropriate avatar.

There are probably a few ways to solve your second question. One easy way might be to use a timer and if the avatar has not changed position for a certain length of time change the animation

This will move the text down to the next lext after if has reached 10 characters

Code:

if len(draft_text) == 10:
        draft_text += '\n '


This does work, but it moves the text down only once- if you type a long message, it will push it down once but the next time you reach the 10th character it lets it go... is there anything I can do to fix that?

Jeff 05-06-2009 02:07 PM

This will add a newline for every ten characters you type. Add 11 each time because one is the newline.
Code:

if len(draft_text) in (10,21,32):
        draft_text += '\n'

change the draft_text variable to be an empty string
Code:

draft_text = ''
when it's created and everything should line up

TrashcanPatrol 05-07-2009 01:46 PM

Quote:

Originally Posted by Jeff (Post 7810)
This will add a newline for every ten characters you type. Add 11 each time because one is the newline.
Code:

if len(draft_text) in (10,21,32):
        draft_text += '\n'

change the draft_text variable to be an empty string
Code:

draft_text = ''
when it's created and everything should line up

That does work, thanks.
Where would I find more information and options about the text like that? I've gone through the Vizard tutorials but I don't seem to remember that at all... and I don't want to have to trouble you guys every time I have a question about it :o


All times are GMT -7. The time now is 03:43 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC