# Using both c++ and blueprint

**URL:** <https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [April 4, 2014, 9:03pm UTC](https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865 "2014-04-04T21:03:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![skeetaseasonTV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@skeetaseasonTV](https://forums.unrealengine.com/u/skeetaseasonTV)\
**Post date:** [April 4, 2014, 9:03pm UTC](https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865/1 "2014-04-04T21:03:24Z")

</div>

Im using the FPS script that came with UE4 and it came with the custom hud and crosshair which works fine…the problem that i am having is that i cant get it to use my blueprint functions. For testing i tried printing a string to the screen but doesnt work. I used the Hud.h and MyCustomHUD.h as the parent but either didnt work…what im i doing wrong? Am i suppose to grab it with the c++ code ? If so how do i do that with the HUD class?

---

<div class="post-metadata">

**Author:** ![skeetaseasonTV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@skeetaseasonTV](https://forums.unrealengine.com/u/skeetaseasonTV)\
**Post date:** [April 8, 2014, 4:18am UTC](https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865/2 "2014-04-08T04:18:55Z")

</div>

> [@skeeta92;12355](#):
>
> Im using the FPS script that came with UE4 and it came with the custom hud and crosshair which works fine…the problem that i am having is that i cant get it to use my blueprint functions. For testing i tried printing a string to the screen but doesnt work. I used the Hud.h and MyCustomHUD.h as the parent but either didnt work…what im i doing wrong? Am i suppose to grab it with the c++ code ? If so how do i do that with the HUD class?

Anybody know a easy way to do a timer using blueprint or c++ ?

---

<div class="post-metadata">

**Author:** ![Solid\_Snake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Solid\_Snake](https://forums.unrealengine.com/u/Solid_Snake)\
**Post date:** [April 8, 2014, 4:28am UTC](https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865/3 "2014-04-08T04:28:04Z")

</div>

You still need an entry point in Blueprints. Usually a good entry point is an event which is called by C++ such as Begin Play. In the cast for the HUD, you probably want to use the Post Render event. In terms of using timers in blueprints, the functions set, get and clear a timer are available.

---

<div class="post-metadata">

**Author:** ![GreenEyed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GreenEyed](https://forums.unrealengine.com/u/GreenEyed)\
**Post date:** [April 8, 2014, 3:27pm UTC](https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865/4 "2014-04-08T15:27:58Z")

</div>

In C++, you might want to have a look at GetWorldTimerManager().SetTimer(…), GetWorldTimerManager().ClearTimer(…) and “friends”.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cae9bcfa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cae9bcfa](https://forums.unrealengine.com/u/anonymous_user_cae9bcfa)\
**Post date:** [April 8, 2014, 3:59pm UTC](https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865/5 "2014-04-08T15:59:06Z")

</div>

could you post the blueprint you made?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e0b29deb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e0b29deb](https://forums.unrealengine.com/u/anonymous_user_e0b29deb)\
**Post date:** [April 8, 2014, 6:33pm UTC](https://forums.unrealengine.com/t/using-both-c-and-blueprint/1865/6 "2014-04-08T18:33:21Z")

</div>

> [@skeeta92;12355](#):
>
> Im using the FPS script that came with UE4 and it came with the custom hud and crosshair which works fine…the problem that i am having is that i cant get it to use my blueprint functions. For testing i tried printing a string to the screen but doesnt work. I used the Hud.h and MyCustomHUD.h as the parent but either didnt work…what im i doing wrong? Am i suppose to grab it with the c++ code ? If so how do i do that with the HUD class?

Did you change your project settings so that they use the new blueprint class instead of the normal Hud/CustomHud?  
There already are a bunch of blueprinted events which will be triggered for all blueprints which are Actors.
