# Blueprint Node plus AddTicker

**URL:** <https://forums.unrealengine.com/t/blueprint-node-plus-addticker/356256>\
**Category:** Blueprint\
**Tags:** unreal-engine, CPP, Blueprint, question\
**Created:** [May 2, 2016, 10:36pm UTC](https://forums.unrealengine.com/t/blueprint-node-plus-addticker/356256 "2016-05-02T22:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_3b38dade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3b38dade](https://forums.unrealengine.com/u/anonymous_user_3b38dade)\
**Post date:** [May 2, 2016, 10:36pm UTC](https://forums.unrealengine.com/t/blueprint-node-plus-addticker/356256/1 "2016-05-02T22:36:57Z")

</div>

I am trying to create a blueprint node that does about a minute worth of work asynchronously when activated. Obviously, I don’t want to lock up my game while saving my game to the cloud.  
I would prefer to do one node in C++, rather than a huge flowchart of hundreds of individual functionality nodes.  
I need to batch save a bunch of game data from my game client to an online service, and it requires a bunch of http api calls (I can already do this part myself).

I am trying to figure out the interaction between a blueprint node and an OnTick function. It is supposedly possible, but there’s no documentation geared towards this goal. The only real direct mention about it is here:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

MyTestNode.h file:

```
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnMyTestCompleted);
class UMyTestNode : public UOnlineBlueprintCallProxyBase
{
    GENERATED_UCLASS_BODY()
public:
    virtual void Activate() override;
    bool OnTick(float deltaTime);
    void Finish();
// Some UPROPERTY stuff
private:
    TBaseDelegate<bool, float> tickHandler;
    FOnMyTestCompleted m_OnMyTestCompleted;
}

```

MyTestNode.cpp file:

```
UMyTestNode::UMyTestNode(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer)
{
    tickHandler = FTickerDelegate::CreateRaw(this, &OnTick); // <<--------------THIS LINE DOESN'T COMPILE
}

void UMyTestNode::Activate()
{
    UE_LOG(LogTemp, Log, TEXT("Test Node activated"));
    auto onTickHandle = FTicker::GetCoreTicker().AddTicker(tickHandler);
    FTicker::GetCoreTicker().RemoveTicker(onTickHandle); // note, move to finish when I solve the CreateRaw problem
}

bool UMyTestNode::OnTick(float deltaTime)
{
    UE_LOG(LogTemp, Log, TEXT("Test Node OnTick"));
    // note, lots of http work here (really it calls to another pre-existing file)
    // note, manually call Finish() when everything is done
}

void UMyTestNode::Finish()
{
    UE_LOG(LogTemp, Log, TEXT("Test Node finished"));
    if (m_OnMyTestCompleted.IsBound())
    {
        m_OnMyTestCompleted.Broadcast();
    }
}

UMyTestNode* UMyTestNode::MyTestNode()
{
    UMyTestNode* nodeInstance = NewObject<UMyTestNode>();
    return nodeInstance;
}

```

How do I correctly invoke CreateRaw? It seems to exactly match existing examples and documentation. But it won’t compile in my file.  
Is there a guide or documentation that I haven’t found yet for this purpose?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_3b38dade](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_3b38dade](https://forums.unrealengine.com/u/anonymous_user_3b38dade)\
**Post date:** [May 11, 2016, 9:25pm UTC](https://forums.unrealengine.com/t/blueprint-node-plus-addticker/356256/2 "2016-05-11T21:25:46Z")

</div>

After investigating and asking other developers, it seems that the only object that can use a Tick function is AActors. I’m not particularly happy with having to create an AActor just to catch ticks for a few seconds but it seems to do the job.
