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

scaling swallow time

Discussion in 'Filled Requests' started by jase, Jun 8, 2014.

  1. jase

    jase Avid Affiliate

    Joined:
    Jun 4, 2014
    Messages:
    120
    Likes Received:
    9
    Would it be possible to adjust the animation time proportionate to how much is being swallowed? Sometimes a swallow expression is added to dialog, and it can really break up the pace of it. That long of a delay is justified when she's got a mouthful, but when there's nothing in her mouth but her own saliva (and maybe some precum,) it shouldn't take longer than the time to animate her lips and throat.

    EDIT:
    Completed by @ModGuy
     
    Last edited by a moderator: Sep 29, 2016
  2. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    21
    Code:
    package flash
    {
    	public dynamic class Main extends flash.display.MovieClip
    	{
    		public var lProxy;
    		var her;
    		var g;
    		
    		//Extract out in to settings?
    		var swMin:Number = 4/10;
    		var swScaling:Number = 5/10
    		var stage1:Number = 30;
    		var stage2:Number = 16;
    		var stage3:Number = 16;
    		var stage4:Number = 30;
    		var startTimeRange:Number = 60;
    		var startTimeMin:Number = 50;
    		
    		public function initl(l){
    			her = l.her;
    			g = l.g;
    			var lp = lProxy.createProxy(her, "swallow");
    			lp.addPre(sw, true);
    			lp.hooked = false;
    			lp = lProxy.createProxy(her, "swallowFromMouth");
    			lp.addPre(sfm, true);
    			lp.hooked = false;
    			l.unloadMod();
    		}
    
    		private function sw(a:Number = 2, b:Boolean = true):void{
    			if(her.swallowing || her.passedOut || her.speaking) return;
    			her.swallowSequence.intensity = swScaling * (her.cumInMouth / her.maxCumInMouth) + swMin;
    			her.swallowSequence.build = Math.round(stage1 * her.swallowSequence.intensity);
    			her.swallowSequence.swallow = Math.round(her.swallowSequence.build + stage2 * her.swallowSequence.intensity);
    			her.swallowSequence.relax = Math.round(her.swallowSequence.swallow + stage3 * her.swallowSequence.intensity);
    			her.swallowSequence.end = Math.round(her.swallowSequence.relax + stage4 * her.swallowSequence.intensity);
    			her.swallowTimer = 0;
    			her.startSwallowTime = Math.floor(Math.random() * startTimeRange + startTimeMin);
    			her.startSwallowTimer = 0;
    			g.addBreath(2);
    			her.breathing = g.soundControl.stopBreathing();
    			if(her.cumInMouth > 0 && b)
    			{
    			   g.dialogueControl.buildState("swallow",120);
    			}
    			her.coughBuild = her.coughBuild + her.swallowSequence.intensity * 10;
    			her.swallowing = true;
    		}
    
    		//Since we scale animation manually, clear mouth in one go.
    		private function sfm() : void {
    			her.cumInMouth = 0;
    		}
    	}
    }
    Provide your own scaling settings and compile.
    Alternatively, ask sby to set this up properly.
     
  3. jase

    jase Avid Affiliate

    Joined:
    Jun 4, 2014
    Messages:
    120
    Likes Received:
    9
    Thanks, MG. I don't have the software to compile this. Last week when I opened a .fla with FlashDevelop, I bluescreened, my system couldn't detect my HD for 2 days, and when I got it restarted spontaneously, the FlashDevelop executable was missing. The rest of the directory is still there, just the one program is gone. I could re-dload it, but I'm a little nervous about trying that again until I can figure out what's destabilizing my system.
     
  4. sby

    sby Club Regular Content Creator

    Joined:
    Sep 11, 2012
    Messages:
    1,331
    Likes Received:
    73
    looks like the code will fit right in with the alternate compiler, no flash develop or flash cs5 required