#blueprint

402296 messages ยท Page 826 of 403

unborn copper
#

I am using Blender for the dome so I'll go back and figure out how to do sockets there.

#

I figured there would be a way better way than what I was mucking with. Thanks again.

surreal peak
#

By spawning it? Not sure what you mean

#

I assume this happens cause it's one frame with 0,0,0 velocity, and then it continues falling

#

Try to set the MovementMode to None, and then after a while back to Falling

obtuse yoke
#

Anyone have a clue why my cast to chess controller is failed? I checked the world settings, and the default player controller is my ChessController_BP

viscid barn
#

OMG YES
I managed to retrieve my original bp component after two bricks and an entire day spent trying to recreate it from memory ๐Ÿ˜ญ

surreal peak
surreal peak
tranquil abyss
#

I hope I just didnt say the same thing twice

surreal peak
#

Hm, kinda. To spawn a class you specify it on the SpawnActor node

brazen merlin
unreal quail
#

how do I dissolve a reroute pin that isn't necessary again?

brazen merlin
unreal quail
#

it breaks links tho

brazen merlin
#

reconnect it

unreal quail
#

I thought there was a way to dissolve them ๐Ÿค”

brazen merlin
#

let me know if you find out ๐Ÿ˜„

tranquil abyss
#

not any children

obtuse yoke
#

Sorry it took so long. This is my first time working with blueprints

surreal peak
surreal peak
#

You are casting to the non BP version

#

Does your BP version inherit from the other one?

obtuse yoke
#

A

#

You are

#

Correct

#

Good sir

#

Thank you

surreal peak
#

If you selected DefaultSword, then that is spawned

#

You need to select a different class if you wnat to spawn something else

tranquil abyss
#

guess I need to make an array of classes

brazen merlin
#

or a var and set it when you need to

surreal peak
#

Yeah, for example

#

Depends on what you exactly want

#

If it's a random one, then an array somehwere that you pick a random element from would be correct

faint pasture
tranquil abyss
#

I guess I should not worry about this now, In the future im going to make an database (sorta) of items

#

and spawn from it based on area difficulty

brazen merlin
#

you could mock up a temp array to test if thats the idea

tranquil abyss
#

is a good way or a dump way of doing that making a spread sheet of all the items

#

and spawning it that way

#

basically making a item database

surreal peak
#

Reeeaaally depends on your game and how complex you want this

faint pasture
surreal peak
#

They are based on Structs

faint pasture
surreal peak
#

The more complex version is via DataAssets

faint pasture
surreal peak
#

They are discoverable by the engine directly and each weapon would have a data only asset

faint pasture
#

It should have absolutely nothing to do with the player controller

surreal peak
#

Combined with a class that matches it

tranquil abyss
#

cool

obtuse yoke
surreal peak
#

An AnimBP is usually used to drive animation states for a classes SkeletalMesh

faint pasture
#

@obtuse yoke look at how the third person template does its animation blueprint

surreal peak
#

Aka imported anims

blissful grail
# surreal peak Combined with a class that matches it

Oh, you do it like that too? I thought most people do like, BP_Item with like DA_Sword, DA_Axe, etc...And just relied on the BP_Item and switched the DA. That's what I tried at first as well, but didn't like the workflow all that much. Now I have a BP class that matches the DA.

tranquil abyss
#

@surreal peak are you any good with UI stuff. I made a post in #umg earlier that i dont thing anyone saw, id like a few knowledgeable people to look at it, possible to suggest a starting point

surreal peak
#

Given you are doing a chess game (?) you wouldn't move the pieces with an animBP

#

Unless yo usomehow figured out how to do that with anims o.o

obtuse yoke
faint pasture
#

I think what he wants is like animated moving. Moving the night isn't just sliding a piece, it's a night running

surreal peak
#

right

surreal peak
#

Then each piece has a SkeletalMeshComp

#

With a SkeletalMesh and AnimBP

#

And you would try to work directly with that in the AnimBP

#

If you need to know if a piece is selected ,then you can get that from the piece

#

Your PlayerController can set variables on them,

#

I wouldn't access the PC directly in the AnimBP

#

99% of the time you stay relative to the actor the AnimBP is on

obtuse yoke
#

Hmm ok, I'll try figuring that out

surreal peak
#

If your BP_Item can support all DAs, then sure

#

But if some DAs need special stuff, then you need a new BP

#

E.g. differently sized characters

#

If it's really just data that makes them different, then one BP with multiple DAs is fine

faint pasture
#

@obtuse yoke basically the anime BP reads data from the actor that owns the skeletal mesh and uses that to drive animation. I would start with just making a Boolean for if the piece is moving or not.

surreal peak
#

ha, I'm not the only one that writes anime by mistake

faint pasture
#

Eventually you'll want to play montages when selected and stuff like that but start with just one variable

stiff chasm
brazen merlin
#

you have to work with data assets one by one right? like change values and such for them? is there a bulk way to edit multiple DAs?

blissful grail
faint pasture
#

I'm using voice to text so yeah, it's not exactly 100%. I used to be worried about AI but if it can't even tell what you're saying then we got a couple years left before the overlords arrive.

#

Bulk edit property matrix

brazen merlin
surreal peak
surreal peak
obtuse yoke
#

So would I use "Get Owning Actor" and then plug that into Get Velocity?

surreal peak
#

What is the parent class of the chess pieces?

indigo bough
#

Hey folks, if I set my controller to 'show mouse cursor' the axis reads 0 unless I hold a mouse button down. This feels like a bug? How can I read the mouse X / Y axis while the cursor is enabled?

brazen merlin
obtuse yoke
blissful grail
surreal peak
#

But does that make sense?

#

E.g. You have a Health Potion

#

And the only diff in the DAs is one is 10 HP, one 5 HP and one 20 HP

#

Why making more BPs?

blissful grail
#

No, it doesn't make sense. I know where you're going with it.

#

Honestly - for the editor experience

surreal peak
#

Okay :P as long as we are on the same page, it's fine

#

I won't judge

indigo bough
# surreal peak InputMode?

It works if I set it to Game Only, but I feel like this'll become an issue when trying to interact with UI later on?

surreal peak
#

Game routes your Input differently

#

If you need Mouse stuff when UI is enabled, you need to go through a Widget, or if at all through the GameViewport

#

(c++)

#

Or, if you are really fancy, and you need Input stuff without UI/Game, make an InputPreProcessor

#

Which is also C++

unborn copper
indigo bough
surreal peak
#

We use the PreProcessors to check for Gamepad vs KB/Mouse

#

To change icons and stuff

blissful grail
#

When placing the BP in the level, if it doesn't already have a DA assigned to it, it is kind of annoying to select the right one and then adjust it's world position/rotation based on w/e mesh it has. That's my main gripe. So, I prefer that I do a bit more setup work so that my designer can just drag and drop and not really worry about it too much. That's mostly it.

#

And I've also noticed that when in c++ land, using the construction side of things to update the actor in the editor is buggy. (I forget what the C++ method is called for the BP constructor)

surreal peak
#

Just for the Collision actually

blissful grail
#

Those are the two bigger reasons why I prefer the 1:1 mapping. Small ones, yeah. But annoying none the less.

surreal peak
#

But simple variables not

#

But if you do 1 to 1 mapping

#

Why not just use the BPs

blissful grail
#

I use DA's for the separation of the data that won't change

#

So I could be working on the BP and designer could work on the DA

#

Have 'em checked out separately

surreal peak
#

Makes sense

faint pasture
#

@blissful grail what do data assets get you that a data table doesn't? I still haven't figured out exactly what the point of data assets are

#

Can you automatically crawl a folder and have all data assets be used or do you have to add them to some sort of table somewhere?

odd ember
#

that they are data that are assets

#

although when people call them DAs I automatically think district attorney

surreal peak
#

You can give them a Type

#

And tell the Engine what Folders they are in

#

Then you can always just get lists of them via the Type

#

You usually also store them as softrefs

#

So you load them when needed

blissful grail
#

DA integrates with the asset discovery system. Which, admittingly, I haven't used all that much, but one day I will. Also, one person can have the entire DT checked out at a time, where as multiple people can have different DA's checked out.

The way I see it is that you can look at a DA as a row for a DT.

surreal peak
#

You can also cut them into bundles, so a DA can have a bundle for UI

#

And then it only loads the UI if you want

odd ember
#

I haven't personally found a need for that level of indirection of data but I can understand why they exist

surreal peak
#

Helps a lot when saving RAM

#

And keeps load times small

#

And I think they are nice for patching, cause you can put them into different pak files

#

Which keeps update sizes small

#

If you have a huge DT, you need to send the whole DT with everything in it to your customers when they update

#

At least iirc

blissful grail
#

๐Ÿ‘†

odd ember
#

well you can have composite data tables

blissful grail
#

You can also update DA's with json.

odd ember
#

pretty sure you can do that with data tables too

blissful grail
#

So you can do quick updates through a simple HTTP request

surreal peak
#

Yeah youcan do that with DTs too, that's true

odd ember
#

not that I want to come off as a big fan of data tables

surreal peak
#

I think they have both their reason to exists

odd ember
#

but the extent of data I manage is a single data table of about 100 entries at most

maiden wadi
#

Don't do much UI stuff? ๐Ÿ˜„

odd ember
#

all my UI is diegetic

faint pasture
#

I can't think of a single situation where the binary size of a data table would ever be even a consideration. Wouldn't like the entirety of World of Warcraft item list be like 1 MB

blissful grail
#

I didn't know about json and DTs

surreal peak
#

You can't ship the DT without the content it refs

faint pasture
#

Ooh ya that's the ticket

surreal peak
#

And if you are unlucky and you didn't design it accordingly, you might be loading EVERYTHING into your ram when the DT loads

brazen merlin
surreal peak
#

At package time I doubt that matters?

#

One other thing is that DAs can actually have code

#

Not sure when you use that

#

but you can have functions in them

brazen merlin
#

i dont have any uuid or asset class stuff in my dt, its all floats, bools, vectors, and names - so there shouldnt be any association with game assets

surreal peak
#

Fun Fact: The Ascent has code that alters the actual DA Object

#

That was used for Loot DAs

blissful grail
#

Right now, I'm probably not using DA's to the fullest and what not, but I like the flexibility of it.

surreal peak
#

In our games we have GameplayAbiltiies, Effects, Weapons, Meshes, AnimBPs etc. in the DAs

odd ember
blissful grail
surreal peak
#

Yeah I think we did that to alter drop chances

#

So basically all chests that were sharing a DA had a common drop chance

brazen merlin
#

when i was trying to pull the direct asset it, it was a pain and not to my aesthetic liking, glad to know about asset association though, feels like i dodged this bullet

surreal peak
#

If something didn't drop, it would drop at some point later

#

The sad thing is: Some of you might only find out about all the pain from whatever you might be doing wrong when you target a console

#

Specifically "old" gen

brazen merlin
#

i gotta look into soft references at some point for particle effects though

blissful grail
#

For my gun modularity system, I rely on DA's. Each part is its own DA. Then they get combined later on.

surreal peak
odd ember
#

well all the packed files from that one data table would total about 20 mb or so

surreal peak
#

Keeps the Editor quick too, although I'm sometimes not sure what it loads and what it doesn't load. Random af

odd ember
#

so I'm ok

surreal peak
brazen merlin
surreal peak
#

DT refs Class A, Class A has 2 meshes, 5 materials, 4 sounds, 13 FX.
Class A refs Class B and C cause of a Cast node or so, which then come with more FX, Materials, etc.

#

If all of that is in a softreffed DA, nothing gets loaded until you spawn the class

odd ember
surreal peak
#

Game Dev is a PITA

#

cries

odd ember
#

not all of it

maiden wadi
#

To be fair, you can softref in DataTables too.

odd ember
#

ah cool, they're not entirely the devil then

brazen merlin
maiden wadi
#

You just use a soft class or soft object ptr instead of a hard one.

surreal peak
#

Yeah, pretty sure you can. But I don't want to write the code to handle that

brazen merlin
surreal peak
#

I think the only PITA I have with UE is too many things that do the same thing a bit different and never properly :D

faint pasture
#

So how do you automagically discover data assets?

surreal peak
#

ProjectSettings has an AssetManager setting

faint pasture
#

So I can just make a new weapon definition and it shows up in drop tables etc

#

Baller

maiden wadi
#

Datatables are much better at loading up commonly used data that matches a lot. Keeping a long list of mesh assets a player might use for style changes on the character for example. You can do the same thing in a DataAsset with maps, but keeping a massive map is slightly less intuitive than being able to edit data in a datatable.

For defining classes and defaults and the like, DataAssets are much better, as they often have to differ some, can be hierarchical, etc.

surreal peak
#

You give the DA class a Type (unique)

#

Make 50 of them in your DropData Folder

#

And go to the ProjectSettings

#

Select the Type and DropData Folder to match

#

And that's basically it

#

Some C++ required though

#

(given we are in the BP channel)

faint pasture
surreal peak
#

Both, the base one would have the PrimaryAssetId override, which you then further override in subclasses

#

But you also make new parent classes in C++ usually

#
UCLASS()
class UWeaponData : public UCoreDataAsset
{
    GENERATED_BODY()

public:
    UWeaponData();

public:
    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    TSubclassOf<AWeaponActor> WeaponClass;
    
    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    USkeletalMesh* SkeletalMesh;

    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    TSubclassOf<UAnimInstance> AnimationInstance;

    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    FGameplayTag WeaponType;
    
    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    TArray<TSubclassOf<UGameplayAbility>> WeaponAbilities;

    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    TArray<TSubclassOf<UGameplayEffect>> WeaponEffects;

    UPROPERTY(BlueprintReadWrite, EditAnywhere)
    FName WeaponBone;
};
#

Something like this

#
UWeaponData::UWeaponData()
{
    Type = UCustomAssetManager::WeaponType;
}
faint pasture
#

From looking at the asset manager stuff, it looks like it can automatically cruise for blueprint classes too. We might not even need the data assets. We already typically have a blueprint class per item design so...

surreal peak
#

static const FPrimaryAssetType WeaponType;
const FPrimaryAssetType UCustomAssetManager::WeaponType = TEXT("Weapon");

#

Yeah it can

#

Iirc there is a checkbox for "Is Blueprint" or so

#

In the Project Settings

#

Asset Manager tab

#

But I only used it for DAs

untold fossil
#

I'm trying to figure out why my material billboard with "size in screen space" enabled ironically DOESN'T size in screen space. Anyone know why? The billboard is just a set size as if the "size in screen space" isn't enabled. The setting doesn't change anything. ๐Ÿค”

#

is this setting bugged?

cold cobalt
#

Anyone know why tf I can't add a new physics body for a specific bone? I've looked it up and supposedly there's an add/replace body button but I'm not seeing that when right clicking a bone.

#

(not sure if I need to put this in another channel)

brazen merlin
onyx token
#

is it normal to have a bunch of these in your anim blueprint if you need variables sent over? rooThink1

cold cobalt
finite fulcrum
#

Is there a way to trigger a hit event when the physics asset of the player mesh hits the ground? I just want to add a sound of the body hitting the floor after it ragdolls

surreal peak
onyx token
surreal peak
#

Most people I guess just have the Rolling boolean on the Character, and pull that directly

#

Most basic way is to use the Update event that the AnimBP has by default and just polling the data

#

Is that the best way? idk

onyx token
#

wait really, is it okay to just do it every frame? I was always bonked for it

surreal peak
#

It's the smallest of your problems if you ever need to optimize

onyx token
#

well i always thought that casting every frame is a big nono and vvvBap

surreal peak
#

:P case once and save the ref?

onyx token
#

fair

surreal peak
#

AnimBPs have init nodes

#

And you could even check if the saved ref is valid and then not cast if it is

#

etc etc

versed sun
onyx token
#

yeah, i forgot about that

#

i'm actually even doing it lol

surreal peak
#

And yeah, CreateEvent is a nice thing to know about

onyx token
surreal peak
#

Cause that also allows you to bind from within functions

#

Or even stuff in other objects

onyx token
#

also could it be that overriding montages with other montages is kinda buggy? rooThink1

small oracle
#

Is there a way in blueprints to check if it's being played in editor and not a packaged build?

novel goblet
#

Hi All, I'm a little confused trying to figure out why I can't cast to a pawn was hoping someone might see something I don't.
When I run this it is hitting the fail condition

onyx token
#

so if you do some UI stuff you could package that as debug

small oracle
#

Well I've got some code I just want to run in packaged build

novel goblet
#

yeah print string i believe is development only if you look at my picture

tawdry surge
#

Where are you setting the player ref?

novel goblet
#

well thats what I'm trying to do here. I thought I had it set to the pawn in the level

tawdry surge
#

Oh nvm

novel goblet
#

yeah wish I could have cut out the bottom section with the onclicked but wanted to show my side menu settings

tawdry surge
#

Is the player pawn for sure the thing you're casting to?

novel goblet
#

That's what I'm wondering. I really don't have much in my scene I have the JFMVPlayer_BP which is based off a c++ pawn class. PlayerPawn

small oracle
#

I figured it out, there's a "is packaged build" function

tawdry surge
#

Did you set it in the game mode to be the default player pawn class

novel goblet
#

I thought I had, but I would not be surprised if it switched back on me somehow

#

annnd it looks like it might have

#

And that fixed it!

novel goblet
#

I cannot tell you how happy I am for you bringing this to my attention @tawdry surge you fixed a huge bug for me and i got my quest tracker debug working as a result
Cannot tell you how happy I am to see the below in my log readouts

echo salmon
#

Hello any idea why my particles are not destroyed when the component end overlap ?

brazen merlin
echo salmon
#

they are .. :/

versed sun
#

I'm not sure , but I think in that particle system, the flames dont disapear when system is destroyed

echo salmon
brazen merlin
#

so your door or whatever is spawning these particles, the overlap is on this door which checks for player leaving it, then attempt to destroy them after they've spawned?

#

you know, you're spawning them at location, so i dont think they're considered components

maiden wadi
# onyx token well i always thought that casting every frame is a big nono and <a:vvvBap:70857...

Casting every frame is negligible. The processing of casting is basically free, the IsValid check is what costs. But even it is not a problem. You could do tens of thousands of blueprint impure validity casts before you even register an actual problem with this act. Casting is only an issue for memory purposes. And the AnimBP is going to exist when your character does anyhow, so that factor is also a moot point. TLDR, cast to the character, it's basically free.

onyx token
#

OhIPanda i see

echo salmon
#

@brazen merlin they are scenes ,

eternal drum
#

how do you weld meshes to eactor in the construction script?? what was the nodes name

brazen merlin
brazen merlin
echo salmon
#

ah true !

#

@brazen merlin ty man

eternal drum
faint pasture
#

@eternal drum do the mesh components already exist and are they inside the same actor?

#

Just attach them with auto weld checked

eternal drum
#

yes, ive got it now.

faint pasture
#

No need for anything in construction script

indigo bough
#

I must be missing something obvious here, I've set up this macro to determine Tap & Release, Hold & Release, and 'While Holding', but for some reason it's not working as expected.

Event tick gets passed through after the retriggerable delay is met, but should be stopped from letting the tick through if we release before the delay is complete.

Once the delay is complete, we should block the 'Tap & Release' gate, and open the 'Hold & Release' gate.

#

The delay (and "Holding...") seems to trigger anyway, after the Tap & Release.

#

And won't stop "Holding" until I click a second time, at which point every subsequent click gives me "Held" instantly.

blissful grail
#

I think the enhanced input system can actually handle this scenario. If you want to dig into it.

indigo bough
#

I was considering it, and perhaps it's just the documentation, but it seems overly complicated from my brief look. Perhaps I'll have to dedicate a day to running through the plugin.

indigo bough
versed sun
#

ahh, only 5.0?

indigo bough
#

Not sure

blissful grail
#

No, it's in 4.x as well

versed sun
#

nice

indigo bough
#

In a way, I'd still like to solve this logic issue above anyway, as it's sort of confusing me and it's a learning opportunity in itself.

versed sun
#

my single click/double click/held macro is way different

indigo bough
#

Is it working? ๐Ÿ˜› And would you mind sharing a screenshot? Perhaps I'm overcomplicating things

versed sun
#

yah, it works

#

i made it over a year ago and keep useing it

eternal drum
#

How do i make buyonacy only affect a specific child in blueprint?

versed sun
#

i think i got it

indigo bough
versed sun
#

Np

versed sun
#

Is there any major Pro or Con to having Having 3 copies of same variable VS 1 Variable going 3 places

tulip mason
# versed sun

Readability. The left with a bunch of other things in the same graph is easier fo someone else to read quicker, otherwise you have to follow where each line ends up.

versed sun
#

that's how a usually do it, didn't know if more variables in the graph = more code

torpid hound
#

It'll have to fetch the variable for each call regardless, so should be identical

versed sun
#

That's what I assumed

faint pasture
versed sun
#

I do both, Left when copy/pasting, right when I'm debugging and changing variables around

faint pasture
#

This is a full tire model done in blueprint. Completely readable.

pure relic
#

Hello! Newbie question here but I really want to learn how instead of just copy+paste stuff
I'm looking to have a random seed, and every subsequent seed will be conditioned on that initial seed for that level
For example, I want to spawn 10 different pawns out of a possible 50, and no pawn repeats itself, and then 10 different prefabs spawn that are still locked to that initial seed, if that makes sense.

odd ember
#

okay... where do you think you need to repeat yourself?

faint pasture
tawdry surge
#

Not really.. define seed too

faint pasture
#

I think what he's getting as he wants one seed to define the random pawns that spawn as well as other stuff maybe? Sounds like a good fit for random streams

pure relic
odd ember
#

no repetition needed

pure relic
faint pasture
#

Yes you probably want a random stream. Read the documentation on that

#

Given a seed, a random stream will pop out random numbers in the same order.

pure relic
#

Fantastic, I'll look into that. Thank you all, got the ball rolling for me โค๏ธ

trim matrix
#

I'm making a VR project and I would like to keep track of the objects being held for either hand. I am currently doing so by storing the object Actor as HeldActor_Left/Right and this works fine. My problem is that when another player comes by and grabs the object out of my hand, the HeldActor variable for ME does not update to reflect that.

I've been doing thought experiments to figure out where I should handle the tracking logic at and if I should use Event Dispatchers, and if so where. I've come to the conclusion that I should make the Grabbable Actor fire out an Event Dispatch upon a new Grab and the last interacted hand should receive the dispatch. I'm not sure if this is the correct way and I can't wrap my head around a proper way to implement this.

zealous fog
#

I know that unreal is used for other stuff like cinematics and visualisation, do those industries also use blueprints?

icy dragon
#

with BP, you can make scripted stuff on the scene without having to manually key them in

zealous fog
#

Ah cool, so they're transfersble skills

#

That's neat

tawdry surge
#

Isn't this virtual production week? Or was that last week?

icy dragon
trim matrix
#

I need the target of my BP be all of the potential players. How can I make the player index be for more than one?

tawdry surge
#

Loop through an array

#

Or use a dispatcher

trim matrix
#

which loop do i use?

#

for each loop?

#

it worked

#

thank you

midnight otter
#

Why won't my widget show up when trying to assign default?

tawdry surge
#

Cuz it doesn't exist in that scope. You need to make one or pass it in

dark crow
#

And don't do it after DestroyActor

midnight otter
midnight otter
midnight otter
wispy pumice
#

Ok so I was trying to implement a feature into the ALS system but it wasnโ€™t workingโ€ฆupon further investigation I came to realize that the Impact normals being returned were garbageโ€ฆthey are just plain wrong and I donโ€™t know what could cause itโ€ฆ
Here I will show you the printed results from a character standing on a 40 degree angleโ€ฆthe results from the ALS Project are wrong and the one from the other is what itโ€™s supposed to look like.
Again I was standing on a surface with a 40 degree slope and simply running a line trace down to the ground in both. In fact I copied the function directly from the correct project over to the ALS one just to prove this.

#

If anyone has any idea as to why the Impact Normals in ALS are screwed up please let me know

odd ember
#

I have no idea what ALS is

wispy pumice
#

The issue was that I had 6 other actors in the level all printing out their values and I also had the surface rotated along a different plane....I never even considered that to be causing the values to invert

#

@odd ember It's the Advanced Locomotion System

#

I forgot that all the AI on that level were all children so they were printing out the same thing

odd ember
#

generally it's difficult to help people with plugins since you cannot expect everyone to have those plugins

wispy pumice
#

Nah it was my fault

#

I'm just starting to wrap my head around vector math in Unreal and didn't consider the rotation of the actors

tawdry surge
#

@midnight otter you may have created the widget asset. But you still need to create a widget object in the level in order to have one

cobalt gulch
#

Why does my landscape look like this

trim matrix
#

hey, so when I switch the default pawn class to my second player on screen. I am still controlling my first guy. I want to control my second player.

blissful grail
#

I have a GM_MasterGameMode that has the OnPostLogin event overriden. I have a child GM_Game mode that inherits from the master game mode. It does not overwrite the OnPostLogin event. When I press play, the game ends up spawning my default pawn class twice. I'm not sure why - is there something that I'm missing?

#

Figured it out. I was forgetting to actually posses the newly created pawn.

midnight otter
tawdry surge
#

Create widget node. The return is the reference to the widget object.
You can then promote to a variable and add that to the viewport

viscid arrow
#

i've been trying to figure out why it keeps sending raycast to the middle of the map, any help?

#

as for code i'm getting a the closest distance to a actor and sending a raycast to closest said actor

devout latch
#

Any "hidden" meshes?

viscid arrow
#

not that i know of

devout latch
#

I had that issue once where the hidden meshes were still stopping the raycast

#
  • even though they were hidden
viscid arrow
#

can it still detect ignored actors?

#

like the floor

devout latch
#

Can you check to see what actor was returned as the closest actor?

viscid arrow
#

so it's detecting the floor and my character

devout latch
#

But to answer your question, ignore should work...

viscid arrow
#

hmm

#

guess my code is just messed up

midnight otter
devout latch
#

There should be a SetText() method

midnight otter
devout latch
#

You can create a reference to your widget and then create a function in that widget to update it.

#

Then in your object you can do a widgetReferenceName.TheFunctionYouJustCreated

#

Create an input parameter in the function you just created

#

and then pass whatever value you want in there - in your case, the number 1.

#

Sorry....mixing C++ and Blueprint... In Blueprint, you would drag the widgetReferenceName into your Blueprint

#

And then you can drag out and the function you just created should show up as a node

#

Then you can pass the value in there - in your case, the number 1.

grand oasis
#

Is it possible to select from a drop down menu in the details pannel for an exposed parameter? example being; Select gun A,B,C then only execute blocks that are related to A,B,C

#

If so, what would it be called for me to google it

wheat mango
#

Would a small fishing game be a pretty simple project for a beginner to get started on and get their toes wet? Ive mostly done asset/level design and want to try working with some blueprints.

brazen merlin
# wheat mango Would a small fishing game be a pretty simple project for a beginner to get sta...

small scope is always a smart choice, projects can grow from that sometimes but be mindful of scope always. Plan an end point; dont let it go on without a solid goal.

as for it being about fishing, that comes down to what will actually happen gameplay wise. It can be simple or it can be complicated, depends on the idea. Roll with what you know though, decide what the mechanics are and if they are doable for your skill/knowledge, if not, cut and try something else. Have fun expirementing.

weak zealot
#

I know there's a node to convert this reference into something i can use for the target, but i've forgotten what it's called. Any help?

wheat mango
#

Thanks for the advice @brazen merlin I'll see if I can get some base functionality then go from there.

brazen merlin
grand oasis
#

Never mind I found Enums

weak zealot
raven sentinel
#

Anyone know how to find where an anim notify is coming from?

#

(tried asking in #animation but this might be more of a blueprinty question)

#

I can see the notify event being executed in my blueprint but I can't find where the notify is coming from (which animation asset is triggering it)

icy dragon
brazen merlin
#

yep just answered it too

split crescent
#

I've got a crosshair in the middle of my screen - how do I do a line trace to that position?

blissful grail
#

Is BeginPlay supposed to be called immediately after Spawn Actor? So, you can assume that if you have Spawn Actor -> Some Other Node in your graph, the actual execution order would be Spawn Actor -> Actor Begin Play -> Some Other Node.

brazen merlin
#

yeah, when the actor first comes into existence it "begins play"

#

so in some cases you dont want to have begin play call, you may want to do stuff to the spawned actor and then "activate" it yourself with a custom event call

blissful grail
#

Hmmm - that's what I thought too, but currently, it is in fact, not being called before the following node.

faint sand
#

anyone know how to possess a character without moving the camera?

midnight otter
#

Okay so I FINALLY figured it out, but now the text wont change ( i found it communicates with a print string node)

#

I tried using the icon's opacity instead of a text counter, but that also doesn't change

#

This is with the opacity changing

#

I changed that value for the param to 100 assuming it would change the opacity to 100%

midnight otter
#

OMG

#

I feel

#

The middle set of nodes was the issue

#

The correct way

#

Thank you @devout latch @tawdry surge @dark crow For all the help

devout latch
#

So you created the 2 different Berry Widgets but you stored the reference to the one that you could not see since you didn't add to the viewport? That was the issue?

devout bane
#

Is there any way to run blueprint logic before game mode and game starts calling begin play

#

???

dawn gazelle
devout bane
#

Yes that is my problem. I have fix with putting dealy node (0) to wait a frame in all my actors but its a messy fix. I have C++ systems being setup in GameMode begin play and want them to setup earlier than that so I can avoid delay nodes.

trim matrix
#

Hey guys does anyone know how to add subtitles on media player ?

#

Guys, what's the best way to find the height difference between objects?

#

Is this correct?

mellow folio
#

yes

trim matrix
#

@devout bane construction script?

#

wanna becareful if u get data outside those scope tho

devout bane
#

stuff is setup at game start

trim matrix
#

Construction script should run before begin play

#

is it not?

devout bane
#

I thought that stuff is ran when you create a instance of blueprint in editor

mellow folio
#

construction script runs whenever the object is constructed in any setting

#

including in game

#

except on network clients I believe

devout bane
#

So I would have to do a check to make sure game is running then

mellow folio
#

I don't know what you're trying to do but yeah

#

I'm too lazy to scroll up

ivory glade
#

Does anyone know how to disable "Start with Tick Enabled" from being checked on by default when creating a Blueprint in your project?? In an Unreal live training video, Zak Parrish said there's a way to do it by editing an ini file but didn't remember how during his limited time for the training session. Can't seem to find it with google

trim matrix
#

how do I reorder the graphs? I can't drag them...

calm vale
#

hi everyone anyone on?

#

i have a question

bleak swift
#

ask it

agile hinge
#

how do I display the entire array?

brazen merlin
agile hinge
#

@brazen merlin is this the correct way?

mellow folio
#

yeah or you could just use Array Element instead of that Get node which is redundant

agile hinge
#

oh thanks

marble ingot
#

Where do you guys typically program your big game events? EX: spawn next wave, manage enemy count and timers, increment amount of enemies in next wave, etc.

It's a single player game so only the server (player 1) needs access. Currently I slapped most of that code in the GM, but maybe there's a better/common practice?

remote meteor
mellow folio
#

Game mode is a fine place to put logic like that

remote meteor
mellow folio
#

"where to put logic" can be a pretty relaxed question for single player games

#

but yeah, spawn waves and tracking overall enemy strenght and stuff all of that is good on Gm

#

Best secondary alternative I could think of would be to do it in a custom Actor class, could add a little flexibility, but nothing major

gentle urchin
#

Think that'd make more sense for reusability

#

or flexibility rather, as you pointed out.

#

for a scenario where a level would play differently

#

you wouldnt need to reinvent the wheel, or keep inheritance to the same base GM

mellow folio
#

yeah or if you wanted to have "One enemy force over here, and another over there", you just throw in 2 actors

gentle urchin
#

Yupp

#

defining spawn parameters per instance -> profit

marble ingot
#

nice thanks all! tried the custom actor route too and that seemed to work well. to avoid less work ill leave it in GM for now ๐Ÿ˜‹

dusk dust
#

for some reason my grid meshes bottom faces are doing this, the top faces look normal

#

this is how triangles are setup

#

how can I fix this

mellow folio
#

shouldn't it be Grid Resolution -1 instead of +1?

#

otherwise I really don't do mesh stuff

dusk dust
#

i did originally do -1 but it made one side of the grid longer than the other

#

+1 fixed that issue

#

?

blissful grail
#

Whoops - wrong channel

steady orbit
#

So if a player controllers control rotation is from 0 to 360 and all actor rotations are from -180 to 180. How do i set my control rotation to match an actors rotation?

fast escarp
#

use a rotator

surreal peak
odd ember
#

or use quaternions

maiden wadi
#

Also worth noting that this wrapping is infinite. EG setting a yaw to 2790 is still the same as setting it to -90.

gentle urchin
#

Almost sounds like a modulo is going on ๐Ÿ˜›

maiden wadi
#

It is. ๐Ÿ˜„ Pretty much every function that uses a Rotator will normalize it.

gentle urchin
#

Does it sound reasonable with 3 manager components separated for NPC's, Buildings and Resources (being both source(trees) and products(log etc) ? feels like im fumbling a lot back and forth but I think this will do fine for the ISM's im using ..

#

guess it's a hard question to answer reliably without any more context xD

maiden wadi
#

We have a manager component in TRS2 that manages a single float. O.o So. Make a manager for everything!

gentle urchin
#

the products are basicly just a transform and a FGameplayTag ๐Ÿ˜›

#

the others got a bit more under the hood, but not much really

trim matrix
#

hello guys how to deal damage over time if i stand in some area

maiden wadi
#

Oh. My bad, it's an integer. ๐Ÿ˜„ Basically just a class with a bunch of delegates that fire when the integer is changed. Has other properties for using in it's own functions, but it's realistically nothing but that integer and some delegates.

gentle urchin
#

OnBeginOverlap -> Start Timer -> store reference
OnTimerEvent -> ApplyDamage to stored reference(s)
OnEndOverlap -> Remove reference -> Stop timer if no more references

maiden wadi
#

No, this is an actor component on a main game actor.

maiden wadi
#

Basically keeps track of an important variable. But yeah. ๐Ÿ˜„ Managers for anything.

gentle urchin
#

Sweet. I wonder if i should swap my AActors for UObjects, but im not sure if there's any risk involved (and if i'll save any performance anyway)

#

premature optimization at its finest

trim matrix
gentle urchin
#

Yepp

trim matrix
#

i mean as int or

#

what

gentle urchin
#

Sounds like reading up on some basics could be in place

#

variable types, references and whatnot

trim matrix
#

the return value or Set timer by event is struct

gentle urchin
#

its a timer handle

#

a handle, to the timer

#

you want to store whatever actor is overlapping (and should be damaged, so a check for a tag or cast could be in place, unless you've got the proper collision setup, in which case only the damageable actors would trigger the overlap)

trim matrix
#

so this is how u are saying?

gentle urchin
#

Close

#

All thats missing is the actor reference

#

If its singleplayer, and only the player can be damaged, then it can be regular var

#

Otherwise you want a container for it

trim matrix
#

ya got it dude thx amn

#

dude

#

its working

hexed glade
#

Working on a combat system where part of it uses mouse movement to decide what actions to take. Currently I have this system set up on a timer, but it isn't 100% reliable. Any thoughts on something that might work better?

timber knoll
#

Maybe a bit more context how you would want it to work would be nice

gentle urchin
#

collapsed graph ? for something that sounds like ABS ?

hexed glade
# timber knoll Maybe a bit more context how you would want it to work would be nice

I've set it up so that holding the action key along with the left MB and draging in horisontal or vertical directions will trigger the attack. The timer running the function is started when the left mouse button is pressed. The colapsed nodes are simply square root squared to make sure the float value is possitive.

Its just not very consistent in reading the mouse movement

timber knoll
#

๐Ÿค” I think I get what you're trying to achieve

#

instead of using a timer, I would create a threshold mouse speed

#

and once the mouse movement speed falls below this value for more than X seconds, or changes direction drastically (unless you want to read 1 swipe at a time) only then get the difference

#

for this to work, you would have to use a bit of event tick (to calculate the movement/frame) in combination with custom events

gentle urchin
#

best done in c++ if thats an option

#

but i guess that's pretty self explained

hexed glade
#

Yeah, probably. Though just started with unreal engine a mont ago so I don't feel comfortable going into c++ quite yet with no prior experience.

slender idol
#

Hey, any reason why child colliders stop working sometimes when the root is a collider? I have a box collider as root and a capsule collider as a child and they both overlap with the same thing, the capsule stops working after a few collisions.

#

Both root and child collider have the same collision profile.

tawny hedge
#

any courses/tutorials recommendations for using structs within arrays?

gentle urchin
#

would generally advice against it

hexed glade
#

Any specific reason for it? Have used this for my inventory system and it seems to work perfectly for it.

icy dragon
#

Might be referring to the tutorials more than the method itself

fiery swallow
tawny hedge
#

because I simply need it

fiery swallow
#

I don't understand who would make a tutorial on using structs within an array

#

that's not something that needs a tutorial

gentle urchin
#

Very impractical to work with in the first place

fiery swallow
#

I've also never seen anyone use an array of structs, what could you possibly need that for?

gentle urchin
#

Storing/modifying data ๐Ÿ˜›

#

I've seen them used in inventories quite frequently

fiery swallow
#

Like what exactly, I could see maybe a map with structs

#

but an array of structs sounds hard to use

gentle urchin
#

it is

fiery swallow
#

as in I wouldn't remember where things are

gentle urchin
#

Map is relatively new to bp tho ๐Ÿ˜„

#

compared to the tutorials

maiden wadi
#

Arrays of structs are incredibly common. You actually use them without even realizing it when you create things like arrays of GameplayTags, or Arrays of Vectors.

gentle urchin
#

relatively is now like 15 versions ago, so perhaps more dated tutorials handle this differently ^^

fiery swallow
#

Is that what gameplay tags are? ๐Ÿค” surely it's a bit different though right. How could anyone reliable figure out what index the struct is in?

gentle urchin
#

custom search functions

#

Its very backwards imo

maiden wadi
#

Add your own index to it. Integer, FName, Gameplay tag, etc.

#

Also. TMaps don't replicate.

gentle urchin
#

In a TMap you'd still need a custom search function

#

so it's not like it's that different

maiden wadi
#

I avoid TMaps like they're a plague unless I am just using them for static data lookup.

gentle urchin
#

plus maps in BP are ~~terrible ~~ not as nice as in c++ ๐Ÿ˜„

fiery swallow
#

Eh with a String And Struct TMAP I don't think it'd be all that difficult. I actually didn't know though that people use often use array structs, maybe that's more of a c++ thing? Because I've certainly never seen it in a BP

gentle urchin
#

searching an inventory TMap for existing item based on struct detail still requires custom function for it ๐Ÿ˜›

#

Its not like it solved the issues with an array of structs

#

generally containers are iffy in bp imo

#

then again I only recently ditched them so my word holds no value ๐Ÿ˜› ๐Ÿ˜„

maiden wadi
#

I do it all of the time. It's less about BP versus C++. It really just depends on how the array is and what you need it for. TMaps are convenient in that they come with the ability to specify a key and then a value and come with accessor functions predefined. You have to recreate this yourself. Though this is a fairly trivial task. Simple compare and return function. Admittedly it's slightly more difficult in BP. It's two functions either way, but in C++ it's about 5 lines of code total. Need to overload the Struct's operator== function for a type, test the struct and return. Then make a find function in the place using the array which can just be a FindByPredicate.

#

FindByPredicates are much easier in BP when you use two functions for it. One loops, the other does a simple check and return.

#

Also useful to put in libraries in BP.

#

But yeah. Networking game wise, TMaps are terrible to use in a lot of cases regardless of C++ or BP. They can only store local data. You can't RPC them, or Replicate them as properties.

gentle urchin
#

Glad im not doing networking in a while

faint pasture
#

I use them for sparse grids

quaint sigil
#

I created custom event in blueprint function library, but I got this error, why? What does it mean?

faint pasture
#

TMap<FIntVector, AActor*>

earnest tangle
quaint sigil
earnest tangle
#

Blueprint functions cannot contain asynchronous logic

quaint sigil
#

So what should I do?

earnest tangle
#

You can try dragging from the callback pin into the function node, which might work and allow you to create a delegate pin on the function call itself

#

This way you could bind something to the event where the function gets called

quaint sigil
#

I created BP Function Library called "BP_Login_Controller" because I want some controller where I could handle logic of my app

earnest tangle
#

You could create it as a regular actor or uobject

#

or include the logic in your game instance, game mode or other such place

quaint sigil
#

Function doesnt work either ๐Ÿ˜„

quaint sigil
#

to not have a mess

#

in code

earnest tangle
#

Well you could then use a separate UObject or Actor for it. You'll just have to make sure you spawn one to handle it

#

On C++ side you could create a "subsystem" for this, which is nice for this type of "singleton" logic, but unfortunately it's not possible to create them from blueprints

quaint sigil
#

Yea but then I have to spawn Actor like game object in game, isnt possible to have "just code" without spawning it into game scene?

earnest tangle
#

You could create it as a UObject, but pure-BP UObjects have certain limitations such as they can't spawn any actors on their own - not sure if it'd be a problem for you though

earnest tangle
#

Yeah

quaint sigil
#

I will check it ๐Ÿ™‚ thank you ๐Ÿ™‚

earnest tangle
#

๐Ÿ‘

quaint sigil
#

I think the best approach will be to create "classic" BP Actor with Logic and just spawn it into game scenes where I need it ๐Ÿ˜„

earnest tangle
#

Yeah, if you're not doing C++ that would probably be just fine. It's not unusual to have invisible actors doing some kind of logic

quaint sigil
#

I just wanted to have some defined functions in "background" without need of spawning it

earnest tangle
#

It would be possible to do that in C++ since you can create a function quite easily which has a delegate as a parameter, but BP's are a bit limited when it comes to that

quaint sigil
odd spade
#

Is there any way to make like a playerinstance that stores values for each player which i can pass on from one level to another? Or do i just have to find a way to use the gameinstance?

earnest tangle
#

GameInstance is the only thing that's persisted across level loads (unless you use level streaming, which may make some things more complicated)

odd spade
earnest tangle
#

Perhaps ask on #multiplayer , I'd imagine there to be something but not sure where you'd find it

odd spade
fiery swallow
quaint sigil
#

just question ๐Ÿ˜„ if I have some logic in BP Actor in Custom Event how can I access this Event from Widget BP? ๐Ÿ˜„

tawdry surge
#

Event Dispatcher, BP interface, or cast

gentle urchin
#

All of which requires some valid reference to desired Actor

fiery swallow
#

boo casting

earnest tangle
#

Casting is fine (depending on what you're doing)

gentle urchin
fiery swallow
#

my lead programmer would kill me

tawdry surge
#

Dispatcher doesn't require a reference

gentle urchin
#

they do

#

not from the sender

#

but as a reciever ๐Ÿ˜›

#

you must bind to it by reference

tawdry surge
#

So to self

quaint sigil
tawdry surge
#

So hard

gentle urchin
#

Not self

tawdry surge
#

Then you're making it harder then it has to be

gentle urchin
#

If ActorA wants to listen to ActorBs dispatcher,

#

ActorA must bind by reference to ActorB's dispatcher

#

Feel free to prove me wrong

tawdry surge
#

It'll be a bit till I'm at my PC but I'll drop a SC then

gentle urchin
#

excited

#

Im atleast setting mine up by reference

fiery swallow
earnest tangle
#

Yeah, it's good to know the alternatives :)

gentle urchin
maiden wadi
#

Random side note. I need to make a blog or something. I need to make a write up on how casting actually works in the engine.

fiery swallow
#

Is any lead programmer generally fun to "work" with? I mean they're usually pretty cool but it's mostly their way is the right way, and the only way. No offense to the current and previous leads

gentle urchin
gentle urchin
icy dragon
past hazel
#

how do you store left hand position for different weapons?

icy dragon
fiery swallow
tawdry surge
#

That Sjoerd guy from epic has like three hours of videos on it. Kinda surprised they didn't transcribe it and add it to the docs

marble temple
#

Any idea how to exclude object from motion blur?

maiden wadi
# fiery swallow Is any lead programmer generally fun to "work" with? I mean they're usually pret...

Geeks with power. ๐Ÿ˜„ But no in reality they 'usually' have a reason for that. Junior or new programmers may not have the full scope of things happening in the code base. It's not always easy learning from the new ways of things, only to have to deal with how things were done even five years ago. Stuff changes rapidly, people learn differently, and you have to keep everyone on the same page in a massive code base.

gentle urchin
jolly island
#

Hello, I have two health bars on top of each other, one that jumps immediately to the new health and one that's supposed to follow it smoothly. I tried to do the latter with an interp node but it doesn't work and instead jumps straight to the new health. What am I doing wrong?

quaint sigil
fiery swallow
gentle urchin
vital aspen
#

for me it's good morning Guys. I wanted to see if anyone knows of a video that can show me how to populate the inventory slot size. So lets say the player inventory has 10 slots and then he unlocks something. and then 5 more lots can get added to his inventory. I been trying some samples. As all ways I can't get it to work, anyone have some ideas.

maiden wadi
fiery swallow
#

If you're making all your inventory slots manually I'd advise against it

vital aspen
#

No. I not. See I have a variable called NumberOfSlots in the inventory component. This sets the number of slots for the players inventory

#

and no I don't know what a procedurally generated UI is

fiery swallow
#

so when something is made procedurally it just means there's usually code written to do something automatically I guess? I think that's the dumb way of putting it

vital aspen
#

Oh, ok.

fiery swallow
#

So instead of making a UI with 30 inventory slots you make a UI with no slots... and then write code to automatically create X number of slots for you. That's procedural

vital aspen
#

That's just want I want to do

#

do you know of a video that can show me just how to do that. The samples I have found on google. are very old and just don't work.

fiery swallow
vital aspen
#

Hmm, I'll check it out. Thanks and have a nice day

tawdry mural
#

something in here makes the game crash at some point, idk maybe some brilliant minds will see through it

gentle urchin
#

wth

fiery swallow
gentle urchin
#

really?

#

Sequence clear and invalidate ?

tawdry mural
#

yes

#

it works as intended but crashes at random times

gentle urchin
#

if it works its by tooth and nails

#

dont clear and invalidate like that lol

tawdry mural
#

the thing is

#

it loads the level after the invalidate

#

and if i dont invalidate it

#

the timer still goes despite all the lag spikes and stuff

#

and when you play it in standalone mode everything goes to shit

gentle urchin
#

there's just so much wrong here.

tawdry mural
#

;D

gentle urchin
#

I'd toss it, and start over

#

honestly.

tawdry mural
#

thats the only way rn

gentle urchin
#

well gl then ๐Ÿ˜›

tawdry mural
#

whats wrong with invalidating timer after it ticks tho?

#

it will still do the logic after

gentle urchin
#

Why have a timer at all

#

especially a looping one

tawdry mural
#

its a slideshow

#

of levels

#

๐Ÿ˜„

#

you press start and enjoy

gentle urchin
#

You still dont need the timer

tawdry mural
#

but it first waits till the level loads

gentle urchin
#

you're instantly bypassing it anyways

tawdry mural
#

no it works man

gentle urchin
#

You're sitll bypassing it

tawdry mural
#

how do i replace it then

gentle urchin
#

this

#

doesn't fire.

#

this doesnt fire either

tawdry mural
#

theres a delay and it does

gentle urchin
#

It does the second time, because you're not invalidating.

tawdry mural
#

5 sec delay

#

works perfectly

maiden wadi
#

What is this monster?

tawdry mural
#

๐Ÿ˜„

maiden wadi
#

Literally curious. What is this for?

tawdry mural
#

slideshow

#

auto shit

versed sun
#

Its code the works perfectly that crashes game

tawdry mural
#

yes

#

but only in standalone tho

#

i mean its not crashing only in editor

#

lets put it that way

gentle urchin
#

You should still fix it

#

clearly not working correctly when it breaks in standalone ๐Ÿ˜›

tawdry mural
#

yes because its my commercial project

maiden wadi
#

This seems oddly complex for a slideshow.

tawdry mural
#

im trying for a week now

#

how would you do it differently?

gentle urchin
tawdry mural
#

its just every "slide" is in a different level

#

and i couldnt do it otherwise

#

im pretty sure its the level load that gives an error

maiden wadi
#

First of all. Ditch one of those bindings.

gentle urchin
#

You can do it otherwise, i've just shown you ๐Ÿ˜„

versed sun
#

Why not have the level tell the gameinstance that the level is loaded, and then game instance waits X time and loads next level ?

gentle urchin
#

and yes, ditch one binding

maiden wadi
#

You have two things doing identical things. Cast to the base class to get the level name, and only do it once.

#

As in your SlideshowButton1 and SlideshowButton2 widgets need to have a parent class that has the level name, button press function and delegate to call.

#

Also on this note. I would consider ditching those entirely, that's way too complex.

#

Have an array of level names in this place. Make buttons with a simple on click and create them by passing in a simple integer or name. Use that for clicking the buttons. This randomization logic doesn't need to use the widgets, remove them entirely from this and only use the array of names here with a randomize integer.

gentle urchin
#

^ This

hardy bone
#

Ho do i take text input

maiden wadi
maiden wadi
#

Pretty much what G33k said. Make a widget with an editable text box. Use the widget's OnTextCommitted, or OnTextChanged, or a button to do the logic processing you want to do with the text.

hardy bone
#

Ok , tysm

tawdry mural
#

i believe that is what im doing?

#

im populating the array of buttons first

#

but i can only use this array in the future

echo salmon
#

Hello any idea why it doesnt get the overlaping actor (which is cone) i turned on the overlaping events on the actor.

quaint sigil
#

how can I access level blueprint from Widget BP? When I type "Cast to Level Blueprint" nothings shows up

gentle urchin
#

What are you trying to do?

#

probably easier to tell the widget instead of asking the level

quaint sigil
#

I have Widget BP, and I created Blueprint Actor which holds business logic for that Widget BP, so I want to call some functions/events in that Blueprint Actor from Widget BP

#

so that Blueprint Actors acts like "controller"

#

and Widget UI is "view"

gentle urchin
#

and you wanna tie them up via level bp?

quaint sigil
#

it doesnt need to be via level bp, it doesnt matter I just want to see each other ๐Ÿ˜„

#

because I dont want to mix logic with UI

gentle urchin
#

if there's no ties to them, no collision nor traces going, a dirty get all actors is possible

#

I feel dirty just by typing it

quaint sigil
#

yea but it is no correct way I think ๐Ÿ˜„ I wonder what is the best practices

gentle urchin
#

Depends on your setup

#

but usually there's some connection between them ๐Ÿ˜›

#

Perhaps it could make sense for the Actor to Spawn the widget ?

quaint sigil
#

even UE devs says that we should not mix UI with logic

#

Separation of business logic and the visuals of your UI

gentle urchin
#

UI is simply for displaying things

#

yes

#

UI should not be responsible for anything beyond userfriendly conversions

quaint sigil
gentle urchin
#

So since you're already spawning it by the level bp, perhaps it makes more sense to spawn it in the actor afterall

quaint sigil
#

I mean solution is to put all logic into game instance but its dirty ๐Ÿ˜„ I would like to pslit it

gentle urchin
#

(altho there are better places to spawn widgets)

quaint sigil
gentle urchin
#

Sorta need more context

#

Almost sounds like you're clicking on actors

#

And if so, there's interaction going on

#

And a trace result to be used

maiden wadi
#

Also on that note. You don't access the level blueprint from a widget. You don't access it from anything. Advise against creating UI anywhere other than other UI, AHUD, or AController, unless it's in a WidgetComponent on an actor.

#

Also advise against the level blueprint. Make actor classes for managing level wide logic if you need, and do a GetActorOfClass to reference it, or set a reference to it in someplace like GameState.

fleet cobalt
#

Hi can I ask questions here about widget? Guessing I can, so ive been working on unreal for about a week not a long time and I keep running in to same problem widget not showing up and that is the only thing I can't get working

maiden wadi
#

Simple answer is "CreateWidget, select class. Drag off of the return and AddToViewport."

#

Long answer is that it really depends on what you need to display, how you want to display it, what needs to show it, etc.

fleet cobalt
#

well i'm going to say it now that its not a hud, what im creating is when I interact with a object it should show some text, lemme try to do what you said

maiden wadi
#

Can be something as simple as hiding and showing a WidgetComponent on the actor. If it's an actor.

fleet cobalt
#

where can I check that

maiden wadi
#

It's a component you add to an actor, similar to a StaticMesh.

quaint sigil
maiden wadi
#

Easy enough. Just make the controller add the widget to screen, pass self as an exposed property. Use that to call what you need on the controller, and pass back the GetEditableTextBlock->GetText

gentle urchin
#

Sounds like widget component space

quaint sigil
gentle urchin
#

At the same time?

quaint sigil
#

yes

#

if my widget will need to use 2 different logic

#

like from 2 different controllers

gentle urchin
#

But.. at the same time? ๐Ÿ˜‚

#

Or over the course of a level etc?

quaint sigil
#

over course of level ๐Ÿ˜„ I mean when some callback or event happen ๐Ÿ˜„

mild crystal
#

how do i create a boolena, how do i set it

fleet cobalt
#

@maiden wadi is it okay if I send pics of it, ive rewatched the whole guide haven't found a problem

gritty elm
#

how to get image size (widget)?

chrome pine
#

Just started UE5 a week ago or so and realized delays are only counted by their execution in for loops and not by the actual time. So now I need to make my own macro according to resources online. Is this issue the same with c++ In UE5 or is it just a blueprint thing?

earnest tangle
#

C++ does not have delays in this sense and you cannot delay a for loop in C++ in this way either

#

I'm not sure what you mean by "counted by their execution", but a delay in a for loop will only run once, as each iteration of the loop retriggers the delay node, and each individual delay node will only ever hold one delay at a time

mild crystal
#

how do i create a boolean, how do i set it

earnest tangle
#

look in the variables panel, create a new variable, set its type to boolean, then you can set its value the same way as other variables

mild crystal
#

ok thx, but how do i check if its inside a trigger box or not?

earnest tangle
#

I'm not sure if I follow... it's a variable, it isn't really inside anything in that way

mild crystal
#

r

earnest tangle
#

you can use the Begin Overlap event to detect when something begins overlapping with something else

chrome pine
#

Example:

For loop with index from 0 to 2:

  • Wait 2 seconds
  • the rest of the body of the for loop
earnest tangle
#

Yeah, you would probably use a timer in C++ to do that, so you'd be iterating the list manually in the same way as in BP's in that way

versed sun
#

wouldn't you use a timer instead of a loop if you want delays ?

earnest tangle
#

You could in theory use a thread, and actually just sleep the thread, but it may come with additional complications depending on what you're doing in the loop

mild crystal
versed sun
#

Hover over the Blue Note, you dont need to cast

earnest tangle
#

You might want to look at some tutorials on yt or such, I'm fairly sure there's a bunch that cover how to do this :)

chrome pine
# versed sun wouldn't you use a timer instead of a loop if you want delays ?

Ah, Im not too sure about the functions that UE5 blueprint provided since I'm relatively new to using the editor. Usually with other languages I can just have some sort of time check with a for/while loop, or with Unity there were other ways to time actions/operations.

I'll look into using timers. Thank you!

chrome pine
earnest tangle
#

Yeah in Unity it's pretty handy to do this using coroutines so you can just yield in the loop body

mild crystal
#

what this mean?

dawn gazelle
# mild crystal

Nothing has been set into the variable you have named "AsThirdPersonCharacter"

mild crystal
#

yes i already resolve it thx

fair sun
#

what does this note actually mean? it does not disappear no matter if my delegate passess by reference or not

mild crystal
#

i made this to test

#

can you tell me why i only can see the test when tolerance is more than 10000

remote meteor
# fair sun

its just a bp thing, you usually can ignore it. It just means that the arrays cant be passed as ref or something i am not very sure

mild crystal
#

need ideas how to make this work

dawn gazelle
# mild crystal i made this to test

This is a little bit strange. You're effectively adjusting the tolerance based on the X distance between the two. So if the actor is at 10000 and the trigger box is at 0, then your tolerance would be 10000, but if your trigger box is at 10000 and your actor is at 0, then your tolerance would be -10000.

If you're just wanting to know if they're close to each other, you can simply do a GetDistanceTo and then check if it's below a certain amount.

mild crystal
#

ok

#

thx

dawn gazelle
#

GetDistanceTo <= MaxDistanceYouWantToCheck

mild crystal
#

like this

dawn gazelle
# mild crystal

Sure, just make sure you plug in a value for the <= and you connect the actor you want to check into the "other actor" on the GetDistanceTo.

weak zealot
#

I'm shooting a ray out of my players camera, grabbing the name of the object its hitting, then testing if that objects name is equal to the objects name in the script I want to run. (TLDR: Testing if a player is looking at a certain object) I'm storing the name in a blueprint interface, but it's not working when I'm trying to compare them

mild crystal
#

thx it worked

weak zealot
weak zealot
# weak zealot

This should call the "event object hit name" right? then running the rest of the code

maiden wadi
#

You're calling it on self.

weak zealot
maiden wadi
#

Interfaces are just functions that run on a class without casting to it. You're calling it on self, meaning it's running in the same class that the trace is being called in.

weak zealot
maiden wadi
#

Yeah. And you're calling the interface on self. Which means it's not calling it on the object that is in the first screenshot.

#

You're looking to call the interface on the hit component or hit actor.

weak zealot
#

So that self input needs to be changed to my hit component

#

I'm quite new so bare with me, thanks so far though ๐Ÿ’ฏ

maiden wadi
#

Correct. And also change the call type to message. Drag off of the Hitcomponent and start typing your interface function name.

#

It should show up with a message type call.

weak zealot
#

That worked!

maiden wadi
#

Hmm. Curious. I just remembered that PlayerController ticks mouse over events and calls them directly on the component's moused over. I might have to try overriding that and calling it on a trace as well when input is set to game only for using "MouseOver" events on stuff from the center of the camera.

#

Would be a really clean way to implement "look at" effects.

weak zealot
#

I couldn't rack my brain around setting up the player controller

#

After watching a bunch of videos and looking at the docs it still made zero sense to me

frail frost
#

cant make it smaller

#

any solutions?

maiden wadi
weak zealot
maiden wadi
#

Just randomly considering implementations. Your trace made me consider it. Have done that before with a trace and interface. But I have a personal issue with interfaces thanks to this channel and Youtube.

#

@frail frostIf you want to make it look like the bottom one, then you need to set it to size to content in whatever canvas panel you've added it to.

#

That or it was added to a container with horizontal and vertical alignments set to fill, and the container at a forced size. Setting those to center will also work.

frail frost
eternal drum
#

how do make tihs rotate the object around a pivot

timber knoll
#

Have the pivot as parent, then add relative rotation

#

Also, haven't you asked this question a few times before and people keep repeating themselves?

eternal drum
#

i can't have anything else as parent since then bouyancy doesnt work

frail frost
#

ok i had to check this box

#

@maiden wadi THANK U !!!

#

rly appreciate u and the community

weak zealot
#

Can a raycast hit a collision box?

#

And if so, how can i enable that?

tawdry mural
#

rays are ment to hit collision boxes

#

do some testing

#

you will get there by yourself

hardy sphinx
#

does smb know can I make some widgets unremovable? Like it doesnt remove when I use "remove all widgets"?

earnest tangle
#

I don't think that's a thing you can do

#

If you don't want to remove some widgets you need to use some other method of removing the others

keen wedge
#

Hi all, I have an issue with scene capture 2D components... wondered if anyone might be able to shed some light?

Basically, there's a BP actor in the scene with a scenecapture2d component, that goes to a render target, in turn used by a material. When the game over interface is displayed, the material is used on an image to render out a 3D model. There are 3 of these, so 3 BP actors (scene capture components), 3 render targets, 3 materials, and 3 images displayed on the UI.

All of that is working as I want, but what I've noticed is a significant impact on performance..

When I run "stat unit", not that I understand it fully, in viewport mode, the game will hit around 35-40ms for both draw/frame. When I run the game in fullscreen mode, this jumps to 50-60+ and makes the game very laggy.

If I delete these actors from the world and run the game, in the viewport the draw call is 3ms, the frame around 16. In full screen mode, both are around 10 and its very smooth/playable.

Realising they would be "working" during the entire game, I set them to not auto activate, and also added code specifically to deactivate them in BeginPlay (just in case!), and then when they receive the game over notification, they activate. I've tested this code with PRINT nodes and the scenecapture2d component is definitely deactivated during the game, and then comes to life when game over occurs.

What I don't understand is why these are having such an impact when they are not activated? Its like they are still capturing every frame, regardless of being activated or not.

Sorry for the long post... but if anyone can help me with this I'd be very grateful ๐Ÿ™‚

keen wedge
# keen wedge Hi all, I have an issue with scene capture 2D components... wondered if anyone m...

Bit odd answering my own question... but I just found this:
https://forums.unrealengine.com/t/scene-capture-2d-disable/300130/4

Setting the visibility to false (and then back to true at game over) seems to resolve the issue... the ms are still very high at that game over screen, but as its only the mouse moving around it doesn't appear to impact anything...

maiden wadi
mild crystal
#

so i made this, but the animation is playing inside and outside the box trigger anyone know how to fix?

brazen merlin
#

The fix would be to use montages

mild crystal
#

i dont think thats the fix coz the only problem is that the animation play inside and outside the box and i only want to play it inside

brazen merlin
#

Calling a one off anim on a character which has an anim fsm like the template third person character should be handled with montages

flat quest
#

Is there a way to get the total amount of UObjects within an game instance?

eternal drum
dawn gazelle
# mild crystal so i made this, but the animation is playing inside and outside the box trigger ...

0.1 <= Distance means you're going to be returning true almost all of the time as 0.1 is almost always less than or equal to how far away something is as distances in unreal are in centimeters. 0.1 cm = 1mm. Getting to that particular millimeter distance would be impossible. Do Distance <= 0.1 instead, but then you'll probably find that you'll almost never execute as the location of the trigger box is a precise point and does not include the bounds it may have where the trigger would normally fire.

Also, if all you're trying to do is check whether something is overlapping, you don't need to be checking distance to something else.
The whole idea of a trigger box is that it can be used to trigger something when something overlaps it. If you want to use the level blueprint, you can do something like this to check if something overlaps it.

#

Further to this:

tranquil abyss
#

So Atm I have an array of actors as my inventory for the time being, and about every 45 seconds the array just gets nuked. At least I think so I print out its contents and its only 1 item. Can Anyone think why this might be happening

#

Weird thing is I think the length of the array is still the same, just the contents are disappearing

#

-I also could be wrong about what is happening but from the behavior I see this is my best guess

tawdry mural
#

most likely its not 45 sec

#

but something you do in those 45 sec

wanton galleon
#

Hi, don't know if that fit in this section, but I got a problem I can't understand and hope to get help there
When I try to move some component in my blueprint, it move and then, instantly when I click compile, they all fallback to their default location (0,0,0) and I really don't get why... The component are built in C++ constructor if that could be a reason ? Does anyone has already experimented something like that ?

One more weird thing is that after the fallback location, I can't move anymore the component, I see value change in the location box, but doesn't move on the viewport

Thanks ๐Ÿ™‚

timber knoll
mild crystal
wanton galleon
timber knoll
#

ooh you mean compile inside blueprint

wanton galleon
#

Yes

timber knoll
#

well then yes it's probably because the way they are set up in C++

wanton galleon
#

I'll give a bit more informations if that could help to understand what's going on

#

I may have setup something wrong here is the hierarchy :

Class :
MyActor extends USceneComponent
MyActor has Component : UBoxComponent & USceneComponent

ActorCharacter has Component : MyActor

Everything is created with C++ with CreateDefaultSubobject, and SetupAttachement basically :

***In ActorCharacter : ***

CustomActor = CreateDefaultSubobject<MyActor>(TEXT("CustomActor")); CustomActor ->SetupAttachment(RootComponent); CustomActor ->SetUsingAbsoluteRotation(true);

***And in custom actor : ***

`Trigger = CreateDefaultSubobject<UBoxComponent>(TEXT("TriggerArea"));
Trigger->SetupAttachment(this);

CameraSnapPoint = CreateDefaultSubobject<USceneComponent>(TEXT("CameraSnapPoint"));
CameraSnapPoint->SetupAttachment(this);`

The issue is when in blueprint viewport I try to move either Trigger or CameraSnapPoint which have for parent CustomActor (which I can move without issue)

tranquil abyss
#

might get more help in #cpp

timber knoll
#

^ that, and it has very little to do with how the setup. more with the actual UPROPERTY is my guess.

wanton galleon
#

Ok Thanks I'll try in Cpp section!

meager spade
mild crystal
#

yeah i know its just coz i dont want to delete him i will use him later, after i play a animation the character just dont use any other animations like i pressed left mouse and than after i realeased it i want to get back to walk. How i do that?

lapis cave
#

hi guys, i have a simple problem ive been pulling my hair out over. I have a folder of assets, all descending/inheriting from one parent class. on begin play, i'm trying to grab all these assets, and connect each one to a button so that they can be spawned in by the player. I'm using the Asset Registry to find the files, and i'm running said files/assets through a forEach to try to extract the blueprint class for each asset (so that i can link each asset class to its button), but i cant seem to actually extract the blueprint class. what am i missing?

meager spade
versed sun
meager spade
# mild crystal yeah i know its just coz i dont want to delete him i will use him later, after i...

https://www.youtube.com/watch?v=094zfyog_z4 I found this video helpful when learning about animation blueprints

In this tutorial, we'll look at creating an animation state machine and triggering different animations using enumerations (or enums) and blueprints.

Adopted from the Unreal master himself, Todd Bryant: https://www.youtube.com/channel/UCvKM_s6nQhDwEUHz-PJ77nA/featured

โ–ถ Play video
lapis cave
# versed sun use a print string to debug out your file path , and make sure its correct

thanks for the reply! it's not an issue with the file paths, i'm able to print the name/path/etc, but i'm unable to retrieve the actual blueprint classes (the purple pin i would plug into a spawn actor or whatever). i attached a shot of my current loop, which works and prints the asset names correctly. i've tried using the 'get class' AssetData function, but all that is printed is 'Blueprint' (i'm assuming this is because the asset data definition of a class is different than the blueprint definition of a class).

versed sun
gusty shuttle
#

Question: How would one do the math to make a light brighter based on distance, so if far, brighter, if close, dimmer. This is for a flashlight.

versed sun
meager spade
lapis cave
# versed sun and maybe a suffix after Get display name for file type?

thanks for this, it jarred me into doing a search for converting a string to an asset class, which led me to here: https://forums.unrealengine.com/t/string-to-class/78767/4

versed sun
lapis cave
#

this is my exact issue

gusty shuttle
#

The idea was always to use distance, I just don't know the good math way to do it haha

meager spade
gusty shuttle
#

Thanks for answering dude, I feel like I'm still where I was before I asked though haha

#

That just leaves it at 200,000 the whole time for intensity, because it's not getting any hit actor, this strat is bunk

versed sun
#

why are you clamping the Distance to 2 ?

gusty shuttle
versed sun
#

ok

gusty shuttle
#

In that tutorial, the dude was trying to dim the light the closer he got, that's not my intent, but I tried anyways to try to understand it

#

lol

#

I just wanna go brighter when far and dimmer when close so players aren't burning their eyes

mild crystal
#

why im geting a error

gusty shuttle
# versed sun

Rock on dude, I was slightly getting there and just about to add the lerps

#

You rock dude

versed sun
#

set max and min brightness

gusty shuttle
#

Thanks man, This is a pretty simple issue, I guess I just brain farted on it all

versed sun
#

i do the same , over complicate things and reduce it to a few nodes

#

all i see in your Profile pic is this

brazen merlin
#

wow thats deep

#

paul noth deserves a promotion

gusty shuttle
# versed sun

It's my company logo haha. Attainable Entertainment. Seagull with arms

gusty shuttle
#

btw, I settled for this approach, works great! Thanks for rubber ducking man!

#

So yeah, if you guys ever need a flashlight that changes brightness based on distance, there you go. Simple as that

frail frost
#

guys

#

i need help once more XD

#

i did a pickup gun node

#

and added collision to it