View unanswered posts | View active topics It is currently Fri Jul 20, 2018 4:48 am



Reply to topic  [ 4 posts ] 
 Eyes Open/Close snippet 
Author Message
Rank 3
Rank 3
User avatar

Joined: Tue Jun 13, 2017 3:11 pm
Posts: 7
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.


Tue Jun 13, 2017 3:46 pm
Profile
Rank 16
Rank 16
User avatar

Joined: Wed Aug 07, 2013 4:51 pm
Posts: 306
Nice!


Tue Jun 13, 2017 9:00 pm
Profile
Rank 12
Rank 12
User avatar

Joined: Sat Sep 27, 2014 3:53 am
Posts: 88
Location: Australia
Thanks djiango,
That works great.
Attachment:
screenshot.jpg
screenshot.jpg [ 54.8 KiB | Viewed 1887 times ]

This makes it a lot easier to do her makeup.
P.S. just typing “open eyes” works just as well.

_________________
My most recent release can be found here


Sat Jun 17, 2017 11:10 am
Profile
Rank 3
Rank 3
User avatar

Joined: Tue Jun 13, 2017 3:11 pm
Posts: 7
Thanks for the positive feedback, it's great that you like it. I'm currently on a modding spree (mostly textures and scripts), and will probably post more in the script section if I find any other interesting stuff.


Attachments:
screenshot58.jpg
screenshot58.jpg [ 280.26 KiB | Viewed 1774 times ]
Tue Jun 20, 2017 3:23 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group.
Designed by X-Moon Productions.