Author Topic: Sound cues - what for?  (Read 3775 times)

0 Members and 1 Guest are viewing this topic.

Offline troflip

Sound cues - what for?
« on: May 14, 2007, 01:06:37 PM »
Sound resources can have "cues" embedded in them.  It apparently sets the signal property of the current sound in the game.

Does anyone know what these are used for?


Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline lskovlun

Re: Sound cues - what for?
« Reply #1 on: May 14, 2007, 02:07:58 PM »
They trigger a changeState call on associated Script objects. The character selection screen in QfG1 uses this to move the character highlight to the beat of the music. On the FreeSCI team, our original idea was to postpone sound for as long as possible. As it turned out,  we couldn't do that for long -- scripts that use sound cues often simply hang if the cue is not delivered.

Offline lskovlun

Re: Sound cues - what for?
« Reply #2 on: May 14, 2007, 02:31:24 PM »
Sorry for replying to myself. Each playing sound has a cue counter associated with it. This counter can be either incremented or set explicitly by a sound file. The current cue value can always be read in the signal property of a sound object. Only if a script is associated with a sound object does the changeState thing happen (controlled by SCI code, not the interpreter) - QfG1, which I used as an example, does not, but checks the signal property directly in a doit method. So I thought a clarification was in order,

Offline troflip

Re: Sound cues - what for?
« Reply #3 on: May 14, 2007, 02:54:06 PM »
Thanks - great explanation.  I don't think Brian's tutorials ever touched on assigning a Script to a sound object - so there's a subject for a new tutorial.

By "postpone sound for as long as possible", I assume you mean when FreeSCI was being developed, you wanted to leave implementation of that functionality until last.
Check out my website: http://icefallgames.com
Groundhog Day Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.042 seconds with 24 queries.