Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
[HELP] Attempting to add ActorComponents to Actor via C++
Author Summary
SentryTheDefiant184 is in help
Post Body

Hello everyone!

I'm starting to recreate my BP scripting into C , and I'm running into an issue with trying to get my C Actor to pull data from my C actor component.

My goal is to create a Fire and Reload function in the Weapon (C Actor) using data from the ActorComponent. The ActorComponent has the variables for Damage, Ammo, ReloadSpeed, etc. However, I cannot edit the variables from the the BP Weapon, trying to print out the default values returns null. Trying to fire from the C function crashes the game using a variable from the actor component.

I want to be able to edit the ActorComponent variables from BP and call C functions from within Blueprint.

Here is the Weapon.cpp file where I'm creating the ActorComponent

In the Weapon.h file, I'm including the ActorComponent (\"WeaponStatsComponent.h\"

Here is the Base Weapon Blueprint, with the Actor Component highlighted.

EDIT #1: Including more pictures

Base Weapon Blueprint with C ActorComponent highlighted (note the blank details panel)

Base Weapon Blueprint with ActorComponent added within the Editor (Details panel lists all variables listed in Header file)

Author
Account Strength
100%
Account Age
11 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,631
Link Karma
348
Comment Karma
1,283
Profile updated: 2 days ago
Posts updated: 5 months ago
Dev

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 years ago