Jump to content

llAttachToAvatar clarification


Guest
 Share

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

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

Recommended Posts

Hi everyone...

I haven't been in SL for a while, and decided to give it a spin again... Being builder and somewhat scripter, I just briefly checked out new features and one particularly drawn my attention. Ability to have multiple attachments on the same attachments spot.

Is this how things work atm or there is lsl function to automatically drop attachments from one point and then attach it.


Here is scenario. I am building my own Rez-to-hand weapons system. Meaning, you don't get invisible weapon attached to your hand which change alpha to show it, but instead, you attach holster, and when you click it it rezzes gun that automatically attach to spot you wanted (left or right hand).

Now, I also make swords, and since it haven't been possible (well, back then since I was not inworld lately), there was no problem since if it is the same hand, first one will be automatticaly dropped and newly rezzed sword will take its position in right hand for example.

With new system, as far as I have figured, if I do the same system will just add another attachment to hand having both gun and sword which is quite stupid, impossible and not allowed in RP communities, Im I right? Not to mention bunch of scripted items that take avatar controls and what not...

BTW, I am in office, and didnt had time to check it out inworld, otherwise I wouldnt be posting this here, so thanks for understanding :)

Link to comment
Share on other sites

Right, but you control the scripts in both the attaching and the to-be-detached object, so you could pretty easily work around the problem.

On the other hand, I'm not sure this "rez to attach" approach is the most convenient for users. For one thing, they'll need to be on rez-enabled land for it to work, and even then, they'll need to accept the permissions request to attach the new thing. I think if it were me, I'd consider these separate "gun" and "sword" products to be scripts that transmogrify a set of attached prims and (perhaps) remote-loaded combat scripts from one weapon to another, rather than distinct prim assemblies. (Of course, if there's any Mesh involved, you can't do that, because Mesh is such a special snowflake.)

Link to comment
Share on other sites

Thanks for reply Qie,


For this example I do control both scripts, but if someone get <name favorite sword creator> and use his sword, and my gun, then I have absolutely no control over sword scripts.


Rez to attach, works as intended. If you are in no rez area, then you will not be able to use ANY gun since all of them are firing projectiles that has to be rezzed. Permissions are thing that has to be dealt with, I agree, but there was Fusion saber system (SWRP, R34l1ty H4ck3r5) that has been used that way for ages and none seem to complain about it too much. That is not my issue here anyway, my issue is multiple attachments and no control over it (basically). And prim "tranfrankesteination" is not an option with meshes which I do intend to use in near future.

Link to comment
Share on other sites

A challenge your 'rez' weapons will have is lag. Rezzing anything places a load  on the region.

One of the great lag producers in combat regions is bullets rezzing, which are single prims. Being in a region where numerious people go for weapons at the same time, that have to 'rez', is probably not going to be completitive. It is going to take the region server time to rez the object and load and initialize its scripts. However small that time is, it will be a disadvantage competitive players and game managers consider.

The hidden weapons are already rez'd... the scripts are already loaded and initialized. The texture change is a minor server side change.

 

Link to comment
Share on other sites

Ok again, my question is NOT about lag that rezzing objects might create (and its quite pointless when people are rezzing literally **bleep**load of bullets from scripts that date from 2008). Issue here is about llAttachToAvatar.


That being said, and the fact that you cannot replace object that is already in attachment spot.

Since I dont need any advice about rez-to-had this post can be closed.


Thanks for your time

Link to comment
Share on other sites

If you own both objects, you might be able to solve the problem with a hokey method .....

1. Rez Object A

2. On rez, Object A pings the avatar with llRegionSayTo on channel 0, automatically received by all of the avatar's attachments.

3. If Object B is attached, it pings Object A and then detaches.

4. Object A receives the ping, and attaches where Object B was. 

As Nalates says, rezzing is likely to be the slow step if you are on a sim that's lagged by a lot of other rezzing, so this method will be slower than attaching both Object A and Object B and then switching their alpha from 0 to 1 as appropriate.

BTW, you can't "close" a thread in a public forum. The most you can do is ignore it. :smileywink:

Link to comment
Share on other sites

Well its pointless to explain to me what can I do if I own two objects... I perfectly know that :) I do ping between them, pair holster and weapon, and what not... Again that is not the issue here as I explained above. And again I dont see how rezzing 7 prim object on sim has more impact than rezzing 495 bullets from gun? Heck, Im even willing to compare it on land where you have permission to debug scripts to show you exaclty how much impact on sim this script I made have, and I dont even consider myself uber-scripter.

So please dont tell me what to do if I own two objects, even that Im gratefull that you people showing me how many flaws this system have. I already know all that, issue is with rest of 99 percent cases where I have no idea how many rings, bracelets or gloves user have attached on his hand in this case.

And that being said, and due to fact that there is no other answer except "that will cause lag" (in virtual world which is far from lag-less), I will just ignore this thread...

Again thanks for your time to answer

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4185 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...