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"

How to use SetByCaller on Gameplay Effects?

Hi there,

I would rather store the cost of an ability as a variable on the ability itself, instead of creating a cost gameplay effect for each ability.

So I'd like to have one cost effect which I can change the magnitude based on the ability that applied the effect to the owner. It seems like I should use "SetByCaller" but I have no idea how to use it.

I found AssignSetByCallerMagnitude function in AbilitySystemBlueprintLibrary but where do I get the FGameplayEffectSpecHandle to pass into the function?

Any and all help appreciated.

Many thanks

Dann

Product Version: UE 4.18
Tags:
more ▼

asked Jan 25 '18 at 09:24 PM in Using UE4

avatar image

DannRees
245 18 30 40

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

1 answer: sort voted first

The first thing you want to do is create a Gameplay Tag for each Set by Caller Parameter. Then in your Gameplay Effect you pick that tag in the Set by Caller section. Then in your Gameplay Ability when you apply the Gameplay Effect you pass the value like this:

alt text

setbycaller01.jpg (40.5 kB)
more ▼

answered Mar 26 '18 at 12:14 AM

avatar image

Dartanlla
2.6k 62 26 281

(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