#blueprint

402296 messages · Page 933 of 403

faint pasture
#

It's in there, the properties. GameMode is where you say that pawn, controller, hud, etc to use.

#

You wouldn't believe what I've seen people do, and of course, what is source control?

balmy apex
faint pasture
balmy apex
devout geyser
faint pasture
#

Because if you are restarting the level then you need to store it somewhere else.

balmy apex
faint pasture
#

@balmy apex yeah don't do that, unless that's what you want to do.

#

But then you would need to store where the player should spawn at in some thing that survives opening a level. That would be your game instance or using save files

#

For a test, try using restart player instead

#

There might be some other functions you can mess with too, I haven't done much with restarting games because my project literally doesn't do that ever

balmy apex
#

It doesn't really matter to me how it's done, just that it works

faint pasture
balmy apex
faint pasture
#

You can figure it out

balmy apex
#

Well, guess it's not in the DeathScreen since searching it didn't show anything

#

Wait, I already have a Restart Player in the character event graph

faint pasture
#

Restart player is a function on the game mode, so you need to first get the game mode to do it

balmy apex
#

It's also in there

#

So I guess it's working since it's in both places

#

And the respawn system does work, it just keeps respawning at the same place instead of moving like I want it to

balmy apex
faint pasture
balmy apex
faint pasture
#

Get actor of class will get you going

balmy apex
faint pasture
#

And do all of this where you're handling the rest of the death logic. GameMode would be best, do it all before calling restart player.

balmy apex
#

This is what I have now, and it's the same as before

#

This doesn't make it so the PlayerStart moves, I must've done something wrong, I'm just not sure what

balmy apex
dawn gazelle
balmy apex
#

It's all grey

#

That doesn't have a "Movable" option on it

#

It's just a basic PlayerStart, and I don't know enough C++ to change anything

#

In a normal game, yes, but that's part of what I'm doing

#

I want the player to be spawning closer and closer to an island that I have until they don't die anymore.

junior hedge
#

how exactly do binds work

#

do they just run constantly?

#

ik how to use them, just wondering

balmy apex
#

I still don't know how to do this. It sounds simple enough, but I'm clueless

#

This is what I have right now, and it thinks I'm trying to move the PlayerStart

#

Listing functions and saying to override them isn't helpful since I don't even know what half of those functions even are

trim matrix
#

hello:)

#

can anyone help me with interfaces in UE5?

manic knot
#

I’ve triple checked, when I print out the Hit Actor it it is the correct Character, could it be because I’m setting it to a Local variable first? Could it be that I’m using a function and not an event to do the trace? I am invoking the function from the Server

dawn gazelle
limber parcel
limber parcel
devout geyser
#

Anyone knows the reason why widget button event on clicked works on 2nd click? and not the 1st one?

#

the blueprint is pretty simple
event clicked -> remove from parent - self(the widget)

tawdry surge
#

Pry didn't set your focus so thats what the first click is doing

devout geyser
#

@tawdry surge you mean like this? still the same result

tawdry surge
#

Try "set user focus"

devout geyser
#

Nuh still the same... I am trying doing with custom events and such but nuh chief nothing works. Its so odd

tawdry surge
#

Yeah thats the only reason I'm aware of that it would make you click twice on the first button push

devout geyser
#

The method works on different widget tho, with the same logic like press button -> widget gone | and it works fine

balmy apex
limber parcel
#

i dont see anything that would affect the player spawn in this code

balmy apex
#

That was supposed to be the goal of the Offset

tawdry surge
#

You can't set the actor location of the player start cuz it's not movable. You can spawn a new at the new location and destroy the original
But id Google the functions mentioned above and make a custom system thats a lil more scalable

balmy apex
#

I don't need tons of scale, I just want to move the player -50 on the X-axis every time they respawn

devout geyser
#

@tawdry surge fixed it, I am an idiot

limber parcel
devout geyser
#

so basically without noticing i called the event that is creating the widget twice without noiticing in the player's BP, sry for stressing ya

balmy apex
limber parcel
#

i cant say for sure but this system tends to do weird stuff like this

#

i was messing with foreach loops the other day and apparently delays just stop the loop

tawdry surge
#

Then make a transform variable on the gamemode
Bind on destroyed with the player character as the target
Then on begin play also get the player start transform
Then off the delegate you can unpossess the character update the location, spawn a new one and possess it

limber parcel
#

yeah delegate is key here

#

interface can also work i assume

balmy apex
#

I got as far as creating a Transform variable, and now I'm lost. I'm fairly new to UE, so I need a lot of direction

tawdry surge
#

Type in " assign on destroyed " in the game mode event graph

#

That will make the binding and delegate event

balmy apex
#

Ok, got it

limber parcel
#

anyone got a good tutorial that covers delegates? i never actually used them in blueprints lol

tawdry surge
#

Feed in the player character as the target for the bind
Then you just need to, from the delegate event, "unpossess"-> add your offset to the transform and use it for the spawn transform of the new one-> "spawn actor from class"->" possess"

#

You use dispatchers? @limber parcel

limber parcel
#

nope

#

i did everything with actor components and interfaces so far

tawdry surge
#

Basically it assigns an event that will be fired when ever a dispatcher call is made from the target

balmy apex
#

Umm, Unpossess doesn't show up for either of them

tawdry surge
#

You need to get player controller

#

Thats what we want to unpossess the character

faint pasture
#

@balmy apex if you can't move PlayerStart just make your own movable actor to use as the player start and move it. Or do it all with logic in the GameMode. You're making this way too complicated.

balmy apex
tawdry surge
#

They're setting it up in the game mode now

balmy apex
#

Get Player Controller doesn't show up anywhere either

faint pasture
#

Just make sure you understand what's going on. All a PlayerStart is is an actor that the GameMode looks for when choosing where to spawn a player in at. You can make it look for other actors or just override whatever functions in GameMode you need to to make spawning work however you want.

balmy apex
#

I tried to make it just the player, but that didn't work

tawdry surge
#

Get player controller isn't showing up as an option in the gamemode event graph?

balmy apex
#

Not if it needs to be connected to something

tawdry surge
#

No it's a pure node

balmy apex
#

I can get it just fine by right clicking

tawdry surge
#

Yeah get that

#

Index 0 is player 1

#

From there you can get possess/unpossess

balmy apex
#

So now I have 2 things that reference Player Index 0

tawdry surge
#

It gets a lil more complicated if it's multi-player

#

But single player it'll work fine

balmy apex
#

Perfect

#

So now I have these two sections

tawdry surge
#

So left part we're gonna run off a custom event
Right part will run off dead

balmy apex
#

So the right part will do this stuff?

tawdry surge
#

Nah begin play only runs once so after you die 1 time it won't respawn you again

balmy apex
#

Oh, so how do I get the player to "die" then?

tawdry surge
#

We'll bind on destroyed to the new pawn from the on possess event in the controller. Thats later tho
For now just attach a custom event to the code on the left side of the first picture

#

Then attach "dead" to the code on the right

balmy apex
tawdry surge
#

Oh no

viscid barn
#

you might want to update the controller to possess another pawn otherwise wouldn't you just end up stuck?

tawdry surge
#

Custom event->bind on destroyed
Dead->unpossess

#

We're gonna get there

#

But you can't possess a new thing without unpossessing the old one first

balmy apex
#

Ah, I reversed the right side

balmy apex
#

This is better

tawdry surge
#

Nah delete the blue dead node

#

Connect the red one to unpossess

balmy apex
#

Oh, like this?

tawdry surge
#

Yep

#

Now we want to take the spawn point transform variable you set and we want to get it

#

So pull that out from "my blueprint tab" on the left

#

We then want to right click the orange output pin and "split struct pin"

#

This will give you the location, rotation, and scale individually
Then you're going to pull off the location pin and make an add node (vector + vector on ue4)

#

This is where you add your offset
Then you need to set the spawn transform variable to save this new transform.
Make sure you plug in the original rotation and scale values if you want to keep them

balmy apex
#

What kind of variable should Transform be? It's a Vector for me

tawdry surge
#

No its a transform type

#

Bottom of the list of basic types
Orange colored one

balmy apex
tawdry surge
#

Get -> Add->Set

balmy apex
#

Huh? Get what?

tawdry surge
#

If you grab the transform variable from the tab on the lower left and drag it onto the event graph it will ask you get or set
You want to use a get first then we will add to it, then you can set it to the new value

balmy apex
#

So, Get Transform, then do the addition, then set it?

tawdry surge
#

Yep

balmy apex
#

It won't let me connect Transform to the addition

tawdry surge
#

You gotta split the orange pin remember

#

We just wanna add to the location vector

balmy apex
tawdry surge
#

Yep

#

Now connect unpossess->set "transform location"

balmy apex
tawdry surge
#

Perfect

#

Now set"transform location" ->spawn actor from class

balmy apex
#

Ok, got that

tawdry surge
#

You can right click any colored pin on the right half of the set node to recombine the struct btw

balmy apex
tawdry surge
#

Yep

balmy apex
#

The only part here I'm unsure of is the class I chose

#

I chose the actual character instead of the playerstart

tawdry surge
#

What class is your default pawn set to in the gamemode

balmy apex
#

The class I chose

tawdry surge
#

Good

#

We're not making a player start, we're making a character

balmy apex
#

Ok, awesome

tawdry surge
#

Now you can pull off the player controller again and possess

#

Then use the output from the spawn node as the target

balmy apex
#

Where does the possess go?

#

I'm just seeing "Add Possessable" from the SpawnActor thing

#

Is it like this?

tawdry surge
#

Yep

#

Now all you gotta do is hop over to the controller BP so you can call your custom event in the upper left and switch the binding target to the new pawn after each death

balmy apex
#

Controller BP?

tawdry surge
#

If that's what you called

#

It

faint pasture
#

Why TF are you guys doing all this stuff, way overdoing it

balmy apex
#

Hmm, I have a controller for my main menu, but I don't know if I have one for my actual level

balmy apex
tawdry surge
#

What is the controller attached to the game mode

#

You're almost done

#

Just finish this way

balmy apex
#

I see Get Player Controller in the game mode, but that's it

tawdry surge
#

No in the class defaults what player controller class are you using?

balmy apex
#

These?

#

I don't know where PlayerController is

slender sky
#

Anybody here willing to share their advice or experience working with PrimaryDataAsset in blueprint?
Any known quirks or possible pitfalls?

#

One of our projects got corrupted after changing some PrimaryDataAsset related stuffs.
The whole project wouldn't open anymore at this point, keeps crashing even before the editor is ready.
Got no choice but to rollback to a previous backup.

tawdry surge
#

3rd one down

balmy apex
tawdry surge
#

Its the default so it's a c++ class in engine content.
Were just gonna do it from the player class

#

On begin play in the player cast to the gamemode class you are using

balmy apex
#

This is in the DepthsCharacter from before

tawdry surge
#

Nah you want a reference to the object not just the class

#

Just a cast to MainGameMode

balmy apex
#

So this one?

tawdry surge
#

Yep

#

Off the object pin "get gamemode"

balmy apex
#

To the left of the cast?

tawdry surge
#

Yeah

#

When casting we need to have an object we are try to change the reference type of

balmy apex
#

That makes sense

tawdry surge
#

Last step is to call your custom event from the "as main game mode" pin

balmy apex
#

Just like that?

tawdry surge
#

Yep

#

All done

balmy apex
#

Uhh, I don't think it's moving anywhere. Should I be using something other than the PlayerStart in the editor?

#

I changed the Transform value in X and it didn't do anything

tawdry surge
#

Well 50 is a little less then 2 feet

#

Maybe test it with a much bigger number

#

And you mean the x value of the add node right?

#

Changing the variable default value won't do anything

balmy apex
#

I changed it to 1000 and it was still in the same place

tawdry surge
#

On the add node?

balmy apex
#

Yeah

tawdry surge
#

And when you die you are respawning?

balmy apex
#

After I click the button to respawn, yeah

tawdry surge
#

Then something isn't right.
You shouldn't need to do anything to respawn. It should just happen as soon as you die

balmy apex
#

I made a button to respawn

tawdry surge
#

Oh then you'll have to do some break points and a print string to see whats happening

#

The thing we did should do it automatically

balmy apex
#

This is what the button press does

slender sky
#

I'm not sure how you 2 end up with such a long thread, can't you just do the following instead?

  • add 1 vector variable to track the player's spawn position, put it somewhere persistent (game mode, game instance, level, player controller, etc)
  • add the extra distance (+=) to the vector at the start of the player pawn spawn (actor/character beginplay)
  • SetActorLocation to that value afterwards.
tawdry surge
#

No that destroys the game mode too so your transform is reset every time..
You'll have to test it by actually killing the player

#

Jump off the edge of the map or something

balmy apex
#

The player dies after being underwater for long enough, the death screen shows up when they die

#

This is what brings up the death screen

tawdry surge
#

Ok.. do you then call destroy actor on it

balmy apex
#

No, the screenshots show all the code I have for calling up the death screen. Should destroy actor go after the Set at the end?

tawdry surge
#

Well you'll want to delay so the player can see your death screen but yeah

balmy apex
#

This is the death screen right now, the player is supposed to click the button to respawn

tawdry surge
#

Then you'll have to destroy the character from the button press

balmy apex
#

Before reopening the level or should I just remove the Open Level entirely?

#

I don't think I can destroy the character from the button press, that doesn't seem to show up anywhere in the death screen event graph

tawdry surge
#

Remove it entirely
And you'll need to "get player pawn" again and call destroy actor off that

balmy apex
#

Like this?

tawdry surge
#

Yeah

#

You'll also need to call remove from parent to get rid of the dead screen

balmy apex
#

After destroy actor?

tawdry surge
#

Yeah

balmy apex
#

Is that it then?

tawdry surge
#

Should be

balmy apex
tawdry surge
#

Looks like you're spawning in the landscape and falling through

#

You'll have to play with your offset

balmy apex
#

It's only -50

tawdry surge
#

In the game mode you're setting the transform to the player start transform on begin play right?

#

Otherwise you're snapping to -50,0,0

balmy apex
#

This is the whole game mode

tawdry surge
#

On beginplay->set "transform location"

#

You wanna then get the player start location to feed into the left side of the set node

balmy apex
#

I added this, but what do I connect it to?

#

This thing?

tawdry surge
#

No make a new set node

#

You want to set the value in the beginning so that every time the player dies you can update it

balmy apex
#

How do I get the player start location to link to the set transform?

#

I don't remember which thing is the player start location

tawdry surge
#

"Find player start"

balmy apex
#

That doesn't go into Set apparently

tawdry surge
#

No just right click in space

balmy apex
#

I mean they don't connect

tawdry surge
#

You need to connect the controller reference to the player pin

#

And then pull off the return value pin and type get transform

balmy apex
#

This doesn't feel right

tawdry surge
#

It will work

balmy apex
tawdry surge
#

The proper way was overriding the built in functions but this way is fine for your purposes

#

Yeah go ahead and test it now

balmy apex
#

And overriding doesn't make sense to me anyway

#

"Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetPlayerPawn_ReturnValue". Node: Assign On Destroyed Graph: EventGraph Function: Execute Ubergraph Main Game Mode Blueprint: MainGameMode"

#

It breaks after clicking respawn twice

vernal mountain
#

How do I record the output string as well as index value for the Random node? Since each print string calls it and gives two different values

tawdry surge
#

Ok.. click on the custom event node and in the details panel add an input

balmy apex
#

Who is that to?

tawdry surge
#

You

balmy apex
#

Ok, got it

tawdry surge
#

Set the type to the class of your character

balmy apex
tawdry surge
#

Yeah

#

Now there should be a new blue pin on the event node

balmy apex
#

I see one, yeah

tawdry surge
#

Plug that into the target for the bind node

balmy apex
faint pasture
#

You guys still plugging away at this?

tawdry surge
#

Yeah

#

Last thing.
Pop into the character BP and plug a self ref into the custom event function call

balmy apex
tawdry surge
#

Yep

#

Should now be done

balmy apex
#

It keeps dropping me in the same spot again. And after the mouse is used once, the cursor stays on screen

tawdry surge
#

If you put the mouse on the screen then you gotta take it off again
And you'll have to print out the location values to see what is happening with that

balmy apex
#

What do you mean by take it off again? I had that already set up somewhere, I guess it's not working for some reason?
I don't know how to do that.

tawdry surge
#

Idk where you set it up, but nothing we just did would effect that

balmy apex
#

It was probably in the death screen when the level was reset.

#

I don't know how to hide it again though

tawdry surge
#

Get player controller->Set show mouse cursor to false

#

You'll want to do that in the death screen before removing it from parent

balmy apex
#

Like this?

tawdry surge
#

Yeah

balmy apex
#

Now to get the transform of the spawn working, somehow

tawdry surge
#

Your best bet is to use print strings and check what the values are while playing

balmy apex
#

How do I do that? I've seen it done, but never how to do it

tawdry surge
#

Type print string and plug whatever you want into the in string pin. Most things will auto convert

#

There's also an append node for putting a bunch of values on the screen at once

balmy apex
#

Well, it works now, so -50 was just probably too low to notice

#

I really appreciate all your help. Your patience is immeasurable my dude. Thank you so very much

tawdry surge
#

Nice glad it finally works

balmy apex
#

I have 1 more thing to figure out, but that can wait until I have a couple tries. It's just setting up a "win" condition which shouldn't be too bad

balmy apex
#

Hmm, whenever I add something, the death screen no longer goes away

#

The mouse cursor disappears as expected, but the death screen stays

#

Fixed it by saving the level again

wanton saddle
#

hello I'm new in the sector, I wanted to make sure that if someone touched the wall (Wall5) then it changed the collisions

surreal peak
#

Aaaaand?

wanton saddle
#

and it doesn't work, I pass over but the collisions are not there

#

(as set by me)

wintry geyser
#

It needs collision in order to register 'Hit' to begin with, so it's going to fail to turn the collision on.

wanton saddle
wintry geyser
#

Basically anything that allows passthrough (Like Trigger), and register on 'Begin Overlap'

wanton saddle
#

now i try,thanks

wintry geyser
#

🤔

wanton saddle
#

(I try to correct the error)

wintry geyser
#

I don't really know why you'd want to do that, are you trying to collide THEN enable Block response to all? I gotta know the use-case here. It might be kinda jank. But basically you'd set Collision to Enabled as Trigger, then on overlap Set Collision Response to Block

wanton saddle
#

ok

wintry geyser
#

Like this

wanton saddle
#

yes i have understand, thanks 👍

split karma
#

I'm used to reactive programming in ReactJS so this is a very basic, fundamental question about programming in Unreal - let's say I have a boolean and if it's true I show one mesh, and if it's false I show another, is that something that I program in the "Event tick", so it's checking the boolean on every frame, or is there a way to program it so it only checks if the value of the boolean changed, like React would do it?

icy dragon
split karma
tawdry surge
#

It can be wherever you like but generally you want to let things handle their own logic.
So if the mesh is gonna change then I'd put the switching code in the actor with the mesh

split karma
#

I need to wrap my head around this, I'm not used to imperative programming. But RepNotify looks like the thing that I need to achieve what I want

tawdry surge
#

Thats one way to do it

dusky crane
#

if i want to check if a name in a struct is empty, do i have to check if its equal to "None" or to just " "

tawdry surge
#

Empty

obtuse herald
#

So I suppose it would be "None" unless you changed the value to "" somewhere

tawdry surge
#

You sure bout that? Everytime I print an empty string it just doesn't print anything

dusky crane
#

conflicting answers 😅

tawdry surge
#

I mean it's easy to test

obtuse herald
#

strings default value is empty

#

fnames default value is "None"

#

fnames can be empty tho afaik

#

so the question is, for what do you want to check? if the fname is empty, or if the fname has not been set?

dusky crane
#

name has not been set

#

i have widgets that i need to check if they have an empty struct, so either it hasnt been set or has been un-set

obtuse herald
#

then check for "None"

tawdry surge
#

Oh its purple not pink. My bad

dusky crane
#

thanks friends 😄

split karma
#

Are there any build in ways to create time-independent spring animations like this one? Set the stiffness to 0.05 to see the effect better. Sequencer uses keyframes so that wouldn't work and I found TweenMaker but that's also time dependent. With this, you just set a new position for the object an it smoothly moves to the new position on its own
https://svelte.dev/examples/spring

tawdry surge
#

I'm not sure how you'd do time independent.
It's either gonna be a distance over time or number of frames

broken geyser
#

Hey, we had a discussion yesterday about spawning actors from construction script. Actually it is possible:
FActorSpawnParameters Parameters;
Parameters.bAllowDuringConstructionScript = true;

icy dragon
slender sky
#

Question, putting ConstructObject inside a PrimaryDataAsset is a bad idea isn't it?

#

Project got corrupted before, so I did some tests, doing the action above seems to crash the project pretty consistently

#

I'm assuming that PrimaryDataAsset are meant for data only?

tawdry surge
#

This may be a simplistic take, but..
If doing something crashes your project, then don't do that

slender sky
#

Nah, it doesn't crash the project, it corrupts it, cannot even open the previous version

#

Just want to make sure whether it is allowed or not to actually use it that way.
Because the editor didn't stop me from doing it.

tawdry surge
#

I've never done that personally so can't say definitely, but I wouldn't do it based on the fact that it could possibly corrupt my project

slender sky
tawdry surge
#

The editor won't stop you from doing alot of things that you shouldn't do. You can dig through the c++ if you really wanna know what exactly it's doing

drowsy matrix
#

#cpp message
@naive geyser I'm pretty sure "Look At" requires two world positions to create a rotation. You look from point A to point B. So in this case try using World Location, not Direction, in ConvertMouseLocationToWorldSpace

split karma
#

Thanks, that's exactly what I need

trim matrix
#

what does the error delay stack mean? I put in a delay it stops the infinite loop

#

but it shoudnt loop in the first place

#

it ends with user input

thin panther
trim matrix
#

how would that happen?

eager thicket
#

Can anyone tell me how I identify this specific blueprint node so I can search for it? Or at least tell me what it is called?

#

By that I mean the thing itself

jolly cairn
#

hi all, how can i make a particle effect show on the object based on where they are aiming?

#

i want to make it so that no matter where you look on the object, if you are welding, a particle effect shows

thin panther
thin panther
thin panther
jolly cairn
#

thank you

thin panther
#

Oh guys been here over year he should know smh <@&213101288538374145>

#

Crossposted in 3 channels

trim matrix
#

@thin pantherthe codes pretty long lol

#

the highlighted piece cause the infinite loop state

quick grove
#

sorry guys, why the session nodes (create, find and join session) work only locally?

#

I can't find any other player's session if it's not connected to my Wi-Fi

trim matrix
#

and this is what it calls

thin panther
#

Aha it does

trim matrix
#

it does

thin panther
#

So the loop error is probably coming from the fact that in one frame you could infinitely be failing that branch statement

#

Resulting in it calling

#

If it fails, then it never has a chance to change, so it calls again, and fails, and calls again

trim matrix
#

it could, but it shoudnt. Since with a .1 delay it works fine

#

since its end in user input at some point

#

should I just add a tiny delay to fix it? or?

thin panther
#

No you need to restructure that, cause im not seeing where user input can interrupt this loop

trim matrix
#

this is the turn order bit that it calls

#

itll end up being my turn

#

so it cant possibly infinitely loop

thin panther
#

Im seeing a pathway here where alive never sets to true within the frame resukting in recursion

eager thicket
trim matrix
#

hmm

#

im not sure how to fix that lol

thin panther
#

Spread it out over mutiple frames

#

Rather than checking alive sequentially like that it needs to be tick based i imagine

trim matrix
#

its checked when taking damage

#

no reason to check otherwise

thin panther
#

Ah yeah thats fair

trim matrix
#

just plopped a ''delay untill next tick'' in there and its a crude fix I guess haha

sinful gust
#

Is there any way to get last movement input vector in client-side on multiplayer?

mint mica
#

how does everyone get those straight and diagonal lines ?

sinful gust
mint mica
#

ahh explains a bit,

#

i thought there was some built in setting for it lol

tawdry surge
#

You can change the interpolation setting on the wires in editor preferences

mint mica
#

i'll have a look at those,

#

i'm going to put it all in functions to clean it up a bit i think, i just hate sitting there moving nodes around to obtain some kind of neatness

astral stratus
#

i try my best to keep everything neat as I go along but it always ends up somewhat a mess

mint mica
#

same ,

#

gets worse especially when you're trying to build someting thats effecient rather than using some high level function

astral stratus
#

I add comments like crazy if it starts looking a mess because i wanna be able to tell whats what

#

im working on a building system for my game right now and its not easy thats for sure

mint mica
#

same, whats in that screenshot handles a small part of foundation placement behaviour,

astral stratus
#

you following a tut or just doing it yourself?

mint mica
#

myself,

astral stratus
#

nice

mint mica
#

i wanted to solve it mathematically and make it nice and effecient

astral stratus
#

im following a tutorial and boy lemme tell you im sure im going to have problems, the guy is using a third person character while im using first person and the ghost outlines dont line up with the camera they are off center a bit

mint mica
#

i alot of tutorials i find start people off with some bad habbits from the start eg line traces off the tick event

astral stratus
#

im not line tracing off a tick event thankfully

#

i have it looping with a delay

#

but im sure to run into problems

mint mica
#

i usually run it off the mouse input,

#

so it only triggers when the mouse moves

astral stratus
#

well this guy has me running it off the camera position with get world loc and get foward vec

#

ill show ya

desert juniper
# mint mica

I have electronic nodes, but got rid of it a while back.
felt like half the time i was programming, and the other half I was fixing the wires to look semi-acceptable

mint mica
#

bit of an odd line trace

astral stratus
#

yeah im trying to figure out a better way to do it..

desert juniper
#

you're multiplying it by 0 and then adding it to another vector

#

a vector is just 3 float values

#

so you're adding 0 to all three valies

astral stratus
#

yeah so thats what i had a feeling because the guy has a boom arm on his third person char and i dont

desert juniper
#

giving you an original value of the vector to begin with

#

ah so if you're in first person, indeed multiply it by 0

#

but if you're in third, multiply it by the boom arm length

astral stratus
#

im in first

desert juniper
#

that way you'll get a line trace from the character onwards

astral stratus
#

so i should keep it right?

desert juniper
#

okay, then yeah go with my first suggestion

#

it's not doing anything anyways

astral stratus
#

ok

#

lemme remove it

desert juniper
#

it's just muddying up the code

astral stratus
#

i had a feeling

desert juniper
#

everything else is right

astral stratus
#

cause the bottom one is what tells the char how far they are aloud to place the build

mint mica
#

what does the other side of the linetrace look like?

desert juniper
#

whoops. here we go

astral stratus
#

done

weary lodge
#

Hey folks waveBoye

split dagger
#

I can't rename an event. It says the name is being used already but I have searched window/find in blueprints and also in the sidebar search in the BP. It doesn't exist. Any ideas how to fix this?

astral stratus
#

still offcenter sadly

mint mica
#

with a builder application something else to do aside from the actors to ignore is to check the "out hit distance" and limit how close it works too

desert juniper
astral stratus
#

this is also what the other side looks like @mint mica

mint mica
#

i usually add this in

#

stops you shooting across the map from the collision of the thing you are about the build,

astral stratus
#

ahhh ok

#

any ideas on how to line my build up with the camera?

#

rather than it being off to the right

mint mica
#

you are in first person?

astral stratus
#

correct

mint mica
#

how far to the left is it doing it?

#

have you got draw debug set to one frame

astral stratus
#

one sec ill show you

#

lemme download gayzo so its easier

split dagger
astral stratus
desert juniper
#

unreal realllly hates reparenting and redirects. BPs can become corrupt sometimes. be careful when reparenting

mint mica
#

that looks like a box trace

astral stratus
#

well basically what the tutorial had me do was create a ghost mesh of the floor and thats what your seeing

sullen needle
#

I am very confused on where my vector + vector blueprint node is not showing up?

mint mica
#

the line trace is working the ghost mesh isn't rotating as you move around

astral stratus
#

there is the ghost mesh

trim matrix
#

i have a question
so i got my actor and i wanna instantiate like 5 prefabs in it but their positions can be manually adjusted in details pannel of the actor
how can i do that?

mint mica
#

object location as the start player character as the target then you'll need to tweak the values a bit

astral stratus
#

ok ill look into it thank you

devout dove
#

I have a base Blueprint and use child BPs to inherit the basic functionality and my issue starts with collision. How can I get the collision without it existing in the base BP?

desert juniper
devout dove
desert juniper
#

can you better explain what it is you want to do?

#

I assume you're having a tough time because you can't decide between a static mesh and a skeletal mesh

#

if all you're working with is a static mesh, then just add that to the parent BP, and don't actually add a mesh

#

let the children set the mesh

devout dove
#

So, my Airplane movement requires me to move the Scene instead of my Static Mesh, because I'm adding "sway" like flying it's weird. So I need to detect the Static Mesh collision and handle it, except I'm pushing the scene forward instead of the static mesh

desert juniper
#

help me understand here

#

what's your base bp and your child bp

#

i.e. is baseBP airplane and your child bp a specific type of airplane?

novel haven
#

hi whats the problem here ?

remote meteor
#

game mode =/= game mode base

#

doublecheck your game mode parent class

novel haven
#

damn its game mode base

#

can i revert it

void yarrow
#

Does anyone know how I can pull up the 'GetModifiedMaxSpeed' node in UE5?
I'm trying to follow this tutorial, but can't find this node or 'GetMaxSpeedModifier' node, which should allow me to more or less get the same effect.
https://youtu.be/HuM0baAraaM?t=1364

Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv

Join our community discord!
Discord: https://dis...

▶ Play video
#

Thank you for any help!

novel haven
desert juniper
void yarrow
#

@desert juniper

I've tried that, but I don't see it in my drop down. I've tried typing in the search in numerous ways to see if I can get it to come up, but no luck. Could it be a difference in the character movement component? It looks like the first person blueprint had some changes between the tutorial build and now.

desert juniper
#

rooThink1 maybe it's deprecated in ue5

void yarrow
#

Yeah seems possible

desert juniper
#

don't see it in the docs for UE5, only for 4.27 and below

void yarrow
#

I was hoping to reproduce the node via the GetMaxSpeedModifier, but that doesn't appear to exist either.

desert juniper
#

looking at source code, there doesn't seem to be a max speed modifier valiable

void yarrow
#

😢

#

great tragedy

desert juniper
#

I'm assuming it's just a multiplier. why not do it yourself?

#

create a wrapper, or just save the modifier on the character BP

desert juniper
#

then just set the max speed to be maxspeed+maxspeed*multiplier)

void yarrow
#

Thanks for looking for me. If anyone has any idea how to reproduce that setup in UE5, let me know.
I'm very new to blueprints and UE programming.

slender sky
#

Sounds like it's deprecated?

void yarrow
#

Do you know what I would be multiplying?

desert juniper
#

uh, i just kinda explained it

void yarrow
#

Oh gotya

#

I didn't see your second comment

#

I'll give that a go.

desert juniper
#

😄

void yarrow
#

Thank you!

slender sky
#

"GetModifiedMaxSpeed() is deprecated, use GetMaxSpeed() instead"

desert juniper
#

which is odd, since it's not what the previous function was doing

void yarrow
#

Yeah I tried that and it doesn't seem to work. Could be an error elsewhere in my BP.

desert juniper
#

kinda odd that they'd deprecate it from the movement component, but it'd be super easy to add that in yourself

void yarrow
#

(using getmaxspeed)

desert juniper
#

just creating a wrapper component

void yarrow
#

Yeah I think I'll try that. Thanks for pointing me in the right direction.

devout dove
desert juniper
#

then why not just add an empty static mesh to the base bp?

trim matrix
#

How exactly are GUIDs used in Unreal?

cursive quest
#

I am getting an error showing "Attempted to access___ via property, but is not valid (pending kill or garbage)" How to fix it?

mental trellis
trim matrix
mental trellis
#

There's no GUID asset management system where just generating a GUID means you can reference that asset/object.

#

That's what pointers are for.

#

Well, variables.

mental trellis
#

First off, why do you need to use it?

trim matrix
#

just saw a save game tutorial for unreal and this guy said to make an array of GUIDs in your save game object

trim matrix
#

he didnt explain how to use them just left it at that

mental trellis
#

Ah. For save games.

#

That's a rather large topic.

mental trellis
#

If the tutorial you're watching doesn't spell it out properly, try a different one.

trim matrix
faint pasture
#

If you're following along some tutorial and you don't 100% understand what's going on and why, pause it, do some research and experimentation. Learn to draw, not just connect the dots.

faint pasture
trim matrix
#

im just curious

#

guess ill just watch some general programming videos on it then

mental trellis
#

It's just a number, like Adriel said. A unique ID.

#

Use it like you'd use any other unique ID in a database, etc.

broken wadi
#

@faint pasture Should just make a tutorial on how to stop watching tutorials at this point.

spark steppe
#

😄 .

#

there are good tutorials tho

#

you still have a 10% chance to pick one

devout dove
#

Are line traces expensive on CPU?

mental trellis
#

No

spark steppe
#

depends

#

someone tested lately with 500 traces and had 50% increase in gamethread time

#

but highly depends on your scene

devout dove
#

I need 1 trace for movement and 1 trace to shot rockets

#

The tutorial I'm watching multiplies the vector with a float number not vector by vector, idk how can I change it to float?

spark steppe
#

rightclick the lower input pin (convert to float (double precision))

junior hedge
#

@spark steppe do you know anything about how alt tabbing works in ue5?

#

I alt tab and some mechanics fully don't work but some do

#

Actually I think I know why

#

My tick events weren't working (because fps goes to 0 when I alt tab) but timed events (beginplay with days) work

#

Anyway to change that with console? Or nah

#

I don't want fps to decrease when alt tabbing, or just completely remove alt tabbing unless you are in another level

junior hedge
spark steppe
#

r.FullSendWhileInBackround = true

faint pasture
spark steppe
#

the editor has an option for that, yes

#

but i don't know if there's anything similar for standalone

#

he want's it in cooked build, too

junior hedge
spark steppe
#

that was a joke

devout dove
#

I use Camera Lag on my Spring arm and it makes the line trace come from sides when I turn

faint pasture
#
r.FuckinSendIt = true

This one will make it run really fast

junior hedge
spark steppe
#

and r.MinFPS = 100

faint pasture
#

But it might just be an artifact of the draw debug

spark steppe
#

so you dont have to care about bad optimization

#

and it will always run at 100fps

junior hedge
#

I have the game capped at 60

#

Using console commands

faint pasture
#

Is the trace actually missing?

slim grove
#

i have the function and it traces the line but it comes from body of the player and donse tilt depending on the camera how would i fix this

devout dove
faint pasture
#

@devout doveWhat I mean is are you sure the TRACE is 1 frame old or just the debug draw

#

If the order per frame is

Stuff
Trace
Update Position
debug draw

#

then the draw will be drawn at the old position, not the new one which is what you're about to see

#

Are you using physics to move?

raven pilot
#

hi, I have problem where i cant use the transform tools, i can use it on other blueprint objects but not this one

trim matrix
#

nice rock

raven pilot
#

any advice is appreciated

raven pilot
tawdry surge
#

The static mesh is the root, so you can't move or rotate it in the BP

#

That will use it's world location and rotation

#

@slim grove forward vector target should be the camera not the mesh

raven pilot
raven pilot
raven pilot
junior hedge
tawdry surge
#

Yeah the root position is the actor position in the world

raven pilot
#

it doesnt exist until i press a button

tawdry surge
#

Is said for the forward vector
Leave the location with the actor

#

@raven pilot What are you trying to do?

slim grove
#

dosnt work still

dense furnace
#

if your trying to do a trace from the camera that should work

#

if you dont see it make sure its getting called

junior hedge
#

anyway to check if the game is tabbed out or not?

slim grove
#

nono i see it its in the wrong possision

dense furnace
#

i mean its going to be actor postion then actor + camera location

#

where do you want it

slim grove
#

when i use camera manager it works as intended

raven pilot
dense furnace
#

are you trying to do a trace from the camera

slim grove
#

from the camera yes

#

im wanting to trace to detech what im looking at

dense furnace
#

is the interactor ref the player

#

if not your getting a different cameara

slim grove
#

the interactor is the player

dense furnace
#

the top one should work then and be tracing from the camera to in front of it are you sure it calls it why is this getting called outside the player and if its not then just grab trrhe camera itself

slim grove
slim grove
trim matrix
#

Hi everyone! do you know which node to use to disable "visible in ray tracing" of a staticmesh component?

tawdry surge
#

@SENPAI#33O9 a scene root is fine but not the cheapest option performance wise.
If you are making the assets you can just export them from your dcc with the pivot point at the bottom.
If you're not and the pivot is in the middle (like on the rock mesh above) you can use the half height to offset the spawn point.

#

I'm having a hard time pinning down an issue with some widget components.
I have two widgets in world space I'm using for interaction spots. They work fine but in the level (And only in the level) they render black (top picture)
BP editor viewport, widget editor, and material editor all look fine.(bottom picture)
Anyone have any idea why this could be happening?

dark meadow
#

I hope I'm allowed to ask for help in here, but I was wondering if anyone knew if it was possible to make it so that everytime you load a map, a landscape is randomly generated

#

I'm using the landmass plugin inUE4

raven pilot
junior hedge
#

is there anyway to get if the game is alt tabbed or not

surreal peak
#

Not sure if BP, but iirc the GameViewport or GameViewportClient should have some function for checking if it's in foreground and similar

elder mango
#

can anyone help me enable world partition? I can't find out how

raven pilot
elder mango
#

yeah i figured it out

raven pilot
#

k

latent finch
#

Does anyone know of good tutorials for saving the player their own inventory of things they can customize. Like if you have a party of people that other characters in the game can have how can I save the players versions of those so I can save their stats or move lists.
I have been kind of trying to find tutorials but I'm new to creating saves and I'm not sure the direction I should be looking in

pulsar path
#

is there a way to make a blueprint a child class of another blueprint? so i dont have to copy/cut and paste everything over to a new one.
the other class i want it to be a child of is just an intermediary class between the original parent class and a couple child classes
sorry im bad at english today

latent finch
#

You should be able to make a child of a blueprint by right clicking on it and make child

pulsar path
#

i already have blueprints ive made stuff in, i want to make them lower down in the hierarchy, under a new child class i made
so it would go from from Parent -> Child to Parent -> new intermediary class -> Child

#

i know in code its as easy as changing like 2 lines of code, and i have 5 classes that i want to do this to and would rather not copy paste everything over to the new ones

latent finch
#

Ok, I misunderstood originally

tawdry surge
#

In Class Settings you can assign the parent class there at the top

wanton rain
# slim grove

Try this, the get camera view might only need to be set once in begin play, I was running this in animBP, this works as a dirty test, haven't looked into cleaning it up, but works, this will shoot out a trace from camera.

slim grove
trim matrix
#

Hi, how can i create a child from MaterialInstanceDynamic ? I don't see it

#

and for the context, i'm trying to recreate this from Lyra.. that is located in "Engine/Transient" but i do not have it either

faint badge
# trim matrix Hi, how can i create a child from MaterialInstanceDynamic ? I don't see it

MaterialInstanceDynamic is not an asset type that you create in the content browser, then you create a dynamic instance of that material using the Create Dynamic Material Instance node. The Transient folder shows that the object was created at runtime and will be destroyed when the game ends. I am not familiar with that bit of Lyra so you'd need to see what's creating that instance and see if there is a mechanism for setting your own material as the base class for your instance.

See the docs for more information on how Material Instances work: https://docs.unrealengine.com/4.27/en-US/RenderingAndGraphics/Materials/MaterialInstances/

Hierarchical material relationships that allow modification of properties to alter behavior and appearance of child materials without shader recompilation.

trim matrix
junior hedge
#

anyway to change graphic settings in "Standalone Game"

icy dragon
trim matrix
#

Hey, I got a sound that i play at the start of the game. Now after i removed that blueprint parent, how can i stop the sound from playing in another blueprint?

acoustic lava
#

Hi

#

Getting this weird error

acoustic lava
trim matrix
#

Why does it make an black stripe on the right side?

#

Is there a quick way to get a reference to objects in a widget blueprint? I am just wanting to get the distance between two actors in my world and have that distance show up on the UI. I am really new to UE4 and I know the bare basics of blueprints and I just can't figure out how to get information from the objects in the current level to show up in the widget.

tawdry surge
#

You shouldn't be getting actors or doing any work inside your widget. If you have some info you want displayed to the screen you would calculate it in the relevant actor and pass it to the widget

trim matrix
#

alright, I thought I would have to do an input pin on the widget to do that. I see you can use the return value pin and set the text that way. It must be too late because that seems like such a simple thing I should've been able to figure out on my own. Thanks for helping out

acoustic lava
#

And use it for logic, depends on what you want to do

#

You can make a variable and then click on the variable and expose it on spawn and make it instance editable

#

Then it will appear when you make the widget

slender sky
# acoustic lava

What's the parent class of Effect as well as the class of the blueprint where you add that node?

acoustic lava
#

I was using construct class in component

#

That was the issue

slender sky
#

So it's solved?

autumn shard
#

I want to print with a delay in my loop but it completed instantly printing once only instead of the index number (6)

#

someone knows what I'm missing?

mental trellis
#

I think the delay node is overwritten instantly by the next entry.

#

I think someone said the solution was to modify the loop node?!

#

Shrugs

#

Or use a timeline or something.

autumn shard
#

you're right, I found it, not very hard to implement though

#

@mental trellis thanks for your answer

mental trellis
#

No worries

icy dragon
limber parcel
trim matrix
#

Hi everyone! do you know which node to use to disable "visible in ray tracing" of a staticmesh component?

jaunty crow
#

For some reason get owning player always returns null no matter what i do

paper galleon
jaunty crow
#

thats just set to self by default, what should i set it to

paper galleon
# jaunty crow

Which class is this? Unless you're in the player controller class, it wouldn't work properly.

#

And you'll get null

jaunty crow
#

Its the player charachter

paper galleon
#

Get controller in player character and pass it in

#

Cast to pc first

jaunty crow
#

Ahh i've just now realised i posted this in bp i meant to put it in multiplayer haha. my bad, I'm trying to setup a join client button and this tutorial im following is saying use get owning player and it kinda just worked for him but he did in ue4. I'll move my question to #multiplayer

paper galleon
#

It's a BP problem first.

#

Just try this fix and see it works

jaunty crow
#

Okay

#

It starts hosting but i cant connect for some reason

paper galleon
#

The get owning player does not return null anymore right?

jaunty crow
#

still returns null

#

wait wait wait

paper galleon
#

Hmm

jaunty crow
#

lemme doyble check it is

paper galleon
#

Do a IsValid node and print the result

jaunty crow
#

still false

paper galleon
#

Let me see your player character setup.

#

The place where you're passing the PC

jaunty crow
#

do you mean this?

paper galleon
#

Hmm. Weird

#

Change Getplayercontroller

#

To GetController

jaunty crow
#

still false

paper galleon
#

Okay. I'm out of options. That should usually fix it

#

Only place it should be false is on the server or something

#

Widgets don't exist on the server

jaunty crow
#

yeah its very weird

jaunty crow
#

Thanks for the help

paper galleon
paper galleon
fallen glade
#

So this is a bit awkward but I've just reached the point in my project where I'm thinking about abilities, visually, in depth for the first time... how do you combine animation and vfx? do you shove everything in a montage ? A sequence animation?

paper galleon
#

#gameplay-ability-system is massive help to structure such things. But it's a bit complicated to get into. Worth it though if you can invest the time to learn it.

fallen glade
paper galleon
#

In that case I haven't thought about it outside GAS, sorry

fallen glade
#

I mean stuff like this, this guy is using sequences, doesn't seem right to me https://www.youtube.com/watch?v=gEfCevGCqpo

Download - https://www.patreon.com/posts/66036620
NFT - https://opensea.io/CGHOW
Twitter - https://twitter.com/cghow_
👉👉 If you Liked it - http://bit.ly/2UZmiZ4
Channel Ashif - http://bit.ly/3aYaniw
Support me on - https://www.patreon.com/Ashif
Support me on - paypal.me/9953280644
Lightning Hit FX in UE5 Niagara Tutorial | Download Files

#cgh...

▶ Play video
tawdry surge
#

For complex animations you'd use a montage and anim notifies to fire the particle effects

fallen glade
#

Thaaanks

paper galleon
fallen glade
paper galleon
#

I'm thinking about abilities, visually, in depth

Sounded really huge

fallen glade
#

Well, I know how to create the effects/materials/animations but never put them together like this before

#

(huge for me)

paper galleon
#

I see.

frank gyro
#

is there a particular input type i should use when making a function in a blueprint interface (first screenshot is blueprint interface) just to use a custom event in my player character bp (BP_ThirdPersonCharacter)? The custom event from the blueprint interface works just fine in my BP_ThirdPersonCharacter but idk if it's bad to use a float like that or if it's ignorable, sorry if there isn't enough info im new to all of this

glacial mica
#

Hi guys! Just a quick question!

#

How do I create an IK chain with FABRIK on rigid body bones?

#

I want it to behave as rigid body and use last bone for IK

#

thanks in advance

slender sky
glass stump
#

If I were to create Load and Save functions, it would be a good idea to do it in the game mode, right?

tawdry surge
#

@frank gyro passing basic data types like float, int , string, etc.. is fine
It's hard object and class references you want to avoid

frank gyro
round basin
#

Hello, how can I get these textures from a StaticMesh ?

#

(I mean not manually)

tawdry surge
#

Get a reference to the static mesh actor or component and "get material"

glass stump
#

Anyone know any decent tutorials on how to create a save system? I've looked at so many but can't figure it out lol.

tawdry surge
#

You're not gonna find many good full system tutorials. You're better off just learning the basics and building out the system you need incrementally

glass stump
#

Ah, okay, thank you.

molten stone
#

hello, anyone can help me in private for a simple problem I have?

desert juniper
#

how are you acquiring a reference?

molten stone
#

like this

desert juniper
#

so then is the cast failing?

#

add a print after the set node

tawdry surge
#

Assuming the third person character owns the widget you could just pass the ref v2 in on spawn too

bold torrent
#

GetText is a bound function to a TextProperty I assume. It's most likely the case that your reference is being called first frame when widget is created, during which the Reference has not been fully initialized (Which would be the second frame).
Easiest way to get rid of the error is to just check if the variable is valid before reading anything from it @molten stone

trim matrix
#

Hi everyone! do you know if it's possible to get all the child of a static mesh to inherit all of his attributes?

#

How to fix this bug? It works when I disconnect and reconnect any node and re-compile..

desert juniper
#

same problem

trim matrix
#

@desert juniper thx 😄

round basin
#

How can I get these textures ? I mean the preview images

trim matrix
# acoustic lava You can store refs in your widget

So what I am trying to do is create a UI that shows the distance between a radio and transmitters in the level. The transmitters can be turned off and on so the UI will have a dynamic list. I watched a tutorial about server browsers so I can learn how to make the UI with dynamic slots for each transmitter. My problem is getting the actor location for the transmitters so I can display the distance in the UI. Could this be done using your method?

devout grove
#

Is there a reason why BeginPlay() would be called after GetSpawnActor in this screenshot?

#

those first two UE_LOGs were written in the GetSpawnActor() and the second two logs were written in BeginPlay()

acoustic lava
#

Ah its not

trim matrix
#

@trim matrixcan you share that tutorial? sounds usefull

acoustic lava
acoustic lava
acoustic lava
trim matrix
# trim matrix <@456226577798135808>can you share that tutorial? sounds usefull

https://www.youtube.com/watch?v=oO6foa5qDck I know there was a better quality tutorial out there but I can't remember which one I actually watched.

Hello everyone,
today we will work on a small and simple server browser.


Plugin: https://forums.unrealengine.com/showthread.php?69901-Advanced-Sessions-Plugin


Do you have any Questions, wishes or anything else?
Just put ...

▶ Play video
trim matrix
acoustic lava
#

Third person character BP

#

Widget HUD BP

acoustic lava
#

This might help

surreal peak
#

I assume so but just confirming

devout grove
#

yes

acoustic lava
#

Does anyone know of a way to swim up on waves, that are displaced by the material, using the default water provided by unreal?

devout grove
surreal peak
#

Right. BP BeginPlay is not actually C++ BeginPlay. So the Parent Call node you have there mainly calls the BP Parent BeginPlay, not the C++ one.

#

The BP one is called in the Super::BeginPlay method as a BlueprintImplementableEvent

#

So it's basically redundant to call the parent node in BPs if the BP is a direct child of a CPP class

#

Super::BeginPlay will cause the BP code to run and then it runs whatever comes after that in c++

molten stone
devout grove
#

@surreal peak is there a way to get the C++ code to run before the blueprint?

surreal peak
#

Theoretically by placing it before the Super call

#

But you have to keep in mind that you then lose whatever the CPP parent of your CPP class did in BeginPlay

#

If you need to ensure this, expose your own BlueprintImplementableEvent

#

And call it after your BeginPlay code executed

#

And use that in BPs instead of BeginPlay

devout grove
#

I'll give that a shot

#

thanks!

trim matrix
#

I thought I solved the problem, but I still get this error...

#

I constantly check every property before HealthComponentRef is set... HealthComponent cannot be missing...

round basin
#

How can I get these textures (I mean thumbnails)

devout grove
#

@trim matrix do you have BlueprintReadOnly set for the UPROPERTY() macro?

trim matrix
#
    UHealthComponent* HealthComponent;```
#

Yes

devout grove
#

any chance you didnt instantiate it in the constructor?

#

maybe swap it over to BlueprintReadWrite?

trim matrix
#

I Instantitate it in BeginPlay, is that the problem?

#

But even if BeginPlay comes way later than the UWidget Update.. it should still work...

devout grove
#

i usually instantiate components in the constructor. If i have to do any dynamic bindings, thats in the PostinitializeComponents()

#

id say swap it over to the constructor and see if that helps?

trim matrix
#

Also, the bug is sporadic.. when I disconnect any node on that BP Widget and connect it again it works

#

Yea ok, I will try

#

Does not work in the constructor.. the widget is not even getting created .. propably because of GetWorld() which is not available in the constructor??

eternal basalt
#

I was wondering if someone could lead me down the right path here. Im needing help for a TurnBased Battle game that Implements Action Command timed prompts inside of battle. If anyone could shoot me ( A youtube link or someone to start looking ) I'd appreciate it ! and in case someone is willing to help me directly, im trying to do something similar to the old RPG games turn based battle systems

mental trellis
#

And you shouldn't use them in constructors.

trim matrix
#

Yea, I figured

devout grove
#

we're only talking about instantiating components right? woudnt you want to do that in the constructor?

#

like if i want to add a spring arm or a camera, you instantiate them in the constructor like in that screenshot right? Same thing for components right?

#

im fairly new to this so im probably wrong but this usually works for me

trim matrix
#

@devout grove sorry, I think what Daekesh ment was something like GetWorld(). My bad though, I confused it with the Widget... yea I do instantiate the health component in the constructor

#

Also set it to BlueprintReadWrite.. still getting sporadic errors.. it is really frustrating tbh xD

#

This is clearly a bug and I need a work around

devout grove
#

i think i might be wrong about changing it to BlueprintReadWrite, should probably be left at BlueprintReadOnly altho i dont think that will fix the core issue here

cobalt gulch
#

How would I go about revealing certain players in the gamemode, i already have a material for highlighting the player through walls i just need a system

trim matrix
#

Yea

devout grove
#

😦

#

@trim matrix i guess my last question is what blueprint are you working in? Is it for a UI widget or is it on the player blueprint itself?

#

can you check if its currently registering as a nullptr when you look at it?

#

im wondering if its just not getting initialized or was never set

trim matrix
#

Its a WidgetBlueprint. I think there is no solution for this. May be due to Live Coding? The problem exists since 2016

#
#

Recompiling the Widget Blueprint solves it

#

Still.. really annoying

devout grove
#

those issues are the worst

trim matrix
#

Indeed

#

Maybe there is a way to write a python script to recompile specific blueprints when compiling the project

#

But I am not annoyed enough to look into it right now

weary lodge
#

Hey, you here?

#

I got a very weird situation here

#

you meant it like that, right?

#

but if I do that, I get true way more often than 30% of the time.

worn verge
#

Can you show us the random bool with weight function?

weary lodge
#

My goal is that if I click on the botton it has a 30% chance going to to false

weary lodge
worn verge
weary lodge
#

like that?

worn verge
#

Ye

weary lodge
#

it should work in theory, right?

worn verge
#

It should

#

Are you sure it opens the right level?

paper galleon
#

That probably works fine. You just need a large enough sample (number of times the function is called) to accurately determine if it is truly 30%

#

E.g you can't test only two times or even ten times and expect a good result.

weary lodge
weary lodge
#

(I'm a complete beginner, my apolozies)

cobalt gulch
#

How would I go about revealing certain players in the gamemode, i already have a material for highlighting the player through walls i just need a system

#

I am doing this with custom depth btw

paper galleon
weary lodge
#

but like

#

i opened the lvl like 5 times and it was the wrong lvl 5/5 times

#

that seems to be very wrong

paper galleon
#

The "true" level opened? Or th false

versed sun
#

Instead of opening the level (which takes time), just print if it is true or false

paper galleon
#

Again that is the nature of randomness. If you opened the level like 50 times, the false would probably open more than the true

weary lodge
paper galleon
#

Hmm. You could implement your own random bool function if you don't trust the provided one

weary lodge
versed sun
#

are you ".3" or ",3" ?

weary lodge
#

OH MY OH MY OH MY

#

blame the german language for that

#

hah!

#

im COMMA

trim matrix
#

its not PRNG?

weary lodge
#

let me change that

vast horizon
#

I have a dodge mechanic in a game that if you're standing still, should dodge you forward. I have it working whenever the player is moving, but I can't seem to get this standing still working. Can anyone enlighten me as to why this doesn't take the player's rotation, make it an angle, and point the vector (5000,0,400) down the player's X world rotation?
(What happens is it dodges in the world X)

weary lodge
#

oh wait

#

no

#

it automatically uses a ,

#

when i put a dot in

#

I'm gonna have to skip this problem for now

#

gonna work on it later.

#

thanks people!

trim matrix
#

@weary lodgebro just code the problem out in strings

#

see what it does

weary lodge
#

"bro" I dont know how to code.

trim matrix
#

run the code 100 times, then print how many times its false or true

#

opening a level 5 times and then complaining its not random enough doesnt make sense at all

worn verge
#

I'll quickly ask something

#

Does anyone know why this code does not work when my character dies?

#

Setting the visibility of a WBP does not work anymore.

#

This is basically the code

#

And I use a selector to know which visibility setting to choose.

paper galleon
worn verge
#

One Dark Pro

paper galleon
#

Thanks

worn verge
#

You're welcome

devout grove
#

@worn verge code stops working when your player dies? if the pawn gets deleted then the controller no longer has an owner

#

i think

#

does the controller possess something new after the player dies?

cyan bone
#

Can i make something like an unconventional custom LOD in blueprints? Like a group LOD, not a LOD for one but more characters.

For example, if im at 0.01 zoom, I replace 1000 people by a cube with textures on each side.

#

How do i do this?

versed sun
#

Have your zoom code trigger LOD changing Event Dispatchers

#

Then in whatever holds your 1000 people, bind something to the Event dispatcher

cyan bone
#

Everytime i zoom in i check if the actors Groups of Warriors are far

versed sun
#

yes, where ever you change Spring arm Target Length, or move your camera

cyan bone
#

Ok, but wont checking it for all groups of soldiers be too expensive?

#

Is it possible to check only for those that are on camera

#

maybe this is just making it worse

#

Its just that there are blocks of armies that are very far away, and it wouldnt make a difference to convert them to boxes with textures

#

so they are still visible, but they are now just 1 thingie

#

this vs 50 impostor instanced static meshes per batallion

#

or maybe im just overthinking

versed sun
#

are the groups each an actor ?

cyan bone
#

Yes. So i have batallion groups

#

They are made by HISM's

#

of soldiers

versed sun
#

ok

cyan bone
#

But they get huge

versed sun
#

is it a top down view, mousewheel zooms ?

cyan bone
#

wouldnt it be benefitial to convert the whole group into a cube at a far away distance?

cyan bone
#

top down

#

yes mousehweel

versed sun
#

ok

#

so i would start, every time the view changes, either zoom or panning, call an event dispatcher

#

in your Group actor, bind an event for that dispatcher

worn verge
#

It shall work

versed sun
#

that event you just do distance from camera to self

cyan bone
#

thats brilliant

versed sun
#

if it is over/under threshold only then do make a change

cyan bone
#

and this is better than having the little soldiers replaced by impostor sprites, right? Because this means 1 rectangle cube with textures vs 100 sprite impostors?

versed sun
#

well....

#

i was thinking taking it a step farther

cyan bone
#

pls tell me

versed sun
#

use a scene cap component, take a "pic" of the group, and display that material on the cube

#

so, if you have a non full Group, like half are dead, your far LOD can show that

versed sun
#

But , i would get Part A working before getting the render target working

cyan bone
#

Its something like this

#

Yes first part A. With the zoom communication to the actors. Then this

#

this is amazing

#

i would only need to make the photo fit properly into the context

#

or take the photo from the right perspective

versed sun
#

yah, from same angle as camera