The McLeodGaming forums were permanently closed on April 30th, 2020. You are currently viewing a read-only archive.
View unanswered posts | View active topics It is currently Fri May 15, 2020 5:38 am

Forum rules


IMPORTANT

This Forum is for Flash related questions ONLY! Do not ask questions about spriting, Game Maker, Photoshop, or anything else not related to Flash.



 [ 5 posts ] 
[Request] Characters on stage 
Author Message
User avatar

Joined: Tue Aug 12, 2008 2:07 pm
Posts: 39
I need help with having the characters chosen at the selection screen appear as the player number in which they were chosen and only be controlled by the player that chose them also have is to that only 2 players show up if two players are picked for example, so if two players want to play there is no player 3 and 4.

_________________
get free wii points here!


Wed May 27, 2009 7:31 am
User avatar

Joined: Mon Aug 11, 2008 1:09 pm
Posts: 166
Location: England lol
Gender: Male
Currently Playing: Minecraft
Can I ask what do you consider your level of expertise with flash...?
Also have you done anything to try and figure this out for yourself - if so can you provide it?

That way I can decide how best to help you... whether I should modify anything you might already have, to create a sample flash, to write a tutorial for you or to advise you against even trying to do something like this.


Wed May 27, 2009 10:24 pm
WWW
User avatar

Joined: Tue Aug 12, 2008 2:07 pm
Posts: 39
x2i wrote:
Can I ask what do you consider your level of expertise with flash...?
Also have you done anything to try and figure this out for yourself - if so can you provide it?

That way I can decide how best to help you... whether I should modify anything you might already have, to create a sample flash, to write a tutorial for you or to advise you against even trying to do something like this.

i am not a beginner in flash
i just can't think of how to make a code that would work for loading the character that i choose
can you make a tutorial for it

_________________
get free wii points here!


Thu May 28, 2009 3:11 pm
User avatar

Joined: Mon Aug 11, 2008 1:09 pm
Posts: 166
Location: England lol
Gender: Male
Currently Playing: Minecraft
I'll be the judge of that lol.

Put it this way, if you know about variables, arrays, instance names and attachMovie then this should be easy enough. If you don't then head here and brush up: viewtopic.php?f=10&t=345


First make 4 movie clips, for this example we will use Mario, Luigi, Wario and Waluigi. In the library give them the instance name of their actual name in small caps.

This code will make the characters appear on the stage.
Code:
charArray = {"mario", "luigi" , "wario", "waluigi"};
for(var i=0; i<4; i++) {
  _root.attachMovie(charArray[random(charArray.length)], "player" + i, _root.getNextHighestDepth());
  //You can change this, it just tells you how to reference the MC's
  _root["player" + i]._x = 100;
  _root["player" + i]._y = 100;
}



If you want the use to be able to choose characters you will need to allow them to change what's in charArray before calling the for loop.


Thu May 28, 2009 8:30 pm
WWW
User avatar

Joined: Fri Mar 27, 2009 8:55 pm
Posts: 282
Location: Why do you want to know you perv!
Gender: Male
Skype: lomeli1241
Currently Playing: Kingdom Hearts Re:Coded (JP)
What I'd do is I have an invisible movie clip with a bunch of text box's(one for each player). When a character is chosen, a number will appear in the player's box. Then in the movie clip of the character I'd put this:
Code:
onClipEvent(load){
   if(_root.number_box.p1_box.text == "Character's #"){
      _root.p1_char.gotoAndStop("Frame# or name of the character");
   }else if(_root.number_box.p1_box.text == "0 for not chosen"){
      _root.p1_char._visible = false;
   }
}

If this is not what you asked for or I did something wrong, I'm sorry.

_________________
Image
Image
Give cred 2 Doromac
Mes Amis: show
BICURIOUS GEORGE
daniel
King Master X12
Neo_Fire_Sonic
Racerx52
Sora
Tycron
Tyli
User Avatar
yoh
Envoyez-moi un message pour ĂȘtre mon ami! Ha! That's French 4 Pm to be Friends


Tue Sep 08, 2009 6:46 pm
WWW
Display posts from previous:  Sort by  
 [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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

cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF.