#blueprint

1 messages · Page 395 of 1

raw spindle
#

how do i get the draw size of a widget from within the draw call override?

#

there's GetDesiredSize, but it's not the right value at all

pine carbon
#

Is there any way to use the system console from a blueprint?

#

I'm nowhere near good enough to debug the information that the shipping build debugger can give you access to. I need a way to print out information from my code that isn't limited to the frame rate.

next hollow
#

Are you wanting to run commands, or print out info?
Just to make sure which you want. 😛

Cuz, for printing info, theres a build config to enable print strings in shipping.
Or, you just don't build as a full shipping.

pine carbon
#

I was thinking "echo <thing I want>" but if I can get print strings in shipping, I'll take that. Where do I do that.

next hollow
#

Oh.
Your not an engine build. (since you can only build shipping)
I don't think you get that luxury then?

See if you have a Source folder in your project root, with a .target.cs file.
I wanna say you won't cuz BP only?

pine carbon
#

Not BP only.

#

But problem is in BP.

next hollow
#

Oh, then yeah.
You can change the .target.cs file you should have?
and, add bUseLoggingInShipping = true;

pine carbon
#

Also, when I say "can't build as anything other than shipping" I mean that it can but they don't work, not that Unreal will not allow me to do it.

pine carbon
next hollow
#

Well, both of those things are odd.
But, thats all I got then.
If you have C++, then you can just make a new function that writes to the log.

pine carbon
next hollow
#

Oh, so yeah.
Non-source build getting you there

pine carbon
#

This is driving me insane.

acoustic hemlock
#

Using a sample I found on Github, this is what I've managed to make. Now I'm just not really sure how to connect them?

next hollow
pine carbon
#

What log.

next hollow
#

The games log.

pine carbon
#

Doesn't it not have one if it's Shipping?

#

I thought that's the problem.

next hollow
#

It just barely ever uses it.
But, still has it.

pine carbon
#

Where would this be? I'm familiar with C++ but not terribly great with Unreal C++.

next hollow
#

Where would what be?
The log.
It'd be in your saved folder.
But, given your shipping, like 99% of all logging is disabled so it likely to not even exist.

But, with a quick UE_LOG printing function you should be able to write to it.
then, you can view it in real-time, with -log in your games startup params

pine carbon
#

Hold up. Startup params. Where do I do those.

next hollow
#

If your game exists on steam, then just in your games properties.
Else, you gotta make a .bat file, that runs your game's .exe file, then just add the startup params as normal text.

pine carbon
#

Augh.

#

That is another thing I don't know how to do yet.

maiden wadi
chilly canyon
pine carbon
frosty heron
#

Guessing suck.

#

Or impossible sometime.

#

I figured mine by attaching debugger, dont think theres another alternative.

maiden wadi
#

90% of my shipping bugs, I tend to find just following the crash line and the callstack that can call it.

maiden wadi
pine carbon
frosty heron
pine carbon
#

I don't speak assembly.

frosty heron
#

Neither do i

#

If you attach debugger with pdb , it will stop at the problematic code.

pine carbon
#

It sure did.

#

In Assembly.

maiden wadi
#

Is it still the same crash and have you tried a full rebuild if it is?

frosty heron
#

And also a call stack will be valuable informarion.

frosty heron
#

@maiden wadi is source build a must for attaching debugger or downloading symbol and including pdb suffice?

maiden wadi
#

I don't think so. Not sure how well engine source will work with launcher engines with symbols. I've never tried it.

pine carbon
pine carbon
#

It stopped in a bunch of assembly.

#

And the whole stack was also assembly.

frosty heron
#

You need to download and include debug symbols.

pine carbon
frosty heron
#

Just use latest for everything

#

Not sure if thats relevant but maybe.

pine carbon
frosty heron
#

Have you download debug symbol?

#

Thats step 1

frosty heron
pine carbon
#

I don't know. Which means probably not.

frosty heron
#

Yeah then impossible to dechiper hence you get assembly code

#

You can download it from the launcher.

maiden wadi
#

Go to your engine thing here. Since yourse is installed it'll have a Modify

#

It'll open up an install settings, scroll down slightly and there should be an Editor Symbols thing or similar. Quite a few gigs of data.

frosty heron
pine carbon
#

Can't do that today since I don't have admin on this computer, but I will definitely look into that.

maiden wadi
#

Source builds them locally when you compile the engine.

frosty heron
#

Its one of the essential things.

pine carbon
#

I look forward to never using this approach again, but it got me this far.

frosty heron
#

With debugger you will now what actually went wrong / invalid.

pine carbon
#

Assembly variant tells me it's a memory access violation. Can't wait to find out how the heck this could possibly cause a memory access violation.

maiden wadi
#

Does unhooking that Stop function stop the crashing?

pine carbon
#

I checked every single array in this file before I got here because I didn't imagine this could possibly cause that.

maiden wadi
#

Can you show the code for that?

pine carbon
#

Builtin from the Harmonix plugin.

chilly canyon
# acoustic hemlock Yes

Wouldn't it be enough to just connect that to the flow after you decide that it's a strike/spare (both can have extra toss, right?)

acoustic hemlock
#

Yeah they do, but I'm still not sold on my calculation. My main problem is calculating a score based on rolls that haven't happened yet and then totaling that score. How am I supposed to predict what the following rolls could be.

crimson briar
# acoustic hemlock Yeah they do, but I'm still not sold on my calculation. My main problem is calcu...

You don't need to calculate points in the future. I don't knwo bowling, but form a quick read I assume you are talking about the part where you get bonus points on the next throw after a strike.
Well, you add points that you get now. And mark a variable somewhere, that strike happened.
Each time you calculate points for a throw you look at the strike variable, and if it is true (which mean strike happend previously) you add more points and set the variable to false.
Or just keep track of every round and loop backwards through the previous rounds when you update the points after a strike etc

acoustic hemlock
#

Previously I stored everything in a single structured array, it stores Rolls 1-3, if there's a third roll on frame 10, and the score at that frame. My only problem is it getting messy and difficult to track.

crimson briar
#

It should be an array of a struct (let's say a Frame struct). The struct would have: int Score, bStrike, bSpare, int array Rolls (representing a number of pins knocked with each roll). Let's say the array name is GameStats, I don't know how it is called in bowling lol.

When a frame starts, you create a new Frame struct in your CurrentFrame variable. After a roll you add a number to the Rolls array in the CurrentFrame. You add points or mark a strike etc.
Then you have a loop from last index of the GameStats. You check variables there against the CurrentFrame data and add points if necessary based on some comparisons.
At the end of the frame you add the CurrentFrame to the end of GameStats.

Hmmm... It is kinda hard to put it in words lol. Bowling scores are weird

acoustic hemlock
#

Something like this?

autumn pulsar
#

If I destroy an actor does any timer handles set up on it get destroyed as well?

pine carbon
#

Is there a way to schedule a function to execute next tick in such a way that if it's called from multiple places, it only executes once?

pine carbon
#

That's what I'm using. It ain't doing that.

full badge
pine carbon
#

How?

full badge
#

clear timer by function name i guess?

#

or by handle if you have access to it

pine carbon
#

By name worked, thank you.

dark drum
pine carbon
#

Yes.

#

I'd also love to know how to get actors to not spawn in the dang floor in a packaged build.

#

Yes, they are set to adjust position when they spawn.

pine carbon
#

No. They're a big ol' mesh.

#

Well, a detailed one at least.

#

It's not that large in terms of scale.

#

Works in-editor, spawns in floor when packaged.

dark drum
pine carbon
#

I have the gravity disabled so I can see it's not pushing it enough to not be colliding.

#

The collision seems to just be a bunch of boxes on the floor.

hot star
#

This graph has 130+ nodes. Instead of tracing wires, the tool reconstructs the execution flow into clear logic so you can quickly understand Blueprints you didn’t write.
It also gives you structured output you can use for debugging, documentation, or even feeding into AI tools to analyze behavior faster.

dark drum
hot star
#

It turns messy Blueprint graphs into clear, readable logic so that you can instantly understand and debug what’s going on without tracing wires and save debugging headaches and hours as the graph complexity increases.

dark drum
hot star
#

It’s mainly useful on larger graphs where tracing execution manually gets slow this just makes the flow easier to see quickly

marble tusk
#

I could see that being useful for people who find reading code easier than reading graphs. That is not me though. Plus, I wouldn't let a graph get that big and unreadable. There are lots of tools you can use to make your graphs easier to read. Functions, macros, collapsed graphs, comments, reroutes

dark drum
hot star
dark drum
hot star
#

Haha yeah😅 ideally you never get there, this is more for inherited or complex graphs where you don’t control the structure

maiden wadi
#

You also need a better test case for the tool. That blueprint isn't unreadable. Find something that wraps back around on itself a few dozen times, and and makes excessive use of reroutes.

#

99% of that blueprint can be fixed with a Shift+W or whatever that hotkey is.

hot star
hot star
dark drum
hot star
dark drum
hot star
#

@maiden wadi from your experience, at what point do Blueprints or C++ workflows start needing extra tools, and where do things get painful?

hot star
#

Asking from a tools dev perspective, at what point does a Blueprint stop being manageable for you and start slowing you down?

frosty heron
#

I tend to not go more tgan 20 nodes.

#

Deff dont want to do core system in bp. It become spaghetti real quick.

#

Not saying you cant just i wouldnt do it my self.

maiden wadi
#

There's actually a dev talk on this from...

#

NaughtyDog?

#

I think it was them. They have a dev thing that won't let them commit BPs that are too complicated.

#

Like, you actively have to break down your graphs into functions, clean your stuff up, etc and not use too many nodes or reroutes to be able to commit the BP to source.

hot star
#

Oh that’s interesting! Sounds like a graph complexity check or validation system before commit.
Feels like there could be value in analyzing execution flow and flagging when graphs start getting too dense, maybe suggesting how to break them into smaller pieces.

maiden wadi
#

Pretty much, yeah. They had some neat scoring system for it. Trying to find it.

hot star
#

I think it has to do something with execution complexity like branching, nesting depth, loops, same logic across cases.
Also, I think node count alone probably isn't that meaningful unless it directly affects the flow complexity.

maiden wadi
#

Aha! I found it. It was Hanger 13

maiden wadi
# hot star I think it has to do something with execution complexity like branching, nesting...

It's well known that Blueprint visual scripting in Unreal Engine can get out of hand as a project evolves. The software industry has battled the same difficulties since the 80s so there are a couple of established scientific ways to measure and deal with code complexity.

Join Valentin Galea of Hangar 13 Games for a session that explores how Blu...

▶ Play video
faint pasture
#

You know what's the best way to not make spaghetti? Just don't cook it up to begin with.

granite nacelle
#

Sup everyone, could someone give me a guide or a pointer on why my notes don't close, and goes to un-pause when i press back or even a better way of setting it up would be great?

stable zodiac
#

Does anyone know how to to get the correct Item Index when clicking an item in a CommonTileView? I can see the item in the array, but when its double clicked it uses the default value every time when using Get Index for Item

narrow kite
forest timber
#

Before I even start trying, does anyone have a simple way to rotate an image based on the players mouse (in ui)

#

I wanna rotate a dial based on the mouse

raw spindle
#

i made a simple radar for my space game in niagara. i am trying to set the alpha of the lines that connect the objects to the plane, but no matter what i do, they are rendered at 100% alpha. any ideas what might be going on here?

#

i can set color just fine, but alpha has no effect.

pine carbon
frosty heron
#

I dont like those.

next hollow
#

Just realized an annoying downside to Gameplay tags
Since its 1 whole var, it doesn't handle inheritance/ child edits like I thought.

faint pasture
#

reroutes are a smell IMO

pine carbon
#

I can't stand the offset of the sine waves connections. It irks me.

frosty heron
cunning saddle
#

I need help for a workaround for the delay node. At the start of the level, I want something to take place 0.2 seconds after it starts. Obviously, it caused issues using the delay node. But I need a work around for this, I just need something to take place very shortly after the level starts, but not exactly when it starts.

chilly canyon
frosty heron
#

Whats the diff with just using delay at that point?

#

Not like you have a case there where you need to intefere and cancel the timer handle.

#

Perhaps desc what you want to actually do objectively.

#

There might be another point you can hook into.

pure gyro
cunning saddle
next hollow
frosty heron
pulsar hazel
#

Hey guys, I started a new top down project (5.6) and I am trying to switch that simple move to node for a node with a pin for the finished moving event.
I’m trying using “AI move to” using the player pawn, but it is not moving!

dark drum
pulsar hazel
#

Any idea how I can check when the player pawn stop moving?

#

The simple move to doesn’t contain the pin

frosty heron
#

do you have navmesh setup?

#

for player it's probably Simple Move To or something like that.

dark drum
pulsar hazel
inland walrus
#

Any tips on sorting by integer?

crimson briar
#

Depends what you want to sort. FOr a simple array of integers there is a built in function I think

eager thicket
#

currently, my camera rotates around 1) which is a single point. This is done via the controller input

#

how would I get my camera to rotate around 2), which is a full circle around the object?

#

this is the code as it exists

maiden wadi
eager thicket
#

the first one isn't really a circle, it's a point

#

so it rotates around a point

#

but I basically want to maintain everything, but have the camera rotate aroudn the circle almost like a crane effect

crimson briar
#

Do you mean you want the camera to not focus on the player, but on his side? Like if you go to the left, camera is moved slightly to the left and not centered on the player?

#

Because I too struggle to see the point

eager thicket
#

The problem with the camera/spring arm rotating around a small point is it's kind of interfering with the object. So at 180 degrees, it's basically going through the front of the car

#

if it rotates around a wider circle, that problem should be eliminated

#

does that help?

crimson briar
#

Ah. I think it is handled mostly by doing collision checks and extending the arm when it is too close to the mesh

eager thicket
#

oh that would is disastarous

#

collision checks will make the camera jaggey and janky

#

a pre-defined circle of operation would be smoother

#

its a good suggestion though

crimson briar
#

I mean, it doesn't have to physically collide, I meant it more generally

eager thicket
#

ah i think i know what you mean

#

i guess i could try map range clamped in relation to how close the camera is to the center of the car

#

but ideally i'd love to know how the math behind just getting a larger circle rotation

chilly canyon
#

You can try setting up a spline around your car and with camera horizontal movement you move the camera along the spline in +/- distance

crisp hazel
#

https://www.youtube.com/watch?v=EM_HYqQdToE Is this tutorial still valid? I tried creating Blueprint Interface using this inside 4.27.2, but the door or static mesh doesn't seem to move at all.

Announce Post: https://forums.unrealengine.com/showthread.php?101051

This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...

▶ Play video
lunar sleet
lunar sleet
#

Mind be against self-promo rules but your ad looks nice

errant cradle
#

im also against it, but just shared cool tool in my opinion 😉

crisp hazel
lunar sleet
faint pasture
lunar sleet
worthy frost
pine carbon
#

What might prevent this completed pin from firing.

crisp hazel
distant grotto
#

will this automaticaly replicate to the client or do I also need to call it on client

frosty heron
#

Its a state, should never ever use RPC.

frosty heron
#

Also multicast is server telling clients to run a function. So if server is the one calling the MC then every conmected client will run the function.

But this also mean that you dont want to use RPC tp change movement mode because anything that need to be in sync shouldnt be done in RPC.

Any player that have yet to connect or the one that get disconnected will be desync since the function isnt called on their end.

Use OnRep instead.

#

Rpc is for events.

Replicated variable for state.

distant grotto
#

ok that helps

frosty heron
# distant grotto ok that helps

Server rpc = client telling server to run a function

Client rpc = server telling the client that own the actor to run a function.

Mc rpc = server telling every client to run a function.

#

In nut shell server rpc is foe client to communicate to server.

Client rpc should be called by server and player that own the actor will execute the func.

Mc rpc should be called by server as replication work from server to client, not vice versa.

distant grotto
#

thanks

worthy frost
#

as replicated properties == stateful

#

rpcs == non stateful

#

a multicast is like "hey everyone this just happened and only you players here now should see it"

#

ie it could be a notification, or a instant particle effect

#

players late joining or not relevent will not get that.

#

simple way i like to describe these is
Imagine having a chest, opening the chest is a state (bChestOpen = true), everyone should know the chest was opened.
Particles that play when the chests open for the first time? Multicast (all players relvent sees the particles of the chest being opened).
Late joiners/irrelvent players will see the chest open, but will not see the opening particles (because its an old opened chest)

dark drum
pine carbon
#

I don't think it ever is. The animation plays in full.

next hollow
#

Theres some ignore actor function, to make the collision ignore said actor.
(I think the full name is like ignore actor while moving?)

twilit crane
maiden wadi
#

ke ObjectName FunctionName PossibleArgument

So for a non argument function on all instances
ke * MyCoolFunction

And a function with an integer input.
ke * MyCoolFunction 32

tight pollen
#

I would like it to smoothly change the rotation for "Controller Rotation" from 355 to 8, but I don't want it to go back from 355, but to go forward 356, 357, 358, etc. up to 8 and I don't know how to do it 🙂
Someone can help?

chilly canyon
full badge
maiden wadi
#

Okay?

twilit crane
worthy bough
#

Is it safe for me to do this or should I just set it in a local variable first?

Is it possible for the array item to be read somewhere else and used in between setting the variable here and setting the element? (This is in a function called on the server, no latent stuff)

spark steppe
#

in UE 5.5+ right click the get node and click "show exec pins"

#

then the value is cached (as long as you use get a copy, because currently it's get a reference, i'm not sure how these behave in your case)

neon sphinx
#

If anyone is familiar with contextual animations, would they mind messaging me please! I am struggling with getting the warp points to work - thank you in advanced 🙂

spark steppe
#

stop cross posting Jay

worthy bough
spark steppe
#

then your code should work as expected

worthy bough
crimson briar
# worthy bough Is it safe for me to do this or should I just set it in a local variable first? ...

In general - no, it is not possible. If the way you get the element is static (so by index, not by a random number) it will be safe.
It wouldn't be safe if you did something like get -> remove element -> try to get the same value from the previous pure node - because it would have a different number of elements. Since pure nodes don't cache their result, they execute again for each execution pin node that uses them.

neon sphinx
spark steppe
#

nah you aren't, as both (or more) posts are still there

neon sphinx
spice smelt
#

nevermind, it was waaaaaay easier via control rig 😆

maiden wadi
neon sphinx
maiden wadi
#
  1. No spam
    This includes phishing, scams, unsolicited Discord invites, unsolicited direct messages asking for help, cross-posting in multiple channels, and use of excessive mentions, emoji, or repeated messages.
#

It doesn't say "only post in the relevant channels. It says, "cross-posting in multiple channels"

#

That means posting the same thing in multiple channels.

neon sphinx
#

Let me answer your question most simply to end this conversation

dark drum
lilac mountain
#

Hi! im trying to figure out how to add items to an inventory component and im a little stumped. in the tutorial im watching the teacher sets up a keyboard event to trace to an object, then casts to the hit actor. Im trying to be a good egg and completely remove casting from my brain from the start. I have an interface between my character, my item master bp, and my inventory component. Im currently confused on how I can get the structure info from my item bp and send it to the inventory component using the trace from my character as the middle man. Feel free to DM me if youd like. im also avalible to jump into a VC if anyone wants as well

dark drum
lilac mountain
#

So when I trace to an Item I should go to the item and pass the inventory component through there and then back to my character?

crimson briar
#

Character: InteractInput -> Trace -> Call OnInteracted on the target (can be an interface, a function after cast, a component - depends what you prefer) passing the character as Interactor.
In the item: OnInteracted -> GetInventoryComponent from the Interactor actor -> try to add to the inventory, if successful, destroy itself

dark drum
lilac mountain
#

Gotcha. Ill start giving this a shot

dark drum
lilac mountain
dark drum
lilac mountain
#

Does the cast to pawn cast back to the player/whatever instigated the interaction?

#

also is the interaction instigator an input or an output?

dark drum
granite nacelle
#

hey, does anyone knows why this happen when i try to set up a control rig?

lilac mountain
dark drum
lilac mountain
#

Thank you so much for all of your help so far its starting to click

#

So Ive currently also added a keyboard event as a debug to print the name of whatever is in my first inventory array slot and it only works if I use set aray elem instead of add. is there any reason why the add node doesnt do anything? the array by default has no indexes for now

maiden wadi
lilac mountain
#

this is my little debug event too for reference

maiden wadi
#

Add a second print to that that shows Item's number of entries.

lilac mountain
#

I forgot that I set the array size in the widget setupfacepalm

#

Works now lol

lilac mountain
odd kiln
#

Hi all ! Anyone knows how to get a proper "Up Vector" of a socket even if the "bone" is badly rotated from 3D software ?

#

I mean the "blue" arrow should be pointing upward in the SKM Asset but mine is the "green" arrow pointing upward

crisp hazel
# lunar sleet I’ve seen interfaces fail when you have them both in the sender and the receiver...

I did some testing to see what the problem is, apparently nothing is working inside my interactive door actor blueprint, I copied the door animation trigger nodes from the interactive door actor blueprint to the third person template blueprint and the trigger animations works fine there, is there something I need to be sure of or enable before I start creating blueprints inside a new actor graph?

lilac mountain
#

Would I want to add the function to my inventory component, my item, or my character?

frosty heron
#

For add item, use the inventory component.

lunar sleet
kind estuary
#

im transfering units (unit cards), from one army to the other.
So when i load the army widget, that has all the cards, i loop through all the units, and bind the click on the card, to transfer the unit to the other army

#

but doing it this way it doesnt really send the current index in the iteration...

#

it sends always the last index... because it is iterating and the loop will then have the last index...

#

i could swear this worked well in the past, and would send the right index... but now its broken

#

what should i do? How can i make sure the right index is sent...?

crimson briar
#

Well no, it will never work like this

#

YOu are using loop index outside of the loop. You should never cross execution chains like this

#

You should save an identifying data on the Card ui element. Then sent is via a dispatcher parameter

#

So when the card gets clicked, it calls the dispatcher with it's ID, or name, or whatever you need

#

You already have the unit data on the dispatcher so I'm not sure why you would use the Index from the loop

last peak
#

There are so many weird things in this bp that are confusing the hell out of me lmfao

kind estuary
#

and structs are weird in blueprints

#

okay but will try that

last peak
#

I can guarantee you pros dont do it like that XD

kind estuary
#

or using FGUID

kind estuary
#

thanks 🫡 🫡 🫡 🫡

crimson briar
last peak
#

Will mixing a event dispatcher into a loop not cause synch issues ?

crimson briar
last peak
#

If im not wrong the loop runs on one tick
But the event doesnt

#

So if you add a dispatcher to a loop super weird things will happen

crimson briar
#

Everything runs on one tick unless it is marked with the time icon.
But the event itself doesn't run in this execution chain. It is only a binding connecting the delegate with the event

crimson briar
dark drum
dark drum
crimson briar
#

Oh, I assumed he was asking about binding - since yeah, calling a dispatcher in a loop seems pointless

dark drum
peak trail
#

i need to call this function 8 times with different parameters

#

so i have to replace all the blue and yellow links with the function parameters to make a giant spider web

#

man this code is so unmaintainable and difficult to comprehend

#

i stopped working on it and trying to decide if i should finish it in blueprint or switch to C++

#

i think this is the complexity limit for blueprints and i should use C++ instead

#

i want to put all the code in GameMode anyways because i dont want the clients fucking with it

full badge
peak trail
#

wallahi

peak trail
#

had a feeling i was going regarded

jade grotto
#

Hi, I am working on a project on Unreal 4.27 with friends. It's UMG Widgets only imagine a visual novel, I am working on a gameplay feature when every button got assigned with a different texture out of 2 at start of each given level. However, it is not working as planned in exe but works in editor. I am using set style nodes and in my primary assets I have some parameters which can tell the game which buttons are which and I am firing it off “event construct”, I can't share much as game is work-in-progress. Thank you in advance

peak trail
#

writing code ❌
docking my yellow and blue spaceships ✅

#

look at all these yellow ships

crimson briar
#

Looks like something I would consider redesigning

peak trail
#

this is peak

#

its doing an insane amount of heavy lifting for how small of a block it is tbh
W blueprints

#

is there a way to instantiate a temporary variable in a blueprint function

#

like a primitive data type that i dont want to register as a variable

#

like a temporary int whose scope is only within that function

frosty heron
#

local variable

peak trail
#

ahh found it

#

thanks

#

i could clean up the code by taking out a few ADD and using temp variables

#

gonna put that one down under "stretch goals"

#

cuz at that point might as well C it all

#

if we're going for turbo optimization

#

maybe next time ill use proper coding standards

frosty heron
#

can't comment without being able to see the nodes at all.

#

from far away there seems to be a lot of repetition.

peak trail
#

yeah i could make 2 more functions and break it all up and refactor it

#

but with less effort i could write it all in C++ even more optimized

frosty heron
#

speed wise probably don't matter.

#

most of the time if you are not copying too much and not doing large loops, it's probably fine in bp.

peak trail
#

im planning on making it more different so ill probably copy and paste the whole thing and then edit little bits

frosty heron
#

I would never do core system in bp though.

peak trail
#

its just lerping stuff around, for me that goes in the GameMode

#

i make the client a controller with buttons only, 0 trust architecture

#

as a former MMO exploiter i know what my players are capable of

frosty heron
#

what are you lerping?

peak trail
#

objects that do game logic when the player BeginOverlaps them

frosty heron
#

need more context to comment.

peak trail
#

its all good

#

for this project im trying to do only blueprint, since normally i do only C++ (even widgets)

frosty heron
#

tbh it doesn't sound like what Game Mode is suppose to do.

#

sounds like it should be handled by the object that gets overlapped.

peak trail
#

well GameMode is server side only and authoritative

#

as a security nerd that makes me happy

frosty heron
#

What difference does it make if you do it on the object?

#

just Switch->HasAuthority.

peak trail
#

player can move it and do what they want with it

frosty heron
#

they can only move it in their own instance.

#

which they can do it either way, even without the code.

#

but it won't matter, as they only move it in their own computer.

#

in other computers, people won't see the same change.

peak trail
#

is OnBeginOverlap executing on server and client in replicated actors?

#

im just thinking if it runs server side only they cant mess with it

frosty heron
#

The overlap event will execute when the overlap event happend.

#

everyone is running their own instance.

peak trail
#

yeah

frosty heron
#

Picture a trigger volume,
In 0.5 second of the game time, Player 3 character overlap with the trigger volume.
Player 3 computer execute the Overlap Event.

0.8 second of the game time, in player 2 Computer, Player 3 character overlap with the trigger volume.
Player 2 computer execute the Overlap Event.

#

if you want the event to just execute on the server instance, then just do OnOverlap->SwitchHasAuthority.

peak trail
#

if im awarding points i want to do it all server side so that the client cant say "hey i just scored 10 million points"

frosty heron
#

Client make request and server validate.

#

Client Request to buy X item.

Server check if the player has enough money (on it's computer), it doesn't give a f how much the client money on their computer (hell the server don't even need to know it).

peak trail
#

yeah so do it all in GameMode

frosty heron
#

no

#

Just make client request and server validate.

#

don't design the game such as,

Hey I am client, and I just bought this item because I have enough money.

Instead

Client request to server with server rpc, passing the item data it wants to buy.

Server check if the client have enough money by checking the money value on it's end.

If client have enough money then server can add item to client inventory which eventually get replicated.

#

Client can hack their instance and change the money to 10 millions and it wouldn't matter.

peak trail
#

what if its like client just harvested rare item

#

what if they just like spam to my server
client harvested rare item
client harvested rare item
client harvested rare item
client harvested rare item

frosty heron
#

don't trust the client for anything you can't predict.

#

that includes haversting and obtaining an item.

mental trellis
#

Don't trust the client for anything*

#

Assume everything is a hack and verify.

peak trail
#

if i can put it in gamemode, it goes in there

#

security through you cant touch it

frosty heron
#

Client press E to grab a rare item -> Tells the server that it WANTS to grab the rare item.
Server Check if the client is within range -> Server check if the item exist -> Add item if all good.

frosty heron
#

Adding item should be written in the inventory component

#

what's game mode got to do with it.

#

Change
"client haversted rare item"
to
"Client: Hey server can I grab this item?"

peak trail
#

yeah so do it in gamemode

frosty heron
#

How? you can't even Server RPC to a game mode

#

do it in the inventory component.

peak trail
#

i do it all the time. what i do is call an RPC within my PlayerController, and my server side playercontroller calls functions in the GameMode

frosty heron
#

but you do you, I tried saying my piece.

peak trail
#

Model View Controller

#

Im not new to this

#

i just dont have experience doing blueprints. ive always done everything in C++

#

if you think doing things server side in GameMode is horrible coding practices, you should see the widgets i write in C++

frosty heron
#

there's no different in regard to this concept, bp or cpp.

peak trail
#

yeah doing something server side instead of client side whenever possible is best practices for multiplayer networked games

frosty heron
#

game mode is responsible for Game Mode related, not adding item and such.

peak trail
#

not just for security reasons, performance too

frosty heron
#

doing something server side doesn't mean doing it on game mode.

#

it just mean, doing it on server instance.

peak trail
#

game mode Tick() is my main game thread

#

thanks for the local variable tip

#

was going crazy looking for it

peak trail
#

i think i make less coding mistakes with blueprint, its got that "it just works" aura

#

in C++ i have to dig through the source code and headers to find the function im looking for, try to call it, crash to desktop, read my crash error messages

crimson briar
#

AI built into the IDE makes it less of a headache to look for something you don't know about. As long as you don't trust it and double check when it is something you didn't use before.
Also I'm not sure if crashes are that much of a problem. These days IDEs are pretty good at catching most mistakes and even have suggestions for good practices.

#

But yeah, BPs are specifically made to be safer than C++

peak trail
#

heres a nice port full of blue boats

#

be a shame if something blew them all up 😈 🇺🇸🦅

#

the humble yellow underseabooten

#

visual aesthetics matter over performance. aesthetics maxxing

#

sure im the only one who will ever see it, but i am god

dark drum
modern horizon
#

quick question, is there a node to check how many times that this said piece of code has been executed in your game? take for example voice lines, once it's been said once or twice, it won't work anymore and will instead say something else

frosty heron
modern horizon
frosty heron
#

everyone is running their own instance, whenever the function is executed on their end just increment the count.

modern horizon
frosty heron
#

Just make a custom event called, PlayVoiceLine and a variable called VoiceLineCount.

#

PlayVoiceLine->PlaySound->VoiceLineCount + 1

#

has nothing to do with networking.

modern horizon
#

okay. thank you.

frosty heron
#

@modern horizon if the sound have significant gameplay consequence, then you have to make the server as the authority.
Meaning, only the count in the server matters. Infact if that's the case, only count on server then replicate that count to everyone.

#

otherwise, there's nothing to network.

left smelt
#

I'm trying to make drums that animate in response to a MIDI file, I have models and everything but I'm having a hard time understanding how to set up the input. Can somebody lend me a hand? I'm basically a beginner with this.

static forum
#

Hey guys, I am having a problem with pcg or actor... or maybe something else I cant tell. there are not supposed to be magical floating trees above the ground. I cant tell what is causing it. I even turned off the instancing for a little bit in the pcg. I have rebooted my pc, I have tried a lot. if someone could help me I would be so happy

peak trail
#

whats the blueprint equivalent of TArray<AActor*>

#

i want to store a bunch of AActor subclasses using a TArray of AActor in blueprint, is this even possible? or should i switch to C++

frosty heron
#

create a variable of type Actor

#

then convert it to array

peak trail
#

ahhh sneaky sneaky

#

thank you very much

#

thats exactly what i was searching for

#

is this the best way to do a random chance mechanic in Blueprint

#

generate random number and do a bunch of Branch

maiden wadi
#

You're generating four random numbers here.

peak trail
#

yeah just 4 outcomes equal chance for this example

maiden wadi
#

No. I mean that you're generating once. Checking if that is ==0. Then generating a new one and checking if that is ==1, etc.

peak trail
#

i dont know what else i would do tbh

maiden wadi
#

Pure nodes run once per connection to an executed node.

frosty heron
#

cache the number

peak trail
#

is it generating 4 separate random numbes? lmao

maiden wadi
#

If you want to generate just one specific number, right click the random int node and show exec pins and hook it up.

peak trail
#

hahahaha

#

store it in a local variable?

marble tusk
#

that works too

maiden wadi
#

Just convert it to an executed node.

peak trail
#

how do i do that

marble tusk
#

If you don't want wires going everywhere then a local variable works, else just adding execution pins via the right click menu is the way to go

frosty heron
#

that's new to me lol.

marble tusk
#

It's worth noting that was added in a somewhat recent engine version, so if you're using an older engine version you might not have that

peak trail
#

dang im on 5.6

#

i think im missing exec pins

#

might as well upgrade to 5.7 then i guess

#

if im missing new tech

marble tusk
#

which version are you on?

peak trail
#

i think 5.6

marble tusk
#

That should have it I believe

peak trail
#

5.6.1

marble tusk
#

Make sure you're right clicking on the node and not one of it's pins

peak trail
frosty heron
marble tusk
#

Actually it might not matter if you click the pins

peak trail
#

do i have a plugin missing

#

oh i made the project using the C++ template dunno if that matters

frosty heron
#

doesn't matter

marble tusk
#

It was added in 5.5, so your engine version is older than that

peak trail
#

thats crazy

marble tusk
#

Go to Help -> About Unreal Editor and it'll tell you the engine version

peak trail
#

5.6.1

marble tusk
#

idk then, you should have it

peak trail
#

is there a shortcut button for breaking a Vector3 into components to grab the X,Y,Z

#

make/break Vector... found it

marble tusk
#

can also right click the pin and split it without a separate node

wicked surge
#

Hello, are these nodes simply casting under the hood?

frosty heron
#

the memory overhead comes from a hard reference (that blue pin) to a blueprint asset.

#

so the casting part doesn't matter.

#

Anyway that thing should return the generic object class.

#

you will have to cast to make it useful.

peak trail
#

i have an actor that does LookAt at PlayerController 0
in a networked game will that be executing on the server or the client

#

because on the client it would be the local player controller, and on the server it wont be

crimson briar
#

Uh. It depends how you call it. Is it via an RPC or just normal code?
And yes, GetPlayerController(index) and similar nodes can't be used reliably in networked game

peak trail
#

i want it to execute on the client only and get their local controller

#

should i tick -> RPC(client) and use that to make sure its client side only

#

or would that be calling over the network every tick lmao

crimson briar
#

Depends if the behavior has to be server authoritative or if it is only for visual stuff

peak trail
#

visual / cosmetic only

#

should be part of the client/controller

#

never server side

#

not sure how to make that happen

crimson briar
#

So no RPCs needed. And index 0 in getplayercontroller on the client should be the client

peak trail
#

its to make a world space widget face the player

#

by calling LookAt Playercontroller0's location

#

not sure if it will Just Work or if i need to change the way its written

#

i just tested it and it works fine

#

i was just overthinking

#

Too Easy

frosty heron
#

@peak trail

GameInstance->GetFirstLocalPlayerController()

To get the local player controller

peak trail
#

my bad i actually did get pawn

#

so on the server it doesnt matter that the output disagrees with the client

crimson briar
#

You could also just pass the controller as Owner when spawning the widget, then access it with GetOwner

crimson briar
peak trail
#

its code in an actor

frosty heron
#

listen server render widget too.

peak trail
#

the widgetcomponent is attached to the actor

frosty heron
#

widget is local, they are not replicated.

peak trail
#

oh okay

#

thanks

frosty heron
#

anyway you don't really want to use the getter with index in mp context.

peak trail
#

i want it to always face the local player

#

local player is zero

frosty heron
#

I would just make a blueprint function library to get the controller

peak trail
#

not sure how else to do it

frosty heron
peak trail
frosty heron
#

e.g client load faster than server during server travel, causing the index to differ. But i never get that far my self to confirm if that's true.

frosty heron
#

that will give yoou the local controller regardless who called it.

peak trail
#

i dont use the server's playercontroller for anything anyways

frosty heron
#

then you can just do this.

peak trail
#

i dont see anything for get local

#

probably because im in Actor and not widget?

frosty heron
peak trail
#

this the only thing i have

frosty heron
#

made my own because i want exposure to BP + I want it to return my controller type.

crimson briar
peak trail
#

💀

#

that library is not on my PC unfortunately

#

ha ha ha

frosty heron
#

No.. you make your own library.

#

DunkeyLibrary : public UBlueprintFunctionLibrary

peak trail
#

lazy programmer here

frosty heron
#

this is the whole code

AAGController* UAGLibrary::GetLocalAGController(const UObject* UWorld)
{
    auto World = GEngine->GetWorldFromContextObject(UWorld, EGetWorldErrorMode::LogAndReturnNull);
    if (auto GameInstance = World->GetGameInstance())
    {
        if (auto AGController = Cast<AAGController>(GameInstance->GetFirstLocalPlayerController()))
        {
            return AGController;
        }
    }
    return nullptr;
}

didnt you said you are more accustomed too cpp than bp.

#

getting local controller is something you need very often.

#

it's gonna save you time making a blueprint pure node rather tahn copy pasting 4 - 5 nodes just to get the controller.

peak trail
#

i like how UE has changing directions mid air (surfing) built in to their player movement. thought i was gonna have to add it

#

newton can hit the orange justice

serene wharf
#

im trying to send some data into a widget that gets put inside a ListView component, but the data is not getting trough for some reason, both the variable "C" and "Player Net User ID" are invalid in the widget they get passed to but not in the widget shown in the picture.

maiden wadi
serene wharf
maiden wadi
#

Listview is fine. But you're just not using it correctly. If you want to do what you're doing now, I'd recommend a DynamicEntryBox. Otherwise you need to have the UserObjectSomething interface on your list view entry widget, and it needs to override the object set function to populate the widget from the data. Then make a simple object class with your net ID and name.

Also on a side note to this, I wouldn't use the PlayerController here. You can gather a list of all players from the GameState's PlayerArray which is an array of PlayerStates. Which has the player's name and their UniqueNetID.

serene wharf
#

by default

maiden wadi
#

Yeah

serene wharf
#

alr, thats good to know

#

i will tryout the things you suggested

#

1 sec

serene wharf
maiden wadi
#

You call... Uhh.. I think it's CreateEntryOfClass?

#

It'll create it and pass it back as a UserWidget, cast it back to your intended class and then call a function to pass your variables to. You can use the same function to set up the widget.

serene wharf
#

so like this?

#

i assume this will work if a player leaves the game aswell, then ill just call the UpdatePlayerList function again

#

or do i need to remove entries or something like that

maiden wadi
#

You'll need to remove the delay. And before the ForLoop call...

#

I think it's Reset? On the DynamicEntryBox

#

Then yeah it'll just refresh if you call it again when a player leaves.

serene wharf
#

it seems like everything works now, thank you so much for the support @maiden wadi

#

😃

dark drum
#

Does anyone know how I can limit the structs that can be added to an instanced struct so that custom structs created via the editor can also be included?

I know I can use the BaseStruct meta tag which I can use if I define a base struct (no properties) in C++ but I'm not aware of any way of creating a child of this via the editor.

maiden wadi
dark drum
placid elbow
#

Any idea on how to use an image/material to hide objects in an 8x8 grid?

maiden wadi
placid elbow
maiden wadi
#

Still not fully following. You're asking how to know which boxes the sine line is passing through?

deft zealot
#

Does anyone know why construction script doesn't actually update my item description variable on my inspectable component as I'd expect it to? It simply does nothing. It's just a simple FText

#

The parent class of this blueprint is a native c++ class, is that the reason?

placid elbow
# maiden wadi Still not fully following. You're asking how to know which boxes the sine line i...

I’ve attached some pictures to help illustrate. Let’s assume we have have 1 row with 5 cubes in it. We also have 1 yellow wave. The wave is a 2D Texture and I want to use it to delete objects that it would touch.

Currently the cubes are in an array [cube1, cube2, cube3, cube4, cube5]

I’m not sure if it’s possible to transpose the texture on top and use its coordinates in a similar array to tell if it would overlay with the cubes.
I.E.

[no hit, hit, hit, hit, no hit]

Which would give us

[cube1, no cube, no cube, no cube, cube5]

half prism
deft zealot
placid elbow
#

The whole goal is to be able to procedurally generate paths using sine waves

half prism
severe coral
#

Hey, because I cant have multiple nodes of the same event in the graph, how do I trigger multiple places in one graph? I want to reset multiple "DoOnce" nodes without creating unique event for each one of them, they are all in the same graph.

faint pasture
#

What are these do onces meant to represent, what do they gate?

severe coral
# faint pasture That's a smell

Yeah I've changed it. It was made to make sure my game phases in game mode are not triggered a second time by mistake untill reset phase, but I deleted it and I'm making sure that when something triggers these phase changes, all checks are made beforehand. It was only "to make sure"

faint pasture
#

Or at least move the bools which represent your state (which are currently living in DoOnce nodes) into your class so it's explicit and you can reset them and query them anywhere

odd kiln
#

Anyone knows how to use "Landscape Blueprint Brush" but with a "heightmap" ?

severe coral
faint pasture
livid flare
#

Hi guys I found an interaction tutorial using interface without casting, and the logic is stored inside a component. I'm a bit confused and also a bit skeptical about the no need casting part, any thoughts?

#

Wondering how is this going to work with multiple actors without hard references, it's because of the use of the component?

#

the trace used is from camera manager so there's no cast to the character

crimson briar
livid flare
#

Thanks @crimson briar dumb question, is the component needed for every actor or this is just a "regular" interface setup where you just use the Actor

crimson briar
#

From the naming I assume the component is only for the actor that starts the interaction - so like your player character or something

#

It is a good way of separating the behavior. Otherwise your character class could get unwieldy with everything written directly into it

livid flare
#

So all the others actors just have a reference to the component not the character?

crimson briar
#

Well it depends. They don't need the reference to the component. Since you use the interface for the interaction - they should only need to implement the interface. Unless you send them the interacting component via the interface function.
But it would still be better than referencing an actor class, since components like this are lightweight and usually don't have heavy assets like textures.

#

Being worried about not creating hard references is fine - but you need to remember what is the reason they are "bad". It is not strictly about the reference itself, but what it entails.

  1. If you bind behavior via a cast, it is hard to expand it. When you add another class that needs to interact, you would need to add another cast.
  2. When casting (or having a variable of this type) in the BP, you include the whole classs with this BP. It can create chains of references that can lead to loading huge assets when they are not needed.
livid flare
#

thanks I kinda get the point, still confused on what I should do to optimize the chains I have inside my BP's but eventually things going to click in 🙂 The tutorial just use a simple open door logic, the fun begins when you need to access others actors variables

#

tempting to use GMS but seems overkill to use for a single game with simple logic

crimson briar
#

Yeah, it is something you need to learn by doing and seeing what happens. Another good way of avoiding asset chains is creating a base class in C++ - only with the skeleton of what the actor is, like params, functions etc but no assets.
Then casting to this C++ class is completely safe.

livid flare
#

yes I heard about that!

crimson briar
#

Another thing though - don't worry about casting to things that are always relevant. Like the game instance etc. SInce they are always in the game it doesn't matter if you cast.

#

Same with the character and it's controller. If they are both tied together anyway, casting doesn't change anything

frosty heron
#

Interface is used when you need to communication on objects that doesn't derive from the same base class.

livid flare
#

yeah I only have like 4 actors with their own logic and they need to communicate between each others, perhaps I can move all the logic inside a game instance

frosty heron
#

casting is a type check, interface isn't a replacement.

#

avoiding casting is fatal, your game will be unmaintainable.

crimson briar
frosty heron
#

Casting is harmless, your issue with memory overhead is a hard reference too BLUEPRINT ASSET.

#

which casting to a blueprint asset prooduce a hard reference to said blueprint asset.

#

so even if you don't cast, and you use interface which return a reference to another blueprint asset, it create depedency all the same.

livid flare
#

thanks @frosty heron I'm just being worried about the size map of the actors that being growing up loading everything

frosty heron
#

your solution is to create a native class.

#

casting and using a hard ref to native class is fine.

#

where having a hard ref too a blueprint asset will load that blueprint object and everything inside it.

livid flare
#

so I need to use the interface to specify the Actor and trying to use Actor to communicate instead of specific class

frosty heron
#

for serious project, I would assume they adhere to strickly no reference to blueprint asset policy.

#

unless the class is always loaded then it doesn't matter.

frosty heron
#

imo learn a bit of C++ just enough to declare class, variables and function.

#

then you can do the rest in bp.

#

Blueprint only project isn;t scaleable.

#

tldr casting to CPP class is fine,
casting to bp asset is not. It will create dependency.

livid flare
#

thanks very tempting to dig into that, and thanks for the pic very informative, I'll stick on my desktop 🙂

frosty heron
#

and many times people use interface, just to return a pointer and snap, they still get the memory overhead all the same.

livid flare
#

that's a bit frustrating when you try to use interfaces and dispatchers and at the end you still have many hard references, the only system that seems to make it possible using BP is with GMS, but I'm gonna study a little C++ as you suggested

frosty heron
#

you don't have to watch, just read the article. The video is 49 mins long and discuss other stuff like nanite.

#

the article demystify youtube bs like avoid casting / don't use tick.

livid flare
frosty heron
#

either they lack the skill or just put something together quickly for views.

#

Lots of tutorial covering inventory for example, didn't even bother with Soft references.

#

so anyone following the guide will end up loading all the items in the game when not all of them are needed.

#

well sometime you just gotta be a victim and learn the hard way, at least that's what happend to me.

#

loading the main menu in my old game = loading the entire game.

#

Hard ref to bp asset everywhere and hard reference in data table.

livid flare
#

Yep looks like the UI part is what made a few developers start using GMS not sure how it is handled in C++

frosty heron
#

what's GMS?

#

I only heard about common UI when it comes to UI

crimson briar
#

I got so annoyed when trying to make my first inventory system that I started making a game with the goal of using as little UI as possible lol

livid flare
#

Gameplay message subsystem used inside Lyra template

frosty heron
#

ohh

livid flare
#

It's worth to give a look 🙂

frosty heron
#

UI job is just to read. Never do a function in the widget.
Normal workflow, UI Constructed -> Listen to the owner -> Respond / construct visual.

e.g UI Constructed -> Bind to health component delegates
OnHpUpdated -> Set Hp Text.

wooden whale
#

Hi I'm making a pinball game does anyone know how I could let a single pointlight jump to any of my hitted bumper actors, I am relatively new to unreal so any help is welcome!

dark drum
# frosty heron tldr casting to CPP class is fine, casting to bp asset is not. It will create de...

As far as i'm aware it still creates a dependency to C++ classes too, the only difference is its not as easy to define an asset type reference in C++. Certainly not by accident as you have to manually load the asset. Its just epic had designed their base classes to not have dependencies on specific assets like static meshes, sound etc...

If you created your own C++ that loaded and used a specific static mesh, casting to it from BP would still cause said asset to remain loaded. The only difference is it wouldn't show in the size map as it only looks at BP based classes.

frosty heron
#

I will test after gym, should be able to see it with obj list class.

#

@dark drum but cpp doesnt contain asset though

#

Unless you hard code the path which is a big no no. That will load the asset as soon as the module is loaded.

dark drum
frosty heron
#

Yeah, but like no one does that 😅

#

Only time its okay is to showcase for a guide.

dark drum
# frosty heron Yeah, but like no one does that 😅

People shouldn't do that, doesn't mean they don't lol. I just get images of memory management hell will someone new and they've just moved all their hard refs to a C++ class, no longer seeing them in the size map and thinking all is golden. 😅

dark drum
wooden whale
#

for the light component

spark steppe
#

C++ classes are loaded in memory always

torn blaze
#

Random question: Is there any event graph in the game that runs before any objects' construction scripts do? Something in GameInstance maybe?

dark drum
torn blaze
#

Basically I want to load assets at runtime. I have at least one BP node that must run, to set things up before any objects try to fetch their XML/models/etc. This is actually fine for deployment because I can just do that in a main menu before a player ever gets into a map, but for testing I'd like to be able to just jump into a test map, which means I need to run the setup functions before any construction scripts. (I guess I could put it all in BeginPlay instead, this is a very new project and I'm still working out lots of the details)

#

just wondering if there's a neat solution like a particular event in GameInstance or similar, where I can put my setup calls and it Just Works(TM)

dark drum
torn blaze
#

I mean "when it needs it" for certain assets will be immediately as soon as the map starts :D The only asset I have this system working for rn is a skybox, and obviously that has to be present from map start, again I could have it load stuff in BeginPlay instead but 1) I like seeing it in the editor as well and 2) idk if there will be issues down the line with that approach.

dark drum
torn blaze
#

There's reasons I'm not sure that would work. For one the "setup" is not just loading of stuff, it's data that I have to give to the plugin from the editor - for example I want mods to be able to customize material instances from XML. That's working rn, but it need to know about the base materials, so I have to send those in first. I could still do lazy loading where an asset just waits asynchronously if the setup isn't done, but that could lead to weird jitter on map start which I'd rather avoid. (And if I'm using BeginPlay for loading, as I said I can just but the setup itself in a construction script and be done with it)

#

Imma sleep on this and probably just end up using BeginPlay, I was just wondering if there was an obvious solution I wasn't aware of

pure gyro
dark drum
torn blaze
#

I'll look into game state, thx :)

livid flare
#

It is possible to make this line trace to point forward? It's for first person character and I'm trying to make it works for a third person character

#

with this setup it's pointing in the opposite direction

dire drum
#

Hello everyone, I'm designing a dodge roll and have all the directional animations for it. Is it better to implement it with a blendspace or using logic to calculate direction?

dark drum
tidal kayak
#

can anyone help me to merge https://www.fab.com/listings/24b6fe9d-4e27-4703-8452-b993980c57bc this project with gasp or als?

Fab.com

Resident Horror V1 Horror Template System (Unreal Engine)🎮 Example Level map includedComplete modular horror system focused on immersion and gameplay flexibility.NEW UPDATE V1.5Ai ZombieSave And Load SystemMusic Ambient/Combat SystemNew Level Blockout Map--------------------------------------------------------------------------🎬 Showcase...

livid flare
dark drum
livid flare
cunning vapor
#

anyone know much about flipbooks jumping on the Yaxis ? Thanks in advance!

crimson briar
#

I have no input, but that is... an unfortunate texture for the torso and arms. It looked like something different at first glance lol

peak trail
#

(my usefulness in life)

cunning vapor
peak trail
#

blueprint ❌
Kismet2 ✅

hollow folio
#

And I'm not sure if it's the better or the worse timeline

pine carbon
#

Yo. So about the "stop all montages" toggle. That wouldn't happen to affect instances of the montage running in another actor, would it?

jagged thistle
#

You can do some tricks if you want to blend different things in the same material. If you have a mask/value for each type.

lilac mountain
#

Does anyone know why this wont update the hot bar image? the item is added to my inventory but the hotbar image refuses to update even though the event finishes out and deletes the item.

crimson briar
#

Also set brush is not connected

lilac mountain
# crimson briar Also set brush is not connected

oop I had deleted it and tried something else and forgot to hook it back up. whats the best way to get an updatable widget reference? should I just readd it to my viewport? sorry if this seems like a really basic question

#

Readding the widget to the viewport after it updated did work though thank you for catching that for me

half prism
steady night
#

hmm my NPC´s using cmc is destroying my FPS, im on quite a heavy computer and with 25-30 npc im below 40 fps

#

any advice :/ ?

stable birch
#

Scale tick rate by view-distance, you can check out SignificanceManager

cyan jungle
#

In this case, my inventory manager calls OnInventoryChanged whenever a player picks up an item, which will then get a list of child widgets in a container and update their values with the new data.

#

Doing it this way does require a hard reference to your inventory component though. It should be fine in that case, but other use-cases where you may not have a component loaded may not work.

#

Another thing you could try is Send Gameplay Event To Actor but this is probably way too convoluted just to avoid hard refs.

#

On that note, I should definitely rename that CreateEvent function to something else so I don't mix up the two.

lilac mountain
#

Okay perfect. I started doing some research and taking notes on interfaces and event dispatchers so I’ll keep on this when I can work again

#

Thank you so much for the example

cyan jungle
#

You're welcome!

placid elbow
#

Any idea on why a negative value isn't returned when using get?

faint pasture
raw spindle
#

i have a spotlight attached to my pawn. it projects light forward as expected, but it also projects back into the cockpit for some reason. anyone have any ideas?

#

nevermind, i had a rogue extra one attached that was buried

eager thicket
#

Anyone know how do i get the controller class used by the project / level?

dark drum
eager thicket
dark drum
# eager thicket no the controller class

If you're referring to the player controller class, it will be the one set in the game mode. If one isn't specified, it'll use the default player controller class.

Beyond that I don't know what you're referring too.

eager thicket
dark drum
dry summit
#

Hello all,

Im looking for some direction on how I should approach dynamically adjusting my mesh during runtime. Apologies if my terminology is incorrect but I want to be able to rotate the head and spine bones based on my movement direction and also adjust the Z of my pelvis down based on how hard my player lands and have it interp back to normal. For example, If I open my control rig and adjust the body ctrl Z down, my player crouches and the feet stay on ground. I can rotate and all that like the control rig is supposed to do, but I want to be able to adjust this dynamically when I'm playing. I'm not really asking how to do all this, I'm looking for which method/system to use so I can focus on learning it.

Is this something I'd do in my control rig, Animation bp, physics control component, transform (modify) bone, procedural animation, physics animation component, my player bp, etc.. I'm just a little overwhelmed and not sure where this should be done. I feel like its a control rig thing but looking for some clarification. Thank you!

dark drum
short reef
#

Is there a way to get an arbitrary asset via name using a string?

bronze grotto
#

Asset registry

dark drum
short reef
#

For reference, I'm trying to get an audio file asset path and name and then use that to get an associated lipsync file which already has an automatically-generated suffix

dark drum
short reef
#

This is where I'm at currently but the cast doesn't work, so something's gone wrong

#

The path and name output seem to be correct

dark drum
short reef
dark drum
short reef
#

Okay, yeah, doesn't look like it's actually valid

dark drum
short reef
dark drum
#

Below is the structure of a soft ref. (from one of my projects)

/Game/Blueprints/Compounds/Active/001_PrimeMatter/C_BerylliumCarbide.C_BerylliumCarbide

From this, I would assume your path would need to be:
/Game/StoryFlow/Audio/C_voiceaudio_estella_estella_valeriaconvo_1_1_LipSyncSequence.C_voiceaudio_estella_estella_valeriaconvo_1_1_LipSyncSequence

The asset name is normally prefixed with C_ then at the end it normally repeats the name (with prefix) after a . (dot) If you find the asset in the content browser, right click and hover over the 'Copy Object Path' to see the format its looking for.

short reef
#

Okay, from looking at the copied object path, the format I actually needed to use for the string was "{Path}/{Name}_LipSyncSequence.{Name}_LipSyncSequence"

#

Which seems to work!

#

Thanks!

dark drum
lilac mountain
#

How would I use an event dispatcher from an inventory component on a widget if I cant add a component to a widget? I tried making a variable of the inventory component on the widgets creation in my player but cant bind the event.

dawn gazelle
lilac mountain
steady night
#

hi i need help on NPC with CMC how to optimize, even now with 10-20 npc im getting big fps drops :/

lilac mountain
#

I though I was doing this right but I cant bind it in the hud

maiden wadi
lilac mountain
maiden wadi
#

InventoryComponent

lilac mountain
#

woulda ya look at that

#

I didnt know you could store components as variables thank you

maiden wadi
#

It's still owned by the actor. You didn't give it to the widget or anything. The widget just has it's phone number to contact it essentially.

maiden wadi
#

Can usually see CMC stuff early in the frame.

lilac mountain
#

Im making my first inventory and i got so stumped I went back to taking notes on how everything works lol

steady night
steady night
#

sure some anims at work but they aint doing nothing :/

maiden wadi
#

Yeah. But it's a wild guess without an insights frame or two to see what's taking time.

#

Might not even be CMC. Might be the animations, might be some random tick function you didn't even realize to check. 🤷‍♂️

steady night
#

yeah, but this is greek to me >.< so hard to locate

maiden wadi
#

Zoom in on one of these.

steady night
#

wrong frame

#

sec

maiden wadi
#

Hmm. Can you upload that trace?

steady night
#

record another ?

maiden wadi
#

So I can download and look at it I mean.

steady night
#

ofc

maiden wadi
#

CMC is costing you almost nothing.

steady night
#

oh thats nice! atleast we narroving it..

#

hmm ok so something anim related

chilly canyon
#

What would be the most appropriate way to attach an actor with multiple parts (meshes) and own logic to my already existing vehicle?
Child actor seems like exactly something I'd need but they are apparently not recommended anywhere I look
If not child actor then what are my options when I need my vehicle to have swappable "components" made up of multiple meshes contained within them?

maiden wadi
maiden wadi
chilly canyon
maiden wadi
#

It's the same thing that CAC does. But it won't get you serialization issues cause it's all runtime. CAC has problems where when you have a CAC on an actor and you save that actor into the map, like placing the vehicle on the map. The CAC can bug out.

#

Just a little extra handling on your end.

steady night
maiden wadi
steady night
#

i spawned 100x orcs*

#

oh cloth

maiden wadi
#

Orc body is causing a ton of overlap updates from movement.

steady night
#

hmm

steady night
maiden wadi
#

No idea. 😄 I'm not an animation person. It's one of my weak spots still. But what I do know is that for numbers like this, you usually don't use modular styled things like this. And you tend to do more optimized texture based animations and whatnot.

steady night
#

ha gotcha, but meaning what xD

#

i mean based on that you could atleast confirm something is "wrong" rather then just costly right ?

lilac mountain
#

Okay so I think im pretty close to getting my dispatcher to work but Im almost positive im not calling it right and im stumped on how to do it.

dawn gazelle
lilac mountain
#

Is my inventory component trying to call to itself? Do I need to set a reference to the HUD in my inventory?

dawn gazelle
# lilac mountain Okay so I think im pretty close to getting my dispatcher to work but Im almost p...

You want to keep your widgets separate from your game code. The widget can know about the inventory component, but the inventory component shouldn't be communicating directly to the widget.

The event dispatcher should exist in the inventory component. The widget when given a reference to the inventory component can bind to its event dispatcher to then update itself when things change on the component.

#

so change goes through on the inventory component, on the inventory component you call your dispatcher.

In your widget's on construct, it can read the current values from the inventory component, and bind to the event dispatcher.

lilac mountain
#

So I shouldnt be trying to send those inputs through the dispatcher?

dawn gazelle
#

Nothing wrong with sending inputs if you want

#

But, you don't necessarily need to send all the data like you are either.... If you're giving the index of the inventory that changed, that should be enough that the widget can read the array as it needs to.

#

Also, having your inventory contain static data about the items is usually not a great idea as you're just using up memory for no reason, and making it much harder to actually manipulate the contents of your inventory.

All that should be required is some means of identifying what specific item is in the inventory, the quantity if you want a stack, and then looking up the data about that item as needed (like its mesh, name, type, etc.) as that information is unlikely to change at all during the course of gameplay.

Using a data table for example, would allow you to reference an item by a Name, simplifying what your inventory structure contains, namely a Name variable and a quantity. You would use the name to look up teh data about the item in the data table. An alternative would be to use data assets that allow you to define your items as assets which also allows you to use hierarchy (ie. not all items may need a "damage" field, but "Weapon" type items would) and then your inventory structure becomes an "item" reference and an integer for the quantity stored in that slot.

lilac mountain
#

This is how Ive got it set up now and its still not updating the sprite and returning an error on close now. "Blueprint Runtime Error: "Accessed None trying to read (real) property InventoryComponent in PlayerHUD_C". Node: Bind Event to Update Hotbar HUD Graph: EventGraph Function: Execute Ubergraph Player HUD Blueprint: PlayerHUD"

marble tusk
#

How are you getting the reference to the inventory component inside the player HUD?

maiden wadi
# lilac mountain

Make the InventoryComponent in the Widget an ExposeOnSpawn and InstanceEditable. Then come back up here where I tagged and refresh the CreateWidget, it'll have the InventoryComponent input on it. Pass it in there isntead of setting it after AddToViewport.

lilac mountain
#

Dude thank you so much

marble tusk
lilac mountain
#

Yall have been such good help w everything im starting to understand all of this a lot better now

#

hopin I get good enough at this to start answering questions and pay it back

#

a little ways to go tho lol

severe coral
#

Hey, is it possible to skip unpinned parameters in a function? I want to create a setter function and wanted to use "categories" instead of setting each variable separately, just for convenience, but I wish I could override only the variables that are wired in the function input, instead of getting the main settings and then overriding only the one I want to set

marble tusk
#

Maybe if you set the default values of the input pins to something you'd never set them to. Then you could do a sequence with branches where it checks if the input equals the default and only sets it if not

peak trail
#

behold

#

literal naval blockade of my blueprint

#

look at all those blue boats

#

the yellow ones are mines

dark drum
# peak trail

It looks like there's a lot of repetition there. What's the bulk of it?

crimson briar
#

I think people explained it to him before. He just wants to make bad blueprints I guess

dark drum
#

The last function i worked on...

peak trail
#

its calling a function with a bunch of different inputs

#

what do you want me to put them all in an array so theres less blueprints?

#

some of them have different parameters the function has floats as inputs so i can tune each stage

#

stay in your lane noobs

dark drum
peak trail
#

im a C programmer i normally dont use blueprints at all

peak trail
#

its sick though it works great. just had 1 bug where i forgot to plug in a float

#

honestly enjoy not hitting nullptr crashes and having to wait for rebuild/reload of UE editor

dark drum
dark drum
peak trail
#

i have my code from late 2000s its funny how back then i thought it was so epic and now reading it im like i was a script kiddie

#

blueprint corruptions are the worst bugs ive ever experienced i dont wish it upon anyone and i think the design having hot reload enabled by default without explaining how wrong its going to go is bad product design

#

"give the user enough rope to hang themself" hot reload is like juggling short barrel shotguns

#

its sick how smooth this animation and gameplay is. if i asked 100 people to write the same thing they would all come up with different solutions. but i think mine is top tier

dark drum
peak trail
#

C++ is not a hot reload language

#

theres so many circumstances where hot reaload will corrupt the shit out of your blueprints and it doesnt warn you, theres no forwarning at all, and when it happens its so hard to figure out whats wrong and why

#

its just there for marketing purposes

#

otherwise Unity would be all like "look we have hot reload and they dont"

#

C++ and blueprints hot reload is designed to make you get frustrated and quit

#

All the people i work with are non coders and cant work with people who use C so im transitioning

#

honestly blueprints are so effing easy having done the API from the command line

crimson briar
#

Are you talking about the literal Hot Reload, or about Live Coding as well? Because those are different things in UE

peak trail
#

Live Coding is what i meant

#

hot reload 2 electric bogaloo

#

twice the headache

#

disable Live Coding and boom youve got Hot Reload

crimson briar
#

So I strongly disagree. Live coding works great as long as you follow some basic rules

peak trail
#

how much revenue have you made from publishing

crimson briar
#

Like restarting after header changes

crimson briar
maiden wadi
#

Livecoding without reinstancing turned on works just fine for any virtual additions, or changing the body of a function in a .cpp file.

peak trail
#

to talk down to me and call me a bad coder you have to be above me

#

fyi

#

dollars and cents is what matters at the end of the day, no matter how you build it

maiden wadi
#

No one was talking down to you. O.o

peak trail
#

earlier

crimson briar
peak trail
#

my money look bad too

#

wallet wont even fold

fiery swallow
#

get a load of this guy

peak trail
#

im bad like michael jackson

#

im bad like LL Cool J

#

momma said im the baddest tbh

#

maybe ill register my studio as Bad Games LLC

leaden ruin
#

quick question, I know how to make a lever pull interact with a door, but if I want to have multiple lever-door pairs how do I make it so one lever doesnt open all doors, or all doors are opened by one lever? how do I pair them

#

or even better, make levers be able to trigger multiple things

dark drum
# leaden ruin quick question, I know how to make a lever pull interact with a door, but if I w...

Add a array property of type 'Actor' called 'Targets' to your level. Set the property to 'Instance Editable'. When a level is placed in a level, you'll be able to add actors to the array that are also in the level. This would be the things you want the level to interact with.

On you're level, when it's interacted with by the player, loop through the array and call the relevant function. (Most likely an interact interface event)

leaden ruin
#

also, where should I store the array? just in my character? or does it not matter too much

dark drum
leaden ruin
dark drum
leaden ruin
#

ahh ok makes sense thank you

hexed inlet
#

Hi guys. See the default scene root icon there in the middle? of the viewport? How do I make it invisible?

crimson briar
#

In level it is G - switches to game view, with no editor icons. Not sure if it is the same in other viewports

hexed inlet
#

Yeah AI came back to me with G too, but doesn't work in the viewport it seems

worldly dew
#

Hello lads, is there anyone with mutable plugin experience? I'm trying to use the remove mesh blocks node, but since my character has multiple udims, the part I want to remove is outside the allowed grid, and I can't find any way to move it elsewhere. As far as you know, is this maybe due to wrong unwrapping process, or is it a limitation on mutable we have to live with?

hexed inlet
#

There we go. Select the top-most object in the components list and find Editor Billboard Scale

#

Googling like it's 2025.

dark drum
#

Is there not anyway to convert a soft object ref into another type without having to load it first? I've got an array of asset ID's that is a type of data asset and the function I have takes that specific type.

dawn gazelle
dark drum
spark steppe
flat coral
#

This is kind of a fun one... Given an ActorComponent, how can I get a random (but stable) color? IE the same component will always get the same color every time it's run

flat coral
#

That exact same instance. The goal here is I've got a level-wide effect which acts on all physics-enabled components every single frame and I'm seeing some weird behavior I can't explain. So I'm drawing debug text for EVERY such component, which is obviously going to get pretty noisy. So, to maintain some semblance of sanity, I'm color-coding it by components so I know which lines and text go together

#

I know i can do it easily by saving a map of components to colors, and I know there's hash functions in C++ that could do it, but I can't find a good zero-storage solution in BP

maiden wadi
#

Since it's just debug, turn the object's path name into a seed and use that to randomize the color.

#

Pathname is always stable for an object it's World.Grandparent.Parent.Object, so it won't change in a playthrough.

flat coral
maiden wadi
#

Correct. As long as you save and reuse the same stream. But if you create the stream each time from the same seed, you get the same result.

flat coral
#

RIGHT ok that makes sense, how do I map the path name to an int seed though? That's what that C++ hash function was gonna do for me

maiden wadi
#

How many objects are we talking about?

flat coral
#

Few hundred?

maiden wadi
# flat coral Few hundred?

I'm hitting a wall with this. Can't actually find a way to correctly convert the string to an integer or hash it. BP doesn't seem to have any functions for it.

flat coral
#

I'll just save the map who cares its debug

maiden wadi
#

Soo... Yeah I'd either go C++. Or make some map somewhere of Object/RandomInteger

#

Or the color instead of integer. Either way.

flat coral
#

Final result: Pretty.

#

Also it annoying doesn't help solving the bug. Damn. You can see the path of that one object that zoops upward despite every single force line going to the right, like they should. What moves you upwards, you silly thing?

dusky laurel
flat coral
dusky laurel
#

are you trying to turn four into 4?

flat coral
dusky laurel
#

would something like this work?

dark drum
odd kiln
#

Hi all ! Is it possible to teleport the Player into a whole new level (from an Open World map with World Partition) seamlessly ?

#

I mean without loading screen / lags ?

dark drum
odd kiln
#

I don't know if it's better to teleport my Player to a whole new Level or just moving his Location in the actual Open World map and just hide my "Portal Level" in this OW map. Any tips ?

lusty hedge
#

Any idea why this might be happening?
spawns in but the information doesn't transfer correctly
specifically the Tree resource data struct
Can i just not pass a struct within a struct?

last peak
lusty hedge
#

it is simply a bunch of print strings

last peak
#

What happens if you hook up the Tree resource data struct to a print string

lusty hedge
#

prints the contents of the struct, and the struct inside the struct

#

ill show u the prints

#

the bottom prints the input. the top prints the output

#

this shows that the struct data passes through, excluding the Tree resource data struct.

last peak
#

Now i need to see how the macro looks like

lusty hedge
#

The Wetness comes up as "dry" because its an enum and thats the default value

#

okay

frosty heron
#

Look if you do any setter inside the actor you spawn

lusty hedge
#

bare with my i can clean this up if u like

lusty hedge
last peak
#

Structs are so annoying to work with

lusty hedge
#

they seem really great to me until now

#

it makes it so organized

#

but this bug may change my mind

#

im new

last peak
#

They are cheaper than other datatypes but you cant modify them on runtime without breaking them and accessing them is really annoying
U objects are way nicer to work with but anyways

frosty heron
#

I never come accross the "bug". May be node on your end.

lusty hedge
#

All of these are printed.

frosty heron
#

Struct cab be modify on runtime with no issue.

#

Accessing is easy too.

last peak
frosty heron
#

If you dont use struct you are cooked.

last peak
#

Not with blueprint structs

lusty hedge
#

im not really doing anything special. its a single struct exposed on spawn

#

thats it

frosty heron
#

You can still mutate the struct at run time.

lusty hedge
#

and it doesnt set

last peak
frosty heron
#

Maybe you mean dont change the order or add or remove in editor?

#

Mutating the struct it self at run time is no issue.

lusty hedge
#

thats all thats happening

#

goes in one end. doesnt come out the other

next hollow
#

What there saying, in a very weird way?

Is, the actor your spawning messing with the variable?
Like, if you do a search for that var name, inside the spawned actor.
Do you edit it at all?
Set, or set members

marble tusk
#

Does the actor you're spawning do anything on begin play? idk if that would run before or after trying to read it here

lusty hedge
last peak
#

So basically these 3 get reset for whatever reason ?