How do I change my players appearance when pressing a button?

I was wonder how I could change the players look after pressing a button? My main goal is to change the players look as if they were a new character with a different look. Thank you.

Hi Sagla welcome!

I can think of 2 ways of doing this, depending on what you think works best for you.

1- Using animations

If the player has few/simple animations and looks, then you can add the different looks as animations.
Example: Idle-Look1 ; Run-Look1 ; Idle-Look2 ; Run-Look2 etc.

When changing the looks, store the look name in a string variable. Lets say you saved “Look2” in a string variable called Look.

Your events would be something like this:

  • player is NOT moving → set animation to: “Idle-” + VariableString(Look)
  • player is moving → set animation to: “Run-” + VariableString(Look)

2- Using different player objects

If your animations are complex and you have a lot, then it might be better to use different objects for the player. Though this option is a bit more complicated.

  • Duplicate the player and just change the animations.

  • Name the player objects to something like: Player-Look1 ; Player-Look2 etc… and add them to a group, call it Players

  • Similar to the 1st option use a variable to store the look’s name.

  • Then when you set a new look, save any object variables on the player and position in variables, and delete the player.

  • Create new player with the new look in the same position that were saved in variables. You can do this dynamically using “create object from it’s name” from the group “Players” and name: “Player-” + VariableString(Look)

  • Load the object variables that were saved to the new player.

  • Note: Make sure to always use the group “Players” in your events.

2 Likes

Or you could change the color of character from events also maybe

1 Like

Ay! The second one worked, thank you!

1 Like

Thanks! I know I’ll use that later too.