Character Selection Scene

KCDKCD Member Posts: 24
edited July 2012 in Working with GS (Mac)
I am needing help creating a character selection scene.

I would like to have up to 30 different characters to select from in the game. I would like them to all carry the same rules of the actor. In a nut shell the user would select a character in the character selection screen and then that characters art would transfer over to the actor in actual gameplay. How can when a character is selected on the character selection scene go into the game? Hope this makes sense

I am looking to create something similar to this--->

Then once a character is selected that would be the character used.

Best Answer

  • tatiangtatiang Posts: 11,949
    edited July 2012 Accepted Answer
    It sounds like you just want to have one actor with a set of rules but have the instances (copies, if you will) of that actor in the scene each have a different image. You can achieve this by changing the value of self.image to match an imported image file.

    Although it's not exactly what you're looking to do, the custom font videos are a good example of how to do this: www.youtube.com/watch?v=vcFBOtLa5YQ

    If you want the short and sweet answer, you just import images named 1.png, 2.png, etc. and then use Change Attribute self.image to game.characterSelectNumber..".png" where game.characterSelectNumber is an index/integer attribute equal to 1, 2, etc. based on the character that the player chooses from your intro screen.

    The two periods in a row (..) concatenate -- or join -- two expressions together.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • KCDKCD Member Posts: 24
    If I need actor animation art to go in as well how would that be included along with selecting a character.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    In that case, when you select a character, change an attribute on that actor such as self.character to a number or text value. Then in the actor's rules, add When self.character=1 --> change self.image to 1.png (or self.character..".png"). The tedious part is the animation. You have to have 30 rules that say When self.character=1 --> Animate [images]; When self.character=2 --> Animate [other images]; etc.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • MotherHooseMotherHoose Member Posts: 2,456
    edited July 2012
    @kevinjcamps@tatiang gives great advice … pay attention to it

    IMO
    30 characters with just different images … but same size/skills … would get boring

    in your designPhase when 1st creating your project
    try working with less choices … < 5 for example … (I always start with 1)
    when you get 1 to 5 actors working correctly … doing 30 is easy

    make a choice for what is most important for userExperience/gamePlay
    … those are the elements/actors that should be in the scene (or immediately spawned)

    in your scenario … the player's choice of a fighter and its animation … is vital
    thus each of these fighters should be a separate prototype

    one actor with 30+ different animations rules triggered by userInput options will be slow
    (and most difficult to code/debug)

    image MH
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I agree with motherhoose. I just built a selection system and it basically logs which item the user wants in the game and in what location to a table as each item has a reference number and reference location. Then my scene manager reads that info and spawns the proper actor in the proper location. Other than that it would be a bloated process as I just use images in the selection process.
  • KCDKCD Member Posts: 24
    I would definitely build up to that many actors. I am trying to find the most efficient way to bring in an actor with the scene. Actors would have different skills, right now I am trying to just effectively get the actor in the scene.
  • MotherHooseMotherHoose Member Posts: 2,456
    the best/efficient way to do anything … is what works correctly and fast in your project

    while you are designing the play …
    create the actor with rules/behavior you want
    just drag it into the scene
    preview for user control/interaction with other actors

    when that one works well … do another one

    when all working … a one-time spawn of an actor at the start of the scene … is efficient
    especially when a gameAttribute triggers what actor will be active in that scene

    this type of decision is very dependent on other actors in your scene
    … and the volume of rules/behaviors that mainActor has

    image MH
  • kylemik23kylemik23 Member Posts: 7

    If you really want to make this legit what you have to do is for every character put a rule and say when touch is pressed got to the scene with that character in it. Sadly you will have to make 30 scenes. Then you can put all the abilities in each actor

  • kylemik23kylemik23 Member Posts: 7

    by thw way i have no idea if u are working on this

Sign In or Register to comment.