I have a general, but not advanced, knowledge of programming. I took a few classes in high school including a college level Java class, so I can think of how this might be structured, but it's been a few years. I want to put different sound files (probably from other games) into a folder for each zone, then choosing a random file to play from that folder when I am in that zone. I don't know any of the game variables so I'll demonstrate the logic I plan to use:
Let's assume the Balmora music folder has 3 files. Balmora1, Balmora2, and Balmora3.
function Random(int, int); //this function generates a random numberint MusicChoice;bool UpdateMusic = false;string CurrentZone;while (1){ if (CurrentZone != player.location) { UpdateMusic = true; CurrentZone = player.location; //this statement checks to see if the player changed zones, thus requiring a change in music } if (UpdateMusic == true) { if (player.location == Balmora) { MusicChoice = Random (1, 3); //generates a random number between 1 and 3 Game.Music = "Morrowind\Data Files\Music\Balmora\" + "Balmora" + str(MusicChoice); } } UpdateMusic = false;}
There's some C++ style code depicting how the script might flow. What I'm asking for is how I would manage this in the Construction Set, and how its variables would compare to what I have here. Any advice is appreciated.