You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
make permanent an option in trigger, without writing it on triggers #115
Hi Noah, hi all,
I continue Alfred s' brain (a physical Alive robot)
When I communicate with Alfred, I ofter tell "Alfred", at the beginning or end sentence :
How could I tell the program : forget alfred word ??
ex :
+ [alfred] power on the tv [alfred]
I'd like rivescript to ignore this word when i speak it. So I will not have to write it everywere !
Sure I could erase it on python with a replace command, but I'd like to do it under a rive file !
+ alfred *{weight=100}
- <@>
+ * alfred{weight=100}
- <@>
The high weight value should ensure the trigger gets tested first (unless you have other triggers with weight >100). If it begins or ends with the word "alfred" it just redirects to a trigger without that word.
It may be possible to combine them into one trigger, but using optionals on either end like your original example might backfire: the first iteration you'd match the [alfred] * [alfred] trigger and it would match whether or not you said the word alfred (because it's optional, you see), and it would redirect to <star> and it would test [alfred] * [alfred] first again, and repeat forever.
Activity
sucream commentedon May 16, 2018
I think you can use default trigger in
begin.rive.This trigger is matched before other all triggers.
check this tutorial
https://www.rivescript.com/docs/tutorial#the-begin-block
elpimous commentedon Jun 18, 2018
Hi,
I tested, and it doesn't work
kirsle commentedon Jun 19, 2018
Something like this maybe:
The high weight value should ensure the trigger gets tested first (unless you have other triggers with weight >100). If it begins or ends with the word "alfred" it just redirects to a trigger without that word.
It may be possible to combine them into one trigger, but using optionals on either end like your original example might backfire: the first iteration you'd match the
[alfred] * [alfred]trigger and it would match whether or not you said the word alfred (because it's optional, you see), and it would redirect to<star>and it would test[alfred] * [alfred]first again, and repeat forever.elpimous commentedon Jun 20, 2018
Perfect, Noah. So simple...
Thanks
ps : this test failed
This worked :
Hope it will help each other !