I'd like to make my character's talking view play the frames randomly.
Is it possible e.g. to make a line in the global script that makes the talking view play out in such a way?
Yes, it's possible, but not entirely straightforward. It would be much easier to just put a long random sequence of frames in the speech animation loop, and that's what I would recommend unless there's some very particular reason why it needs to be "truly" random.
@Snarky:
Alright, thanks! I'll just do that then :smiley:
All right, cool. If you're unhappy with the result, let us know and we can look into how to script a truly random animation.
I think there are two ways, either to script timed animation yourself, locking character to particular view/loop/frames, or altering existing frames if you have have a premade loop for that. The latter can be achieved using Game.GetViewFrame and then assigning ViewFrame.Graphic to either existing sprite, or DynamicSprite.Graphic you created at runtime.
(Unfortunately there is no way to change the number of frames in loop though)