Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Timed Speech

Alberrt Steptoe
Second Life Resident
Join date: 31 Oct 2004
Posts: 19
03-09-2009 04:27
Hi,

Wondering if anyone can help.

What I am after doing is making my AV speak every x minutes on a certain channel.

So for example I would say /20 TEST every 5 minutes.

I would need it to be done with out me being at the keyboard.

I can do the scripting just wondered the best way to go about this as I cant seem to find away to get my AV to speak on a certain channel with out me typing it in other than using llDialog() but then I would need to be present to click a button on the pop up box.

what would be the best way to go about this?

any ideas or suggestions would be good, Thank you.

- Alberrt
Pedro McMillan
SLOODLE Developer
Join date: 28 Jul 2007
Posts: 231
03-09-2009 04:41
You can't actually script it to make chat messages originate from your avatar, as far as I know. It will always originate from the object containing the script.
WhiteStar Magic
Build it+Script it=RUN!
Join date: 24 Jul 2008
Posts: 36
03-09-2009 05:25
Good Morning Alberrt,

I think a programmed Timer Event would be the way to go for this requirement. That being said, how to get it done...

That all depends:
- do you only want "One" statement or
- series of statements or
- changeable statements?

Is the timing consistent at 5 minutes (300 seconds) ? or do you want to vary that ?

Must this be said on a Positive Channel OR can it be said on a Negative Channel ?
_OR_
If this being communicated to an object in-world can it not use llMail or another means to "chat" to said object ?

Basic Approach:

I would set a Timer() function.
1 of 2 methods next:

Method-1
1a) Use a Touch to activate a Dialog which opens a -Channel which presents timing for 1, 5, 10 minutes. On receipt of msg close that -Channel.

1b) Another Dialog with required command possibilities that can be sent. IE: Test, Run, END

Method-2
A Touch event that would open a Channel that listens to the owner (ie: Listen_handle = llListen(20, "", llGetOwner(), "";);

With a Series of IF statements :

listen( integer channel, string name, key id, string message )
if(llSubString(message,0,4) == "TIME=";) llSetTimerEvent(llGetSubString(message,5,7));
//* where "TIME=" is the command, next 3 digits is the time on seconds 001 -> 999 *//
if(llSubString(message,0,4) == "CMND=";) ThingTOsay = llGetSubString(message,5,10);
//* where "CMND=" is the command, next 5 chars is the time on seconds word of the command to chat out*//
llListenRemove(Listen_Handle);
//* to kill active listen after receipt of command
//* else in timer event place a if(~Listen_Handle) llListenRemove(Listen_Handle);
//* which would kill the listen handle on timer trigger


After which you would close the open channel with llListenRemove(20).

Either would allow you to Set & Go the Timer Event & ThingTOsay variable, you could add extras in there to "SayONchan" for device's listening channel

It all really depends on the application and the flexibility you want and how you want to manage it. If it is a "packed" product and you only want to have a series of "fixed" commands, then using llDialog with the fixed commands (Timer Values & Messages) would be the better way to go. Not only for ease of use for the end user but to ensure reduced fault conditions.

In any case: Making an attachment that can be selected by Touch to activate, whether it's an item you wear externally OR a HUD device would help reduce open listens. Also consider having the listening object/device either listen on a -Negative channel because other active listens will ignore it and "Joe Avi" can't "chat" at it using the chat line.

Just some thoughts, Hope it Helps.
WhiteStar
_____________________
Build it, Script it & Enjoy It, then Share it !!!
Alberrt Steptoe
Second Life Resident
Join date: 31 Oct 2004
Posts: 19
03-09-2009 05:43
Ok, What I have is an object which listens for me to say a certain string on a certain channel.

So for this example lets say its listening on channel 20 for me to say 'I R DUMB'.

It does not have to be on a timer I was just using that as an example.

Now this can be achieved simply by me typing in '/20 I R DUMB'. Now this method works great but the problem I have is I want my avatar to say the above string when I am not even sat at the keyboard.

I could also set a timer and run a llDialog and have a button on the dialogue which will say 'I R DUMB' and set the channel to channel 20. again, this is great but I need to be at the keyboard to make this happen.

Now I can get another object to say my string but as mentioned in Pedro McMillan post. I can not find a way to make my Avatar speak with out me being at the keyboard.

I need my AV to talk as the object I wish to communicate with is listening only for llGetOwner().


Thanks for your replies

- Alberrt
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
03-09-2009 06:01
From: Alberrt Steptoe

I need my AV to talk as the object I wish to communicate with is listening only for llGetOwner().
Bad luck;)
_____________________
From Studio Dora
Alberrt Steptoe
Second Life Resident
Join date: 31 Oct 2004
Posts: 19
03-09-2009 06:06
From: Dora Gustafson
Bad luck;)


Yeah, Thats what I am thinking. lol
WhiteStar Magic
Build it+Script it=RUN!
Join date: 24 Jul 2008
Posts: 36
03-09-2009 07:19
Sadly, Pedro & Dora are correct that you cannot make your "physical avatar" say or do anything without you being at the keyboard. BUT.... There is always a BUT !

In the old days... (Looking up into the air in total innocence...) We used to be able to run a Macro-Engine on the Local PC which would mimic User Interaction on BBS (Bulletin Board Systems) & run extended Chat Macros for IRC clients.

I'm not sure if this is still possible (although, I don't see why not), because essentially, it would operate on the Applets Timer and enter "strings" into the ChatLine. These generally had "Hotkeys" assigned, so in an IRC you would hit, F5 and that would replay a programed sequence into IRC.

Check This out for more information: http://www.mjmsoft.com/keytext.htm

Could the SL Gesture system coded to do something like this ? as that would show it coming from YOUR AVATAR ....

Can anyone now say ... Greifing Potentials ? Dang the Old-Timers ! ;)
_____________________
Build it, Script it & Enjoy It, then Share it !!!
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
03-09-2009 09:08
You could utilise libsl and create a Bot for your purpose... So you would logout from SL, then relog your avatar as a Bot and then control the Bot from a program. Now it looks like you are online but actualy it is a program using your avatar to act in world... And other machines would not be able to tell, that the avatar is controlled by an automate...

I tried it out once and i was able to let my avatar log in to SL, say a "Welcome, i am a Bot" on the chatline and then logout again. It was sort of fun to see "myself" acting under the control of a machine and i have heard of many many people doing this trick. But honestly i do not know, what it is good for ;-( Maybe someone can tell me some cases where it is good to be a bot ;-) ???
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-09-2009 14:51
without getting into making your own custom client, you COULD use the restrainedLife viewer, which allows you to trigger several avatar functions via script (including the avatar speaking IIRC). you can limit who else can control you so as to ignore other peoples commands.

a simpler option, if you have access to the listening script, is to change the listen criteria to
if (llGetOwner() == llGetOwnerId( Id )){
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Dannoth Dagger
.
Join date: 17 Nov 2007
Posts: 141
03-09-2009 16:15
You're all talking about scripts, when surely you would be able to do this using a gesture?
In the gesture make the gesture wait 5 minutes, then say /20 test, then wait another 5 minutes, etc.

Surely that would work?
_____________________
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-09-2009 21:39
a gesture can't reference itself, so it'll be noncontinuous (though you could put in several repeats) there may be limits on how long of an action it can take too (not sure, never tested).
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Alberrt Steptoe
Second Life Resident
Join date: 31 Oct 2004
Posts: 19
03-10-2009 00:33
Ok, I think I shall have to settle on a gesture and using a wait. Didn't really want to use that but I can get quite a few minutes away from keyboard at a time.

Thank you for your replies

- Alberrt
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-10-2009 17:58
don't let restrainedLife scare you, you don't have to use it for it's intended purpose, it's a free download, and it's not like anyone will know you're using it.
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
madddyyy Schnook
SLGuides Virtual Worlds
Join date: 2 Jan 2006
Posts: 207
03-13-2009 07:51
From: Void Singer
don't let restrainedLife scare you, you don't have to use it for it's intended purpose, it's a free download, and it's not like anyone will know you're using it.


The only thing with restrained i thought was attachments. does it not allow you to not have them or i am i getting mixed up. so that gor slaves can not take stuff off wth the owner doing it or permission to.
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
03-13-2009 08:49
From: Void Singer
don't let restrainedLife scare you, you don't have to use it for it's intended purpose, it's a free download, and it's not like anyone will know you're using it.


Your a closet bondage freak :)

but to be serious, yes this viewer can do that, and more.

It depends on if you want to sidetrack to useing a non standard viewer.
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
03-13-2009 08:51
From: Void Singer
don't let restrainedLife scare you, you don't have to use it for it's intended purpose, it's a free download, and it's not like anyone will know you're using it.


I use it and i dont hide the fact :)

but it does depend on your target market
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-13-2009 12:13
From: madddyyy Schnook
The only thing with restrained i thought was attachments. does it not allow you to not have them or i am i getting mixed up. so that gor slaves can not take stuff off wth the owner doing it or permission to.

it can be configured that way, but doesn't have to be. at worst, you make yourself the only person to control you, or set restrictions.

From: Beverly Ultsch
Your a closet bondage freak :)

Closet nothing, I tell everyone I date I'm always up for a little light bondage... just maybe not on the first date (me telling them, that is)... but that's in meatspace
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -
Boreal Latte
Registered User
Join date: 15 Nov 2007
Posts: 104
You can shut me up, but not force me to talk?
03-13-2009 13:15
From: Void Singer
without getting into making your own custom client, you COULD use the restrainedLife viewer, which allows you to trigger several avatar functions via script (including the avatar speaking IIRC).


The exact set of functions is listed at:
http://wiki.secondlife.com/wiki/LSL_Protocol/RestrainedLifeAPI

There are a lot of commands to restrict avatars to chat. However, I have not been able to find any which actually forces one to say something - could be fun though.

Were you thinking on some particular command Void?

Boreal
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
03-13-2009 16:56
looks like I opened my mouth without checking. I was told that was a feature, but didn't check myself... ::facepalm::

Boreal is correct, that's not in there... but makes a fun feature suggestion
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -