Bluegunk Posted November 11, 2022 Posted November 11, 2022 Is it possible to loop one particular stage of a 5 stage animation so that it loops, eg, stage 2 three times before moving on? I know the last stage has a burnt in timer that will close out the animation. But I'm not so sure about the other stages. How would I create that lop in a script? Thank you for any ideas. 1
Fotogen Posted November 11, 2022 Posted November 11, 2022 I think you can change "timer". Time, seconds, how long each stage lasts. Never did that myself, but I do remember there are SL functions to do that.
Bluegunk Posted November 11, 2022 Author Posted November 11, 2022 31 minutes ago, Fotogen said: I think you can change "timer". Time, seconds, how long each stage lasts. Never did that myself, but I do remember there are SL functions to do that. That's something I can investigate. Thank you!
anjenthedog Posted November 11, 2022 Posted November 11, 2022 (edited) FWIW, while I can't tell you how to literally script it, I can note that I've used SL Tools in the past, to create custom length animations with repeating stages included, using stages from various animation sequences or just one, just-in-case this query doesn't result in the desired answers. And yes, I know it's not what you're asking, but it is a close third cousin's best bud's brother in a pinch Having said that, my guess (and hope) is that someone on par with @traison will pop up with their usual clarity and skillset. As to stage-length, noted by @Fotogen, yes, that's set in SL under the Timers & Stripping submenu, as well as your ability to turn off automatic stage advancement in the Animation Settings submenu Oh, and just to toss something else in, the new "edging" feature in SL beta8 163 and above, erm, that's SLSO's update, will often result in not only stage repetition, but also stage randomization, and increased overall animation length (I mean from start to completion). After I installed the update, animations started acting like they had a mind of their own. Sometimes, they just run through like "the old days"... but often, they go round and round, picking one of the stages in a sequence, playing it, advancing to yet another random stage, playing it advancing to yet another roll of the dice (5 sided in your case) , and/or hanging on any one of those stages for far longer than the timers are set for, (I['ve seen them go for minutes when they're set for tens of seconds) then finally bouncing to a (dice roll please) new stage. I've even had to force close the sequence a few times because it just won't stop (It's like the participants get into a mating frenzy where only death will stop it...) good luck! Edited November 12, 2022 by anjenthedog 1
traison Posted November 11, 2022 Posted November 11, 2022 (edited) Some animations already have this built in. Here's a list of json files and the lines at which the timer has been defined for reference: Anubs_Creature.json:4532: "timer": 12.0 Babo Creature.json:1722: "timer": 7.5 Babo Creature.json:2044: "timer": 8.7 Babo Creature.json:2215: "timer": 8.4 MoreNastyCritters.json:877: "timer": 1.0 MoreNastyCritters.json:3213: "timer": 13.0 NibblesAnims_Creature.json:55: "timer": 4.0 NibblesAnims_Creature.json:163: "timer": 25.0 NibblesAnims_Creature.json:220: "timer": 30.0 NibblesAnims_Creature.json:277: "timer": 4.0 NibblesAnims_Creature.json:385: "timer": 25.0 NibblesAnims_Creature.json:442: "timer": 30.0 NibblesAnims_Creature.json:556: "timer": 3.5 NibblesAnims_Creature.json:613: "timer": 25.0 NibblesAnims_Creature.json:678: "timer": 25.0 NibblesAnims_Creature.json:786: "timer": 25.0 NibblesAnims_Creature_Object.json:61: "timer": 5.0 NibblesAnims_Creature_Object.json:118: "timer": 25.0 NibblesAnims_HUMAN.json:267: "timer": 25.0 NibblesAnims_HUMAN.json:327: "timer": 15.0 NibblesAnims_HUMAN.json:556: "timer": 25.0 NibblesAnims_HUMAN.json:734: "timer": 25.0 NibblesAnims_HUMAN.json:816: "timer": 25.0 NibblesAnims_HUMAN.json:1154: "timer": 25.0 NibblesAnims_HUMAN.json:1268: "timer": 18.0 znarokspack.json:85: "timer": 2.0 znarokspack.json:152: "timer": 6.0 znarokspack.json:244: "timer": 6.0 Looking at how the timers are defined in json leads me to draw the conclusion that this value could be adjusted (or queried) from a script using these functions defined in sslBaseAnimation: bool function HasTimer(int Stage) float function GetTimer(int Stage) function SetStageTimer(int Stage, float Timer) float function GetTimersRunTime(float[] StageTimers) float function GetRunTime() float function GetRunTimeLeadIn() float function GetRunTimeAggressive() If that is incorrect, one would have to find where SL loads animation json files (from SLAnims) and see which properties it stuffs those timer values into, and then from there see how they are exposed to external scripts. Properties (not the same as fields) are always public, same with methods. Failing that, there's also sslThreadController which has this function: function UpdateTimer(float AddSeconds = 0.0) The UpdateTimer function sets TimedStage to true, which has it automatically advance to the next stage when the timer runs out. Unfortunately it seems like there's no way to query the current value of StageTimer. Maybe there is a way but I just didn't spot it. Edit: And for posterity, if you want to search for json files with timers yourself. The way I did it is by starting cmd through MO2 and cd'ing my way to the SLAnims folder and there I issued this command: "findstr /N time *.json". There are other ways too, like Notepad++. Edited November 11, 2022 by traison 1
Bluegunk Posted November 12, 2022 Author Posted November 12, 2022 18 hours ago, anjenthedog said: I can note that I've used SL Tools in the past, to create custom length animations with repeating stages included I tried to do that with Tools, but the animations are untouched by whatever I set up, and just play through their default stages and length. I'm on AE, and wonder if there is something that doesn't quite work right with Tools? I have had very poor results with it recently. @Traison - you really must be tired of me! Thank you for your detailed information. I'll go and experiment and see if I can get things to work! It's a FunnyBiz animation and, in fact, he has some timer values in the JSON, though I confess I could not work out how I could employ them. I ought to have enough to go on, now. I use Notepad++ and a few other handy tools, so I can have a look through for timers. Thank you! 1
anjenthedog Posted November 12, 2022 Posted November 12, 2022 39 minutes ago, Bluegunk said: I tried to do that with Tools, but the animations are untouched by whatever I set up, and just play through their default stages and length. I'm on AE, and wonder if there is something that doesn't quite work right with Tools? I have had very poor results with it recently. Yeah, I had the same (similar) problem with SL Tools back in 1.5.80, when I first tried creating a custom animation, but a later version works in 1.5.97. It's possible it needs an update for 1.6x 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now