|
Mako Davidson
Registered User
Join date: 27 Jun 2006
Posts: 56
|
06-29-2007 17:13
Hello people, what I'm trying to do is have an object 1, when it is rezzed, rez another object 2 from its inventory, at object 1's centre. Also I need to be able to control the rotation of object 2, so instead of object 1 rezzing a cylinder with its poles horizontal it could rez it with vertical poles. Would anyone have an example of the line/lines of script I would need to do this???
Thanks a lot.
|
|
Mako Davidson
Registered User
Join date: 27 Jun 2006
Posts: 56
|
ok here's what i got
06-29-2007 17:58
I'm trying to make a security mine that can be placed on your land that if someone steps on holds them in a cylindrical cage for a minute until the temp cage dies then releases them. I've managed to get the mine to rez the cage using this piece of script, but the cage is set at the avatars rotation it seems, ie I want the cylindrical cage with its poles along the Z axis, not matched to the avatar's alignment. Anyone please???
collision_start(integer total_number) { llRezObject("prison", llDetectedPos(0), llDetectedVel(0), <0.00000, 0.70711, 0.00000, 0.70711>, 0); llDie(); }
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
06-30-2007 01:45
From: Mako Davidson I'm trying to make a security mine that can be placed on your land that if someone steps on holds them in a cylindrical cage for a minute until the temp cage dies then releases them. I've managed to get the mine to rez the cage using this piece of script, but the cage is set at the avatars rotation it seems, ie I want the cylindrical cage with its poles along the Z axis, not matched to the avatar's alignment. Anyone please???
collision_start(integer total_number) { llRezObject("prison", llDetectedPos(0), llDetectedVel(0), <0.00000, 0.70711, 0.00000, 0.70711>, 0); llDie(); } You are explicitly passing in the Avatars position and velocity but not its rotation. You are using a fixed rotation value of <0.00000, 0.70711, 0.00000, 0.70711>. Assuming that the rezzer is aligned correctly use llGetRot() instead and if not use one of the llRot2 functions to calculate the rotation required.
_____________________
I'm back......
|
|
Mako Davidson
Registered User
Join date: 27 Jun 2006
Posts: 56
|
cheers
06-30-2007 02:05
thanks for that mate
|