livingbylan Posted July 22, 2020 Posted July 22, 2020 Could any of you please help me with a scripting issue I'm having? I'm currently trying to create a script for a HUD that is able to detect when you walk up close to it and automatically attach to you/your screen. Similar to that of the HUD at Social Island when you very first log into SecondLife for the first time ever. I currently have a script that plays a sound when you walk up to it, but I don't know how to get it to attach. Thanks!
Mollymews Posted July 22, 2020 Posted July 22, 2020 to attach the same way as on Social Island then we need to use a scripted Experience on a parcel that has been allowed by the parcel owner, and the person we wish to attach our HUD too, is a member of our Experience a example of how attachment is done with an Experience is here: http://wiki.secondlife.com/wiki/LlRequestExperiencePermissions for non-Experience attachment then start here: http://wiki.secondlife.com/wiki/LlAttachToAvatar 2
Rachel1206 Posted July 22, 2020 Posted July 22, 2020 Adding to @Mollymews excellent answer. If you do not use Experience, you make a simple detecting prim with your sensor to rezz the HUD ( using llRezAtRoot() )and let it attach to the person who you detected. It is a good idea to make a time out for the HUD for example 60 seconds and let it die, if the person do not attach the HUD for what ever reason she/he has. Use llAttachToAvatarTemp() as this will not kludge the users inventory and the HUD will disappear by it self, when the user detach it or log out. And always check llRequestPermissions(), do not assume any permissions are granted or persistent. 1
Anna Salyx Posted July 22, 2020 Posted July 22, 2020 14 hours ago, Rachel1206 said: Use llAttachToAvatarTemp() as this will not kludge the users inventory and the HUD will disappear by it self, when the user detach it or log out. Also you can have the hud detect when the avatar leaves the region, via the CHANGED event, and auto detach/delete when they do that if that is a desired action. Having it auto detach/delete when the avatar leaves a general area is also possible but require a bit more coding 1
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