AS2 paper doll game

  • muchagecko
  • Born
  • Born
  • User avatar
  • Posts: 4
  • Loc: Seattle, Washington

Post 3+ Months Ago

I keep getting conflicting advice for a school project that I got to work enough to turn in. If any of the advice worked, I'd be fine, but nothing has helped. I want to get the code to work and add more costumes. It'll be fun.

I'm using Flash CS4 and AS2 (so it can be played on the Wii!)

I've got 3 paperdoll bodies and 3 costume objects. I've set it up so the paperdolls to react to each of the different costumes when put on.

When the costume objects hit they also scale and move to different xy locations.

As it runs now, the costume objects when placed on a paper doll, stick/cannot be moved from the spot. I'd like them to move around so the game is more fun.

Here's a sample of the code for one of the paperdolls "elaineMC" and the costume objects "stormMC" "lMC" and "pikminMC".

onEnterFrame=function(){
if(stormMC.hitTest(ebodyMC))
{elaineMC.gotoAndStop("happy");
stormMC._xscale=100;
stormMC._yscale=100;
stormMC._x=80;
stormMC._y=-60.7;
}
else if(lMC.hitTest(ebodyMC))
{elaineMC.gotoAndStop("sad");
lMC._xscale=100;
lMC._yscale=100;
lMC._x=58.5;
lMC._y=-17.2;
}
else if(pikminMC.hitTest(ebodyMC))
{elaineMC.gotoAndStop("sad");
pikminMC._xscale=100;
pikminMC._yscale=100;
pikminMC._x=36.7;
pikminMC._y=-116.3;
}

//reduce clothes' size if not hitting characters
/*else if(stormMC.hitTest(ebody)==false) {
stormMC._xscale=20;
stormMC._yscale=20;
elaineMC.gotoAndStop("neutral");
}*/

else
{elaineMC.gotoAndStop("neutral");
}


I've commented out code that I thought would reduce the costume objects' size if not hitting the body - because it doesn't work.

I've had so many problems with this, I'm sure that my inability to figure out the endscreen is from exahaustion, because it doesn't work either:

//getting to endscreen
checkHappy = function(){
(elaineMC._currentframe==("happy") && jadeMC._currentframe==("happy") && maxMC._currentframe==("happy")){
_root.gotoAndPlay("endscreen");
}
elaineMC.onRollOut=function(){
elaineMC._currentframe==("happy");
checkHappy();
}
jadeMC.onRollOut=function(){
jadeMC._currentframe==("happy");
checkHappy();
}
maxMC.onRollOut=function(){
maxMC._currentframe==("happy");
checkHappy();
}
}


If anyone feels like helping, I'm willing to send the file. I'm just not willing to post it here for the public.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.