#blueprint

402296 messages ยท Page 890 of 403

formal parcel
#

you mean, events?

#

well yea, widgets are pure trash in UE

#

surprised they didn't fix em tbh

ionic raft
#

Player is fine that way but widgets... kind of hate input

formal parcel
#

so this may be ridiculous but...

#

write your own input handler for UI?

#

then you could fire events for right left etc and the currewnt active UI could handle that logic

#

but yea thats a mess

ionic raft
#

I mean if I had more time i'd do that lol. For now I'll just do the jankiest way I guess

formal parcel
#

hey actually man

#

check the documentation, they might have some prime number silly math going on

#

it might be a simple in-line calc to get the button

balmy vessel
#

random question, anyone know why when i add an event, it spawns so far away from everything else? the bottom left one is something i just added

tame pecan
red grail
#

@formal parcel I'm currently looking through my character bp and thinking about what would better fit into the controller we made. Would all the character's individual cameras be better placed within the controller as a "one main camera for all" type of thing? I have a toggle between first person and third person perspective as well as a line trace off of those cameras that change crosshair color depending on if I can interact with the actor that I'm looking at. Is that something better placed in the controller? (Also if I'm bothersome, please let me know and I'll stop! ๐Ÿ˜„ )

formal parcel
#

nah you're fine man, the cameras I would keep on the character itself, but the activation of said cameras should be in the PC

#

but you're getting the idea, just think about what "domain" actually owns functionality

#

the cameras are owned by the characters IMO because their positioning and angles and such are determined by that character

#

i'd imagine a goldfish would have a different camera config than a helicopter

#

and those cameras would be anchored to different components and such... so its smarter to have the player controller request a certain camera, and the character itself implements that

red grail
#

So the toggle between first and third person should be within the player controller right?

formal parcel
#

yep

#

every single bit of input processing should be in the PC

red grail
#

As a function that I can call I assume

formal parcel
#

yep

#

well really the PC would prolly get the raw input event

#

and then decide what to do with it

#

lemme do a paint for you so its clear

red grail
#

In the event graph: Press hotkey -> function?

#

Hmm, that would apply that to literally every character tho

formal parcel
#

@red grail

faint pasture
formal parcel
#

because its not pawn specific, read more

#

sorry for rudeness :/

#

my b

#

this is just general good OOP design

red grail
#

In case of the toggle between first and third person, if I'd want that on literally every playable character, I'd then put it in the controller, but if I for example didn't want it on one of them, I'd be better of with putting it in the characters right?

formal parcel
#

naw you would still put it in the PC

#

just do the logic of when it dont apply

red grail
#

How would I exclude that one character?

formal parcel
#

you may have all sorts of conditions

#

you could do it by type

#

just make a simple function "canUseThirsPerson" or whatever

#

then when they hit the input for switching, you run whatever logic you need to determine if they can, and if they can then you dispatch it

#

and if not, you dont

#

then you dont need to write camera permission checking code in every character

#

DRY principle - dont repeat yourself

red grail
#

Would interfaces be a good use of that?

formal parcel
#

perfect use

#

i didn't want to bring them up but in fact that is the ideal way

red grail
#

Like, put a thirdperson interface on the ones that I want to use it on

formal parcel
#

or just a check in whatever interface on each character .. "canUseThirdPerson"

#

then your PC can just call the interface on the pawn

#

and then you can do much more complex logic on the pawn as well to determine if it can use third person

#

but then on those that straight deny it just "return false"

red grail
#

This is so difficult to wrap my head around

formal parcel
#

software engineering aint easy

#

its easy to write bad code

#

its hard to write maintainable code

#

but proper architecture goes a long way to avoid spaghetti

red grail
#

Yeah, earlier today I ripped out a huge chunk of horrible code that got replaced with a simple interface lmao

formal parcel
#

but yea

#

interfaces are really the key to this type of thing

#

you have similar functionality but implemented differently between different type... textbook case for an interface

faint pasture
# formal parcel because its not pawn specific, read more

So you would do GTA style walking / driving mechanics by handling input in the PlayerController vs in the pawn? That sounds ass backwards. If the pawn is being switched around in gameplay I just put the common inputs in PC like Pause.

formal parcel
#

well I'd have a manager for sure, and then prolly delegate to vehicle and pedestrian controllers based on the situation

faint pasture
#

That's what the input stack already gives you.

formal parcel
#

i'm not gonna argue withj you adriel

red grail
#

It probably doesn't matter for smaller projects with an easily manageable amount of characters, but I'd imagine the more complex things get, the better it is to use the controller

formal parcel
#

you dont even know what we're really talking about or the context of the last 2 hours

#

@red grail correct, which is why I wasn't going to bring up interfaces in the first place... practical vs ideal and all that

#

but as a purely educational thing i explained it a little deeper

red grail
#

Well I had to use interfaces already so I have a rough idea, I'm just really surprised that I managed to connect atleast that somehow lol

formal parcel
#

well, you stumbled into the right solution ๐Ÿ™‚

#

but yea, just in general any time you're going to make a handler or something, give it a thought to what really owns it, and where does this code really belong in my heirarchy

#

save you from massive headaches and bugs down the line

red grail
#

Is this right? Basically do the function only if X interface is equipped

#

within the controller

formal parcel
#

well the rule about interfaces used in logic like this is they must be implemented

#

so its not so much about does my pawn implement this interface, all pawns will implement it and all methods in it

remote meteor
#

the move input action doesnt really matter if its in pc or character

formal parcel
#

here we go again

remote meteor
#

unless you need to check whether you can move or no

minor creek
#

its 10 seconds right?

remote meteor
#

or such other checkings

#

then you select a suitable place to do it

remote meteor
red grail
#

You talking about the resuming movement after pressing resume?

#

As in, I could have done that with a function within my character, completely ignoring the whole player controller stuff?

#

Or idk, I'm not sure what you mean

minor creek
#

any idea only one target point works for spawning?

remote meteor
#

since it has nothing to do with character specific

formal parcel
#

all the pawns will implement the interface and the method in it "canUseThirdPerson"

#

so the check isn't "does implement interface", its just... call that method from the interface

#

as they must implement it, thats the point of an interface

red grail
#

But why do all implement it? If I only put it in one of the character's bp and not the others?

formal parcel
#

think of an interface as a contract, implementing an interface is saying "i promise I will implement all methods within that interface"

red grail
#

Yeah, but if I have character1 BP with interface and character2 BP without interface, why do both implement it?

formal parcel
#

you're not understanding

red grail
#

Or are you putting the interfaces on the controller itself?

formal parcel
#

interfaces are separate concepts

#

they are their own entities

#

they dont go ON anything

#

they are defined, and classes can implement them

red grail
formal parcel
#

the situation we're discussing is that the characters can all implement this interface

red grail
#

We are talking about this right?

formal parcel
#

we're talking about the basic OOP programming concept called an interface ๐Ÿ™‚

#

not just that dropdown

red grail
#

Oh ok, I was specifically talking about these interfaces

formal parcel
#

those are the same, yes

#

so interfaces are entities

#

paint to the rescue, one moment

red grail
#

haha okay ๐Ÿ˜„

main wigeon
#

Hey! Im trying to turn render custom depth on and of when entering a triggerbox. Nothing seems to happen. Can anyone take a look and see what ive done wrong potentially?

#

if I disable/enable the boolean manually prior to starting it does show/hide

formal parcel
#

alright

#

@red grail

#

this is the point

#

look carefully

frozen moth
#

Hi. I have an issue with building light of an procedural generated location. I have two similar projects, in the first project I test, then export to the main one. When I tried to build light in test project, the following error appeared. But at the same time there are no errors in the main project with the same geometry. All meshes & light in movable mode. How to fix this?

thanks in advance.

formal parcel
#

@red grail notice in the implementation we dont care about the type, we're calling functionality by the interface... this way every pawn we have can determine in their own way, and this same technique can be used for any functionality that is similar between different types of objects

#

without having to repeat a bunch of code

#

and you also then dont need to check a bunch of object types all the time

red grail
#

I'm trying to replicate that, do I need the first bool as an input or output?

formal parcel
#

what function is this?

red grail
#

Just a blank interface

formal parcel
#

its an output

red grail
#

Called it CameraSupportInterface

formal parcel
#

perfect

#

you dont need inputs for this so dont put em

#

its just one bool output

#

so the method signature is: bool Name();

red grail
#

Now, do I put that interface on the controller or the character?

formal parcel
#

the character will IMPLEMENT the interface

#

but for UE i guess thats putting it "in" the character

red grail
#

Idk, to me it looks like I'm assigning the interface to the character I want

formal parcel
#

yes

#

you should be able to assign the same interface to multiple characters

#

(all of them)

red grail
#

Yeah, but whats the point of putting it on a character that doesnt support the toggle?

formal parcel
#

so that you can call it in the implementation without checking the type

#

see the highlighted part of my image?

red grail
#

With type you mean which interface it is?

#

This node?

formal parcel
#

lets go private channel

mild moon
#

Hi guys, how i can make a painting system like this?

sleek kite
#

Hey, anyone that would be able to spare 5 mins of their time to help me? I'm running out of ideas. A system that made logical sense to me is somehow not working and I'm not sure what else to try.

I have a global anim system for movement with added weapon pose layer blend on finger bones to simulate grip from weapon anim but to retain global movement.

Since we've had an issue with consistency and transition out of montages, I decided it would be big brain for me to just get hand_r transform both on global idle and custom idle , and from that calculate the fabrik IK offset I need for my weapon blueprint.

My first attempt

Inside AnimBP I print string and copy transform of hand_r on default global animation, then save that and get a transform of hand_r on custom animations. Then I simply custom transform (loc,rot) - global transform (loc,rot) = Anim Offset for Hand_R

I obtain the bone transform using - Get Socket Transform (HandTrack) --- Break Transform --- Transform to Bone Space (root)

This worked okay, was able to add the offset and make one of my weapons work correctly. Then I noticed I need to do the same for my Weapon bone so I do the same.

This seemed to work reasonably ok, but it was messy and seemed to have some issues on other weapons.. so I tried this

Second Attempt
I made a blueprint with my rig to avoid having to use AnimBP.

To get my offset I do the following

Play Global > Get Transform > Set Pos and Rot as var > Play Custom anim > Set Pos and Rot as var > Calculate Difference = Offset.

Now, this seems to work perfectly for only one of my weapons, but doesn't work for the rest.

Can't wrap my head around this. Any idea why this shouldn't work? It's just basically getting the transform difference between anim A and anim B.. applying the difference as offset should make it work.

Sorry for the long message. โค๏ธ

#

First Attempt in Anim BP

#

Second attempt in BP Actor

rain egret
#

i am having issues with some weird stuff.
to clarify:
-each vertice has a "node" and a scene component assigned to it
-if i click on a node a gizmo is created at its location.
-inside the gizmo i plan to create events that fire depending on how i drag it around, as of now i am experimenting with the Z part only
-i want to set the location of the underlying vertice and set it to that of the gizmo (to change it if i drag the gizmo around)
-the mesh is scaled down by a factor of N

now the result however is:
-blue marks the point where the gizmo is supposed to be, but for some reason it goes to the red arrow instead

vital aspen
#

does anyone here know of a unreal engine 4 book that can teach inventory systems.

sleek kite
#

Hey, what kind of inventory are you trying to make? There is a lot of resources on YouTube

sleek kite
vital aspen
#

The 1 system I have now is an object related inventory system, It all works. Just the guy that help me set it up screwed me on the last part of it. The On Drop. It's the only thing I can't get to work. and you tube is a joke on inventory systems. sense everyone tells me to stay away from them

kindred pier
#

Trying to use view target, and have it ignore the player actors, is there an easy way to do this?

vital aspen
#

@sleek kite Ah no it's not.

tawdry surge
#

The reids channel one is actually pretty good. In general youtube tutorials aren't best practices, so you just need to look around

faint pasture
faint pasture
trim matrix
#

how can I start a timer when a boolean is set to true?

#

this doesn't work

dawn gazelle
trim matrix
trim matrix
#

Im going back and forward in the event graph and in a fonction

dense mica
#

Where vector * float pin went hellmo

dense mica
#

UE5 seems to be removed multiplying vectors by floats

#

Due to that double migration

icy dragon
dense mica
#

Probably, but UX going worse for sure

#

You have to right click and convert vector pin to float manually

#

And if you plug the output pin to somewhere it becomes vector again

gentle urchin
#

Was hoping widcard * wildcard untill something compatible was plugged in

dense mica
#

Its difficult to type literal values :/

#

Anyway, classic epic

tawdry surge
#

It auto converts if you plug the pin in

ornate trail
#

noticing sometimes drag and drop widgets are set to not visible when the operation triggers 'On drag cancelled'. usually with just a small set of clicks within the panel which somehow doesn't register as a drag. Anyone encounter this?

gentle urchin
tawdry surge
#

All math nodes convert float to double by default

gentle urchin
#

But does it accept non-matching types like that?

tawdry surge
#

Real type was removed after the preview

gentle urchin
#

Double or not

tawdry surge
#

Yeah

gentle urchin
#

Then thats updated since i tried, oor i dragged the pin the wrong way ๐Ÿ˜…

tawdry surge
#

Just connect the pins

#

Real was changed back to float after the preview version too

#

Now it just picks single or double precision

gentle urchin
#

Sad, i prefer real :p

tawdry surge
#

It's just confusing to make up a new type when float and double exist in c++

gentle urchin
#

True that, im just more familiar with it from my dayjob :p

#

Plc programming

#

Real all the way

quiet shuttle
#

How would I go about making a line trace that ignores a bunch of actors of differing classes?

kindred pier
#

one example

faint pasture
trim matrix
#

how can I start a timer when a boolean is set to true?

#

as soon the bool is false the timer resets

#

talking about the hit boolean

kindred pier
faint pasture
kindred pier
#

trying to make a reusable set of bp code that can take in any chosen actor via line trace (but that doesn't grab everything, so I've been messing with view target to no success)

trim matrix
#

anyone?

kindred pier
faint pasture
faint pasture
#

You have 2 channels out of the box, camera and visibility

#

You can add more if you want

kindred pier
#

I'm trying to grab only the first actor hit by the trace
Both seem incompatible with spline meshes without the person having to do some editing on their end, and I'd prefer it have an out of the box thing for the splines (which auto ignore those from what I can tell by default)
Does seem like this new channel thing might be worth checking out

undone surge
#

can someone help me understand the diff bw a variable and a balckboard key ?

faint pasture
kindred pier
#

I am trying to have the player be able to select any object in the world with a widget button and have that be the selected actor which info is funneled into various other things

faint pasture
tawdry surge
#

@undone surge a blackboard key basically is a variable. It's just assigned on the blackboard

kindred pier
#

Unless I am missing something it seemed the best way, well view target seems alright too but I am still working on learning more about the camera stuff

#

Is there a better way to get what actor the current player is looking at/what is in front of them?

faint pasture
#

Do you mean you go into some select mode with a widget button? Like an RTS?

kindred pier
#

That was poor wording on my part, I just use the widget button to trigger the line trace to get the actor info I am looking for

faint pasture
#

OK so yeah I'd either use the visibility channel or make a custom channel, depending on how much selection and other visibility stuff your game is made up of

#

have stuff you want to be able to select / block selection block Visibility or your custom channel

kindred pier
#

Ahh thanks! I will check into these custom channels ๐Ÿ‘

#

oof seems custom channels aren't out of the box friendly, might look more into view target

raw orbit
#

is it possible to somehow 'project' or simply show a a copy of a widget? idk how to explain. basically trying to do a dark souls type of inventory where your main hud shows your currently selected quickslot item but the quickslots themselves are separate

tawdry surge
#

What do you mean not out of the box friendly?
Create a custom trace channel in project settings, set the collision on the actor, done

faint pasture
kindred pier
#

can get the spline actors just fine, when it's not colliding with the player in some, though it doesn't have atleast an easy way to filter actors out of it

#

referring to the get view target node

faint pasture
#

OK please just spell out exactly what you're trying to do. You keep talking about spline actors and view targets and line traces and tracing in the players view direction but it just sounds like a mess.

kindred pier
#

I am just trying to find a way to get what is in front of the player, or what the player is looking at, that can pick up skeletal, static, and spline mesh actors
Not every game has their spline mesh actors set up to work with camera/visibility
so I was looking into get view target instead of line trace as it seems more consistent
Though it hits the player itself in some projects and unlike the line trace node, it does not have an ignore actors thing to plug into

faint pasture
#

You just want to do a line trace from your camera position to camera position + CameraForward x SomeNumber, and trace on whatever channel you care about. Or you can trace by object types or whatever.

slender idol
#

Hey is there any way to check the hit object channel on a hit event?

faint pasture
#

I would use Visibility if it's meant to approximate what's visible

faint pasture
kindred pier
slender idol
#

Yeah, instead of handling it through hit actors, I want to know which channel triggered the hit

#

nvm found it you can do it like this

quiet shuttle
undone surge
#

these two bascially do the same thing right ? except for the extra options

wicked osprey
#

Guys, I wanted to ask you, is it necessary to do a clear and invalidate timer by handle if the timer is triggered only once? He's not looping

gusty shuttle
wild jetty
#

Trying to get some text to switch between two options, i've got a function for this already that's working fine on my 'Create Lobby' widget, this toggles between LAN/Steam without issue.
Yet once I'm on my lobby menu, the text to switch between Deer/Hunter is just blank and doesn't show anything... Any tips on where the issue may lie?
Function is exactly the same, the variable is set as a boolean in my game instance, the function get's this variable and sets it to branch between deer/hunter then return it and this is then set within the lobby widget graph.
I've no idea why the text is just refusing to show though during tests?

cobalt gulch
#

how could I set a lobby of 10 players to be on 2 teams

dawn gazelle
cobalt gulch
#

Should I just set 1-5 to blue and 6-10 to red?

dawn gazelle
dawn gazelle
#

GameMode too ๐Ÿ™‚

faint pasture
#

I was thinking GameState

wild jetty
# dawn gazelle Can you show the code that is calling "Toggle Deer / Hunter P1"?

I managed to get it working, Although I'm not 100% certain what the fix was.
It seems somehow I managed to create a different... type of function? Somehow?
The functions at the bottom of this list are the ones that didn't work.
After I copied my LAN/Steam function from my other widget and changed it over to the correct variables then set this new function as the binding, it's now working fine.
I'm not sure why those bottom 2 functions are a different colour, but it meant they weren't working

wild jetty
dawn gazelle
wild jetty
#

Either way, it's working for now, I appreciate the help!

faint pasture
#

@wild jettyIf this is a game mode where one player is a deer and another is the hunter, just have on GameState something like bool Player1IsDeer or Playerstate Hunter or some other SINGLE source of truth as to who's who.

#

If there's one Hunter and many Deer, just have a Playerstate variable on GameState called CurrentHunter or whatever.

small halo
#

how do i reset the players control rotation?

faint pasture
small halo
#

back to default

#

from the player looking at the ai

#

back to default

faint pasture
#

Just set it to 0,0,0

small halo
#

i did so but it didnt work

faint pasture
#

Show your entire logic chain

wild jetty
wild jetty
small halo
#

I then use simple ai move to but when the player is running (fp) he is looking to his side and not the direction he is running to

faint pasture
wild jetty
#

Then I'll add more as time goes on

faint pasture
#

But I mean how does the team setup work, is it like tag where there's 1 person of interest, or is it just like any other pvp game where there's 2 roughtly equal teams, or what?

wild jetty
#

2 equal teams, i may add in a 2v1/4v1 mode down the line, but for now, just the 2 teams, 1v1

faint pasture
#

Oh ok then either store some team state on each playerstate, or in gamestate have 2 team lists

wild jetty
#

Thanks ๐Ÿ˜ I'll take a look to see what info I can find on specifics on how to go about doing that

faint pasture
#

I'd start by just slapping a boolean on the PlayerStates bIsHunter

wild jetty
#

Recommend 2 different player states? (I'm really unsure if just 1 is ok or not ๐Ÿ˜… )

faint pasture
#

The State of the Player is whether or not they are a Hunter

#

or rather, whether or not a Player is a Hunter is a part of that Player's State

#

Player XxX420Sephiroth68xXx is a Hunter

wild jetty
wild jetty
brazen spear
#

Hey all! I am having a super big problem as I am creating an endless runner game following UE tutorial, I am trying to get the game to restart when the player dies but I keep getting this error : TravelFailure: ClientTravelFailure, Reason for Failure: 'Failed to load package '/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap''. Shutting down PIE.
What does it mean? I have gone on multiple forums and am still super stuck ๐Ÿฅฒ

spark steppe
#

how do i unroll an rotator while keeping the yaw/pitch point in the same direction?

wild jetty
brazen spear
#

what is UEDPIE_0 haha - I am so confused

#

This may sound silly but should I change the map name to UEDPIE_0_ThirdPersonMap

wild jetty
#

Unsure on UEDPIE_0 but PIE is when you're using the engine itself to test the game. Maybe try launching as a separate application?
under the Modes try your PC name, or 'Standalone Game'

brazen spear
#

Omg you are right! On the Standalone Game it respawns!!

#

I am curious why that is?!

faint pasture
wild jetty
#

Unsure, with my own game I always have to run it as a standalone game or via my PC being in the list because of running Steam, I'm not sure in your case though

brazen spear
faint pasture
#

Eudiepie

brazen spear
brazen spear
wild jetty
brazen spear
faint pasture
#

@brazen spearShow how you're restarting

brazen spear
wild jetty
faint pasture
brazen spear
marble warren
jagged stone
#

In UE5 how do I change the Inputs/Outputs of a Blueprint Interface? As soon as I add an output everything is grayed out and i can't change the name or type of the ouput or inputs?

#

Nevermind i found that I must select the function name from the right panel....

kindred pier
#

edit: guess more of a c++ thing so I'm moving it

wicked osprey
#

Guys, can I return values from function what i call from timer? If no, which way can i use?

quiet shuttle
faint pasture
#

Or if it's totally flat you can just use a line plane intersection

quick lark
#

Is it possible to use the camera shake blueprint to drive the transform of any scene object instead of the camera?

#

I'm trying to get a satisfying shake on the cockpit of a mech every time it takes a footstep

gritty plover
#

Hey... This Begin Overlap node is firing every single frame that the 2 components are overlapping, and not just when they begin overlapping. What's the dealio with this?

#

It's also firing the end overlap node every single frame as well.
But it's literally just one component inside of another component. Nothing complex. Nothing ridiculous going on. Just... All there is to it.

cobalt gulch
#

How can I fix stretched textures which are scaled

thin panther
#

Uv unwrap properly

cobalt gulch
#

I meant when scaling in ue5

thin panther
#

Ah i take it you are using static mesh cubes or smthn as walls

cobalt gulch
#

Yeah

thin panther
#

Yeah try to use a wall mesh

#

Can probably do somethin g with world aligned materials

#

Ir if its a prototype dont worry about textures

hollow gorge
#

Is there an event that triggers for when a widget's button gains keyboard focus?

#

like on hovered with mouse

mellow folio
#

I think that is an override, look at the function overrides

round moth
#

So should I put stuff like player experience in the game instance, and health since I want those to carry over between levels

winter kettle
#

is there a way to know if a blueprint struct has another blueprint struct as a parent?

mellow folio
thin panther
rain egret
#

i am using a timeline to drive add local rotation to make the ship tilt left and right a bit, tho it oddly always tilts stronger to one side than the other

#

i already looked at the values and it should tilt equally on all sides

fervent jolt
#

Hey, I am making a game with a level editor. to save both the blocks and race times from each level I'm making a new save slot for that level. Is this a foolhardy path fraught with peril?

lucid lynx
#

Is there a way to interrupt SetViewTargetwithBlend? I'm using it to transition from one camera to the next, but I'd like to interrupt it in some cases.

#

Calling SetViewTargetwithBlend again with no blend time does not seem to snap the camera to the new target.

wise tide
#

I noticed I can do some things on construction. So I used to have my material apply on play for my display model (apply from parameter/variable).

Now though I put it on construction and it does it in the editor, however setting the opacity doesn't seem to change in construction. Is that a begin play exclusion or something?

#

How do I know if something can be done in construction or if it has to be on play

quiet abyss
#

(Hope this is an appropriate channel. Please correct me if not)

Anyone feel like helping with maths lol? I've gotten this far but alas my brian has turned into mush trying to figure out how to solve this.
https://blueprintue.com/blueprint/ye34vyll/
Context: I'm using this to control 2D eyes via a material, this makes the eyes follow the player. I'm projecting a vector through a plane and finding the intersection point, then doing some calculations to convert the point to a 0 -> 1 range, with 0 being the left-hand edge of the plane, and 1 being the right-hand edge of the plane.

The issue is, the object has to be rotated between 0 - 180 on the z axis in world space for this to function properly. If I rotate it anywhere beyond that, my 0 -> 1 range becomes flipped so the x location of the eyes become reversed.

Math logic isn't my strong suit lmfao. Can someone by chance help me figure this one out?

gentle socket
#

Is it possible to create something like an "instance" of an Object blueprint with certain values for the blueprint's variables before runtime?
Similar to how you can create Texture "instances" and assign these to blueprints with Texture variables.

quiet abyss
gentle socket
#

Not entirely

#

For reference I'm trying to make something like a texture but with some extra functions/variables

#

But if I then give a different blueprint such a class I don't have a default variable to assign to it

#

And you can't define an instance in places like this

gentle socket
quiet abyss
rain egret
#

wtf why isnt this working, the timeline is no magic, yet it cant for the life of it create a uniform tilting , it always tilts more on side

#

it shouldnt be able to do that, why

fervent jolt
#

seems to me it would be a issue with either the ship object origin or object relative rotation vs world rotation

rain egret
#

all the rotations from the ship are 0

#

its start rotation is zero

unreal marten
#

so I'm trying combine all of my UI widgets into a singular HUD and everything seems to be working except the HP bar, the current/max health values in the same BP show up just not the progress bar, any ideas what I'm missing?

gentle socket
# gentle socket For reference I'm trying to make something like a texture but with some extra fu...

Right, so one way I could do this is to make the Object "instances" child blueprints of the original blueprint with different default values.
Then in the blueprint which has the an Object variable you'd add a second variable with a class reference which references these child blueprints.
The Object variable can then be instantiated from one of the child blueprints.

That seems rather convoluted. Surely it must be possible to create multiple instances of a class?

unreal marten
# hollow gorge show code or rather BP

this is the health ui widget, it works fine in itself but when added to the hud ui as usercreated widget, only the set text portion is working the progress bar is non existent

#

you can see placeholder text but the progress bar doesn't carry over

zealous moth
#

@quiet abyss why not use dot product?

unreal marten
#

and now I feel dumb, increasing the size of that box a lot fixes it but not sure why the text worked right out of the gate

elder ruin
#

Can anyone in here help me out with saving to a .txt file in game? I'm wanting to have a bunch of functions that can actively update files to be accessed via another program, but there doesn't seem to be any native features for writing .txt files.

pine trellis
#

does anyone know how to merge all these materials into 1 for a character skeleton mesh???

quiet abyss
# zealous moth <@772491965416603648> why not use dot product?

Good question. Mostly because math isn't my strong suit ๐Ÿ˜… I did solve my issue though! Instead of using world-space coords, I'm using local space.
I'll look into dot products though, chances are it'll simplify what I'm doing even further!

zealous moth
#

@quiet abyss I use dot products to determine angle and rotate in response until it is around a value of 1

#

@pine trellis export mesh into Maya and redo the UV mapping into an atlas

#

@elder ruin I thought there was a plug in like that in the marketplace

unique harness
elder ruin
elder ruin
unique harness
#
elder ruin
#

Thanks!

unique harness
#

Also Rama's Victory plugin

elder ruin
#

Yeah I was hoping to find a solution without Rama's if I could.

unique harness
#

I don't blame you ๐Ÿ˜›

last walrus
#

do we have something like "get character as number" but vice versa? like "int to character"

silk cosmos
earnest tangle
#

Have you considered using the Crouch function that's already in Character/CharacterMovementComponent?

silk cosmos
#

that snaps the camera down too sharp

#

looks bad

earnest tangle
#

Right- I have a workaround for it which just lerps the camera :D But if you want to do it manually just copy what it does, which is moving the appropriate components up/down

silk cosmos
#

dang. i was hoping thered be some way without coding lmao but thanks ๐Ÿ™‚

unreal marten
#

trying to get this to work, the start game function works fine in its original blueprint but when I try to reference it in the playercharacter I get this error and I'm not sure why

dawn gazelle
last walrus
#

so... no, not what I'm looking for

unreal marten
dawn gazelle
dawn gazelle
#

Eg. I can have a variable called "Integer" but its default value is always 0. Your "MainMenu Widget Ref" will always have a default value of "None" unless you set it.

last walrus
#

I want to do stuff like 1=a, 2=b, 24=z

dawn gazelle
#

Ah.

upbeat rain
#

Does the function "Get Bose Poses for Frame" actually exist? It doesn't seem to be accessible anywhere.

dawn gazelle
#

Don't need the literal int thing there... you can feed in whatever integer directly into the select.

last walrus
# dawn gazelle

and... I need to specify every case
latin, cyrillic, hieroglyphs, numbers, special symbols...

unreal marten
long whale
#

hello, is they a way to change interpolation method of already imported curve table?

limpid bronze
#

why aren't we allowed to put delay nodes in functions?

icy dragon
deep elbow
#

hello! tryign to script an editor utility widget to disable/enable collision on level actors (static meshes), nothing i do seems to actually change the collision when viewed via the "layer collisions" view mode, any thoughts?

deep elbow
# limpid bronze why aren't we allowed to put delay nodes in functions?

a good way to think about a function is that the output of the function, ie whatever it is supposed to do, is going to happen all at once, and the result is what is useful, not how it gets there.
if you are using a delay in a function you are probably trying to "tidy" a blueprint or you should be using a macro if you want to re-use some code

limpid bronze
#

Ah okay.

trim matrix
#

Use Simple Collision As Complex

This means that if a complex query is requested, the engine will still query against simple shapes; basically ignoring the trimesh. This helps save memory since we don't need to bake the trimesh and can improve performance if the collision geometry is simpler.

Use Complex Collision As Simple

This means that if a simple query is requested, the engine will query against complex shapes; basically ignoring the simple collision. This allows us to use the trimesh for the physics simulation collision. Note that if you are using UseComplexAsSimple you cannot simulate the object, but you can use it to collide with other simulated (simple) objects.

Hi guys, how to toggle between them from blueprint in real time?

trim matrix
deep elbow
# trim matrix What is layer collisions view mode 0o?

sorry i meant "player collision".
i foudn the solution, just worded weirdly in blueprint nodes, "Set Collision Profile Name" set to NoCollision or Default works, then you just have to toggle visibility of the actor to get the viewmode to update, beep boop unreal gloop

trim matrix
#

Oh, you wanted to hide the actor and turn off the collision, I see

deep elbow
#

ah no, just disable the collision, but have it update in the collision viewmode like this:

#

but this works:

unreal marten
#

looking to make an interact prompt when near an actor, was hoping to have the prompt built into the hud and just hidden until near npc/invisible when away from npc, but even though the overlap events work fine I can't get the prompt to be set to invisible, and I don't think I should be creating the hud in the NPC blue print but I don't know how else to get and set the hud reference

#

would I be better off just creating and removing the widget separately from the hud?

deep elbow
#

have you checked what is failing? is the cast returning failed when ending overlap?

unreal marten
surreal peak
#

@unreal marten Where is the code from your image located?

#

You are casting to BP PlayerBase which sounds like you are in the interactable?

tawdry mural
#

set array is working like clear and populate ye?

surreal peak
#

Set Array sets the Array

#

Like, that's about it

tawdry mural
#

if i set it with 10 names first then with 5

#

it will have 5?

unreal marten
surreal peak
surreal peak
#

That creates one per NPC and all of them are different instances

#

Interaction systems make more sense the other way round

#

Interface on the Interactable Actor. Some custom Collision Channel on some Sphere.

#

Handling the overlap in the PlayerCharacter and not the NPC

#

Getting all required data for the Interaction via the Interface functions

#

And then accessing the HUD from the PlayerCharacter or its Controller directly (wherever you create the HUD)

unreal marten
#

okay it's moved out of NPC to Player, works well now thank you! how do I ensure it only triggers when overlapping with a specific actor type like BP_NPCBase? does it have to be cast at them?

surreal peak
surreal peak
#

That's what you use to get the interaction type, like press, hold key or instant (e.g. pickup on the floor), as well as duration, name, if it's Interactable atm (maybe it's turned off or has any other requirement)

#

And lastly the functions to actually interact

#

Such as OnInteract which you call when you press your button

#

Each Interactable implements this function (as well as the others) and does whatever it should when interacting

#

E.g. a door opening, an NPC starting a dialog, a lever playing an animation and opening something

unreal marten
#

@surreal peak so if I had say BP_Actor1 and BP_Actor2, how would I set EventActorBeginOverlap to only trigger when overlapping with BP_Actor1?

undone surge
#

how would i reference a variable from my main 3rdpersonBP into my behaviour tree

deep elbow
fiery glen
alpine ingot
#

Hey! Is it possible to sample a vector field volume at a given location in space?

icy dragon
#

Is there a way to have some kind of failsafe or cancelling async load assets? Say, if the asset somehow took too long to load because of user's storage I/O is getting clogged for some reason

low storm
#

Anyone know if there is a way to do something like the following in blueprints?

   if (WarpyThingOne){
    DoWarpyStuff(input, WarpyNumber)
  }elseif(WarpyThingTwo){
    DoOtherWarpyStuff(input, WarpyNumber)
  }
}

//Case One, Does both
SomeFunction(Input, 5, WarpTarget, ADifferentWarpTarget);

//Case Two, Does WarpyThingOne
SomeFunction(Input, 5, WarpTarget, NULL);

//Case Three, Does WarpyThingTwo
SomeFunction(Input, 5, NULL, ADifferentWarpTarget);
alpine ingot
low storm
#

Oh, perfect! Thanks!

jaunty jolt
#

It seems like it scales it up

fiery glen
#
  return this.normalize().mult(n);
};```
#

looks like you want to normalize it and then multiply

jaunty jolt
#

@fiery glen So this is a setMeg(20);

fiery glen
#

yep

red fossil
#

hey, ty for the reply. I got it though, I didn't need camera clamping after all

pseudo pelican
#

can line traces trigger on begin overlap events?

tame pecan
barren flower
#

Whats the best way to organize a voxel grid in terms of data?

prisma tree
#

In my 1st person game, how would i go about creating an effect of closing eyelids? Use the UMG somehow? or create physical "eyelids" that cover the camera?

past hazel
#

How can I make it so that the lines do not repeat and there is only one?

opaque blade
fiery glen
opaque blade
#

ie. a texture (grayscale) showing the progress of eye closing progress
and in your bp / camera modifier you interpolate to close / open

scenic kindle
#

how do i return the opposite value of a random float? (i.e positive -> negative, negative ->positive)

marble tusk
#

zero minus float should do it, right?

past hazel
opaque blade
scenic kindle
scenic kindle
#

oh ya that might work

opaque blade
#

If it is a special "opposite" aka 0.6 should be -0.4

Use a Sign node and filter that way?

icy dragon
raw orbit
#

any idea why this would happen when changing a character's anim blueprint? trying to make the dragon 'fly'. Nothing is wrong with the flying blendspace cause i can used it for 'walking' or 'jumping' just fine but when i want to swap movement mode to flying the dragon gets bent as if it decided to try out every pose in kamasutra at once

#

this is also a child of a 'template' anim blueprint, i have other flying creatures that work just fine

icy dragon
raw orbit
#

lol. what you mean its all in the same anim blueprint sorta

#

anim blueprints are my bane i swear

#

the blendspace should work fine as far as i can tell

stray light
#

This is a place where we can ask for help with the blueprints yes?

stray light
#

Lemme get my screenshots

#

So i am doing a project for school and im trying to make a small LAN multiplayer game in Unreal Engine with this

#

It used to work just fine on 2 laptops but now it no longer finds/joins the hosted server

#

And when looking at logs the return I get is

Warning: Script Msg: Attempted to access index 0 from array 'Temp_struct_Variable' of length 0

#

And I dont understand why

It works perfectly fine when connecting from 1 computer just when its 2 separate ones it doesnt work

barren flower
#

As in, should each voxel store its whole tree?

#

how do I probe a single voxel and find out which branch it exists in?

opaque blade
#

Each voxel is stored inside the octree
Octree is just an optimization for spatial subdivisions, so if there are no voxels in a larger area, you can get away with a pretty lowres octree bound

So you have an octree storing where voxels are

meaning here TL,BL,BR are 0-level octree sections

TR is subdivided 2 times where 3/4 are empty but TR,TL has elements in it

usually 0-level is also called 0 Depth, where subdivision is also called x-Depth

#

octree only helps you to early out of rendering / searches, so you don't have to sample everything which is empty

barren flower
#

Right but like, in practice, how are they stored

#

like are we talking structs here?

#

is there some custom data type for octrees?

opaque blade
#

There is an octree implementation in source, I would highly advise against implementing octree in BP

But yeah each cell is a struct

warm sand
#

I have a camera system with mouse and keyboard but I want to disable them if the focus of the window is lost. How can I do that ?

barren flower
# warm sand I have a camera system with mouse and keyboard but I want to disable them if the...
#

You can create a custom event for window focus loss and disable input on that event

warm sand
onyx cypress
#

How do I make this to toggle instead of hold?

gentle urchin
#

Flipflop

#

On pressed

tight schooner
#

@warm sand last I checked yeah. I also had to steal some c++ code to tackle a similar issue a few months back (pause the game on focus lost).

fickle dune
#

How would you make character movement a condition for a branch? I want it so that you can only zoom in the camera as long as the character isn't moving I got the character movement out of the cast to third person node but not sure how to turn that into a condition

onyx cypress
tight schooner
#

If so, you can check if velocity (vector length) is under some threshold to determine if the character is meaningfully moving or not

tawny hedge
#

you can use similar way of calculating speed like it's used in animation blueprints. calculate speed . if speed is 0 = not moving. There's quite a bunch of tutorials on how to calculate speed on youtube

tawdry surge
#

Get velocity, get vector length, vector length == 0
True will let you zoom only while idle

fickle dune
past hazel
fickle dune
#

ahhhhh just read MWs

sleek kite
#

Looking for someone experienced with expertise on IK and UE4 anim systems. Have an issue with how my global locomotion / weapon anim system works at the moment and I've ran out of ideas.

Don't need you to code it for me, but if you are able to help me and figure out a system that works, I'll be happy to compensate you for your time within reason.

DM me for more details.

Posted the above also in #animation , just trying my luck here

icy dragon
fickle dune
#

also who has some free time I still have issues with my inventory system not working across levels so if you are willing to spend some time with me to help that'd be awesome as I keep trying and i just hit a wall everytime lol

icy dragon
past hazel
tight pollen
#

hi everyone!

#

I'm creating a multiplayer game and I have a problem, I don't know how to change the location of the AI โ€‹โ€‹for first person view, I want the AI โ€‹โ€‹to be a bit further from the camera for the first person view, when the AI โ€‹โ€‹is close to the character is completely enters character for FP view. Third person view is ok, only this first person view is troublesome; /

#

sorry for english

#

hope you can understand it ;p

#

any ways?

#

need to add a copy of the AI โ€‹โ€‹mesh to BP_AI which will be used for the first person view?

#

I don't see any other choice

#

sorry no that's stupid i don't know how to do it ๐Ÿ˜…

tight pollen
#

when the player sees another player next to the AI, it should look like in third person view

#

I don't know if anyone understands me ๐Ÿ˜…

proper tendon
#

Anyone know If I can change a variable of an actor from the viewport? Similar to how you would do it in Unity

formal talon
#

Hey, trying to keep a actor or paste it's values between scenes but unsure how. The setup is that there's a PatchEntry level that will pull .paks and once complete will load a level, however there's a actor in this level that reads Unity launch parameters (json) for the 2nd level and it has to keep those when switching.

proper tendon
#

if you're answering my question I understood about 0 things in that sentence haha

dawn gazelle
proper tendon
#

where can I do that?

#

found it!

dawn gazelle
#

Where you define the details about the variable within the blueprint.

proper tendon
#

Yeah thanks!

tawdry surge
#

Instance editable will make it show in the details panel
Expose on spawn will add the variable to the construct node as an input pin

fickle dune
#

So on on my Level Transition blueprint I want to make sure the data of my Inventory is stored across levels.
This is how my blueprint is setup:
https://blueprintue.com/blueprint/xicdz1z4/

Now the issue is that I can't open my inventory window anymore and it tells me this error three times:
Blueprint Runtime Error: "Accessed None trying to read property InventoryComponent". Blueprint: ThirdPersonCharacter Function: Execute Ubergraph Third Person Character Graph: EventGraph Node: Toggle Inventory

Obviously is trying to access my Inventory Component in that particular Toggle Inventory toggle which looks like this In my Third Person Character:
https://blueprintue.com/blueprint/w_ujl6xh/

I really need to get this fixed guys, I don't know what else to do, I really want to keep developing my game but the lack of knowledge is getting to me, its been 4 months guys and I don't know what else to do, help pl0x

hallow garden
#

Hello guys
Can u Help me with this
I did this to make the AI look at the player . But the problem that the rotation is not updated , the AI look only at the start position of the player but when i move the player the rotation doesnt update

#

And thank you guys

hollow gorge
#

I'm looking for a function, that disables all events / input within a widget (i.e.: Hovering over buttons etc)

tawdry surge
#

You can set "not hit testable self and children" on the canvas

#

Then it won't register the cursor or touches trying to interact with it

hollow gorge
tawdry surge
#

Add a bool and just check before you allow the interaction

hollow gorge
#

that's what I currently have and it works but I was wondering if I missed some inbuilt functionality

tawdry surge
#

Not that I'm aware of

#

If there is Mathew Wadstein would have a video on it

hollow gorge
#

Guess I'll stick with the boolean approach for now, thanks for the help

formal talon
#

How can you set actor = actor.persistenlevel in a blueprint?

tawdry surge
#

You mean reference the level?

#

Afaik you can't reference the level blueprint directly. The level bp references other things and uses event dispatchers to listen for calls

magic gate
#

Hello! I was wondering if it is possible to have a UserWidget placed on a world position without it being managed by a blueprint (through a WidgetComponent for example). So basically, given a position in the widget construct event, is it possible to put it at that world location without any external management?

gentle urchin
#

Not really

#

Not easily, anyways

magic gate
#

hmmm

gentle urchin
#

If its not in a component it will be in screenspace

#

You could go advanced and make it update depwensing on player vs widget world position,

magic gate
#

i mean then i'll just do it via an extra blueprint class

gentle urchin
#

And project that relative location to the screen when entering its proximity etc etc

open latch
#

how does one make an online highscore for mobile games ?

magic gate
#

it shouldn't give any problems spawning an actor

#

thanks anyway ๐Ÿ˜„ the alternative is indeed maybe a bit too janky/complicated for no benefit

gentle urchin
#

Yepp ๐Ÿ˜…

spark steppe
#

you could spawn an actor of class actor and create the component and attach it to it?!

magic gate
#

yeah that's what i'm doing now, but i wanted to see if i could do it with just the widget (if you are talking to me :D)

spark steppe
#

yea i do, and i don't think that it's possible

#

as the component needs some "home" :>

magic gate
#

yup ๐Ÿ˜•

remote meteor
#

all the static mesh on the levels are made like that anyway

#

actor to house a component

lilac storm
#

hi is there a way to get an reference to currently using camera ? i bought a kit where is character got 9 differenct camera components and i want to get a ref to current camera at run time

magic gate
#

not sure if this is specific to my project, but 'get player camera manager' is the node that always returns the right camera for me

unreal marten
#

how can I get EventActorBegin/EndOverlap to only trigger when overlapping specific things? for example its triggering when overlapping power ups but I only want it to trigger when overlapping an npc

magic gate
#

you can adjust the collision behaviour

#

alternatively you can check when overlapping with what you are overlapping and choose to do or not do something with it (but this is probably a worse implementation since the collision still triggers)

tribal kernel
#

how can i change ue5 character for a mixamo

unreal marten
magic gate
#

if the cast fails that means it either was invalid in the first place, or that it isn't of that type

#

so you can do 'Cast To BP_Pickup', and if that succeeds you know it is a pickup

#

casting actually gets used for filtering like this all of the time

gentle urchin
unreal marten
flint shard
#

I'm trying to deploy the same app to multiple platforms, desktop, mobile, vr. What is the best way to spawn a different player pawn depending on the deployment platform. Right now I have an enumerator, one value for each platform I intend to deploy to. I'm guessing I can spawn a different pawn from the player controller? Maybe the level blueprint? What's the best way to do this? Is there an established practice?

gentle urchin
#

Override the spawn event in the gamemode, selecting class to spawn based on your enum

magic gate
#

like this

#

with a sequence node, you'd execute all casts even if you have already found what you needed

unreal marten
#

got you so chaining them from each other will skip the other checks instead of checking everything even if it passes on the first check?

magic gate
#

yes

surreal peak
#

I want to add here that as soon as you have to do what warre posted, you are probably doing someting wrong

#

Cause that is usually where you have a simple Interface call

#

Casting to every possible option is in 99% of the cases bad coding

pearl moth
#

AttachTo: /Game/UEDPIE_0_TheHorizonMap.TheHorizonMap:PersistentLevel.TPC_C_0.CollisionCylinder' is not static (in blueprint "TPC"), cannot attach '/Game/UEDPIE_0_TheHorizonMap.TheHorizonMap:PersistentLevel.TPC_C_0.SpringArm' which is static to it. Aborting.

surreal peak
pearl moth
#

SpringArm is movable

#

And if I set "CollisionCylinder" to static, the character wouldn't move.

#

Wait no, SpringArm is static

magic gate
#

i figured ๐Ÿ˜„

unreal marten
pearl moth
#

So?

magic gate
surreal peak
#

An Interface is a programming concept

magic gate
#

an abstract class

surreal peak
#

And Interface declares functions. You can add the Interface to a class, which then can implement those functions

mental trellis
#

Yes, but not because it's abstract.

surreal peak
#

On the caller side, you don't have to care who implements the interface

#

You simply call the interface function on the Actor/Object, and if that Actor/Object has the interface AND implements the function, it will execute it

#

That removes the need of casting to each possible option

magic gate
#

yeah i don't have a lot of experience in blueprints, i learned C++ but overriding and so on is sometimes weird/bad/impossible in blueprints so i don't use it as much as i should in blueprints

surreal peak
#

An example would be:

  • BPI_Noise (Blueprint Interface)
    -- Has function "MakeNoise"

  • BP_Car
    -- Implements Interface
    -- Overrides "MakeNoise" Function and plays "Honk" sound

  • BP_Dog
    -- Implements Interface
    -- Overrides "MakeNoise" Function and plays "Woof" sound

  • BP_Player
    -- Traces for Actors
    -- When hitting an Actor, calls "MakeNoise" on the Actor

#

BP_Car and BP_Dog do not share a custom Parent Class, only Actor, so without the Interface you would need to cast to either of them

#

Which can quickly grow out of proportion

#

You basically have two options:

  • When you have a lot of Actors that share the same custom Parent Class (e.g. BP_Animal) and you only need to call functions on those, but each Child should do something else, then add the function to the Parent (BP_Animal) and override it in the Child (BP_Dog). When tracing you can cast to BP_Animal and call the function.
  • When you have a lot of Actors that DO NOT share the same custom Parent Class, add an Interface to bridge this.
#

A Combination of this obviously also works. BP_Animal can implement the Interface in addition

#

For Interaction Systems I usually have an Interaction Interface. Whichs allows me to get the Name, Duration, InteractionType, as well as calling OnInteract etc.
I have a base BP_Interactable Actor which implements the Interface and is used for every Interactable that only needs to be a simple Actor. Convenience.
The Interface can then also be added to Actors that can't be simple Actor children, like a Character, which can't inherit from BP_Interactable.

#

So your NPC for example (unless your NPC is a stationary Actor and not actually a Character, but overall using Interfaces allows you to not worry about this. Your PlayerCharacter will just call the Interface functions and it's up to the receiving end to implement them).

#

Hope that clears it somewhat up. Otherwise it might be time to google/youtube this (:

unreal marten
#

it definitely helped a lot, I understand the concept at least but yeah youtube time to see visually how this is all created thank you!

surreal peak
#

๐Ÿ‘

tribal kernel
#

how can i change ue5 character for a mixamo character????

silk cosmos
magic gate
#

do variables pass by const reference automatically in blueprint functions? i want to pass a struct to a function but i am not sure if i should force it to pass by reference for performance reasons or if it goes by const reference automatically

silk cosmos
surreal peak
#

I mean, they do kinda, but not sure if per param

#

Ref would save you a copy of course

pearl moth
#

I have managed to fix the issue.

magic gate
# surreal peak Ref would save you a copy of course

i mean i don't really care if the parameter is const or not, i just don't want it to be copied for obvious performance impact reasons. But i wanted to know if a parameter is automatically passed by const ref (i assume it is but i am not sure)

#

it might as well be passed by copy automatically but that would surprise me

glass stump
#

how do i make it so if the player interacts with one BP, another BP does something?

glass stump
#

Thank you. :)

tight schooner
#

a multitude of ways to make blueprints aware of each other (collision, tracing, spawning each other, "get actor of class", etc.), and then a multitude of ways for them to communicate

glass stump
#

get actor of class sounds useful.

tight schooner
#

usually a quick and dirty approach but it does work

glass stump
#

line tracing like when there's line that hits the object, right?

tight schooner
#

yeah. Stuff hitting stuff whether directly through collision or indirectly with various traces are common ways for two BPs to become aware of each other

#

your player character might collide or overlap with another BP, or it might do a linetrace in some direction and find stuff

glass stump
#

Ahh, I'll have to look into all of them and see what one would work best for me. Thank you! :)

tight schooner
#

yeah, it's all very situational

proper wyvern
#

Is there any way to get the current focused widget?

#

I see Unreal has "HasUserFocus" but it doesn't tell me which widget is being focused

hollow gorge
#

another approach would probably be to make sure that your last performed action determines which widget to focus next

faint pasture
#

There's an OnFocusRecieved so you can just hook into that to update some variable.

undone surge
#

how would i get the distance between my character and an AI character

faint pasture
remote meteor
#

AActor->DistanceTo(OtherActor)

undone surge
#

thanksss

#

which of these two is more efficient and more reliable

faint pasture
undone surge
#

alright

remote meteor
#

Squared versions

#

because they dont have sqrt

faint pasture
#

DistanceTo is prolly faster because it's c++ native but it's literally a zero.

undone surge
#

ok thank you

faint pasture
#

Won't matter unless you're doing like 100 a frame or whatever but moving your system to C++ will get you a 100x speedup

#

You can prolly do 100,000 sqrt distance checks in C++ per frame no problem.

undone surge
faint pasture
undone surge
#

i want to do it in a behaviour tree but im new to BTs how would i set the conditions

sinful gust
#

Hey, how weird is that, after converting my singleplayer functionality to multiplayer, the UI works perfectly in client (mp) but not in listen server or singleplayer? ๐Ÿ˜…

faint pasture
#

You probably have some gate on if it's server that's screwing you upt

sinful gust
#

When using drag and drop, for instance, the inventory slots are not updating in real time, but the inventory array itself (both server and client) are

#

All the UI functionality is set to client only (widgets can't be used in server as far as I know)

#

Opening and closing the inventory shows the items that are there

faint pasture
#

You're probably checking IsServer to do something and that's breaking it

#

or Authority

#

since a listen server and standalone are both authority (not sure if both are considered server or just listen)

sinful gust
#

I don't remember doing that, but I'll give it a look, thanks! ๐Ÿ˜„

faint pasture
#

Are you trying to do predictive inventory stuff? Like a drag and drop is instant in client's view?

sleek kite
#

Hey, anyone here experienced with AnimBP and IK that could spare a few minutes of their time? Thanks in advance

blissful grail
#

No one can help you if you don't just ask your question

blissful mango
#

Hello guys. I want to develop an application (that will be running using pixel streaming) in which users can buy real products. anyone of you know if it's possible to set up in-game purchases?

faint pasture
thin panther
#

Why are you spamming dots... just ask the question and in the right channel

sleek kite
formal parcel
#

so what's the equivalent of just a generic class in blueprints? like I just want to build a state manager that is its own entity, what parent would that be in the lil create blueprint thing

thin panther
#

Ah didnt realise it was a different message lol

thin panther
#

An actor is just a blank template pretty much

formal parcel
#

so an actor doesn't imply any physical body or anything?

thin panther
#

Can do whatever you want

#

No

faint pasture
formal parcel
#

alright cool

faint pasture
formal parcel
#

so effectively actor == class ?

thin panther
#

Just beware you cant do singletons in bp

faint pasture
thin panther
#

An actor is a class yes

formal parcel
#

no i've been holding references to things in game instance for a pseduo singleton - does that work cuppatea?

tight schooner
#

An actor does physically exist in the world (with a transform), but it's no big to just drop or spawn actors into the level as manager classes

thin panther
#

Ye that works

faint pasture
#

er, idk if GameInstance can have components but GameState is where I've done some singleton stuff before switching to Subsystems.

formal parcel
#

like lets say I was making a game director thats going to monitor everything and adjust gameplay stuff - that would be an actor with a ref held in game instance?

faint pasture
formal parcel
#

gotcha, thanks for the help

#

will also look into subsystems and components

#

just to understand these building blocks

faint pasture
#

If you don't know what components are yet, just go over the framework again.

formal parcel
#

i mean i think i do

#

i meant more the technical implications of them

#

trying not to prematurely optimize or anything but also trying not to do things the wildly incorrect way

hollow gorge
#

I've got an issue with key input events in two different widgets.
When a submenu is removed from the main menu widget the events from the removed widget (like arrow key navigation) still persist and carry over to the main menu navigation. How can this be avoided?

slow pewter
#

So mhh, i try to update an Old Quest System from, Ue4.23 to Ue5, looks like its not Working on 4.26 anymore too, not only on 5, was there any changes from Structs?

sinful gust
#

Internally everything works, and client's UI is updated, but listen server and sp UI's (just the UI's, the variables work just fine) fail to update in real time

#

You have to close and open the inventory again to see it updated

finite gazelle
#

not sure if this is the right place to ask, but im currently trying to implement dynamic puddles onto my landscape when it rains. I've created the puddles, and when I set my parameter to the desired number, the puddles appear on my landscape, so all is well in that department. My issue is that I'm trying to add them dynamically when it rains, so the longer it rains the puddles gradually appear and get larger. I've instantiated a dynamic material instance in the constructor script, and set the scalar parameter value which gets updated via a timeline, but for some reason the puddles do not appear, any advice would be greatly appreciated

tawdry surge
#

Did you assign the dynamic material or just create it

finite gazelle
#

I believe I have a assigned the dynamic material yes

frozen ledge
#

would anyone know how I can access a float I define in C++ in BP without having to call "Get FloatDefinedInCPP" or something

blissful grail
#

BP always uses a getter when retrieving a property.

frozen ledge
#

rip, thanks

faint pasture
#

Raining should be a parameter in your current material though. I wouldn't swap materials for a rain mechanic

finite gazelle
#

I've misunderstood the question then I think

faint pasture
finite gazelle
pastel rivet
#

Is there no way to copy placed static meshes into a blueprint and keep location?

prime ruin
#

quick question. is there a way for me to invert orient rotation to movement? i don't want to animate the character strafing left and right but i want the character to walk backwards when it gets a negative forward axis input

blissful grail
#

Just turn off the setting?

#

Then setup the animations in the blendspace

prime ruin
#

i figured i'd have to do that

#

i was hoping i wouldn't

faint pasture
covert schooner
#

Is it possible to hide certain variables from direct access by child blueprints?

tawdry surge
#

Private variables

covert schooner
#

You mean the eye-closed? I tried that, they have access.

tawdry surge
#

No

#

Private is a different check box

#

Makes it read only outside the original BP class

covert schooner
#

oh got it, I see it now, thank you so much!

#

was really getting annoyed with dynamic materials getting exposed directly to children

undone surge
#

with the AI sight config is there any node where i can move the ai to my characters last seen position ?

#

and then how do i set it to go to the last seen location

blissful grail
#

There should be an event that you can connect to from the component about a sense occurring. In there, I believe there is a field for the location of the sense. Can save that and use it.

undone surge
blissful grail
#

Do it in the pawn (or controller, wherever you have the sensing stuff) and have it update a value in the blackboard.

undone surge
#

alright thnx

manic vessel
#

Hello ๐Ÿ™‚ how could I get the scale of something and change its scale based on a percentage, eg: get scale and increase by 10%

lone eagle
#

I have created a timer(elapsed time) UI by adding 1 integer per 1 second delay. i am currently attempting to pause the timer after i hit a triggerbox or actor with a box collider but i cannot get it to work unfortunately.

#

this is what i have so far

#

if anyone could potentially help me find a solution i would highly appreciate it

manic vessel
# lone eagle

Why not use timer by event and clear handle, as I think event construct acts like begin play and ONLY fires ONCE!

lone eagle
#

i am unfamiliar with how to do it like that

manic vessel
manic vessel
tawdry surge
#

Setting the scale of an object is always in relation to its original size. If you add .1 to the scale it'll be 10% bigger

lone eagle
#

i appreciate the help AlphaWolf, but i am not so sure. i see that setting it to event tick might help me find the solution though

manic vessel
tawdry surge
#

Get game time in seconds and make a time span

#

It will handle the counting for you

manic vessel
tawdry surge
#

Set tick enabled to false to make it stop

#

No it's not

manic vessel
#

I have always heard that it is.

tawdry surge
#

Its overkill in most situations but not inherently bad

lone eagle
#

i cant find those nodes

tawdry surge
#

"Get game time in seconds" and "make timespan"

manic vessel
#

and when you want to stop the timer use clear and invalidate timer

lone eagle
tawdry surge
#

Timer still runs on tick

lone eagle
#

i feel really dumb D:

#

im so sorry guys

lone eagle
#

i dont want it to clear

tawdry surge
#

You're fine. If you ever don't know what a node does or how to use it Mathew Wadstein has youtube videos on all of them

lone eagle
#

thanks for the suggestion

#

im just trying to get this done for an assignment of mine due soon

manic vessel
#

there are tons of tutorials on youtube to do a timer

tawdry surge
#

Id take the 5 mins and look up the suggested nodes. Makes it easier to do the work if you understand what you're doing

#

Timer by function or event or the game time and timespan

#

Either will work

tribal kernel
#

How can i make my flashlight be off when the game starts^???

#

this is the blueprint

manic vessel
lone eagle
#

i think im just avoiding re-doing the entire thing

tawdry surge
#

Set the light component visibility to false

lone eagle
#

@tawdry surge@manic vesselwhen i look up a timer, its always a countdown never elapsed time

#

the only tutorial for elapsed time is what i did with the integers

tawdry surge
lone eagle
#

if its not too much to ask for, id love it if you guys could point me in the right direction

tribal kernel
lone eagle
#

i will watch it, thanks

manic vessel
marsh oak
#

Why does this blueprint crash my engine when I try to place it in the scene?

Its on an editor actor. I'm trying to spawn a random actor when I place it in the level. The variants are all regular actors.

coarse marten
#

Is there anything like event hit that returns when the actor is not hitting something? I notice event hit only seems to fire when it is colliding with something.

manic vessel
marsh oak
manic vessel
#

I had issues with spawn actor in construction script once

marsh oak
#

I'm trying to simplify my level building by having the engine randomly pick an actor instead of me having to.

#

IE one of the 6 walls I have

tawdry surge
#

iirc all you gotta do is put your offset in the vector + vector node on the bottom of the screen and plug that in b

thin panther
#

If you want actor spawning at a location

#

Thats editor utility

manic vessel
marsh oak
lone eagle
#

do you know how to get these variables

#

i am very unfamiliar with them

dapper iron
#

Is there a way to set the terminal velocity of a Character?
Or more specifically, the maximum fall speed for it?

dapper iron
lone eagle
#

i do not have that option sadly

marsh oak
thin panther
#

Might want an editor utility widget i think

dapper iron
#

Ah. Them being there means that it's not something that you GET, it's a variable that you need to add yourself by pressing the + button next to the variables list header.

thin panther
#

But an editor utility actor should work

marsh oak
#

editor utility actor is what is currently crashing

marsh oak
thin panther
#

Is there any other thing that spawn actor

#

In the editor utility actor there is a section for assets try looking there

#

Theres a section for editor utility soecific actions

#

Id hazard a guess that it will be in there

tribal kernel
marsh oak
#

spawn actor from object seems to work!

#

I guess it doesnt like spawning from class for some reason

undone surge
#

if i am stuck in this node does that mean the current one is nver done executing or that it cant go to the next one

lone eagle
#

does anyone know what these variables are within a widget

#

this is what im trying to do

#

but i have no idea how to make the variable

marsh oak
#

text boxes?

#

because the BP is setting text values, and the TB prefix makes sense for it to be a text box

lone eagle
#

im unable to make them into variables

raw orbit
#

how do i convey to other clients in an online game that player X's head is turned based on their third or first person camera? the camera components exist only on the locally controlled client so im wondering how to go about it

thin panther
lone eagle
thin panther
#

no problem

lone eagle
#

now i wonder if i would be able to do a >= 60 to make a minute counter

#

but its not an integer so im not sure if its possible

thin panther
#

just truncate it

#

for minutes you only wanna show 1 minute even if the real time is 1.793 minutes

lone eagle
#

could you explain that further? or direct me a little. i am very unsure what a truncate is

thin panther
#

truncate chops off the decimal point, both 1.32435 and 1.4589 would become 1 when truncated

#

also conveniently there is a node called truncate

lone eagle
#

i would not know how to incorporate this into my elapsed time widget

thin panther
#

so if you divide that by 60 it should give you the minutes, e.g. 390 seconds, would be 6.5 minutes, and then truncate it so you only have 6 minutes

#

if im understanding game time in seconds

#

which i think i am

limpid bronze
#

How would I shrink a capsule collider from the top first?

#

Like say if I had a character I wanted to crouch and shrink their hitbox.

lone eagle
faint pasture
thin panther
#

you have game time

#

that gives you the seconds accumulating

#

so if you also divide that by 60 and truncate it, it converts it to minutes

lone eagle
#

i appreciate your attempt to explain it further. i just cant bring myself to understand what you are saying and i cant picture how to incorporate this solution

thin panther
#

i have given you the nodes

#

you want to display minutes and seconds, r just count minutes?

lone eagle
#

the code i have currently counts up the ingame seconds with milliseconds, but it climbs past 60 and continues to increase

#

was wondering if i could reset seconds to 0 as it hits 60, then add 1 to my minute

thin panther
#

not sure if you can manually set game time

#

but you could always manually subtract 60 - whatever amount of minutes

#

so until you hit the first 60 it would be game time - 60 * 0 which is just the game time

#

then after that it would be 60* 1 etc

lone eagle
#

i think i might just keep it the way it is

faint pasture
lone eagle
wraith wedge
#

I retargeted a mesh to another and made a new animation BP and all works in the game, but only the line trace won't hit the new mesh.
What could be the problem?

lone eagle
#

i just want the timer to stop when i hit a triggerbox that shows my WIN widget

faint pasture
thin panther
#

thats what i was tryina explain

faint pasture
#

And probably store ElapsedTime as a variable somewhere so you're not calculating it twice

#

Game instance or game state or player state or wherever.

lone eagle
#

i genuinely cant wrap my head around what you guys are saying

faint pasture
lone eagle
#

this is one of the ways i have done it

#

it works perfectly fine

#

and the way i want it

#

but i cant get the timer to pause completely when i hit a trigger box

#

which is why i am in this mess

faint pasture
lone eagle
#

the only tutorials i can find is from someone named Mathew Wadstein but they are extremely unhelpful

thin panther
#

poor mathew

faint pasture
thin panther
#

we have given ya the nodes ya need you just need to plug em in

lone eagle
#

im making a game where i need to platform from start to finish. timer starts on spawn and id like the timer to pause/stop once i finish/win the level

faint pasture
#

Put all the time handling stuff in game state or your Pawn or some actor or whatever.

#

I would probably make an actor for the finish line and have that handle the time.

lone eagle
#

but then how do i show the time handling through the UI

faint pasture
#

After all, that's the actor that's going to handle detecting a finish

faint pasture
lone eagle
#

i created an actor blueprint that acts as a trigger box

thin panther
#

the time tracking isnt done in the ui, they are just getting game time

lone eagle
#

oh

faint pasture
thin panther
#

they have got time tracking they just need to format it

faint pasture
#

Event begin play, set start time. On the trigger, set end time. Event tick, set current time

faint pasture
faint pasture
thin panther
#

thats their current way

faint pasture
#

I mean that can sort of work but it's pretty bad. Number one it relies on game time being the elapsed time, so no such thing as a start countdown or anything else. Also, it breaks when you want to register the finish time.

lone eagle
#

new variables?

thin panther
#

yes

lone eagle
#

all integers too?

thin panther
#

nah youll want floats

faint pasture
#

You understand what I'm getting at here or you just going through the motions?

lone eagle
#

im so sorry to both of you for the inconvenience. my first time doing something like this

#

thank you for all the help nonetheless i really appreciate your time

lone eagle
#

i understand youd want to set the end time as current time once the end of the level is triggered

#

but start time would need to be triggered via another actor?

faint pasture
#

And CurrentTime = GameTime-StartTime

faint pasture
#

Later you can do it different if you want (starting countdown or whatever)

lone eagle
#

i think i understand it but im not sure how to integrate it right now

#

give me a second and ill show my attempt

faint pasture
#

First check that it's working. Print CurrentTime when you set it and make sure it's going up

lone eagle
#

i have a hunch that im putting it in the wrong place though

#

nothing prints

faint pasture
#

@lone eagle
Begin Play -> Set StartTime = GameTime

#

You want to set the value of StartTime to be whatever GameTimeSeconds is at BeginPlay. It will be 0 or close to it but later you might want to start timing a different way

#

Then on Tick
Tick -> Set CurrentTime = GameTimeSeconds - StartTime

#

So every tick, CurrentTime will be equal to GameTimeSeconds - StartTime. This will usually be the same as GameTimeSeconds but might be different if you started later than Begin Play.

lone eagle
#

i think im too stupid for this honestly

faint pasture
#

Whenever the end level trigger is hit

Event Begin Overlap -> Check to make sure it was the player -> Set EndTime = GameTimeSeconds.

lone eagle
#

i know this is wrong but

#

when you say = game time

#

i leave start time alone

#

then on tick

#

okay

#

wait

faint pasture
#

Begin Play, set Start Time = GameTimeSeconds or whatever the time node is called

lone eagle
#

there is a node for game time

#

damn