Closed Deanmv closed 11 years ago
Looks like when a listen_for block gets executed, and the request_completed happens, all other listen_for blocks are skipped (optimized out?). i.e. The spoken phrase was found and satisfied. It seems that the set_state: construct is for consecutive spoken phrases within a greater context.
You might be able to get it working by duplicating function calls within each listen_for block though?
Been working on doing a "if this AND this then do this" sort of thing but can't seem to get it to work, do you know of any pointers?
Got it working today. Used something along the line of:
@@playhead = "stopped"
listen_for /play the song/i do
if @@playhead == "playing" then
#do this
else @@playhead == "stopped"
#do this
end
@@playhead = "playing" #set the playhead to be playing
end
Was the fact that I hadn't assigned it to be a variable with @@ so it wasn't accessible outside of my if commands originally.
While creating a plugin, I am working with the
set_state:
tool.Is it possible to use this for the same command. e.g something like this:
Then next have:
When I do this the "play the song" command is just completely ignored when I run the plugin.
i.e I get
Anyone got this working?