# Blueprint: Helpful BP Functions

**URL:** <https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 16, 2014, 1:27pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133 "2014-06-16T13:27:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 16, 2014, 1:27pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/1 "2014-06-16T13:27:08Z")

</div>

I’m going to post some helpful BP Functions that I either make or come by here:

 ![DrawSmartTexture.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/a/1af8c11e0904cb48af9b84b922ade7e18b7b4b95.png)

Draw Smart Texture

Usage: I use this to to place my interface HUD objects in the same space as designed in photoshop on screen and have this auto align and scale to different resolutions.

Parameters:

XPos and YPos  
-Start X and Y from Photoshop where the interface object sits.

Width and Height  
-The Height and width of the image

Idea Screen Size  
-This is the Doc Size of the canvas in photoshop in my case 1920x1080

 ![DrawSmartTexture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/6/1f6c0c70c77c06fcd339000a67929c181038ea6a.png)

Get Adjusted Screen POS and Size

Usage: This scales the input by the Idea Size and the actual size of the game screen. Also Note that here you can do exact scale or keep the aspect ratio by only only scaling the height and width by the x width ratio.

I would like this to be a collection of useful BP Functions as I clean up the BP code i have I would like to share more so we all can learn and grow. Please share your helpful BP Functions here as well.

Thanks,  
Kevin

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 16, 2014, 10:54pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/2 "2014-06-16T22:54:15Z")

</div>

Draw A Rotating Radar

 ![Radar_1_DrawRadarPart1.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/0/20ce33c44c45a84dd8a0349baad3e223cc3c3661.png)

 ![Radar_1_DrawRadarPart1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/3/7/937b286d1ea1c567f6691d1674719c6a37fe3a8c.png)

 ![Radar_3_IsDetectedActorInRange.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/b/6b0bf1f0113ab615dfaa81d179370dd6a92b5b61.png)

 ![Radar_4_GetRadarPosition.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/3/13b09e6c07a936eaec9b535e1786aecd42f8a96f.png)

 ![Radar_5_GetRadarRotation.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/3/e32f9a6bd2fccc50369c1eef5a14045a17aad61e.png)

 ![Radar_2_DrawRadarPart2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/b/38bf4ffeebbbece1e7a786c2f6274541d3881615.png)

I tried to comment and clear wires as mush as possible.

EX:

 ![RadarExmp.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/3/9/394850273abee31ad37645012eb3cb342e4c09fd.jpeg)

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 16, 2014, 11:45pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/3 "2014-06-16T23:45:06Z")

</div>

Fall Damage Calc in Animation BP Tick:

 ![FallDammage_1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/8/b7800c8db6889104874231448545e6c57b21ebfe.png)

Missed the clearing of the was fast falling

---

<div class="post-metadata">

**Author:** ![McTune](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@McTune](https://forums.unrealengine.com/u/McTune)\
**Post date:** [June 17, 2014, 7:30pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/4 "2014-06-17T19:30:55Z")

</div>

Awesome thanks!  
I think a thread like this would be helpful.

---

<div class="post-metadata">

**Author:** ![Drexciya](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Drexciya](https://forums.unrealengine.com/u/Drexciya)\
**Post date:** [June 19, 2014, 10:11am UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/5 "2014-06-19T10:11:45Z")

</div>

Good stuff in here, indeed. I’ve been thinking about making a falling damage system so this might be a handy reference.

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 19, 2014, 11:10am UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/6 "2014-06-19T11:10:14Z")

</div>

Spawning Custom Weapon/Attaching to socket/toggling between attack and sheathed mode/Animation BP setup for both attack and non attack idle blend spaces.

 ![1_LoadWeapon And Attach to Sheeth.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/a/2bac8dc317111808a9815b387fba21ef3e2a5e5d.png)

 ![2_ToggleWeaponPosition.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/a/ca21a052f1d519715b3aa5b052195b90a5397ea2.png)

 ![3_SocketSetup1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/5/05f8d7726a50ba4af2c85a5db45e087e19e27703.jpeg)

 ![4_AttackAndIdleNodes.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/2/e2b1da188c938a05a5427035588ee0f32ba42e0c.png)

Sorry for the lack of comments I have to head out to work. Hope this helps!

Edit:  
Added Video of some of the above things implemented:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/f/5/af51826dbe9cd8db61b12989e4bd883cc82a3267.jpeg "Unreal Engine 4 - RPG Battle") ](https://www.youtube.com/watch?v=YLc25KMaBs4)

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [June 19, 2014, 7:23pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/7 "2014-06-19T19:23:37Z")

</div>

Great work!

The fall damage and weapon systems are immensely useful for me and my current project.

Thanks for this!

Edit: @, small world, I remember you from the Torque3D community 🙂

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 19, 2014, 7:37pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/8 "2014-06-19T19:37:44Z")

</div>

> [@n00854180t;79834](#):
>
> Great work!
> 
> The fall damage and weapon systems are immensely useful for me and my current project.
> 
> Thanks for this!
> 
> Edit: @, small world, I remember you from the Torque3D community 🙂

I’m still there just currently focusing on learning unreal as well.

I hope this helps I plan on this growing and growing~ Hopefully others will contribute some to this as well.

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [June 19, 2014, 9:32pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/9 "2014-06-19T21:32:25Z")

</div>

> [@;79843](#):
>
> I’m still there just currently focusing on learning unreal as well.
> 
> I hope this helps I plan on this growing and growing~ Hopefully others will contribute some to this as well.

You’re a machine! It’s all I can do to keep up with one engine/community. T3D will always have a special place for me, having used it more extensively than anything else. Looks like it’s coming along really nicely too.

I have a couple of things I can add, from my recent implementation of an inventory system.

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 19, 2014, 10:35pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/10 "2014-06-19T22:35:51Z")

</div>

> [@n00854180t;79899](#):
>
> You’re a machine! It’s all I can do to keep up with one engine/community. T3D will always have a special place for me, having used it more extensively than anything else. Looks like it’s coming along really nicely too.
> 
> I have a couple of things I can add, from my recent implementation of an inventory system.

I was thinking of adding mine but its all in c++ lol with simple add and remove functions in BP. I’m getting a little burnt out though, sometimes i come home and stare at unreal for like an hour before i start doing anything. Then pass out sleep after 30 minutes. To be woken up by my wife 2 hours later… /sigh

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 21, 2014, 1:05pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/11 "2014-06-21T13:05:05Z")

</div>

Implementing Dodge or Sprint:

Note that I need to make some kind of adjustment to apply a forced forward movement for dodge if you hit dodge with out the movement direction being pressed. If this happens the player dodges in place… \>.\> yep…

 ![SprintDodge_1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/6/4461cbf642b5a88ff063ddbaecefddd295b99410.png)

 ![SprintDodge_2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/6/d3660d98ee899a9179c1a4564673435bab30429c.png)

 ![SprintDodge_3.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/a/6af4818b8f6b08e558fd1067022cb68f77640f41.png)

 ![SprintDodge_4.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/4/94be6b8cf5679f29c29b1937da179e047f451844.png)

 ![SprintDodge_5.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/0/20cb229daa298b13910d19398f4b281fbc69f5f4.png)

 ![SprintDodge_6.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/2/b251810ee5b3522a12668c9e1be3abf2d5dd6bd0.png)

 ![SprintDodge_7.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/1/a116dbe7f761b05fde765d162d381251cdc6c330.png)

 ![SprintDodge_8.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/6/a/6abe51da3b63f0ce70a3a34e0477f217205af490.png)

 ![SprintDodge_9.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/8/0/803351dd225c5363052ce22a9b7a1884c3ed668e.png)

 ![SprintDodge_3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/e/eae2c585b6a5220ed85da16a629cdebd9a698d4b.png)

Hope this helps some.

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 21, 2014, 1:32pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/12 "2014-06-21T13:32:25Z")

</div>

Implementing Lockon:

Note that to get a ground Lock on I added a decal to the enemy component that aligned to the bottom of the capsule.

 ![LockOnTarget_1.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/1/e1df11e19bc2bd14a085bb9756729eddf0ae72fa.png)  
 ![LockOnTarget_2.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/9/19f378992f4ce13006cd30685ad26f89cd6ee061.png)  
 ![LockOnTarget_3.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/9/c/9c7bb7fbd9afe817fa7a6a57eacb467b7440f24b.png)  
 ![LockOnTarget_1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/6/8e61d665a69f4507d604c8a096145eb82356ad4f.png)  
 ![LockOnTarget_2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/d/47dcb004b092738b46d245461ef1f71eacb16ce8.png)  
 ![LockOnTarget_3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/1/4/d146654b24c0d9b26d1dc42c605788d56aea60fb.png)  
 ![LockOnTarget_4.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/d/2/dd287b82e3545423c388b511fa66819420ff46d8.png)  
 ![LockOnTarget_5.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/0/90042d49d2fdbc16a00d8107ede95adc13ffa72a.png)

Hope this helps some.

Usage Vid:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/a/0/0a0d31d829afeb1721dfb1f45953662c6b0b2815.jpeg "Unreal Engine 4: AI Party & LockOn Test") ](https://www.youtube.com/watch?v=6Y724JTdpNs)

---

<div class="post-metadata">

**Author:** ![DJMidKnight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DJMidKnight](https://forums.unrealengine.com/u/DJMidKnight)\
**Post date:** [June 24, 2014, 7:25pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/13 "2014-06-24T19:25:08Z")

</div>

> [@;77800](#):
>
> Draw A Rotating Radar

What is your Get Temp Offset function. I do not see it in the screen shots except as a node.

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 24, 2014, 7:54pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/14 "2014-06-24T19:54:20Z")

</div>

> [@DJMidKnight;83350](#):
>
> What is your Get Temp Offset function. I do not see it in the screen shots except as a node.

StartX+OffsetX -\> Output -\> NewX  
StartY+OffsetY-\> Output-\> NewY

I really hate having lines everywhere and clutter.

---

<div class="post-metadata">

**Author:** ![DJMidKnight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DJMidKnight](https://forums.unrealengine.com/u/DJMidKnight)\
**Post date:** [June 24, 2014, 8:42pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/15 "2014-06-24T20:42:57Z")

</div>

Thanks got it all setup but it wont show unless I add another Draw Material simple after it in the HUD. I have checked over everything I cant seem to resolve this. Are you using a static image or a scenecapture2d of your map for the MapMaterial?

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 25, 2014, 12:16am UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/16 "2014-06-25T00:16:03Z")

</div>

> [@DJMidKnight;83402](#):
>
> Thanks got it all setup but it wont show unless I add another Draw Material simple after it in the HUD. I have checked over everything I cant seem to resolve this. Are you using a static image or a scenecapture2d of your map for the MapMaterial?

I have a texture Created into a Basic material:  
Translucent/Unlit

This is loaded into a Dynamic Material Instance in the construction script.

Using CreateDynamicMaterialInstance -\> set RadarBG which is a MaterialInstanceVariable. And that is the material that I sent into the draw function.

---

<div class="post-metadata">

**Author:** ![DJMidKnight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DJMidKnight](https://forums.unrealengine.com/u/DJMidKnight)\
**Post date:** [June 25, 2014, 5:37pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/17 "2014-06-25T17:37:28Z")

</div>

Not sure if anyone else has tried this. But there may be some details missing. As the screen size and position does not show what the input variables are. I know the colors so I could guess between the text and that. It still is not working I will keep trying to figure out what I missed but perhaps you could start from scratch follow your own example and see if there’s a step or important piece missing when you have time thanks.

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 25, 2014, 6:58pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/18 "2014-06-25T18:58:06Z")

</div>

> [@DJMidKnight;84045](#):
>
> Not sure if anyone else has tried this. But there may be some details missing. As the screen size and position does not show what the input variables are. I know the colors so I could guess between the text and that. It still is not working I will keep trying to figure out what I missed but perhaps you could start from scratch follow your own example and see if there’s a step or important piece missing when you have time thanks.

There’s a color guild for variables but the screen size is a 2D Vector. Dark blue represents 2d vectors

---

<div class="post-metadata">

**Author:** ![DJMidKnight](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DJMidKnight](https://forums.unrealengine.com/u/DJMidKnight)\
**Post date:** [June 25, 2014, 7:18pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/19 "2014-06-25T19:18:36Z")

</div>

> [@;84077](#):
>
> There’s a color guild for variables but the screen size is a 2D Vector. Dark blue represents 2d vectors

Well yes but all material variables are the same color as are of course all class types. Again not sure why its not working I will go thru it with a fine tooth comb again to try to get it to work.  
thanks for your response.

---

<div class="post-metadata">

**Author:** ![Shoiko](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shoiko](https://forums.unrealengine.com/u/Shoiko)\
**Post date:** [June 25, 2014, 7:58pm UTC](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133/20 "2014-06-25T19:58:16Z")

</div>

> [@DJMidKnight;84085](#):
>
> Well yes but all material variables are the same color as are of course all class types. Again not sure why its not working I will go thru it with a fine tooth comb again to try to get it to work.  
> thanks for your response.

Send me you BP asset if u can

[Next page](https://forums.unrealengine.com/t/blueprint-helpful-bp-functions/6133.md?page=2)
