1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Coding help requested

Discussion in 'Filled Requests' started by gollum, Nov 26, 2012.

  1. gollum

    gollum Avid Affiliate

    Joined:
    Dec 31, 2011
    Messages:
    218
    Likes Received:
    0
    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 ;)
     
  2. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    22
    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.
     
  3. gollum

    gollum Avid Affiliate

    Joined:
    Dec 31, 2011
    Messages:
    218
    Likes Received:
    0
    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

    I'll look into that, thank you :)
     
  4. sby

    sby Club Regular Content Creator

    Joined:
    Sep 11, 2012
    Messages:
    1,337
    Likes Received:
    76
    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;
    }
     
  5. gollum

    gollum Avid Affiliate

    Joined:
    Dec 31, 2011
    Messages:
    218
    Likes Received:
    0
    nevermind, I'm an idiot... used old code and didn't check it before adding new code segments :/
     
  6. gollum

    gollum Avid Affiliate

    Joined:
    Dec 31, 2011
    Messages:
    218
    Likes Received:
    0
    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)
     
  7. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    22
    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");
     
  8. gollum

    gollum Avid Affiliate

    Joined:
    Dec 31, 2011
    Messages:
    218
    Likes Received:
    0
    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
     
  9. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    22
    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.
     
  10. gollum

    gollum Avid Affiliate

    Joined:
    Dec 31, 2011
    Messages:
    218
    Likes Received:
    0
    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?
     
  11. Slingerbult

    Slingerbult Casual Client Content Creator

    Joined:
    Sep 15, 2012
    Messages:
    387
    Likes Received:
    58
    A bit late to chime in perhaps but an open/close mouth command would be a great addition to your dialogue actions - good thinking!