Scripting Features

  • Search existing ideas before submitting
  • Use support.secondlife.com for customer support issues
  • Keep posts on-topic
Thank you for your ideas!
Combat 2.1 Simplified Teams Spec
This is an intentionally separate request from the full Combat 2.1 Teams request at https://feedback.secondlife.com/scripting-features/p/combat-21-teams For a reduced/simplified API surface. We don't really need the entire draft spec that Rider came up with, the core items that we truly need are: integer llGetTeam(key task) llSetTeam(key task, integer team) list llGetTeamMemberList(integer team) llGetTeam returns the current team assigned to the AVATAR or the OBJECT. Default is 0. llSetTeam sets the team for the AVATAR or the OBJECT. It requires objects owner to own the land, deeded to group owned land or simply be set to that group (land management group). Otherwise any participant could switch teams mid-combat OR access special teams they might not be privy to. llGetTeamMemberList returns a list of AVATARS in the region assigned to that team. Teams are inherited from their rezzer (whether avatar or object). OBJECTS and AVATARS crossing a region neighbour can carry their team assignment with them into the next region. AVATARS teleporting into another region can carry their team assignment as well. Following in the footsteps of Combat2 and llDamage with damage type: "The goal is a coherent set of tools that lets residents create complex and compelling combat systems using a common and easy to use framework." -- Therefore like damage type, a team number can match a default TEAM_* constant or a custom integer. Additionally the field may be repurposed. TEAM_UNASSIGNED 0x0 TEAM_RED 0x1 TEAM_BLUE 0x2 Nice to have: REZ_TEAM for llRezObjectWithParams (llSetTeam-requirements, e.g. system generating NPCs/Vehicles assigned to teams) CHANGED_TEAM for changed event (object or avatar) Team configuration would be nice to have still of course but it is more optional, for HUDs and scripts to get the names and colours of a small set of configured teams per list llGetTeamDetails(integer team). If the object or avatar is assigned to a team number outside the team config range that is OK it might be a custom or repurposed number for a system, they just won't be able to have team details. llSetTeamDetails(integer team, list params) should exist and have same requirements as llSetTeam. Team config would be simplified as these two functions.
1
(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
Load More
→