happyjustbecause wrote:I added the wireframe region, but when the visibility state is changed for the wireframe region, it doesn't change it's child actor's visibility state. And the EventDisable doesn't affect the child actor.
You must be doing something wrong. Try testing it in a new game to see that it works, and then try it in yours.
happyjustbecause wrote:I'm trying to fix the sound effect, but when I put in the draw actor of the wireframe (<-- maybe you meant the rain actor?), it just sounds like it's playing the same sound effect constantly, like white noise almost.
You without a doubt should not put it in the rain actor. While I get why you might think of putting it in the rain actor, think of it this way. You have several rain actors, for this argument I'll say eight of them. If each of them have the code in the draw event, then you have it playing new rain noises eight times per frame.
Now, you said your sound effect is 30 seconds long. So, knowing that it is supposed to be in the wireframe (where there is only one actor), why would you want it to trigger every frame? You only want it to play once every 30 seconds, which is 900 frames assuming you haven't changed the game's fps. I would use a variable timer in the draw event to play the sound only once every 30 seconds. But looking at your code, you aren't even using sound effects. You are using the PlayMusic2 function, which means there can't be any music in your game while the rain is active. But because you are using PlayMusic you can use the built in way of repeating it (by setting the number of times to play it to 0). And to stop it you use stopSound(1) since music is always in the first channel.
happyjustbecause wrote:I want to have the RainOn variable that way I have an easy way to turn the rain on/off.
Use a function. Your current code is in the draw actor, which means it triggers every frame, retelling the game. And even then your code won't work, because it disables the draw event. Which means it will never see that RainOn switched. Using a function to toggle it allows you to only call it once, and unlike your variable, the game really only needs to be told once.