Jump to content

FridayAfternoon

Resident
  • Posts

    33
  • Joined

  • Last visited

Everything posted by FridayAfternoon

  1. That’s what it ended up being, I had a local variable name clash with a global variable, it was just indirectly related so I didn’t see it until I refactored my code to be state oriented (which turned out pretty well although I am now seeing some instances where my HUD isn’t clickable even though I am in a state with touch-start event. Script reset fixes it. I‘ll figure it out Thanks again to everyone who offered advice, you guys are great.
  2. I wanted to thank everyone for offering up help and suggestions, it lead me to explore different paths. I still haven’t figured it out though, lol. But.. I am going to re-write my code in a state oriented manner. Not just because I think it will help with issues like this, but because it will be a bit of a learning experience. High level I’ll have an AnimationsRunning state where I start them in state entry and stop them on state exit. And flow can go from there to config state on inventory change or stopped state from touch start. And after config it will transition to stopped. im sure it won’t be quite so simple but the multi notecard reader script I am using is done that way so that should help me (and maybe I just pull that functionality into the main script at the same time. speaking of that, is there an easy way to know what triggers an inventory change in terms of type of item so I can avoid re reading the notecards if the inventory change was caused by something else?
  3. Note home so can’t post code right now but in the changed event (as well as state_entry) I am first calling StopAnimations, then calling config. The stop animations is failing because somehow the variables have been reset. I was thinking could this be some multi-threading issue where config is running at same time and finishing first? Seems like it would wait for the first routine to finish before running the second, correct? something just occurred to me, I’m actually reading the notecards from a different script, and it re-reads them on its own changed event, but it doesn’t send the info until the first script requests it and I put a timer in that script to allow the first one to run and finish. Maybe there’s something happening there. I will re-write that one so it doesn’t read the cards on changed, instead it re-Reads them only when requested by the first scripts config routine. I think maybe there’s something in this part of the flow messing me up.
  4. I do appreciate the efforts at helping! Hard to do a code snippet since the script is over 700 lines long, but: AnimationsArePlaying is declared as a global variable I've done a find on the variable and looked at every instance it's used in my code, and aside from inside debug statements where I am casting it to a string before chatting out it's value it's only set in two places (posted below). what's weird is the list of current animations is getting cleared too. Because I couldn't figure it out I was thinking this must be some deal where if you update an item while it's attached it behaves weirdly. I think I'm going to just wait a few days and then look at it again, and if I still can't figure it out I'll get a list of the running animations and compare their UUID's with the one's in the HUD and stop them that way as Quistess suggested I could do. PlayAnimations() { debug("PlayAnimations()"); integer i = 0; integer length = llGetListLength(CurrentAnimations); debug("CurrentAnimations list length = " + (string)length); if(!length) { say("No animations enabled, enable them using the item config menu."); } if(length) { do { llStartAnimation((string)CurrentAnimations[i] ); PlayingAanimations[i] = (string)CurrentAnimations[i]; } while(++i < length); AnimationsArePlaying = TRUE; } debug("PlayAnimations(): AnimationsAreplaying (0=false) after play = " + (string)AnimationsArePlaying); } and StopAnimations() //stops all playing animations { debug("StopAnimations()"); debug("StopAnimations(): AnimationsAreplaying (0=false) before stop = " + (string)AnimationsArePlaying); integer length = llGetListLength(PlayingAanimations); debug("from stop animations length of playing animations =" + (string)length); if(AnimationsArePlaying) { integer i = 0; integer length = llGetListLength(PlayingAanimations); if(length) { do{ llStopAnimation((string)PlayingAanimations[i]); } while(++i < length); } AnimationsArePlaying = FALSE; } debug("StopAnimations(): AnimationsAreplaying (0=false) after stop = " + (string)AnimationsArePlaying); }
  5. I should have clarified, the variables in question are Global variables. LlGetAnimationsList() returns UUIDs no, and I thing you need the animation name to stop it right? stopping any which might be running I suppose is an option, very potentially could be an extremely long list though. I’ve gotten error messages before when trying to stop an animation when it wasn’t running, but I think that was actually because the animation didn’t exist. I suppose this can be my fall back option.
  6. I am pulling my hair out trying to figure out what is going on with a script I am working on. The script is in a HUD and it runs animations with some config settings read in from notecards. When the inventory changes the config cards get reread. I am trying to anticipate the case where a new card gets added with the HUD attached and the animations are running. I have a Boolean variable AnimationsRunning as well as a list of the running animations. I have no issues starting and stopping the animations using the routines I have written. The idea is within the changed event I check these values and if animations are running I stop them, but what is happening is both the Boolean and list variables are getting reset to 0 when the inventory changes and I have no idea why. I have checked my code and the only places I change the AnimationsRunning variable is within the start and stop animations routines I’ve written. I don’t have anyplace where I might have stuck in a = instead of an == for comparison purposes …I just use if(AnimationsRunning)… I’ve added debug statements to chat out the values of the variables and all is good up until the point where the inventory changes, and then those variables get reset. Is this normal? If so, I guess storing them in prim data would be the answer? thanks to anyone who offers advice.
  7. . My advice would be to use a single object both sitters sit on and use either AVSitter or nPose to run your animation. Those systems will ensure the animations start at the same time and you can set up a default pose that plays without needing to show a dialog menu. you can add a script to hide/show the object you are sitting on ( poseball) or use those systems to do it for you. Between the two for what you want nPose is probably easier, it’s drawback is you need a notecard for every menu item so that can get tedious when you have lots of sets of animations, but sounds like that’s not what you want. AV sitter is pretty easy too, and it has a much larger user base, but either will work just fine and they both have easy to follow tutorials. both of these are free; but yiu can get nPose in world and for the free version of AVsitter you need to go to GitHub to download it. Also; if you didn’t know; you can sync ani,actions in your viewer with control-s, but that’s just your own viewer,
  8. I would suggest you add more context for what you are trying to do, such as I want to recreated these particular moving elements at this particular time stamp range. i watched the video for two minutes and have no idea what you are after.
  9. Thank you, so what I gather from this then is that decimation doesn’t really do you any good if you are relying on f curves to control joint positions on keep in between frames correct, and that would be true for either format? so, as far as optimizing a .anim animation would the best workflow be to first bake the animation, then set all the keyframes to vector, then decimate? And, as far as anim format, when you upload to SL are there further optimizations or do those all happen simply by saving to that file type and SL just takes the file as is? and if this last is the case, then the optimizing that a tool like avastar is doing ( can’t remember but I think it’s called compression) is just tweaking the way the anim format does its optimization? it would be nice to know what that final result is in terms of keyframed data, in a blender action I mean as opposed to a text file, and to be able to tweak it, but when I have tried to import into blender it bakes it ( I think, but maybe that was a BVH file I imported). regardless, thanks for taking the time to reply.
  10. Thank you, so what I gather from this then is that decimation doesn’t really do you any good if you are relying on f curves to control joint positions on keep in between frames correct, and that would be true for either format? so, as far as optimizing a .anim animation would the best workflow be to first bake the animation, then set all the keyframes to vector, then decimate? And, as far as anim format, when you upload to SL are there further optimizations or do those all happen simply by saving to that file type and SL just takes the file as is? and if this last is the case, then the optimizing that a tool like avastar is doing ( can’t remember but I think it’s called compression) is just tweaking the way the anim format does its optimization? it would be nice to know what that final result is in terms of keyframed data, in a blender action I mean as opposed to a text file, and to be able to tweak it, but when I have tried to import into blender it bakes it ( I think, but maybe that was a BVH file I imported). regardless, thanks for taking the time to reply.
  11. So, I am trying to understand what happens to all the f-curves when an animation in blender is saved as a SL animation file. as I understand it, an animation file is simply a record of each joint position for each bone where the joint position changes, for every frame in the animation. No f-curves or other type “math” involved. If that is true, why would it be important to decimate an animation in order to optimize its file size? Wouldn’t the keyframes removed simply come back when the animation’s f-curves are written to frame by frame joint position files? Further, when using avastar, there is a compression stage where you can shrink the output size of the file. Not really sure how this works (asked but never got a reply, guess I will ask again). My thought here is the only way this would be useful would be to work on the file after the r-curves are converted to frame by frame joint positions, and then remove some joint positions similarly to the way the SL optimizer works, juts using greater and greater values as the compression scales up. is this the way things actually work? And if so, why would you bother to decimate your animation file since it’s all going to be changed back to frame by frame joint positions anyway? and how in the world do these motion captured dances that last 30 seconds or longer manage to get small enough file sizes for uploading without dehradin* the quality of the animation?
  12. Thank you Aglaia, it does make sense that in avastar rotating the tinker also rotates the torso (and I assume the hips as well?) given how they have implemented it (in order to make animating the pelvis way way easier). I think part of what is confusing me is if you keyframe the tinker, the torso doesn’t get keyframed as well and it makes you think you can just leave the torso out (disable that channel). And no harm done. I was thinking the COG sat in the middle but I guess the COG moves the pelvis as well, it just does it without adjusting the other bones which then moves the entire armature. it sounds like then there is no way to actually create a separate upper body animation from a lower body animation using a division at the tinker/COG/pelvis, I would need to include the torso in the lower body animation. Big bummer for what I was trying to do.
  13. I know animation syncing happens in the user's viewer, so I'm guessing you can't do this, but I have a situation* where I need animations re-synced and just stopping all the ones that are running and re-starting them again doesn't work. So, any command I can send to the users viewer to have the viewer do an animation sync? *My issue: I have a series of upper body (from COG up, excluding COG) and lower body (from COG down, including COG + Tinker, I'm using Avastar) animations that are made to be mixed and matched.In fact, they are different priorities so you can start and stop higher priority animations while the lower continues to run "beneath" it. The issue I'm having relates to the COG and/or possibly the tinker, which I have animated in the lower body. If I run an upper body animation without COG animated at same time as lower body with COG animated, everything works fine. But if I run a second upper body animation at higher priority, the animation breaks and the entire upper body starts to rock as if the torso was parented to the tinker, even though the COG is static in the lower body animation. If I re-sync with ctrl-s, everything starts working again (the upper body starts rocking). So, I'm wondering if I can force a re-sync on the users viewer after I start the higher priority animation. I will add that I've tried animating the COG in both upper and lower body animations, as well as neither and instead using a separate COG only animation, and I get the same issues no matter what. Depending on priority of the COG, either the upper body or lower body starts to rock. It's as if there is no COG to serve as an anchor for the tinker and that motion passes through to either the torso or the hip anchors.
  14. Ability to set individual joint priorities is of high interest to me. Is it fair to say the only tool that will do that is animhacker, or are there others. big question: is the joint priority set per joint for the entire animation, or can it change from one key frame to another? I have a case where I’d like certain bones in the first half of the animation to be one priority, and a different priority in the second half.
  15. Not really understanding, but it sounds like if you use 1.0, 1.0 it flows off the edges slightly? anyway, thanks for explaining :)
  16. From the HTML HUD demo: https://wiki.secondlife.com/wiki/HTML_HUD_Demo Does anyone know what is the issue this vector is trying to fix? // header set in set_link_media(url) // footer set in set_link_media(url) float FLOAT_FALSE = 0.0; vector RATIO_ONE_BY_ONE = <0.98, 0.98, 0.00>;// fix Second Life ... or try to!
  17. Still, allowing attachments to animesh objects would provide the desired functionality. You just add a particle emitter to the mouth of the animesh dragon and it moves (in everyone’s viewer) along with the animation. they added benefit is you could dress up your animesh character with clothes and so forth (assuming of course the mesh is the same). That would make it way easier to create NPC’s for RP sims and so forth.
  18. @Rolig I didn’t know local texture viewing was a thing, that would be really handy. I’ll have to look into it. as far as my use case for the play animation locally, I made a HUD with a number of facial expressions and hand gestures, and I wanted to be able to give the users of the HUD the ability to preview their expression and hand positions before displaying them to the world as it were, so they could be assured they had set up the options to achieve their desired effect.
  19. @Quistess Alpha Thank you so much, it is working :)
  20. Thank you for taking the time to post that I will give it a shot tonight when I get home.
  21. Yeah, you would think that would do it but apparently it’s based on world coordinates? At least when I rotated the prim nothing changed (particles did not emit based on the prim orientation). Maybe I need to stop and restart the particle stream. I will give that a try but you would think you’d be able to spin the prim and so forth to affect the stream.
  22. I don’t think the issue is related to the way SL plays animations on the client vs the server, after all particle emitting glow sticks which move with an avatars hands during an animation are a thing and that sounds very much like what is being asked. Not sure if I understand the context here but it sounds like the animals (I.e. the dragon) must be animesh, because if it was a mesh avatar you could just attach the particle emitter to the mouth. So maybe the real request is to allow attachments on animesh objects?
  23. I’m trying to use the ribbon particle type for a particle which moves vertically, essentially I want it to behave as if gravity were pulling the ribbon towards the ground. But since ribbon particles do not show up if they move solely along the z axis I’m struggling with how to make this work. I tried using acceleration with a very small force along x or y axis to give a tiny offset to the vector, but even using a force such as .00001 skews the angle way more than I would like. Is there some way to get a ribbon particle to move as if gravity were acting upon it?
  24. Thanks Rolig, not having found any parameters for the start animation function I was afraid there wouldn’t be a way to run them locally. Seems odd that it’s not a parameter given that it’s part of the dialog that pops up when you open an animation in world. anyway, thanks again for taking the time to answer.
×
×
  • Create New...