There was a sound bug in my game to do with the sound boxes, altering the volume of them would effect the volume for all sounds. I got My tutor Adam to fix this, but then I lost the files, so I was back to square one. But now after weeks of messing around with code I have figured it out. To alter the volume of sounds independently you need to link them to a movie clip.
So when creating a new sound use this code
this.createEmptyMovieClip("s1",1);
this.my_sound = new Sound(s1);
Im so glad that this is fixed now as it was the main thing that was holding me back from creating levels.
Although losing the code that Adam fixed for me was a set back, it did give me the chance to try and figure it out on my own and I can now understand more actionscript than I used to. This helped me create other things in my game such as the spring boards that propels the character into the air. I knew that pressing the jump button altered the characters y coordinate so I took that code and altered it a bit so it would happen when the player touches the box, then i altered how high it would make the character move.
One more thing I want to add to the game is platforms that can be jumped through and then stood on.
No comments:
Post a Comment