Asked

In conversation menu I'm trying to get the person to answer yes or no, and that would go into a variable. After it is in variable if it is equal to yes then make another variable = 150 but for some reason it is not working. Having it match a word rather than true or false would make it a more natural conversation. What is the proper way to do this in blockly? It works great when it is a numerical variable. Also is there a way to have jump down to option 4 if you didn't want to go through 1,2,3?
You can store a variable in Blockly like this...
Also, keep in mind that variables starting with a $ are global. That information is documented on the Blockly support page here: https://synthiam.com/Support/Programming/block-coding/Blockly
tried out your storing Variable in Blockly, works well
Also, I enjoyed the Blockly code to take a picture
Add Camera, script (take Picture), soudboard, if you like
Make script:
Pictures are stored on your computer, my robot pictures
these are global variables
Yes this is what I had, will start from scratch and redo it Probably had something to with the global/local variables. Some of the variables were not showing up in variables. I liked learning about the local and global variables. My variable tracker was not changing. Thanks for the help!
For some reason I'm still having an issue. Here is the screen shot. It always says Zero from the PC. These are all global variables and would think it would be fine.
Here's the manual for the WaitForSpeech command: https://synthiam.com/Support/javascript-api/Audio/waitForSpeech
It says the response is in lowercase.
I would also recommend adding an "else" condition to the IF so that you can handle anything unexpected. It's always good practice to have an ELSE when using an IF. 99% of the time, sound logic practice is to provide an ELSE. In the case above, if the WaitForSpeech times out, then a "timeout" would be returned, but it is not being handled in your condition.
Lastly, the Say PC Wait is good, but I recommend using the string append to combine the "I will be moving the base to" and $base_rotate rather than having two "wait" commands. It's just a bit cleaner. Here's an example screenshot...
Lots of good advice and will implement them all.
Got it working and it's great- It was the uppercase that got me. The pc talking is cleaner now and the else is a catch all which was needed.
Thanks, Don
For the next step I think it may need a modification of the Auto Position to be a variable. Once you have selected locations for pickup and final destinations you will want to move that into a variable on the Auto Position so you can select multiple locations and actions as needed. You may have already figured out a way around this though. This seems like a simple but very powerful tool to have. Rather than picking a certain number to put into a variable you would be picking an action and thus picking multiple movements and locations that are done in the movement panel.
Id need more clarification to assist.
Are you asking to programmatically define positions to an existing frame that exists in an action?
or, programmatically create a new frame and add it to a new action, where all other frames are added programmatically as well.
or, programmatically create a new frame and append it to an existing action that already contains frames.
or, execute an existing action that had already been defined with predefined frames?
lastly, how many positions for the start and end of the Auto Position are there?