RandomizeNextEntry is extremely useful, and I've made quite a large usage of it, however it causes a lot of accidental repetitions.
In FMOD, the default randomization behavior is to avoid repetition.
There isn't even a great need for complexity, just avoid playing the last entry that was randomly selected. Because the problem is mostly noticeable when a conversation is played twice in a row, this would solve 90% of the issue.
RandomizeNextEntry that never plays the same entry twice in a row
Re: RandomizeNextEntry that never plays the same entry twice in a row
Hi,
I'll look into writing a separate function/script for that. It will require each instance of RandomizeNextEntry() to remember the most recently-chosen entry so it doesn't repeat it next time.
I'll look into writing a separate function/script for that. It will require each instance of RandomizeNextEntry() to remember the most recently-chosen entry so it doesn't repeat it next time.
Re: RandomizeNextEntry that never plays the same entry twice in a row
That would be the most extreme case, but realistically, we just want to avoid the last entry to replay.
Simply storing the previous result globally is enough
The problem is that RandomizeNextEntry is *not* a normal sequence instruction.
It's handled by the Sequencer itself, setting a static flag on the conversation controller, which is consumed when the subtitles finish.
I don't think it can be implemented as a custom sequencer instruction, but only by modifying the ConversationController itself.
Simply storing the previous result globally is enough
The problem is that RandomizeNextEntry is *not* a normal sequence instruction.
It's handled by the Sequencer itself, setting a static flag on the conversation controller, which is consumed when the subtitles finish.
I don't think it can be implemented as a custom sequencer instruction, but only by modifying the ConversationController itself.
Re: RandomizeNextEntry that never plays the same entry twice in a row
You could technically do it with variables and conditions (e.g., using the built-in 'thisID' Lua variable) but it'll be cleaner for me to add a Lua function like RandomizeNextEntry() that doesn't repeat.