
hoolagen1
USA
Asked
— Edited
help guys.
im trying to figure out how to activate a script by voice control....
i go to script, type in
servo(d19, 30)
servo(d19, 50)
i hit repeat and name it shoot
then in voice command or personality generator i type
controlcommand(startscript, "shoot")
ezb tells me shoot is not a valid wondows command.....
what am i missing, cuz i know its me and not the software.
im literally following DJ Sures example letter by letter by letter and nothing.
I think ControlCommand() is trying to do a windows function not a ezb software function....
not sure.
Hint: ControlCommand("shoot", scriptstart)
Also, if you select "repeat", it will run for ever and ever and ever and ever. So maybe you don't wanna do that? The repeat option should be removed, actually. Because to properly repeat a script, you'd use GOTO() and :LABEL statements...
Example:
Code:
and i swear it states scriptcommand(scripstart, "shoot")
i thought i tried shoot first then scriptstart, but i guess not...ill do it tonight.
thanks for the example....
thats was actually the next command i was going to start messing with the "if" commands.....
the :label and goto(), seem a little trickie, but ill mess with them for a while and come back with some better questions.
thanks again for the quick answers...
I just did my first repeat script based on the code you gave above.
tell me if i am doing this right (im getting the result i want so, yeah)
what i want is for the 2 PIR sensors on the left and right side of the wall-e to:
always scan, if its triggered (value at 100) then i want the head to move up, once its not triggered (value at 0) i want the head to go down
i want this to "always be on" and i didn't want to hit the repeat button
so i wrote the following script...
:goUp
adc_wait(adc, higher, 100)
servo(d15, 50)
if(servo(d15) = 50)
goto(godown)
goto(goUp)
:godown
adc_wait(adc5, lower, 100)
servo(d15, 70)
if(servo(d15) = 70)
goto(goUp)
goto(godown)
right?