x

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"

BindAbilityActivation crashing UE4

Hi Guys,

I'm currently playing around with the gameplay ability system that Unreal has. I've been following along with this https://forums.unrealengine.com/community/community-content-tools-and-tutorials/110113-gameplayabilities-and-you

But it seems that unreal crashes whenever I try to bind ability activation to the input component, specifically

alt text

I know that the ability system is created, and i've followed along with the rest of the initialization in begin play which works fine. I can also use try activate ability by class on the ability system, which works fine.

Here is the begin play: alt text

Product Version: UE 4.20
Tags:
capture.png (13.2 kB)
capture.png (18.6 kB)
more ▼

asked Nov 04 '18 at 12:44 AM in C++ Programming

avatar image

Cd1232
10 7 8 10

avatar image DarkwindRichard Nov 05 '18 at 03:58 PM

Hi Cd1232,

Do you have an enum in your game called AbilityInput that is marked with UENUM? If not, then the ability system will crash when attempting to access that enum.

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

1 answer: sort voted first

Yeah I have this in a separate class

alt text

input.png (18.2 kB)
more ▼

answered Nov 05 '18 at 06:41 PM

avatar image

Cd1232
10 7 8 10

avatar image DarkwindRichard Nov 05 '18 at 08:22 PM

Hi Cd1232,

I don't believe that the reflection system will pick up on enums defined in CPP files. If you move that enum to a header, do you still get the crash? (Also, as a side note, enums in Unreal are supposed to begin with E.)

avatar image Cd1232 Nov 05 '18 at 09:01 PM

You're absolutely right, in fact after i sent this reply I checked to see where enums go and it was the .h. That fixed it, thanks!

(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