Change font size
It is currently Sat Dec 15, 2018 2:08 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 4   [ 33 posts ]
Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Open script : a "hybrid" poseballs rezzer
PostPosted: Tue Jan 01, 2013 8:46 pm 
User avatar

Joined: Sun Sep 30, 2012 10:28 am
Posts: 40
Hello OSGriders 8-)

Some weeks ago I was looking for a dancing machine to put into my sim for my partner and I. They gave me that well-known dancing machine by Frank Northmead, which is cool (probably way cooler than what I'm giving you here :roll: ) but for some reason I didn't like it so much and I wanted to script mine by myself, which was an enjoyable time-killer. Now it is quite finished I guess and I would like to share if anyone can find interest here.

It is very simple sl-like "hybrid" poseball rezzer (these machines that can deal with couple and single dances as well). I can't promise it is well scripted because it is probably not lol.. Anyway I tried to make it as simple as I could : it uses 3 scripts and 2 notecards, all are easy to modify. Also it can deal with as many people as needed at the same time (there is only a "slot limit" that can be changed in the main script), but I didn't test with many people because my friendlist is not so long here in osg... It uses a simple "resync" feature for couples. Also all animations are in the poseballs, which might be a bad thing for performance I don't know, but it allows me to deal with as many avi as I want at the same time.

Orientation now matches the toucher's z rotation.
Main script now includes an auto sync feature.
If you are owner you can easily adjust individual positions and rotations for each animation using chat commands or/and the ADMIN menu, and it is also easy to set up any animation you like (or at least I think it is easy :mrgreen: )

Well... I think that's all. It is still in development so the source code can be changed, and it is opensource so you can change it by yourself of course (I write them in frenglish tho, not sure it is fully understandable).

If you want to set this up you will have to build two poseballs, name the first "poseball1" and the second "poseball2", put the "poseball1" script into poseball1 and the "poseball2" script into poseball2, then create a prim that will be your rezzer and put in it the "animations" and "backup" notecards (you must name them "animations" and "backup") THEN the "server" script, then put the "male" and "single" animations you want in the poseball1 and the "female" animations in the poseball2 and edit the "animations" notecard following the instructions in that notecard, then put your poseballs into your rezzer prim and then type "/2 RESETSCRIPT".

Or you can also ask me inworld if you ever see me and I will send you the built object with the last version of the script ;) See the "HELP" notecard for additional information.
Have fun and happy new year 8-)


"HELP" notecard :
{L_CODE}:
LIST OF USER COMMANDS : (these commands are for owners only)
Type these commands in the channelUser defined in the main script (I put /2 but of course you can change). For example type /2 RESETSCRIPT. The object must be in your chat range (10 meters max) for using these commands.

(Commands to adjust poseballs positions (x,y,z are float, you can write them with 6 decimals but it is quite useless to go this far. You can write 1 or 1.0 as well, -1 or -1.0, 0.392380... Whatever. You must sit on a poseball and select an animation to use poseballs commands) :)

(poseball1 :)
/channelUser p1+<x,y,z>
/channelUser p1-<x,y,z>
/channelUser p1=<x,y,z>

(poseball2 :)
/channelUser p2+<x,y,z>
/channelUser p2-<x,y,z>
/channelUser p2=<x,y,z>

(Commands to adjust poseballs rotations (x,y,z are still float. They represent Euler rotations in DEGREES. For example if you want poseball1 to turn back write /yourChannel r1+<0,0,180>) :)

(poseball1 :)
/channelUser r1+<x,y,z>
/channelUser r1-<x,y,z>
/channelUser r1=<x,y,z>

(poseball2 :)
/channelUser r2+<x,y,z>
/channelUser r2-<x,y,z>
/channelUser r2=<x,y,z>

(Script commands :)

/channelUser RESETSCRIPT
(resets the script, reloads the "animations" notecard and the "backup" notecard. Beware : all unsaved work done with the previous commands will be lost. See the following backup commands)

/channelUser WRITEBACKUP
(sends a backup text to owner. Copy this text with selecting it, then hit CTRL + C and then paste it in the "backup" notecard and save the notecard. You can copy the prim's name and hour with the actual backup text, it doesn't matter)

/channelUser LOADBACKUP
(loads content of the "backup" notecard. You must have previously copied the backup text generated with WRITEBACKUP in the "backup" notecard for this command to work)

/channelUser KILLEVERYBODY
(kills all poseballs and IDs (used slots). This can be useful after reseting the script or if a bug occurs)


ADMIN MENU (enabled for owners only) :
Most useful user commands can be directly reached from the ADMIN menu (instead of typing them by chat)
It also has an ADJUST submenu that allows you to easily adjust poseballs positions and rotations without typing any chat user command


HOW TO ADD/REMOVE ANIMATIONS :
- first, you should create a "backup" notecard if you have done any adjustement work for your poseballs, see WRITEBACKUP command
- touch the poseball rezzer and quickly take the rezzed balls before they disappear OR touch the poseball rezzer, wait for the balls to disappear and then take the balls directly from the rezzer inventory. It is important to touch the rezzer because when balls are rezzed they jump automatically to the last toucher's position if the rezzer is in the same sim.
- wait untill the slot used for your poseballs is automatically deleted OR use the KILLEVERYBODY command
- rez the balls on the ground
- open the "animations" notecard in the rezzer
- update the animations notecard while you add/remove "male" and "single" animations to/from the poseball1 and "female" animations to/from the poseball2. Save the notecard
- delete the old poseballs from the rezzer inventory and replace them with your new poseballs (take them to your inventory then put them into the prim inventory)
- use the RESETSCRIPT command to load the new notecard. Wait untill it is loaded


OTHER INFORMATIONS :
- RESYNC : Caution, one of the animations in both poseballs is the "RESYNC" animation. Without this animation, the resync feature will not work. This animation doesn't need to be listed in the "animations" notecard, but it must be refeered to by its exact name in both poseballs scripts as the constant string RESYNC_ANIMATION (can be a different anim for each ball).
- I designed this poseball rezzer as a dancing machine in the first place. However you can use it to put hugs and kisses as well or whatever.
- The limit of poseballs that can be rezzed at the same time is only a script feature. It must be set in the main script as the constant integer MAX_SLOTS (a single poseball or two couple poseballs take 1 slot).
- There is currently no range limit for using this rezzer because it works only by chat with the llRegionSay() function.

- All my scripts are free and opensource. I am not a professional scripter at all and they may be written poorly : I try my best but if you feel like you want to change the source code do not hesitate one second.

- Have a good time using my stuff ^.^
Mandarine Ordinary


"poseball1" script, to put into your "male" poseball named "poseball1" (last edited 22 january, 2013) :
{L_CODE}:
/*
Open script by Mandarine Ordinary
This is a "male" poseball script for a hybrid animator script. It must be put into a poseball that contains all the "male" and "single" animations listed in the notecard. If you are feeling lazy you can put all animations listed in notecard but it is useless. The ball is then to be put into the prim that contains the animator script and a similar "female" poseball.
*/

integer channelDialog = -44444; // must match the main script channelDialog
string RESYNC_ANIMATION = "stand pensive"; // must be the exact name of the animation in poseball inventory that will be used to resync couple animations

string nameFilter = ""; // can be set to your rezzer's name of left blank
key keyFilter = NULL_KEY; // can be set to your rezzer's UUID of left blank

string floatingText = "animation1";
vector floatingTextColor = <0.8,0.4,1.0>;
float floatingTextAlpha = 0.5;

// boundaries :
float X_MIN = 0.1;
float X_MAX = 254.9;
float Y_MIN = 0.1;
float Y_MAX = 254.9;
float Z_MIN = 0.1;
float Z_MAX = -1; // when Z_MAX <= 0 there is no upper limit

// do not change the following unless you know what you are doing

key avatar = NULL_KEY;
integer posSet = FALSE;
list listeAnims = [];

integer poseballIndex = -1;

vector initPos;
rotation initRot;
rotation rotGlobale;
vector offset;

integer i;
integer separation;
integer longueurChaine;
string chaine;

vector boundaries(vector pos)
{
    vector posMod = pos;
   
    if(posMod.x < X_MIN)
    posMod.x = X_MIN;
    else if(posMod.x > X_MAX)
    posMod.x = X_MAX;
   
    if(posMod.y < Y_MIN)
    posMod.y = Y_MIN;
    else if(posMod.y > Y_MAX)
    posMod.y = Y_MAX;
   
    if(posMod.z < Z_MIN)
    posMod.z = Z_MIN;
    else if(posMod.z > Z_MAX && Z_MAX > 0)
    posMod.z = Z_MAX;
   
    return posMod;
}

warp(vector posInit)
{
    vector pos = boundaries(posInit);
    list rules = [];
    integer num;
    float dist = llVecDist(llGetPos(),pos);
   
    if(dist < 10)
    llSetPrimitiveParams([PRIM_POSITION,pos]);
    else
    {
        if(llSetRegionPos(pos))
        llSetPrimitiveParams([PRIM_POSITION,pos]);
        else
        {
            num = llCeil(dist/10);
            while(num--)rules=rules+[PRIM_POSITION,pos];
            llSetPrimitiveParams(rules);
        }
    }
}

stop_anims()
{
    listeAnims = llGetAnimationList(avatar);
    for(i = 0; i < llGetListLength(listeAnims); i++)
    {
        llStopAnimation((string)llList2Key(listeAnims, i));
    }
}

die()
{
    avatar = llAvatarOnSitTarget();
    if(avatar != NULL_KEY)
    llUnSit(avatar);
   
    llDie();
}

default
{
    on_rez(integer start_param)
    {
        llSay(channelDialog, "0"); // rezzed
        poseballIndex = start_param;
        avatar = NULL_KEY;
        posSet = FALSE;
    }
   
    state_entry()
    {
        llListen(channelDialog, nameFilter, keyFilter, "");
       
        llSitTarget(<0,0,-0.24>, ZERO_ROTATION);
        llForceMouselook(FALSE);
        llSetSitText("Animation");
       
        llSetPrimitiveParams([
        PRIM_TEXT, floatingText,floatingTextColor, floatingTextAlpha,
        PRIM_GLOW, ALL_SIDES, 0.1
        ]);
        llSetAlpha(1,ALL_SIDES);
    }
   
    changed(integer change)
    {
        if(change == CHANGED_LINK)
        {
            avatar = llAvatarOnSitTarget();
           
            if(avatar == NULL_KEY) // avatar unsat
            {
                llRegionSay(channelDialog, (string)poseballIndex + "|PERM" + (string)NULL_KEY);
                llSetPrimitiveParams([
                PRIM_TEXT, floatingText,floatingTextColor, floatingTextAlpha,
                PRIM_GLOW, ALL_SIDES, 0.1
                ]);
                llSetAlpha(1,ALL_SIDES);
            }
            else // avatar sat
            {
                llRequestPermissions(avatar, PERMISSION_TRIGGER_ANIMATION);
                llSetPrimitiveParams([
                PRIM_TEXT, "",floatingTextColor, floatingTextAlpha,
                PRIM_GLOW, ALL_SIDES, 0
                ]);
                llSetAlpha(0,ALL_SIDES);
            }
       
        }
   
    }
   
    listen(integer channel, string name, key id, string msg)
    {
        if(msg == "ALLBALLSDIE")
        {
            die();
        }
        else if(!posSet)
        {
            if(llGetSubString(msg, 0, 8) == "INITBALL1")
            {
                chaine = llGetSubString(msg, 9, -1);
                i = 0;
                longueurChaine = llStringLength(chaine);
               
                while(llGetSubString(chaine, i, i) != "|" && i < longueurChaine)
                i++;
               
                rotGlobale = (rotation)llGetSubString(chaine, 0, i - 1);
               
                chaine = llGetSubString(chaine, i + 1, -1);
                i = 0;
                longueurChaine = llStringLength(chaine);
               
                while(llGetSubString(chaine, i, i) != "|" && i < longueurChaine)
                i++;
               
                offset = (vector)llGetSubString(chaine, 0, i - 1);
               
                chaine = llGetSubString(chaine, i + 1, -1);
                separation = 0;
                longueurChaine = llStringLength(chaine);
               
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                initPos = (vector)llGetSubString(chaine, 0, separation - 1);
                initRot = (rotation)llGetSubString(chaine, separation + 1, -1);
                warp(initPos + offset * rotGlobale);
                llSetRot(initRot * rotGlobale);
                posSet = TRUE;
            }
        }
        else
        {
            if(msg == "CHKPERM")
            {
                avatar = llAvatarOnSitTarget();
                if(avatar == NULL_KEY)
                llRegionSay(channelDialog, (string)poseballIndex + "|PERM" + (string)NULL_KEY);
            }
            else if(llGetSubString(msg, 0, 4 + llStringLength((string)poseballIndex)) == "BALL" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 5 + llStringLength((string)poseballIndex), -1);
               
                if(chaine == "DIE")
                die();
                else // supposedly an animation, for security you can set nameFilter and/or keyFilter to the rezzer name/key
                {
                    stop_anims();
                    llStartAnimation(chaine);
                }
            }
            else if(llGetSubString(msg, 0, 11 + llStringLength((string)poseballIndex)) == "BALL1POSROT" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 12 + llStringLength((string)poseballIndex), -1);
               
                separation = 0;
                longueurChaine = llStringLength(chaine);
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                warp(initPos + (offset + (vector)llGetSubString(chaine, 0, separation - 1)) * rotGlobale);
                llSetRot(((rotation)llGetSubString(chaine, separation + 1, -1) * initRot) * rotGlobale);
            }
            else if(llGetSubString(msg, 0, 5 + llStringLength((string)poseballIndex)) == "RSYNC" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 6 + llStringLength((string)poseballIndex), -1);
               
                separation = 0;
                longueurChaine = llStringLength(chaine);
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                stop_anims();
                llStartAnimation(RESYNC_ANIMATION);
                llSleep(0.5);
                stop_anims();
                llStartAnimation(llGetSubString(chaine, 0, separation - 1));
            }
            else if(llGetSubString(msg, 0, 5 + llStringLength((string)poseballIndex)) == "BALLS" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 6 + llStringLength((string)poseballIndex), -1);
               
                separation = 0;
                longueurChaine = llStringLength(chaine);
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                stop_anims();
                llStartAnimation(llGetSubString(chaine, 0, separation - 1));
            }
        }
    }
   
    run_time_permissions(integer perm)
    {
        if(PERMISSION_TRIGGER_ANIMATION & perm)
        {
            stop_anims();
            llStartAnimation(RESYNC_ANIMATION);
            llRegionSay(channelDialog, (string)poseballIndex + "|PERM" + (string)avatar);
        }
    }
}


"poseball2" script, to put into your "female" poseball named "poseball2" (last edited 22 january, 2013) :
{L_CODE}:
/*
Open script by Mandarine Ordinary
This is a "female" poseball script for a hybrid animator script. It must be put into a poseball that contains all the "female" animations listed in the notecard. If you are feeling lazy you can put all animations listed in notecard but it is useless. The ball is then to be put into the prim that contains the animator script and a similar "male" poseball.
*/

integer channelDialog = -44444; // must match the main script channelDialog
string RESYNC_ANIMATION = "stand pensive"; // must be the exact name of the animation in poseball inventory that will be used to resync couple animations

string nameFilter = ""; // can be set to your rezzer's name of left blank
key keyFilter = NULL_KEY; // can be set to your rezzer's UUID of left blank

string floatingText = "animation2";
vector floatingTextColor = <1.0,0.6,0.8>;
float floatingTextAlpha = 0.5;

// boundaries :
float X_MIN = 0.1;
float X_MAX = 254.9;
float Y_MIN = 0.1;
float Y_MAX = 254.9;
float Z_MIN = 0.1;
float Z_MAX = -1; // when Z_MAX <= 0 there is no upper limit

// do not change the following unless you know what you are doing

key avatar = NULL_KEY;
integer posSet = FALSE;
list listeAnims = [];

integer poseballIndex = -1;

vector initPos;
rotation initRot;
rotation rotGlobale;
vector offset;

integer i;
integer separation;
integer longueurChaine;
string chaine;

vector boundaries(vector pos)
{
    vector posMod = pos;
   
    if(posMod.x < X_MIN)
    posMod.x = X_MIN;
    else if(posMod.x > X_MAX)
    posMod.x = X_MAX;
   
    if(posMod.y < Y_MIN)
    posMod.y = Y_MIN;
    else if(posMod.y > Y_MAX)
    posMod.y = Y_MAX;
   
    if(posMod.z < Z_MIN)
    posMod.z = Z_MIN;
    else if(posMod.z > Z_MAX && Z_MAX > 0)
    posMod.z = Z_MAX;
   
    return posMod;
}

warp(vector posInit)
{
    vector pos = boundaries(posInit);
    list rules = [];
    integer num;
    float dist = llVecDist(llGetPos(),pos);
   
    if(dist < 10)
    llSetPrimitiveParams([PRIM_POSITION,pos]);
    else
    {
        if(llSetRegionPos(pos))
        llSetPrimitiveParams([PRIM_POSITION,pos]);
        else
        {
            num = llCeil(dist/10);
            while(num--)rules=rules+[PRIM_POSITION,pos];
            llSetPrimitiveParams(rules);
        }
    }
}

stop_anims()
{
    listeAnims = llGetAnimationList(avatar);
    for(i = 0; i < llGetListLength(listeAnims); i++)
    {
        llStopAnimation((string)llList2Key(listeAnims, i));
    }
}

die()
{
    avatar = llAvatarOnSitTarget();
    if(avatar != NULL_KEY)
    llUnSit(avatar);
   
    llDie();
}

default
{
    on_rez(integer start_param)
    {
        llSay(channelDialog, "0"); // rezzed
        poseballIndex = start_param;
        avatar = NULL_KEY;
        posSet = FALSE;
    }
   
    state_entry()
    {
        llListen(channelDialog, nameFilter, keyFilter, "");
       
        llSitTarget(<0,0,-0.24>, ZERO_ROTATION);
        llForceMouselook(FALSE);
        llSetSitText("Animation");
       
        llSetPrimitiveParams([
        PRIM_TEXT, floatingText,floatingTextColor, floatingTextAlpha,
        PRIM_GLOW, ALL_SIDES, 0.1
        ]);
        llSetAlpha(1,ALL_SIDES);
    }
   
    changed(integer change)
    {
        if(change == CHANGED_LINK)
        {
            avatar = llAvatarOnSitTarget();
           
            if(avatar == NULL_KEY) // avatar unsat
            {
                llRegionSay(channelDialog, (string)poseballIndex + "|PERM" + (string)NULL_KEY);
                llSetPrimitiveParams([
                PRIM_TEXT, floatingText,floatingTextColor, floatingTextAlpha,
                PRIM_GLOW, ALL_SIDES, 0.1
                ]);
                llSetAlpha(1,ALL_SIDES);
            }
            else // avatar sat
            {
                llRequestPermissions(avatar, PERMISSION_TRIGGER_ANIMATION);
                llSetPrimitiveParams([
                PRIM_TEXT, "",floatingTextColor, floatingTextAlpha,
                PRIM_GLOW, ALL_SIDES, 0
                ]);
                llSetAlpha(0,ALL_SIDES);
            }
       
        }
   
    }
   
    listen(integer channel, string name, key id, string msg)
    {
        if(msg == "ALLBALLSDIE")
        {
            die();
        }
        else if(!posSet)
        {
            if(llGetSubString(msg, 0, 8) == "INITBALL2")
            {
                chaine = llGetSubString(msg, 9, -1);
                i = 0;
                longueurChaine = llStringLength(chaine);
               
                while(llGetSubString(chaine, i, i) != "|" && i < longueurChaine)
                i++;
               
                rotGlobale = (rotation)llGetSubString(chaine, 0, i - 1);
               
                chaine = llGetSubString(chaine, i + 1, -1);
                i = 0;
                longueurChaine = llStringLength(chaine);
               
                while(llGetSubString(chaine, i, i) != "|" && i < longueurChaine)
                i++;
               
                offset = (vector)llGetSubString(chaine, 0, i - 1);
               
                chaine = llGetSubString(chaine, i + 1, -1);
                separation = 0;
                longueurChaine = llStringLength(chaine);
               
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                initPos = (vector)llGetSubString(chaine, 0, separation - 1);
                initRot = (rotation)llGetSubString(chaine, separation + 1, -1);
                warp(initPos + offset * rotGlobale);
                llSetRot(initRot * rotGlobale);
                posSet = TRUE;
            }
        }
        else
        {
            if(msg == "CHKPERM")
            {
                avatar = llAvatarOnSitTarget();
                if(avatar == NULL_KEY)
                llRegionSay(channelDialog, (string)poseballIndex + "|PERM" + (string)NULL_KEY);
            }
            else if(llGetSubString(msg, 0, 4 + llStringLength((string)poseballIndex)) == "BALL" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 5 + llStringLength((string)poseballIndex), -1);
               
                if(chaine == "DIE" || chaine == "DIE2")
                die();
                else // supposedly an animation, for security you can set nameFilter and/or keyFilter to the rezzer name/key
                {
                    stop_anims();
                    llStartAnimation(chaine);
                }
            }
            else if(llGetSubString(msg, 0, 11 + llStringLength((string)poseballIndex)) == "BALL2POSROT" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 12 + llStringLength((string)poseballIndex), -1);
               
                separation = 0;
                longueurChaine = llStringLength(chaine);
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                warp(initPos + (offset + (vector)llGetSubString(chaine, 0, separation - 1)) * rotGlobale);
                llSetRot(((rotation)llGetSubString(chaine, separation + 1, -1) * initRot) * rotGlobale);
            }
            else if(llGetSubString(msg, 0, 5 + llStringLength((string)poseballIndex)) == "RSYNC" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 6 + llStringLength((string)poseballIndex), -1);
               
                separation = 0;
                longueurChaine = llStringLength(chaine);
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                stop_anims();
                llStartAnimation(RESYNC_ANIMATION);
                llSleep(0.5);
                stop_anims();
                llStartAnimation(llGetSubString(chaine, separation + 1, - 1));
            }
            else if(llGetSubString(msg, 0, 5 + llStringLength((string)poseballIndex)) == "BALLS" + (string)poseballIndex + "|")
            {
                chaine = llGetSubString(msg, 6 + llStringLength((string)poseballIndex), -1);
               
                separation = 0;
                longueurChaine = llStringLength(chaine);
                for(i = 1; i < longueurChaine; i++)
                {
                    if(llGetSubString(chaine, i, i) == "|")
                    separation = i;
                }
               
                stop_anims();
                llStartAnimation(llGetSubString(chaine, separation + 1, - 1));
            }
        }
    }
   
    run_time_permissions(integer perm)
    {
        if(PERMISSION_TRIGGER_ANIMATION & perm)
        {
            stop_anims();
            llStartAnimation(RESYNC_ANIMATION);
            llRegionSay(channelDialog, (string)poseballIndex + "|PERM" + (string)avatar);
        }
    }
}


"animations" notecard (this is an example), you must name this card "animations" (last edited 7 january, 2013) :
{L_CODE}:
// Animations notecard, all animations must be listed here by their exact name.
// Lines are commented when they begin with // or when they are empty, other lines define animations.
// Animations listed here can be either single or couple.
// To define a single animation just write its exact name in one line without writing anything else in this line. For example write "single".
// To define couple animations write in this order in the same line by separating them with the | symbol : the name that will appear in the menu, the exact name of the first "male" animation,  the exact name of the second "female" animation. For example write "NameDialog|coupleM|coupleF" (without any spaces).
// Positions must be adjusted by script and stored in the backup notecard. See HELP notecard.

//Single anims :
MrSwift

//Couple anims :
2Step|2Step_m|2Step_f
Becoming|becoming m|becoming f
BeautifulDream|BeautifulDream_m|BeautifulDream_f
MrSwift|MrSwift|MrSwift
Cherished|cherished-m|cherished-f
ClapStep|ClapStep_m|ClapStep_f
EternalLove|Eternal-Love m|Eternal-Love f
FallinLove|FallinLove_m|FallinLove_f
FallingDeep|Falling-Deep m|Falling-Deep f


"backup" notecard (this is an example), you must name this card "backup" :
{L_CODE}:
[02:59 PM]  Hybrid Poseballs Rezzer: |single|MrSwift|<0.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>
[02:59 PM]  Hybrid Poseballs Rezzer: |couple|2Step_m|2Step_f|<1.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>
[02:59 PM]  Hybrid Poseballs Rezzer: |couple|becoming m|becoming f|<1.000000,0.100000,0.000000>|<0.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>
[02:59 PM]  Hybrid Poseballs Rezzer: |couple|BeautifulDream_m|BeautifulDream_f|<1.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>|<0.000000,0.000000,0.000000>
[02:59 PM]  Hybrid Poseballs Rezzer: |couple|MrSwift|MrSwift|<-0.500000,0.000000,0.000000>|<0.000000,0.000000,0.000000>|<0.500000,0.000000,0.000000>|<0.000000,0.000000,3.141593>


Last edited by Mandarine Ordinary on Tue Jan 22, 2013 4:14 pm, edited 10 times in total.

Top
 Profile  
 
 Post subject: Re: Open script : a "hybrid" poseballs rezzer
PostPosted: Tue Jan 01, 2013 8:48 pm 
User avatar

Joined: Sun Sep 30, 2012 10:28 am
Posts: 40
Main "server" script (last edited 15 january, 2013) :

This script has become too long to be posted in a single message (60000 characters limit), so I update it as an attachment.

{L_ATTACHMENT}:
File comment: Main server script, to be put into your rezzer
main_server_script.zip [8.43 KiB]
Downloaded 1057 times


Relay script (not required, but useful 8-) )
{L_CODE}:
integer channelDialog = -44444;

default
{
    state_entry()
    {
        llSay(0, "Relay ready");
    }
   
    touch_start(integer num_detected)
    {
        llRegionSay(channelDialog, "TOUCHPASS" + (string)llDetectedKey(0) + "|" + (string)llDetectedPos(0) + "|" + (string)llDetectedRot(0));
    }
}


Last edited by Mandarine Ordinary on Tue Jan 15, 2013 12:43 pm, edited 11 times in total.

Top
 Profile  
 
 Post subject: Re: Open script : a "hybrid" poseballs rezzer
PostPosted: Mon Jan 07, 2013 11:05 am 
User avatar

Joined: Sun Sep 30, 2012 10:28 am
Posts: 40
Hi kahn, thank you for trying it :mrgreen:

For the dance names in dialog it is something I intended to change, it is easy. I guess I will do it right now.

For the orientations did you try the position/rotation adjusting commands ? (r1+, r1=, r2+, p1+ etc in help notecard). They are easy to use in trivial cases (180° rotations for example) but I found some anims in which orientation is not trivial at all (FallinLove for example, I had to use Frank's notecard in order to find the right z rotation for this one).
For these ones a dialog adjuster would be a cool idea (and would be easier than typing chat commands), if you can do that it would be great 8-)

I don't know if that's the same thing you were talking about ? the problem I see with orientations is that rotations are only global-based for now, so a dance is always oriented the same (if 2 couples play the same dance they will be oriented the same). I see how to change that because I have already done it in other scripts but it needs quite a change in poseballs scripts so I will do that later maybe and also I don't know how to choose an orientation ? random z rotation ?

Perdon my poor english but what is TLC actually ?

EDIT : ok, I just added the dialog name feature, main script and animations notecard have changed :)


Top
 Profile  
 
 Post subject: Re: Open script : a "hybrid" poseballs rezzer
PostPosted: Tue Jan 08, 2013 5:15 pm 
User avatar

Joined: Sun Sep 30, 2012 10:28 am
Posts: 40
Wow you ve got me motivated lol :D

I added in a row the ADMIN menu with existing user commands (limited to owner and only usable when you are sat on a poseball and on the channel userChannel) and the fix for orientations so they match the toucher orientation as you suggested. poseball1 script, poseball2 script and main server script have changed.

It would be easy to make the SAVESETTINGS command and to add it to the admin menu but I prefer not using OS functions so this script can be used in SL too.


Top
 Profile  
 
 Post subject: Re: Open script : a "hybrid" poseballs rezzer
PostPosted: Wed Jan 09, 2013 7:38 am 
User avatar

Joined: Sun Sep 30, 2012 10:28 am
Posts: 40
Hey 8-)

I took your first suggestions into consideration, now the script loads animations and backup at reset, and WRITEBACKUP uses llOwnerSay instead of llSay(DEBUG_CHANNEL,). So the only commands needed are WRITEBACKUP and RESETSCRIPT and they are both in the admin menu (with KILLEVERYBODY :twisted: ). Main server script has changed slightly.

For adjustments I think adjustment buttons in the admin menu will be just fine :lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 4   [ 33 posts ]
Go to page 1, 2, 3, 4  Next


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net