Jump to content

Gakkor

Resident
  • Posts

    17
  • Joined

  • Last visited

Everything posted by Gakkor

  1. Thanks for the replies on the if-else statements. I understood that "per state" there is a high limit on statements, I just didn't know how many I could stack ontop of each other with each one falling to a new tier.
  2. How many tiers of if-else statements can I throw together? I know there is a limit of 23 if statements per State, but not the tier amount. With your code I believe that I can add: integer noOfButtons =4;integer divisor;rotation r90;default{ state_entry() { llSetLocalRot(ZERO_ROTATION); r90=llEuler2Rot(<0.0,0.0,-90>*DEG_TO_RAD); divisor = 100/noOfButtons; llSetLinkPrimitiveParamsFast(LINK_SET,[ PRIM_LINK_TARGET,1, PRIM_TEXTURE,4,"c856bd9b-c759-ffa6-a70f-6d65b8d9d38d",<1.0,1.0,0.0>,ZERO_VECTOR,0.0, PRIM_TEXTURE,1,"c856bd9b-c759-ffa6-a70f-6d65b8d9d38d",<1.0,1.0,0.0>,ZERO_VECTOR,0.0, PRIM_LINK_TARGET,2, PRIM_TEXTURE,1,"dc67a1a3-fac1-7887-8dc0-fcaff123618b",<1.0,1.0,0.0>,ZERO_VECTOR,0.0]); } touch_start(integer total_number) { integer n = llDetectedLinkNumber(0); integer BPress = (integer)(1+(n/divisor)); if(1==n) { llSetLocalRot(r90*llGetLocalRot()); r90=ZERO_ROTATION/r90; } else if (2==n) { if (llDetectedTouchFace(0)==1) { vector v = llDetectedTouchUV(0); integer n = (integer)(v.x*100); } if (1==BPress) { llSetScriptState("RadarHUD", TRUE); } if (2==BPress) { llSetScriptState("RadarHUD", FALSE); } } }}
  3. Sorry for the late reply as I game on the side, and due to memorial day weekend, its been double exp weekend. The version of LSL that I was using was indeed out of date, the new link your threw my way cleared up the error, thank you. As for your code, it works as intended. So my question goes down to: Several people have recommended only using 1 prim. How do I go about making different areas of the prim appear, and function, as "buttons" without overlapping a second, flat, smaller prim that uses the touch command that's set in the Root when they are linked? Sorry for the annoying questions. I have to learn somewhere!
  4. I have bypassed my problem with the following code in the root prim: rotation rot_xyzq;rotation rot_pqrs;default{ state_entry() { vector xyz_angles = <0,0,-90.0>; vector pqr_angles = <0, 0, 90.0>; vector angles_in_radians = xyz_angles*DEG_TO_RAD; vector angles_in_radians2 = pqr_angles*DEG_TO_RAD; rot_xyzq = llEuler2Rot(angles_in_radians); rot_pqrs = llEuler2Rot(angles_in_radians2); } link_message(integer sender_number, integer number, string message, key id) { if (message=="Button1") { llSetLocalRot(llGetLocalRot()*rot_xyzq); } if (message=="Minimize") { llSetLocalRot(llGetLocalRot()*rot_pqrs); } }} Then I have my Button1 and Minimize buttons in their appropriate positions. When pressed they rotate the entire prim with the child prims still properly attached. This prevents the use of Say channels and allows me to have the prims communicate easily. I have also used the same link messaging to make the popup menus appear using a mixture of alpha and the code provided earlier in this thread to shrink the prim then rotate it. It looks wonderful. If anyone has a different way of doing this, let me know as I am more than happy to expand the small amount of knowledge that I have. (please make sure that it works before posting, thanks.) Edit: I messed around with an idea on the forums and made a simple flat plane with no textures and linked it in the corner of the once root prim. This plane is now the root prim and the rotation is smoother and when the expansion button is presses it expands to the left of the button. Video to be posted shortly. Edit: With this script I can add several rotation points and use all sides of the Prim for whatever needs I may find. If I run out of room for menu options on one side, I can pop a NEXT button and have it rotate the prim to another side. This way no side is wasted and you can use as much space as you can fit on each side! Link: http://youtu.be/FY9rXObG9Nc
  5. After a bit of tinkering I've hit a brick wall so to speak. IT appears to me that when I upload a mesh to Second Life, that it considers the mesh a solid, unmoving, unbending, unwavering object. Like a shaped piece of rock. What I have been attempting to do is to make an animation file using my object in Blender and exporting the movement points to SL. Problem: It appears that SL imports for animations only seem to work when importing animations for Avatars. Question: Am I correct in thinking this? Future: I want to find a way to force Second Life to move mesh models as though they were made of rubber instead. I don't want to link a bunch of prims together to simulate movement. This results in choppy objects and ugly "creatures" developed by other people. Objects with fine joints look horrible as they are animated due to the lack of stretching on the joints. Is anyone else working on a way around this, or have I lacked on my research?
  6. I'm getting some problems with the script. The following errors occur: The name 'llGetLinkPrimitiveParams' does not exist in the current context The name 'PRIM_DESC' does not exist in the current context I went ahead and saved the script anyways, and the "button" prims highlight with the "touch" hand, but when I have them set to llSay(o, "Button#"); nothing happens. I've copied and pasted a few times and no result.
  7. http://youtu.be/qDS7Vgli37w The hud I recorded in this is someone elses, but is an example of what I want done, because its simple. Its clean. It allows me to make multiple sides, with multiple backgrounds with multiple options. It makes the hud SMALL so that it doesn't fill the users screen. It gives the user the option to click on it, to have it expand. To clarify: I was attaching the code you gave me to the front, BUTTON prim, not the root prim. The code acted funny at times. Sometimes only rotating the prim a little, other times sending it in different axis spins. If I attached it to the root prim, then everytime they clicked the "background" it would keep rotating. I just need it to rotate ONCE, thus the side button does the job just fine.
  8. That script sent the child prim into a tailspin. Went from O to I then to / then \ then - and repeated. (That's if I was facing the prim.) I managed to solve the problem by having the button prim send a message to a negative channel and having the root prim, after it was all linked, listen to that channel. Upon hearing the proper command it rotated to expand the HUD. Now the odd problem I am having is that some of the HUDs I have seen out there, do this slow enough so that it looks like the HUD is expanding in the desired direction. As I have it, it just kind of appears/snaps to. HUD goes from: to: When the button on side 1 is pressed. The button is the front, smaller half of a rectangle prism. When its pressed, the prism is rotated 90 degrees to show the right side of the prism which has the texture posted above. This side will then have other content on it using the Aplha settings. The desired effect I want, is to have Side1 look like its slowly collapsing on itself Vertically and the new Side2 that's rotating around will look like its expanding from the right side of the screen.
  9. Situation: I have a simple HUD design with 5 linked prims (more to come, this was just supposed to be a simple test) and need ALL the prims to rotate together when selected. This is to simulate a button press that expands the HUD to its full design. {} to {+++++}. The reason for the prims is to be used as buttons for pressing, and one will hopefully be a headshot of the owner (If I can get that script finished also, XD). Problem: When I set the button press to rotate the prims, it rotates the root prim,AND the child prims. That or it just rotates the child prim that is the "button" pressed. Rotated prims stay attached at their dead center and rotate on their axis. llSetRot, llSetLocalRot, llSetPrimitiveParamsFast, and all the such do not seem to want to work for me. Its late and I probably passed the answer several times in the last 2 hours of research, but for now I'm tired. Simple answer. What script can I use, and expand upon later, to rotate the prim & its child "buttons" while keeping them aligned properly. Imagine rotating a box so you can see the next side and all its writing. Nothing else should move ON the prim, just the entire thing should rotate 90 degrees in whichever direction. I want it to rotate (if looking at it from above) clockwise for the first press. 2nd button will rotate 90 degrees on a different axis. Sorry for the possibly dumb and simple question, but as a new scripter to SL, I want to simplify a lot of the commands that are available, and put them as HUD components for personal use.
  10. Your screenshot isn't working. But from what I can understand, its possible if done right as long as most objects stay under 256 prims. You may want to consider building several parts separately then importing, followed by building them in SL, then linking them. This would make your prim-count less, and your largest worry will be the scripting to make all the parts work together, but if you have the prim talk to itself, it shouldn't be too much of a hassle. I've only been in the crafting field with SL for the last 2 weeks, but have modeled a breedable pet and scripted its actions. As for Animation, I cant figure it for a darn when using Blender. So when it comes to that, best luck elsewhere.
  11. I want to thank you for the link to the videos, but those are prime examples of videos that are extremely outdated. Hell, the base tutorial video says to create a "Blank Mesh" which doesnt exist in 2.67. Even the latest video of how to create a cup is from April 2012, and Blender received at least 3 major overhauls since then, removing and changing alot of the issues that the video says to use. To your reply: I am aware the the UV map is for adding a texture to fit the uploaded design, some of the old tutorials have you use them to force an object to retain a specific shape using a pre-sized texture. I was merely trying to say that I even exhausted that particular venue to no result. Below is the mesh that I am attempting to upload. This is post-sculpting and post-polygon reduction. http://i522.photobucket.com/albums/w343/Gakkor7/tub1a_zps779fb960.png I can upload basic shapes and meshes with limited edits to them just using the Vertices, but as soon as I try to use the "Sculpt mode" in Blender to add the bumps, crevices, indentations, and more, Second Life says the File Does Not Contain a Mesh.
  12. All these complex and complicated designs, I just cant see them being done with a basic mesh without using sculpting. Clothes I can see, because SL molds them to fit around the target player and has physics for the edges to act like a skirt, shirt sleeves, etc. Some of the chairs, for instance. Perfectly round legs, complex woodword. IS this all just texturing on a mesh?
  13. Heya all. I have a quick question I hope can be answered just as quickly. As a new player to the mesh/sculpting field I was recommended Blender for its popularity and apparent "ease of use" with creating models for second life. Watching all the neat items that players make as well as the highly detailed furniture, I wanted to see if I couldnt try to get my hand in this little niche of the internet and make some extra cash on the side. Now for the problem: Attempting to upload a very basic "bathtub" with sculpting on the side to add the feel of rocks. Second life tells me there is no mesh when I upload the .DAE file. I have used the Decimate modifier to reduce the amount of vertices and planes that the object has and have managed to reduce it quite a bit, but still retain the details that I want to use. At this point in time, I want to upload the mesh to the server, put on a very basic texture while in SL, and see how it comes out. Both the main server and SL Beta tell me that the mesh is non-existent and I cant figure out how to fix this. I have spent the last 2 days surfing the internet trying to find out how to get around my problem, but most of the videos that I can find are from older versions of Blender. Examples would be: Older versions of Blender offer multiple UV shapes to create, 2.67 only allows you to make a UVSphere. So alot of the tutorials on youtube, I can't follow along with. Attempting to create the shape, export it as a UV file and then upload it as a texture, just results in a transparent texture with odd lines on it where the shape should be. The file itself is 13.7 MB, reduced from 23.1MB, and is not modified outside of Blender and SL. Alot of the "bake this, bake that" in SL I, once again, cannot follow along with because my version of Blender does not have the options that some of the 2012 tutorials have sitting around in their submenus. Any ideas, suggestions or questions would be appreciated. I will continue to check this thread every half-hour or so, or you can message Gakkor on the server and I'd be happy to answer there as well.
×
×
  • Create New...