script rezzer qui change quand on fait une rotation du rezzer

Répondre
Partager Rechercher
bonjour j'ai un script rezzer:

/* * * * * * * * * * * * * * * * * * * * * * * * * * * *\
*Scripter's Choice*

With this script you are able to rez up to 5 Objects.You
can select the position and the rotation of each Object.
If you want to rez a single object or more then five just
modify the script, ask me or get the Multiple Rezzer
Script with more configurations.

Superrealdragon Pfalz/Blackcatz1911

\* * * * * * * * * * * * * * * * * * * * * * * * * * * */

string object1;
string object2;
string object3;
string object4;
string object5;

listInventory()
{
object1=llGetInventoryName (INVENTORY_OBJECT, 0);
object2=llGetInventoryName (INVENTORY_OBJECT, 1);
object3=llGetInventoryName (INVENTORY_OBJECT, 2);
object4=llGetInventoryName (INVENTORY_OBJECT, 3);
object5=llGetInventoryName (INVENTORY_OBJECT, 4);
}
rez()
{
//-------------------------------------------------------------------
if(object1 != "")
{
rotation rot1 = llEuler2Rot(<0, 0, 90>*DEG_TO_RAD);
vector offset1 = <0,8,0>;
llRezObject(object1, llGetPos() + offset1, ZERO_VECTOR, rot1, 2);
}
//-------------------------------------------------------------------
if(object2 != "")
{
rotation rot2 = llEuler2Rot(<0, 0, 0>*DEG_TO_RAD);
vector offset2 = <0,0,0>;
llRezObject(object2, llGetPos() + offset2, ZERO_VECTOR, rot2, 2);
}
//-------------------------------------------------------------------
if(object3 != "")
{
rotation rot3 = llEuler2Rot(<0, 0, 0>*DEG_TO_RAD);
vector offset3 = <0,0,0>;
llRezObject(object3, llGetPos() + offset3, ZERO_VECTOR, rot3, 2);
}
//-------------------------------------------------------------------
if(object4 != "")
{
rotation rot4 = llEuler2Rot(<0, 0, 0>*DEG_TO_RAD);
vector offset4 = <0,0,0>;
llRezObject(object4, llGetPos() + offset4, ZERO_VECTOR, rot4, 2);
}
//-------------------------------------------------------------------
if(object5 != "")
{
rotation rot5 = llEuler2Rot(<0, 0, 0>*DEG_TO_RAD);
vector offset5 = <0,0,0>;
llRezObject(object5, llGetPos() + offset5, ZERO_VECTOR, rot5, 2);
}
//-------------------------------------------------------------------
}

default
{
state_entry()
{

}

touch_start(integer total_number)
{
listInventory();
rez();
}
on_rez(integer params)
{
llResetScript();
}
}
// This work is licensed under a Creative Commons Attribution 3.0 Unported License.
// http://creativecommons.org/licenses/by/3.0/


comment le modifier pour que l'objet rezzer pivote en même temps que le rezzer?

besoin de rezzer un seul objet

merci de votre réponse

Dernière modification par bral38 ; 19/08/2024 à 22h04.
voilà un script légèrement simplifié qui rezze le premier objet de l' inventaire 1m au dessus du rezzeur....en suivant la rotation du rezzeur.
Code PHP:

default
{
    
touch_start(integer total_number)
    {
        
llRezObject(llGetInventoryName(INVENTORY_OBJECT0), llGetPos() + <0.0,0.0,1.0>*llGetRot(),ZERO_VECTOR,llGetRot()*llEuler2Rot(< 0.00.00.0> * DEG_TO_RAD),0);
    }

Répondre
  • »
 
1 connecté (0 membre et 1 invité) Afficher la liste détaillée des connectés