Coding help requested (1 Viewer)

gollum

Vivacious Visitor
Joined
Dec 31, 2011
first request appears simple, but I'm stuck:

I want to close her mouth.

First approach was by her.jawAngleTarget = her.closedJawAngleTarget; didn't work
next I tried her.head.neck.swallow(); also didn't work
finally her.swallowSequence.build = random numbers; same result

since I have no idea where to go next, I come to you people. maybe someone can help me/point me in the right direction.

oh and I want to open/close it, so it should be dynamic ;)
 

ModGuy

Content Creator
Joined
Feb 17, 2011
Kinda defeating the purpose of the game there.
You could set her to be biting down using whatever variable that was...
Other than that You don't really have much control given that the animation code sets her positioning every frame.
 

gollum

Vivacious Visitor
Joined
Dec 31, 2011
ModGuy said:
Kinda defeating the purpose of the game there.
that's where the "open it again" part comes in. I just want to remove the "throw popcorn in my mouth"-face ;)
to elaborate further:
when she's away from the penis I want the mouth closed. at a certain distance it opens again so there is no blockage and no clipping between penis and her face when moving towards the tip again

You could set her to be biting down using whatever variable that was...
Other than that You don't really have much control given that the animation code sets her positioning every frame.
I'll look into that, thank you :)
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
i believe this is the common code used to adjust the jaw angle from sdt:

her.head.jaw.rotation = her.head.jaw.rotation + (her.jawAngleTarget - her.head.jaw.rotation) * 0.5;


this sets the rotation towards the target difference, using a 'speed' reducing factor of 0.5
the target you were setting helps guide where the jaw should be rotated to. however, as modguy said, the target is calced every time, so just setting the target does not help.

some pseudocode for you ~

//must be set every frame
if (g.penisOut && her.penisInMouthDist < -10)
{
her.head.jaw.rotation = her.head.jaw.rotation + (her.closedJawAngle - her.head.jaw.rotation) * 0.5;
}
 

gollum

Vivacious Visitor
Joined
Dec 31, 2011
nevermind, I'm an idiot... used old code and didn't check it before adding new code segments :/
 

gollum

Vivacious Visitor
Joined
Dec 31, 2011
is there a way to check the dialogue for existing lines?

as in:
I introduce a couple of new dialogueStates and sby mentioned that it can lead to botched dialogues when a dialogueState is builtthat has no lines.

So I'd like to check the existing lines (at loadtime) to see if my states have any lines and then disable those that don't (or enable those that do)
 

ModGuy

Content Creator
Joined
Feb 17, 2011
gollum said:
is there a way to check the dialogue for existing lines?

This would be a start.
You can pull info from dialogues from here.

Code:
g.dialogueControl.library

// or for static vars

eDOM.getDefinition("obj.dialogue.DialogueLibrary");
 

gollum

Vivacious Visitor
Joined
Dec 31, 2011
ModGuy said:
This would be a start.

I love your "start here" thingies ;D usually it reduces my hours of searching in code to 30 seconds of "this is perfect, exactly what I need!"

Code:
g.dialogueControl.library.getPhrases("stateName").length
returns an uint
 

ModGuy

Content Creator
Joined
Feb 17, 2011
gollum said:
hours of searching in code

If it helps you should work backwards.
In this example I started from seeing dialogue on screen and found that it's produced word by word.
By following what calls the function to pull the next word I found that lines are pulled using a controlled random function.
Back again and you find that the random function references a bank of lines which is stored in this library object.

Well that's how I do it anyway.
 

gollum

Vivacious Visitor
Joined
Dec 31, 2011
ModGuy said:
If it helps you should work backwards.
In this example I started from seeing dialogue on screen and found that it's produced word by word.
By following what calls the function to pull the next word I found that lines are pulled using a controlled random function.
Back again and you find that the random function references a bank of lines which is stored in this library object.

Well that's how I do it anyway.
sounds like a reasonable approach, cause I usually try to find a classname that relates to what I want to do (in this case Dialogue) and work through from there. which is really a crappy way to do it, tons of dead ends/baffledness...
where did you see the dialogue on screen, or better yet: where is the (usually) best place to start?
 

Slingerbult

Content Creator
Joined
Sep 15, 2012
A bit late to chime in perhaps but an open/close mouth command would be a great addition to your dialogue actions - good thinking!
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.