Mulligan Maskelyne
Registered User
Join date: 30 Jan 2009
Posts: 6
|
12-21-2009 01:20
I made this little script help me send a message out to everyone in sims for help and control but I was wonder if there was anyway get it to work in a hud, I try setting it up but it won't said dialog when I have it in a hud can anyone help me Thank ahead of time string msg; string SetText; string text;
default { state_entry() { llListen(45,"",llGetOwner(),""); }
listen(integer channel,string name,key id,string msg) { if(llGetSubString(msg,0,2) == "msg:") { SetText = llToLower(llGetSubString(msg,4,llStringLength(msg))); llOwnerSay("Board message was set to "+ SetText +"."); text = SetText; } if(llGetSubString(msg,0,0) == "s") { llSensor("", NULL_KEY, AGENT, 96, PI); } } sensor(integer count) { integer i; for(i = 0; i < count; ++i) { llDialog(llDetectedKey(i), text, ["Ok"], 12345); } } }
|
Pete Olihenge
Registered User
Join date: 9 Nov 2009
Posts: 315
|
12-21-2009 01:27
You set the listen channel to 45, but the dialog sends on channel 12345. You've probably changed this for listing, but also neither of the two tests in the listen event will pick up on the "Ok" message the dialog will send. And I hope the people you're planning to spam have agreed to it.
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
12-21-2009 01:31
sensors in attachments won't detect the wearer, you won't get the dialog. additionally if(llGetSubString(msg,0,2) == "msg:"  can never be true, because "msg:" is four characters... needs to be 0 to 3, or better yet re write as if (!llSubStringIndex( msg, "msg:" )) which will tell you if msg starts with your desired string. or not.
_____________________
| | . "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... | - 
|
Mulligan Maskelyne
Registered User
Join date: 30 Jan 2009
Posts: 6
|
12-21-2009 10:26
Yea I have a system setup were your able mute/allow this.. I'm not just spam any random person xD Also yea I saw that I messed up on 2 in (if(llGetSubString(msg,0,2) == "msg:"  ) I change the type command around and forgot replace it to a 0,3 but I'll change it around to if (!llSubStringIndex( msg, "msg:" )) Thanks for help xD
|