Be a Supporter!

character picking help

  • 308 Views
  • 2 Replies
New Topic Respond to this Topic
piggy123
piggy123
  • Member since: Jun. 13, 2008
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
character picking help 2009-03-16 14:48:06 Reply

when i pick the girl option on my game i am a girl then when i go in to a building like a shop where the character screen is not shown then exit i am a boy this is the code

on (release) {
gotoAndStop(3);
_root.character.gotoAndStop(2);
}

Moltimert
Moltimert
  • Member since: Aug. 18, 2006
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to character picking help 2009-03-16 16:39:16 Reply

Oh shit! I came across the same problem a while ago

You have to change it to

onClipEvent (enterFrame) {
If (_root.player.sex == female) {
_root.penis = false;
}
}

also remember to change the building variable from 'sexchangeshop' to 'baptstChurch(1)'

hansaW
hansaW
  • Member since: Jun. 12, 2007
  • Offline.
Forum Stats
Member
Level 10
Programmer
Response to character picking help 2009-03-16 16:53:32 Reply

Just store what sex your character has in a boolean and do whatever gotoStoping you might want according to the boolean.

// Codes for setting sex.
var penis:Boolean = false; //woman
var penis:Boolean = true; //man

// Codes for checking sex.
if (penis) {
 trace("OMG you have a penis (so you are a dude)");
 // Do whatever dude stuff you want here.
} else {
 trace("OMG you don't have a penis (so you are a girl)");
 // Do whatever girl stuff you want here.
}

Don't forget to put your pants on.