Character Selection Scene
KCD
Member Posts: 24
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.
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
-
tatiang Posts: 11,949It 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
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
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)
MH
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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
MH
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
by thw way i have no idea if u are working on this