Here’s the ability. Nothing fancy, just a basic ability.
here are the class defaults:
Here’s where i try to activate the ability in the character, it always returns false.
Edit: Here’s my code to acquire an ability.
Here’s the ability. Nothing fancy, just a basic ability.
here are the class defaults:
Here’s where i try to activate the ability in the character, it always returns false.
Edit: Here’s my code to acquire an ability.
Are you running it on the server? Make sure to call the function while being it’s owner.
Try calling it from the character controller class that is owned by the player but can execute operations on the server.
I would step through the function via a break-point in visual studio to check if HasAuthority() works and per-requisites are valid.
Hi! it is running on the owning controller, and it is on single player.
Try running it not in pie / engine but in standalone game mode. Multiplayer components sometimes behave weirdly in engine.
HasAuthority() is a function that checks if it’s running on a server. If you are making a single player game then you can cut it.
It will fail if you are purely running it on a client instance.
It’s running on standalone game, I removed the HasAuthority() check, nothing.
found out what’s happening; apparently abilitySystemComp is returning None
However, I still can’t figure out how to fix it.
Maybe switch your property to:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “CharBase”, meta=(AllowPrivateAccess = “true”))
Are you also adding CreateDefaultSubobject(TEXT(“AbilityName”) in the contructor?
Have you set the component from within the bp later on?
Try to rename it from AbilitySystemComp to AbilitySystemComp1 for example