BEGOCER Lehmann Posted July 29, 2022 Share Posted July 29, 2022 Oh boy here I go again getting lost/confused/angry at something that is probably simple to do but I have no idea what to do. So I've got a HUD that will be able to control a turret on a vehicle that has to be worn for it to 'fire' the turret. I'm using a HUD as opposed to having fire controls in the turret itself using key commands as that method just totally messes up my vehicle's driving scripts despite not being in the same prim for some reason... I've got everything working up to a certain point- firing controls, the turret will rez the HUD on sit and that HUD will then request to be attached to owner only then detach on stand etc. But what I cannot figure out is how to make the turret when sat on rez the control prim and attach to ONLY the user of the turret rather than owner only (which it is currently at the moment as I'm using some open source script). I'm not sure how to make the rezzer spawn the control HUD with the right request attach lines and know to attach to the seated user. WHAT DO!? Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 29, 2022 Share Posted July 29, 2022 Unless you use an Experience, you can't autoattach an object to anyone but its owner. The best you can do is rez the turret and ask permission to attach it. 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted July 29, 2022 Share Posted July 29, 2022 1 minute ago, Rolig Loon said: The best you can do is rez the turret and ask permission to attach it. Not only that, but you have to transfer ownership to the non-owner. llAttachToAvatarTemp() does that automatically; llAttachToAvatar() does not. Assuming you (the OP) want to use your vehicle in more than one spot (which I'd assume given tat vehicles usually move around) ~not using an experience is actually better, because experience attached attachments automatically detach when you move onto a parcel that does not have the experience enabled. Link to comment Share on other sites More sharing options...
BEGOCER Lehmann Posted July 29, 2022 Author Share Posted July 29, 2022 8 minutes ago, Quistess Alpha said: Not only that, but you have to transfer ownership to the non-owner. llAttachToAvatarTemp() does that automatically; llAttachToAvatar() does not. Currently I'm using AttachTAttachToAvatarTemp. For turret positions it's just for a vehicle with one turret. (Driver + gunner). I've seen it been done before where I've sat on other people's combat vehicles and it asks to attach HUD that lets me toggle settings and what not. Link to comment Share on other sites More sharing options...
Quistess Alpha Posted July 29, 2022 Share Posted July 29, 2022 It's mildly non-trivial. try replacing experience permissins with regular permissions in this example I posted forever ago: 1 Link to comment Share on other sites More sharing options...
BEGOCER Lehmann Posted July 31, 2022 Author Share Posted July 31, 2022 Sorry for the long response time. Gonna check that post out now! Link to comment Share on other sites More sharing options...
BEGOCER Lehmann Posted July 31, 2022 Author Share Posted July 31, 2022 (edited) Ok! I got it working! Oh man you guys saved me so many hours of screaming and swearing! Changed the "experience_permissions(key target_id)" to "run_time_permissions(integer target_id)" and changed the RequestExperiencePermissions to llRequestPermissions(llDetectedKey(n), PERMISSION_ATTACH); and that made it work! I appreciate it! Edited July 31, 2022 by BEGOCER Lehmann I fixed my error of not reading previous posts... 2 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