#blueprint

1 messages ยท Page 133 of 1

surreal peak
#

I suggest doing it properly

faint forge
#

to make a child, to use component,... which one?

surreal peak
#

Proper inheritance imo. But somewhat depends on what you want to adjust.

#

The component might be fine if it's quite drastic changes

faint forge
# surreal peak Proper inheritance imo. But somewhat depends on what you want to adjust.

I started a project with a friend, friend was just guiding me in the beginning as he have more experience with blueprints
I was following his instructions
this image correspond to the content of the PlayerState as he guided me (is a 2d fighting game)
now, I am on my own as I learned more from bps, and I am implementing ai, which works in a normal thirdpersonmap but not here
so I need to debug what is missing
starting with spawning not my custom BP for the fighter but just the ThirdpersonChar that works

surreal peak
#

I have seen better code, but also worse.

faint forge
#

the player state is spawning the BP_Fighter
this setup is working

but I need to debug why the ai doesnt, the blackboard triggers but doesnt move, who knows why

#

so, in other words, this is why I want just to keep my PS that works, and start to deconstruct a duplicated PS

surreal peak
#

AI don't have PlayerStates by default

#

In case that's not clear

#

A PlayerController spawns a PlayerState by default. An AIController doesn't. If your spawning happens in the PlayerState that would mean your AIs get no Character.

Character spawning should theoretically also only be handled by the GameMode for that kind of gameplay.

On top I would suggest simply destructing the PlayerState you have to debug. With the big assumption that you are sane enough to use #source-control instead of hoping the project never breaks

faint forge
surreal peak
#

But then you have a copy via source control so just slash away at the PlayerState and revert later

#

Or shelve the taken apart one to go back and forth

faint forge
surreal peak
#

But I seems like your issue might be the AIController and PlayerState part

surreal peak
faint forge
#
I also now find it weird to spawn from the PS instead GM

I mean now that I know more about bps, but I learned through my friend and tutorials so I am not sure 100% always what is right or not

faint forge
surreal peak
#

You can spawn there if it works, it's just not the general go to location for that code

surreal peak
#

A reason for it to need a PlayerState is if you have some arena game where people get kills and deaths that are in the PlayerState and the AI should also have that

faint forge
#

I tried to set "isBot?" as true or false in my player state
this is working triggering the Behavior tree
but bot doesnt move

but in the 3rdperson map with the 3rd person character it works

it could be the playerstate, the controller or the AnimBP

#

for example with my approach, where bot doesnt move but Behaviour tree triggers
the bot can jump it I set "Jump" node

#

in a task

#

the problem is the MoveTo node in the Trigger
or the Ai MoveTo in a task

surreal peak
#

My point is that you might want to check if your AIController BP has bWantsPlayerState set to true to begin with

faint forge
#

this doesnt works for my case

surreal peak
#

Hm

#

It sounded like your AI isn't getting a character from the first stuff you wrote

faint forge
#

but it jumps, being "Jump" node in a task of the Behavior Tree

#

even to play a Montage

#

and the Behavior Tree works with even a sequence from Task to Wait

#

is reading the distance

#

only thing is the Ai MoveTo node in a task doesnt work

#

or the MoveTo node of the Behavior Tree doesnt work

#

Simple MoveTo also works

#

make think is a specific problem with the AnimBP or the Controller

undone wolf
#

Hi people - Hope you all are well.
Does anyone know how to make player start follow an actor?
I am currently making a space station that orbits a planet, where players can spawn onto. Since the station is orbiting earth, it is constantly moving, thus moving away from the player start. I would have hoped for a component, i could have slapped onto my space station blueprint, but alas....
Does anyone know of a solution for a scenario like this?

undone wolf
faint forge
#

hmm
player walk inside your space station
and, follows it like a normal person in a sci fi movie would do

#

I never did it, but, I can imagine either gravity system
or they just walk normally inside the station
or the station it has a vehicle setup

vestal herald
#

hi, so lets say i have 2 buttons for 2 maps i want so that u select a map and when u press start u spawn in that map

faint forge
#

problem is that, when platform moves and player jumps, player gets behind

#

so then maybe you need a gravity system setup

undone wolf
# faint forge so then maybe you need a gravity system setup

Could be. Right now i do not have the issue where if i jump on the orbiting station, player gets left behind, hoewever, i was thinking that i maybe could make some kind of custom player start, the could be used as a component, and be attached to the blueprint?

faint forge
# undone wolf Could be. Right now i do not have the issue where if i jump on the orbiting stat...

๐Ÿฅฒ I was this morning exatcly finding out about components just here
I feel, unless a more experienced dev here say the opposite, you could give a look onto this
https://www.youtube.com/watch?v=nHxN9W4rQ44

#

any character follows by default the platform (station) they are, problem is jumping or physics in objects, throwing them etc, even the space ship taking off or landing will be complicated

#

with gravity I think that all this would be solved

#

I really didnt do that tutorial, I just check it more or less, is even interesting to play with the "3rd body problem"
there are a lot more of tutorials that play with the idea of jumping from one planet to another or landing in a planet from space
you will find something that fits you, but I think has to be with gravity

surreal peak
faint forge
surreal peak
#

Either via code if spawned runtime, or by just dragging it onto whatever your space station is in the Outliner

#

Or wait

#

player start

#

Or PlayerStart

faint forge
surreal peak
#

I think I misread

#

But the problem is usually solved already by the CharacterMovementComponent having BasedMovement

#

That's how Platforms that move make the Character move with them

undone wolf
#

Let me turn on my pc, it's time to solve this son of a gun

undone wolf
surreal peak
#

You would need to set it to also be Movable

#

Either select the one in the scene, and check the Details Panel for it

#

Or make a Child Class of it and change it in there

undone wolf
#

So in the outliner, the details panel for the capsule collider is greyed out,

surreal peak
#

And the root?

#

Or instance or whatever it's called

#

Otherwise just make your own Child BP of it

#

And replace it

weary thorn
#

right guys, got a basic issue that's breaking my brain. this blueprint lets a character walk left and right, but if walking up and down, it retains the direction you are facing. like old beat em ups (streets of rage, etc). Problem is, id like enemy pawns to do the same, but i cant figure out how to replicate it in, say, animation bp. am i being stupid or is this a weirdly difficult task?

harsh tiger
#

Hello, is there a way to copy all values from a blueprint struct node and paste it into a variable?

gentle urchin
#

Not really

harsh tiger
#

Ok, thanks for the answer.

frosty heron
#

To another struct of the same type?

#

?

undone wolf
surreal peak
#

It's an actor in the scene

#

Remove the one that is there and put your own out

#

Just make sure it inherits from PlayerStart as Parent/Base Class

undone wolf
surreal peak
#

But in the BP Asset itself you should be able to change it to movable or not?

#

It can't be deleted cause it's the root that is iniherted from the parent

undone wolf
#

Negative

surreal peak
#

Hm, so the GameMode has a FindPlayerStart function that returns an Actor.

#

You can in theory override that and return your own custom Actor (not PlayerStart inherited)

#

That would be the next thing I would try

undone wolf
#

Yeah i saw that post on UE forum, however my knowledge fo UE isn't there to do it (Coming from Unity recently) So i am not familiar with it.

So i would think, that i would do the following, but feel free to correct me,

Find the gameModebase c++ -> Create c++ class derived from the base -> Open it in IDE - > use some kind of c++ vodoo Override function ๐Ÿ˜›

surreal peak
#

You don't need C++ for this

#

You can override that function in your BP version of the GameMode

surreal peak
#

I would also always suggest using GameMode and GameState and not the Base versions

#

The Base versions are for very simple games and lack a lot.
The none Base versions are for more complex stuff and multiplayer, but there is no real reason to use the Base versions imo

undone wolf
#

So this one right?

surreal peak
#

Yes

#

But it has to be paired with a GameState

undone wolf
surreal peak
#

If you mix Base and none-base you get problems. It even annoyes you in the logs then

#

GameMode/Base defines the classes the GameMode uses

#

Which GameState, Pawn/Character, PlayerController, PlayerState etc.

#

If you use a GameMode and for the GameStateClass a GameStateBase child, it will break stuff.

#

Same the other way round

#

That's just a headsup though

#

For your PlayerStart issue, hover the FUNCTIONS tab inside your GameMode Blueprint

#

It should show an Override dropdown on the right of the FUNCTIONS tab header

#

a bit hidden sadly

#

There you can select the FindPlayerStart function

#

For testing I would suggest you simply remove the APlayerStart from the Scene and make a custom BP_PlayerStart that inherits from AActor.

#

And place that into the scene

#

And then use a GetActorOfClass(BP_PlayerStart) and return that in FindPlayerStart function

#

See if that gives you want you need

undone wolf
#

Before i do anything, i just have to say thank you for taking your time... UE can be quite complex, coming from a different GE, now back to work ๐Ÿ˜›

surreal peak
#

No worries. We all started somewhere.

#

Yesterday someone took somewhat around 3 hours to explain me something that they didn't have to. They shared code, solutions and explained things multiple times (I'm a bit slow atm in terms of following cause of being ill).

I always think that helping others opens doors for receiving help. If everyone keeps their knowledge to themselves it would be quite the sad industry.

gentle urchin
#

Its a very helpfull community by enlarge

undone wolf
surreal peak
#

Yeah it can be very overwhelming. But it's also somewhat needed to get used to it.
I've been doing this for somewhat around 10 years now and I still have those moments with new stuff I never worked with. It of course helps to have a good base understanding.

undone wolf
#

Amen to that!

surreal peak
#

idk if it helps, but my Multiplayer Compendium has a section about the Game Framework that explains the classes a bit. If you filter redundant Multiplayer info from it, it might give you a bit of an overview. of what GameMode etc. is and does

#

It's mostly a write-up of what you could find via google, but on one page fwiw

gentle urchin
#

Some samples to look at helps aswell

undone wolf
#

I'll have a look at it ๐Ÿ˜„ Where do i find it?

surreal peak
#

eh 1sec

undone wolf
#

Merci! ๐Ÿ˜„

surreal peak
#

It is focused on Multiplayer, but the general info should also count for Singleplayer

undone wolf
#

Well i am that kind of dev, that REALLY hates my life, so i love to tangle myself in the enjoyment of only doing multiplayer stuff, cuz then i can make myself believe that someone might play it with me one day..... lulz

surreal peak
#

Yeah, that's basically story of my life. That's why I wrote that compendium all those years ago to make it easier for beginners.

#

If you want to at some point learn Multiplayer with UE (unless you already do), then this is def something you should read

#

Without wanting to do self-advertisement here

undone wolf
gentle urchin
#

Read 6x

#

Thats how valuable it is

#

Core knowledge

undone wolf
#

So i made a new actor called ps_spacestation, and i suppose in the gamemode blueprint, you want me to do something like this?

gentle urchin
#

Years of xp densed down to a few pages

undone wolf
surreal peak
#

Yeah it's still surreal to this date. My company got contracted by a larger studio since a few weeks ago that are working on a bigger MP title and the compendium is linked in multiple places of their Confluence.

#

I can't escape it anymore haha

gentle urchin
#

Thats a pretty great achievement !

#

Well deserved.

surreal peak
#

I haven't tested it but that is what usually runs the code to find APlayerStart in C++

gentle urchin
#

I did something similar at my job, and clearly theres a lack of those sort of compendiums.

surreal peak
#

What mostly stops me is the lack of auto deployment of my docusaurus page.
My wife said she would set that up for me on our servers, but she's playing Hearts of Iron the whole day ;_;

gentle urchin
#

Id be surprised if they said no, given how they themself gained from your original one...

#

๐Ÿ˜‚ thats an ok excuse

#

Hope she gets it done asap tho!

undone wolf
gentle urchin
#

Everyone would benefit from some auto deployment of your knowledge

surreal peak
#

So you might need to place a second PlayerStart_SpaceStation and change the function to return a random one.

#

You can use GetAllActorsOfClass which returns an array containing both.

#

This is also one of the few times I find that node to be a valid choice.

#

If that works in some cases, you can then expand on that and add collision to your custom PlayerStart.

#

Then instead of grabbing a random one you can loop over them and take the first that is not overlapping a player.

#

I'm sure the coding logic isn't too lost on you given you worked with Unity in C#

undone wolf
#

Could it be missing colllision, that causes this?

surreal peak
#

As long as the actual PlayerStart UE class is locked to Static instead of Movable that won't change I assume

#

Or what do you mean?

#

Oh you mean your custom PlayerStart_SpaceStation as a child of the SpaceStation BP

undone wolf
#

So the inital problem were that i couldn't make the playerstart root movable, and then set it as a child of my space station BP in the outliner. So i created the custom one, and i can make that one movable now and set it under the Bp in the outliner. And i have set it to movable, but it dosn't follow the location of the spacestation

surreal peak
#

Hm, I have to say that I never attached something this way and actually expected it to move together runtime. It should though in theory.

The only other option you would have is let the BP_SpaceStation spawn the PS_SpaceStation in its ConstructionScript and call AttachTo on it to manually attach it to the SpaceStation. But that's a bit annoying to handle.

#

The Location to spawn the PS_SpaceStation on could be a Socket on the SpaceStationMesh for example. Not sure how that Actor looks like

gentle urchin
#

I guess a child PS with just a spawnVector wouldnt suffice?

surreal peak
#

Another option is to have an InstanceEditable Pointer to the PlayerStart (that would even work with the normal PlayerStart) on the BP_SpaceStation.

gentle urchin
surreal peak
#

You can set that in the DetailsPanel then to the PlayerStart that is in the scene

#

And then you can update the location on Tick manually

#

Or attach it on BeginPlay fwiw

#

I would need to actively try that to give a clearer working solution, but I won't open UE today

#

The onyl thing I would not do is listen to anyone trying to suggest using a ChildActorComponent, cause those are pretty buggy

gentle urchin
#

Ah nvm, mine wont directly work as it needs an actor to grab the spawn location from

#

you'd also need to override the OnHandleStartingNewPlayer or whatever the event is

surreal peak
#

I MEAN, there are lots of ways

#

You can also handle spawning fully yourself

#

And just grab a location that you define as part of the BP_SpaceStation

#

You'd remove the DefaultPawnClass from the GameMode

#

ANd use the Node Squize posted to call SpawnActor with the Character/Pawn class yourself

gentle urchin
surreal peak
#

Feeding in whatever Transform (location, rotation, scale) you need

undone wolf
gentle urchin
#

so usually it loops through them and if you've specified a string, it looks for that in the starttag

#

pretty straight forward really

surreal peak
#

Because those have a lot of additional support

#

Like calling RestartPlayer to just trigger the process again

#

But nothing keeps you from doing your own thing, to some degree at least

#

You still want to use the "right" event to kick it all off

#

And maybe think a bit about turning some stuff into function. Like spawning sounds like something you gotta call by hand too

undone wolf
gentle urchin
#

The same logic can be applied to third party libs to some degree ๐Ÿ˜›

surreal peak
gentle urchin
#

No reason to reinvent the weel and trouble yourself with battleproofing it when SomeThirdpartyLib is tested by 400 000 users and likely as many usecases ๐Ÿ˜›

surreal peak
#

There is A LOT in the Engine

#

And that lot has made a lot of assumptions

#

That aren't true for all games

#

UE gives you a lot of freedom

#

Man I can't listen to whoever is talking to me in voice and type. What the hell is "freeding"

undone wolf
#

So i think the problem is that when i initially spawn, i have no collision, for some reason and are falling thorugh my space station ๐Ÿ˜›

#

But that wasn't a problem before... tf

surreal peak
#

Keep in mind you spawn where the actor location is

#

With the other PlayerStart, that's in the center of the Capsule

#

If you place yours to the floor, you spawn with half the character in the floor

#

Lift it a bit @undone wolf

undone wolf
#

waow

#

The little things....

proven sigil
#

wondering if somone could help ive started my first project and this cast is failing when i try to interact with a container to display its inventory and i cant figure out why

surreal peak
#

The cast fails cause the PlayerController is not a "MyController"

#

Which is usually the case if you don't set "MyController" as the PlayerController in your GameMode

#

But you know all of that cause Adriel told you already

proven sigil
#

yes but i dont know how to change that sorry

frosty heron
#

read again

#

then attempt to do it

proven sigil
#

yes i have read it but i dont know where to set my GameMode only been using ue5 for a few days and mostly been following tutorials

frosty heron
#

Game mode is set per level, look into your world settings

surreal peak
#

But these are things that can be googled, imo

#

Cause they are basics

frosty heron
#

I mean, that's fact

proven sigil
#

ok ill try googling sorry for asking

gentle urchin
#

Its ok to ask

frosty heron
#

don't be sorry for asking but if you are adviced to read some material, it is done with the best intention

undone wolf
#

So @surreal peak I made the PS have a collision capsule, and when something is isnide it, it flips a bool. then in my GM at the FindPlayerStart overrided function, i made something like this

#

And when i play as client the first Client correctly spawn in, however the second one is just black, i can get a print screen, but it's like its not rendering anything?

magic gorge
# proven sigil ok ill try googling sorry for asking

No worries its not hard at all to say:
You can go in the world settings and override the gamemode with a new one made by you (as you create a normal blueprint class, just select gamemode and inside it you can change the playercharacter, the player controller etcโ€ฆ), each level must override the gamemode you need

proven sigil
magic gorge
#

Iโ€™ve been in your situation and even if its basic people might not know that and what to search, so no worries

#

Your input is in the mycontroller or character?

surreal peak
magic gorge
#

In that case check of you also set your character blueprint in the gamemode

undone wolf
surreal peak
#

Yes

frosty heron
magic gorge
#

I dont know what you actually do there, but if the for loop doesnt find anything it returns nothing on the completed, might be that?

undone wolf
magic gorge
undone wolf
#

Yes it does -.-

#

I like my infinite loops

magic gorge
#

๐Ÿ˜‚

#

Was it intentional in some way?

proven sigil
agile moss
#

So I delelted the basic shapes
I didnt save, still applied ๐Ÿ’€sweeney_activate
Anybody know how to get them back?

magic gorge
#

Wanna hop on a channel?

sonic oak
agile moss
#

How

magic gorge
#

You have to open the gamemode or override it in the world settings

#

I can help you in a call if you need, im in train though

agile moss
#

No call

magic gorge
#

I mean fluffy

proven sigil
#

sure i dont mind

magic gorge
#

@proven sigil share the screen i cant hear you

onyx pawn
#

running into bit of issue doing some coding in unreal, created target actor for this test placed in world and am trying to get it do predict profile path between player character and target actor in world and draw the path but its not working this is my code. I am getting all actors of class target actor in array then doing a for each loop to get the actor world location of target actor and world location of player character and subtracting the values to get the number then doing a normalize on the return output then multiplying by a constant for projectile thrust.. but when I run its not generating the path. what am I doing wrong?

undone wolf
gentle urchin
gentle urchin
#

and they're not always straight forward to read either

#

Sequence here is what makes it loop automatically

undone wolf
#

yikes XD

undone wolf
#

@surreal peak So you said that my new player start capsule would need to be lifted a little, because the player wouldn't spawn from the center of the capsule. how would i change the spawn position to be in the center of the capsule?

surreal peak
#

If the capsule is the root component, its center is automatically the center of the actor

#

And the actor location should be used to spawn the character

#

@undone wolf

lyric pumice
#

Guys, why my For Each Loop only prints zero? My item is in Index 1 and the loop searches only in 0 index ๐Ÿ˜ฆ

lofty rapids
#

check it's length before you foreach

lyric pumice
lofty rapids
lofty rapids
lyric pumice
lofty rapids
#

it's not the log from the code you posted

lyric pumice
#

Oh, I solved it right now! Tnx anyway!

undone wolf
astral orchid
#

Does anyone know what the issue here is? (For reference, I have added pictures of the related BPs)

lofty rapids
astral orchid
#

How should I fix it?

abstract locust
#

does anyone know of a way that i can get the bone name of where the damage was taken and then say to dismember that limb. I know i could do it through where the line trace is happening for the weapon but if theres a way to do it through the enemy thatd be nice.

little coral
#

Hello again

#

Question about main menu, i made a hud
there is a button in it that loads the level and i suspect that it is also reloading the main menu
how can i break the loop ?

#

tried this but no avail

lofty rapids
lofty rapids
#

remove from parent, then open level

#

but if that beginplay is in your character it's going to load again

frosty heron
#

What's the point tho

#

Open level just gonna block load the level

little coral
#

would do once node do any good somewhere ?

frosty heron
frosty heron
#

U prob simply failed to open the level

little coral
frosty heron
#

Who even use string to open level

#

Use soft ref

little coral
lofty rapids
little coral
#

so i need two levels ?

lofty rapids
#

your trying to open the same level your on ?

little coral
#

yeah i only have one game level bassically was just trying to create a menu

frosty heron
#

Make a map for main menu

#

Then make map for all other maps

#

From main menu load other map

#

I don't get what u r doing then

lofty rapids
#

then you load level, your level your going to play on click

#

you don't use the same level, if you do use the same level i would use seperate pawn and posess it as the main menu

little coral
#

i see what you both mean i think, only way to break the loop would to have two containers, and not everything in the same whatever map/level

frosty heron
#

What loop u even talking about

#

I feel like there is misconception in your part

lofty rapids
#

idk about containers

#

but levels for sure

#

one level is your main menu, you set that to your default in project settings

#

so now your loaded on the main menu level

#

then you just click and load the game level

#

but i would use seperate hud if you are doing stuff in the hud on beginplay for the main menu

little coral
little coral
#

ARIGATO

frosty heron
#

Just make a map for the main menu

#

And make new map for other maps

#

From your main menu level, load the map u want

little coral
#

Worked ! thank you both โค๏ธ

chilly elk
#

Hello! I'm working on a UE5 horror game and i'm using a Nav Link Proxy as a child actor for a door. My goal is to deactivate/activate the link based on the value of a boolean("Enable") to avoid having the AI monster destroy certain doors. The problem is that disabling when is active works, but not the opposite. This used to work 3 months ago, and i can't wrap my head around to understand where's the problem. Thank you soo much for your time!

simple field
#

Is boolean default value true or false?

#

or is there a way to set that default value

#

cant find under details

lofty rapids
#

you can set the default

#

but usually you have to compile first

quiet forge
#

not sure if this was asked before, but how do I set parameter type of an bp interface to delegate?
This (first screenshot, the function) only works by dragging it onto the function node, but when searching for the paramter type there is no type "delegate" :/

trim matrix
lofty rapids
#

you can set the default value for the variable, not the default for when you create a variable

#

but once created you can "default" it to true/false

lofty rapids
simple field
#

Yep thanks guys

agile moss
#

Hey guys, small problem, I am making a one way runner, but when I strafe left/right the X speed which should be constant gets reduced by I think half, any solutions?

lofty rapids
#

drag it into the top of it

quiet forge
#

thats legit what I was saying before...

lofty rapids
#

o i c

lofty rapids
#

interfaces can't have events ?

quiet forge
#

hmmm :/

fluid pivot
#

Gun is not attach to player any soln. gun is not attach player arm when is play game (i am new in UE5)

gentle urchin
#

Feels like the functiom being able to was a blip ๐Ÿ˜†

quiet forge
#

hm feels bad

gentle urchin
#

Yes

quiet forge
#

gotta do it via c++ then?

gentle urchin
#

But it is what it is

#

Yeah

#

Bp land is mysterious

rancid pollen
#

Is there a way to convert an array to another type? I'm using get all children and that returns an array of panel widgets although they're all textblocks. Since it returns panel widgets though I'm unable to change the text as it only works with text box types

gentle urchin
#

Cast

#

Must cast individually tho

#

Alternatively, you set it up so they text boxes (wrapped in a UserWidget) can listen for array element changes

#

And react themself ๐Ÿ™‚

lofty rapids
simple field
#

This is my camera movement pawn graph, it lets player rotate the camera around globe (sphere), kinda like in google earth and maps. Any idea if I had the coordinates in a datatable, how to make an animated move from current (whatever) position to a certain position (to a certain country)? I know I need to use a timeline, but I don't know what to connect to what as when I print current camera's Y and Z cords, it gives me X, Y, Z for each for some reason.

rancid pollen
lofty rapids
#

you can interp on tick instead of timeline

#

and the text boxes are in the panel widgets ?
maybe an array of the textboxes where you match the indexes

lusty hedge
#

anyone understand why i cant select an actor

#

this is a row in a data table

floral stump
#

How to use the select node to set predefined resolutions using the set resolution node?

lofty rapids
rancid pollen
floral stump
lofty rapids
simple field
#

A globe

#

camera is on spring arm

lofty rapids
#

probably timeline then with a curve idk much about that

dawn gazelle
# astral orchid How should I fix it?

It's a matter of the reference you're attempting to get isn't valid when you're trying to get it, which means where you may be calling the "Get LCS Hud" function may be before the player controller even exists.

lofty rapids
lusty hedge
#

here is a better screenshot

#

the struct

floral stump
#

make it an AActor of type

lusty hedge
#

i changed it to actor. still cant change anything

lofty rapids
#

i mean when you hover over it it says you can't do it right ?

#

so i'm guessing your f'd

lusty hedge
#

thats wack

lofty rapids
#

maybe there is a workaround but looks like it doesn't allow it

lusty hedge
#

im just trying to reference an actor blueprint

lofty rapids
#

you would probably have to set it dynamically

lusty hedge
#

so when i take from the data table it knows what to spawn

#

what if i do class reference

#

that should still work right

#

because it doesnt give me errors there but idk if it still makes sense

#

brb

lofty rapids
lusty hedge
#

I SAID BRB

#

but thats funny

#

thats an actual website lin k

lofty rapids
#

ya it happens often people ask if it will work

#

so ig they just made a site for it

lusty hedge
#

my favorite is the let me google it for you

floral stump
trim matrix
floral stump
trim matrix
#

I think you just need 4 points

floral stump
#

if i choose 0 in the combo box, the 0x and 0y will be a new resolution

floral stump
lofty rapids
#

i would check if the index is valid, but easy way to store them

floral stump
#

i will hard code the resolutions in the select node

south ginkgo
#

Hi! Does anyone know if it's possible to use the line trace by channel as trajectory for a projectile? I want to do something like a laser beam that reflects itself on certain surfaces only, except the laser beam is a projectile

floral stump
lofty rapids
#

changing the order will difficult

#

but if it will always be the same then np

floral stump
#

yes it will be the same

astral orchid
trim matrix
floral stump
trim matrix
agile moss
#

anybody know any functions that for an object that has a random float spawn it give it a greater chance to spawn around a certain area.

trim matrix
agile moss
#

Oke

#

not so complicated

trim matrix
#

yup

agile moss
#

what do I refference this to?

#

the object

lunar sleet
agile moss
#

no, the spawn point is for the left and right borders

#

they always follow the player so that he doesnt go out of bounds

#

one way runner ๐Ÿ™‚

#

a level might have different limits sooooo

lunar sleet
#

Cast is a type check, you feed it a reference to said object and it checks if itโ€™s of the class you want, and lets you access its insides. You can learn more about it in the bp comms live training near the bottom of the pins

agile moss
#

oke

lofty rapids
#

is it on the player ? or they are seperate just following it ?

agile moss
#

separate

#

also spawns without being placed by the dev

#

oke idk what refference to feed it

floral stump
lofty rapids
#

get actor of class most likely

agile moss
#

bp

#

actor

floral stump
#

open the class, click class settings and check from what it derived? or show screen shot

agile moss
#

idk, what do u mean by derived

lofty rapids
#

probably instead of cast get actor(s) of class

#

or you could put them in array at runtime

#

so you have both

#

or they are different class ?

#

it says it can be pretty expensive but i have not found one offs to really be that much

timid bear
#

Hello! How I can unfocus input from text box after sending message back to the game?

Just now input can be recieved after sending message only after clicking somewhere by mouse...

undone bluff
agile moss
#

I saw a basic tutorial about a door and a key a few weeks back, she talked about refferences, I will rewatch it

lofty rapids
agile moss
#

Thx

undone bluff
#

yea, every UObject is kept in a class specific hashmap which gets looped through when get all actors of class is called, the other get all actors nodes like the one utilizing tags are much worse.

queen dagger
#

can you have multiple game modes that are switched via bp?

undone bluff
#

the biggest concern is when you have many classes deriving from the class you're trying to get

#

then it'll have to loop through all those too

agile moss
#

I rewatched the tutorial
I didnt know that u could get the variables also by making a refference variable

#

No cast needed

lunar sleet
undone bluff
#

that's just caching the return of the cast

lunar sleet
#

Discard that tutorial

agile moss
#

Why

lunar sleet
#

Because itโ€™s obviously teaching you stupid things

#

Making a variable of a certain class does not give you the instance of that class

#

It just creates an empty seat for such var to be filled in

queen dagger
undone bluff
#

when you have say an overlap event, you only know that the other object is an actor

#

as such you cannot treat it as anything more specific than that

agile moss
#

Bruh

undone bluff
#

when you have an empty reference that's meant to keep an instance of a certain class you can act upon it knowing that it's that class

#

but to populate that reference you will still need your type check

lunar sleet
#

What you need is to understand how casting works and what it does. Despite its name, itโ€™s not a magical wand that gets you the ref. Many of us thought that at some point, hence why I mentioned that bp comms training

undone bluff
#

one point to keep in mind that helps understand this, is that the only way for one of your BPs to know about another is if both are loaded into memory

#

and you only want what is necessary in the current context to be in the memory

agile moss
#

Ok.

lunar sleet
#

You usually get the ref through some form of interaction, or in some cases you can use get actors of class but at that point you donโ€™t need the cast anymore and that function should not be abused

undone bluff
#

yea get actor of class checks for a specific class and returns a reference of its type, we know what we're dealing with so we can access all the things specific to it

#

on the other hand that also means that class is now a dependency, if it's gone the class that accesses it won't compile and it will need to be loaded into memory along with it

#

this is a hard reference

agile moss
undone bluff
#

get actor of class only returns one instance

agile moss
#

like this?

undone bluff
#

and there is no really reliable way to tell which one if there is more than one

trim matrix
#

read more.

undone bluff
#

so use get all actors of class if there's 2

trim matrix
#

Actorssss

agile moss
#

Both the point of spawn and border r only 1

undone bluff
#

that's fine then

agile moss
#

So get actor of class

flat coral
#

It's helpful to think of type information as data that's separate from the object. You got the object instance, then you have what you KNOW about that object in the current context. Casting is obviously a way to GET that information, but it's useful to understand how it can be LOST too.
This little bit of code gets a typed reference to my BaseShip class, but then calls another function which JUST has an actor as the input type, and now it's lost that type info

#

That TypeDestroyer event is a different context, and everything we knew about that actor from the previous context is gone. We just know it's an actor, because thats all we're checking for.

agile moss
#

So where is that pinned thing u guys are talking about :]
I can't seem to notice it

flat coral
agile moss
#

Thanks

queen dagger
#

ok

agile moss
#

OH MY 3D TORUS. I will grab popcorn

queen dagger
#

so i have a level select that loads otherlevels but i dont want a default pawn to be loaded until i load in the next level what can i do for the pawn that loads in the level select

lofty rapids
#

set it in the game override of the level ?

#

it will be whatever pawn you set for whatever level

queen dagger
#

i havent touched game overide

#

i didnt know it was used like that

lofty rapids
#

create a new game mode base class and override it, then you can set the default pawn

#

you can make it different in the level select level, and whatever you want in the other levels

#

you override it in world settings

#

so whatever level you are on will have world settings

queen dagger
#

ahhhhh

#

now it works lol

#

so close to having something that functions is a neat feeliong

gentle urchin
#

You're using the wrong interface event @flat coral

#

You want the message kind. Not the direct BPI kind . That rrquires you to cast to the BPI type.

#

So your statement is wrong. Nothing is lost when there's nothing to lose.

prime stump
#

Hey, anyone got experience in setting up FSR? im a bit confused.. im trying to set it up so the player can choose the option from a settings menu so i dont want it enabled by default because the player also has the option of DLSS as well, i call 'r.FidelityFX.FSR3.Enabled 1' which does do something but then calling any of the quality modes with 'r.FidelityFX.FSR3.QualityMode 0/1/2/3/4' doesn't seem to do anything? am i supposed to set the screen percentage myself by command cause calling 'r.FidelityFX.FSR3.QualityMode' doesn't seem to set screen percentage?

cursive wigeon
#

hey so I have a cone vision system in my game, I am curious if anyone knows how I could make my enemies invisible when out of the cone of focus? I currently have them in a cuistom stencil but can only make them a color. any idea how to make them "transparent"?

#

I want to have the world somewhat visible around you but make the enemies completely trasnparent when not in field of view

bold cypress
#

Can you not add a visibility variable to the skeleton mesh? @cursive wigeon

#

I'm assuming that the light uses pawn sensing so just set it so that the mesh is visible on see on off when its not seen

cursive wigeon
#

the vision system is an ISM @bold cypress

#

used as a mask in a post process

#

pretty simple

flat coral
#

Purely aesthetic problem, but has anyone found a way to make tall vertical stacks of nodes like this a little less spaghetti?

flat coral
lofty rapids
#

i like to drag the stuff on the right a little higher and out a bit so the other one is sort of centered

prime stump
#

about as good as you'll get it

#

The more rows you add you'll just have to keep moving them up and centering it

#

You can also collapse more shit into functions so its not all over the place too

latent venture
#

I created this in a blueprint, If i call Get Actor of class, and I put that blueprint, will it return me the room?

supple mason
# prime stump

you could swap this huge block of blueprints with one Select node :v

cursive wigeon
#

@bold cypress maybe I could do a overlapping actor setup to set the visibilty with my Vision ISM?

#

I don;t know how performant that would be

bold cypress
tepid willow
#

Hello, does anyone know whether it's possible to make a custom version of "select" for gameplay tags? I have gameplay tags for game difficulty, and I would like to select a color based on a tag. It's annoying to create 5~ branches (I have that many difficulties in my game) every time I need to get a value for a particular difficulty

tepid willow
supple mason
maiden wadi
#

Definitely feeling like a map would work there though.

#

On the other hand. I would also recommend making your difficulties a definition of their own with their names, associated colors, icons, etc.

tepid willow
#

Yeah, I know about the map workaround, but it's annoying to have gigantic expressions like that. I was wondering whether it's possible to make some custom node for that even using C++, so that details panel would have a list of gameplay tags that would make part of the select

tepid willow
floral stump
#

possible to disable/enable Static Lighting from UMG?

supple mason
tepid willow
# supple mason Maybe a custom DataTable or Data-only Asset?

My point is that I would like to have a very fast setup for a select using arbitrary gameplay tags. For now it's difficulties, but later on I have game phases, game modes, and so on. Creating data tables, maps, or anything like that is extra work I want to avoid, as it either decouples the task in multiple places, or makes it too big in terms of node width/height and their amount (note the MakeMap size and an adjacent Find, also there is no Default case, so NotFound should be handled as well)

supple mason
# tepid willow My point is that I would like to have a very fast setup for a select using arbit...

Well I'm not entirely sure what exactly you're planning here, but creating new generic node and dealing with whole K2Node API would probably take you way more time than using some more Data-driven approach. Take a look at the links below, maybe you'll find something useful:

tepid willow
#

I'm fine with dealing with creating my own nodes in C++ for this task. I am aware of data driven design and all that stuff, but I'm asking if anyone could shed some light on the actual implementation of what I'm looking for, I'm not trying to solve the problem in a way, I want to solve it following the way I have in mind. I want to have this node for dynamic things that can change easily (in terms of drag and drop to the graph without thinking much about other stuff), and I want to apply it in many different places that not necessarily should are complex enough to have external data structures to query data from

lunar sleet
#

make your own node

#

or don't

#

there is no built-in Select node that has a gameplay tag in the index pin

#

as for how to build your own version in #cpp try that channel

dawn gazelle
lunar sleet
#

oh didn't even notice. wb @maiden wadi ๐Ÿ˜„

#

bet you didn't miss some of these "questions" lol

maiden wadi
# tepid willow I'm fine with dealing with creating my own nodes in C++ for this task. I am awar...

https://www.unrealengine.com/marketplace/en-US/product/gameplay-tag-select
Looks like someone's already made it. But if you wanted to do it yourself, then it's largely the same thing. It's just a custom k2 node.

Something like this might get you started, I didn't read through all of it.
https://www.gamedev.net/tutorials/programming/engines-and-middleware/improving-ue4-blueprint-usability-with-custom-nodes-r5694/

rose briar
#

Does anyone have any idea about why that this sphere trace doesn't detect my enemy pawn?

tepid willow
gentle urchin
#

wb Auth!

faint pasture
thin panther
#

ah cool, Auth is back

haughty iron
lunar sleet
lofty rapids
proud salmon
#

Anyone ever seen an issue with saving a blueprint after zipping the project and unzipping it?

It seems random. I just get save errors.

tepid willow
thin panther
#

why are you zipping and unzipping? this sounds like you're unaware of source control

graceful peak
#

It is to an extent, but generally not the right solution. It's all going to depend on what you're doing. Look up inheritance, and function libraries

rose briar
faint pasture
#

you need to figure out if the problem is that it's not hitting anything, or that it's not hitting what it should be

rose briar
faint pasture
#

I thought I remember sphere traces not liking a distance of 0 but I might be mistaken

rose briar
faint pasture
#

try end at start + tiny vector

rose briar
#

what are those ?

faint pasture
#

add a tiny vector to the start pos to make the end pos

rose briar
faint pasture
#

so start and end aren't 100% the same spot

#

thats a hit

rose briar
faint pasture
#

red is hit

#

you're hitting self

rose briar
#

it litteraly going through it but not turning green

faint pasture
#

er wtf its backwards

rose briar
faint pasture
#

yeah i had them backwards

rose briar
#

But why isnt it hitting

faint pasture
#

show collision settings for capsule and mesh

#

I'd expect that to hit self tbh

#

try make it really big, 500 radius

rose briar
#

and ignore self is on

#

so thats impossible

rose briar
faint pasture
#

have you made it so start and end are not the same spot yet?

rose briar
#

no but i can

faint pasture
#

try that

#

and show collision settings for pawn mesh and capsule

rose briar
#

that doesnt help either

faint pasture
#

show the collision settings

rose briar
#

omg

#

i forgot the collider for the enemy

#

๐Ÿ˜„

faint pasture
#

lmao

rose briar
#

there is no collision capsule or anything

faint pasture
#

uh

rose briar
#

Sorry for taking your time

faint pasture
#

you're not based on Character?

rose briar
#

wdym

graceful peak
faint pasture
#

what class is the enemy based on, pawn or character

graceful peak
#

re using a pawn

#

not a character

#

Just by looking at it character would probably suit your needs better

faint pasture
#

using pawn is fine if you don't need character and want to make your own movement system

rose briar
#

I am using a pawn but should i switch to a character

graceful peak
#

Is your character meant to be a humanoid that behavies like...well...a humanoid? Walks, runs, etc..

rose briar
graceful peak
#

Like for example, i worked on a project where the character was a snowball, and moved using physics, so i used a pawn and custom coded the movement, but characters that are human like will typically be fine as a character. The character class has a lot of movement logic built right into it

rose briar
#

and btw I added the collider but it still doesn't take damage

graceful peak
#

The collision profile of the collider has to be set to "pawn"

#

cause you're tracing for pawns

rose briar
#

Where do I change that?

graceful peak
#

So i could be mistaken, its been a while since I was deep in ai, but if you're using a pawn, pretty sure behavior tree nodes such as "move to" and the like wont work

#

uhh one sec, ill take a screen shot

rose briar
#

Is it the category because I already changed that

graceful peak
#

its in the details pannel but you have to scroll down

#

so on my screen where it says overlap all dynamic

#

youll change that to custom

#

no sorry

#

change it to pawn

#

thatll do it

rose briar
#

ok I did as you said and it worked thanks a lot

graceful peak
#

The greyed out dropdown that says "object type" needs to be pawn

proud salmon
rose briar
#

but now I am dealing to much damage how can I limit that

graceful peak
#

Totally going to depend on your code

#

Unreal engines built in damage system is pretty good tbh

rose briar
#

oh nevermind i found the logical error

#

I am dealing damage at the end of my function which i call on animation tick

#

but i can call it at the end of the tick

graceful peak
proud salmon
#

marketplace.

The entire project folder using "Zip Project" in Unreal.

graceful peak
#

ohhhhhh

#

what issue are you encountering?

lofty rapids
#

see if that works

#

i zip builds all the time np, idk about folders but it should be fine

proud salmon
#

ya I normally don't have any issues (Using both in unreal and out) but for some reason I'm getting random save errors on random blueprints.

graceful peak
#

I uploaded to the marketplace a whillleee ago and remember having to do this. In my case I was uploading it as "add to project" so im pretty sure i had to use the built in zip function to zip up just the folder with the relevant content in it

graceful peak
#

dumb question,

#

is the project opened twice?

proud salmon
#

Nope. That was the only solution I could find online as well ๐Ÿ˜‚

#

but I double checked, just once

graceful peak
#

Thats the only time i've ever seen that error

#

Well, If you're trying to zip the whole project, and dont mind doing it outside of the editor, why not just close the editor and zip it

proud salmon
#

I did, same issue. But seemingly random in which blueprint it does it to. Which is what's so odd haha

graceful peak
#

Huh? How are you getting that error while zipping if the editor is closed

#

are you trying to open the project from within the zipped folder?

proud salmon
#

sorry, I zip it, then unzip it, then run it. Get the error

graceful peak
#

oh

#

ok

#

That is interesting indeed. Usually an error like this pertains to write permissions, or a file being unwritable because its open

proud salmon
#

ya it's a weird one

#

I'll play around with it. Maybe it's related to a plugin ๐Ÿค”

graceful peak
#

gl, wish i could have been more help lol

sick sky
#

for some reason, at beginplay i cant add instances in a instances static mesh component

#

the code is located in a actor component

#

if i move the code in construction script it works

gentle urchin
#

doesnt make to much sense

#

there's no "beginplay" check in the code ๐Ÿ˜›

sick sky
#

yeah

#

so i wonder why tf it doesnt work

dawn gazelle
sick sky
#

this doesnt work
(calling in actor comp)

#

this works
(calling from owning actor)

#

this works
(owning actor)

#

maybe a actor comp cant do that ?

dawn gazelle
#

It may need to wait until the next frame after adding the ISM component to the actor.

sick sky
#

didnt work

dawn gazelle
#

Put that after the Add Instanced Static Mesh Component.

sick sky
#

still nothing

#

tried before the set mesh and before the loop

dawn gazelle
#

Is it for sure adding the ISM? Are there any errors in your log at all?

sick sky
#

no errors

#

code is called

#

i guess i'll give up today and see bck tmrw

#

im getting tired

#

if anyone has idea im all ears

cursive wigeon
dawn gazelle
# sick sky if anyone has idea im all ears

I was able to do it without any problems. Tested with a placed actor in the level, gave it the component. On Begin Play it added the instance, so I'm not sure what the problem could be. (It flew off because BP_Potato is a physics thing, but that's the cube stuck there in the wall)

sick sky
#

maybe its multiplayer related

#

but its running on server and all is replicated
nothing changes between the begin play of actor and beginplay of AC

#

ookay its MP related

#

when removing the switch on authority the mesh is spawned

maiden wadi
cursive wigeon
#

ok will play with it

ember monolith
#

Is there a way to have an Exec function with an optional param that uses a default value if you don't pass one in from console?

undone bluff
faint pasture
undone bluff
#

still working on this project?

faint pasture
#

It's on the back burner but the FOV system is one of my currently in-dev plugins

#

it's really simple

#

The best results I've found are to use a render target.
CPU stuff -> draw FOV to render target.
Masked things -> sample render target for opacity
Post process -> sample render target for FOV visualization

#

here's another version of it, same basic idea though

rugged aurora
#

I want to do this in blueprint:

VectorName.Rotation().Yaw```
However I am not sure what node to use
cursive wigeon
cursive wigeon
undone bluff
#

ah nevermind

faint pasture
#

you somehow get triangles

#

then just draw them to render target

#

and sample that in shaders

#

You can do all sorts of wild stuff with it, here I was playing with a decay time thing

faint pasture
cursive wigeon
cursive wigeon
#

I am using render target in my MF

faint pasture
#

Yeah you want a render target to be the thing that the triangles get written to for sampling in shaders

cursive wigeon
#

So you did it through a visibilty bool on teh enemies?

faint pasture
#

no

#

enemy material is masked

#

opacity comes from pixel world space -> math -> render target sample

cursive wigeon
#

can u show the post process code pls

faint pasture
#

I don't have it right this second but it's the same, post process is just
pixel world space -> math -> render target sample -> tint/darken etc

#

the keys are the pixel world space coords and the render target sample

#

if render target is meant to be centered on player position then you'll need a material parameter collection that you feed the player position into

faint pasture
#

exactly

#

I just skip the ISM part and go directly from traces to triangles

#

just sample the render target the same way to act as an enemy opacity mask

#

in BP only this will have very bad performance as the amount of traces gets higher and higher

#

in C++ several thousand traces is no problem

cursive wigeon
#

Ok cheers I will play around with the way i am makign my mask

faint pasture
#

show your post process material

cursive wigeon
#

thats kinda why i went with th ISM. its like a 1 degree slice ISM that I make 360 times

faint pasture
#

you're still doing a lot of math in BP which is where the slowness is

cursive wigeon
faint pasture
cursive wigeon
#

image 2 and 3 are the mf insides

faint pasture
faint pasture
cursive wigeon
faint pasture
#

you don't need many behind you

faint pasture
#

plug that into opacity for your enemies

#

that'll output 1 when visible and 0 when not

short ivy
#

This exact same setup with the exact same inputs has different results depending on if it's a macro or a function in my widget blueprint.

I copied the same nodes just needed it as a macro because I need the async loading for soft references later on in the code

#

With the function, it does work as intended and gets me the button that was pressed

#

with the macro, the "basic button" is also correct, the button array is complete as well and the only problem is, that it somehow gives out equal i.e. the branch is true for always the last button in the array and not the one that was pressed although a print string after the branch would show a different reference for the Basic Button

#

as a function it does work like I have said with the exact same setup

cursive wigeon
#

Thanks you!!! @faint pasture So I guess I can just make a master enemy mat now aye?

short ivy
#

same inputs

maiden wadi
short ivy
#

So everything is the same, just one is macro and one is function

#

and it still doesn't work

maiden wadi
#

@short ivy What is this for?

short ivy
#

this is in my widget bp. It's a customization system where you press buttons and thus the character changes clothes

#

and it works as intended as a function although it is setup the same. The only reason I am trying to do it inside a macro is because I want to use async load asset to not have everything in memory right away and the function didn't support that node

maiden wadi
#

IMO I would just do this off of an event. Button click should set some state about what mesh you're trying to load. Then it can call a separate function that has the async load function. After the Async load function, it'll check if the loaded mesh is the same as the last button press, else ignore it. That way you don't get desyncs in your button press.

short ivy
#

Now i put it all just into the event and it doesn't work as well. With the function it does though :/

surreal peak
rugged aurora
#

Not sure what is wrong:

surreal peak
#

One thing that is very strange about your setup is the need for the For Loop

rugged aurora
#

I want to get the red arrow to point to where the mouse is pointing, however it rotates on the wrong axis

maiden wadi
surreal peak
#

Yeah

short ivy
rugged aurora
surreal peak
#

Yeah but just give the Button the Mesh

short ivy
#

I see okay

surreal peak
#

And then get the Mesh from the Button

#

What Authaer showed

#

That removes finding the Button again

short ivy
#

Gonna try that what Authaer showed then

surreal peak
#

What you want to do is to take the result of the "Minus" and call "Make Rot from X" on it, and if you want to only affect the YAW, null Pitch and Roll before setting it on the Arrow.

#

+- maybe normalizing the result of the Minus first, but not sure that's needed for the Rot From X.

rugged aurora
#

why x?

maiden wadi
#

There's also just the FindLookAtRotation node that'll do all of that for you from two world space points.

rugged aurora
#

the odd part is that I understand the vector math needed and was able get it to work in c++ however blueprint appears to be very confusing

surreal peak
#

You can open the function in C++ if you are curious

maiden wadi
#

It's the same in C++. You'll get the same from all three of these.

(Target-ActorLocation).GetSafeNormal().Rotation()
hollow cove
#

quick question, would this work if one of them are Null/None at the time of binding

surreal peak
#

Define "work".

hollow cove
#

i.e. i update one of the variables and then it'd delegate or whatever the restarted event from that one

short ivy
#

Btw I found the fix. Apparently I had to store the selected mesh in a variable because it gets lost until the async asset is loaded or such idk

surreal peak
#

It's your responsibility to Bind and Unbind when that Instance changes.

hollow cove
#

ah that's what i needed to know, thanks

surreal peak
#

The For Loop does not wait on the Async Node

short ivy
#

I would love to know that. I am new to soft references and that honestly was the first time I used it

surreal peak
#

The For Loop finishes that very frame

#

The Node might still have something saved in the Pins

short ivy
surreal peak
#

And when you later call Get on the Array, when the Loading is done, it might grab the last entry

maiden wadi
# short ivy

Also check after the completed pin that it's the same picked mesh still. Or you can end up with cases where you click two buttons and end up with the first mesh picked instead of the second one.

short ivy
surreal peak
#

They are actual Objects in Code

#

A lot different than what C++ does

short ivy
surreal peak
#

Each pin is iirc also an object

#

So they somewhat save the value

rugged aurora
surreal peak
#

Similar issues are when people have like a BeginOverlap Node, and they use the "OtherActor" pin "later"

#

If something else overlaps in the meantime, that pin changes reference

#

Whenever you do something latent you gotta save what you were working with

maiden wadi
surreal peak
#

Not sure that normalize is needed though, is it?

#

I questioned myself there earlier already

surreal peak
rugged aurora
maiden wadi
#

Might not be necessary. Just habit to normalize directional vectors I guess. ๐Ÿ˜„

rugged aurora
#

This appears to work, the set world rotaiton has a lot of useful entry connections

#

the zeroing out of the unwated parts is built in sort of

surreal peak
# rugged aurora

Small note: Try to keep your graphs clean and lines straight. If you double click a line you get re-route nodes too.

#

Makes it more readable. Future you, people here needing to help you and people working on your project will thank you

#

And possibly refrain from finding where you live to slap you

rugged aurora
surreal peak
#

Yeah, C++ makes this easier mostly due to how easy it is to work with Structs and References

short ivy
#

no matter how fast I tried to spam different buttons

surreal peak
#

Yeah cause you aren't gating the buttons from being unavailable until the mesh loaded and set

#

That's also why I wouldn't do what you are doing

rugged aurora
#

my aim is to create a game prototype, then port the code into c++ from blueprint, because I thought blueprint is easier than c++, however i just learned it can be harder than c++ sometimes

surreal peak
#

And just load the meshes all for that UI

#

They will be unloaded despite the selected ones once you close the UI again anyway

rugged aurora
#

for example I spent half an hour trying to get a stupid cast to work:

#

I got so desperate I just threw random casting nodes into it to see which one works.

surreal peak
#

I would probably either load the Mesh and save it properly in the Button on Construct. So give the Button the SoftRef, let it load the info and then enable it once it loaded.
Or load all of the meshes and then create the UI, showing a Loading Throbber in teh meantime.

#

When the buttons are removed there is no reference to the Meshes, despite the ones you set, and they will be cleared again by the GC

rugged aurora
#

the same code in c++ is easier to understand:

void ATank::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);

    if (PlayerControllerRef)
    {
        FHitResult HitResult;
        PlayerControllerRef->GetHitResultUnderCursor(
            ECollisionChannel::ECC_Visibility,
            false,
            HitResult);

        RotateTurret(HitResult.ImpactPoint);
    }
}```
short ivy
short ivy
surreal peak
short ivy
rugged aurora
#

I think an average gpu can handle many polygons

surreal peak
#

They aren't even rendered

#

They are just loaded in memory

short ivy
#

yea true

surreal peak
#

And you aren't releasing on ass old Xbox consoles anyway

#

We shipped The Ascent on the older gen, and trust me that thing was not soft reffing the meshes until the button was clicked.

maiden wadi
short ivy
#

Alright alright, I will load them right away then ๐Ÿ˜„

#

But now I know how soft referencing works (at least a bit)

snow crag
#

is there a way to rotate the parent/root of this blueprint?

surreal peak
rugged aurora
surreal peak
#

Needs a small bit of C++, but then the AssetManager can simply load these on command by asking to load the AssetTag

short ivy
#

but didn't know they had a use case within these things

surreal peak
#

We just do "LoadAssets(StructureTag)" and it gives us a list of our BP_Structures that were previously not loaded

#

Very simplistic case

#

Or it's PrimaryAssetID or whatever they call that Id/tag thing

#

Basically just a Category:UniqueID combination.

#

Structure:Blacksmith

#

With a bit more C++ you can even expose data to the AssetRegistry that you need available without loading the Asset.

#

We used that to export a Category so we can sort the Buildings without having to load them and then only load them if the UI for the SubCategory is opened

#

If you are into optimization in that kind of way, this should be quite interesting for you

short ivy
#

Oh this definitely does sound interesting but I am tending towards that it's too overkill for a character customization

surreal peak
#

The root is the root. it's meant to the origin, 0,0,0

short ivy
#

I will copy and paste that into my things to learn/try though!

surreal peak
#

If the mesh is rotated wrong, then either put a nother root above it and rotate the original root then.

#

Or fix the mesh when exporing/importing in your 3D software

snow crag
#

Understood. Thanks

surreal peak
flint oasis
#

Hi everyone, completely new to the server and Unreal 5, just started a couple weeks ago.

I've been trying to do everything from scratch to get a feel for the engine, so I created my own game mode/PC/pawn/level/etc. I'm currently working on a widget interface and I've added a widget switcher and added buttons with an onPressed event to change the active index. However, when I click the buttons after pressing play in the viewport, nothing happens (though if I change the active index myself it updates correctly). I'm not sure what the problem is and was looking for some insight.

#

I wasn't sure if I needed to manually add mouse clicking functionality? I only have button press inputs right now, so maybe I can't even click anything in the game?

short ivy
surreal peak
#
// Header of your Class

/// Required
virtual FPrimaryAssetId GetPrimaryAssetId() const override;

/// Optional
virtual void GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const override;
// Cpp of your Class

/// Required
FPrimaryAssetId ACH_Structure::GetPrimaryAssetId() const
{
    // StructureTag is an FGameplayTag that can be set in the BP children. Should be unique.
    return FPrimaryAssetId(FPrimaryAssetType(TEXT("Structure")), StructureTag.GetTagName());
}

/// Optional
void ACH_Structure::GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const
{
    Super::GetAssetRegistryTags(OutTags);

    // Category is an FGameplayTag
    OutTags.Add(FAssetRegistryTag(GET_MEMBER_NAME_CHECKED(ACH_Structure, Category), Category.ToString(), FAssetRegistryTag::TT_Alphabetical));
}

Funnily enough, those AssetRegistryTag stuff can even be seen in the AssetAudit in the Editor. Pretty cool stuff.

surreal peak
#

Me included.

short ivy
#

So it's advanced stuff

surreal peak
#

Ehh, maybe

#

It's simple to add.

short ivy
#

I guess that can also be used in-game to load places on the map and stuff?

#

dynamically

surreal peak
#

Possibly

#

Depends on how you set that "load places" stuff up

short ivy
#

Yea, alright gonna try it out. Thank you

surreal peak
lofty rapids
surreal peak
#

You mean InputMode

lofty rapids
#

or just ui while your using it

lofty rapids
surreal peak
#

Setting InputMode from different places can quickly break stuff if those places don't know about each other.

maiden wadi
#

Input mode won't matter for button clicks. Unless they're on GameOnly and have no mouse.

surreal peak
#

Either use CommonUI to handle this stuff for you.
Or handle the InputMode in a place where all UI is known.

#

E.g. PlayerController.

#

But yes, if the InputMode would be Game, the mouse would be gone I guess

#

It's probably good to see some code and to also ask them to put some print strings in

#

It's late here so I'm gonna head off

daring merlin
flint oasis
#

I don't actually have anyhting within the button/checkbox/image its linking to, but it shows the outline which I was just doing to test if it worked correctly

lofty rapids
#

they don't work no matter how many times you click ?

flint oasis
#

Nope

lofty rapids
#

some print string on the events see if it's firing

flint oasis
#

nope string isn't printing either

#

I'm thinking maybe its due to my custom player controller? That I can't actually click anything? What would be a good way to test string print on mouse click, would I do that inside player controller?

maiden wadi
#

Are you actually seeing the button's click visual? The little indent.

daring merlin
flint oasis
#

I am not seeing any indents on clicking the mouse

#

So I assume thats the problem

surreal peak
#

I'm half sure, even if the InputMode is Game, if you get the Mouse in the Editor you could click at least once.

maiden wadi
#

Would start at the widget reflector then.

surreal peak
#

It shouldn't stop the click to go through

#

But I would also use the WidgetReflector

#

And see if you have another widget overlaying

daring merlin
maiden wadi
#

Input mode won't affect being able to click on buttons at all. Input mode GameOnly will hide the mouse entirely. GameAndUI or UIOnly would show the mouse and neither affects button clickability, they only affect whether or not your inputs get passed to the player controller for inputs through actors.

flint oasis
#

Hmm how would I go about checking this in the reflector?

maiden wadi
#

Click this Pick Hit-Testable Widgets button.

#

When hovering your button, normally you'll see it outline in green.

flint oasis
maiden wadi
#

You'll want to do it at runtime to test.

flint oasis
#

aaah gotcha

maiden wadi
#

If you see the green outline like this, that means something is in front of your button, blocking it.

flint oasis
#

it does not highlight during runtime

#

it actually doesn't highlight any of the widget, just outlines the viewport window

maiden wadi
#

You see the SPIEViewport highlighted when hovering the button, like this?

#

Sounds like button visibility is set to something other than visible.

flint oasis
#

just checked, they are set to visible. I do not see the SPIEViewport though

maiden wadi
#

Could one of it's hierarchy parents be set to Not Hit-Testable(Self & All Children)?

flint oasis
#

they are all set to not hit-testable(self) by default, hadn't messed with that setting

maiden wadi
#

Can you switch your pick test to find painted widgets and find the button that way in the hierarchy view?

#

That should get you something like this.

flint oasis
#

I'm not entirely sure how to use this reflector, but this is all I'm getting,

maiden wadi
#

Can you expand it a bit and screenshot the visibility list?

#

Ah, that

#

This overlay looks like it's a hierarchy parent of the buttons? If it is, this will make them not hit testable as it will affect all children.

#

This overlay here, that you have selected in this screen is your culprit I'm pretty sure. You'll want to change it's visibility to Self Only

flint oasis
#

change visibilty to self only? i don't see a self only option

maiden wadi
#

Your overlay is set to Not Hit-Testable (Self & All Children) at the moment

flint oasis
#

oh motherrrrrr i thought i checked that one too for self

#

lemme try

#

you're my hero

#

it worked

#

I was stuck on that for far longer than I should have been ๐Ÿ˜ฎโ€๐Ÿ’จ

maiden wadi
#

It happens. ๐Ÿ˜„ There's a reason I know where to look for those issues.