Trigger of the Day - Obj Extract Example

  • Rumble
  • Rumble's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
8 years 6 months ago #975 by Rumble
Name: 'Yoda Using Extract to Warp Speech',  VNum: [  208], RNum: [  207]
Trigger Intended Assignment: Mobiles
Trigger Type: Speech , Numeric Arg: 1, Arg list: *
* By Rumble of The Builder Academy 9091
wait 2 sec
extract word1 1 %speech%
extract word2 2 %speech%
extract word3 3 %speech%
extract word4 4 %speech%
extract word5 5 %speech%
extract word6 6 %speech%
say %word6% %word5% %word4% %word3% %word2% %word1%?
Another more advanced version
wait 2 s
  set altered_speech %altered_speech%
  set speech %speech.cdr%
say %altered_speech%
If this was helpful please vote or leave a review for TBA.

The Builder Academy 9091
This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.

2 years 2 months ago #8339 by Parnassus
Replied by Parnassus on topic Trigger of the Day - Obj Extract Example
I was looking for more information on extract so searching for Yoda was the obvious step. I was interested to find this advanced version so I checked it out.

What I'm really looking for is a way to show the original line minus the extracted word without having to go through each word manually and sticking them back together. Help Extract uses the phase "do you want chicken" and changes it to "chicken want do you?" What I'm looking for is to extract, as an example, word 3 with an output of "do you chicken". The obvious way is to output extract1, extract2, extract4 but I'm hoping for something easier. I was in hopes that the %altered_speech% would give me some insight but just the compared efficiency interested me.

I was so surprised to try it out and find...nothing. I threw in a bunch of echoes to see what was happening and I found that the trigger took the original sentence and very stealthily took it apart, word by word, and then put it back together. Did I miss something? I suppose I could actually play with it to make it react more like the previous example but anything I could do to it would make it less efficient than trigger 208.

Perhaps the efficient way might be to do a while cdr in the first example instead of extracting each word individually? Of course, this doesn't help my original question at all but now that advanced version is kinda bugging me.

Please Log in or Create an account to join the conversation.

Time to create page: 0.079 seconds