Script Routines


Using scripting for notification is very different from performance notifications or lyrics. Instead of writing C++ code to catch notification or lyric messages, you write script routines that actively do something at scheduled times in Segments.

Depending on what you intend to do with the notification, there are different approaches:

  • If the intention of the notification is to turn around and call a script routine, then it clearly makes more sense to just call the script in the first place! Likewise, if the intention is to play a Segment, then it's easy to write a script routine to do just that. The beauty of these solutions is they never touch the C++ code.

  • If the intention of the notification is to update a state variable, then it's just slightly more indirect. The script routine updates a global variable in the script. Then, the main loop polls the variable to read its value. This is actually very similar to the mechanism we explored while choreographing Begonia's performance.




DirectX 9 Audio Exposed(c) Interactive Audio Development
DirectX 9 Audio Exposed: Interactive Audio Development
ISBN: 1556222882
EAN: 2147483647
Year: 2006
Pages: 170

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net