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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to call a function by it's name in blueprints?

For example in set timer function, you choose the function you're gonna call by it's name, is there a node like call function by name(takes string function name as input)

Product Version: Not Selected
Tags:
more ▼

asked Jan 18 '15 at 11:00 PM in Blueprint Scripting

avatar image

SongOfDeath
87 19 25 32

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Why don't you search in source for yourself how that node is coded ;] you can search by name via github, most binded function has same name but without spaces, but sometimes may be diffrent then search via name of node with spaces. If node belongs to some class (has "Target" pin for that class object) you will find code of it in that specific class. I can't post code so you need to set up github access and got to this link:

https://github.com/EpicGames/UnrealEngine/blob/9dad25829a2c2d9a44fb11fab9ce5511323e7788/Engine/Source/Runtime/Engine/Private/KismetSystemLibrary.cpp#L246

As you can see there Object->FindFunction(FunctionFName); which gets UFunction object represanting that node function, then you can use it this i guess but not sure what you should feed FFrame with

https://docs.unrealengine.com/latest/INT/API/Runtime/CoreUObject/UObject/UObject/CallFunction/index.html

If this is too complex for you, i recomad you this method of calling code in blueprint:

-Create base class in native C++ (based from class that as you blueprint that you wanted to call basing) and declare virtual functions with BlueprintImplementableEvent specifier in UFUNCTION() for all calls you need. Keep in mind you don't need to place any code in cpp... in fact you shouldn't as you would get errors, those functions will be visible as events in blueprint.

-Now create blueprint based from this C++ class you just made (or change parent of existing one) and you should have those functions as events which you can plug blueprint code to

-Now when you call those functions in C++, code that been generated from reflection system by UHT will call those events in blueprint allowing you to execute blueprint code from C++

This method is a lot simpler aspecially if you creating base classes in C++ and then extend them in blueprint

more ▼

answered Jan 19 '15 at 12:10 AM

avatar image

Shadowriver
35.7k 925 168 1104

(comments are locked)
10|2000 characters needed characters left
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