|
Post by Rodak on Jun 15, 2005 19:05:38 GMT -5
Here is a problem I am having trouble debuggering.
I have three statues which have the "Face Leader" command in their action script.
I thought it would be fun to put a stone grinding type sound when they moved, so I expanded their scripts to include a direction check and gave each statue it's own variable to record it's last known direction. Putting this in a loop I got it working perfectly for the statue on which I was testing. It's a cool effect... try it!.
Then I added it to the other two statues' action scripts and the troubles began. By standing in certain places I was able to lock up the game and the noises were competing with each other. It was awful.
So I made an "I'm Talking!" flag and turned it on before any statue "spoke" and off after (of course making the noise conditional on this flag). It almost worked. The cacophony was drastically reduced, although often it still overlapped sounds.
But the worst part is that it still freezes occasionally (warring between two {or three?} sounds), and not in the same spots even!
Can anyone help with this?
Any advice would be appreciated (as always).
|
|
Arter
RPG Maker-in-Training
If I'm just bad news, then you're a lair.
Posts: 29
|
Post by Arter on Jun 15, 2005 23:09:46 GMT -5
Well, I don't know how reliable any help from me would be since I'm so new at this, but when I first started playing, since I have different music for just about every location, when I would go from one place to another the music and sound effects would carry over; so I would be hearing the music and SFX from the overworld map over the music and SFX from my town. What I did to fix it was I went into each sound script and put Sounds - Stop at the beginning, and it took care of it by stopping whatever was playing and starting the new sound. Don't know if that'll help at all, but it might be worth a try.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 15, 2005 23:15:44 GMT -5
I know when I made music and played two sounds at once of the same note I'd roughly cut the volume of both in half, and in doing so it made it sound perfectly normal to the player, even though both instruments in actuality suddenly plummeted in volume. You may be able to fix the sound by just cutting the volume down a lot. On the other hand that means it would be quieter if only one statue moved, so I think your way is better. On the other hand, perhaps doing this might help the freezing because it'll become more simple (back-up first to save time). Another thing I've learned in making my game is that having a whole lot of action scripts (for me usually moving townspeople) can make the game lag a lot (but I've never had it freeze). Sorry, hopefully someone else'll know more.
|
|
|
Post by Rodak on Jun 16, 2005 3:58:24 GMT -5
put Sounds - Stop at the beginning Great Idea, I even thought to do that myself, but the command can not be directed at Sound Effects, only Background Music or World Sounds. You are thinking along the right lines already, though. William: I think you'll appreciate the solution I found. I put a wait command in each script and made them all different lengths of time. When all 3 wait commands were the same length, they were apparently able to fight for dominance. Now they wait 6, 12, and 18 frames respectively before "talking." I left the flag in there because it is not that bad a waste of memory and may be helping. Oy, what a system! And about the "lots of events causing lag" problem, I can do that with just one event! If you resize things in their action scripts (or even in an enter map script using event control change) that'll do it too. I wanted to do this when there was an object I wanted to resize along one axis only. The game lagged as much as when I crammed too many events together. Another concept I can't use! Oh well, I've had worse. Peace.
|
|
|
Post by Dungeon Warden on Jun 16, 2005 16:57:12 GMT -5
Yes, I had a similar problem with my Waitressing mini-game and used a wait command to fix it just like you did. I'm glad you figured it out on your own. These things can be annoying, but it's a nice feeling when you figure it out.
|
|