Scripting Features

  • Search existing ideas before submitting
  • Use support.secondlife.com for customer support issues
  • Keep posts on-topic
Thank you for your ideas!
(Web)sockets
As a high-performant and modern alternative to the llHTTPRequest and llRequestURL , (web)sockets would be a great addition. It will allow objects and HUD elements to have direct bi-directional communication with back-end server software. The same can be achieved with the existing HTTP methods, but it requires a lot of effort to implement. The (web)sockets would have to be proxied through the Linden Labs servers just like the HTTP requests to avoid the leaking of IP addresses. If websockets are to be used, the benefit of HTTPS certificates exist for a secure connection. I am not requesting (web)sockets in the script to act as a server like llRequestURL , but for the script to always be the client to an external server (though feel free to implement that as well!). The functions could look like: key llSocketOpen( string url /*, Other options... */ ); llSocketSend( key id, string data ); // llSocketSend does not need a 'key' to return; packets identify themselves llSocketClose( key id ); The events could look like: socket_receive( key id, string body ) {} socket_close( key id, integer code ) {} // Code would follow the standard, but code '0' could be "closed by own script". There could be events for when the socket is opened or errors, too. In that case the llSocketOpen function can be non-blocking. Example code: key handler; default { state_entry() { handler = llSocketOpen( "wss://example.com:8081" ); llSocketSend( handler, "Hello world!" ); } socket_receive( key id, string body ) { if( id == handler ) { llSocketClose( id ); } } socket_close( key id, int code ) { if( id == handler ) { if( code == 0 ) { llSay( 0, "The socket was closed by us!" ); } elseif( code > 0 && code <= 99 ) { llSay( 0, "The socket was closed by the Linden proxy with code: "+ (string)code ); } else { llSay( 0, "the socket was closed by the remote server with code: "+ (string)code ); } } } }
5
·
tracked
Creation of llSensorWithParams
With the creation of llRezObjectWithParams, which offers far more flexibility and scalability than the llRezObject/llRezAtRoot functions, I felt that it would be an excellent idea to re-visit a couple of old classic's as well: llSensor and llSensorRepeat These two have been a staple in this program for many years, however with the advent of llCastRay, as well as the Combat 2.0 suite of functions coming soon, it would be fair to at least revisit these two functions and give it a proper facelift and some TLC. In a similar spirit as llRezObjectWithParams, I would like to propose the creation of llSensorWithParams. The principle is the same as its predecessor, which will do a scan and it will return a list based on the filtered results. llSensorWithParams(list params ); *An empty list should only trigger a no_sensor event Parameters should include, but not limited to, the following: SENSOR_NAME - Object or avatar name SENSOR_KEY - group, avatar or object UUID SENSOR_TYPE - mask (AGENT_BY_LEGACY_NAME, AGENT_BY_USERNAME, ACTIVE, PASSIVE, and/or SCRIPTED) SENSOR_RADIUS - distance in meters from center, [0.0, 96.0] SENSOR_ARC – the max angle between the object's local X-axis and detectable objects, [0.0, PI] SENSOR_RATE - how often a scan is performed SENSOR_RC - Performs similar to llCastRay, however start/end vectors could be offset of both endpoints. A TRUE/FALSE flag should be made for the offset based on Global Position or with Rotation factored in. The start vector is the prim calling the Sensor event, while the end is the llDetectedPos. All other RC flags should still apply from llCast Ray SENSOR_HEALTH - Prims/Objects with OBJECT_HEALTH set. (See https://feedback.secondlife.com/combat-20/p/new-llsensor-flag-mask-object-health ) A practical application of this new function is for combat/fantasy role play sims. For example, if a player wants to do a melee attack, throw something explosive like a rocket or fireball, you could call the function as follows for a wall-safe detonation what will filter out those that are in range, but are behind cover: llSensorWithParams([ SENSOR_TYPE ,AGENT, SENSOR_RADIUS, 10, SENSOR_ARC, PI, SENSOR_RC, ZERO_VECTOR, TRUE(global), //start vector ZERO_VECTOR, TRUE(global), //end vector OTHER_FLAGS ]); These are some of the applications that can be involved with this new function. More folks might want to chip in to expand the functionality of it.
7
·
tracked
Load More
→