View Full Version : char selection
Ravmaster
May 4th, 2006, 01:24 PM
something is wrong with my character selection in my game (only bass and megaman work for the first player char) when i try clciking one of them it works then the secodn time round the other char dont work :S
(size - 1.4mb)http://rapidshare.de/files/19614300/Main.fla.html
the code is on the character selection thingy on frame 5
thnx in advance
Ravmaster
May 5th, 2006, 01:58 PM
anyone?
please i need this code to continue making mjy game
nathan99
May 5th, 2006, 07:26 PM
The download's stuffed
InfestedDemon
May 5th, 2006, 08:59 PM
why not make it change vars or totally different frames when you do it, like megamans stuff is on frame 1 -8 (mc) and from 9-XX (same mc) is someone else. That would help it work.
Ravmaster
May 6th, 2006, 09:09 AM
i thought of that but it might get me confused ill put up the d/l again
the d/l works :s
DangerousDan
May 6th, 2006, 10:36 AM
Can you just attach it on the forum?
Ravmaster
May 6th, 2006, 01:54 PM
its too big to be attached soz :(
optixburn
May 8th, 2006, 06:48 PM
your code should look something like this
inside your character selecter movieClip
all of these :
character = "character_name";
should be like this :
_parent.character = "character_name";
all enemy variable calls inside of the enemy selecter movieClip need to change to _parent.enemy like character varaible calls
instead of = (1 = assigns a value) you need == (2 ='s compairs two values)
//
// frame 5 character thingy
onClipEvent (load) {
// parents needed because the character thingy movieClip
// doesn't know what character is ...
// so you have to go up one level outside of the movieClip
// to grab the character variable
if (_parent.character == "megaman") {
this.gotoAndStop(1);
}
if (_parent.character == "bass") {
this.gotoAndStop(2);
}
}
hope this helps
Ravmaster
May 9th, 2006, 05:49 AM
ok i understand and im gonna try it now thnx ;)
thnk you!!!! it work ;) thnx m8
nathan99
May 9th, 2006, 05:57 AM
Or... you could give the player frames labels like "megaman", "bass" etc
and on the frame put:
player.gotoAndStop(character);
Ravmaster
May 9th, 2006, 02:46 PM
ya but i think that one would take longer so i referred to this method...
nathan99
May 9th, 2006, 06:11 PM
............it would take longer... wtf?
Ravmaster
May 12th, 2006, 01:43 PM
my bad read it wrong :D
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.