Frictional Games Forum (read-only)
What is preloading for? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: What is preloading for? (/thread-20577.html)



What is preloading for? - tonitoni1998 - 03-01-2013

when would i need PreloadSound or PreloadParticleSystem? just a little question


RE: What is preloading for? - NaxEla - 03-01-2013

PreloadSound and PreloadParticleSystem are used to load a sound/particle system before it is played or created. Whenever you use functions like PlaySoundAtEntity, CreateParticleSystemAtEntity, etc., it's good to preload the sound/ps before it is used. PreloadSound and PreloadParticleSystem typically go in the OnEnter or OnStart function. Have you ever noticed that sometimes you get a small lag spike when a sound is played?


RE: What is preloading for? - vengey - 03-05-2013

Basically, when you preload a sound you are doing exactly as it says you are basically preparing the sound in the loading screen. The reason people would preload sounds is if a large amount of sounds will be used and it will keep the game from processing the large amount of data right then and there because that can cause, as little as it may be, a lag spike. By preloading sounds you prevent lag spikes in the game, but furthermore by initiating it at the loading screen I am pretty sure it can be used almost like a variable, so you can quickly reaccess it later on if you need to repeat the same sound, so you don't have to look for it again, same goes with the particles. Mainly though, it is just to prevent lag spikes as little as they may end up being. Smile Personally I do not use the preload sound feature because I tend not to do jump scare after jump scare in my stories, so I do not need the fluent sound feature, plus all of the sounds I use are .ogg format not the .snt format as used to combine multiple sound files, so the sounds I use dont require preloading due to the small file size, but if you have large, multiple sound files(.snt format files) then I would highly suggest utilization of the preload sound, otherwise if you just intend on using a single sound file, then it is not needed to still make your game great!


RE: What is preloading for? - No Author - 03-05-2013

What about preload entity ?


RE: What is preloading for? - NaxEla - 03-05-2013

I'm pretty sure PreloadEntity doesn't exist.


RE: What is preloading for? - No Author - 03-05-2013

(03-05-2013, 09:44 AM)NaxEla Wrote: I'm pretty sure PreloadEntity doesn't exist.

If there's a door broken by a monster and you died because of the mosnter, I have to use PreloadEntity the door if I want it to spawn again when I restart from checkpoint, right ?


RE: What is preloading for? - NaxEla - 03-05-2013

(03-05-2013, 09:54 AM)No Author Wrote:
(03-05-2013, 09:44 AM)NaxEla Wrote: I'm pretty sure PreloadEntity doesn't exist.

If there's a door broken by a monster and you died because of the mosnter, I have to use PreloadEntity the door if I want it to spawn again when I restart from checkpoint, right ?

That's ResetProp that you're thinking of Smile


RE: What is preloading for? - No Author - 03-05-2013

Oh right.
Thank you for your help.