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

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

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

EX:

Fall Damage Calc in Animation BP Tick:

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.

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: @, 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…

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.








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