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
What is preloading for?
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#1
What is preloading for?

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

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-01-2013, 09:03 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#2
RE: What is preloading for?

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?

In Ruins [WIP]
03-01-2013, 09:24 PM
Find
vengey Offline
Member

Posts: 79
Threads: 7
Joined: Feb 2013
Reputation: 0
#3
RE: What is preloading for?

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!

03-05-2013, 04:46 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#4
RE: What is preloading for?

What about preload entity ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
03-05-2013, 07:20 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#5
RE: What is preloading for?

I'm pretty sure PreloadEntity doesn't exist.

In Ruins [WIP]
03-05-2013, 09:44 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#6
RE: What is preloading for?

(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 ?

[Image: the-cabin-in-the-woods-masked-people.jpg]
03-05-2013, 09:54 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#7
RE: What is preloading for?

(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

In Ruins [WIP]
03-05-2013, 10:00 AM
Find
No Author Offline
Posting Freak

Posts: 962
Threads: 10
Joined: Jun 2012
Reputation: 13
#8
RE: What is preloading for?

Oh right.
Thank you for your help.

[Image: the-cabin-in-the-woods-masked-people.jpg]
03-05-2013, 10:03 AM
Find




Users browsing this thread: 2 Guest(s)