Best Way to Make a Timer Every 0.01 seconds
CandDApps
Member Posts: 5
I have a timer that I want to have spawn an actor every 0.01 seconds. Using the timer rule makes the game a bit buggy. Are there any ways to improve performance, or any ways to avoid using the timer?
Comments
- Thomas
You might try making a timer set to every .05 seconds and spawn 5 actors at once. You might achieve the desired end result (100 spawns per second) that way.
Hi @CandDApps Good advice from @SnapFireStudios and good thinking from @RThurman...
Another way would be for a spawned actor to spawn... so in the Prototype actor Rules that's first spawned:
Timer: After 0.01 seconds
Spawn
---Behaviours for Random x,y I guess...
One point: 0.01 is such a small amount of time, and as RT pointed out, that's 100 actors per second.... after just 10 seconds you'll have 1000 actors.... but hey, if that's what you're after...
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
You can absolutely spawn 100 actors per second, although its highly not recommended, and probably will take more than 1 second for the engine to execute.
@CandDApps What are you trying to do exactly? Maybe give a bit more info and we can help finding a different way to achieve the same effect..
Roy.
However, the timer can't go much faster than .033 seconds. Even though it should theoretically be able to go approximately .0167 seconds. (There is a reason for this -- the relationship between the two numbers should give a hint.)
The original post seemed to indicate the use of the timer behavior. I was just pointing out that the timer can't go that fast (0.01 seconds). So... one way to work around that limitation is to use a slowed down timer, but squeeze more spawn behaviors into its timing window. Its much more consistent to do it this way. That is, one will get a more consistent 100 spawns per second than if one attempts use a "0.01" timer.