Moni Telling Posted November 21, 2018 Share Posted November 21, 2018 is it possible to have a object send everyone a message on a region when clicked? if so how would it be scripted? Link to comment Share on other sites More sharing options...
Qie Niangao Posted November 21, 2018 Share Posted November 21, 2018 Sure. The "when clicked" part means you'd do it in the touch_start() or touch_end() event handler. The "everyone on a region" part means you'd collect everyone's keys using llGetAgentList(). The "send...on a region" part means you'd use llRegionSayTo() using channel 0. 5 Link to comment Share on other sites More sharing options...
Xiija Posted November 21, 2018 Share Posted November 21, 2018 (edited) example: string msg = "Get your bacon while it's hot!"; default { state_entry() { } touch_start(integer total_number) { list avatarsInRegion = llGetAgentList(AGENT_LIST_REGION, []); integer numOfAvatars = llGetListLength(avatarsInRegion); if (!numOfAvatars) { llOwnerSay("No avatars found within the region!"); return; } integer index; while (index < numOfAvatars) { key id = llList2Key(avatarsInRegion, index); llRegionSayTo(id, 0, "\nMessage of the Day: \n \n" + msg); string name = llKey2Name(id); // llOwnerSay("\n" + name + " [ " + (string)id + " ]"); // for debug? ++index; } } } or you could use a textbox for input Edited November 21, 2018 by Xiija 1 Link to comment Share on other sites More sharing options...
animats Posted November 21, 2018 Share Posted November 21, 2018 Note that recipients can and will add you to their block list if you spam them. Link to comment Share on other sites More sharing options...
Moni Telling Posted November 22, 2018 Author Share Posted November 22, 2018 thank you all for the response it will be no spamming its for role playing purposes Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now