#blueprint

1 messages · Page 272 of 1

frosty heron
#

no

#

get game instance don't return server's

#

depend whos calling

#

GI is not replicated, everyone have their own.

maiden wadi
#

Ah, there's a function for that.. Uhh..

frosty heron
violet bison
#

okay, it seemed the function was run on server, leading to both controllers reading server's GI

frosty heron
#

game instance is not replicated

#

client can't reach server's GI

#

and vice versa

#

Player 1 can only reach their own GI, player 2 can only reach their own G1, player 3 can only reach their own GI

violet bison
#

huh, then is there a way I can reach remote machine's GI from the controller?

frosty heron
#

you get the idea

frosty heron
#

Game instance is not replicated

frosty heron
maiden wadi
# frosty heron reallllllly?

There is a direct call you can make from C++. But you shouldn't need it I don't think. Cues have a prediction key from their context. If it is a prediction key from their own client they'll run the cue locally.

violet bison
# frosty heron Why do you want to reach their GI?

I had a menu controller and a controller in game
and I want to retain data when transferring
so I stored the data chosen in during menu controller in the GI
and tried to read them with in-game controller

maiden wadi
#

What is the data? Sounds initially like savegame territory.

violet bison
#

it's both
savegame that contains player's name etc
and a class that player pick in the lobby menu

maiden wadi
#

Why didn't the player tell the server what they wanted in the menu?

violet bison
#

store them in playerstate?

tropic peak
#

Is there something like "on finished" in widget animations? I would like to remove the widget from viewport after the animation stops playing.

maiden wadi
# violet bison store them in playerstate?

If your menu is networked, then the player's selections should be stored on the server already. So that when they travel to a new map, the server already has this information.

If the client is picking this from offline, there are travel arguments you can use which parse from the options from their login in game mode.

maiden wadi
frosty heron
#

I guess I can send a GE to the server to plays the cue

#

but i'm just wondering if it will get replicated back to the predicting client.

frosty heron
#

If true then do X

tropic peak
#

I'm kinda trying to do it inside of a function Nevermind I'll just move it outside

violet bison
maiden wadi
#

I might need more info to answer that correctly. What is your menu? Is this a separate level?

pulsar axle
#

Simple question, is it possible to put a blueprint inside a blueprint?

#

I just need something that is great at storing variables inside a blueprint, the only thing I know that does that well, is a blueprint.

Unless it's possible to store variable info inside an component, in which case that also works.

frosty heron
#

you can store variables inside an object, a data asset, an actor component, almost anywhere really.
Where you put and what will need context.

#

usually you want to encapsulate an entitny into one

#

like an inventory component

#

or targeting component

#

their variables will be declared in the respective environment

pulsar axle
#

okay, lets say I want to store variables into this arrow right here, how would I go about doing that?

frosty heron
#

store where?
That blueprint class would have reference to the component already.

halcyon vapor
#

I just noticed something, is it not possible to put interfaces into user widgets?

frosty heron
halcyon vapor
#

user widget communication between each other

#

unless there is a better way

frosty heron
#

the easy way normally to have a master widget

#

and all the sub widget is goes to the master widget

#

communication between child can be mediated on the master

halcyon vapor
#

like a timer that would execute code to change appearance of another widget

#

now I see having a master widget would simply things

frosty heron
#

if it's gameplay as opposed to cosmetic, you might want to run that timer not in the widget but some sort of manager.

halcyon vapor
#

actually wait nvm, I have a window widget which is very complex, I'd like to keep it as seperated to the master one as much as possible due to its complexity

frosty heron
#

beside you need some workaround to use timer on widget. Widget timeline component is not available, you will have to use the Designer Timeline

pulsar axle
# frosty heron store where? That blueprint class would have reference to the component already.

Alright let me share all the details so this is more clear.

The arrows, aka the "exits" are used for their location to spawn a new room, as I am working on my dungeon creator game.

Trouble is, just spawning a room is only the first step, I am going to need to store the information of what room was spawned and various other details about that room.

Now, you see there can be multiple exits to the room, so I can't just store that info in the room itself, I need to store that info in the "exits" so I can reference each one when needed.

frosty heron
pulsar axle
frosty heron
#

there can't be infintie ammount of rooms, your memory have limit.

#

You will obviously have to remove the one that you don't use anymore

#

and pop the new room to the array

pulsar axle
#

Yes obviously, but I need a way to store that info.

frosty heron
#

Create variable

#

the type will be what ever your info will represents

#

if you need an array of those room, then create an array variable of those master room

pulsar axle
#

what's the array for? we are just talking about storing data-

also it is impossible to have blueprints inside blueprints?

#

because that would be loads easier

frosty heron
#

Did you come from unity?

pulsar axle
#

no

frosty heron
#

The array is the reference to the instance of your master room

#

it will point to all the master room in the world

#

you can grab the instance and grab their data

#

E.g. the number of walls, the exit arrow, w/e it's there.

pulsar axle
#

what-
how does that relate to anything I've said so far?

#

I'm so confused

frosty heron
#

I would recommend watching the video that is pinned earlier

#

it will really help with the foundation of OOP

pulsar axle
#

I just want a place to store variables.

you say I can store them anywhere, yet every place I list to store data you said isn't possible

frosty heron
#

I said store them where it make sense

#

an item component would have variables related to the inventory

#

a targeting component would have variables related to targeting (The target actor, the initiator, etc)

#

encapsulation is a fundemental of OOP

pulsar axle
#

So I can't store them in components and I can't put blueprints inside blueprints

frosty heron
#

how do you draw that conclusion?

pulsar axle
#

what

frosty heron
#

if you finished that, your life will be easier

pulsar axle
#

you didn't answer my question-

CAN you store variables in an component?

CAN you put a blueprint inside a blueprint?

#

I just need to know this

frosty heron
#

you can store variables in a component as stated earlier

pulsar axle
#

Fantastic, now we are getting somewhere

#

I shall research that now

frosty heron
#

if by putting blueprint inside blueprint reffers to child actor component then not really, as that;'s a broken feature of unreal

pulsar axle
# frosty heron you can store variables in a component as stated earlier

One last question.

Lets say we have:

Exit1 Exit2 Exit3 Exit4

All of them are going to have the SAME variables, but each with different info saved inside them.

For example, Exit1 may have its "room number" variable be set to "34"

but Exit2 uses that same variable named "Room Number" BUT it's number is "54"

Is that possible?

frosty heron
#

Those Exit1, exit2, exit 3 are arrow components

#

if you want to have variables inside them you will have to create your own custom Arrow component

#

which is not what you want to do.

#

The variable should live in the master room

#

now what you can do is to create a variable type called Map

#

where it takes a key and pair value

#

So you can use Arrow component reference as the key and number as the value for the room number

#

so it will look like this

Key: Value
Exit1 : 34
Exit2 : 54
Exit3 : 32

pulsar axle
#

What's value meant to mean in this senario?

frosty heron
#

can be what ever you want, in this case it's the room number so the type is integer

pulsar axle
#

and what's key ?

frosty heron
pulsar axle
frosty heron
#

Isn't your dungeon generator going to spawn multiple master room?

#

how are you planning to spawn your rooms then?

pulsar axle
violet bison
frosty heron
#

So what get spawned?

#

forget about the details of the variable, what's spawning the room? and what is the room class?

pulsar axle
#

All rooms are children of the master room.

frosty heron
#

So you have a child blueprint of the master room?

#

and that's what get spawned?

pulsar axle
#

yes

frosty heron
#

and who spawn them? Dungeon generator?

pulsar axle
#

Yes

gentle urchin
#

Dungeon gen is the knower of all

#

Master of knowledge

#

Query master

frosty heron
#

you can declare the map in the master room

#

The child bp will override the value

#

if you never hear inheritance, now it's the time to research about it.

#

you already have the idea of inheritance with spawning child bps, but you don't seems to grasp member variables that get passed down to children,.

pulsar axle
#

omg I am gonna record another video bc clearly we aren't understanding this hold on

frosty heron
#

I am going to sleep soon

gentle urchin
#

Why does the exit need to know anout objects in a room?

#

Sounds weird

frosty heron
#

this is how you can associate your exit with the room number. Do this in every child instance

gentle urchin
#

Backwards even

frosty heron
#

yeah

#

been wanting to say backwards

#

it's mostly derived from guesses.. watch the pinned video and your life is easier.

#

gonna sleep, gl

pulsar axle
#

THIS IS THE INFOMATION, I'VE BEEN TRYING TO PRY FROM YOUR COLD PROGRAMMER BRAIN'S HANDS

#

HUZZA

#

LETS GO

#

FINALLY

#

THANK YOU

frosty heron
#

I don't know if this is the way I will do it

#

you probably want to get fammiliar with structs

#

or Data assets.. but yeah a lot to learn

#

you will always end up with better version everytime you start a new project

#

it's fine to start simple I guess

pulsar axle
#

short of me saving this to external files after generating the map, idk what else I could do

#

the info has to be stored

#

somewhere

#

so I can load the room back up

#

when I walk backwards through the map generation

frosty heron
#

bottom is how you retreive the value

#

so if GetMeExit1_RoomNumber function is called, it will return 45

pulsar axle
#

that's just number variables

#

does it let you save any other type of variable ?

frosty heron
#

All the data should live in the Room object

#

not the exit

#

that's soo backward

#

the exit is just a location

#

all the info is in the room object

pulsar axle
#

what do you even mean mannn

#

Think of it this way

#

the player needs to load a room

#

room loads

#

the only way that room could load

#

is if the previous room was loaded

#

if that room was loaded

#

so was the arrows

#

so, when the player gets close enough

#

the next room will load

#

its that simple

frosty heron
#

ok and?

#

what's the issue?

#

Player get close enough

#

Spawn BP_Room

#

done?

pulsar axle
#

no-

#

Think about MINECRAFT

#

how do you get BACK to the chucks you where in before?

#

that info is stored

#

so you can return to that same spot

frosty heron
#

yeah, those info are stored in the dungeon generator

pulsar axle
#

its the same thing

frosty heron
#

or what ever manager you chose, I will just use the dungeon generator to keep all the info

#

the point is you are lacking the foundation of OOP. Watch the video if you decide that you are stuck.

pulsar axle
frosty heron
#

how is dumping it else where somewhat make it better

#

they will still occupy memory in your computer

#

Actually not dumping the info in the singleton sounds pretty bad.

#

Here is my last tip

#

Dungeon Generator hold References to all INSTANCE of the rooms in the world.
Each room have their own variables

#

now in dungeon generator you have reference to every single room in the world. You can do what ever with that info.
Things like, getting the room number in the BP_Room_1
Or getting the room number in the BP_Room_2
, etc

pulsar axle
#

because this isn't minecraft, not everything is on this perfect easy to understand block system.

keeping the data in the exits is more reliable.
Because when you physically arrive at the room, the info is already there.

but then that does come with a potential issue, of each room now storing all the details of the room prior, that could also build up, so instead of just loading one room, you are loading that room and the info it saved about the previous room, and the one before that, and the one before that..... etc.

#

I think my solution might have that flaw

frosty heron
#

keeping the data in exits is plain insanity

pulsar axle
#

I just don't know any other possible way to do it

frosty heron
#

you can easily get a ref to the previous room or ALL rooms by storing every reference of the room you spawn in your dungeon generator class

#

if that doesn't click, you should get 2 - 3 hour lesson on Python regarding object oriented programming.
It's actually very useful to understand what object is, what data should it contain. Defining relationship, abstraction, etc.

pulsar axle
#

Millions of rooms

frosty heron
#

what you are doing is not grand scale

pulsar axle
#

I can't quite comprehend it

frosty heron
#

it's actually plain simple

#

and it doesn't matter if you do it for 2 rooms

#

or 100 rooms

#

start small, get used to the engine and how things communicate

#

who knows in the future maybe you can use wave function collapse to generate your dungeon.

pulsar axle
#

maybe I need to create some kind of "generation_log" that writes down everything the dungeon gen has ever made.

every exit and where each exit lead to, everything that is in the room, what room was spawned, etc.

frosty heron
#

You can easily get everything that the dungeon gen has made in run time

#

Dungeon Generator -> Spawn room 1 -> Add to the array
Dungeon Generator -> Spawn Room 2 -> Add to the array

#

Now the array hold reference to room 1 and room 2

#

you can just DungeonGenerator-> Get room 1 -> Get me your exit room 1

#

or DungeonGenerator->GetRoom 2 -> Get me your exit room 2

pulsar axle
#

aww man

frosty heron
#

Dungeon generator simply hold a reference to the room it spawned

#

you already ahve the reference you can access anything the instance has

#

all the exit it has, all the room number assinged to the exit, blah.

pulsar axle
#

how much do you cost to just join a call and teach? genuinely curious at this point.

frosty heron
#

im going overseas so can't do it sorry and those information can easily be obtained with a few hours of learning OOP outside unreal imo.

#

altough I don't deny 1 on 1 session is a good form of learning

#

i wish i have a mentor

pulsar axle
#

I fucking miss school bro, that's back when I could actually retain info lmao

frosty heron
#

if you really have money to burn, you can hire some of the guys in #hire-a-freelancer but the free way is there too,. Just learn OOP

storm solar
#

check out leaf branch gaming if your new to this. Or other tutorials online. He goes really well into explaining how to do things. I dont know if he has beginer stuff but it might be worth checking out.

#

I cant find the right word / term.
I want a target icon for my third person action game w/ a widget.
Is there a way to spawn a widget (screen view), and then attach it to any actor?
Tutorials I saw keep using event tick to update the location so its not dynamically attached to anything.

frosty heron
#

@pulsar axle Here is spawning 5 "rooms" and assigned a random number to each of the room

#

The Dungeon generator Spawn the room and keep reference to it

#

notice how every time a room is spawned it's added to the SpawnedRoom array

#

with the spawned room you can get everything

pulsar axle
#

That's pretty cool, but then when I wanna get a room back, how am I gonna know which one belongs to where?

frosty heron
#

you can loop through them and getting the exit the room number it has,
or you can get one of the element (the bottom one gets the first room that is spawned)

#

wdym by you want a room back?

#

you destroyed it?

#

ok I can picture it

#

if you are talking about mine craft

pulsar axle
#

Yes, but just like in minecraft, when you walk forward enough, what's behind you is destoryed, what's in front of you is newly generated.

but if you walk backwards, you want to get back to what you once had.

#

hence why I wanted to store the details of the rooms

frosty heron
#

Then you will need to define them

#

look into structs

#

So your structs can contain, the number of exit, and their location

#

but that's probably not a solution for something like minecraft

#

don't think about infinite world

#

they probably use some sort of algorithm

#

you can store like maybe a 1000 randomised entry that define a room

#

and those entries are mapped to the location of the player

pulsar axle
#

Well, the map DOES have a seed, does that help?

frosty heron
#

depends on how you use it

#

I wouldn't know

#

but you can get predictive result with seeds yes

pulsar axle
#

but then the rooms would reset each time you returned to them...

#

hmmmm

#

you see the dilemma I've been faced with

frosty heron
#

the seed never changed

#

you can just make 1000 entries with the seed that was given

pulsar axle
#

Is it possible to assign the room a random number from the seed, and that's how we find that room later? (or from STREAM I should say)

frosty heron
#

the info for the room is already made with the seed at the start of the game

pulsar axle
#

true

frosty heron
#

the actual representation of the room can be spawned using the entry that is made using the seed

#

If you are not doing open world, which maybe you shouldn't

#

instead thingking about minecraft maybe just tackle finite randomised dungeon

#

wave function collapse seems to be a popular method to generate dungeos / rooms

#

that's also pretty advance

#

and any generation with blueprint is going to be slow as f

pulsar axle
pulsar axle
frosty heron
pulsar axle
#

FRICK

frosty heron
#

it also has it's pros

#

though some of the veteran hate it with passion

pulsar axle
#

well

#

fuck

#

now..

#

i

#

god damit

#

that means training myself for blueprints is pointless

#

its only for small games

#

it can't handle anything of decent scale

frosty heron
#

Blueprints may be enough for small games

#

and there are titles out there released with blueprint only

pulsar axle
#

I really thought it was just a code visualizer

frosty heron
#

not big studios ofc... that will never happend

#

doing minecraft with blueprint is insane

#

just make smaller games

#

then pick up a programming language

#

and move the heavy stuff in C++

#

the rest can still be in blueprint

pulsar axle
frosty heron
#

meh, that's what I told my self too.

#

until I have the motivation to not give up

#

i still dont understand codes written by others

#

but if you know the basic, you can do a lot already

autumn pulsar
frosty heron
#

my IQ is 2 digit, I am a drop out

#

picked up C++ at 29 years old

autumn pulsar
#

I think it’s something anyone can learn. You just keep being stupid at it until one day you aren’t

frosty heron
#

If you believe your self to be stupid then it will be real

autumn pulsar
#

“I don’t know the thing… yet” is my motto

jade inlet
#

It's all a matter of mindset

#

try it with "I want to know the thing... yet" 😉

autumn pulsar
#

Also programming is kind of a different mindset in general. You have to break things down and down and down until you get to the base level and build back up

#

Going to the store becomes -> wake up->move leg out of bed->move other leg out of bed, etc

pulsar axle
gentle urchin
#

so it consistently gives the same r esults

#

but is "infinite"

jade inlet
#

This sound like reverse engineering. This is just a possibility of how you can learn smth

gentle urchin
#

each room doesnt need to know anything about other connecting rooms

autumn pulsar
#

I’d start out just making a button that opens up a door

#

Which sounds simple but is surprisingly complex

gentle urchin
#

I've never tried walking 'backwards' in something like this but i imagine you track some index

#

which says roomnumber

#

and use that to query the seed for the n'th number

#

a given seed will always yield the same sequence of random numbers

#

Seed 0:
015941851230648961231521564891256...... every single time

#

now if you know this information, using it in a room generator should be easy enough

#

RoomID = Number index

#

Room 0 = [0]1594185123064896......
Room 1 = 0[1]594185123064896......
Room 2 = 01[5]94185123064896......

#

and so on

pulsar axle
#

yeah this is great and all

#

but how do we get that info when we want it?

#

generating the room is easy

frosty heron
#

add it to the array

#

Get fammiliar with structs

gentle urchin
#

depending on gametype, im not sure i'd store so much info really

#

a minimalist approach is something like you only store what deviates from the random generation

#

room 3 is always spawned wiith X items in it. If something has changed thats what you store in some struct, and remove during room generationo

pulsar axle
#

rooms need relations...

lets say I am 5000 rooms away from spawn, if I want to walk back, how am I going to call those rooms back to me?

how is the game going to know which one to grab and put where?

You see this is why the only way I ever understood this concept is if the exits stored the data from the room ahead, or in this case the room behind.

because otherwise I don't know how we'd figure that out.

gentle urchin
#

thats the seed's job 🙂

#

using the seed, it will know what was there

#

because it's generated deterministicly

#

the only thing random about it is the initial seed

#

the rest is a fixed sequence

#

forever

#

I'd suggest testing it with a seed 🙂

#

a very simple bp

#

spawn 10 instancned static meshes , in a row

#

set the scale for each of them based on a Random float from stream

pulsar axle
#

so your telling me, the seed is going to grab the room from the stored data, then place the exact room is spawned before, back where it once was if you walked backwards?

gentle urchin
#

Yepp

#

well

#

it's gonna generate the exact room as last time

pulsar axle
#

We need the seed to pick the room from the stored data, otherwise it will be a reset room, back to how it was at the beginning.

That's like building a house in minecraft, coming back to it and finding the house is gone and the trees you cut down are back

gentle urchin
#

Look at this;

#

randomly generated scales

#

uses a seed

#

which i reset for each build

#

this was seed 794

#

changed to 1

#

back to 794

#

exactly as last time

pulsar axle
# gentle urchin Yepp

also I think you are overestimating the seed's power here.

It knows how to perfectly generate the map once.

Walking backwards is not the same as walking forwards from the program's prospective.

Walking forwards is generating 50 random rooms and it will always generate those 50 random rooms when you boot up with the same seed.

However, I have no reason to believe it would do those exact 50 rooms again if we walk away and return to that spot.

gentle urchin
#

you need to reverse the stream while walking backwards

#

alternatively you'd store the number generated for each room 🙂

#

has some microscopic memory footprint but sounds more reasonable than backwalking

#

since reversing a stream apparently isnt a thing

frosty heron
#

@gentle urchin how would you preserve the info to determine which rooms the player is going to?

#

if we to spawn the rooms based on the player location

gentle urchin
#

Not sure i get the question

frosty heron
#

like if I'm walking to a door, how would I know that it's room 76

#

I'm considering to just doing it this way if I can't get wfc to work

frosty heron
pulsar axle
#

I deadass forgot in my game, it's part of the lore that after ONE day the world resets everything outside the spawn room.

So we only need to store data for like one day, meaning storing data in the exits isn't that terrible

#

lets say a day lasts 40 mins in real time

gentle urchin
#

One thing is if all are in a sequence

#

But now its kinda not?

#

Can you walk a seed in a gridlike manner 🤔

storm solar
#

is there a way to move a widget over one actors head to another. like a target icon?

dark drum
# gentle urchin I actually need to investigate this a bit 😅

Assuming the doors are what triggers things to load, you can use it's location (Possibly normalize it so it's an int vector) and store it in a map, with the room index. When you go to a door, you can check if it's normallized location is in the map, if it is, use the room index, if not, generate one.

dark drum
gentle urchin
#

That would give inconsistent results of the same starting seed depending on the way you walk

storm solar
dark drum
dark drum
storm solar
dark drum
storm solar
dark drum
pulsar axle
storm solar
dark drum
storm solar
#

The widget itself is a different blueprint class.

surreal peak
#

If you want to seamlessly move the widget from one head to another then you can forget about widget components

#

Let alone the freaking overhead they have.

#

Better to simply have a container in your HUD that you can add entries to from wherever you want and those entries then position themselves based on whatever logic you want.

#

E.g. Deprojecting a 3d location to 2d.

#

Or doing that on top of interpolating between the two locations to get your "moving from one to another"

#

I would always suggest using that setup anyway instead of using widget components.

#

That way you get full control, it's easier extendable and you can handle different widgets potentially overlapping cause they will all be in the same parent slot

#

@storm solar

#

WidgetComponents are mostly a VR thing to render 3D widgets. The screen space stuff is added fluff on top which you can do yourself just fine without the components

maiden wadi
#

+1 for ditching widget components for anything that isn't specifically world space 3D widgets. They're bad for screen space.

storm solar
storm solar
surreal peak
#

Slate or UserWidget, but yes

storm solar
#

ah gotcha, not widget components. ok

storm solar
pulsar vigil
#

yo if anyfolks have trouble understanding why the cast node can be a problem here is why (i have understand it after some time so i share it now cause it might help someone) IN BLUEPRINT *

CONVERSATION WITH CHAT GPT

so if i have a blueprint A that dont have to be loaded at the start but i cast to blueprint B wich will be loaded anyway, that mean that blueprint A will be loaded cause blueprint B need it to be if i use cast and therefore its bad ?
ChatGPT a dit :
ChatGPT

You're absolutely right! If Blueprint A casts to Blueprint B, and Blueprint B is loaded into memory at the start of the game (or whenever it's required), then Blueprint A will also be loaded into memory because it contains a hard reference to Blueprint B through the Cast To node. This can indeed lead to undesirable memory usage, especially if Blueprint A isn't supposed to be loaded initially.
Why This Happens:

The Cast To node creates a hard reference between the two Blueprints. Hard references cause Unreal Engine's garbage collector to ensure that both Blueprints stay in memory as long as one of them is in use, even if Blueprint A wouldn't naturally load otherwise.

spark steppe
#

Watch this recorded session from Unreal Fest Seattle 2024 that uncovers the truth behind Unreal Engine best practices.

Are Ticks really that problematic? Should you make all your meshes Nanite? Is the ChildActorComponent truly cursed? Should you never use Cast?

You've probably heard many of these so-called ""best practices”. Check out this v...

▶ Play video
#

watch this

pulsar vigil
# spark steppe https://www.youtube.com/watch?v=S2olUc9zcB8

i did already i know but i thought understanding concretely wich bp behave in what circumstance something valuable

And btw i was thinking what happen if u use a blueprint interface at the game start to set a variable of blueprint A* for example from blueprint B that require to be loaded anyway but the blueprint A where u set it should not be loaded ?

mb i forgot a part in my sentence*

Does it load the bp A that should not be loaded cause u have to to set the variable and therefore it would be the same as casting ?

surreal peak
#

But you shouldn't litter your project with Interfaces...

pulsar vigil
spark steppe
#

also an interface doesn't remove the necessity for something to be loaded

surreal peak
#

True but the Interface would in fact mean that the BP you try to avoid loading now has the chnace to be loaded later

spark steppe
#

it removes the necessity that whatever is loaded, has to be of a specific type

spark steppe
pulsar vigil
#

So i should use an interface and set that specific variable when its required only to be correct ?

spark steppe
#

we can't give you an answer to that without knowing the full context

pulsar vigil
#

Well i have an actor that will use the camera of my player character and i need a refence to my character but this actor dont have to be loaded at the start of the game

surreal peak
#

Loading your Character BP isn't always a bad thing. If your Character and the small feature are neee at the same time anyway

#

There is also a big chance that your Character isn't actually that overlaoded, cause maybe you were smart enough to use SOME Interfaces where it made sense, and SOME SoftReferences.

surreal peak
pulsar vigil
#

and whats the point of bragging(im not talking about u guys but just its everywhere) about interface if its not to use in that case i dont get it

surreal peak
# storm solar Could you break this down for me. Do you mean I would set up all the logic of lo...

You would usually have a Widget that represents your HUD. In there you could have some sort of Panel Widget, fwiw a CanvasPanel, that solely responsible for holding these "WorldLocation" Widgets.
Your HUD Widget would be created in your PlayerController or PlayerCharacter. You can get a reference to it from basically everywhere due to that, and then call some functions on the HUD to add and remove these "self positioning" "WorldLocation" widgets.
You can also put that CanvasPanel into another UserWidget and put that into the HUD for some cleaner code.
And these self positioning WorldLocation widgets would then be some base UserWidget you create, e.g. WB_WorldLocation, and in there you would code how the Widget positions itself inside the CanvasPanelSlot it will be in, if you add it to the CanvasPanel.

#

The CanvasPanelSlot has options to define the Anchor and the relative Location.

#

There are functions on the PlayerController to deproject a WorldLocation to a 2D Location.

#

And with a bit of math, google, and, if you are into that shit, ChatGPT (please don't) you can calculate then set that 2D position.

#

Pretty sure you can find that setup, or at least something like this, via google.

#

After that, every system can add these widgets to the Screen.

#

And if you add a "GetLocation" function to the base class that returns some Vector3D, which you can then feed into the math for the 2D Position, you can make child widgets of that one and override the function to return whatever location you want. E.g. the Character's location.

#

So it would be:

  • WB_HUD
    • WB_WorldLocationWidgetPanel
      • WB_WorldLocationWidget_1
      • WB_WorldLocationWidget_2
#

With the lowest 2 being added runtime to the WB_WorldLocationWidgetPanel's CanvasPanel.

surreal peak
pulsar vigil
surreal peak
#

You usually use Interfaces if you have multiple different classes that don't share a parent class and you want to still be able to call common function on them. E.g. an Interaction System where you want to interact with Actors, Characters, and what not.
You can also use Interfaces to abstract some implementations away, so that others can add new ones. An example is the OnlineSubsystemInterface, where each new implementation use that Interface with which the end-user then handles online stuff.

#

Using it to avoid hard references in Blueprints is in theory also an option. But you'd want to make sure you aren't spamming it everywhere just for the sake of eliminating every hard reference.

pulsar vigil
surreal peak
#

Spamming it around?

pulsar vigil
surreal peak
#

It becomes incredibly difficult to debug and read your code.

#

Adds tons of additional assets etc.

pulsar vigil
surreal peak
#

So yeah, you could call it complexity issue

#

It's especially bad if you end up having an Interface that really is only use for a single class

#

Like pulling all functions out of your Character into an interface

#

If you would have tons of different "things" that can be characters, and they can't share parent class, then having a Character Interface with all those functions would make sense

#

But just to stop the hardreference, it will make things really difficult to follow

#

There are a lot of cases where it makes sense to use SoftClass and SoftObject references

#

So that you load them during runtime when needed.

#

But even that is only needed if you are even loading them later

#

If you load Character and instantly the Mesh, then it#s redundant in theory

#

It would maybe improve the editor load times though

#

But you could for example have a Spawner Blueprint that uses DataAssets with the information to spawn the thign you want to spawn.
That DataAsset could be a soft reference, so the Spawner only loads it if it wants to spawn it.

#

And the DataAsset itself could also have soft references in it, for textures, or the class it represents.

#

That will help load times and what not, but again, has to be done in a way that it makes sense.

dapper dove
#

You don't ever have to use SoftXXX if the target device has infinite RAM and your target audience has infinite patience. When you don't use soft pointers, everything references everything else, and all of it will all be loaded on start, meaning the startup time will increase.

#

(how i understand)

pulsar vigil
#

well this is good to have written like this thx guys

surreal peak
#

If you have a MOBA with 160 characters, having them all hardreferenced in the GameMode or so via an Array of allowed Character Classes, you'd have one hell of a time. Especially if only 10 characters at max would be used.

#

If your game has 4 characters that will almost always be used together, then it might be redundant to think about it.

#

Ultimately you gotta ensure your editor and game load fast enough to your liking

#

Which is a subjective (and sometimes objective) thing which you can test via Unreal Insights and your own watch fwiw.

#

But it's def good that you are all aware of this and of the possibilities to fix it.

#

Last time I really had to fix it was for The Ascent cause the load time was too long for console requirements 🙃

#

At which point you have no choice anymore

dapper dove
#

When I just learned about it i thought it wasn't anything important. But after I optimized load times I cringe every time I see a hard reference that could be a soft one. Now I constantly think about what to load and when

#

I wish life was long enough to apply all optimizations

pulsar vigil
surreal peak
#

(that's a poor multiplayer joke)

dapper dove
#

thank god there are profiling tools for the engine, including a CPU tracer and a network traffic analyzer

#

I wanted to say "I don't know what I would do without them" but maybe I should know what to do without them

#

Does anyone do code reviews for BP code? Does anyone know anyone who does?

pastel apex
#

asking again, at least ideas on how to implement this. Basically the slide off of the enemy when doing a hard dive directly above them rather than hanging above them.

dapper dove
#

Is this your game or a reference to how you want it to work?

pastel apex
#

reference

#

that is wuthering waves

#

if you scrub around the midpoint of the vid

#

you see the character slid to the side of the enemy before hitting the ground

dapper dove
#

Do you use a character actor and a character movement component?

pastel apex
#

yes

#

i know default capsule collision behavior has them bounce

#

when step on is not enabled

dapper dove
#

character movement component can handle sliding. I don't know if it's good enough for you though. Have you ever seen sliding in action? You can see it when you slide along walls when you try to move into them

pastel apex
#

ye

dapper dove
#

This same mechanism may slide your character away from an obstacle below the character

pastel apex
#

right

#

but the issue is the default capsule behavior

#

where if the capsule collider hits the top of another capsule collider

#

and that collider doesn't have step on enable

#

it will bounce them upward and away

#

rather than let them slide down

dapper dove
#

bounce? bounce like a physics object? Or bounce like an object with a glitchy overlapping collision? Can you show how it looks?

pastel apex
#

you can replicate it if you have two characters

#

and drop one character directly on top of another character

dapper dove
#

some gravity or falling shenanigans. Character movement component has a falling behaviour, maybe it does something unusual when you hit an uneven floor (for example, top of the capsule). I'm reading the source code for it rn, maybe I can figure it out without launching the editor

pastel apex
#

i would love to know where in the source code it's doing that

dapper dove
#

is physics enabled? disabe it, anything changed?

#

bEnablePhysicsInteraction

pastel apex
#

i did not have physics enabled

#

cause otherwise i cannot move with movement component

pastel apex
#

wait yeah i just realized

proud bridge
#

how can I enable this "show only actors" section in 2d scene capture

surreal peak
#

Don't think you can fix this without your own CMC child class.

surreal peak
surreal peak
#

I added that to Mover for a client of mine, so that the player slides off of anything that is not walkable.

#

In theory it's just applying a force into a given direction while adding gravity.

proud bridge
surreal peak
#

"force" being just velocity of course

errant raft
#

Does anyone know why some nodes get replaced randomly with 'PLACEHOLDER CLASS' type?

#

And I cant fix it, unreal keeps doing it on restart

warped juniper
#

How would you approach a system for detecting whether or not an actor is visible to the player camera?

#

I had one in mind based on a series of line traces, but I feel it'd be unperformant or obtuse.

vale narwhal
#

hello , i'm doing a coin pusher game , and i want to destroy the coin when it falls off the machine ( i tried multiple things and even the simple fact to destroy the coin if it collide with anything doesn't work ) , someone can help me know what am i missing here ? thx
here is my BP_Coin :

unreal epoch
#

You are destroying the logic before the string is called

#

Destroy actor (self) should be at the end of your logic

vale narwhal
#

ok , but even if i put the print before, it doesnt change anything

unreal epoch
#

idk how you are hitting it either, but you might want to do a line trace by channel for visibility and break hit. I don't know how you're checking the hit

vale narwhal
#

i'm not checking the hit

#

( sry i'm new to bp )

#

i tried on my own then followed this tuto
https://youtu.be/3TnmhfKGTC0?si=x-OGO5akJTCK0xj7&t=84

Learn Unreal Engine 5 for free with my fun UE5 tutorials!

Unreal 5 Game Development Masterclass (90% Off) https://tinyurl.com/unrealengine5

Try a course at: https://training.mammothinteractive.com/

The best way to support our channel is to subscribe to my online courses on programming and more. 20-60 hours of content added every month. Clic...

▶ Play video
#

the guy on the video doesn't check for the hit as far as i understand, he fire , and if the projectile hit anything , it's destroyed

#

i make my coin fall by gravity on the box and it collide with it

unreal epoch
#

so are you using a projectile? if not, if the goal is just for collision and physics simulation, you don't even need dedicated BP logic for that. Just select the mesh components or default scene root and select the box 'simulate physics' you can adjust the mass too which will give you leeway on how it interacts. Also make sure collision is set to block other actors so it collides properly

#

These should be found in the details panel of the BP actor

vale narwhal
#

no i'm not using projectile like him

#

ok thanks i will try to make it work

maiden wadi
tawny flame
#

I'm a C# programmer just starting with blueprint and I have a question about printing. Is there a node equivalent of a string.Format operation with arbitrary number of string inputs? Right now I use Print String, which is fed from Append String, which is only appending two strings together at a time, which creates disproportionately giant sections for very simple prints like Filtering by tag X, got 24 results. I'd like to have a single node equivalent of print (string.Format ("Filtering by tag {0}, got {1} results", tagName, resultCount)). Something like a big text field node to which you can drag any number of String connections.

maiden wadi
#

Which you could just convert to string. Or use PrintText.

tawny flame
#

From what I understand FText is for user facing localizable text. Is it fine to use for developer only utility prints?

warped juniper
#

Particularly, damageable areas in enemies

maiden wadi
tawny flame
#

And connecting random value types doesn't pollute the graph with cast nodes, awesome!

#

One last question about this: is it possible to edit text on nodes like these via the Details pane or via some sort of dedicated multiline popup? It's somewhat awkward to type long strings into a tiny input field on the nodes and having the node resize and cover nearby nodes after every text edit you make.

frosty heron
# pulsar axle does this make my storing data in exits idea not so terrible <@10509542299022131...

No, I can't think of anyway that is justifiable.

If I were in your shoes, I would have pre defined ammount of entries. E.g 2000 rooms info.

Reading squize suggestion I would use grid based system, so we can calculate based on the player location in relative to the world location, which grid the next room is.

The rest is just pulling the corresponding data from the element.

The random part would be generating the info and that can be done with seeds.

maiden wadi
maiden wadi
frosty heron
#

That bool is pretty unreliable from my experience.

warped juniper
maiden wadi
#

What is the in camera view for?

warped juniper
#

There is a lock on system. Basically just to know if the player can lock on them, then a line trace is done to all the damageable area components to check if they are valid targets

maiden wadi
warped juniper
#

It works by tracing a line towards components of tag X, so if you shoot for tag "body" you have scene components in the body that can be unblocked in camera view. Then you attack one at random

#

The multiple components is for fast accuracy and cosmetic impact VFX spawning

ruby cobalt
#

what the hell is this?? the same thing works with the other ABP I'm using.. exactly the same trick

#

ahh my bad

#

time for a clean up in there.. i got some obsolete stuff with similar names

maiden wadi
# warped juniper It works by tracing a line towards components of tag X, so if you shoot for tag ...

Depending on desired effect, if you only simply care about whether they're on the player's screen, then I'd be inclined to say follow ColdSummer's deleted note of projecting them to screen.

I'm hesitant to fully commit to that idea though simply because it's cheatable. Someone changes their field of view, or has a widescreen monitor and suddenly they have an advantage or disadvantage. Not likely an issue in singleplayer game, but still a point to keep in mind.

warped juniper
#

Hmm... Projecting them to screen could work, but how expensive it is?

#

But in regards to recently rendered

#

I could make it a different way

#

How expensive would it be to make, roughly 10 to 20 line traces every update?

maiden wadi
#

For the traces, probably not much. But everything is relative. Something "cheap" in one project is a crippling component keeping you from your 60fps target in another project.

Regarding the projection to screen space, that's very cheap, it's basic point is in box math. In fact Epic added some box nodes recently.. I wonder iiiiif...

warped juniper
#

Hmm I see

#

I can talk about the purpose behind it for a moment

frosty heron
#

20 line trace is nothing

#

You can do a thousands and it should be fine

#

Most people probably know how vats in fallout work

warped juniper
#

Current idea is to have the player see the overall hit chance of the attack targetting an area displayed on screen, OR if the attack can be performed at all (because it may be blocked)

Since the game is real time that means the game needs to do this every update or it won't be accurate

#

Which is a bit of a bummer since it's a binary but if the cost is negligible it should be okay

maiden wadi
#

Something like this would be the projection to screen box check I think.

warped juniper
#

Then again I'm early enough that I may just end up reworking it in a way that way fewer lines are needed

maiden wadi
#

But of course this doesn't help check for occluding things that may still be in screen's space. So probably wasted effort over a trace in the first place.

warped juniper
#

I have never used that node before so it never crossed my mind

warped juniper
warped juniper
#

Or close enough at least... Something to use a Point instead of a collider for collision checks mostly

maiden wadi
#

And this is exactly why I feel like I have ADHD some days. I go off trying to learn about something, and I find something else neat completely unrelated to original topic and want to put it in a different project.

warped juniper
#

I was suggested using a radius collision of 0 though. No idea if that's safe

supple ridge
#

Why is this binding giving me this tooltip? Even though it claims no value will be returned, it actually passes the data I want and is working as intended. Not a real problem, just curious if anyone has seen this before

maiden wadi
#

It will pass the data, but not by reference.

#

Meaning if you intended to pass a reference to a property, and then reassign it and expect the original property to change, then it won't do that.

tawny flame
#

I have a question about behavior of local variables within loops. My basic understanding of "local" is "local to the function body of a given blueprint", as in "declared at the top of a function".
I see a few examples where a "read local variable" node is utilized with an array variable within a loop. The variable is then used as if it was completely guaranteed to be empty, despite multiple loops occurring due to earlier foreach node. Printing the contents of the variable tells me it's indeed unique per each iteration of the loop and doesn't keep accumulating entries, despite looking like it should. What gives? Where's the hidden "clear the array" operation in this graph?

My only theory is that on-blueprint variables do not actually have class-wide scope and that the first instance of "read local variable" node is equivalent to declaring a local variable deep within your function. If you first use a local var within a loop, it's local to current iteration of that loop, ergo always empty. Something like the following code. Is that right?


void MyBlueprintMockup ()
{
    // TArray<Actor> MyLocalVariable;
    // My intuitive understanding of how "local" variable would be declared - at the start of a blueprint run
    // But this doesn't seem to be the case

    foreach (...)
    {
        // If you first use a local variable within a loop, it seems to be empty every loop, so it probably gets declared like this?
        TArray<Actor> MyLocalVariable; // unique and empty to each iteration
    }
}

(Ignore the missing execution link to Append in the screenshot, got it fixed right after taking it, sorry!)

tawny flame
#

Oh, sorry, ignore the whole thing, local vars are properly local to function scope. If I see it right, the mistake I made was logging the output of Get Attached Actors, which is guaranteed to be a unique collection every time, and not my own local var accumulating child objects. Doh!

cold lion
#

Hi I am stumped trying to make a simple buying system. I am confused on how to communicate to the widget where to subtract coins from the players coin component? The subtract function works on it's own but not when called from in the widget. The Item system is just a yes and no button with a picture of the item. It comes up in game and the no button works, closing the prompt

storm solar
# surreal peak If you want to seamlessly move the widget from one head to another then you can ...

https://forums.unrealengine.com/t/deproject-project-are-there-similiar-functions-outside-of-hud-canvas/295364
So i didn't find the math for deproject screen to world. Project world to screen seems to be doing ok besides the scale.
Any suggestions for what to search for the deproject route. I found a bunch of youtube videos in unreal, and some general math ones. But none doing exactly what i was looking for.
like this: https://forums.unrealengine.com/t/convert-3d-hit-location-to-2d-character-image/2004847

Epic Developer Community Forums

I could really use them outside of HUD. but right now Project/Deproject for all practical purposes are accessible only from HUD or Canvas. Are there static/World function that would accomplish similar thing ?

crude sedge
#

How can I have an Interface be a reference to my WBP_Main?

frosty heron
cold lion
#

i got it to work after a bit. I am now stuck on getting the character being talked to to spawn the item

frosty heron
#

Why is your character the one spawning an item?

#

What's the context here.

cold lion
#

you buy an item, then from a spawn point the item would show up. Like a table then you would get close enough to collide with it to collect it

frosty heron
#

The merchant would be the one holding the table location too, to spawn the item.

#

Not the player.

cold lion
#

that's what I am intending to do

#

I have a location in the merchant to spawn but I don't know how to reference it correctly either in the component or UWBP

frosty heron
#

Well the widget should know both the player and the merchant.

#

It really depends on the game but for simplicity you can make the merchant be the one to spawn the widget

#

You can easily pass the buyer (interacting actor) and the merchant reference to the widget when you spawn the widget.

#

So your widget shop now knows who's component to use to subtract the money and the merchant to spawn the item.

cold lion
#

it knows to subtract from the player coin component and who the player is, but then how would I make it work with another actor? thats is where I am stumped

#

this is the widget

frosty heron
#

On your widget shop, create a variable called merchant. Set the type to actor reference or you can use your bp merchant

#

Set the variable to instance editable and expose on spawn

#

Now when your merchant spawn the widget, get self then connect it to merchant variable that is exposed to create widget node.

cold lion
#

I see, so then the logic for the spawning the item would then be added to the base character class or handled otherwise?

frosty heron
#

No, no the function to spawn the item should be exclusive to merchant bp

#

Unless the player can sell items too

cold lion
#

okay I see thanks I will try it

frosty heron
#

I will hang around for a bit if you need further help

cold lion
#

thank you I have been taking lessons on this so trying this from mostly scratch is a bit confusing

frosty heron
#

We all learn everyday

cold lion
#

Alright I got the merchant part but how can I call the logic to spawn the item that is already inside the merchant? since the actor reference doesn't have the logic itself

#

the merchant is a child actor

frosty heron
#

Btw instead using actor reference just use your merchant class and the reference

cold lion
#

hes a child actor of the character class

frosty heron
#

So a pointer (object reference) to a merchant type instead of actor

cold lion
#

okay I will try again

frosty heron
#

Btw for further reference you can cast the actor but it's not neccesary at all in this context.

#

As you only need to know the merchant, not a collection of something that derived from common base class.

cold lion
#

so from the merchant how will it know how to start the "Place Item" event after I press the button on the Sell screen?

frosty heron
#

Button sell -> get merchant -> sell item function

cold lion
#

thank you I get it now

#

I have trouble understanding the communication of blueprints most

autumn pulsar
#

can you not use async load in a function?

cold lion
#

the sell menus is inside the dialogue component for this and is triggered with an alternate interact

frosty heron
frosty heron
#

That way you can pull any data from the buyer instead just the coin component.

pastel apex
#

ok found out more or less how to do that wuwa style of bounce

#

or really just no bounce, turns out there's a parameter called JumpOff Jump Z Factor that i can set to 0 to avoid being flung upwards and still be flunged side ways

frosty heron
pastel apex
#

ye

#

honestly kinda funnny it took diving into the source code

#

to find out that variable is exposed to the editor

frosty heron
#

there are plenty of divers

#

how else would we know what's on the bottom of the sea

cold lion
vestal totem
#

Hi All,

I'm new here, and pretty new to Unreal.

I'm trying to figure out an issue with my Turn In Place blueprint. Currently, I can rotate my character and after +/-90° it calls an Animation Montage to turn the character. This works properly, but after the montage finishes the character snaps back partially.

I'm basically disabling Use Controller Rotation Yaw when standing still, then checking for a rotation change. If that exceeds a threshold (+/-90°), it sets Turning=True (to avoid multiple triggers) and then runs (via a Run on Server > Multicast chain) a function to play the montage.

On completion (or interruption) of the montage, it sets Turning=False, stores the current Actor rotation (for future rotation delta comparison), and finally reenables Use Controller Rotation Yaw.

As far as I can tell, the issue stems from over rotation. The camera turns up to 90° with the characters legs held in place. The animation plays, but now the character turned 180°. Something corrects and turns the mesh -90° to match.

I don't know what's snapping it back and how to fix it?

cold lion
broken wadi
#

Because everything on your Hierarchy pane is locked including the selected element called Border.

willow whale
#

so im looking for something that will teach me how to do random craft rarity with random stats on items. does anyone out there know of any guides or tutorials

trim matrix
spring yew
#

Hello everyone) Please tell me how I can synchronize the sound with the set? I have a mine, it blinks (light) and makes a “beep” sound.

#

Here is a blueprint of the blinking light.

gentle urchin
#

Then use the seed in all the calculations / chances / values

#

Seed <-> Stream

trim matrix
# gentle urchin Seed <-> Stream

If the seed is staying still all the time, is this means it will give predictable results? Is random values in range uses seed ? (If yes,) How to avoid it in blueprint nodes?

gentle urchin
#

Using the seed gives you deterministic outcomes, yes

#

So you randomize the seed when an item is created

#

Which means the item will be unique as long as the seed is unique

hardy merlin
#

Hello. I have an ability where the character goes airborne. How can I detect when they've touched the ground after? There doesn't seem to be any useful bindings in character movement component.

maiden wadi
hardy merlin
maiden wadi
hardy merlin
#

Oh you meant function. So I have to override it, I can't bind.

#

Thanks.

#

Looks like there's a C++ event I can bind to.

maiden wadi
#

There's a delegate too.

willow whale
#

@trim matrix really thought that was unreliable on unreal bps

willow whale
#

its never got me much of anywhere on some of the stuff ive tried but generalized stuff

trim matrix
trim matrix
maiden wadi
#

I'm not sure I'd go so far as to say anything.

willow whale
#

and that would help me not only do the random stat but also the rarity with those ranges

maiden wadi
#

Stream from seed

trim matrix
maiden wadi
#

It's just a lot of data manipulation really.

willow whale
#

ok i should clarify it as a stat modifier. So lets say i have a tool with harvest damage and health damage and i want it to randomize with rarity the amount each rarity could add to the tool and only apply to the harvest damage

maiden wadi
#

Okay so first you randomize the rarity. Then lets say for like harvest damage. You have a list of ranges that a tool can have for each rarity for each stat. So you pull harvest damage's range using the rarity you already randomized, and randomize a float within that range.

trim matrix
hardy merlin
hardy merlin
#

So if someone else used the same seed they would get the same random numbers. (Note that the actual random numbers are usually generated as raw random bits and then scaled to useful ranges)

trim matrix
#

that's what I understand

hardy merlin
maiden wadi
#

TBF Stream in this case is just a name someone gave this data type here. It doesn't really match with the computer science definition well.

trim matrix
hardy merlin
#

It's actually a problem in software where randomness REALLY matters, like gambling and network security, because a powerful enough computer can reverse-engineer the seed and predict what numbers will come next.

zealous moth
#

If i have a well established struct and I add a new variable, a boolean, nothing happens. If I convert it to a string, sure! But when it becomes an enum, all hell breaks loose and several functions are invalidated. Anyone have any idea what is happening?

hardy merlin
hardy merlin
#

Typically seed is chosen from the current Time of the electronic device.

trim matrix
#

thank you so much for helping

maiden wadi
zealous moth
#

is there a workaround?

#

so far most of my work is slowly drifting to intense regex

#

and as much as I like hardcore regex, it's tough on the fingers to type and parse it

gentle urchin
#

Just dont change variable types ? 😅

#

Or do it in c++

maiden wadi
#

C++ structs. Or getting really used to fixing BPs.

late lynx
#

How can i achieve this

#

i dont want to make button/images for every key on the keyboard

spark steppe
vagrant cobalt
#

one of the weirdest bugs I've seen in Unreal is this one while clicking on the mesh the Unreal will crash and then after opening it back the mesh will completely vanish. you can see in the picture that I'm clicking on the mesh but it does not show it in the viewport or show any details panel (the Dragon in the viewport is not the mesh it is a static mesh)

vagrant cobalt
spark steppe
#

duplicate it and see what's left

#

usually unreal will skip corruption on duplication

vagrant cobalt
spark steppe
#

and it still crashes?

maiden wadi
vagrant cobalt
spark steppe
#

so it's fixed or not? you send mixed messages...

vagrant cobalt
maiden wadi
#

Yeah. BP's pointer to the mesh probably serialized bad. So it's loading nullptr. The mesh component is likely still there as a subobject. You can try that plugin tool to reset it using the editor utility

errant raft
#

Did UE 5.5 break some blueprint nodes and permamently replaced them with ''placeholder class'' for anyone else?

lusty birch
#

you miss some plugins probably

pulsar axle
#

Hey does anyone know how to change the pivot point of a model on the fly using blueprints?

pulsar axle
# faint pasture at runtime?

When the game is running.
I have a map generator, it needs to place rooms, the pivot points of the rooms need to changed so they can be placed perfectly on the selected exits, it's a long story.

faint pasture
#

or use math

#

is a room just a mesh?

dark drum
pulsar axle
#

yes lemmie record a video explaining it propperly hold on

digital glacier
#

anyone see a replication issue here?

dark drum
faint pasture
dark drum
faint pasture
#

how do you expect that data to get there

#

your ONLY way to send data to the server is through a run on server event

dark drum
faint pasture
#

use sockets or scene components (your arrows)

errant raft
#

I cant get rid of this error

#

its only possible to temporaily fix it

dark drum
digital glacier
#

is it not reccommended to use functions from other BP's ? does it matter

faint pasture
faint pasture
#

you have to remember that your multiplayer code represents multiple objects on multiple machines

errant raft
#

Those classes are from a plugin

#

but its embedded in content folder now

#

so idk how it would reference a plugin

pulsar axle
digital glacier
olive sedge
#

hey guys.. been trying to make my inputs mappable.. why does GetAllPlayerMappableActionKeyMappings return an empty array here?

dark drum
faint pasture
errant raft
#

and this error never happened before for years

digital glacier
#

i have a door buying bp that has functions to check money / change , etc

#

and i have a menu as wlel, wondering if should incorporate those functions here

#

or constantly call them

faint pasture
#

OK, think about it this way

dark drum
faint pasture
#

what is the minimum amount of data the client should be sending to the server to notify them of what they're trying to do?

#

is it "I want to buy this door"?

#

whatever that means

digital glacier
faint pasture
digital glacier
#

this is what i mean

#

is this inefficient

#

this function is based in another bp

faint pasture
#

Multiplayer is a whole can of worms, you're probably going into it too early tbh. But anyway, here's the general form of anything you'd want to do.

Client:
Input -> optionally do some local checks etc -> tell the server something (I want to buy XXXX door or whatever) in a run on server event

Run on Server Event -> take the passed in data, do whatever checks, do the thing, set some replicated state or spawn actors or wahtever

pulsar axle
dark drum
# digital glacier this is what i mean

Personally, if you're checking if the player can purchase something, it should be handled server side. If it's possible, the server would then tell the client what it can do.

digital glacier
#

OK, but you guys are missing the question

#

Is calling a function thats from another blueprint inefficent

maiden wadi
faint pasture
#

makes no difference

olive sedge
digital glacier
faint pasture
maiden wadi
#

@olive sedge Do note, you need to call this before, somewhere as well.

faint pasture
#

I know you can do it in one shot with transform / inverse transform nodes but I'd have to think a minute

pulsar axle
faint pasture
#

Is the rest of the map attached to the hallway?

#

you're moving the closet

#

or you can move the room, either/or. Pick one thing to not move, and move the other

pulsar axle
#

We need to moving the latestroom, (the closet) so we cant move the hallway

#

bc the hallway connects to the rest of the map

faint pasture
#

ok so invert what i said

olive sedge
#

@maiden wadi can I use this one? if not, what's that LocalPlayerController node?

maiden wadi
pulsar axle
faint pasture
#

You want to place a room such that its entry socket aligns with an existing hallways exit socket, right?

#

socket being the thing that represents where things should snap together, your arrow or a socket on mesh or whatever

pulsar axle
#

As I said, I have the position of the arrow SelectedEntryPoint and the position of the room LatestRoom and the position of the SelectedExitPoint

I cannon't simply move the LatestRoom to the SelectedExitPoint, because that wouldn't be the position of the SelectedEntryPoint anymore.

maiden wadi
#

@olive sedgeJust some extra helpers in my debug stuff that helped me put together mine. 😄 Reset to default, a test for mapping a key to the second key slot. And a debug print to print out all of the mapped key slots.

faint pasture
pulsar axle
#

SelectedExitPoint belongs to the room prior, as it represents the exit to the room prior. (And so it can't be moved, as it belongs to a room connected to the map now.)

SelectedEntryPoint is a randomly chosen doorway in the LatestRoom.

LatestRoom is the room being added to the map in this process, it CAN be moved as this process is what is attaching the SelectedExitPoint from the prior room to the new SelectedEntryPoint of the lastestRoom

olive sedge
#

@maiden wadi the EILPS is valid, th EnhancedInputUserSettings are not :/

pulsar axle
pulsar axle
faint pasture
pulsar axle
#

also thank you

trim matrix
#

I'm kind of crying for help right now, haha. I keep getting this unknown error every time I package my game fully in UE5. I've tried a lot, like downloading the SDK and such, but I'm still pretty new, so I’m not sure if I did something wrong. Can anybody spot the issue in this text? Just spam me if you need more details. 🙂

Thanks!

MapCheck: Warning: M_Base_Props Material /Game/ModSci_EngiProps/Materials/WaterDrum/MI_WaterDrum.MI_WaterDrum was missing the usage flag bUsedWithInstancedStaticMeshes. If the material asset is not re-saved, it may not render correctly when run outside the editor. Fix

MapCheck: Warning: _M_Master_Material Material /Game/Polar/Materials/Architectural/M_Generator_Off_Inst.M_Generator_Off_Inst was missing the usage flag bUsedWithInstancedStaticMeshes. If the material asset is not re-saved, it may not render correctly when run outside the editor. Fix

MapCheck: Warning: M_BasicMat Material /Game/TokyoStylizedEnvironment/Materials/Unique_RoadBarriers/MI_RoadBarriers.MI_RoadBarriers was missing the usage flag bUsedWithInstancedStaticMeshes. If the material asset is not re-saved, it may not render correctly when run outside the editor. Fix

PackagingResults: Error: Unknown Error

Here is the full error

https://docs.google.com/document/d/1zMt0DaSQjnhW06UXoNoMtTJ0ewNucRzTIcmfk0gPcFU/edit?usp=sharing

pulsar axle
pulsar axle
faint pasture
pulsar axle
maiden wadi
olive sedge
#

they are.. I think it's because of LocalPlayer.. I kinda just don't have that

maiden wadi
#

You have to if you have a controller.

olive sedge
#

@maiden wadi what does your LocalPlayerController node actually do?

It's odd.. I just added a 2 second delay to make sure it's not because the system is not yet properly initialized or something but GetEnhancedInputUserSettings is still not valid

maiden wadi
#

This is enabled, right?

olive sedge
#

@maiden wadi ah! there we go! thank you!

maiden wadi
# olive sedge <@143471961723371520> what does your LocalPlayerController node actually do? It...

For the other question, it's literally just this.

.h

template<class TemplateClass>
static TemplateClass* GetLocalPlayerController(const UObject* WorldContext)
{
    static_assert(TPointerIsConvertibleFromTo<TemplateClass, const APlayerController>::Value, "");

    UWorld* World = WorldContext ? WorldContext->GetWorld() : nullptr;
    UGameInstance* GameInstance = World ? World->GetGameInstance() : nullptr;
    return GameInstance ? Cast<TemplateClass>(GameInstance->GetFirstLocalPlayerController()) : nullptr;
}

UFUNCTION(BlueprintPure, Meta=(CompactNodeTitle="LocalPlayerController", WorldContext="WorldContext"))
static APlayerController* GetLocalPlayerController(const UObject* WorldContext);

.cpp

APlayerController* UAuthaerObjectLibrary::GetLocalPlayerController(const UObject* WorldContext)
{
    return GetLocalPlayerController<APlayerController>(WorldContext);
}```
olive sedge
#

I see

pulsar axle
woeful dawn
#

Hey, was just wondering if anyone could help me out with something. I’ve got global time dilation running to slow down time however, I also have a timer by event running which runs every 1/10 of a second to calculate a progress bar.

Problem I have is that the global time dilation is affecting the timer by event meaning, the timer goes slower. Is there way to make it so the timer by event is not affected by global time dilation?

pulsar axle
# pulsar axle

Ah @faint pasture I found the flaw! It wasn't getting the child component

#

It picked a door, but it's not rotating it correctly hmm

#

I feel like we need one final multiplication that accounts for the rotation of the lastestRoom

pulsar axle
tropic peak
#

I'm using an array of structs to set up the day parameters. each day is added manually to the array (screenshot 1). However it fails the validity check for some reason. For some reason I feel like it's not recognising the array values at all.

#

First screenshot, corrected

lusty birch
#

Debug currentday integer

tropic peak
#

it's not that, I already done this. tested with 0 and 1, as there are two entries in the array

#

0 works fine, 1 breaks

#

so it doesn't recognise the second value at all like it's not there

olive sedge
#

@maiden wadi do you know how to get these by any chance?

tropic peak
#

Is there an issue with struct arrays? I can't think of any other reason.

#
Epic Developer Community Forums

Hello mavendigital, I ran a few tests on our end, however I was unable to reproduce the issue that you have described above. I have a few questions for you that will help narrow down what issue it is that you are experiencing. Quick questions: Can you reproduce this issue in a clean project? If so, could you provide a detailed list of steps ...

#

post from 2016 but.. same stuff lol

#

I'll restart the editor and see.

olive sedge
#

@maiden wadi these seem to not include it

lusty birch
#

so dont use is valid index, just check ind <= array last index

tropic peak
#

does it really matter

#

it's not fetching the array value it should (as it is there)

#

it's not the array length issue

lusty birch
#

so is valid returns true?

maiden wadi
tropic peak
#

if I fetch the value from position '0' - yes. the problem is the editor does not see any additional array entries while there are more.

olive sedge
tropic peak
#

Adding any additional array entries doesn't help either. It only sees the first one. weird.

lusty birch
#

5.5?

tropic peak
#

yep

lusty birch
#

yea it crashes ue lol

#

seems new bug

#

Ill try with cpp struct

tropic peak
#

achievement unlocked I guess, heh

spark steppe
#

i'm pretty sure that this works fine in 5.5

lusty birch
#

CPP struct no crash

tropic peak
#

well it's not crashing for me but it's not working either :p

lusty birch
#

I dont do valid check to crash engine

#

just testing

marble tusk
tropic peak
#

damn, you're right

#

I would've never figured that out.

marble tusk
#

Yeah, I've had that before. I think if the variable isn't the default value, then any changes to that variable in the blueprint editor don't change the instance since it has its own instanced value

tropic peak
#

hmm is there a way to force some sort of an update on the actor?

marble tusk
#

Not sure other than just deleting and placing it again. Maybe there's some reset to defaults option somewhere

lusty birch
#

ah right made same mistake

#

just compile it should update placed actors unless you modified array on them

tropic peak
#

nah it doesn't. i'll just make a function to update all actors with the editor array values

#

thanks @marble tusk @lusty birch

olive sedge
maiden wadi
olive sedge
#

basically anything.. I want to mostly work in blueprint since I want to distribute it later but I can use some c++ helpers if I need to.. currently I have this

#

and then currently I do this @maiden wadi

maiden wadi
#

Check out the debug prints I showed earlier. It has the data for each. The struct has the "AssociatedInputAction" in it too.

olive sedge
#

thanks so much!

prime stump
#

Hi, I'm making a little effect for my main menu where the camera will slowly rotate based on where your mouse is, clamped between specific values.. I've got it mostly working however the issue I'm having is that when i play on my normal monitor (27-inch) it looks fine, but when I play it on a laptop (14-inch screen) you're able to look left/right/up/down far more than you can on my normal monitor.. So it seems that screen size determines how much the camera can move, or at least appears to move, in any given direction despite me having it go between specific max values.

I'm not sure if aspect ratio has anything to do with it however Constrain Aspect Ratio is ticked.. or maybe the FOV? Does unreal do any auto-FOV stuff based on monitor size/resolution or something that i'm not aware of?

Any ideas how i can make it so the camera can only move a certain amount in each direction, regardless of screen size, resolution ect..?

maiden wadi
prime stump
#

From what i can tell i dont think its to do with the resolution

maiden wadi
#

DPI scale might be changing in that case. There's a multiplier for that somewhere that you'd have to apply I think.

prime stump
#

or is there some math i need to do lol

pulsar axle
maiden wadi
#

Depends on the issue. 😄

maiden wadi
pulsar axle
pulsar axle
#

rooms are being placed exactly where they need to be, only one issue, the room isn't being rotated to match the doorway

pulsar axle
prime stump
# maiden wadi There's a... I don't remember the name off hand. ViewportScale or something I t...

Oh yeah theres a Get Viewport Scale node.. In my Calculate Initial Offset function where im using Get Viewport Size, do i just need to multiply in there straight away before i divide the viewport size with the mouse positions? or would i do all of that first and then multiply it by Get Viewport Scale just before it goes into the clamp which sets OffsetX/OffsetY? Im not great at this math stuff 😂

maiden wadi
pulsar axle
#

here's a full break down.

and here's all the variables in play atm:

SelectedExitPoint belongs to the room prior, as it represents the exit to the room prior. (And so it can't be moved, as it belongs to a room connected to the map now.)

SelectedEntryPoint is a randomly chosen doorway in the LatestRoom.

LatestRoom is the room being added to the map in this process, it CAN be moved as this process is what is attaching the SelectedExitPoint from the prior room to the new SelectedEntryPoint of the lastestRoom

maiden wadi
prime stump
#

When i play it on the pc, it doesn't look like it changed anything which i think is a good thing cause it looked fine on the monitor anyways

maiden wadi
pulsar axle
#

So, this is the starter room

#

the one that doesn't move

#

the "brown one"

pulsar axle
#

I think the math is just wrong

#

well

#

kinda

#

I mean it does get the room perfectly placed in the doorway

#

its just the rotation of the room doesn't quite work

trim matrix
#

I have got problem recently, which is,
I have got AI which I want it to move on air also (Mostly Air) but incase of nav mesh bounds volume, it works only in just ground
So I tried several things like an searching in Nav Mesh details, for like finding a click icon "Hey! Click here and your character will be flyable!" But as you guessed I didn't find those things
Also tried to ask my friend GBT, but he said there is nothing I can do, so anyone who knows ?

pulsar axle
#

because then it would be as simple as spawning the room, changing the pivot point to where the entrance needs to be, and bob's ur uncle.

solemn agate
#

Hey all, question for anyone who knows. Is it possible to get the camera auto exposure level in blueprints? I want it to drive a function on my character.

cloud geyser
#

If im starting to learn ue5, should I just stick with blueprints and learn c++ later if I need it or no?

trim matrix
inland walrus
#

How do I detect if anything is above the players head (need to detect if crouching can uncrouch or not)

trim matrix
storm solar
#

using project world to screen to have a widget go over a actor. What is the math behind scaling it? I have the distance from the actor to the camera... but what is the exact maths behind getting it to scale appropriatly?

cloud geyser
#

also why does ue5 have motion blur default on in settings, is it just me or does motion blur look horrible?

storm solar
#

it might be the camera lag/ delay settings?

cloud geyser
#

no, i just turned off motion blur in ue5 settings and it looked 10 times better

#

its just weird, I'd think it's cus the laptop im on is really bad but motion blur also looks terrible on my good pc at home

inland walrus
#

Right now my character will register as uncrouched when they release key, I need it to detect if they are still crouched in movement, if they are then dont uncrouch

#

Any ideas

trim matrix
#

how to use cue4parse?

runic ore
#

Did anything change on widgets / widget component with widgets being placed in world space in regards of Tick? it seems tick is called two times and then won't tick again. I just created a test widget with a counter that changes a texts text each tick but this just runs two times and then stops, but I don't quite understand why it stops ticking. My guess is it's broken since some engine upgrade. either 5.4 or 5.5

hollow pond
trim matrix
narrow pendant
#

I'm trying to let my character hold onto objects. when the character holds onto an object, I want their movement to be constrained around that point.

I've played around with creating a physics constraint between a primitive component on the target actor and the capsule of my character, however movement is not constrained by that.

How would you do this?

#

ah god damn simulate physics needs to be on for the child but I obviously don't want that on for the capsule

loud tree
tropic peak
#

are widgets (ones added to viewport) visible anywhere in the editor outliner when the game is running?

narrow pendant
#

there's the widget reflector

#

other than that only a "HUD" class actor gets spawned for me

prime stump
# maiden wadi I had to double check something. Inside of your CalculateInitialOffsets, can you...

Tried this on the laptop but the mouse is still able to move so far right that Keir Starmer wants it in prison lmao so it didn't seem to make a difference if not slightly worse somehow lol im wondering if FOV has anything to do with it cause even tho i have max offsets that it can move each direction in but a change of FOV on the laptop could mean moving 15 units to the left or right is much more than the FOV on the monitor, not sure if the camera is doing some auto-FOV thing maybe

#

gonna investigate

final mortar
#

Hello! I am trying to achieve a control scheme for a top down game in the style of Hades or Ravenswatch.. when pressing quickly a directional input, the character should rotate to the direction completely. Cranking the rotation rate to a high number doesn't work. I came up with this solution but it doesn't quite work :

#

does anybody know how I could achieve that ?

surreal peak
#

It's on the Character Movement Component and has something with Orient to Movement in its name iirc.

#

Needs the Character to not use Control Rotation Yaw (also a boolean, on the Character though).

#

If you want to do the math yourself, yo ucan also use the "Acceleration" on the CharacterMovementComponent for the World Direction of your Input.

#

And rotate the Character towards that on Tick or so

#

With the edge case of the acceleration being 0,0,0 if you don't press a key

final mortar
#

yep I am using Orient to Movement and it does work as the character rotates towards the direction input, but takes the rotation rate value to rotate the character. Basically if it's too low, it rotates as long as you have the input pressed, if you release the input, the rotation stops

surreal peak
#

Right, then do it on tick. Grab the last non-zero Acceleration and rotate towards that.

#

Wouldn't use a Timeline for that

#

Tick -> GetAcceleration -> If not Zero set as Target Direction (normalized) -> SetActorRotation to Interpolated value from Current Actor Rotation to Target Direction (Rotation)

final mortar
#

yeah the timeline is probably what's giving me hectic results

ocean helm
#

Hi! I'm relatively new to Unreal and currently learning Blueprints through a course. I think I'm having an issue with inheritance. Initially, I had an animation override in the BP_EnemyTemplate Blueprint, and everything was working fine. However, I wanted both my character (BP_RedHood) and enemy (BP_Skeleton) to inherit the attack override. So, I moved the function from BP_EnemyTemplate to BP_CharacterTemplate, from which BP_RedHood also inherits, while BP_Skeleton inherits from BP_EnemyTemplate.

After moving the function to BP_CharacterTemplate and making the animation override an AnimSequence as a variable so I can choose the animation that overide for every enemy. I started calling the attack interface in BP_EnemyTemplate, which connects to the function in BP_CharacterTemplate. On BP_Skeleton (which inherits from BP_EnemyTemplate), I set the variable to the attack animation, but nothing happens.

Additionally, the old functionality in BP_EnemyTemplate no longer works when I try to use the original method that was previously functional. However, I discovered that if I use the Attack interface directly in BP_Skeleton and call the inherited animation override function (originally from BP_CharacterTemplate), it works perfectly, and the animations play without issues.

Any Ideas?

final mortar
surreal peak
final mortar
surreal peak
#

You have:

  • BP_CharacterTemplate
    • BP_EnemyTemplate
      • BP_Skeleton
    • BP_RedHood
#

Correct?

ocean helm
#

Yup

surreal peak
#

And you have a function called PlayAttackAnim in the BP_CharacterTemplate?

#

Which plays AttackAnimSequence.

ocean helm
#

Yes, that correct

surreal peak
#

And the BP_EnemyTemplate has an Interface (not sure the name), that provides a function called Attack, which you implemented in BP_EnemyTemplate.

#

And that calls PlayAttackAnim.

#

And then in BP_Skeleton you set AttackAnimSequence to "something" (Attack Asset).

#

And based on the image, you are also overriding the Attack function that your BP_EnemyTemplate provides inside BP_Skeleton and it now does nothing.

#

So based on all of that, currently, nothing should really be working.
Unless you have an instance of BP_EnemyTemplate with a valid AttackAnimSequence on which you either call the Interface Attack function or the PlayAttackAnim function directly.

#

BP_CharacterTemplate and BP_RedHood both don't have the Interface, so they would only be able to call PlayAttackAnim if directly called.

#

And BP_Skeleton is overriding Attack, replacing its parent's implementation with nothing.

#

Does that somewhat describe what you are currently experiencing?

#

In theory, if you just want this all to work, you'd need to delete the Attack override in your BP_Skeleton.

#

If you also want your BP_CharacterTemplate and the BP_RedHood to be able to use the Interface, then you'd need to move the Interface to BP_CharacterTemplate

#

That's kinda all that could be wrong at this point.

#

fwiw, if you call PlayAttackAnim on the BP_Skeleton directly, it should also work atm.

#

Just the Interface is broken cause you override the function.