Hey - apologies i’m new to blueprints - i’m just setting up a save game function in a gamemode blueprint - and i want to cast to a character blueprint that is my basemonster class that stors the LIF stat - i set up a variable “monsterClass” that is of type Character, but the cast keeps failing - all the youtube vids say this should work? what am i doing wrong?
can you show me whats the MonsterClass variable that you have created? does it contain a reference?, for casting you need to have a reference to the actor you want to cast, i might suggest you to do the following, from the object of the cast, drag and instead of using the monsterclass, use the Get Player Character, or Get Player Pawn.
Thanks for replying - this is the MonsterClass Variable - i’ve not done anything to it other than set it as type “Character” to match the MonsterBase type -
Are you sure you are assigning a concrete object to the MonserClass variable?
If not:
You have to use the “SpawnActorFromClass” node to create an instance of your BaseMonsterClassBP, then you can assign the return value of this node it to the variable.