SetIdleView doesn't work with some characters [SOLVED]

Started by Postmodern Adventures, Tue 15/11/2022 21:02:47

Previous topic - Next topic
I recently have trouble getting the SetIdleView command to work with characters other than the player.
If I code
player.SetIdleView(43,1);
it works like a charm for the main character, but when I do the same with another character it doesn't play its idle animation.

I'm using the 3.5.1.19 build. Has anyone had a similar problem? I don't remember having this problem in other games.

Khris

I did a basic test with 3.5.1.20 and it worked fine for me.

It's unlikely that the command broke somehow, so make sure that

a) the function containing the command is called at all (add like Display("Setting idle view"); and see if that appears)

b) the function isn't called in repeatedly_execute or the like, which will reset the delay over and over again and prevent the view from ever playing

c) you aren't calling SetIdleView(-1, ...) elsewhere

All it seems correct, it's like AGS randomize the results. I don't understand. One thing that I noticed in non playable characters is that if I add a Changeview instead of a Lockview for them, the SetIdleView works.

Luckily, I have a seedy tricks for fix that issue, but I don't understand is that something that had always worked for me, now don't do it.

Khris

Wait, what do you mean by AGS randomizing the results? Also, ChangeView and LockView are very different commands used for very different things, and I can easily imagine that locking the view but not unlocking it again can disable the idle view.

ChangeView is used to permanently change the character's NormalView, like when they change their clothes for instance.
LockView is used before animating a character and you're supposed to call UnlockView when the animation is done.

Quote from: Khris on Wed 16/11/2022 13:19:09Wait, what do you mean by AGS randomizing the results?

Something so simple like that:
Code: ags
cnonplayer.SetIdleView(430,1);

Works in some scenarios or events but not in others.

It's a problem that I hadn't experimented in my early game, that line it worked always and in all cases.

But I don't want to bother you with this little issue, Khris. Usually I use that command to make the characters blink. I don't want to make a big deal out of it. I'm not worried at the moment, but what's clear is that it's something strange and out of logic.

Updated the game to 3.6 [RC2] and all it seems to work fine!  :grin:

Khris

🤔

Glad it's working but not really a satisfying resolution tbh :-D

SMF spam blocked by CleanTalk