Hey guys, I found a solution to some fps drops that my old sound emitter script made a long time ago (http://forum.thegamecreators.com/?m=forum_view&t=179100&b=23)
But I fixed it. The systm actually uses two scripts, you place your dynamic entity and place the default repeatsound.fpi script where the appear script would be, and then you place this script....
script >>>
...in the main script field. This script tells the appear script when to fade out. You can adjust it by changing the soundscale value (you can have values that ere not integers too (like 1.6). It works with any dynamic entity.
To test the fps drop I set up the scripts with some crates in the scifi entity library and placed LOTS of them in the level, and the resource meter stayed at a constant 60 or so fps. The old one would lag down to sometimes 30 or less!
I would appreciate if some people would test this so I could find out how it would work on their end.
Here is the new main script again:
Enjoy.
EDIT: added state 1 to end of script
EDIT: removed state 1 because it made the soundscale not work for some reason
I actually just realized that there is a brief fps drop when the player spawns but it only lasts a couple seconds and then it goes to 60 fps, I bet on faster computers this wouldnt happen. Not a big deal.
[/href]