I think I have found a solution, I am posting it here in case anybody will stumble onto this kind of problem someday.
To fix it, I have placed all cars at the beginning of the scene at the starting position (which is hidden), preloading all of them. Doing this, the talking animation works just fine when they randomly get moved.
My guess is that the problem isn't the random number generator, but having a character suddenly instantiated on the scene while the character is talking can stop the talking animation, for some reason. When I previously tested with all cars (as suggested by AFRLme), it worked fine because they all got instantiated at once when the scene started, but once I started calling them individually at random the issue appeared again.
I was going to suggest having the cars all at the start oint from the beginning & having them jump back to the start point when done.
In regards to animations. If they haven't been preloaded & they aren't in the cache then they get loaded frame by frame. I think only the current character (playable character) get automatically loaded into the cache (well the default character animations such as talk, walk & idle. Not sure about manually started character animations). For rest of animations & characters I believe as I mentioned that unless preloaded, that they will load frame by frame.
Anyway... It's nice that you managed to sort it out yourself!
That auto loading frame by frame method is very nice and comfortable for small animations and single images. But for huge animations with many frames it produces stuttering and destroy the smooth play. It would be nice to have an option to preload specific animations before they start to play.
1. "Preload/Unload character" means all animations of the selected character?
2. If I preload an animation, I have to unload the same animation after leaving the scene? Or these preloaded animations are removed automatically if they are not needed for a long time (like the auto pre-/unloader)
Manually preloaded animations need to be manually unloaded. Animations regularly loaded will get added to the cache until they are removed at end of scene or get pushed aside to make space for newer animations, I think.
As for character animations: I believe that the standard animations (idle, talk & walk) for your playable character (not sure about npc characters) are stored in the cache indefinitely. If your character has tons of character animations, I don't really think it's a good idea to preload the character as it will store animations from all outfits associated with that character to the cache (according to the action parts page of the wiki manual - I wrote the page, but I think I mostly rewrote in my own words what it said on the old 2d wiki).
The case in question in this thread will more likely than not have been lag caused by too many animations on the screen (playing / loading) at the same time. If the system lags then it will still cause slow-down in animations currently on the screen & you will probably experience the mouse cursor moving / jerking slowly across the screen if you try moving it while lag is occurring. All in all it's all down to optimizing your game, to the best of your, or your teams ability, whether that's by scaling down animation sprites, reducing the amount of frames in certain animations, converting images / animations to webp or removing certain non-important animations, images & openGL shader effects entirely, is up to you to figure out what works best for your game. It is after all, all about compromise. Is this specific feature vital to your game? or can it work without it?
This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
Deponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For more scenes there is Visionaire Studio PRO from €75, and to sell your game the Indie Bundle for €99.
Through December 1: all licenses 30% off, for example the Indie Bundle for €69.30 instead of €99. Applied automatically at checkout.