ezgoin
(ezgoin)
November 11, 2022, 5:08pm
21
Here are the relevent things in my constructor:
AbilitySystemComponent = CreateDefaultSubobject<UAbilitySystemComponent>(TEXT("AbilitySystemComponent"));
AbilitySystemComponent->SetIsReplicated(true);
AbilitySystemComponent->SetReplicationMode(EGameplayEffectReplicationMode::Full);
Attributes = CreateDefaultSubobject<USnortAttributeSet>(TEXT("USnortAttributeSet"));
In my very short experience i’ve seen some very buggy behaviour of blueprints. I just tried changing the name in the CreateDefaultObject and my game started crashing so watch out with those names in the createdefault object function.
RASONx
(RASONx)
November 11, 2022, 5:17pm
22
Is this where the error is at line 52?
ezgoin
(ezgoin)
November 11, 2022, 5:27pm
23
No it must be somewhere higher above maybe even in your header.
RASONx
(RASONx)
November 11, 2022, 6:11pm
24
I can’t find it in my ThirdPersonCharacter.h
ezgoin
(ezgoin)
November 11, 2022, 6:33pm
25
Yeah that looks fine. Now that i’ve seen the project structure you can replace the hardcoded include path to
#include "../AttributesSet.h"
The top of your ThirdPersonCharacter.cpp must be generating an error likely one of your includes.
edit: it seems to add a . without special format
RASONx
(RASONx)
November 11, 2022, 6:52pm
26
What do I replace it with #include “…/AttributesSet.h” ?
ezgoin
(ezgoin)
November 11, 2022, 6:55pm
27
yea sorry without the tags it adds a . so
#include "../AttributesSet.h"
In AttributesSet.cpp you can use
#include "AttributesSet.h"
and from the thirdperson sources
#include "../AttributesSet"
the 2 dots mean the parent directory
RASONx
(RASONx)
November 11, 2022, 7:03pm
29
Yes, I have the same thing so far, I’m just wondering why the system is not displayed in the engine
ezgoin
(ezgoin)
November 11, 2022, 7:11pm
30
Yeah i dunno i solved problems like that by changing uproperties specifically VisibleAnywhere to EditAnywhere or changing the names completely of component variable and name passed to createdefaultsubobject etc.
RASONx
(RASONx)
November 12, 2022, 10:52am
32
Okay I solved the problem now I had to recreate the ThirdPersonCharacter from the ThirdPersonCharacterClass
1 Like