Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - boosterterrik

#1
Quote from: Snarky on Wed 18/01/2023 21:03:38You can also combine this with a continuous "rest" animation (whether that's breathing, fidgeting, swaying, or what-have-you) that runs at all other times.


This last part, concerning "runs at all other times," seems to be my sticking point. I can't get "all other times". I'll set up an idle animation for the characters, then, if a different animation is triggered, I can't get them to go back!

The documentation for AGS is both very extensive and well-written in places, while being aggravatingly sparse in others.

For instance, I thought I had a moment of realisation that "BlinkingView" could be used as a "rest" animation, thus solving my issue through the character properties. Then, after taking *way* too long online, I discovered that BlinkingView only triggers during that character's speech. There is *one* mention of that in the documentation, but it is strangely NOT in the place where you are told how to use Character.BlinkingView.

I feel like I need a long weekend with the manual
#2
Quote from: Cassiebsg on Mon 23/01/2023 20:51:44So next time you put something in rep_exec_always, ask yourself "do I really really need this to run 40 times in a second?" If the answer is no, then there's probably another solution. ;)


That makes complete sense, and is the reason I removed the commands from the RepExec function, as I had a feeling it was just locking itself up by never carrying out the command, only triggering it.

My trouble now is that I am struggling to find places to put these animation commands, as setting timers is strangely difficult.

I had hoped it would be, "Set Timer [X] for [Y] frames; when [Y] reaches 0, trigger [Z] animation." But it appears more difficult than that.
#3
Quote from: Khris on Mon 23/01/2023 23:50:46won't work as expected; a non-blocking animation will not pause the execution while it runs, so UnlockView is called immediately after the Animate command, before the character starts animating.


Thank you for this, I had no idea that NoBlock would lead the next commands to immediately begin executing. It makes sense though.
#4
Quote from: Snarky on Wed 18/01/2023 21:03:38If you want to have a variety of "idle" animations triggering without any discernible patterns, one way is to use a timer with a random delay, and then pick an animation at random from a selection of animations. You can also combine this with a continuous "rest" animation (whether that's breathing, fidgeting, swaying, or what-have-you) that runs at all other times.


I am missing something, as I am trying to use timers to trigger animations between rests, but I can't get the resting animation to return after the timer animation. Specifically, when I include the "cCharacter.UnlockView()" command, the timer animation no longer triggers at all! Here's what I've been trying,

Code: ags
function room_AfterFadeIn()
{
  
SetTimer(1, 500);

cCastellanos.LockView(7);
cCastellanos.Animate(0, 8, eRepeat, eNoBlock);

cFreddie.SetIdleView(20,5);

cFisher.SetIdleView(3, 15);

cOHalloran.SetIdleView(11, 15);

cLeblanc.SetIdleView(13, 3);

cLorne.SetIdleView(15, 1);

cMarienne.SetIdleView(19, 10);

 if (IsTimerExpired(1)){
  cLeblanc.LockView(12);
  cLeblanc.Animate(0, 4, eOnce, eNoBlock);
  cLeblanc.UnlockView();
  cLeblanc.SetIdleView(13, 3);
  }
}

Previously, I placed the "if (IsTimerExpired(1)" segment in a separate function for repeatedly executing within the room, but I was starting to believe that the reason "setidleview" wasn't working is because it was repeatedly being 'set'.

My core question is: should I be using timers set in the global script instead of the Room script for this sort of thing?

If this is too rudimentary, feel free to ignore it. I've just been experimenting most of the morning and struggling to find the answers.

p.s: I originally was trying

Code: ags

function Room_RepExec()
{
If (IsTimerExpired(1)){
  cLeblanc.LockView(12);
  cLeblanc.Animate(0, 4, eOnce, eNoBlock);
  cLeblanc.UnlockView();
}
else {
cLeblanc.setidleview(13,3)
}
}

and all that did was make her no longer animate at all. I'm feeling as if there is something core to the logic here that I am missing. Again, I don't want to waste anyone's time, I'm just feeling genuinely at a loss.

#5
Quote from: Khris on Wed 18/01/2023 21:13:57As far as I understand your posts, you're looking for idle animations that play immediately upon entering the room but then have a 15 second pause between them?


Sort of, but the timers will all vary. Its a restaurant scene with most of the game's cast present, and we want it to seem lively. I'm going to work on learning a little more about the Character.SetIdleView command tommorrow to see what I can sort out, but I appreciate your taking the time to create the example code.

On a side note though, as I am brand new to this, how are you getting blocks of code into the forum to look like that?
#6
Quote from: Snarky on Wed 18/01/2023 21:03:38But this is a more "programmer-y" way of approaching the issue. Certainly, just creating a very long animation loop should also work. Did you have a chance to do the test I suggested to see whether it's the particular animation loop that causes the crash, or the combination of all the animations?


In terms of command logic, this makes sense and is not overwhelming or confusing. Trouble is, this is all still new enough to me that a lot of capabilities are still unknown to me. I've read a good bit of the documentation (which is what helped we better understand room structure, connecting them, and the creation of inventory stuff etc), but theres plenty that, without context, completely escapes me. I have long wanted to take the time to really settle in and learn to code properly, and I suppose thats what I'm doing now, if a bit sloppily.

Importantly, I would prefer to try things that are difficult and right, rather than easy and wrong, you know? I appreciate you taking the time to respond to what is likely a boringly simple thing for those with experience.


As for trying what you said, I caught the strong whiff of having done something wrong at a bedrock level, so I deleted the animation in question to prepare for completely changing how I do animations so that they are right in the future. That being said, I do sort of suspect that it is a problem of too many animations, as reducing the number of loops "solved" the problem.

Lastly, as for working with AGS for work; Its kinda my fault. I told my boss that, for the game we had in mind, we might as well use AGS. I opened it up and monkeyed around with a few things just successfully enough that one thing led to another and now I am the Developer (for now). We received some arts funding from the gov't for our game, so we are putting it towards making a viable demo of our game's opening segment. My boss and I (its just the two of us) are both games writers, and I am also a professional video game and board game designer. As the one with knowledge of systems and theory, it kinda just fell to me to handle this until we have the budget for a proper, dedicated Developer.

Tomorrow I'll get to work trying out Character.SetIdleView() instead of persistent animations. Thanks for the help
#7
I have checked every instance within the documentation of idle animations, and I have found no places to make changes to how quickly idle animations trigger. There's the frame-delay on idle animation, but that won't make characters not stand completely still for ~15 sec between idle animations (one character, for instance, is holding a lit cigarette).

This approach is likely not strictly necessary, but I am at a loss for other solutions.

Outside of the issue I have presented here, the initial problem I sought to solve was the issue of needing characters to appear natural and occasionally fidget, drink a drink, or smoke a cigarette, without player input. Without the functionality of making the "idle" status trigger *far* more quickly, like say, 3 seconds, I haven't known a better way to handle this.


The other issue is that I am doing this for work, am not a coder, but am the only one willing to learn. Feels like half my time these days is spent reading documentation and trying to wrap my head around concepts that are likely simplistic to those with more experience.

#8
Hey friends, I've run into a strange brick wall here. Most of my problems have been solvable with some time in the documentation, but I can't find any references to this issue anywhere.

I have a scene set up with multiple characters in a restaurant. Because AGS idle animations are triggered too slowly, I have each character set to roll through a series of animations upon fading into the Room.

So far, this has worked fine with five of the characters on-screen. But now, my 6th character's animation is causing the game to crash at the end of her first animation cycle, despite the fact that I have checked the "Run next loop after this to make long animation" on each loop in the locked view.

When I reduced the number of loops from 9 to 4, this solved the problem-- but I don't want her animation to be so short!

I cannot figure out why the animation loops are tripping up AGS. I have dealt with the issue before, but that was just the simple mistake of having forgotten to check the continue loop check box. I have double checked that I am using the correct view, and the weirdest part for me is that the problem goes away when I reduce the number of loops in the view. All of the other characters have long loop strings, so why is this any different? Any thoughts?

Here's what I have written in the room script:

function room_AfterFadeIn()
{
cCastellanos.LockView(7);
cCastellanos.Animate(0, 8, eRepeat, eNoBlock);

cFisher.LockView(3);
cFisher.Animate(0, 4, eRepeat, eNoBlock);

cOHalloran.LockView(11);
cOHalloran.Animate(0, 4, eRepeat, eNoBlock);

cLeblanc.LockView(14);
cLeblanc.Animate(0, 4, eRepeat, eNoBlock);

cLorne.LockView(17);
cLorne.Animate(0, 4, eRepeat, eNoBlock);

cMarienne.LockView(19);
cMarienne.Animate(0, 4, eRepeat, eNoBlock);

}

SMF spam blocked by CleanTalk