Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
https://5v3n.itch.io/coppercube-... Example shows 2 AIs : one moves to "store" by opening closeing doors if needed -asks something (number 1-3) - takes if correct item given..and walks out of "store" (there are 3 cilinders on table you must pick one that asked and "place it in box on table) Second AI goes to switch light on if its switched off if needed. You can open close door by pressing box on wall..same with light. Some changes made plus removed errors: (i think so at least) its just a fun project that may not have real use for you..it has different use for me but made it work like this also. Script looks basic like as this:
Possible commands currently: setVar(varName,value) *can be also other variable dont need to be value if() else endif *can have < > = ! & print(textToPrint) *variable prints with at beginning wait(timeToWait) anim(animationName,loopMode) affect endAffect *gives control over other node rotY(rotationY) jumpToLine(lineNumberInCurrentScriptToJump) *dont count empty lines end *ends script reading at current pos newRoute(waypointNumbers-separatedByCommas) *temporary route -needs some work tho with setVar there are some special calls possible: RANDOM ADD SUB MUL DIV setVar(variableName,RANDOM,min,max) *sets variable to be random number ADD/SUB/MUL/DIV **add substract multiply divide setVar(varName,ADD,5) * its same as varname+=5; same with others script actually doesnt care if you use () or just comma separators. in example lamp.state and door.state and .use are defined in my script.. those variables you can have if you use script that has these variables. you can set variable: a * a is a then -can be used globally or this.a * this.a will be clerk.a (for example) - can be used locally or globally (for example if multiple AIs comes to ask number 1-3 then this. variable is preferred..so each AI have theyr own desision. ("decision" as in example shown) NB use TABs in script not spaces as in example script. |
||||
|
Thank you sven, you are really helping some of us and we are happy to have you with us always |
|