I am having problem and it's about a week now that I still can't figure out how to get it right.

It seems that I can't run any functions from the blueprints that contain timers at all.

I have a Datatable full of details of each functions that will executed according to its key input and the owner of the functions. enter image description here

The ordinary functions and custom events executed well but will stopped at a timer. enter image description here

This is the code that I have made so far. I added the matching functions string into the delegate with its Owner which is the obj, and it will executed on key input.

p.s: Ignore the error, Intellisense was messing me up

enter image description here

I saw the error regarding the world not found here, enter image description here

but I'm not sure if that is the case since other functions without any timer inside can execute well. Any ideas? Thanks.

  • \$\begingroup\$ The function that you want to call is in BP or in C++ ? \$\endgroup\$ – ColdSteel Jan 14 '20 at 9:44
  • \$\begingroup\$ It's in BP, the Tooled custom event, it will printed 'Hello' but it will skip the Set Timer function. I dont know why \$\endgroup\$ – Mira Jan 14 '20 at 10:30
  • \$\begingroup\$ I see nothing plugged in to Object Pin there in set timer func - maybe you should put a self reference there ? \$\endgroup\$ – ColdSteel Jan 14 '20 at 10:35
  • \$\begingroup\$ I did it just now but still no changes (( \$\endgroup\$ – Mira Jan 14 '20 at 10:38
  • 1
    \$\begingroup\$ You can also call a BP function from the C++ timer if you need so. \$\endgroup\$ – ColdSteel Jan 14 '20 at 11:03

So I finally solved it. I have to point the UObject to AActor by using

UGameplayStatics GetActorOfClass(this, ActorClass) and apparently the obj was pointed to the wrong blueprint object in the game, but I read somewhere that it is not good to use GetActorOfClass too many times, but for now I'll just use this before I find another better solutions.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.