Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

poofing help please

Teksah Pinazzo
Registered User
Join date: 22 May 2008
Posts: 20
10-07-2008 19:59
Can anyone help me with this?

it is a script for a halloween poofer, but it only responds to the owner (me)
How can I make it respond to anyone who types 'poof' in the open chat?
any help would be appreciated..thanks

here's the script as is...


string texture;
string keyword = "poof";


updateParticles()
{
llParticleSystem([0,256,1,<1.0,1.0,1.0>,2,1.0,5,<1,1,1>,7,8.0,9,2,12,texture,13,0.1,15,12,17,0.5,18,0.5,19,2.0]);
llSleep(2.5);
llParticleSystem([]);
}

integer channel = 0;

integer Handle;
default
{
state_entry() {
texture = llGetInventoryName(INVENTORY_TEXTURE, 0);
Handle = llListen (channel, "", llGetOwner(), "";);
}
changed(integer change)
{
if (change & CHANGED_OWNER)
llResetScript();
}

listen(integer chan, string name, key id, string msg)
{
if (msg == keyword) {
updateParticles();
} else if (llToLower(llGetSubString(msg, 0, 10)) == "set keyword";)
{
keyword = llToLower(llDeleteSubString(msg, 0, 11));
llOwnerSay("Keyword set to "+keyword);
} else if (llToLower(llGetSubString(msg, 0, 10)) == "set channel";)
{
if ((channel = ((integer)llDeleteSubString(msg, 0, 11))) < 0) channel = 0;
llOwnerSay("Chat Channel set to "+(string)channel);
llListenRemove(Handle);
Handle = llListen (channel, "", llGetOwner(), "";);
}
}
}
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
10-07-2008 20:16
you would simply remove llGetOwner from both of the llListen commands. but why a chat command? is it something that can't be touched to set it off instead?
_____________________
Dark Heart Emporium

http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020

want more layers for tattoos, specifically for the head? vote here
http://jira.secondlife.com/browse/VWR-1449?

llDetectedCollision* Functions similar to touch
http://jira.secondlife.com/browse/SVC-3369
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
10-07-2008 20:17
replace llGetOwner with ""
Teksah Pinazzo
Registered User
Join date: 22 May 2008
Posts: 20
10-08-2008 02:11
thanks for the replys....
It can be touched I suppose...I just never thought about that?..also there is three of
them (all different charaters) and to set them all off I think they will go on
on typed 'poof'....I hope :o)
Teksah Pinazzo
Registered User
Join date: 22 May 2008
Posts: 20
10-08-2008 09:44
Sucess!! thankyou both..!!!