I am planning to add new comments to the game, but not the chants, whistles and all that stuff, but making the game saying the scorer's name when he makes a goal, for instance.
The idea I have is recording several files named, for example, "GOAL_RONALDINHO.ogg", "GOAL_NEDVED.ogg" or "GOAL_SHEARER.ogg", and via modifying the code, make them sound when they score. The problem is that I'm still a total newbie with BlitzBasic and I don't know how to make it properly. As far as I've seen I could modify some arrays through the code, but it seems tricky. I have been checking if I could modify this starting from line ~1985 at match.bmx:
Code: Select all
If ( ball.poss_last * team_side = side )
PlaySound(comm_goal[Rand(0,comm_goal.length-1)], chn_comm)
Else
PlaySound(comm_owngoal[Rand(0,comm_owngoal.length-1)], chn_comm)
EndIf
Code: Select all
//Pseudocode follows
Play (dir, "GOAL_" + scorer + ".ogg", False)
I hope you get the idea, my explanation may look weird I'm planning nice things if I manage to complete this challenge!
Thank you very much in advance for any help given.