|
HolyHell Cassell
Registered User
Join date: 2 Aug 2006
Posts: 166
|
04-01-2007 03:21
ok guys, I need a simple script that when put into a prim, and when touched, it will do a /1 say whatever by the owner. Is this possible ?  ie: prim rezzed. when the owner touches it, that prim would do a /1say I'm an oscar Meyer Hot Dog[enter] in chat. Help !!!!
|
|
AnnMarie Coronet
Registered User
Join date: 20 Nov 2006
Posts: 39
|
04-01-2007 04:06
Not the most difficult of tasks, something as simple as the following would do it. // Set the message here string gMessage = "I'm an oscar Meyer Hot Dog";
default { state_entry() { } touch_start(integer count) { if(llDetectedKey(0) == llGetOwner()) { llSay(1, gMessage); } } }
I wasn't sure if you wanted the word 'say' as part of it, though that could be included by changing the llSay to:- llSay(1, "say " + gMessage);
You didn't say wether you wanted to be able to change the message on command, so i hard-scripted it.
|
|
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
|
04-01-2007 04:56
Which will give... Object: I'm an oscar Meyer Hot Dog Or... Object: says I'm an oscar Meyer Hot Dog You could use... llSay (0,"/me says \"" + gMessage + "\""); To give... Object says "I'm an oscar Meyer Hot Dog"
|
|
AnnMarie Coronet
Registered User
Join date: 20 Nov 2006
Posts: 39
|
04-01-2007 06:53
Given the fact that the object is 'saying' on channel 1, surely it wouldn't get the 'Object:' at the start of the message?
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
04-01-2007 07:07
From: AnnMarie Coronet Given the fact that the object is 'saying' on channel 1, surely it wouldn't get the 'Object:' at the start of the message? Correct. Given that its on channel 1 I don't think the Owner will actually hear it.
|
|
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
|
04-01-2007 08:40
Could you mean that you want the object to say it, but appear as the owner is saying it? (A simple way there would be to just name the object the same thing as the owner's name). Or could you mean that you want the object to repeat what the owner is saying, and that the owner is saying it on channel 1, but the object says it on the chat (0) channel (which would just require the object to a llListen for things the owner says on channel 1, then repeats them on channel 0. Might want to rephrase in case we're not clear on this. Rj From: HolyHell Cassell ok guys, I need a simple script that when put into a prim, and when touched, it will do a /1 say whatever by the owner. Is this possible ?  ie: prim rezzed. when the owner touches it, that prim would do a /1say I'm an oscar Meyer Hot Dog[enter] in chat. Help !!!!
|
|
Gearsawe Stonecutter
Over there
Join date: 14 Sep 2005
Posts: 614
|
04-01-2007 09:52
So you want an object to control other scripted objects that only listens to the owner on channel 1. The only way you can do this is use llDialog which will give you blue dialog box that pops up then put the command in the dialog buttons. Then when the buttons are selected it makes the owner say it on the defined channel.
|
|
HolyHell Cassell
Registered User
Join date: 2 Aug 2006
Posts: 166
|
04-01-2007 21:42
From: Gearsawe Stonecutter So you want an object to control other scripted objects that only listens to the owner on channel 1. The only way you can do this is use llDialog which will give you blue dialog box that pops up then put the command in the dialog buttons. Then when the buttons are selected it makes the owner say it on the defined channel. That's EXACTLY what i needed... ok now I have a direction to go with !! Thank you Gearsawe !!
|