Jump to content

Wanted: Scripter


Eu4orick
 Share

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

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

Recommended Posts

Hello there,

 

I'm looking for a quote on a script which does:

Something like a one press button/touch hud or object which opens a command menu

Can change body shape through RLV or other means? My best guess is RLV is the only method for this? It's how hot swapping clothes/accessories through clicking something on someone with wardrobes. Or how someone can have dynamic pregnancy or weight changes to the body over time.

Usually from what I know is having a group of folders which have all the shapes and links to all these various parts for these types of scripts to pull from?

 

Has a manual timer I can adjust or set to being instant or take ages in real-time. E.g. 1-1000000

+secs

Can attach or detach clothing and objects to my av through these folders. perhaps on a separate timer to the shape changes.

 

I've found all these similar things in market products just never one I could set a timer to my own preference.

 

Hopefully this makes sense to someone. I can perhaps try explain it in more detail.

 

Link to comment
Share on other sites

Making something that attaches a series of folders in sequence isn't too hard, but making something that would change your shape in a nice way would be rather difficult without a lot of tedious fiddling on the part of the user.

// configurable variables:
string folderName = "RlvSequencer";
integer indexFolderMax = 5; // the highest numbered folder. 
// with these defaults you would need 6 folders: '#RLV/RlvSequencer/0' . . . '#RLV/RlvSequencer/5'
float timeStep = 300.0; // change to next folder ever 5 minutes.

// script-managed variables.
integer indexFolder = 0;
  
default
{
  state_entry()
  {
    llSetTimerEvent(timeStep);
    llOwnerSay("@attach:"+folderName+"/"+(string)indexFolder+"=force");
  }
  timer()
  {
    llOwnerSay("@detach:"+folderName+"/"+(string)indexFolder+"=force,"+
      "attach:"+folderName+"/"+(string)(indexFolder+1)+"=force");
    // Note: inline ++ operations are evaluated right to left; using ++indexFolder above would not have the expected result.
    ++indexFolder;
    if(indexFolder==indexFolderMax)
    {  llSetTimerEvent(0);
    }
  }
}

(untested)

If the shapes are to be 'locked on', that can actually lead to cloud-inducing bugs in RLV viewers (I have not tested RLVa viewers) if you attempt to switch from a locked on shape to another one. (https://bitbucket.org/marinekelley/rlv/issues/154/attempting-to-change-shape-while-addoutfit)

 

Edited by Quistess Alpha
  • Like 1
Link to comment
Share on other sites

Thank you for this help, 

Urm I don't understand scripting all that well. I figured I would copy and paste what you put. It has a syntax error on line 7 where it says: 

integer indexFolder = 0;

Sorry I wouldn't know how to resolve this.

Link to comment
Share on other sites

Is there a way to make this script run in reverse at last folder please? Like touch a button to go one way then touch either same button or another to reverse backwards? Or just click button or menu option to enable a reverse?

Edited by Eu4orick
Link to comment
Share on other sites

21 minutes ago, Eu4orick said:

Is there a way to make this script run in reverse at last folder please? Like touch a button to go one way then touch either same button or another to reverse backwards? Or just click button or menu option to enable a reverse?

Making it do xyz when you touch button abc is easy enough, but I'm a bit busy with other projects to turn the above 'proof-of-concept' into a viable product. :/

  • Like 1
Link to comment
Share on other sites

So my next questions to you is this :). Are too busy to get back to or till when roughly? Or would you like to be paid a fee if this has now become something in those realms? I ask because I don't know honestly where I can ask to get a job like this done on SL. My hunt for scripters seems to go nowhere most times I've tried looking about. Or I don't have the right group channels to ask in. 

Link to comment
Share on other sites

2 hours ago, Eu4orick said:

So my next questions to you is this :). Are too busy to get back to or till when roughly? Or would you like to be paid a fee if this has now become something in those realms? I ask because I don't know honestly where I can ask to get a job like this done on SL. My hunt for scripters seems to go nowhere most times I've tried looking about. Or I don't have the right group channels to ask in. 

// configurable variables:
string folderName = "RlvSequencer";
integer indexFolderMax = 5; // the highest numbered folder. 
// with these defaults you would need 6 folders: '#RLV/RlvSequencer/0' . . . '#RLV/RlvSequencer/5'
float timeStep = 300.0; // change to next folder ever 5 minutes.

list directionButtons = // Add child prims with exactly these names to the HUD.
[   "Reverse", // 
    "Pause",
    "Forward"
];
list stepButtons =
[   "Previous",
    "Next"
];
integer loop = FALSE; // if TRUE, then the folders will 'wrap around' instead of stopping when you hit the first or last.
// script-managed variables.
integer indexFolder = 0;
integer indexFolderDelta = 1;
default
{
  state_entry()
  {
    llSetTimerEvent(timeStep);
    llOwnerSay("@attach:"+folderName+"/"+(string)indexFolder+"=force");
  }
  timer()
  {
    llSetTimerEvent(timeStep); // required by instant "previous" and "next" functionality.
    // alternatively could move most of this event to a function.
    integer nextFolder = indexFolder+indexFolderDelta;
    if(loop)
    { nextFolder = (indexFolder%(indexFolderMax+1))+(indexFolderMax+1);
      // % in LSL does not convert negative integers to positive ones.
    }
    llOwnerSay("@detach:"+folderName+"/"+(string)indexFolder+"=force,"+
      "attach:"+folderName+"/"+(string)(indexFolder+indexFolderDelta)+"=force");
    // Note: inline ++ operations are evaluated right to left; using ++indexFolder above would not have the expected result.
    indexFolder=indexFolder+indexFolderDelta;
    if(!loop)
    {
      if(indexFolder==indexFolderMax&&indexFolderDelta>0)
      {  llSetTimerEvent(0);
      }else if(indexFolder==0&&indexFolderDelta<0)
      {  llSetTimerEvent(0);
      }
    }
  }
  touch_start(integer i)
  {
    string name = llGetLinkName(llDetectedLink(0));
    if(name=="Loop")
    {  loop=!loop;
    }else
    { // yeah, ugly formatting on purpose. 
    integer index = llListFindList(directionButtons,name);
    if(index!=-1)
    {
      indexFolderDelta = --index;
      
      // ugly logic, I could probably clean if I felt like it. . 
      if( (index==0) || (!loop && ((index<0 && indexFolder==0 )||( index>0 && indexFolder==indexFolderMax ))))
      {  llSetTimerEvent(0);
      }else
      {	 llSetTimerEvent(timeStep);
      }
    }else
    {
    index = llListFindList(stepButtons,name)
    if(index!=-1)
    {
      index=(index*2)-1; // 0->-1, 1->1
      indexFolderDelta = index;
      // same ugly logic.
      if( (!loop && ((index<0 && indexFolder==0 )||( index>0 && indexFolder==indexFolderMax ))))
      {  llSetTimerEvent(0);
      }else
      {  llSetTimerEvent(0.1);
      }
    }}}
  }
}

Merry xmas. Decent inworld groups to ask are "Scripts" and "SL Scripter's Market". Builder's brewery might also be worth an ask, but they generally encourage do-it-yourself over hiring someone.

Two people who seem to be answering a lot of posts in the inworld-employment section lately are @Biran Gould and @LoafBr3ad

Edited by Quistess Alpha
mutually exclusive branches all being tested irked me so I added a hacky fix.
Link to comment
Share on other sites

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