- stants wrote:
Ive got 1 character.
If i say talk to jim i have put a response entry to reply to this which is fine.
But when i type say to jim,inventory i get a message saying sorry character commands are not used in this game or something similiar.
How do i enable it so it doesnt come up with that message. I dont even know where its getting this message from??
Its not in the respons, script 1 or 2 or messages or system messages cos ive searched for it.
so just want it so i can say say to jim,i
many thanks
Hi Stants,
The default character command coding entries are listed on the CHARACTER EDITOR -----> "Char. Commands" BUTTON.
Inside this particular list are the coding entries that allow Character "speech" commands to be used in a game...
However, in the "default.tab" database (the one you used to begin creation of your game) these are initially set to:
[start][acts]cmessYou did not type in any commands for %speechname%.[end]
[start]%_%[acts]cmessSorry, this game does not support commands to characters.[end]
In other words there are no entries present facilitating this at the moment.
Now take a look at the equivalent "char.commands" list in the "char_commands_demo.tab" example game.
So to enable character speech commands in YOUR game you need to COPY all of the speech entries listed from there to REPLACE the above entries in YOUR database ...
Then you can pick and choose which you would like to keep or delete.
To start with please delete the 2 default entries in the "char. commands" list in YOUR game database.
To make it easy for you I've put all of the required default coding entries below so you can copy them in one block and then paste them into the "char commands" list in YOUR database using (SHIFT+Insert)
==============================
DEFAULT CHARACTER COMMANDS
===============================
This list is executed by TAB after a "say to <character>, <command>" player input. By default commands can be carried out by ALL characters.
The first entry checks if any commands were given to a character
'===============================
[start][acts]cmessYou did not type in any commands for %speechname%.[end]
'===============================
Entries below this can adjust "speech" variable
Then do the speech entries
'===============================
dospeech:
First check that speech character is in current room
'================================
[start]%_%#speechcount=1#charabsent%speech%[acts]cmessSorry, %speechname% is not here!#done#else#speechcount=1#charpresent%speech%[acts]sysmess86#jumpdospeech2[end]
'================================
dospeech2:
[start]hello#charpresent%speech%[acts]cmess%speechname% replies "Hello."[end]
[start]examine %objn1%#or_objlocn1=%speechworn%#or_objlocn1=%speechcarr%#or_objlocn1=charloc%speech%[acts]charobjn1msg[end]
[start]go %directn1%#invalidcharmove[acts]cmess%speechname% wasn't able to go %directn1%.[end]
[start]go %directn1%[acts]pattchar%speech%=static#movecharacter[end]
[start]i#charpresent%speech%[acts]charinv%speech%[end]
[start]get %objn1%#objlocn1=charloc%speech%#objn1notstatic[acts]cmess%speechname% picks up the %objn1%.#objlocn1=%speechcarr%[end]
[start]drop %objn1%#objlocn1=%speechcarr%[acts]cmess%speechname% drops the %objn1%.#objlocn1=charloc%speech%[end]
[start]wear %objn1%#objlocn1=%speechcarr%#objn1wearable[acts]cmess%speechname% wears the %objn1%.#objlocn1=%speechworn%[end]
[start]remove %objn1%#objlocn1=%speechworn%[acts]cmess%speechname% removes the %objn1%.#objlocn1=%speechcarr%[end]
[start]talk to %charn2%#charpresentn2#charn2=%speech%[acts]cmess%speechname%: "Are you asking me to talk to myself!?"[end]
[start]talk to %charn2%#charpresentn2[acts]cmess%speechname%: "Hello %charname2%."
%charname2%: "Hello yourself %speechname%."[end]
[start]give %objn1% to %charn2%#or_objlocn1=%speechcarr%#or_objlocn1=%speechworn%#charpresentn2[acts]cmess%speechname% gives the %objn1% to %charname2%.#objlocn1=carrcharn2[end]
[start]give %objn1% to me#charpresent%speech%#or_objlocn1=%speechcarr%#or_objlocn1=%speechworn%[acts]cmess%speechname% gives the %objn1% to you.#objlocn1=501[end]
[start]give all to %charn2%#charpresentn2#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% gives the %objn1% to %charname2%.#objlocn1=carrcharn2[end]
[start]give me %objn2%#charpresent%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%[acts]cmess%speechname% gives the %objn2% to you.#objlocn2=501[end]
[start]drop all#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% drops the %objn1%.#objlocn1=charloc%speech%[end]
[start]get all#anyobjscharloc%speech%[acts]all%speechloc%#cmess%speechname% picks up the %objn1%.#objlocn1=%speechcarr%[end]
[start]wear all#anywearable%speechcarr%[acts]speechwearall[end]
[start]remove all#anyobjs%speechworn%[acts]all%speechworn%#cmess%speechname% removes the %objn1%.#objlocn1=%speechcarr%[end]
[start]give all to me#charpresent%speech%#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% gives the %objn1% to you.#objlocn1=501[end]
[start]give me all#charpresent%speech%#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% gives the %objn1% to you.#objlocn1=501[end]
[start]follow/follow me#charpresent%speech%[acts]cmess%speechname% agrees to follow you...#pattchar%speech%=follow[end]
[start]quit following/quit following me#charpresent%speech%[acts]cmess%speechname%: "I will no longer follow you then."#pattchar%speech%=random[end]
[start]wait[acts]cmess%speechname%: "I will wait here then."#pattchar%speech%=static[end]
[start]get %objn1% out %objn2%#objn1<>objn2#objlocn1=contobjn2#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#objlocn2=container#openobjn2[acts]cmess%speechname% takes the %objn1% out of the %objn2%.#objlocn1=%speechcarr%[end]
[start]drop %objn1% in %objn2%#objn1<>objn2#objlocn1<>contobjn2#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#objlocn2=container#openobjn2#objlocn1=%speechcarr%#objn1fitsintoobjn2[acts]cmess%speechname% puts the %objn1% into the %objn2%.#putobjn1intoobjn2[end]
[start]drop all in %objn2%#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#openobjn2#anyobjs%speechcarr%[acts]all%speechcarr%#cmess%speechname% puts the %objn1% into the %objn2%.#putobjn1intoobjn2[end]
[start]get all out %objn2%#or_objlocn2=charloc%speech%#or_objlocn2=%speechcarr%#or_objlocn2=%speechworn%#objlocn2=container#openobjn2#anyobjscontn2[acts]allcontn2#cmess%speechname% gets the %objn1% from the %objn2%.#objlocn1=%speechcarr%[end]
' entries dealing with words not understood
[start]?[acts]cmessSorry. %speechname% did not understand "%?%" as a verb.#done[end]
[start]%v% ?[acts]cmessSorry. %speechname% did not understand "%?%" as a noun in that sentence.#done[end]
[start]%v% %n1% ?/%v% %objn1% ?/%v% %charn1% ?[acts]cmessSorry. %speechname% did not understand "%?%" in that sentence.#done[end]
[start]%v% %n1% %p% ?/%v% %objn1% %p% ?/%v% %charn1% %p% ?[acts]cmess%speechname% didn't understand "%?%" as a noun in that sentence.#done[end]
[start]%v% %p% ?[acts]cmess%speechname says: "%?% - it's not in my vocabulary as a noun."#done[end]
'====last entries======
[start]%_%[acts]cmess%speechname% didn't seem to be able to carry out your last command...#done[end]
[start]%anywords%[acts][end]
=========END===========
You should now be able to command your character, Jim (and any other characters you create)
>say to jim, i
>say jim, inventory
>jim, hello
>jim, follow me
>jim, go east then north and wait
catventure. (Phil)