Jump to content

HUD Controlled by other avatars?


GlamLine
 Share

You are about to reply to a thread that has been inactive for 402 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hi there!
So I have a script for a texture changing HUD from the marketplace.Now,the only person who can change textures is the owner but I'd like to change it so that both the owner and another person receiving it can change textures. A bit like a RLV HUD,if you wish to call it so.

Which bit do I change? Sorry, not good at scripting ^^

Link to comment
Share on other sites

It may not be possible to help with this project. Presumably the scripts are either no-mod (preventing seeing inside at all) or license-restricted so they can't be shared.

If instead they're unrestricted open source, we'd want to look at the non-HUD side''s llListen() call, and further checks it makes in its listen() event handler, where it will likely check that the sender is owned by the same user as itself. Then we'd also need to decide how to distribute a HUD to this other participant, and how it will know which non-HUD attachment to target communications.

None of these are huge barriers to a new script set, but changing an existing one that's not designed for it would involve substantial changes—probably easier than starting from scratch but not a few lines of code, either.

(Also, there could be public domain scripts that do all this in a library somewhere and I'd never know about it, but maybe somebody does. These scripts needn't be rocket science, but they're a bit fussy in detail.)

  • Like 1
Link to comment
Share on other sites

15 minutes ago, Ron Khondji said:

Or maybe I'm missing something.

It seems the OP wants to make a HUD that instead of changing the texture on your own clothing, changes the texture on someone else's clothing. In principal, that's not too different from a regular texture change HUD, but it would require specific changes to the script, and possibly the addition of a UI for targeting the specific person who's clothing is to be texture changed. (or just a switch between targeting oneself and llGetObjectDetails(...OBJECT_LAST_OWNER_ID...) )

Edited by Quistess Alpha
  • Like 1
Link to comment
Share on other sites

If in the "listener" of the object to be affected, instead of listening only for the owner, you set it to "" or NULL_KEY, it will receive and process any recognized message on the same channel, regardless of who sent it.

It might look like:

llListen(0, "", llGetOwner(), "");

Changing llGetOwner() to a pair of empty quotation marks ("") will make it listen for anyone on the same channel instead of just the owner.

You can have a single hud owned by one user, and quick-change textures on an entire group of avatars (a dance troupe, for example) if you want.

Sometimes people specify owner-only listening when they set the listener up (as shown above). Sometimes people specify filtering for the owner only in the section of the script that processes listeners (the "listen event"). If neither of these specifies owner-only, you should be fine.

Edited by PheebyKatz
  • Like 2
Link to comment
Share on other sites

@Ron Khondji I tried transferring my HUD to someone else and it didn't work. Basically, I want to create an item where the HUD should be controlled by both the owner and other people who receive it.

@Qie Niangao Unfortunately it's a script from the Marketplace, so I cannot share it here 🙂

@Quistess Alpha Yep, you got it!! That is my idea indeed :D

@PheebyKatz Thanks, I'll try that and let you know if it works 😀

Link to comment
Share on other sites

If it's helpful, you can probably share individual lines of the script that cause trouble or confusion, as a kind of "fair use quotation". It's pretty unlikely a line or two here and there will reveal any secret sauce recipes.

One caution: You may not want to control the textures of an entire dance troupe of avatars, so it may be pretty confusing if two or more avatars wearing the same HUD-controlled attachment have textures changed simultaneously by somebody's HUD.

The way the HUDs are distributed can possibly help: if the attachment-wearer hands out the HUD, the attachment can check OBJECT_LAST_OWNER_ID to make sure the HUD at least came from the wearer. That approach would mean the wearer needs permission to copy and transfer the HUD, potentially a business/licensing issue. A simpler approach is for the attachment wearer to confirm (in a dialog) whether the person with the HUD is permitted to set textures. 

Also, just in passing, it's unlikely that the existing script's llListen() call will be restricted to the owner's key because messages from the HUD will come from that HUD itself, not from the owner of the HUD. There are several common ways to do this, including using channel numbers derived from the owner's key, in case you see that in the script.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 402 days.

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
 Share

×
×
  • Create New...