Bond Harrington
Kills Threads At 500yds
Join date: 15 May 2005
Posts: 198
|
09-12-2005 13:36
I've been wondering about this, because I'd like to make a realistic-enough buckshot or fragmentation spread. Does llBreakAllLinks require user interaction or can it be done within a script, so that the object rezzes, delinks, and then becomes seperate scripted fragments? Also, will an object in flight delink continue to have it's momentum?
|
a lost user
Join date: ?
Posts: ?
|
09-12-2005 14:05
For what you have in mind, it would probably be easier to use llRezObject() to rez the buckshot or fragmentations from a shell/bullet. Delinking can be done solely with the script, that's what the LSL command is there for.. so you can do it with the script but that's all it does: delink the linked object. With llRezObject() you'll be able to push the fragments away from the bullet, have a single object (or more) in the contents of the bullet to rez, set position, velocity and rotation of the object being rezzed and pass an integer value to the new object being rezzed.
So probably llRezObject() is the way to go here.
|
Ushuaia Tokugawa
Nobody of Consequence
Join date: 22 Mar 2005
Posts: 268
|
09-12-2005 14:13
You might consider (instead of going through the trouble of delinking on rez) using an unlinked set.
Create your buckshot objects in the configuration you desire. Select them all and in the Edit->Objects window check Physics and Temporary on rez. Without linking the objects and without deselecting them, choose Tools->Take Object.
Now you have one object in your inventory that is actually a set of unlinked objects and can be placed in a rezzor and rezzed with one call of llRezObject. Any velocity you apply through this call will be applied to all of the objects in the unlinked set.
|
Bond Harrington
Kills Threads At 500yds
Join date: 15 May 2005
Posts: 198
|
09-13-2005 04:34
From: Ushuaia Tokugawa You might consider (instead of going through the trouble of delinking on rez) using an unlinked set.
Create your buckshot objects in the configuration you desire. Select them all and in the Edit->Objects window check Physics and Temporary on rez. Without linking the objects and without deselecting them, choose Tools->Take Object.
Now you have one object in your inventory that is actually a set of unlinked objects and can be placed in a rezzor and rezzed with one call of llRezObject. Any velocity you apply through this call will be applied to all of the objects in the unlinked set. Thanks. I recall seeing buckshot from some of the freebie shotguns resembling this, but somehow figured that it was linked. BTW, I am having difficulty offseting rotation. I'd like to get have it rez buckshot from another angle (in this case 45 degrees on X-axis, but will be smaller deviation in finished script). Initially, I had it set using rot = llGetRot() + quat, which resulted in the rezzer rezzing at the global angle. Now, it looks like there's no change on the local axis. fire() { if (armed) { rotation quat = llEuler2Rot( <45*DEG_TO_RAD, 0, 0>);
armed = FALSE; rot = llGetRot(); vel = llRot2Fwd(rot); pos = llGetPos(); pos = pos + vel; pos.z += 0.75; vel = vel * SPEED; llSleep(0.05); llTriggerSound("Report", 1.0); llRezObject("Buckshot", pos, vel, quat * rot, LIFETIME); llSetTimerEvent(DELAY); } }
|