Testing My Animated Character (Futa Warning!)

This is the place to post your own creative works for other to play or give feedback on!
Forum rules
This forum is for posting and collaborating upon third party work. Please do not post request-threads, and avoid posting artwork that is not your own unless it is being used as a reference.

Re: Testing My Animated Character (Futa Warning!)

Postby Blargh » Sun Jan 08, 2012 12:11 am

Biles Wrote:Currently I'm starting on doing some basic combat moves. What I would like to know however, is if there is a controllable character template flash file. Preferably I'm looking for a file that has already the coded move, jump, duck, and crawl if possible.

Well, I've got the MiM code handy and found the FLA for MiM2 as well (haven't really looked at it to see what it's like).
MiM(hacked) movement code FLA: http://www.mediafire.com/?nho5rgt2qnzf36n
MiM2 FLA: http://www.newgrounds.com/dump/item/d4e ... 41cc3c0bd9
Both should have move and jump, but not duck or crawl. Those two, however, can be added to the MiM template with (untested) code:
Code: Select All Code
        if (Key.isDown(40) and (Key.isDown(39)) //40 is down arrow, 39 is right arrow, 37 is left arrow
        { //crawling right
            setProperty("", _x, _x + speed);
            right = true;
            _root.char.character.gotoAndStop(2); // or frame with crawling animation facing right
        }
        else if (Key.isDown(40) and Key.isDown(37))
        { //crawling left
            setProperty("", _x, _x - speed);
            right = false;
            _root.char.character.gotoAndStop(4); // or frame with crawling animation facing left
        }
        else if (Key.isDown(40) and right)
        { //ducking, facing right
            _root.char.character.gotoAndStop(7); // or frame with ducking animation facing right
        }
        else if (Key.isDown(40) and !right)
        { //ducking, facing right
            _root.char.character.gotoAndStop(8); // or frame with ducking animation facing right
        }
        else if (right)
        {
            _root.char.character.gotoAndStop(1); // or frame with the character standing, facing right
        } // end else if
        else
        {
            _root.char.character.gotoAndStop(3); // or frame with the character standing, facing left
        } // end else if

The code goes in at the end just above the '}' that ends the masturbation else. Then you'd need to replace the character templates in each frame (in the clip with 8 frames) with Vicka's templates. And a movie clip with the name "ground" is used for standing on and butting up against walls or other obstacles.
"Is that seriously the end of that story?"
User avatar
Blargh
 
Joined: Fri Dec 10, 2010 3:11 am
Location: Calgary

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Sun Jan 08, 2012 2:53 am

Thanks for the download and the codes. Hopefully this will come in handy! :D
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Sun Jan 08, 2012 7:27 pm

I managed to get the moving thing done so far, but far from perfect. When I move Vicka, she still remains in her standing form facing one direction. Upon jumping, she remains stuck in jump form in one direction, even when I move about or don't. Jumping again toggles the facing direction. This is the code that I have currently running on her as of now:

Code: Select All Code
onClipEvent (load)
{
    var ground = _root.ground; //removes the need to add _root. when referencing ground (I guess?)
    var grav = 0; //base gravity
    var gravity = 2; //gravity modifier
    var maxJump = -32; //deeper into negatives = higher jump
    var speed = 10; //higher number is more speed
    var touchingGround = false; //defaults to being in the air
   var masturbating = false; //defaults to not stuck in a masturbation loop
   char._x = _root.CheckpointX[_root.Checkpoint]; //move character to default checkpoint to start
   char._y = _root.CheckpointY[_root.Checkpoint]; //move character to default checkpoint to start
}
onClipEvent (enterFrame)
{
    if (_root.movement)
    { //if the character is not in a sex scene or otherwise shouldn't be moving around
      setProperty("", _y, _y + grav);
        for (grav = grav + gravity; ground.hitTest(_x, _y, true); grav = 0)
        {
            setProperty("", _y, _y - gravity);
        } // end of for
        if (ground.hitTest(_x, _y + 5, true))
        { //if the character falls through the ground, increase the 5, decrease reduces hovering
            touchingGround = true;
        }
        else
        {
            touchingGround = false;
        } // end else if
        if (Key.isDown(39) or Key.isDown(68))
        {
            setProperty("", _x, _x + speed);
            right = true;
            _root.char.character.gotoAndStop(2);
        }
        else if (right)
        {
            _root.char.character.gotoAndStop(1);
        } // end else if
        if (Key.isDown(37) or Key.isDown(65))
        {
            setProperty("", _x, _x - speed);
            right = false;
            _root.char.character.gotoAndStop(4);
        }
        else if (!right)
        {
            _root.char.character.gotoAndStop(3);
        } // end else if
        if ((Key.isDown(38) or Key.isDown(87)) && touchingGround)
        {
            grav = maxJump;
            gotoAndPlay("jump");
            this(undefined);
        } // end if
        if (ground.hitTest(_x + _width / 4, _y - _height / 4, true))
        {
            setProperty("", _x, _x - speed);
        } // end if
        if (ground.hitTest(_x - _width / 4, _y - _height / 4, true))
        {
            setProperty("", _x, _x + speed);
         _root.HUD._x = _x - 145; //the 145 is arbitrary to place the HUD properly in the vCam
        } // end if
        if (ground.hitTest(_x, _y - height, true))
        {
            grav = 3;
        } // end if
      } // end masturbation else
    } // end if
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Blargh » Mon Jan 09, 2012 1:16 am

Biles Wrote:I managed to get the moving thing done so far, but far from perfect. When I move Vicka, she still remains in her standing form facing one direction. Upon jumping, she remains stuck in jump form in one direction, even when I move about or don't. Jumping again toggles the facing direction. This is the code that I have currently running on her as of now


So, just to make sure. You have the main character model, and inside that is the notice area and movement model, and then you have the various movement movies. Frame 1 is Vicka standing still, facing right.
Frame 2 is Vicka walking, facing right.
Frame 3 is Vicka standing still, facing left (that is, the standing movie for her facing right but flipped horizontally).
Frame 4 is Vicka walking, facing left (again, the walking movie for her facing right but flipped horizontally).
Frame 5 (difference from MiM) should be Vicka jumping, facing right.
Frame 6 should be Vicka jumping, facing left (flipped again).
Frame 7 would be her crouched, facing right.
Frame 8 would be her crawling, facing right.
Frame 9 would be her crouched, facing left.
Frame 10 would be her crawling, facing left.

I'll take the code from above and modify it here, so you should be able to copy it and overwrite what was there before, assuming that you have the animations as listed in the frames above. You can also add labels and change the 'gotoAndStop' references below to those lables (like 'standright', 'standleft', 'crouchright', etc.) so that you can reorganize the frames to your preference. Also, if you decide you want a falling animation, that's going to require math and testing. >_>
Code: Select All Code
onClipEvent (load)
{
    var ground = _root.ground; //removes the need to add _root. when referencing ground (I guess?)
    var grav = 0; //base gravity
    var gravity = 2; //gravity modifier
    var maxJump = -32; //deeper into negatives = higher jump
    var speed = 10; //higher number is more speed
    var touchingGround = false; //defaults to being in the air
    var masturbating = false; //defaults to not stuck in a masturbation loop
    char._x = _root.CheckpointX[_root.Checkpoint]; //move character to default checkpoint to start
    char._y = _root.CheckpointY[_root.Checkpoint]; //move character to default checkpoint to start
}
onClipEvent (enterFrame)
{
    if (_root.movement)
    { //if the character is not in a sex scene or when they should be able to freely move
        setProperty("", _y, _y + grav);
        for (grav = grav + gravity; ground.hitTest(_x, _y, true); grav = 0)
        {
            setProperty("", _y, _y - gravity);
        } // end of for
        if (ground.hitTest(_x, _y + 5, true))
        { //if the character falls through the ground, increase the 5, decrease reduces hovering
            touchingGround = true;
        }
        else
        {
            touchingGround = false;
        } // end else if
        if (Key.isDown(39) or Key.isDown(68))
        {
            setProperty("", _x, _x + speed);
            right = true;
            if (touchingGround)
            {
                if (crouching)
                {
                    _root.char.character.gotoAndStop(8);
                }
                else
                {
                    _root.char.character.gotoAndStop(2);
                }
            }
            else
            {
                _root.char.character.gotoAndStop(5);
            }
        }
        else if (right)
        {
            if (touchingGround)
            {
                if (crouching)
                {
                    _root.char.character.gotoAndStop(7);
                }
                else
                {
                    _root.char.character.gotoAndStop(1);
                }
            }
            else
            {
                _root.char.character.gotoAndStop(5);
            }
        } // end facing and moving right
        if (Key.isDown(37) or Key.isDown(65))
        {
            setProperty("", _x, _x - speed);
            right = false;
            if (touchingGround)
            {
                if (crouching)
                {
                    _root.char.character.gotoAndStop(10);
                }
                else
                {
                    _root.char.character.gotoAndStop(4);
                }
            }
            else
            {
                _root.char.character.gotoAndStop(6);
            }
        }
        else if (!right)
        {
            if (touchingGround)
            {
                if (crouching)
                {
                    _root.char.character.gotoAndStop(9);
                }
                else
                {
                    _root.char.character.gotoAndStop(3);
                }
            }
            else
            {
                _root.char.character.gotoAndStop(6);
            }
        } // end facing and moving left
        if ((Key.isDown(38) or Key.isDown(87)) && touchingGround) //Starts the jump
        {
            grav = maxJump;
            gotoAndPlay("jump"); //this is just the sound effect for jumping, it has no other purpose
            this(undefined); //no idea what all the undefined stuff is about >_>
        } // end if
        if (Key.isDown(40) or Key.isDown(83) && touchingGround)
        {
            crouching = true;
        }
        else
        {
            crouching = false;
        }
        if (ground.hitTest(_x + _width / 4, _y - _height / 4, true))
        {
            setProperty("", _x, _x - speed);
        } // end if
        if (ground.hitTest(_x - _width / 4, _y - _height / 4, true))
        {
            setProperty("", _x, _x + speed);
            _root.HUD._x = _x - 145; //the 145 is arbitrary to place the HUD properly in the vCam
        } // end if
        if (ground.hitTest(_x, _y - height, true))
        {
            grav = 3;
        } // end if
    } // end movement code
} // end onClipEvent

*crossing fingers*
<_<
"Is that seriously the end of that story?"
User avatar
Blargh
 
Joined: Fri Dec 10, 2010 3:11 am
Location: Calgary

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Mon Jan 09, 2012 9:28 am

Inputting those codes had some "funky" interesting effect. Nevertheless I eventually made some headway or breakthrough. The problem I have now is that Vicka falls through the platform when she makes a jump only once, otherwise I have to hold down the jump button to keep her hopping up and down to prevent her from falling through. Also, I want to implement the jump sequence I made for Vicka. Right now like Peach, Vicka cycles through her walking animation in midair when I press the directional button during her jump mode.

This is the piece of code I need changing to accommodate for the jump clips:
Code: Select All Code
if (Key.isDown(38) && touchingGround)
        {
            grav = maxJump;
            gotoAndPlay("jump");
            this(undefined);
        }


The jump-right is set on frame 5, while jump-left is set to 6.

Edit update:
Apparently, it seems I have to make the platform thicker to prevent Vicka from falling through, aside from figuring the jump configuration, I have to figure how to make the ceiling.
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Blargh » Tue Jan 10, 2012 3:37 am

Biles Wrote:Inputting those codes had some "funky" interesting effect. Nevertheless I eventually made some headway or breakthrough. The problem I have now is that Vicka falls through the platform when she makes a jump only once, otherwise I have to hold down the jump button to keep her hopping up and down to prevent her from falling through. Also, I want to implement the jump sequence I made for Vicka. Right now like Peach, Vicka cycles through her walking animation in midair when I press the directional button during her jump mode.

This is the piece of code I need changing to accommodate for the jump clips:
Code: Select All Code
if (Key.isDown(38) && touchingGround)
        {
            grav = maxJump;
            gotoAndPlay("jump");
            this(undefined);
        }



The jump-right is set on frame 5, while jump-left is set to 6.

Edit update:
Apparently, it seems I have to make the platform thicker to prevent Vicka from falling through, aside from figuring the jump configuration, I have to figure how to make the ceiling.

Oops, sorry. :oops: I forgot the code for when you're not pressing left or right while jumping. So, you need to add the following code after the if/else's for moving left and right (EDIT: it doesn't go inside the straight up jump code):
Code: Select All Code
if (!touchingGround)
{
    if (right)
    {
        _root.char.character.gotoAndStop(5);
    }
    else
    {
        _root.char.character.gotoAndStop(6);
    }
}

This code here would also be where code would go to change from a jumping to a falling animation, as well.

The ground.hitTest up above that looks for any object at exactly 5 height below the character, so when it does the check if none of the pieces of the "ground" movie cover the line exactly 5 pixels below the hitTest block inside the character, it's supposed to drop her by the amount of "gravity" and then check again, so really any individual piece inside "ground" should have at least a height of 5 + the highest value of gravity (if modes change the gravity). Possibly double as the smallest platform in MiM is 20.7 (max gravity is 3), but when it was thinner Peach was falling through.

The bit at the end of the previous code with the ground.hitTest looking for "_y - height" should be the part that blocks her from going over ceilings, but now that I look at it the "height" should probably have an underscore in front of it (_height) for AS2 code. >_>
"Is that seriously the end of that story?"
User avatar
Blargh
 
Joined: Fri Dec 10, 2010 3:11 am
Location: Calgary

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Tue Jan 10, 2012 4:24 am

After all the brain-wracking Hell, I've finally able to get the jump sequence done thanks to Blargh. I've added two scenes one is going to host a gallery of attacks I plan the make, and the other will have the actual Vicka character you can control. For the time being, the squat and the crawling needs bug fixing as they don't seem to cycle through the animations, but at least the jump works. Also, I have to wrack my brains some more to find out how to create a ceiling barrier.

Only arrow keys allow Vicka to move, jump, squat, and crawl.
Attachments
Click to Play
(Javascript Required)

Vickabasics-v02.1.swf [ 106.82 KiB | Viewed 4420 times ]

Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Lucky777 » Tue Jan 10, 2012 4:30 am

Pretty cool, pretty cool.

The flash seems to be hilariously confused about which way Vicka is facing, though. If I walk left and then let go of the arrow, she faces right, and vice versa.
She does crouch and jump facing in the right direction, so that's good.
Also, how do you run, by the way?


I'm happy to see some progress being made, and I also like the look of that roundhouse kick.
User avatar
Lucky777
 
Joined: Sat Dec 18, 2010 12:44 am
Location: Chambers: Bandit Division

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Tue Jan 10, 2012 4:47 am

I admit the eye directions may seem confusing, but I'm pretty sure it will be far less confusing once I get her eyes fixed the way I want them. And no, there's no running animation... Well not yet anyways.
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby riroku26795 » Tue Jan 10, 2012 5:30 am

little bug report ... maybe its just me but when i try and get her to crawl or run while crouched she just slides around ;)
yea i know i might have an ocasional good idea, but i have no experience in anything so :(
User avatar
riroku26795
Newly Registered
 
Joined: Thu Jun 10, 2010 5:13 pm

Re: Testing My Animated Character (Futa Warning!)

Postby 肉まんマン » Tue Jan 10, 2012 10:47 am

Biles Wrote:improved character.


I remember laughing when I first saw your character a few weeks ago but she turned out fantastic. I`m not a fan of her imp ears, new hair color or the fully erect penis (limp looks erect and erect looks like it`s going to explode spraying blood everywhere :D) but it`s otherwise VERY impressive and I`m looking forward to see what you`ll come up with next!
肉まんマン
 
Joined: Wed Mar 03, 2010 5:15 am
Location: 東京都

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Tue Jan 10, 2012 1:05 pm

肉まんマン Wrote:(limp looks erect and erect looks like it`s going to explode spraying blood everywhere :D)


Yeah, I just couldn't come up with proper definitions for many state of erections so this was the best I had to come up with. :P

riroku26795 Wrote:little bug report ... maybe its just me but when i try and get her to crawl or run while crouched she just slides around ;)


Don't worry it's not you, I'm trying to work on both the squat and crawling controls, but this update is at least progressing somewhat. And there is no running yet as I haven't implemented them.

I still suck at scripting. The most I can do is take existing codes and try to deduce their functions to have it perform other functions. Right now, it's like shooting in the dark haha. So that's why I definitely need help in the script department. So until I get the fundamental basics of a platformer game, I doubt anyone is going to see some hentai action pretty time soon. Of course giving me script help might prove to be an incentive. :D
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Blargh » Thu Jan 12, 2012 12:03 am

Biles Wrote:Don't worry it's not you, I'm trying to work on both the squat and crawling controls, but this update is at least progressing somewhat. And there is no running yet as I haven't implemented them.

I still suck at scripting. The most I can do is take existing codes and try to deduce their functions to have it perform other functions. Right now, it's like shooting in the dark haha. So that's why I definitely need help in the script department. So until I get the fundamental basics of a platformer game, I doubt anyone is going to see some hentai action pretty time soon. Of course giving me script help might prove to be an incentive. :D

Do you perhaps have the container for crawling set as a graphic instead of a movie? That's the only reason I can see for the rest to work, but not that one.

The frames for facing left and right while standing still should be switched. Also note that if you flip the character for say a level that starts on the opposite side, the controls will work but all of the animations will be reversed. Instead of flipping the character, you need to add "right = false;" or "right = true;" to the 'onClipEvent (load)' data.
"Is that seriously the end of that story?"
User avatar
Blargh
 
Joined: Fri Dec 10, 2010 3:11 am
Location: Calgary

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Thu Jan 12, 2012 1:14 am

As far as I can tell, all the action movie clips are in movie clip form, including the main character instance that I named "Vicka" which holds all of them inside. I think if it was set to "graphics" then probably the other moves like walking wouldn't have worked. The standing poses may look like they're backwards, but this is just a style I've seen in fighting video games where characters have their backs facing their opponents. I chose that because I thought it looked cool :D.

This is the script I have as of right now for my character.
Code: Select All Code
onClipEvent (load)
{
   var ground = _root.ground;//removes the need to add _root. when referencing ground (I guess?)
   var grav = 0;
   var gravity = 2;
   var maxJump = -28;
   var speed = 10;
   var touchingGround = false;
   char._x = _root.CheckpointX[_root.Checkpoint];//move character to default checkpoint to start
   char._y = _root.CheckpointY[_root.Checkpoint];//move character to default checkpoint to start
}
onClipEvent (enterFrame)
{
   if (_root.movement)
   {
      setProperty("", _y, _y+grav);
      for (grav=grav+gravity; ground.hitTest(_x, _y, true); grav=0)
      {
         setProperty("", _y, _y-gravity);
      }
      if (ground.hitTest(_x, _y+5, true))
      {//if the character falls through the ground, increase the 5, decrease reduces hovering
         touchingGround = true;
      }
      else
      {
         touchingGround = false;
      }
      if (Key.isDown(39))
      {
         setProperty("", _x, _x+speed);
         right = true;
         _root.Vicka.gotoAndStop(2);
      }
      else if (right)
      {
         _root.Vicka.gotoAndStop(1);
      }
      if (!touchingGround)
      {
         if (right)
         {
            _root.Vicka.gotoAndStop(5);
         }
         else
         {
            _root.Vicka.gotoAndStop(6);
         }
      }
      if (Key.isDown(37))
      {
         setProperty("", _x, _x-speed);
         right = false;
         _root.Vicka.gotoAndStop(4);
      }
      else if (!right)
      {
         _root.Vicka.gotoAndStop(3);
      }
      if (!touchingGround)
      {
         if (!right)
         {
            _root.Vicka.gotoAndStop(6);
         }
         else
         {
            _root.Vicka.gotoAndStop(5);
         }
      }
      if (Key.isDown(40) & touchingGround)
      {
         if (right)
         {
            _root.Vicka.gotoAndStop(7);
            if (Key.isDown(39))
            {
               _root.Vicka.gotoAndStop(8);
            }
            else if (right)
            {
               _root.Vicka.gotoAndStop(7);
            }
         }
         else
         {
            _root.Vicka.gotoAndStop(9);
            if (Key.isDown(37))
            {
               _root.Vicka.gotoAndStop(10);
            }
            else if (!right)
            {
               _root.Vicka.gotoAndStop(9);
            }
         }
      }
      if (Key.isDown(38) & touchingGround)
      {
         grav = maxJump;
         gotoAndPlay("jump")
      }
      if (ground.hitTest(_x+_width/4, _y-_height/4, true))
      {
         setProperty("", _x, _x-speed);
      }
      if (ground.hitTest(_x-_width/4, _y-_height/4, true))
      {
         setProperty("", _x, _x+speed);
         _root.HUD._x = _x-145;//the 145 is arbitrary to place the HUD properly in the vCam
      }
      if (ground.hitTest(_x, _y-height, true))
      {
         grav = 3;
      }
   }
}


Also, I've uploaded some screenshots to show you how I've arranged my series of movie clips and that the MC "Vicka" is a movie clip herself.

BTW, I discovered that the green word "jump" was meant to play the sound effect. The Peach character MC in that file you gave me was yet in another MC container specifically to allow the jump sound effect to occur without her disappear in one frame when pressing the jump key button. Of course this only works when she doesn't have a jump pose sequence of her own like mine does. Strangely, I tried to do the same thing, but it killed all of my action MCs turning Vicka into a moving brick LOL.
Attachments
VickaMC.jpg
VickacrawlMC.jpg
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Meep Meepersons » Thu Jan 12, 2012 4:53 am

I can't wait till you release a playable demo for this ^^ I am a huge futa fan. I know lots on futanaric anatomy. *not an actual thing but still >3>* If you need a gameplay tester pm me first! x3
User avatar
Meep Meepersons
 
Joined: Sat Jun 18, 2011 5:24 am
Location: Behind your eyelids~

Re: Testing My Animated Character (Futa Warning!)

Postby Blargh » Thu Jan 12, 2012 4:37 pm

Biles Wrote:As far as I can tell, all the action movie clips are in movie clip form, including the main character instance that I named "Vicka" which holds all of them inside. I think if it was set to "graphics" then probably the other moves like walking wouldn't have worked. The standing poses may look like they're backwards, but this is just a style I've seen in fighting video games where characters have their backs facing their opponents. I chose that because I thought it looked cool :D.

This is the script I have as of right now for my character.

Also, I've uploaded some screenshots to show you how I've arranged my series of movie clips and that the MC "Vicka" is a movie clip herself.

BTW, I discovered that the green word "jump" was meant to play the sound effect. The Peach character MC in that file you gave me was yet in another MC container specifically to allow the jump sound effect to occur without her disappear in one frame when pressing the jump key button. Of course this only works when she doesn't have a jump pose sequence of her own like mine does. Strangely, I tried to do the same thing, but it killed all of my action MCs turning Vicka into a moving brick LOL.

It looks like the movie is resetting because it sets it to standing right then crawling right then standing right then crawling right, etc. and never gets past the first frame. The following code should fix it. I hope. >_>
Code: Select All Code
      if (Key.isDown(39))
      {
         setProperty("", _x, _x+speed);
         right = true;
         if (Key.isDown(40) && touchingGround)
         {
             _root.Vicka.gotoAndStop(7); //Vicka crawling right
         }
         else
         {
             _root.Vicka.gotoAndStop(2); //Vicka walking right
         }
      }
      if (Key.isDown(37))
      {
         setProperty("", _x, _x-speed);
         right = false;
         if (Key.isDown(40) && touchingGround)
         {
             _root.Vicka.gotoAndStop(8); //Vicka crawling left
         }
         else
         {
             _root.Vicka.gotoAndStop(4); //Vicka walking left
         }
      }


The full code would be:
Code: Select All Code
onClipEvent (load)
{
   var ground = _root.ground;//removes the need to add _root. when referencing ground (I guess?)
   var grav = 0;
   var gravity = 2;
   var maxJump = -28;
   var speed = 10;
   var touchingGround = false;
   char._x = _root.CheckpointX[_root.Checkpoint];//move character to default checkpoint to start
   char._y = _root.CheckpointY[_root.Checkpoint];//move character to default checkpoint to start
}
onClipEvent (enterFrame)
{
   if (_root.movement)
   {
      setProperty("", _y, _y+grav);
      for (grav=grav+gravity; ground.hitTest(_x, _y, true); grav=0)
      {
         setProperty("", _y, _y-gravity);
      }
      if (ground.hitTest(_x, _y+5, true))
      {//if the character falls through the ground, increase the 5, decrease reduces hovering
         touchingGround = true;
      }
      else
      {
         touchingGround = false;
      }
      if (Key.isDown(39))
      {
         setProperty("", _x, _x+speed);
         right = true;
         if (Key.isDown(40) && touchingGround)
         {
             _root.Vicka.gotoAndStop(7); //Vicka crawling right
         }
         else
         {
             _root.Vicka.gotoAndStop(2); //Vicka walking right
         }
      }
      else if (right)
      {
         _root.Vicka.gotoAndStop(1);
      }
      if (!touchingGround)
      {
         if (right)
         {
            _root.Vicka.gotoAndStop(5);
         }
         else
         {
            _root.Vicka.gotoAndStop(6);
         }
      }
      if (Key.isDown(37))
      {
         setProperty("", _x, _x-speed);
         right = false;
         if (Key.isDown(40) && touchingGround)
         {
             _root.Vicka.gotoAndStop(8); //Vicka crawling left
         }
         else
         {
             _root.Vicka.gotoAndStop(4); //Vicka walking left
         }
      }
      else if (!right)
      {
         _root.Vicka.gotoAndStop(3);
      }
      if (!touchingGround)
      {
         if (!right)
         {
            _root.Vicka.gotoAndStop(6);
         }
         else
         {
            _root.Vicka.gotoAndStop(5);
         }
      }
      if (Key.isDown(38) & touchingGround)
      {
         grav = maxJump;
         gotoAndPlay("jump")
      }
      if (ground.hitTest(_x+_width/4, _y-_height/4, true))
      {
         setProperty("", _x, _x-speed);
      }
      if (ground.hitTest(_x-_width/4, _y-_height/4, true))
      {
         setProperty("", _x, _x+speed);
         _root.HUD._x = _x-145;//the 145 is arbitrary to place the HUD properly in the vCam
      }
      if (ground.hitTest(_x, _y-height, true))
      {
         grav = 3;
      }
   }
}

As long as the frame doesn't change from one moment to the next, it should continue playing the same movie.
"Is that seriously the end of that story?"
User avatar
Blargh
 
Joined: Fri Dec 10, 2010 3:11 am
Location: Calgary

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Thu Jan 12, 2012 6:50 pm

Okay, now that's an interesting way to arrange the walking and crawling animation. I never thought to organize it that way. When I tried it out, it seems we're getting warmer. So far, I've lost my ability to just squat, but when I crawl to the right, she just slides in a kneeling position (which btw, it seems the kneeling is at least cycling through its animation), and crawling to the left has her "mooncrawling". I'm gonna double-check the codes to see if any of the sets were put out of sync or something.

Edit update:

I managed to fix the crawling issue so now it's working. Right now I'm trying to fix the squat issue.

Edit update:

OMG, I actually managed to fix squatting pose! :3 WIth this, now it's possible I can move on to fix the jumping sequence... Or maybe not o_o
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Sat Jan 14, 2012 6:22 pm

I was gonna wait a little longer to post my next big update ever since Blargh helped me with that one bit of particular coding, but this issue came up and I wanna know about this. Apparently, I was trying to show my brother this project (I made it a PG version). He dragged the swf file onto the browser and then showed me what he got instead:

Can anyone tell me how to fix this? I suspect this sort of thing may have been part of the MiM codes, IDK. But one thing I do know, is that when I showed my brother a previous version, he didn't have this warning.
Attachments
Screen shot 2012-01-14 at 11.03.58 AM.jpg
Screen shot 2012-01-14 at 11.03.58 AM.jpg (73.84 KiB) Viewed 3380 times
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

Re: Testing My Animated Character (Futa Warning!)

Postby Blargh » Sat Jan 14, 2012 7:17 pm

Biles Wrote:I was gonna wait a little longer to post my next big update ever since Blargh helped me with that one bit of particular coding, but this issue came up and I wanna know about this. Apparently, I was trying to show my brother this project (I made it a PG version). He dragged the swf file onto the browser and then showed me what he got instead:

Can anyone tell me how to fix this? I suspect this sort of thing may have been part of the MiM codes, IDK. But one thing I do know, is that when I showed my brother a previous version, he didn't have this warning.

Shouldn't be part of MiM. The only links in there are to Playshapes' account on Newgrounds and the LoK forum here. But it looks like the site its trying to link to is where Gamespot and maybe some other sites store flash video (maybe even Newgrounds)? The error according to what I've found is caused by AdBlock on Firefox. Someone had a solution:
Are you using adblock on your firefox? if so, add this

http://vidtech.cbsinteractive.com/plugins/adp/2_3_0/CBSI_AdPlugin.swf

as an exception. For some reason it decides to block it when it shouldn't.


Either that or send him to http://support.mozilla.org/en-US/kb/Troubleshooting%20plugins to see if the plug-in got broke. Assuming he is using Firefox and AdBlock. >_>

I guess it could be from MiM now that I think about it. I get a warning in IE every time saying it restricted it from running scripts or ActiveX controls and I have to click to allow blocked content. <_<
"Is that seriously the end of that story?"
User avatar
Blargh
 
Joined: Fri Dec 10, 2010 3:11 am
Location: Calgary

Re: Testing My Animated Character (Futa Warning!)

Postby Biles » Sat Jan 14, 2012 8:18 pm

I made a quick fix. There was a particular move my character made and I did that by using the motion tween settings. It was the only major difference I could think of from the time I first showed him the demo to this point. It was when I changed the move to classic tween did he told me he no longer got the error message.
Need some basic Flash character animations? Then stop by at:
Biles' Animation Kit

Current RPs:
n/a
User avatar
Biles
 
Joined: Sun Apr 03, 2011 4:53 am

PreviousNext

Return to Creative Corner



Who is online

Users browsing this forum: No registered users