-
Posts
833 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Everything posted by Domitan Redenblack
-
Chelsea Malibu wrote: There is a setting under your Avatar Preferences in Phoenix to fix this however, in most cases it's the animation itself. All animate from a position in the center of your avatar (the stomach) and if the pose is set up for a smaller avatar, you will sink into the ground. Yes, and Cool Viewer has a camera control for Z height. But not clear about Firestorm etc, so I was wondering if there is a "global" debug setting
-
Okay, thanks all. Here is my (naive?) plan: 1. Hat owner rezzes it on ground. Hat hides/shrinks any existing feather shown. 2. Hat owner drags and drops new feather from their inventory onto the Hat, which accepts it and runs code. 3. Code rezzes and positions the new feather automatically on the hat, based on some parameters, and links it in. 4. Code also updates internal database, so that a menu of feathers is available to Hat owner. 5. Menu selection of a new feather causes current feather to shrink and go invisible, and selected feather to grow to normal size and become visible. 6. Avatar Clicks upon the current feather are seen by code in the Hat itself (single prim), and a user menu of options is displayed. 7. The Hat root prim runs code to rotate the feather around the band, or sends a message to the feather so it can rotate itself. (ref: Blue Steel etc) Have I mucked anything up here, or is there a better way to do this? ty
-
Following on from my previous thread... Now my object is attached to an avatar, and I want to rezz a new objects from its contents and link it in... Is that possible? Looking at some wiki refs, seems not... Is there some way to do this? For example, let's say the object is a hat, and I want to be able to rezz/delete feathers that fit into it... ty
-
Innula Zenovka wrote: But, if I've properly understood what you're trying to do, the example in the wiki does what you want -- rezzes an object, grabs its uuid in the on_rez() event, as Qie suggests, and then creates a link with the rezzed object as the child prim. Where do comms come into it? the llCreateLink( ) does show that, and I had read a wiki, but I missed llCreateLink( ). This happens all the time for many new programmers in LSL. I appreciate the help, and i will continue to miss things I am sure, and continue to appreciate your guidance as well.
-
Darkie Minotaur wrote: look here - btw: not even taking a look at the wiki before asking here could be interpreted as very bad habbits no - for obvious reasond you can't simple delete an object from outside Wait... I did read the wiki, Darkie, not a fair comment. I can see a number of totally crappy ways to link things. What I want is the "clean way" for example: use comms to have the rezzed object tell me it's UUID then link it. Crap! Surely there must be better ways, e.g. rezzing something from contents in "linked already" etc etc Qie Niangao wrote: It's difficult to follow what the real objective is for this project, but I'll guess that the object_rez() event may be useful because it reveals the UUID of the object just rezzed by the script. The thing is... if a script is rezzing and linking and unlinking and wanting other objects to un-rez, there's often some much simpler and less laggy way to get the end effect it's trying to achieve. Yes, thanks Qie, this is exactly the boost I needed. :matte-motes-smitten:
-
Thanks, Darkie... Suppose there is more than one copy of it with same names? I am experimenting to teach myself this, but seems I need some help, thanks. I am building a display prim to rezz an Apple and an Orange, alternately, on top of it. When I rezz something, how do I keep track of it; there appears to be no Key ID returned from llRezObject( );
-
How to spin a child prim from a script in the root
Domitan Redenblack replied to Domitan Redenblack's topic in LSL Scripting
Innula Zenovka wrote: ...... Otherwise it's llSetLinkPrimitiveParamsFast and PRIM_ROT_LOCAL That only sets the rotation angle once, and does not spin, right? -
How to spin a child prim from a script in the root
Domitan Redenblack replied to Domitan Redenblack's topic in LSL Scripting
You are at 132084.1, 265441.4, 21.3 in <my home sim> located at sim3570.agni.lindenlab.com (216.82.19.95:13000) Second Life Server 11.06.29.234329 Will it say "Blue Steel" something? -
How to spin a child prim from a script in the root
Domitan Redenblack replied to Domitan Redenblack's topic in LSL Scripting
Thank you both for your replies. You say "soon" - are we talking about days, weeks or months, do you think? What percentage of sims are running Blue Steel or better now? How do I tell if my home sim is running Blue Steel? I have an old Cool Viewer on my old PowerMac dual G5 (very fast machine still !) ty -
Rolig Loon wrote: You actually could have just changed which face is not blacked out to get the same result. That -2 is just an offset to put the active texture on the proper face. The first texture in your series is actually displayed on face #2, which is currently black. I've modified that same script many times for different purposes and have messed with that index more than once. :smileywink: Hmm.... I got rid of the -2 and everything works right for me now; starts with the first Texture in the contents on the central face of the flattened cube. Perhaps my cube is flattened differently. A friend gave me this object, so maybe they changed the face/shape etc. In any case, its all working fine now
-
Ah, I see what the problem is... There is a -2 on the picture index increment, which mucks up the way I want it to work. llSetTexture( getSlide(slideno+(i-2)), i); This makes the last two pics appear first, which I thought were leftovers from before, already in the prim. Silly. All working now, thanks!
-
Void Singer wrote: you need to run the setTexture code in the on_rez event if you want it to place a spcefic image at start up... currently you only do that from the touch and timer, so the last picture viewed will be the default until code in one of those two events changes it. Nope, tried that. Did not work, not sure why.
-
//-------------------------- // preloads textures on a box // just drop it in with the images and it will cycle every 10 seconds, or // change the picture_pace variable to change the speed // updates on touch as well //-------------------------- // =IcaruS= - Added ability to crtl+drag textures integer AddDrag = TRUE; // Change this next line to adjust the image rotation speed float picture_pace=10.0; // Sendao Goodman, 2007 integer reload; list pictures; integer slideno; loadPictures() { pictures=[]; integer i = llGetInventoryNumber(INVENTORY_TEXTURE); if( i > 0 ) { while( i > 0 ) { i--; pictures=(pictures=[])+pictures+[llGetInventoryName(INVENTORY_TEXTURE,i)]; } llOwnerSay((string)llGetListLength(pictures)+" pictures loaded"); pictures = llListSort( pictures, 1, TRUE ); // put them in order llSetTimerEvent(picture_pace); } else if( reload == 0 ) { llSetTimerEvent(0.0); } } string getSlide(integer slide) { return llList2String( pictures, (slide+llGetListLength(pictures))%llGetListLength(pictures) ); } default { on_rez(integer sp) { loadPictures(); slideno=0; reload=0; llAllowInventoryDrop(AddDrag); // icarus edit } state_entry() { loadPictures(); slideno=0; reload=0; llSetColor( <1,1,1>, 0 ); llSetColor( <0,0,0>, 1 ); llSetColor( <0,0,0>, 2 ); llSetColor( <0,0,0>, 3 ); llSetColor( <0,0,0>, 4 ); llSetColor( <0,0,0>, 5 ); llAllowInventoryDrop(AddDrag); // icarus edit } changed( integer ch ) { if( ch & CHANGED_INVENTORY ) { reload=1; llSetTimerEvent(2.0); } if (ch & CHANGED_OWNER){ llResetScript(); } if( ch & CHANGED_ALLOWED_DROP ) { reload=1; } } touch_start(integer nd) { if( llGetListLength(pictures) > 0 ) { integer i=6; while( i > 0 ) { i--; llSetTexture( getSlide(slideno+(i-2)), i); } slideno = (slideno+1)%llGetListLength(pictures); } } timer() { if( reload == 1 ) { reload = 0; loadPictures(); return; } integer i=6; while( i > 0 ) { i--; llSetTexture( getSlide(slideno+(i-2)), i); } slideno = (slideno+1)%llGetListLength(pictures); } } Confused, want this script to start at first picture each time rezzed in world... I think part of the problem is textures *already* on faces of cube when rezzed, but the hacks I have tried dont seem to work. Help! ty
-
stripping chars from a string
Domitan Redenblack replied to Domitan Redenblack's topic in LSL Scripting
I ended up just doing a loop one orig char at a time, checking to see if it is in string " ABCDEFGHIJKLMNOPQRSTUVWXYZabcde.... etc" that works fine thanks -
What do you think is the best way to "alpha-numericize" a string? That is, strip all chars except <space>, A_Z, a-z, and 0-9 Or, more generally, have a string of allowable chars 'sKeepChars' ? Use a loop through the string and lookup each char of it in the sKeepChars? Any more clever ways for LSL to do it? ty
-
I have a database of a long string of region names and sales data, returned via llGetHTTP etc. The first element of each "record" is the name of a region in SL. I have a HUD which does MySQL requests for this long string of data, which is returned in a single string. I need to divide up the records by the region name. The agent who uses the HUD may not have capitalization right, which doesn't bother MySQL, but llParseString2List() *does* care about capitalization of the region names. So if an agent searches the database for a region name, but get capitalization wrong, the data is returned but I can't parse it. So, I was looking for a way to break up the string into records, by region name, but without paying attention to capitalization, etc. I can require agents to get capitalization correct, but was curious about Parsing strings based on break-strings which ignore capitalization. My proposed solution may be the only way. Just curious if you might suggest other ways to parse strings when capitalization is irrelevant. ty
-
Darkie Minotaur wrote: if you dont care to loose case information, you could simply do a llToLower on the string No, thanks. I do need to keep all the Uppers etc. Looks like it'll have to be a copy of the string to lower case, then get offset, then use offset in Orig string to break into list items etc.