Hi guys. I just wanted to share a little code snippet, for opening and closing a characters eyes.
I had a little trouble getting it to work, so I hope it's the right way to do it.
Edit file - "/pack/yourpack/init/std/template/char/brain/code/ref/basic_ref_command.dat"
Add the code below, under the line: "face.close.you.if = face.close.you.set;"
Code:
//"Open your eyes" - Works after editing "ai/npl/nlp_object.txt" - ("eye & eyes to "eyes", instead of "face")
eyes.open.you.set =
{
SetEyeState(OPEN);
}
eyes.open.you.if = eyes.open.you.set;
//"Close your eyes" - Works after editing "ai/npl/nlp_object.txt" - ("eye & eyes to "eyes", instead of "face")
eyes.close.you.set =
{
SetEyeState(CLOSED);
}
eyes.close.you.if = eyes.close.you.set;
Edit file - "/pack/yourpack/ai/nlp/nlp_object.txt"
Change the lines
Code:
#object_body = <eye> : face
#object_body = <eyes> : face
to
Code:
#object_body = <eye> : eyes //Works with "eyes close/open" in - ("init/std/template/char/brain/code/ref/basic_ref_command.dat") (original value: face)
#object_body = <eyes> : eyes //Works with "eyes close/open" in - ("init/std/template/char/brain/code/ref/basic_ref_command.dat") (original value: face)
Say: "Open your eyes" to open her eyes.
Say: "Close your eyes" to close her eyes.