Davek84 / MatchOdds

BakkesMod Plugin for Rocket League for an easy way to see if you are the favorites or the underdogs for a match.
GNU General Public License v3.0
3 stars 1 forks source link

Where is commentary handled? #6

Open remi1771 opened 2 months ago

remi1771 commented 2 months ago

I'm thinking of adding some voice lines that say what the commentary says, but I'm not exactly sure where/how are the commentaries handled

Davek84 commented 2 months ago

There are 2 methods that contain all the Commentary:

GetCommentary - https://github.com/Davek84/MatchOdds/blob/c749155d190dd4f5721e5060fa3ed75faa88a3d1/matchodds/matchodds.cpp#L179 GetToxicCommentary - https://github.com/Davek84/MatchOdds/blob/c749155d190dd4f5721e5060fa3ed75faa88a3d1/matchodds/matchodds.cpp#L520

So if you were to trigger sound files I guess you'd do something like this:

if (rndNumber == 1) {
 Commentary = "You are the underdogs.";`
 TriggerSoundFile("underdogs.wav");
}

And then have a TriggerSoundFile() function?

remi1771 commented 2 months ago

Yeah, I'm thinking if there's a function that can get the name, maybe have a AI generate a name although that might take a lot of time lol