Author Topic: Trigger script state after sound is finish playing  (Read 5278 times)

0 Members and 1 Guest are viewing this topic.

Offline MusicallyInspired

Trigger script state after sound is finish playing
« on: February 19, 2016, 11:28:50 PM »
I forget how to do this. Do I just add "self" or whatever script is supposed to be triggering on the end of "play:"? Is this even a thing?


Brass Lantern Prop Competition

Offline troflip

Re: Trigger script state after sound is finish playing
« Reply #1 on: February 20, 2016, 12:01:52 AM »
When a Sound has finished playing (or a cue marker is encountered), it will cue() whatever object was passed to play. Oh hey look, there's some documentation:

http://scicompanion.com/Documentation/Classes/Sound.html

If that object is a Script, then that Script will have its changeState called with the next state (since that's what Script:cue() does).


There's a room in my "SCI Quest" game that does this (the one with the video screens with sound waves)
« Last Edit: February 20, 2016, 12:03:54 AM by troflip »
Check out my website: http://icefallgames.com
Groundhog Day Competition

Offline MusicallyInspired

Re: Trigger script state after sound is finish playing
« Reply #2 on: February 20, 2016, 12:07:48 AM »
I'm sorry, I did some searching and couldn't find what I was looking for in the help. I guess I'm tired. It's right there. Thank you. I feel really stupid now.
Brass Lantern Prop Competition


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

Page created in 0.082 seconds with 22 queries.