Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lag issue when triggering scripts
Linus Ågren Offline
Senior Member

Posts: 309
Threads: 58
Joined: Jan 2011
Reputation: 5
#3
RE: Lag issue when triggering scripts

(05-25-2013, 06:28 PM)sonataarctica Wrote:
(05-25-2013, 06:14 PM)junkfood2121 Wrote: Hey!

I need some hints on how to reduce or remove the lag when the player is triggering scripts. The lag makes the player know they are to expect something, which I do not like hehe.

I have not read so much about the map_cache files, but if I were to play through the entire mod, and then save the cache files it creates when releasing the mod, will it make the scripts lag less, or will it just bug out?

Thanks!

If you're playing sounds and using particle systems when the event is triggered, you need to preload them when entering the map Smile do this by using something like this:

void OnEnter()
{
PreloadParticleSystem("particle.ps");
PreloadSound("sound");
}

Thanks for the reply!
I have always wondered what the preload scripts are useful for. Thanks for clearing that one out for me!

Though, the most of the lag comes from enabling / disabling entities. I have made quite a few custom wall / ceiling entities for breaking purposes.

Creator of The Dark Treasure.
05-26-2013, 08:42 AM
Website Find


Messages In This Thread
RE: Lag issue when triggering scripts - by Linus Ågren - 05-26-2013, 08:42 AM



Users browsing this thread: 1 Guest(s)