#blueprint

1 messages · Page 231 of 1

maiden wadi
#

Realistically though. few dozen. Lets say...50? At a rate of fire of 1100 rpm. That's 18ish bullets per second. If you assume 2 seconds for your longest lifetime. That's up to 1800 bullets. Which is at the very least 3600 scene component transform updates with a collision and particle component. I can't say on modern hardware, but you'll have a lot of trouble on a console with that if it hit that target high.

silk dirge
#

i'm a bit unsure about how to proceed

leaden mica
# maiden wadi

I have forgotten how to use unreal. What's wrong with the picture?

maiden wadi
#

An Actor only moves once per frame as is. It is swept in a straight line from a to b in that frame. So you just have a ton of straight little lines over time. You can do the same thing with traces by simply tracing along it's velocity path each frame instead and making a single particle system to manage multiple bullets. So you have no scene component updates.

maiden wadi
silk dirge
hollow flower
#

hi how do i add those dots between the blueprints lines

maiden wadi
# silk dirge and I take this is more performance friendly than an actor, interesting

It's partially about the scene component transform updates. They cost way too much. For example a normal projectile usually has at least three things. simplified collision sphere, a visual mesh and some stream particle system.

You move that actor, you move three things. All of which triggers some bounds updates, the actual movement of the three, and some other code, overlap and hit code for the root component, etc etc. The trace simply queries and returns the data. How expensive it is after that is up to your checks you perform and damage application code.

maiden wadi
hollow flower
# maiden wadi

thanks exactly what i needed btw im completely new to blueprints i have to ask bot to help me create serten stuff bc humans some times cant and theres no way im going to c++ thats so anoing il never learn that

maiden wadi
#

Never say never. 😄 You'll find the wall that drives you to C++ at some point.

dark drum
# silk dirge and I take this is more performance friendly than an actor, interesting

Ghislain Girardot recently uploaded a video explaining pooling. Definitely worth a watch. He's more of an artist but explains how you can instead use just data and use a particle to display the data. (as BP aproach)

https://youtu.be/XYPYfs-EMiw?si=B8hYgWFXrd32HgdW

Files are available as a Tier 1 reward on my Patreon: https://www.patreon.com/GhislainGir
X: https://x.com/GhislainGir
Mastodon: @GhislainGir@mastodon.gamedev.place

0:00 Intro
2:57 Object Pooling
6:51 Data-Oriented Design
9:43 Niagara Projectiles
12:12 Niagara Impacts
13:22 Outro

Hey! Quick video to mention different methods, all widely used i...

▶ Play video
maiden wadi
#

Ghislain is fantastic.

hollow flower
dark drum
silk dirge
#

thank you

hollow flower
#

btw im trying to make blocky world generator

maiden wadi
#

The main issue is simply numbers though. If you have a need for a ton of them at once, actors will hit a performance wall a lot faster than traces will.

dark drum
maiden wadi
dark drum
dark drum
silk dirge
#

would making a working system in BP and then remaking it in C++ later down the line be feasible approach?

hollow flower
maiden wadi
dark drum
maiden wadi
#

Realistically. If you want simplicity and don't mind the cost. Just install VS normally for the toolchains, and then buy and install Rider. I used vanilla VS for a few months before trying to rider thing. Bought it right after and never reconsidered. Makes life easy.

dark drum
maiden wadi
#

Yeah. 😄 I do get that. IMO I would stick to struct declarations and BPLibraries in VS for now if you want. And like I said, ignore the Error List thing. Only errors that matter are the compilers output.

hollow flower
silk dirge
#

and I know using C++ for base classes is more performance friendly

#

but I really loathe C++ and would like to remake the system in BP, and later down if it seems to be harming performance I'd want to move it to C++

#

is such an approach feasible ? or should I write it in C++ from the start?

maiden wadi
#

Converting BP code to C++ is fairly painless.

dark drum
#

Does anyone know if there's a way to get all child gameplay tags of a parent tag?

maiden wadi
#

Mostly just adding a new parent class and reparenting the BP, then moving the BP logic.

maiden wadi
dark drum
maiden wadi
#

The manager has some stuff, but it's C++ only. Not sure how accessible it is. But it doesn't look editor only.

dark drum
#

I didn't know this existed. How do you add a gameplay tag to an actor? Or is this one of those, only useful if using C++ lol.

#

Yea it looks like it uses the gameplay tag interface which you can't add to BP's. :/

narrow sentinel
#

out of interest I want to use Behaviour Tree for a kind of dialogue system however I'm wondering the best way to do it. Is there a way I can spawn a AI Controller derived class on the fly ?? I know theres the spawn actor from class but if I do that do I still need to set the variables on it like location, rotation etc

#

?

dark drum
narrow sentinel
narrow sentinel
#

fairs so it'll be spawn actor then

#

guessing I can leave it's spawn location to 0,0,0

maiden wadi
#

Or whatever it was. I think that was the name?

narrow sentinel
#

I'm locked to UE 4.26

#

so it would need to be something avalible within 4.26

maiden wadi
#

Oof

shrewd tiger
#

Hi guys. So I need to add an Actor component to a certain actor and then set its transform - why is the Set World transform node not taking this..?

#

I did this before with a static mesh component

#

kinda like this

#

but why can't I do the same with an Actor Component?

dark drum
dark drum
shrewd tiger
#

child of scene component

#

I don't understand this

#

That thing that I'm adding it to is a pawn that exists in the world - does that mean it is a child of scene component?

dark drum
# shrewd tiger > child of scene component

All these are actor components, scene component is a child of actor component that adds specific logic for it to exist in the world at a specific location. Unless the component is a child of scene component it won't physically exist in the world.

fiery moon
#

I think there is another question here, since he wants to set a relative transform, what exactly is there being transformed? I assume he has some kind of visual component as well, otherwise what is the point of his relative tranform?

leaden mica
#

and connect finished to it?

shrewd tiger
#

It's a mesh

#

I fixed it anyway by using a static mesh instead

fiery moon
# shrewd tiger Well yes

If the actor component itself is already a scene component then he should just cast it to scene component

shrewd tiger
#

Yeah

dark drum
fiery moon
#

Even better =p

shrewd tiger
dark drum
shrewd tiger
#

Anyway I fixed it alr

#

I just used static mesh components

maiden wadi
silk dirge
#

what is a good asset for interactable grass/foliage?

gentle urchin
#

You cant? I thought you could ?

dark drum
lone folio
#

what is the overhead of blueprints compared to native code? if performance is critical do you use them at all?

gentle urchin
narrow sentinel
#

Anyone know whats happening here ? The EQS for some reason is returning some valid point closer to the camera

#

thats what it should be doing

dark drum
narrow sentinel
#

so tracing from the testing pawn to the testing player actor which are blocked by a wall

maiden wadi
#

Intended hardware, what is the code in question doing? Etc etc.

granite frost
#

I remember once seeing a type of unreal component that was used to store data in the form of a table which can be directly accessed by anywhere in the blueprint. But I forgot what its called can anyone tell me?

#

Nvm I found out its called data table

#

How do I create a readme inthe content browser?

dry sleet
#

It's not sensible to fully avoid Blueprint, but if performance is critical it can be good to try to move code into native by creating specialised nodes which reduce the node connections.

#

You can either create a native parent class, or use static BP libraries for that.

#

This (https://youtu.be/VMZftEVDuCE) is one of the gold standard explanations for BP/C++. It's well worth the watch, I think almost everyone will agree. If you haven't seen it I recommend watching it.

#

Note: He talks a bit about Blueprint Nativisation in this video, which you can disregard -- it's not a thing anymore.

lone folio
#

ty for the info. mostly want to avoid cpu bottlenecking which is a common issue in many games, though seems less so in UE (depending on the game)

spark steppe
#

never seen the video before, and damn that's one good made video

dry sleet
spark steppe
#

yea, skipped over the examples, and that's a solid 10/10 video, great presentation and no voodoo/urban legends stuff 😄

silk dirge
#

How expensive are line traces?

#

Would creating a bullet drop off system by creating repeatable line traces for small distances and update a position vector be performance heavy?

mental trellis
#

They aren't.

#

Of course it all depends on context.

#

Are there 5 bullets doing that? 1000? 600000?

remote meteor
#

might as well use PredictProjectilePath to do it?

silk dirge
#

Is there such a thing

#

Okay that might be useful

granite frost
#

what is the most basic data type that can store any type of mesh? whether static, skeletal etc?

remote meteor
#

UStreamableRenderAsset, but i dont think you can use it. Use UObject and cast accordingly to determine

granite frost
#

Is there any already build name parameter that I could set? Or do I need to make one?

obtuse kiln
#

So, I'm thinking I need to move all my ability logic off my character blueprint now, while things are still early, since there's going to be a lot of it that gets traded out, equipping spells and whatnot, and doing it later will be a nightmare.

What're the arguments for actor components vs actors vs something else for each ability? I'm not sure how much of a practical wall stuff like a component not being able to add a timeline actually creates; are there easy ways to get whatever functionality I might need, or would it be less of a hassle if I just go with actors if I'm not sure what all I'll need for all of the character abilities?

maiden wadi
obtuse kiln
#

When I've asked before, the answer was always that I was going to create a lot of problems for myself to little benefit setting up and using GAS without any CPP knowledge.

maiden wadi
#

Lol, of course it was.

#

Anyone who has said that hasn't actually used GAS. You can use it just fine in BPOnly, except that you miss out on Attributes. And while they are fantastic to have and use and I do recommend them too, you don't need them specifically.

#

Cues, Abilities, Effects, all work fine in BP Only.

obtuse kiln
#

Might as well give it a try, then.

gaunt stirrup
#

can anyone help me on maybe why my character is white in unlit mode

#

(metahuman)

#

pls

maiden wadi
#

Why does it matter unless you're shipping a game without lights?

gaunt stirrup
#

its just that it was fine before

#

it doesnt matter i suppose but its just weird to me lol

maiden wadi
#

If it looks fine with lit mode. 🤷‍♂️

steady night
#

is any of these values alarming to you ?

maiden wadi
#

All of them. O.o

steady night
#

what really :/

#

well explains why my game only runs in 20 fps :/

maiden wadi
#

I would do a quick insights profile IMO. That tick cost is wild. And you have waaaaay too many characters moving around unoptimized.

steady night
#

hm :_/

#

insight is so hard :/....

#

the characters arent even moving :/

spark steppe
#

you better get used to insight tho

steady night
#

well true...

#

you got any starter tutorial on insight that u recoment ?

spark steppe
#

this is your only tool to find bottlenecks

#

and it's a pretty good tool

#

no

maiden wadi
steady night
#

not running in PIE ? is that big difference ?

spark steppe
#

doesn't matter

#

if you have bottlenecks they will show up in either

maiden wadi
#

You can do it that way too, but if you don't close editor after you'll end up with some massive profiles.

spark steppe
#

you can start/stop the profile in the bottom right of the editor

maiden wadi
#

There was some start/stop commands though too, can't remember them right now.

spark steppe
maiden wadi
#

Oh, hell

#

I didn't even know that was there til now. Thanks Ben. 😄

spark steppe
#

that also launches insight

steady night
#

ah ok ill check :/

maiden wadi
#

You have to be careful of things like this in editor though. Allll of this except like 0.15ms is editor.

muted crypt
#

Is there a way to search through all blueprints for the print string node?

maiden wadi
#

FindInBlueprints

steady night
#

yeah but for instance

maiden wadi
spark steppe
#

search in any blueprint for usage of print string, then click the binoccular to search in all BPs

steady night
#

its all red in the timeline really

#

but seems like "frame/Waitfortasks" is massivly using Ms

#

and fEngineLoop

spark steppe
#

you should scroll in on a problematic frame

muted crypt
spark steppe
#

keep in mind that launching, etc. produces spikes, they are irrelevant

steady night
#

yeah thats fine

maiden wadi
#

Pick a normal frame in this case, since it's a consistent issue.

#

Like one of these

steady night
#

shouldent i look on the "broken frames" (red ones)

#

why look on the ones that runs "fairly ok" ?

spark steppe
#

depens™️

maiden wadi
#

No, you have an every frame problem. You're not looking for frame spikes, you're looking for something happening on all frames. Frame spikes have other shit happening besides the normal.

steady night
#

ah good point

#

ok so it seems the wait for tasks / feningeloopss/frame are the ones still super high ms

#

right

#

how do i narrow down the chokepoint

maiden wadi
#

You should see something like this on your game thread.

steady night
#

thats what im seeing on my screenshot also right or what am i missing

maiden wadi
#

Zoom in to some of those. Like...

#

You can see this is all CMC stuff

#

More after that and you'll see mesh updates.

steady night
#

like if i zoom on the loop tick

maiden wadi
#

That all looks fine. The landscape stuff looks painful. What's after landscape?

steady night
#

but how do u se its the landscape :/ ?

shadow apex
#

Hello so i have made a real time gizmo for playing in editor and i wanted to ask that, as you can see while changing the gizmo with the mesh the gizmo also changes but i want that after a change is made and as soon as i release the mouse button the gizmo should go back to its original position without affecting the mesh transform

spark steppe
#

there's 30ms tick time

#

check the biggest chunk first

#

4.2ms wont be the biggest chunk either (even tho, it's quite a lot of time...)

maiden wadi
#

I'm assume the biggest will be slate. Editor profiled.

steady night
#

yeah exactly im zooming in on the 30 ms right ?=

spark steppe
#

you have to check the whole block which takes 30ms

#

what's below which takes the most time?

proud bridge
#

hey Do i need to initialise this on every level beginplay?

steady night
#

waitingforTasks

#

takes loads everywhere

spark steppe
#

so it's most likely gpu bottleneck

maiden wadi
spark steppe
#

unless you do a lot of async stuff

steady night
#

and the "fEngineLoop is 27 ms

#

those 2 are huge rest is low really

proud bridge
maiden wadi
#

No. But I also don't know what you're doing with it.

#

GameUserSettings exists long before a level does. And persists level loads. So if you set a setting, it will stay the same through all levels. If you get a setting and set a cached value to it in one level, the next level will not have that cached value.

proud bridge
maiden wadi
#

If you call SaveSettings or whatever it is after the user changes something, then these will persist all levels and even persist after the user has closed the game and restarted it. They're saved to an ini file.

proud bridge
#

understood

steady night
#

is it possible to send this profile file that really small and you could look at it and explain what you think is the bad stuff or :/ ?

maiden wadi
#

Sure. But before you do, try this.

#

Open a PIE instance. Start profile. Minimize all other editor windows except the PIE one. Play for a few seconds. Then stop the profile.

proud bridge
maiden wadi
#

Minimizing the other windows stops it from profiling a ton of editor slate.

maiden wadi
proud bridge
steady night
maiden wadi
#

This doesn't look at all like your StatGame. O.o

#

Can you screen your Stat Unit and Stat GPU?

#

Wait. Are you running this profile while you are playing in PIE? Or are you launching Standalone?

steady night
#

i played in pie

maiden wadi
#

Wtf? There's nothing in this profile but wait time. 😂

steady night
#

:/:/

#

what is wait time .P?

maiden wadi
#

Basically means your thread is idle waiting on something else.

#

You don't even have character updates, or player controller tick, or anything. O.o

steady night
#

so something could be "wrong" rather then badly done ?

maiden wadi
#

Ah. I think I follow now. You have to actually start the trace, then click on your PIE window and play for a bit. If you don't focus the PIE window it seems to only profile the rest of the editor.

steady night
#

aha ok 1 sec

#

but wait

#

no i did play while tracing :/

#

i rann around for a few seconds now also

#

same as before :/

#

i dm´d u

spark steppe
#

also get sure to pick a frame from the time you played

#

so look at the trace at which time you run around in the game

steady night
#

authaer is looking at it

spark steppe
#

ideally on a 2nd screen

#

you really get live support from Authaer? 😄

maiden wadi
#

This is a bit painful here. This is all character movement mesh updates mostly.

steady night
#

atleast live debugging i hope .)

maiden wadi
#

This mushroom thing in particular hurts per instance.

steady night
#

hmm so the npc anim bp being played all the time

#

i guess thats an easy fix really

#

since i activate the movement when close

maiden wadi
#

You have a fuckload of slateprepass from widget UMG bindings. Unsure if this is editor or not.

#

And then something called Debugger. Which I don't know if it's an editor thing or something of yours.

gentle urchin
maiden wadi
#

So I would also try to get a profile in a built game or standalone.

maiden wadi
steady night
#

well 151 idle npc playing anims

#

would be costly i suppose

gentle urchin
maiden wadi
#

Can be. In RS2 we disable them based on player's view using a subsystem. Cripples an older gen console without it.

gentle urchin
#

even new ones if they're expensive

maiden wadi
#

Lol. ATM I'm working on a contextual interaction action system. Like.. You right click on something in an RTS or strategy game, or look at something and open an use wheel in an FPS/TPS. Trying to make it game generic. Going well, but my brain is melting. I need easier things to do like profiling. 😄

gentle urchin
#

I'm sort of surprised it's not something built in to get whats in the playerview and not (and if not, how far off are we etc)

#

i know i know, its just simple math

#

but.. the engine already does this like... 50 times already ?

#

why not pass that along 😛

gentle urchin
#

OnInteract -> GetContexts->PassToHUD?

spark steppe
#

Dive into the many character and animation optimizations that you should be applying to your Unreal Engine 5 projects to ensure you are delivering a fluid 60 frames per second on consoles.

This talk will examine building from the fundamentals through to advanced methods, as we explore optimizations of animations, skeletal meshes, animation gra...

▶ Play video
#

that talk was pretty good (and may help you to optimize stuff)

maiden wadi
maiden wadi
# gentle urchin OnInteract -> GetContexts->PassToHUD?

Actually right now my working model is basically a primarydataasset which is collected into a subsystem. Asset has two lists of gameplaytags, one for users one for target. And a simple function that takes an array of users and a target. Function gathers all same tags the users have into the same container, leaving out tags not all of them have. Then compares each asset to see if the users and target have all the required tags before dropping it into an array, then passing those assets back for display in UI like a wheel or list.

Each asset has a UObject associated with it that can be scripted in and ran either as an instantiated instance or on the object's CDO by passing in the users and target.

gentle urchin
maiden wadi
#

It's only brained. Still writing it. 😄 Semi sick this weekend so I'm not as sharp as normal. And of course I can't stop wondering about early optimizations, like mapping actions to tags to look them up faster than a full action iterator.

#

First off. Don't do this. It just complicates your code. Inputs should just simply call the Server function regardless of whether they're a listenserver or client. It'll work identical in both cases and run a function on the server. Which can then multicast.

#

What does PowerSwitchStopLaserEyes do?

#

IMO, you're multicasting way too much here. This Enum here should be an OnRep and set on the server when their power changes. You can stop powers when that OnRep runs, and all clients will know what the power is after that.

#

But I'm also confused by your multicast. It's checking on laser eyes if your enum == BoltThrowEquipped ?

#

I love GAS so much right now.

tribal gazelle
#

What would be the best practice in linking the safe actor to the NPC? I was thinking of a sphere collision and upon overlap use an interface, but is there a better way to do it?

I simply want to call functions on the NPC whenever the safe is interacted with.

wraith loom
tribal gazelle
wraith loom
#

Is there only one NPC of that class?

tribal gazelle
wraith loom
#

So if you have multiple NPCs that all need to be linked to the safe, then I'd recommend a broadcast/event dispatcher.

maiden wadi
#

In general a watch of https://www.youtube.com/watch?v=EM_HYqQdToE is in order.

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
tribal gazelle
#

I think an event dispacher will not work as only a certain class of the NPC (the general store clerk) needs to be linked to its own safe actor.

#

There are other types of clerks that don't need this.

wraith loom
#

Does each NPC have its own actor, or are they all the same actor just with different variables?

tribal gazelle
#

They have a master class.

wraith loom
#

Okay.

spark steppe
#

make an NPC Reference variable on the safe, you can assign the NPC to the variable once both are placed inside the level

tribal gazelle
#

And there will be multiple clerks that need individual safes.

spark steppe
#

select the safe in the level and in the details panel set the NPC which should be assigned to it

tribal gazelle
#

What?

maiden wadi
#

I think you should watch that video above. It's two hours that'll save you a lot of headache when referencing stuff later.

rotund barn
#

would anyone know how to get mouse world position while not actively pressing a button? basically i want my topdown character to always be oriented towards the mouse, this i have working, but it only works if i press a button on my mouse which is not ideal.

#

basically this returns false and doesnt give out a value if a mouse button isnt pressed

tribal gazelle
maiden wadi
#

This maybe? I can't remember off hand if this needs DPI scaled. Can test it in a few.

#

@rotund barnYeah, my bad. This function should be able to get you what you want without forcing mouse capture. This trace should get you the geometry under the mouse.

olive yarrow
#

folks, is this how im supposed to do delta seconds to make sure everything moves at the same rate no matter the players frame rate?

#

show me ya blueprints

tribal gazelle
#

Can anyone explain how I would link these two unrelated actors together. I want to be able to call functions on the NPC when the safe is being interacted with.

It's just confusing me as there will be multiple NPCs that need individual safes.

#

Event dispatchers seem to need a reference somewhere.

maiden wadi
#

Are they both placed in the level?

tribal gazelle
#

Yes

maiden wadi
#

Direct blueprint communication then.

tribal gazelle
#

How though

maiden wadi
#

It's in that video I linked a bit ago. You put a reference on the safe actor's BP that is instance editable, and then select the safe in the level and set it to the NPC using the dropper.

barren tangle
#

Hey, i have a player start where the tag is 0 and the you see its location. but the printed string is not the location of the player start with the tag 0

tribal gazelle
barren tangle
#

i print that

cinder goblet
#

Hello

tribal gazelle
#

When you click on it opens the details for it, you can't click on one actor, then click another or am I missing something

barren tangle
#

but if i there is that PlayerStartPIE0

#

and the location match with that one, but the tag is None

#

FindPlayerStart is supposed to return the one with the tag into Incoming Name?

cinder goblet
#

I'm trying to "Get actor location" on event tick to send to a server, but I can't figure if it would work or not. I have 2 quests that connect to a local dedicated server, but I cant see each other movements, does anybody if this strategy would work ? Thanks !

barren tangle
#

is None = 0 ?

maiden wadi
#

Two classes. The store person and the safe.

#

In the safe you make a pointer type to the store person, mark it instance editable.

#

Click the safe in the level, look at it's details panel.

#

Click the dropper, click the store person.

tribal gazelle
#

Oh wait I got it working with an actor, that's good enough for now lol I'll use an interface now

maiden wadi
#

You want the same thing I just showed. It does work if you set the variables correctly.

#

Why an interface? O.o

tribal gazelle
maiden wadi
#

You should be able to set it directly to the NPC's class.

tribal gazelle
#

The icon does not show

maiden wadi
#

And you really shouldn't worry about casting at this point. Ignore the twits who repeat that bullshit. They don't even know how to conceptualize why they even think casting is bad, they're just repeating bullshit they've heard like sheep.

maiden wadi
oak lintel
#

Hi folks, hope it is a correct place to ask about anim bps:
I have a Lyra like setup with base anim bp and a layer. In a layer I am trying to access variables from base in thread safe way like this:
Unfortunately every time game runs I get folowing errors, but anim bp works and blendspace correctly changes ther pose. What am I missing here?

oak lintel
#

Found fix:

#

avoid using pins with blendspaces 🤔

junior prairie
#

Is it possible to access the start and end points of a smart link in blueprints? I see the properties in the level but I want to get a reference to their location as a vector:

real solar
#

im trying to build a visibility system similar to darkwood or bullet echo, i cant find any tutorials on it and chat gpt isnt the best so if someone can point me in the right direction that would be great

red pike
#

For my problem yesterday, I wanted to do the blueprints super neat but I just ended up doing it super ugly 😂😭 but it works! 🤷

onyx pawn
#

I have a niagara particle I am trying to implement in a blueprint, I can add it into the actor just fine but coming in at thescal set in the Niagar particle file and it will not use draw scale I set using a value passed to from a variable why can one not scale Niagara particle in blue print like legacy particles were?

eternal cradle
onyx pawn
#

ok, the other issue I am having is I cant seem to toggle visibility of niagra particle in blue print, if I have it set to visible it shows but if I add event triggered it refuses to set the vis of niagra particle on actor to hidden.

jovial sinew
#

Any idea why spawning an actor from server would show in both game views but not play in editor?

jovial sinew
#

ah sorry

lunar sleet
#

They’re more likely to know

jovial sinew
#

ty

errant moss
#

i have a primitive component that IS the root of its actor, has collision preset to physics actor and is simulating physics in the check box, returning false with 'isSimulatingphysics' when i query on tick, no matter what i do i cant get physics to work with it, any ideas?

#

its being moved around the scene with set world location, ideally i'd like the sweep to stop it short of anything the actor touches, but even the sweep hit result is firing as false

lunar sleet
errant moss
#

yes exactly

lunar sleet
#

What’s the component ?

errant moss
#

a primitive component with a static mesh assigned

lunar sleet
#

Yes I mean what type of component, a static mesh?

errant moss
#

oh right, yes a static mesh

lunar sleet
#

Try using a capsule or other shape collision as its attach parent (or root) and simulating on that one instead. If it works, then you might not have proper collision set on the actual mesh asset

#

Regardless, iirc on character class the capsule component is the one that you set to simulate physics, not its skeletal mesh child component

errant moss
#

here is one of the meshes it populates the static mesh with, this seems to be fine to me?

#

has both simple and complex collision bounds, and is set to block all

lunar sleet
#

Maybe you shouldn’t have both

#

Try a box collision as the root tho, given it’s just a chair

errant moss
#

yeah i gave that a go but no cigar unfortunately

#

its very frustrating because i had it working at an earlier time before i decided to go with a different strategy

#

i've even rolled back to a previous push to check my values and everything is the same as it was when it was working

lunar sleet
#

Odd

#

Maybe diff the changes to see what’s missing

errant moss
#

yeah ill do that now

#

nothing i can see is an immediate red flag...

timber knoll
errant moss
#

Yeah that's right

timber knoll
#

That's a major red flag when working with physics. Ideally you would still use velocity or forced

#

Velocity would give you full control but not break simulation

errant moss
#

Hmm is there any way to achieve blocking without physics?

#

Because I don't really need all if the benefits of physics

#

I just need the blocking

#

Can that be achieved just with collision?

timber knoll
#

Hmmm the more complex the shape the easier it becomes to let physics do it's job

#

But you could do manual sweep with a shapecast

#

BoxTrace would come fairly close in your case, but rough to get an accurate collision

#

It would pretty much end up being reverse logic from physics too. You would need to do a trace on tick with length = velocity * deltatime

#

So velocity needed either way

#

Unless you want teleporting? Then you would do sweep only before doing the teleport and no need for physics or velocity

keen sun
#

I want to delete my playable character and respawn it to a checkpoint how can I do that?
and which class should be responsible?

timber knoll
#

Delete and respawn? So just respawn?

#

Checkpoints you can use a simple actor. You can let either PC or GM keep track of last checkpoint and then teleport/respawn player

#

Easiest would be to give an index to the checkpoint actor together with some overlap shape. Then on overlap you check inside the PC/GM if the last checkpoint index was lower than the current one and update if needed. Good idea to also save reference to the actual checkpoint actor. On respawn, you check if the reference is valid and use the location.

errant moss
normal furnace
#

I have a blueprint function (to create a widget etc) which accepts two arguments - 1. A soft class reference for the class of widget and 2. a pass-by-reference object reference to a variable of a type that's parent to all widgets I'm dealing with. I want to use the second variable to store a reference to the widget once its created. Is this possible, and if so how do I do that?

timber knoll
#

And if you're doing this inside Tick, make a quick calculation between current velocity

#

So you don't make it launch itself into hyperdrive

errant moss
#

i've also wondered if i could just stop flow to the set world location node if i detected an overlap between the selected actor and any other actors in the scene, in theory stopping it as it hits any walls or surfaces. but it seems i cant even generate overlap or hit ouputs

#

its like the mesh has absolutely zero collision properties even though it 100% does

timber knoll
#

Overlaps should work as long as none of the objects move too fast

#

If your objects move into eachother between frames overlap won't be able to adjust (low framerates or fast moving objects)

errant moss
#

yeah its not moving that fast

#

we're talking about relatively slow movement

timber knoll
#

Should probably look into that first 😅

#

Can you show the blueprint setup for your mesh? collision settings

errant moss
#

sure one sec

#

here are the collision settings for the static mesh

#

ive also tried it as world dynamic

#

these are the collision settings for the object i want it to collide with

timber knoll
#

Oh was going to say make sure the other is on overlap/block

#

But that's the case 😅

errant moss
#

heres the collision mesh for the static mesh

timber knoll
#

That's player collision viewmode?

errant moss
#

yes thats right

#

this si the simple and complex collision toggle on

timber knoll
#

And if you set it to overlap all with generate overlap events on, it doesn't ever trigger the node?

errant moss
#

nope :/

#

its already on see

timber knoll
errant moss
#

ah i see, let me check

#

yeah thats enabled too

timber knoll
#

And then just use a printstring inside component begin overlap

#

Just as a quick test

errant moss
#

yeah ive tried that test already :/

timber knoll
errant moss
#

just a normal static mesh

timber knoll
#

Are you doing these tests with the chair detached from any tick logic and trying to collide with player?

#

Or do you not have a "normal" player

errant moss
#

No im not trying to collide it with the player

#

my pawn absically is just a floating camera with a point to click system

#

is basically*

timber knoll
#

I see, was basically suggesting just to test setup and not have any weird variables break it

#

I guess you could have your floating camera set on overlap with physicsbody (simple sphere collider if doesn't have one already) and then set your chair to overlapall

#

Just see if you can float inside it and trigger the overlap

errant moss
#

the only problem with that is the chair is just one of hundreds of actors

timber knoll
#

Pretty much any way you can test a simple overlap with no extra logic

errant moss
#

all different shapes and sizes

timber knoll
#

The others work?

errant moss
#

nope

#

so the static mesh is just a dynamic variable that is assigned a mesh on selection from a library

#

so storing collision information inside the mesh is critical

#

it would be very untidy otherwise

#

this is the test i put together inside the spawnableactor bp

#

in theory if it overlaps with anything it should print

timber knoll
#

Yes basically

errant moss
#

but yeah, it doesnt fire a thing

#

part of me is wondering if its bugged idk

#

also i just realised, i cant drag the colliding object into the level blueprint for some reason

#

to get a reference

#

i should be able to do that with a static mesh actor right?

timber knoll
timber knoll
#

What exactly do you mean to get a reference?

errant moss
#

yeah 100% i dont have any logic in the level bp i just wanted to test the overlap on the static mesh in the scene

timber knoll
errant moss
#

this is what im trying to collide against

#

what im colliding with

timber knoll
#

Aah okay I thought your chair wasn't a normal actor

errant moss
timber knoll
#

Should work fine like this

#

In your case, the environment would be WorldStatic and your chair would use PhysicsBody

#

But them having eachother on overlap should give same result

#

Environment (WorldStatic) -> Overlap PhysicsBody
Objects (PhysicsBody) -> Overlap WorldStatic

#

And you can see I get the reference just straight from overlap event

errant moss
#

yeah no luck man

#

doesnt recognise it at all

timber knoll
#

😭

errant moss
#

something has to be bugged

timber knoll
#

Something is wrong for sure

errant moss
#

im wondering if it has something to do with the static mesh in the scene

#

because i should be able to drag it into the level bp to get a reference

#

but i cant

timber knoll
#

Is this active on the static mesh in scene?

errant moss
#

si si

timber knoll
#

And also on the chair? 🤔 damn

errant moss
#

yeah

#

like all collision is gone

errant moss
#

for these actors

errant moss
#

but it wont let me do it....

#

maybe i just need to delete it

#

and add it again

timber knoll
#

Haha yeah I'm not sure at this point we've checked pretty much everything I can think off

#

Maybe the classic try turning it off and on again works 🤣

errant moss
#

even that didnt work

lunar sleet
#

You really shouldn’t use level bp

errant moss
#

and that indicated a corruption with the static mesh

#

read furthur up a bit to get the full context.

silk dirge
#

does anyone know why this applies damage multiple times per actor?

#

instead it works as if it applies damage per component

#

per mesh bone actually

spark steppe
#

well there you got it

#

each bone fires the event

silk dirge
#

well yes but why

#

since its linked to per actor

#

and no if I include the actor in a hit actor array it still applies multiple instances of damage per single frame

#

so this still aplies multiple instances of damage per actor

#

as if it was checking per bone not actor

#

I'm at a loss

dreamy lark
#

the function Synth Tasks is returning an array of a custom struct(FTaskData) that is defined in C++(as blueprinttype), but I can't figure out how to access individual Struct instances and values inside them(I am new to blueprint scripting).

spark steppe
#

it doesn't care what you link to the event parameters

#

the event fires one time for each hit bone

maiden wadi
maiden wadi
steady night
#

hi, what would be a good way to do a NPC without using character & character CMC ?

#

or is that the most common one or whats good practice ?

fiery swallow
steady night
fiery swallow
#

In all seriousness though, CMC is your only option if you plan to allow your NPC to move responsively

fiery swallow
steady night
#

hm alright

#

cool

#

hope its free since bankaccount is drained sweeney_activate

fiery swallow
#

if you want like super simple movement and don't want to use CMC for whatever reason then you would have to use splines

steady night
#

nah if its worth it its worth the dollars

fiery swallow
#

nah it's gonna be free, I'm just burned out maybe in like a month or two it'll be on the marketplace and github

steady night
#

yeah cmc rocks but its verry costly

#

oh cool ! lemme know wanna test it for sure

maiden wadi
#

Depending on your settings.

#

Navmesh walking is pretty cheap. And TBH CMC itself is rarely the major cost as much as moving the character itself and the 513 scene component people put on shit.

steady night
#

well i cant seem to be using more then 8x npcs without it ruining the preformance

fiery swallow
#

you should be able to do atleast 100 characters with cmc active without dipping under 60fps

#

unless you have like a really bad cpu I think

maiden wadi
#

Yeah. Usual initial cost is shadows on the skeletal meshes.

steady night
#

hmm really

fiery swallow
#

yeah, 200 was the limit before I even hit like 33 fps

#

and that's what sparked the 7 month journey of creating my own movement component

steady night
#

oh damn

#

then i must be doing something really wrong :/

maiden wadi
#

Never assume where a performance problem is coming from. 😄 You'd be shocked where the real costs are. Like someone leaving collisions enabled on a cable component that does nothing but visually sit there as a power pole and it eating 0.5ms frame time for.. nothing.

fiery swallow
#

Gotta use that good old profiler

steady night
#

hm interessting

fiery swallow
#

I still use session front-end, I don't like unreal insights because I'm old and don't wanna learn it when session front-end did the deed just fine

#

It's really easy to use

steady night
#

but that not available on 5.2 + right ?

maiden wadi
#

Can't use it in recent versions though, can you?

fiery swallow
#

No, I downloaded 5.2 just to continue using it. But it's not tied to unreal, you can rip the program out of the files and then delete 5.2

#

And still use it for all previous and future versions

#

Also if you have the source version of unreal you can just simply enable it through a command in the build.cs

#

Which is super weird

steady night
#

wow that seems strange

maiden wadi
#

Probably just intending to deprecate it out as an unsupported tool.

rigid fulcrum
#

My character uses multiple textures and I'm wanting to change them all together (randomly)...
This obviously isn't the correct method (since it doesn't work).... Someone wanna educate me?

spark steppe
#

you can't use both outputs of the random node to get the same result

#

promote the random array index to a variable and use a get node to get the value (with the stored index)

rigid fulcrum
#

Trying now, thank you

#

Nah, I'm getting the same results..... 🤔

#

Ok, I got it, thank you!

hard palm
#

So.. I'm getting a crash when converting spinbox field to int (only in the shipping build) does anyone have any idea why?

rigid fulcrum
#

Seems to be working now as intended..... Thank you!

dreamy lark
maiden wadi
#

Does your C++ defined struct have UPROPERTY markers on it's properties?

dreamy lark
#

it does

narrow sentinel
#

Any able to help, would this return the degress the play is in terms of from the forward vector of the actor

#

?

maiden wadi
# dreamy lark it does

This is just the struct. The internal properties need marked as
UPROPERTY(BlueprintReadOnly)
or
UPROPERTY(BlueprintReadWrite)

dreamy lark
#

oh okay. thanks!!

maiden wadi
#

🥳

serene tundra
#

is it possible to change the position/rotation/ boxextent of a triggerbox at runtime ? im did that and now it only overlaps on the client but not on the serverdie anymore. the change in locaiton is only happening on the serverside via authority

maiden wadi
#

It is. But you should probably do it on all machines via replicated properties, so that everyone is in sync.

serene tundra
#

ohh isnt this done aways since the actor has authority

#

and if this the reason, shouldnt it trigger on the server and not on the clients ?

#

but ill try that, thanks

maiden wadi
#

Depends. If you change it's size on the server. And the client walks into it locally and it's not changed for them, it'll trigger overlaps for them but not the server.

serene tundra
#

yes

#

do u need to replicate characters so that it compoents gets updated ?

#

ny understand was so far that replication is only needed for variables but ye componets are variables as well and it makes sense

maiden wadi
#

What is the triggerbox for exactly?

serene tundra
#

detecting balls, which leave its area

maiden wadi
#

Are the balls replicated?

serene tundra
#

yes

#

it worked before and it works when i just place new triggers via bpactor

#

aka they trigger on the server and client

maiden wadi
#

What happens when they're detected as leaving? Is this something that could just be simply ignored on the client?

serene tundra
#

yep

#

the trigger is invisible and the server handls the stuff, but there arent many triggers anyways and it doesnt happen often

maiden wadi
#

Your overlaps can probably just check if they're on the server or not then. If not do nothing.

serene tundra
#

yes but the problem is that the server doesnt trigger

#

currently trying to use debugdraw on server via a timer to see where it is on the server

#

mmmh visuallogger might be even more useful for this

#

then ill add replication, shouldnt be to hard

#

im also using ATriggerBox, which is not replicated at first glance, still the trigger changes on the clients

#

but again thx i think u pushed me on the right track

#

its really strange, it seems that the actor just exists on the client

#

beginplay only gets called on the client

#

but i dont how that could happen, since i just added them using the leveleditor

#

might be related to using levelstreaming, since it started to be a problem that they dont trigger

#

but i already moved the actors back on a single map and the problem is still there

#

found another strange problem

#

when i add timerfunction to them in begin play

#

the timer function only gets called on clients. with LocalRole = None and Remoterole == ROLE_Authority, which looks find in my opinion, but shouldnt it be always executed on the server aswell ? like always ?

maiden wadi
serene tundra
#

no

#

i just had the idea, that it might come from listenservers maybe.. but beginplay still runs when i press play and clients beginplay after loading

#

its part of a lyraproject. ill test this outside and in a clean project and look step by step what this problems causes

#

but still, its strange it doesnt get called on the server still

#

aka maybe it shows itself as client ?? but again doesnt make sense rly

#

a clean project will help defnetly and then implment the movement of the trigger zone step yb step ensuring it works after each step

#

if u want i can pm u what was the reason for the problem, maybe its just a bug, something with CDO and using it with levelinstances or so, but i think/hope or dont hope i can replicate the problem

#

but ill rewrite the class and also for example not use a triggeractor and instead directly using a boxcomponent etc and then also experiment with replicating it, but i dont think that is the problem, after there is also a problem with the timer function

pseudo valley
#

Hey, I'm spawning an actor that has the projectile movement component, however the faster my player character moves, the more offset the spawn location is (in the velocity vector direction). A debug sphere at the spawn location shows that it should be correct, disabling the PMC also spawns it at the correct location - only when activating it does the offset happen. Does anybody know what might be the issue?

violet bison
#

how to access a variable of a widget within a widget switcher?

ocean citrus
#

is blueprints actually good? can i make decent games with just blueprints?

dry sleet
#

Blueprints are pretty capable.

#

Some things are a little annoying to do in BP, and most people recommend defining structs and enums in C++ for stability, but if you want to avoid C++ entirely it's certainly possible.

maiden wadi
#

🔼 💯 🔼

ocean citrus
#

thanks

thin panther
# ocean citrus is blueprints actually good? can i make decent games with just blueprints?

Yeah sure you can. BP structs and enums are a bit fragile, so ideally should be defined in C++.
However, games have and continue to release in pure BP, you just have to be realistic on your scope. You aren't making some 144km^2 open world survival RPG in just BP, the save system alone would hang your game for considerable lengths of time.

For a lot of projects indie's could feasibly attempt, such as game jam games, and smaller scale releases, BP is absolutely feasible.
That being said, the engine is designed to use both side by side, C++ is very powerful, and how much you use is up to you, but it's a skill you should definitely have in your pocket when working with the engine, even if you just use it once in a blue moon. BP doesn't have everything, and if you run into something that you need in BP that isn't there, there's no workaround, you would need to expose it yourself.

Some people choose to use C++ just to expose things to the editor, and then to define structs and enums, others do most of their code in C++, and both are perfectly valid. As you increase in your game's complexity and have more complex things happening frequently, you'll find C++ becomes more necessary. For example, if before you load into your game, you're generating and chunking out a dungeon with 1000 rooms with loot, enemy spawns, corridors etc., there's no doing that in bp quickly, if at all. Same for multiplayer games, so much of that isn't exposed to bp, and bp is too slow at handling, that unfortunately C++ becomes a requirement outside of the most barebones games.

TL;DR: If you scope reasonably enough, pure BP is absolutely feasible and has been done many times. Consider learning C++ still though, as it's a great skill to have and allows you to unlock more of the engine.

(Also read the #rules on crossposting)

serene tundra
#

so the problem is the only problem is only the initial value is not correct on the replicated playerstates ?

remote meteor
#

small reminder bp struct hides alot of stuff that otherwise you have to implement yourself in c++ like
inherits FTableRowBase (to be able to use in DataTable)
GetTypeHash (to use the struct as a key of a map or in a set)
operator== (properly compare struct with unique identified properties)
StructOpsTypeTraits like Serialize/NetSerialize

iron idol
#

I'm having a problem that I can't seem to wrap my head around I think its possible that there are multiple things going on and thats what makes it confusing. I was wondering if I could get some advice.

#

I'm trying to save a variable. there are signs that the variable is saving and signs that its not.

#

If I'm correct, if a variable is not saved it will not survive a level transfer?

#

I have two variables here. The first is equipped weapon which is of the class "weapon base". Under it I have an array of "owned weapons" again a weapon base reference but an array

#

I'm then saving "Equipped Weapon" into a struct with the variable "weapon base class reference" am i doing something wrong

maiden wadi
#

What is not saving?

iron idol
#

the first variable shown "equipped weapon"

maiden wadi
#

Where are you saving it?

iron idol
#

within my save system.

#

so the problem is I go into a game mode and set my weapon. I save all my variables then transfer back to the previous game mode. when I debug key to check if the item is equipped it tells me it is. escape out and play level, or try to equip a weapon again, nothing is there

maiden wadi
#

So it is saving and loading fine? Based on the debug key. What does that do differently than your equipping?

iron idol
#

but if that was the case

#

then if i escape out again and go back in to test without trying to equip again shouldnt it still be there?

#

this is why i'm confuesed

#

like if i check with debug key and immediately hit escape. then test again, I would think the item should still be there.

maiden wadi
#

What does your escape do?

iron idol
#

escape in unreal engine

#

as in just exit play testing

maiden wadi
#

Dunno. Maybe it's not reloading it correctly?

iron idol
#

I'm wondering the same. If that is the case then there must be a second bug

wraith haven
#

I’m struggling to set up a system in UE5 using blueprints and could really use help with the entire process. Here’s what I’m trying to do:

The idea is for the player to gather parts to repair a damaged circuit board. They would walk up to the circuit board, left click on it, and the camera would move closer to focus on the board. Then, the mouse cursor would show up, and the player would need to click on certain highlighted spots on the circuit board (white if they have the parts, red if they don’t). Once all the correct parts are placed, something like a door or gate should open.

Could anyone help me with this?

gaunt stirrup
#

is there a way to switch videos on a plane in the level in real time?

maiden wadi
gaunt stirrup
#

yeah

maiden wadi
#

It should have a material on it that has a texture parameter in it. You set the texture param by making it a dynamic material instance. And you can set the texture param to a different media texture. Or you can make the media player writing to that texture change it's track that it's playing.

bronze spear
#

Hello guys, im creating an inventory system and it works, the only problem is that in the first place i always start with an empty slot and then when i take something it adds in front of it as shown in the screenshot, any ideas? im really new to this kind of things so any help would be really appreciated! (i think that the problem is with the resize logic that is set to 1 so it sets an empty slot but if i set it to 0 i can't even take items by pressing E and nothing shows in my inventory as i don't have it)

sage cove
#

Anyone here know why this won't run?

thin panther
#

What's the point of that interface?

#

It's doing the exact same thing a cast would

bronze spear
sage cove
#

Essentially it works the same way

thin panther
#

The problem with a cast is it's hard reference (the blue pin) making a dependency on the class. If this is a class with assets, you can have a bad time with memory.

Since you're still using the blue hard reference, you've incurred all of the bad, and none of the good

#

Casting is fine, don't believe people that don't know what they're talking about, stating otherwise :P

sage cove
#

Idk, I'm following a course online and apparently there's no solution to this

#

Basically I can't move my character at all because it's getting stuck at some point

#

Ok, I got it to spawn a character but now I have this error

Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetLocalPlayerSubSystemFromPlayerController_ReturnValue". Node: Add Mapping Context Graph: EventGraph Function: Execute Ubergraph BP Player Base Blueprint: BP_PlayerBase

thin panther
#

You removed the IsValid?

peak zodiac
#

Is there a way to stop widget component from trying to create dynamic instances of the dynamic instances it creates?

main lake
#

I just learned that if you create an interface with an event / function in it, you can call it without using the check does implement interface as if the actor doesn't implement that interface it doesn't execute anyway.

So what would be the reason for the node does implement interface to exist in the first place then ?

peak zodiac
main lake
peak zodiac
main lake
peak zodiac
main lake
marble tusk
main lake
marble tusk
#

I don't know, but it's better to have the option and not need it than to need it and not have the option ¯_(ツ)_/¯

frosty heron
bleak mica
#

is this acceptable frame drop? it only happens for like a split second. its looping through hundreds of parts(i think about 600+ as of now), spawning different actor classes, then dynamically attaching them to sockets on each mesh it spawns. if not is there something i can do to fix it (use cpp, async, etc.). this is running on Radeon VII graphics card (fairly old now, about rtx 2080 performance) and linux.

frosty heron
#

blueprint loops are way slower, you most likely will get significant performance boost doing it in cpp

#

for the meshes, you can async load them

agile loom
#

Not sure if you can multi thread in BP

bleak mica
#

Ok, I figured cpp would offer more performance. Was just thinking ehh, it's just a split second. Although it does annoy me when I see it. I guess I'll go learn cpp. Thanks!

agile loom
agile loom
# bleak mica Appreciate the support lol

Also here might be a very relevant resource for you:

https://m.youtube.com/watch?v=f797l7YTcgc

The Object PoolPattern:
Software Design Patterns are like a guide on how to write good code, whether you're using Blueprints or C++, knowing good software practices is a MUST!

This video goes over the Object Pool Pattern which is used to optimize performance and memory by reusing objects in your game.

Download the project files and support my ...

▶ Play video
#

(In blueprints)

bleak mica
gaunt stirrup
#

is there a way to switch videos on a plane in the level in real time?

frosty heron
#

Yes, you just change the media source that is pointed by the material

gaunt stirrup
#

i tried that im not sure it crashes

frosty heron
#

Get in a habit to show what you have

gaunt stirrup
#

my bad

frosty heron
#

this is my material and it's simply a texture sample from a Media Texture

#

and how to point to different movie file.

gaunt stirrup
#

this is my video texture material

#

my level blueprint

frosty heron
#

@gaunt stirrup look above, that's all I have and it work

gaunt stirrup
#

2nd screenshot

frosty heron
#

Anywhere that make sense

#

Level blueprint doesnt

gaunt stirrup
#

do you mind if i can see more of the node structure

#

what does open file connect to

frosty heron
#

Already left home

#

It should be a function inside media player

#

From your media player variable, drag and type open file

#

Specify the file path to the movie you want to play

gaunt stirrup
#

and then > / return value to where

#

😮

frosty heron
#

The return value output the result of the open file. If it failed for any reason, e.g. provided invalid path, it will return false.

You can do what ever you want with that information.

E.g. displaying error msg, asking to input again etc.

inland walrus
#

Is there a way that I can reset to it's construct state, without actually reconstructing it?

frosty heron
#

Doubt it in blueprint. Maybe you can just delete the actor and just spawn a new one at the same location.

earnest vigil
#

How would I go about using AI move to with flying object like for example if I wanted a drone to crash into a car

gaunt stirrup
mellow pike
#

so this keeps counting up as I change items (expected) as I change the mesh then change the mat from the old item to the new one.
that said I dont want stack over flow how can I make sure the old instances are deleted ?

(check back tomorrow its 1 am lol )

loud cipher
#

I was wondering what is the best way to handle a bullet tracer effect? Call Of Duty MW3 has a tracer bullet effect that plays on every bullet fired, and it can be seen by all clients in game. But surely spawning in a actor or multi casting a niagara system on every single bullet fired for all clients would seem taxing on the server

frosty heron
# gaunt stirrup whats wrong with doing it off level blueprint beginplay?

You can't have a reference to level bp from other blueprint classes. The communication is one way.

The use case is very minimal and even at best still questionable.

It's something that is left as a legacy.

Could go on with more reasons to not use it but it's exhausting to list them all the time.

frosty heron
keen sun
#

how to use list view widget to have a list of buttons and each one has similar functionality with different variable inputs

dark drum
tight moon
#

Hello again, for another question
I finally got my bp to spawn a laser that changes its color when overlapping on a specific mesh. However it works once then it stops, while having the pending kill or garbage error message. So the vfx is recasted but the bp destroyed it and won't respawn it. Looks like that currently :

#

If I don't put the end on Completed the laser won't despawn after release. Rn I don't know how to make the laser actually respawn.

maiden wadi
#

Just plug in a break struct of the datatable row type.

halcyon vapor
bronze spear
fading swan
#

If I want to give my Character a weapon (through a selection menu)
Is it a good idea to use a ChildActorComponent? or is there a better way to do it?

iron idol
#

Guys, Your save system saves even when you hit escape on while play testing and go in again. right? Like I'm not going crazy here?

dark drum
iron idol
#

i understand

#

But like if it saved like say I went to a new level and you can see that it saved. Then I hit escape. Then I hit begin play again. The save data should still be there right?

dark drum
iron idol
#

okay, so something broke with my save system and I have no clue what could be causing it. Its saving fine. I can open a new level and my save data is fully intact. I can do this multiple times. switch game modes, switch levels. Everything saves fine. BUT when I hit escape and then begin play my entire save system is wiped. Does anyone know what could be going on here or what could potentially be causing this. Because I'm like 500 hours into my project and I dont have a clue whats causing this.

dark drum
iron idol
#

I mean its just an educated guess. All of my party members stats including health, levels, goes back to default

#

but when i'm switching levels it does not

#

it never used to do this

#

so its retaining the data on open level, but begin play its gone

dark drum
# bronze spear .

It's most likely because you're looping through the items currently in the inventory and then setting all of the elements to one you've picked up? Beyond that I'm not sure.

Personally, I wouldn't recommend using structures for items as they don't tend to scale well. (Become a pain to work with as things get more complex)

If the system is still in its infancy, perhaps using ubojects? I have a series showing how to make on using them.

https://www.youtube.com/playlist?list=PLcwVLBaUNnHoujbPwOAdMgNtq1ShoHIGc

dark drum
iron idol
#

I'm terrified I've bricked my project and I have no clue what could be causing the issue. the event begin play is the same whether i'm switching levels or backing out of testing and clicking play again. I just have no clue why it suddenly is not working.

dark drum
# iron idol I'm terrified I've bricked my project and I have no clue what could be causing t...

The load order could be different. Adding to that, it could be that you start in the editor from a different level than what's denoted in the save which could mess things up depending how it's being handled.

For example, you start a new game in Level 1, transition to level 2, save, close out and restart in level 1. What should happen in this instance? All the data is from level 2 but should this still be applied or ignored?

iron idol
#

So i had this thought. and I had added a new level. But I then tested it without going to the new level at all. just starting on the level that was working previously. Backing out then clicking the play button again. and its still to working

#

I've also tried clearing the save data on begin play then testing it and it still doesnt work

dark drum
iron idol
#

oh boy

#

i can post it

#

but nothing on the load side has been altered except adding additional variables

#

its a bit messy haha

steady night
#

hey im using gamepad to controll the mouse cursor by its not moving x/y its moving weirdly since the joystick values

#

what modifiers to i need :/ ?

iron idol
#

thats loading my data. the top has not been touched since being implemented

dark drum
steady night
#

ah true

iron idol
#

thats the load on begin play that would be loaded when clicking the play button

dark drum
# iron idol

Most likely this. As a guess, it would only apply the data if you've saved previously.

iron idol
#

but thats been that way for hundreds of hours and has never caused an issue

#

I see where you are going

#

and i get the logic you are following. but this has never broken it before

dark drum
#

The fact it did work previously would be the bug lol.

iron idol
#

I'm like 98% sure I dont think this is the issue, but am fully aware that I might just be dunning kruger over here. So I'll give it a go. what do you think needs to be done to stop the issue?

dark drum
#

As a guess though, the default value for the var was probally true but has since been set to false.

iron idol
#

oh

#

so you think i accidentally clicked false on the variabl?

#

i'll give that a try

#

to clarify this should be false

dark drum
# iron idol to clarify this should be false

The issue would be default value. If it only gets set to true after you've saved, it'll never load the data. You'll need some check on begin play to determine if the data should be loaded or not.

#

Do you save the value with the save?

iron idol
#

but wouldnt that be the case even when opening levels in testing?

#

like shouldnt that be a problem with just tranistioning period. not just clicking play

dark drum
iron idol
#

it is in the game instance

#

so you are saying that its saving in the game instance which is allowing it to load properly until I exit out and start a new test?

dark drum
# iron idol

it also looks like a load order issue. 😛 When playing in the editor, the map/level is loaded before the game instance. This means that all the begin plays for things placed in the level will trigger before the init is run on the game instance.

In a build, the game instance is the first thing created though.

iron idol
#

sigh. I'm having a hard time following. this is one of my weaker areas in BP

#

I appreciate the lengths you are going to help me

#

so how do you suggest I tackle the issue

dark drum
iron idol
#

it does seem like you might be on to something

#

is it a problem with this. or is it a problem with where I am saving

dark drum
# iron idol so how do you suggest I tackle the issue

So you have 3 possible scenarios.

1: Actors load before the game instance.
2: Actors load after the game instance but before the data has loaded.
3: Actors load after the game instance and after the data has loaded.

I would tackle this by using an event dispatcher that is called by the game instance when it's data is loaded.

The actors would then get the game instance, if it's not valid (most likely the case when playing via editor), have it check again the following tick.

If it is valid, check if the data has been loaded, if it has, do it's thing. If not, bind to the event dispatcher which when called will then tell the actor to do it's thing.

iron idol
#

could i test this with a simple delay?

#

like the code i just posted

#

putting like a 3 second delay first

dark drum
iron idol
#

i'll try that. i appreciate your help. I'm having straight panic attacks over this haha

iron idol
# dark drum Probably.

That code I sent last was the last save / load thing I added to the game. Its in the game mode bp. could this be any part of the issue?

dark drum
iron idol
#

i'm not sure I follow with the print strings. Its only loading the party data. nothing else should be loaded

dark drum
iron idol
#

I think this lead me in the right direction. at least for now 😂 . I really appreciate your help, I was super panicking. Gonna go sub to your youtube now. Thanks for being a good human!

dark drum
tight moon
#

Working well, thanks !

steady night
#

what s action name is that not the input name ?

dark drum
maiden wadi
# steady night

Sir. Do you have time to talk about CommonUI and how it will revolutionize your life? Just ten minutes of your time, Sir.

steady night
#

he waat ?

#

im trying to detect a click on umg with gamepad

#

you have a better way :/ ?

maiden wadi
#

Depends on what you're doing specifically. Like clicking a button, or?

steady night
#

yeah

maiden wadi
#

Yeah, you really should use CommonUI then. It does a thing where when you're using a Gamepad, it'll move around an invisible cursor on top of the widget that gets focused. So you can do your hovered code for both mouse and gamepad on hovered events instead of having to have special ones for focus as well. And the accept button simulates a mouse click.

#

I wrote out a separate extention to it for work to imitate Ubisoft's cursor a bit. So that analog stick will move around a visible cursor, but if you use DPad it'll snap back to buttons for easy navigation.

dark drum
dark drum
# maiden wadi How do you mean?

Input actions only trigger inside widgets (including commonUI) if the input mode is set to game or game & UI. If it's just UI only, they don't trigger.

#

Input actions only trigger on the game input. :/

sharp python
#

Hi friends, what is the best place to keep a savegame in a multiplayer game? It should be player specific, so GameInstance is not the right place, but GameState gets switched out between menu and gameplay, so I'd have to duplicate code and re-load the savegame every time. 🤔

frosty heron
sharp python
#

Each player has a profile file that contains metaprogression that gets accessed during gameplay, and I also need to smuggle their character/loadout selection between menu and gameplay. 🤔

frosty heron
#

Before you think about Unreal Engine, just ask your self, when a player saves, where do the save file get stored

#

are they going to be stored locally in each machine or the server will keep them on the cloud, etc.

forest spade
#

@steady night The easiest way to detect a button press or click in UI is to use the OnPreviewKeyDown (for keyboard or controller keys) or OnMouseButtonDown functions. You can find them if you hover over the Function heading in your blueprint, and then clicking on the override dropdown. CommonUI has some quirks to wrap your head around if you're a beginner, so I don't usually reccomend people start with that. Try those two function with regular widgets first and see if they work for you.

sharp python
#

Locally, I'm aiming for P2P MP

dark drum
sharp python
#

I don't want to run a server for a game that is 90% likely to flop lol

frosty heron
#

that's assuming one have the money for online data base

sharp python
#

If there is multiplayer, it will be in the form of discord meetups, and if someone cheats then they get kicked out of the community

frosty heron
#

but yes, don't worry about cheaters soo much. Especially if you just start with multiplayer.

#

make a fun co-op game, if people cheat, let them cheat.

sharp python
#

It's competitive but there is no rank or anything at stake

forest spade
#

If I want to see how things are working at lower framerates, is setting the t.maxFPS console variable to 30 or 60 a good way to do that? If things still look good at t.maxFPS = 30, can I reasonably assume the packaged project on a weaker machine will look about the same?

frosty heron
#

blueprint, competitive and listen-server doesn't go along well

sharp python
#

My issue is that it is recommended to put save related code into GameState but if you need to access it both during gameplay (metaprogression stats) and in the menus (unlockables) you have to duplicate that code with small changes between the two 🤔

frosty heron
#

if you want the path of least resistence for local save file, just have it in a game instance

maiden wadi
#

Cause the default is that they work in Menu. O.o

maiden wadi
#

I hate this naming overlap. Are you talking about CommonUI input actions or enhanced input actions?

sharp python
frosty heron
#

This is a complete misunderstanding

frosty heron
#

every player run their own instance of the game, every player have their own game instance

sharp python
#

I thought the point of a game instance was that there was only the singleton 😮

#

Oh. 👶

maiden wadi
# dark drum are they not the same thing?

No. And as much as I love EI InputActions. I won't use enhanced input support for CommonUI. It is still a buggy mess right now. The Legacy datatable Input actions work just fine though.

#

But see. I have this widget here that pops up to show something's info. Still in testing mode atm. But it'll set it menu

#

I have a little button here with a triggering action and a print on it's clicked.

sharp python
#

I am apparently indeed an idiot. Thanks @frosty heron

maiden wadi
frosty heron
#

took long time for me to grasp the basic of it.

maiden wadi
#

Print is me pressing G, not clicking the button. For clarity. 😄

dark drum
# maiden wadi

Ahh, yea I was referring to the other input actions. 🙃

frosty heron
#

I'm still stuck prefexing my blueprints with BP_ 😢

#

and WBP for widget blueprint lmao

maiden wadi
#

Gameplay inputs don't run when in UI Only mode. And that's all CommonUI's Menu mode is. It sets your playercontroller's input mode to UIOnly.

sharp python
#

So I was today years old when I learned BP_ is bad practice

steady night
maiden wadi
#

😄
"W_" for widgets.
"W_Menu" for activatable widgets.
"CB_" for buttons. (CommonButton)
"CB_TV" or "CB_LV" for tileview/listview buttons
"B_" for any Actor, Component or UObject blueprint
"**D_" for definitions like WD for WeaponDefinition

dark drum
steady night
#

@forest spade

maiden wadi
#

Discord and it's underscore formatting. :/

spark steppe
#

no prefix master race

#

just use content browser filters

#

it's 2024

#

not 1998 2021

maiden wadi
#

Ben's over here on a project that isn't over ten thousand assets. 👀

spark steppe
#

i wish

#

i have all my asset packs in my main project

#

that's just static meshes

maiden wadi
#

Naming stuff like this also helps me find my own shit. Other people don't generally prefix stuff, so it makes it much easier to not go to old deprecated blueprints I can't delete because... 🤷‍♂️

spark steppe
#

textures

#

it's close to a million i guess

#

kinda impressive how well UE handles that amount

fiery moon
#

How much diskspace does your main project use? :P

spark steppe
#

1.3TB

fiery moon
#

Not as bad as I expected

maiden wadi
#

Got me beat there. Not necessarily main but largest is 334gb for me. 😄

spark steppe
#

i thought it was around 500GB or smth -_-

dark drum
#

I find it odd that epics experimental 'Common Conversations' plugin opts to have the conversations flow down instead of left to right. 🤔

spark steppe
#

my own stuff is 222GB

#

so 1.1TB from 3rd party assets

#

they are symlinked to the main project, so i can check the size "independent"

frosty heron
spark steppe
#

well, you should certainly exclude all the asset packs 😄

frosty heron
#

make sense

spark steppe
#

or add them if you have enough space 🤷

#

shouldn't make much of a difference, since they would most likely be only pushed once

#

but collab work is pretty much impossible at that point

#

so any project with more than one person wouldn't do what i did

#

they would migrate the assets that they need

frosty heron
#

🗒️

spark steppe
#

also i strictly keep them separate to some point

#

the cyan ones are 3rd party, so i know that nothing project specific should go in there

granite frost
#

How do I call super in a blueprint?

spark steppe
#

rightclick the node, add call to parent

granite frost
tight moon
#

I'm still stuck on that last thing, aka playing sound only when grabbing an object. I havt his base, I'm unsure what to do afterward.

zealous moth
#

Very interesting case:
I have a collider on my camera at a specific distance. It is set to overlap all.
When it overlaps, it sends a BPI message to turn on custom depth pass to trigger a highlight.
When it ends overlap, it sends the same message to turn off the custom depth pass.
If I don't move my pawn and turn the camera and therefore the probe onto the object, nothing happens. Even print string wont detect it.
I have to input a slight movement to detect it.
Same with end overlap.
What is going on??

#

hierarchy for ref

#

when turning only

#

after slight movement

#

and turning away

granite frost
#

the item variable is valid and I created a array of size 30 with all values null. When I try to set the first index value to the item. Its not working at all. Afterwards if I try to retreive it. Its still null. I think the problem is that the array element is a copy of the value and not the original one but even when I use 'Get' its only showing the option to get a copy and not reference how do I tackle this?

#

Or maybe that the array is creating each object as well when I resize it instead if an array of null? What should I do?

#

Aaaaaaahhhhhhhhhhh!

#

Nvm

#

I need to use soft reference right😭

dark drum
granite frost
#

But I am iterating over them

#

I don't know where to place it

#

I need to place the item to whichever first index is null

gaunt stirrup
#

is there a way to disable widget mouse input

dark drum
granite frost
dark drum
dark drum
granite frost
#

So I don't need to use soft object reference for it?

granite frost
gaunt stirrup
#

how do i disable widget input? from my mouse

dark drum
# granite frost I will try that!

The first one will loop though until it finds the first invalid entry and then sets the element to the item.

The bottom one doesn't loop at all and just checks the length of the array to determine if a new one can be added. For this though, you wouldn't pre size your array will null entries.

dark drum
dark drum
gaunt stirrup
#

thats what im trying to do

granite frost
#

Ohh. Ok. So whats the difference between hard and soft references? It confuses me a lot

dark drum
granite frost
dark drum
dark drum
gaunt stirrup
dark drum
gaunt stirrup
#

just block all input after player1 selects their character

#

i tried getting rid of the mouse cursos

dark drum
gaunt stirrup
#

for the player (local multiplayer)

olive yarrow
#

friends, i yet again come for help. Im atttempting to make my suicide bombot go to whatever friendlynpc/player is closest to it... however i cant get the check for whats closest to be true.

I know its in the comparison (did i even compare correctly?) that i went wrong... but i dont know wheeeeere

olive yarrow
dark drum
gaunt stirrup
#

its more a blueprint problem

dark drum
olive yarrow
dark drum
timber mortar
#

Hi, sorry to ask but did you get this fixed? I'm getting the same issue when using PCGs

olive yarrow
olive yarrow
mild jacinth
olive yarrow
#

mmm, changed code around a tad its the coillision causing an issue. it just goes after whoever the latest collision is not whoever is closest 😂

balmy jackal
#

Hey everyone, got a really annoying problem where my game can't package due to an "Unknown Error". I've attached the full error report which I've looked through but can't find anything useful in terms of fixing it. Any help would be greatly appreciated, these are always the most stressful errors, right when you're close to being done. Thanks for reading

thin panther
#

Look at the bottom, you need to change your include order which is possibly causing the compilation error on your game module

balmy jackal
thin panther
#

You set it in your target.cs for the game target.

balmy jackal
granite frost
#

How do I attach an actor to my hand socket without spawning it? I have its reference already and it exists.

#

I tried directly using attach actor to component but its bugging out the whole character. The speed, texture and everything. And really weird effect.

dark drum
glossy cloak
steady night
#

my onKeyDown ovveride function dosent work at all, game mode is Ui&game and focusable and the widget is set to "isFocusable"

#

what am i missing ??

granite frost
# glossy cloak That's how you do it. Be sure to turn off collisions. Can't see why the texture ...

I just figured out the error is not from the attachment but due to another mesh whose render pass was set to false. Which I did so it only cast shadow but it not visible. Its working for skeletal mesh but not for static mesh? And I did disable the collision. The weird part is that if I call equip then call unequip and again call equip it works the second time. However the component is not attaching.

granite frost
dark drum
granite frost
gaunt monolith
#

Hey everyone, does someone know if there is an easy way to connect this code when a key is pressed instead of the delay node?

granite frost
#

This is my unequip

#

And this is equip

#

And my hierarchy

#

Toggle visibility from inventory is a node that just remove visibility, collision so that its not intractable in the real world anymore

gaunt monolith