Download

Blueprint: Helpful BP Functions

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

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

feda0ba245e3a97ac60afd82f3e3dedd7b5a182f.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

Draw A Rotating Radar

3352e75160b4fb902d246f45116750c28fdd9221.png

69f7cc7267749b699681b40760bd743c11a32156.png

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

EX:

Fall Damage Calc in Animation BP Tick:

05cffec37843af53b887e808aa013ea8ba60e7fa.png

Missed the clearing of the was fast falling

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

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

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

897bd04233bceeff201005dacf8bf1d8e14bab9f.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:

Great work!

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

Thanks for this!

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

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.

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

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…

89273bf6e71a62406eb6baf6149c25d97985645d.png

ea74e16012789774b4d5485b2f9dd7fe84d1fe08.png

6a5f1b71442ac3af2a74f7a1c6c1cc9fb2ca4838.png

Hope this helps some.

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.




24472f5dcfa2f02bbba8f01f12a94b511dd19fc0.png
36f94e95e83a3775cfc7dbe73beaca48bdf57660.png
67e54d37a217eabac91e30ff29f7bb8537f478c9.png
2cb909423c9b4289a9fb1d044b82f545df1a7efe.png
b9cbfa9f4aa6580a3ea92fa5b3c4365b4100ebe9.png

Hope this helps some.

Usage Vid:

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.

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.

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

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