scaling swallow time (1 Viewer)

jase

Vivacious Visitor
Joined
Jun 4, 2014
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 ModGuy
 
Last edited by a moderator:

ModGuy

Content Creator
Joined
Feb 17, 2011
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.
 

jase

Vivacious Visitor
Joined
Jun 4, 2014
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.
 

sby

Content Creator
Coder
Joined
Sep 11, 2012
looks like the code will fit right in with the alternate compiler, no flash develop or flash cs5 required
 

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.