Community Question

Hey guys.

I need a little help with some script. As the title suggests, I'm trying to get an EZ Builder script to speak an identified object using RoboRealm. It is all set up and passing variables to EZ Builder, and I have a couple of objects trained, but I'm having trouble writing a correct script. Here's what I've got so far...

Code:

if($RR_NV_ARR_OBJ_NAME[0])
say("Steve")
elseif($RR_NV_ARR_OBJ_NAME[1])
say("control")
endif



I would be grateful for any help with this to get me started.

Thanks.

Richard R
Commented July 2015
@Aidan Your code in post #34 won't work.... Your comparator has no exact match.... What your code says is that if $RR_NV_ARR_OBJ_NAME[0] contains any text string, say Steve... What if $RR_NV_ARR_OBJ_NAME[0] = Fred or Frank or rubber chicken? Part of your code would sort of work if you only trained one object (Steve in this case) in RoboRealm, but what if you had many trained objects? Look at David's code in post #35.... that's how it should be done....
Aidan
Commented July 2015
http://www.ez-robot.com/User/Richard-R I can not give you an answer I dont know how to solve this .
CochranRobotics
Commented July 2015
It has been solved already.
Aidan
Commented July 2015
Wait I know this go to learn on ez robot.com there is a tutorital for this
Steve G
Commented July 2015
@Aiden.

The script you supplied in post #34 was copied from what I originally posted in post #1. This script, as already mentioned by others and tried by the poster, does not and will not work. That is the reason why I started this thread, so I could get the correct script from somebody and compair where I went wrong to help others facing the same issue. 10 out of 10 for your willingness to help which is great, but be sure any advice you offer is tried and tested and correct. My advice for what it's worth is to study the tutorials in depth and learn what EZ-Builder has to offer. That way you will have great fun building and controlling robots and you will become a great asset to the community. :)

@Herr Ball.

Sorry I couldn't reply to you sooner to offer some help. I've been away from the forum for a while dealing with life's little problems it seems to be throwing at me at the mo. I'm pleased David got you sorted out and you finally got it working.
Question
AvatarSteve G
Asked on Friday, April 10, 2015