Jump to content

MSTRPLN

Resident
  • Content Count

    86
  • Joined

  • Last visited

Everything posted by MSTRPLN

  1. Hello, for some odd reason the alpha channels of either the normal map, specular map or both makes some weird light jagged edges. (saved as Targa 32bit) I've followed this article: -click
  2. MSTRPLN

    HUD toggle

    Yes, it's probably going to be used once, so i thought a "empty" transparent texture would be better than to toggle the alpha in the script for each face, unless im wrong i thought that was havier on performance than a transparent texture
  3. MSTRPLN

    HUD toggle

    Okay that made things clear, because i uploaded a png with "nothing" in it because else the face would be white (or whatever color it's set to) thats the reason of my question, a transparent texture or setting the "transparency" by script
  4. MSTRPLN

    HUD toggle

    I understand, i just noticed that the "fatpack HUD" (texture changer) of Valekoer's Hoodie changed textures rather fast (even with multiple parts selected (sleeve, torso etc) but that might be because those textures were in my cache aready. well to make it simple, would it be best to hide the non-used faces with a empty png texture or just set the alpha to 0 (clicking "None" would set all faces alpha to 0 untill a texture is applied to one of them then it will change it's alpha back to 1) i tested 2 exact same copies with the prim info tab open, the one with unused faces set to alpha 0 (no textures) had a slightly less Display value than the one with all faces set to alpha 1 and non used faces texture empty png
  5. MSTRPLN

    HUD toggle

    Thank you, this works as i wanted (although when changign textures with "ALL" toggled there seem to be a little delay between them but i might aswell remove that function and just have the "none" (for my purpose) a little question about impact/memory/load, i have a little example here done in the beta grid, would it be smarter to have every face (the different 6 colored faces) be a empty texture or toggle the llSetAlpha between 1.0 and 0.0 ? The decal faces lay on top of the road so they are not part of the road texture (seperate mesh)
  6. MSTRPLN

    Weird ingame glitch

    Edit, i managed to fix it. for intersections and the Tsplit etc i used a 2nd UV map channel to bake the texture for (to make it seamless inside Photoshop) and aparently the viewport material was using the 1st map channel but when exporting it used the 2nd channel. To fix use "UVW Mapping Clear" modifier and select channel to 2 to delete the 2nd map channel
  7. MSTRPLN

    HUD toggle

    Sorry to be a pain, im running into a issue to a point where im totally clueless, things that make sense won't even work anymore. Unfortunately there isn't any information or documentation on these type of things but yet ther are everywhere in sl (Texture changer for clothing, meshbody HUDS etc) I started with 2 linksets 1. Target: 2 objects of which textures will be changable 2. Sender: 6 objects with each a different function when clicked. The target is simple the catch is as follows: [5] [6] [3] [4] [2] [1] 5 = All function (sets all target cubes to enable textures being changed). (Also changes buttons "Left" & "Right" to green = enabled) 6 = None function (ets all target cubes to disable textures being changed). (Also changes buttons "Left" & "Right" to white = disabled) 3 = Changes to texture #1. 4 = Changes to texture #2. 2 = Toggles left cube to enable textures being changed. (also toggles colors on button itself green = enabled, white = disabled) 1 = Toggles right cube to enable textures being changed. (also toggles colors on button itself green = enabled white = disabled) i only got 2 cubes for now but it might be more. Receive Script: // Script for texture changer receiver integer channel = -50508; // Channel is the integer for reception (number mus the same as a transmission channel otherwise script will not work) default { state_entry() { llListen(channel, "", NULL_KEY, ""); } listen(integer channel, string name, key id, string msg) { if (llGetOwner() == llGetOwnerKey(id)) // Checks if the owner of the object who is sending a message its the same owner of the receiver { // Front Face if (msg == "tex1Left") { llSetLinkTexture(1, "2433879f-6116-1521-38c0-eb86f2ce607a", 4); } if (msg == "tex1Right") { llSetLinkTexture(2, "2433879f-6116-1521-38c0-eb86f2ce607a", 4); } if (msg == "tex2Left") { llSetLinkTexture(1, "df50ac59-b871-b00f-e3c5-2633c4f1cb6e", 4); } if (msg == "tex2Right") { llSetLinkTexture(2, "df50ac59-b871-b00f-e3c5-2633c4f1cb6e", 4); } // Else } } } Transmit Script: // Choose any number up for 1024 as the channel for the transmission integer channel = -50508; integer toggle; integer Left; integer Right; default { on_rez(integer star_param) { } touch_start(integer tn) { toggle = !toggle; if (llDetectedLinkNumber(0) == 3) { if(Left == toggle && Right != toggle) { llOwnerSay("Left tex1"); llRegionSay(channel, "tex1Left"); } else if(Right == toggle && Left != toggle) { llOwnerSay("Right tex1"); llRegionSay(channel, "tex1Right"); } } else if (llDetectedLinkNumber(0) == 4) { if(Left == toggle && Right != toggle) { llOwnerSay("Left tex2"); llRegionSay(channel, "tex2Left"); } if(Right == toggle && Left != toggle) { llOwnerSay("Right tex2"); llRegionSay(channel, "tex2Right"); } } else if (llDetectedLinkNumber(0) == 2) { if(toggle) { llSetLinkColor(2, <0.0, 1.0, 0.0>, 4); } else { llSetLinkColor(2, <1.0, 1.0, 1.0>, 4); } } else if (llDetectedLinkNumber(0) == 1) { if(toggle) { llSetLinkColor(1, <0.0, 1.0, 0.0>, 4); } else { llSetLinkColor(1, <1.0, 1.0, 1.0>, 4); } } else if (llDetectedLinkNumber(0) == 5) { llSetLinkColor(2, <0.0, 1.0, 0.0>, 4); llSetLinkColor(1, <0.0, 1.0, 0.0>, 4); } else if (llDetectedLinkNumber(0) == 6) { llSetLinkColor(2, <1.0, 1.0, 1.0>, 4); llSetLinkColor(1, <1.0, 1.0, 1.0>, 4); } } } The llOwnerSay(Left tex1); etc is just for debugging to see if that part is working Right now im not too worried about making the scripts "validatable" my main concern is making it work and then perfecting it i've tried a list, string list2string but i can't seem to get it to work, i tink a list of objects available (specially for the "ALL" button) would be more effective and less code If it's too hard to understand what i want is: 1. being able to change the textures of different linknumbers & faces (for now only linknumbers) 2. toggle which linknumber a texture would be changed for (including a ALL & NONE button)
  8. I'll try that out thank you for the idea!
  9. Ugh i had the above example but without deleting the script after it, i dont know why i forgot about that & thanks alot for the llSleep function! that makes things alot easier (i used llSleep(2.0)
  10. Hello, I'm making a kind of unusual script/system, i will explain. Intro: I have 2 items: Prim and a HUD Prim contains: HUD & script: "HUD_Receiver" HUD Contains: script: "HUD_transmittor" (the HUD also contains out of 5 prims, 4 with actions) Within the HUD i have a button to delete all objects out of the 1st prim (including the HUD & HUD_receiver script) The thought behind it is.. I have a prim that i want to be able to change it's textures with a HUD so the main action will be changing textures. One button to detach the HUD but also a button to delete everything from the prim once satisfied (why? because this will be a modular prim, copied multiple times within a region) Issues: 1. When clicking on the "delete" button it would detach the HUD before it would send the message to the prim Fix: Sending the "Detach" function through a timer event to a 2nd state, the timer waits 2 seconds for the object to deliver the message then detach 2. With issue 1 fixed it now won't delete the (object) "HUD" itself anymore. 3. Changing the channels from -50504 to a random number, the script won't work anymore (that's why the random number is disabled) ie: // gChan = -1 * (integer)llFrand(1000000.0) - 345; (yes i know it says gChan instead of channel that's not the issue) Scripts: // Script for texture changer receiver integer channel = -50504; // Channel is the integer for reception (number mus the same as a transmission channel otherwise script will not work) delete_all_other_contents() { string thisScript = llGetScriptName(); string inventoryItemName; integer index = llGetInventoryNumber(INVENTORY_ALL); while (index) { --index; // (faster than index--;) inventoryItemName = llGetInventoryName(INVENTORY_ALL, index); if (index > 0) llRemoveInventory(inventoryItemName); llRemoveInventory(thisScript); llOwnerSay("Everything removed."); } } default { state_entry() { llListen(channel, "", NULL_KEY, ""); } touch_start(integer total_number) { llRezObject("HUD", llGetPos() + <0.0,0.0,1.0>, <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0); } listen(integer channel, string name, key id, string msg) { if (llGetOwner() == llGetOwnerKey(id)) // Checks if the owner of the object who is sending a message its the same owner of the receiver { // Front Face if (msg == "tex1") llSetTexture("2433879f-6116-1521-38c0-eb86f2ce607a", 4); if (msg == "tex2") llSetTexture("9fc13d27-47b6-1a0a-4262-7ab9e52ffc65", 4); // Else if (msg == "die") { delete_all_other_contents(); } } } } Above script goes into the main prim (contents: HUD + above script) // Choose any number up for 1024 as the channel for the transmission integer channel = -50504; // Delay in seconds float delay = 2.0; default { on_rez(integer star_param) { llRequestPermissions( llGetOwner(), PERMISSION_ATTACH ); llSetAlpha(0, ALL_SIDES); llSetLinkAlpha(LINK_SET, 0, ALL_SIDES); // gChan = -1 * (integer)llFrand(1000000.0) - 345; // gChan is a global integer } run_time_permissions(integer perm) { if(PERMISSION_ATTACH & perm) { llAttachToAvatarTemp(ATTACH_HUD_CENTER_1); llOwnerSay("Attached."); llSetAlpha(1, ALL_SIDES); llSetLinkAlpha(LINK_SET, 1, ALL_SIDES); } else { llSay(0,"Not attached :("); } } touch_end(integer tn) { if (llDetectedLinkNumber(0) == 3) { llRegionSay(channel, "tex1"); } else if (llDetectedLinkNumber(0) == 2) { llRegionSay(channel, "tex2"); } else if (llDetectedLinkNumber(0) == 5) { state two; } else if (llDetectedLinkNumber(0) == 4) { llRegionSay(channel, "die"); llSetTimerEvent(delay); } } timer() { state two; } } state two { state_entry() { llDetachFromAvatar(); } } Above script goes inside the "HUD" object I might be missing something and i need a break, any help would be more than helpfull! Please keep in mind that these are just placeholders, the finished product would be the Mesh item itself & a stylized HUD
  11. MSTRPLN

    Weird ingame glitch

    To default
  12. MSTRPLN

    Weird ingame glitch

    This is so confusing, this never happend before & nothing seems to work.
  13. MSTRPLN

    Weird ingame glitch

    Didn't work. i might make a copy of models in the future and keep the "quads" version just in case. I have litterally no idea what causes this Edit: I tried cutting the object into smaller pieces but that didn't fix it either. PS: No i have no material tiling applied inside 3DS Max (i don't even use a image but colors)
  14. Oh, that was less hard than i thought.
  15. Hmm, any pointers how i would do that? (yes owner only, because i want to use this to change between different decals on the roads. I'd rather have a hud with thumbnails than a dialog)
  16. MSTRPLN

    Weird ingame glitch

    Hello, Somehow when i upload a mesh it ignores the UVmap, only on a few objects not all of them and everything is the same. (Yes also UV channels) Is this a common thing if so how would i solve it? It doesn't make sense, it not only looks unmapped but also tiled
  17. Hmm not really. More like (keeping it simple for now): Item A has 2 items in it's contents: 1. Script - 2. Item B ( called HUD) when clicking on item A it will attach item B as a HUD. I managed to do something like this with llAttachToAvatarTemp but it attaches "Item A" rather than "Item B" default { state_entry() { llRequestPermissions( llGetOwner(), PERMISSION_ATTACH ); llSay(0, "Hello, Avatar!"); } touch_start(integer total_number) { integer totalItems = llGetInventoryNumber(INVENTORY_ALL); integer index; while (index < totalItems) { if(PERMISSION_ATTACH) { string itemName = llGetInventoryName(INVENTORY_OBJECT, 0); integer type = llGetInventoryType(itemName); if (itemName == "HUD") { llAttachToAvatarTemp((integer)ATTACH_HUD_CENTER_1); llSay(0,"Attached!"); } else { llSay(0,"Not attached :("); } } } } } Not really going deep into permissions etc, just trying to get the attaching to work. i tried adding the item name, type etc in the "" llAttachToAvatarTemp" but that gave me the following error "Function call mismatches type or number of arguments" and the wiki only says it needs a integer & attach point, not an example of attaching a different object.
  18. Hello, i was wondering the following: 1. Can you attach/enable a HUD by clicking on an object? (im making a road system and i would like a HUD to pop-up when you click a road which will give you a texture changer HUD) Why? Because, if possible i'd like to create a hud to style it how i like instead of using a dialog (also the person would see whichtexture is which) but only changing the texture of the object that's been clicked/selected 2. How would one select different elements in a HUD? for example those texture changer HUD's that let's you select which parts you want to change the texture of (for example a shirt you could enable/disable the front, back, sleeves, extras) Thanks in advance
  19. Oh you put it inside the same command, i can add this for a extra security.
  20. Okay it's working thanks! Although i had to change: llRezAtRoot("object",llGetPos(),ZERO_VECTOR,ZERO_ROTATION,gChan); into: llRezAtRoot("object",rezPos, rezVel, rezRot,gChan); as stated before
  21. but how would i make them all unique & still being able to communicate between the 2? The rezzer & rezzed object need to be connected, but i don't want them to connect to any other nearby instances.
  22. Alright i've read about "llList2Key" Which didn't give much information on how to use it and more other things. It just makes it look more complicated than it really is i guess. Not sure if i would have to use "while" since most if not all examples i've seen using "llList2Key" were in the while parts. I feel that i'm close but not quite there yet, something is wrong and i don't know what: // Script for texture changer receiverinteger rChannel =-5001;integer Rezzer;integer kRezzer;// Channel is the integer for reception (number mus the same as a transmission channel otherwise script will not work)default{ state_entry() { llListen(rChannel, "", NULL_KEY, ""); integer i; list Rezzer = llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]); key kRezzer = llList2Key(Rezzer,i); } listen(integer channel, string name, key id, string msg) { // Checks if same channel if (rChannel == channel) { if (id == kRezzer) { //if the message came from the rezzer llDie(); } else { // Not from the rezzer llWhisper(0, "Whut?"); } } }} (20, 33) : ERROR : Type Mismatch That's right here there the red star is: if (id == kRezzer*) { This is the script of the receiver (the prim getting rezzed) Somehow i thought changing it to: key id = llList2Key(Rezzer,kRezzer) But that gave the same error, not sure if it works that way llList2Key(fromlist,tokey) for the transmitting script: //Rez an object on touch, with relative position, rotation, and velocity all described in the rezzing prim's coordinate system.string object = "[V] Demo"; // Name of object in inventoryvector relativePosOffset = <2.0, 0.0, 0.0>; // "Forward" and a little "above" this primvector relativeVel = <1.0, 0.0, 0.0>; // Traveling in this prim's "forward" direction at 1m/srotation relativeRot = <0.0, 0.0, 1.0, 1.0>; // Rotated 90 degrees on the x-axis compared to this priminteger startParam = 10;// Channelinteger rChannel =-5001;integer count;default{ state_entry() { llOwnerSay("Ready"); } touch_end(integer total_number) { llInstantMessage(llDetectedKey(0), "This is a demo! It will delete itself in 10 seconds."); state two; }}state two{ state_entry() { // Rezzes item vector myPos = llGetPos(); rotation myRot = llGetRot(); vector rezPos = myPos+relativePosOffset*myRot; vector rezVel = relativeVel*myRot; rotation rezRot = relativeRot*myRot; llRezAtRoot(object, rezPos, rezVel, rezRot, startParam); llSetTimerEvent (10.0); } timer () { llWhisper(0, "Sorry your demo is over."); llSetTimerEvent (0.0); llRegionSay(rChannel, "RezDemo"); state default; }} I've got the states to work so it's unclickable during rezzing.
  23. Thank you, Lowering the Glossiness to even 10 i got this: Looks more like a vector o .o I'll try your other solutions, hope one will work Edit: Changing textures worked., no idea how or why. Normal & Specular (also used on both alphas) (half size):
  24. Hello, So i was playing around after reading this article and somehow it behaves differrent for me It looks fine: until i shine a light on it: Client: Default Grid: Beta Diffuse: no alpha Normal map: standard 128,128,255 color with specular as alpha saved: .TGA 32 Specular map: white solid color with darker & contrastd specular saved: .TGA 32 Specular: However the demo from the article shows just fine:
×
×
  • Create New...