Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Change Skeletal Mesh by UMG

Hi, So I am trying to make UMG where will be select character. But it is not working do anyone know what is the problem? Both telling me ERROR. This is the blueprint:

UMG blueprint:

alt text

Character blueprint: There is 2 Functions which change skeletal mesh both are same as this one!

alt text


Product Version: UE 4.18
1.png (359.8 kB)
2.png (309.0 kB)
more ▼

asked Feb 11 '18 at 05:09 PM in Blueprint Scripting

avatar image

12 2 1 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

if theyre printing error then your character is not the MaleCharacter blueprint. Are you using a different pawn or character when your in the selection screen? If so that is the player character. OR if your Male character blueprint is a Pawn and not a Character, that will also print error

more ▼

answered Feb 11 '18 at 05:53 PM

avatar image

1k 64 50 99

avatar image CR0G Feb 11 '18 at 06:09 PM

The UMG where I select character is MainMenu just when you open game. So I made GameMode and PlayerControllerClass, this is the blueprint:

alt text

beztytułu.png (352.9 kB)
avatar image ThompsonN13 Feb 11 '18 at 09:35 PM

your casts are failing because as vice said your character is not of the male character class. in picture one the on click event happens right when you click the button so it is happening while still in the menu game mode. in the menu game mode your have the default pawn class set to default pawn which does not inherit from the malecharacter class and as such will always fail.

what i would suggest would be to create a custom game instance with a character class variable. then for your on clicked event save the type of character you want to the character class variable in the game instance. then when you actually begin the game and switch game mode, have your new game mode read the characterclass variable and set the default pawn class.

avatar image ThompsonN13 Feb 11 '18 at 09:57 PM

below you will find a picture showing what i was talking about in the last posts second paragraph. its a bit more shuffling of information but its a pretty simple process.

also the second picture im posting uses a similar methodology but instead of setting the entire character you just set the mesh. with this method though instead of setting the default class in the game mode you would just set the skeletal mesh for the character in the player controller. this one may or may not need to be called on each respawn of the player.

alt text alt text

capture2.png (330.2 kB)
capture.png (136.5 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question