#blueprint

1 messages · Page 166 of 1

steel star
#

you want to flip it

#

drag off it and do "boolean NOT"

gaunt stirrup
steel star
#

yep, now connect that last pin to the new value

gaunt stirrup
#

okay

steel star
#

and.. done

gaunt stirrup
#

ima try now

steel star
#

oh

#

'out actors' is not connected to your loop

gaunt stirrup
#

oh okay

#

just connected

#

i dont see any change

#

should i have the metahuman on invisible to start off

steel star
#

click compile, click save, click simulate (turn on simulate), play, see if the event is getting called

gaunt stirrup
#

or i wonder if i need to tag all the components of the metahumans

steel star
#

no

gaunt stirrup
steel star
#

mouse over the button then, if its being called it will be shown in a very clear way

gaunt stirrup
#

doing that now

#

i dont see any indication

steel star
#

are other parts of this bp already doing things that work?

#

can you see ANYTHING executing on it?

gaunt stirrup
#

yeah

steel star
#

maybe select something from the dropdown that says "no debug object selected"

#

outside of the event graph, look at details of the widget

#

enable cursor hover events

#

maybe

#

that woudl be for a regular actor though

#

idk about widgets much

#

i would just hook into clicked or something you can verify actually happens

gaunt stirrup
#

yeah ill switch this to click

#

and see what happens

steel star
#

anyhow now you know a little about accessing specific actors and stuff in the world

gaunt stirrup
#

okay so im gonna duplicate the node and tag the other character as somehting else

#

but i think both of them are still showing visible in the level

cold crown
#

I'm having trouble with my event dispatchers. I was calling the dispatchers on the character pawn, and binding them in the level blueprint. And they all worked perfectly. The problem is I recently replaced my "GameModeBase" gamemode with just a "GameMode" and all of a sudden all of my dispatchers will still bind and call just fine, but not, execute the custom event in the level blueprint anymore? To clarify, NONE of these dispatchers are directly linked to the game mode, or need to be updated, in any way I see as in (update the variable from "gamodebase" to "gamemode"). But the swap some how broke my dispatchers on the level blueprint and only those? any help?

zealous moth
#

@cold crown I will go ahead and propose you don't use the level blueprint as it is poor practice and instead, use the game mode itself or the player controller classes. That being said, not sure why it fails. Consider using either print strings to see the flow real-time or add checkpoints in the BP to see if it fails somewhere

exotic quest
#

oh nvm i just saw it

#

my bad im blind

steel star
exotic quest
onyx gull
#

is it possible to have dynamic singlecast delegate? and if so how do I declare it in C++ and then access it in blueprints to call and bind it? BenUI's article on delegates says dynamic singlecast is possible but doesn't say how, and the standard method of declaring a dynamic multicast doesn't compile.
this article https://forums.unrealengine.com/t/how-to-setup-dynamic-single-delegate-with-retval-to-make-it-bindable-from-blueprints/764150 provides a solution for having the function be accessible from blueprints to Bind it, but doesn't provide any info on calling/invoking it.
Alternatively, do blueprints natively provide some alternative to this approach? I'm trying to have my music stop when the player dies, and rather than trying to wrangle references between the two objects, declaring a delegate through the gameManager just seems like an easier way to do it. but maybe y'all know of something cleaner

steel star
#

why not just make it multicast? gamemanager::onplayerdeath maybe more than one party will care about this in the future

onyx gull
#

that's definitely an option, main reason I'm resistant to it being that as I understand multicasts are slower(?) and I also just want to learn how to do this if only for the sake of understanding things better

steel star
#

well, considering that it doesnt seem to be a stock feature really, id say that IS what youve learned 😄 i dont forsee 100s of player deaths occuring per frame so the cost of triggering it is not really an issue

onyx gull
#

fair enough, ty

steel star
#

its annoying enough to setup a multicast delegate tbh, i recent did the same for a 'actor selection changed' event on my gamestate

onyx gull
#

It's complicated but I've done it enough that I'm getting the hang of it, this one didn't take much time.
granted the fact that I'm doing it so much leaves a concern in the back of my head that I'm overusing them and misunderstanding their purpose, but so it goes

steel star
#

someone earlier linked uhh lemme find

onyx gull
#

yep love that article, it's how I learned pretty much everything I now understand about delegates, and also where I got the idea that a Dynamic Singlecast should be doable

steel star
#

ah. i got the impression it also had some helpers for setting them up more easily

jaunty coral
#

I have a question I posted on the forums Im still looking for answers to.
https://forums.unrealengine.com/t/item-list-for-spawning/1858502

Epic Developer Community Forums

I am trying to figure out the best way to list a large amount of items that can potentially be found by the player. However the items don’t spawn or count as found till the player triggers a scan event via a button. At which point the game is supposed to check the specific point of interest the player is at to retrieve a list of items that can s...

sinful hinge
#

I made a timeline to have an actor do a 360 rotation after a random "AI Move To" node, but since the timeline starts at 0, no matter the direction the actor is facing due to the random movement, it'll always snaps back to 0, how can I fix that? Am I correct to assume a timeline is not what I should be using here?

steel star
simple apex
#

Hey quick question,

I just asked a question on the unreal engine forms and got a reply, and I cannot find the documentation for the SetSkeletalMeshComponentPose function, could someone point me in the right direction?

Thanks!

dawn gazelle
pastel garnet
#

Hello, I'm having some problems with Loading and unloading levels, specifically game level and main menu level. whenever I load a game (from the main menu), everything works as should but for some reason when I exit to main menu, the level doesn't seem to load the main menu, it just keeps showing the loading screen. I can share a short screen recording if needed.

gaunt stirrup
#

hi does anybody know how to edit visiblity for metahumans in game on a widget?

agile moss
#

Hi
I am not at home
But does anyone know how to ease in and out without using timelines? (Float)

#

Stupid question?

tall venture
#

Hi all, I'm new to the server (and UE5!), nice to meet you all! I had a question about level streaming, not quite sure where to put this but here goes...

I'm looking at setting up level streaming within our game, and I'd like help choosing between World Partition and World Composition. I believe these are the two choices, given the docs, but if there are more please correct me!

The game is a hub-spoke type game, it's fairly small scale (think 12 week game jam size). The hub has 3 spoke choices maximum, each of the spokes a small room.

Could anyone give me a high level steer on which of the systems would be best to use, and why?

lunar sleet
#

Use the newer one

night bolt
#

hello, does anyone know how to fix this?

LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/UltraDynamicSky/Blueprints/Weather_Effects/System/Ultra_Dynamic_Weather_Interface.Ultra_Dynamic_Weather_Interface_C:UDW State Apply:State'. Unknown structure.
LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/UltraDynamicSky/Blueprints/Weather_Effects/System/Ultra_Dynamic_Weather_Interface.Ultra_Dynamic_Weather_Interface_C:Get UDW State for Saving:UDW State'. Unknown structure.
LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/UltraDynamicSky/Blueprints/Ultra_Dynamic_Weather.Ultra_Dynamic_Weather_C:UDW State Apply:State'. Unknown structure.
LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/UltraDynamicSky/Blueprints/Ultra_Dynamic_Weather.Ultra_Dynamic_Weather_C:Get UDW State for Saving:UDW State'. Unknown structure.
LogProperty: Error: FStructProperty::Serialize Loading: Property 'StructProperty /Game/UltraDynamicSky/Blueprints/Ultra_Dynamic_Weather.Ultra_Dynamic_Weather_C:Get UDW State for Saving:State'. Unknown structure.
sharp steppe
lunar sleet
#

Is it a bp struct by chance?

night bolt
#

Yes, it's from Ultra Dynamic Sky plugin

#

i remember i added a variable in the struct then deleted cause i don't need it

lunar sleet
#

Ah fun. Well bp structs tend to break as soon as you edit them, especially at runtime

night bolt
#

i read that i can just duplicate it and it might fix itself

lunar sleet
#

Yeah, give it a shot if you don’t have source control/can’t undo

night bolt
#

great, duplicating and replacing references made my editor crash

#

lmao i love unreal

somber dust
#

Am I going crazy but wasn't there in the engine "Tutorial" asset that you can click and it would highlight pre-defined parts of the editor, like buttons, viewports etc. Is it still in?

remote rapids
#

how to do that?

#

can someone help me pls?

frosty heron
#

By getting a ref to your button and change it's properties (brush)

pastel skiff
#

hey so i have this error thet says "accessed none trying character movement" is there a way to reset charachter movment virable or something like that to fix it?

frosty heron
restive radish
#

hi everyone, is there a way to remove the content of a set variable?

frosty heron
restive radish
#

if i get to false on the branch

pastel skiff
frosty heron
#

The variable you declared there is a pointer

restive radish
#

it says its valid

frosty heron
remote rapids
frosty heron
pastel skiff
frosty heron
#

where CMC is missing and the detail panel is empty.

remote rapids
#

come on pls
so what to do?

pastel skiff
restive radish
frosty heron
#

Learn how to get a reference to an object and modify it's properties @remote rapids

frosty heron
restive radish
#

do i need to anounce the variable once and then just remove from viewport and add to viewport?

frosty heron
#

I think you are a bit confused, removing and adding viewport does nothing to your object ref.

remote rapids
frosty heron
#

basically get your button, access it;s properties and modify it.

restive radish
frosty heron
#

Eg SEt Brush etc

restive radish
#

but i'll try alone and update, ty

frosty heron
pastel skiff
frosty heron
#

if not, set one up to prevent further damage in the future.

As for the fix (not guaranteed but since you are fucked anyway). You can try to reparent your base class to something else then back to the character base class again.

pastel skiff
#

is it that bad?

frosty heron
restive radish
#

i fixed it, ty

frosty heron
#

it's really bad to not use one yes, you won't even be considered for a job if you don't use source control in any industry.

remote rapids
#

ColdSummer pls can you explain me?
i try look for tutorials and i cant understand and connect to my situition.
pls try explain and help me

warm elm
#

Guys, I have a hard question:
My character is moving in the level (incredible, right?), and I'd like to construct a mesh that would be the precise "tube" where the person was, as it moved.
a bit like this image, but extruded along the path where the skeletal mesh moved, and taking its animations into account.
Anybody got the slightest idea on how to do that?

#

This is actually for engineering purposes, not for gamedev. I need the tube mesh to be precise, not to have a very performant solution

pastel skiff
frosty heron
#

I never encounter it because I am on 5.1

pastel skiff
frosty heron
#

Yeah but imagine if you put months of work into it 😔

#

you would give a lot for a time machine.

#

I would say you are lucky to learn it the hard way early into the project.

frosty heron
#

skim thru videos and try to understand what they are doing.

#

what you want here is to be able get a reference to your objects (buttons, etc) and change it's properties.

barren tangle
#

Need help. I create a simple blueprint. which spawn an actor each x second. with a Timer Event.
I spawn my actor at a specific location. and i print that spawn is done.

#

but now i'm looking at the position and there is no actor spawn

#

so i put a print to see if the actor was spawn

frosty heron
#

Check your Spawning Rule (Collision Handling override)

#

If your spawning location intersect, it won't spawn the actor if you don't set the collision handling to Ignore Collision, Always Spawn.

barren tangle
#

a collision can block a spawn?

frosty heron
#

Read the Collision Handling Override

barren tangle
warm elm
#

try setting this to alwasy spawn

frosty heron
#

Read >_>

barren tangle
frosty heron
#

What don't you understand tho?

barren tangle
#

why they will decide to not spawn if there is a collision

frosty heron
#

To prevent you from spawning in bad locations?

#

You can always change the rule

warm elm
#

It's a protection from spawning things that already collides

frosty heron
#

So again, you gonna run into problem if you spawn something in the same location. The spawned actors gonna overlap each other.

warm elm
#

It's a legacy from Unreal Tournament Days. You want to ensure you don't respawn your character if therer's something at that spawn locaiton

barren tangle
#

ok, because in that case collision was not an issue that's why i didn't understand why . but ok

uneven warren
#

Hi everyone
Im having this problem where when i spawn a box collision in beginplay and walking over it, it doesnt fire overlap events but when i add the box collision as a component then it works. Do i have to change any settings when spawning the box collision or am i doing something else wrong?
thanks in advance

#

i do have enabled overlap events and set to overlap all dynamic when spawning

frosty heron
#

Click on this node, you will see the component settings in the detail panel. Make sure the collisions are set accordingly.

uneven warren
frosty heron
#

and how are you calling the overlap events when adding the component in Run Time? I don't see any binding there.

uneven warren
#

this is how im calling the overlap events

frosty heron
#

Btw you never attach that box collision?

#

When you play in Editor, Open Console -> Show Collision

#

make sure that the box collision is where you want it to be.

#

just from the little material given here, it seems your box collision is spawned at the world origin 0,0,0

uneven warren
#

just checked it. not sure if its visible in the screen shot but the collision is there as well. Also just to test i changed the collision responses of the player to block and it does block me. so ig the collision is there but for some reason overlap events wont fire

#

got it fixed, apparently the component wasnt activated when spawned and i couldnt activate it in beginplay either so had to set auto activate in cons script.
i wonder why tho, its the first time i had this issue when trying to spawn a component inside an actor

tulip terrace
#

Hi there,
I need an advice/help with kinda a simple feature that I want to implement.
So what I have are 2 same BP Actors on map. BP Actor is 3D Widget; and the BP Actor has a public variable of Tag.
Each actor on map has a different Tag value and what I want is that when I get the Tag value of one of the BP Actors I want to change a value of custom Enum. What do I need to do and how?

#

I know I may do an alternative to this kind of problem, but I want to try it with this kind of settings, I guess.

tulip terrace
frosty heron
#

Do you want the change to happend when you are in the editor or when you Play the game.

Play the game = Change is not presistence, only for the duration of the game.

tulip terrace
#

I guess in the Editor

frosty heron
tulip terrace
#

And if I want the other option, BP will work with it?

frosty heron
#

I mean, that wil just be checking if Tag == X , set Enum to Y

#

what do you actually struggle with if you want to set the enum at run time?

tulip terrace
#

what I want is
when I click on button in BP 3D Widget Actor by Widget Interaction, I want to get the Tag value of the of one of two same BP Actor (3D Widget). When I get Tag X1 I want Enum X2, same with Tag Y1 to Enum Y2, e.g.

frosty heron
#

Get a ref to your actor, get the tag and set the enum accordingly

tulip terrace
#

ok, but idk in which assets' event graph I should put in

frosty heron
#

w/e object you actually want to grab

tulip terrace
#

what is w/e? 😅

frosty heron
#

stands for what ever

tulip terrace
#

Ok thanks 👍

frosty heron
#

if you want to iterate over all of the BP actors (eg the character), you can use get all actor of class. But I don't like this way and would prefer for the pawn to register it self to an array in a manager at beginPlay()

#

you can then iterate over that array instead

dusky cobalt
#

Is this only debug toll or this will work in the final live project?

maiden heath
#

I have a problem with the "Interface Blueprint" I created an Interface Blueprint which is inside the UI and after I click the button it activates that interface event in an actor but it doesn't call it how can I fix it

frosty heron
#

You are calling activate system in Character

placid bloom
#

I'm trying to disable player input while dialogue is happening, but I'm running into an issue. Right now, I'm using the "Disable Input" node which works okay, but if I hold down a movement key during the dialogue, the input action fires all pins continuously when the dialogue ends

stoic ledge
arctic thicket
#

Today i opened one of my Character child BP and when selecting its Mesh component, the Details pannel is empty. Any idea what may cause that ?

raven nest
#

I see a lot of tutorials for minimaps but none of them go into details with how to deal with situations of internal locations. Anyone know a simple way to have the ceiling not show up? I saw there was a clipping plane option but it LOOKS like it's not the near plane for some reason?

verbal jungle
#

Any idea why Radial Damage doesn't work?

#

The Apply Radial Damage is functioning, but the hit actor is not receiving any damage

#

neither AnyDamage nor RadialDamage event was triggered

trim matrix
#

anyone know how I can add a box component kind of dynamically without add them to my BP actor ?

#

Tried this but didn't seem to work

#

As that was what I ended up getting from it rather then an actually box component in the world

turbid bison
#

@raven nest I have the same issue, my current theory is that I should not have a camera above the real map, but have a copy of the map like 1000 units down. And all my actors have a sprite that is also 1000 unit down

#

This is what the "camera" will be filming for the minimap

#

did not have time to try and do that yet though

#

oh and, this copy of the map does not have a ceiling at all ofc

#

It also helps that I do not want to show actors, but symbols. And create a sprite on my actor and "hide from owner" does not work for multiplayer, since you'll see pawn that you dont own all the time

gray ingot
#

Hi, i can't find Blue node in material "ObjectLocalBounds", i have ue5.3 and it has only Red one, i need it for Fog

#

Is there a way to replace it?

raven nest
tropic peak
#

a bit stuck. I want to play a widget text animation when I approach an interactable item and the "press E to pick up" text appears. The text appears properly, however the animation doesn't play.

#

(widget)

#

Blueprint Runtime Error: "Accessed None trying to read property TextWidget". Node: Play Text Animation Graph: EventGraph Function: Execute Ubergraph BP Pizza Box Blueprint: BP_PizzaBox

thin panther
#

where are you setting your text widget reference

tropic peak
#

right i forgot to set it in details of the variable

thin panther
#

That won't work either

tropic peak
#

no errors but the animation doesn't play

#

what am I doing wrong?

thin panther
#

You need to refer to a specific instance of a widget.
You can't know that at compile time. Your reference needs to be of the one you spawn

tropic peak
#

hm

#

ok. I got it to work

tropic peak
#

it's still a bit difficult for me to plan things out and understand how to reference things

#

not even a bit tbh

surreal bridge
#

I'm running into an issue where I can't seem to get the widget interaction working with my actor.

I have the widget interaction component on the character and set to press the pointer key for the left mouse button when you try to interact with it, the print that I have after it is being called.

I then have an actor with a widget component. The widget being used has a button that should print out some text when clicked but it never is being called.

I'm sure that I am just missing something simple, but I can't for the life of me figure it out. In the past I had been able to get this working, on another project

stoic ledge
surreal bridge
#

This is the widget and the event:

#

This is on the character:

#

It prints the 'Click' but nothing else

waxen quarry
#

So the actor reference is invalid. How are you obtaining the actor ref?

surreal bridge
#

Which actor ref are you referring to?

waxen quarry
#

Is PressPointerKey supposed to set the InteractableActor ?

surreal bridge
#

Ah no
The interactable Actor is for interacting with items in world.
If there isn't one that you can interact it will try to interact with a widget.

I have it this way so you can't interact with both an item and widget at the same time

waxen quarry
#

Ok so the widget is not receiving any input when it should be right?

surreal bridge
#

Correct

#

I don't have anything special on the actor that has the widget, I just created it and added the widget

waxen quarry
#

Im curious, on the button do you have the visibility set to Not Hit Testable ?

surreal bridge
#

Nope
I had already checked that to be sure, but its just marked as Visible

#

I'm thinking that I may be missing something in order to get this working.

All that I did was add the widget interaction to the player and add a widget component to a new actor.

Then I added the Press Pointer Key to the interaction event which is being called since the print string after is being printed each time I try to interact

waxen quarry
#

Maybe the interaction component isnt tracing correctly. In the class defaults for the interaction component are some settings for tracing.

#

Channel, distance, source.

#

Show Debugging, try this and see where the line traces are going

surreal bridge
#

I have the debugging on and it is showing up when I look at the widget

#

A rather large red dot

waxen quarry
#

That component is on the player controller right?

surreal bridge
#

Its on the player character

#

Is it supposed to be on the controller?

waxen quarry
#

Im not 100% sure, but its prob fine on the character.

#

The component has an event "OnHoveredWidgetChanged" try implementing that and printing the results

surreal bridge
#

When I hover over the widget, that event is being called and prints the correct widget name

low shard
#

Hey guys, is there a way for a BP interface to be a child of another BP interface? I want the BI_PickUpable to be a child of BI_Interctable, but when I create the child BP class from BI_Interactable it doesn't show up in Details panel of class settings

waxen quarry
waxen quarry
hushed rock
#

so a noobie question i followed a tutorial about an inventory system i added the combination grid and made it work, i want to have this mechanic: i put items on the right grid and if the combination is correct i can press the "Combine" button and get the forged item, my question is what is the best way of saving the recipes of different items that can be build ? my items are composed like this: a Data Structure that contains all the information about an item(name, maxStack, image...) and this is contained inside a Structure that contains this Data Structure and the currentQuantity. Any suggestion on what is the best way to save the recipes of the different items that can be made ? (order in the right grid is not important)

low shard
#

Thanks for the help

waxen quarry
waxen quarry
#

And when you want to get a list of all recipes you can use the AssetRegistery to query from them without having to manage them in a list somewhere.

hushed rock
dark drum
# hushed rock thank you , that is a game changer, didn't know that there is a way to get all t...

Adding to what Gold said, you can also include functions in the primary data asset which can be call on all data assets that use it. They can be useful for doing checks on the data stored in side or other things.

For example, you could have a function on the data asset that checks if the supplied items in a specific format is a valid match to the recipe outlined in the data asset. (However it is you store the data)

echo agate
#

Is there a way to have a projectile bounce off some surfaces and not others? I want bullets to bounce off targets who's armor is too high of a rank for the player and am struggling to figure out how to make that work

waxen quarry
waxen quarry
#

What you want really needs to be a more abstract system of determining what surfaces to bounce on or not. Armor/level is too specific. This might be a great place to use interfaces that can perform a bounce check on an actor. Call it IRicochet or something lol. If the armor hit point has to be specific then you will need to calculate where the hit on the player was and then make a determination. Im just brainstorming but you could perform a line trace or put a collision sphere in front of the projectile. On overlap determine if the surface should cause the projectile to ricochet, enable the 'Should Bounce' bool on the projectile. Handle the OnBounce event to disable bouncing after the fact, like this:

#

There are so many systematic ways of handling your issue, but hopefully this gives you some idea of where you can start. You can also use a physics material and a system to make it work.

calm flint
#

I'm pretty sure this is poor practice but:

I've made most of my UI logic inside my game mode, since commonUI wouldn't load properly inside my player controller BP.
Now the issue arises when I wanted to connect an interface of my player character to an event in my game mode. It seems to immediately crash when I try to call in game mode and cast it to the game mode BP inside my character classes.
Is there a workaround I don't know about or should I just scrap the whole Idea and try to do it some other way.

#

My character has stat component and an interface, so whenever one of the stats depletes I want to call in an event that would open up an end game menu from my game mode.

waxen quarry
#

For starters I see no reason why you should be using an interface for this. Put your UI code in a HUD class. Every player has a HUD so it makes sense for most of the logic to reside there. Why is it crashing? Hard to tell without seeing all the code. Could be a circular reference issue. What does the crash log say?

calm flint
#

no crash log, nothing, my code compiles fine, it just fails to initialize after 75%

waxen quarry
#

Its crashing on startup?

calm flint
#

it just won't go past 75%, and just stays like that

lunar sleet
#

Initialize ? Is this code in cpp ?

jaunty coral
#

I am trying to figure out the best way to list a large amount of items that can potentially be found by the player. However the items don’t spawn or count as found till the player triggers a scan event via a button. At which point the game is supposed to check the specific point of interest the player is at to retrieve a list of items that can spawn. Then Spawn x number of items randomly depending on chance of them spawning, for the player to retrieve.

I’m still very new to UE5 and have no clue where to start this from. Any help would be much appreciated.

frozen gale
#

I have a beginner question: I am trying to learn AI in unreal and I am trying to learn behavior trees using a tutorial and for some reason it does not work

lunar sleet
#

Ok he’s not terrible tho there’s one pinned in #gameplay-ai from Epic that’s best for learning BTs

#

So what’s failing

waxen quarry
#

"Dont work" doesnt say much. What is not working in which you think it should be?

calm flint
# waxen quarry Its crashing on startup?

I've compiled it, it compiles fine, but when it boots the editor, it gets stuck at 75% loading. The only thing that makes it boot up the editor if I delete the CharacterBP and not add any nodes with a reference to the game mode.

frozen gale
waxen quarry
lunar sleet
calm flint
frozen gale
lunar sleet
#

Alright. Best way to debug AI is using the Visual Logger from Tools -> Debug

waxen quarry
lunar sleet
#

Start it up, run the game. Then click on the bars on the AI controller and see what it says. There’s usually a red one where stuff has failed^

calm flint
#

Thank you for the help.

lunar sleet
#

I’m not certain GM boots after the player char

radiant urchin
#

is anyone free to jump into a voice chat channel and help a newb out with a blueprint?

#

i think i just need an editor utility widget to control it, but i've never built one before

lunar sleet
waxen quarry
calm flint
#

Thank you guys! I'll check some of those and see if it works!
I have been stuck on this for a few days now.

waxen quarry
calm flint
#

Gimme a sec

#

the main reason why I suspected its a loading issue, is because my logic works fine and it compiles fine, until I turn the editor on/off, then it starts causing issues

#

this is literally the only thing in my CharBP, most of the logic is in .cpp and everything compiles fine

#

the event is also triggered when it should be.

sinful hinge
#

Someone knows why my Duration variable doesn't change for the timer? By default it's set to 10 (cause I'm starting the game during the day), and when the BP switches to night, it should be set to 30, but it stays at 10

raw orbit
#

if i wanted to 'knock' a target away in the direction the 'aggressor' actor is facing using add impulse on the movement component how would i would about the vector math? i just realised my solution to this problem doesnt quite work

gaunt monolith
#

I'm using the Water plugin, trying to increase the depth of my rivers but it doesn't seem to work. I'm trying to change the "Channel Depth" but it just doesn't change anything. It works when i try with a Lake, any suggestions?

spark steppe
lunar sleet
lunar sleet
sinful hinge
lunar sleet
#

So you would need to clear and invalidate the timer and start it again after the value has changed

sinful hinge
lunar sleet
#

It loops the delegated event

#

Timer event itself only runs once, it takes the value you've given it as input and runs with it until cleared

sick sky
#

i got an issue i never had before

i create a new custom object type.

on a static mesh component, collision is enabled and the object type is set to my custom one
on my player capsule, is set it to block my custom type.

i trieds tons of differents settings, i cant manage a way to have the static mesh component block my player

jaunty coral
#

I am trying to figure out the best way to list a large amount of items that can potentially be found by the player. However the items don’t spawn or count as found till the player triggers a scan event via a button. At which point the game is supposed to check the specific point of interest the player is at to retrieve a list of items that can spawn. Then Spawn x number of items randomly depending on chance of them spawning, for the player to retrieve.

I’m still very new to UE5 and have no clue where to start this from. Any help would be much appreciated.

sick sky
#

if its a treasure hunt, you can have params like % chance to have a valuable item, and have this % change depending on the scan item used or the region you are

lunar sleet
lunar sleet
waxen quarry
# jaunty coral I am trying to figure out the best way to list a large amount of items that can ...

Well you need a way to store data about each item. A data asset is preferred. Inside needs to be information about spawn chance, which events it should spawn in. You could use gameplay tags for that. Then you need a spawner. Make it a component and add it to gamemode, which is a good place for SP and MP games. When it comes to the scan, query the game mode about the scan, and perform a function to find which items by gameplay tags to get.

lunar sleet
#

is the mesh's collision set to block the player?

#

can you show both collision panels?

sick sky
tropic peak
#

I created a simple system for item pickup.. but it's coded within that one certain BP. What do I need to do to have this as a "component" that I could attach to various BP's if I want them to be pickable objects?

jaunty coral
supple dome
#

thats not how it works, it always uses the least blocking combination possible

lunar sleet
#

collision is a 2 way street

sick sky
#

thanks for opening my eyes

waxen quarry
jaunty coral
tropic peak
#

items/BP's

sick sky
tropic peak
#

oh custom object types.. never heard about them

waxen quarry
hoary junco
#

whenever you want to have stats on a character, like max health, strength, intelligence, max mana etc.. what's the best way to store those on a character? Would a "stats" component with a bunch of variables attached to it that I can then put on the character to grant it stats be a decent idea? especially since I could then apply that component to NPCs too? or are there other more efficient ways of doing it that I'm unaware of?

waxen quarry
sick sky
#

for eg; if you have a door
attach a box collider to the moving part, and set the object type to "Usable" for eg.

then when you do your linetrace logic, you would linetrace for object type "Usable"

tropic peak
#

ah ok, that makes sense. thanks

sick sky
#

then you would call a interface "use"

#

this has great modularity

waxen quarry
#

Personally I would argue against using an interface when using a component.

sick sky
#

if the logic is inside the actor i dont see why not using an interface

jaunty coral
hoary junco
sick sky
#

dont look at ytb videos, most of them have bad habits and dont really explain why they do X.

try by your own and ask your questions here :)

waxen quarry
hoary junco
#

the whole linetrace interact is what I have set up for my own interaction system

sick sky
hoary junco
sick sky
#

but yeah you can apply the custom object type to whatever suits for you

hoary junco
#

that way things you don't want to interact with will be ignored by the line trace because it won't block that channel but the objects you do want to block then they block that channel and it doesn't interfere with physics collisions or anything

hoary junco
sick sky
#

they are called Attributes

hoary junco
# sick sky use GAS

don't know what GAS is, never used it, and from everything that's been described to me quite frankly it scares me...

sick sky
hoary junco
sick sky
#

Then maybe try again or go for your stats component

vivid quarry
#

Is there any reason one could think of why my left mouse click and right trigger are not responding to binds on Enhanced Input? I have bound plenty of actions to other buttons in all sorts of ways before so the system isn't new to me, but left mouse and R2 just do not respond. I have them set to consume lower priority inputs.

hoary junco
vivid quarry
hoary junco
dreamy mountain
#

hey, how would i set something in these object reference values?

#

nothing appears

vivid quarry
#

Which they are not if they are L mouse or R2, but they are for any other buttons

hoary junco
vivid quarry
#

I have a weird suspicion it's something left over from the default FPS template with that stupid gun, but I can't think of what would be referencing it since I already changed the relevant things in my mapping context and game mode to refer to my own input mapping context

hoary junco
sick sky
pastel skiff
#

how do i cast an actor to my main charachter?

hoary junco
pastel skiff
#

the thing plugged to the object is a virable set up in the charachter

#

all i get is this error message

hoary junco
#

what are you trying to achieve here with the revolver? like why are you casting to it to begin with?

pastel skiff
hoary junco
#

and where is the revolver prior to this event being triggered, does it exist in the world already?

pastel skiff
#

yes it does exist

hoary junco
#

and is there only one of these? Because you could always just do get actor of class

pastel skiff
#

yes there is only one revolver in the level

hoary junco
#

so instead of casting do get actor of class

pastel skiff
hoary junco
hoary junco
pastel skiff
#

the actor class is selceted

pastel skiff
hoary junco
#

I put a custom event on my box blueprint called test and then set this up in a different blueprint

#

worked fine

pastel skiff
#

👍

tropic peak
hoary junco
# pastel skiff ahhh

if you want to future proof it against issues put an "is valid" node between those 2 nodes I just showed you and have the custom action come out of the valid execution pin

hoary junco
pastel skiff
hoary junco
tropic peak
#

👍

pastel skiff
#

nveremind it was jsut the collision problem

somber elbow
#

Hey guys!

flat coral
#

How do I just straight concatenate two arrays of the same type? Surely there must be a way that doesn't involve a for-each... right?

hoary junco
somber elbow
#

Guys, I have a platform which float from left to right back and forth from -400 to 400. But these platform start almost from one point - from zero. So when i pose several platforms they move simultaneously. How can I add random to that starting points? So for exapmle one platform should start moving from 0170, another one from 30 and another one from 260?

waxen quarry
flat coral
#

This, but as a generic library function

hoary junco
somber elbow
waxen quarry
hoary junco
somber elbow
#

I tried to add some random values but after that platforms started flickering

hoary junco
somber elbow
#

on the first pic thats exactly what i need but those platforms are not moving

hoary junco
somber elbow
#

oh, let me try

waxen quarry
somber elbow
waxen quarry
somber elbow
#

the timeline node basicly has a curve from 400 to -400 in 3 seconds

waxen quarry
#

Is there any reason your platforms start on the left everytime and not in a random location

hoary junco
somber elbow
#

no

#

i mean yes

#

but idea is that when i have many plaforms all of them will start moving from Y 400

waxen quarry
#

Alpha on a lerp takes in the values between 0 and 1

hoary junco
somber elbow
hoary junco
# somber elbow

ok instead of the values of the timeline being 400 and -400, set them to 1 and 0

#

like have it start at one and curve down to 0

gray lantern
#

How many entries can/should data tables have? can I have a data table with like 10,000 entries?

#

I guess I should just try

waxen quarry
#

Or use a Normalize To Range node

hoary junco
#

doesn't affect the game at all, it's just the engine itself is really unoptimised when it comes to data tables

somber elbow
gray lantern
#

This is all engine based stuff for tracking assets editor only @hoary junco

#

hard to explain context

#

but literally I don't ahve a game im making

somber elbow
hoary junco
gray lantern
#

And it's not going into some oneelse game, just weird tooling stuff

hoary junco
#

so once you reach 1 you're at the end of the lerp and 0 is the beginning of the lerp

somber elbow
#

i will try now

#

Here is the idea. When there are many platforms spawned most of them move uniformly

hoary junco
gray lantern
#

Hmmmm lame

hoary junco
#

I know... I had an item stat system put in a data table and it would take 10 minutes for the data table to let me put anything in whenever I tried to add a new line once I got past 150+ entries

#

and it would regularly crash

gray lantern
#

how is a data asset different?

#

rip

hoary junco
gray lantern
#

heh

#

I'll look into that

#

basically I have a bunch of assets im making and need to track/update certain thing in a table would be super helpful

hoary junco
#

and save the assets in their respective folders

gray lantern
#

I've done that but what im building needs something abit different DT's seemed like a good fit but i'll investigate other things

somber elbow
#

Hmm i made my curve 0 to 1 and connected it to the lerp node. A is random value from -400 to 400 which supposed to be starting point. And B is 400 which is final point. For some reason when i pres play i got ugly platform flickering. What did i do wrong?

somber elbow
#

They have to move normally to -400 but just from different Y locations

hoary junco
waxen quarry
hoary junco
#

because it seems to be generating a new random value every frame in this current config

hoary junco
#

so much less moving parts

waxen quarry
#

Probably but at this point explaining isnt helping. You suggest doing a lerp node, ill hook that up rq

somber elbow
waxen quarry
#

The curve values at from -1 to 1 to -1

hoary junco
waxen quarry
#

Yea and the timelines will give you more adjustment if you want varying speeds during the timeline

somber elbow
#

I'm not sure I did it right.

#

The platforms are moving in a same way

#

i think the problem is here

lofty rapids
#

what are you trying to do ? move the platforms up and down ?

#

or side to side actually

hoary junco
#

get a bunch of platforms to move from side to side but each one start from a random position within the movement range

lofty rapids
#

i feal like they are all at the same y with that code

somber elbow
#

thats exactly what is happening

lofty rapids
#

so on begin play set the random

#

and on tick move it back and forth

#

or have an event that randomizes the start so you can call it whenever you want

somber elbow
#

and im trying to randomize somehow their starting points

lofty rapids
#

get a random number in range from min to max

#

and apply that amount to the y

#

if it initially starts at 0 ?

#

meaning do they spawn at 0 ?

#

you could put the start logic in the spawn

#

and the movement on tick, you can just flip a boolean like goingRight

#

if it's false go left, true go right, and if your platform hits the min/max flip it accordingly

somber elbow
#

well, in the beginning it was like that. Kinda bootlegged randomization

#

but it worked and platforms moved back and forth

waxen quarry
somber elbow
#

here is -400 to 400. On previose one we discussed it is 0 to 1 to work with lerp

lofty rapids
#

you could also use a timer to switch it back and forth

waxen quarry
#

0, -1
1.5, 1
3, -1

lofty rapids
#

but i would move it on tick or timer

waxen quarry
#

set these points in ur timeline

#

Timeline points:
0, -1
1.5, 1
3, -1

lofty rapids
#

and when you hit the y max/min set it to go the opposite direction

#

sets its initial y random on spawn

#

from min to max

#

i also do speed for things going back and forth so they are not moving in the same amount

#

looks weird that way, adding a bit of variance in the speed helps make them look more unique even if it's just a small amount

maiden wadi
#

Any reason you just just do it on tick with a bit of simple sine math? Adding a whole timeline component to pingpong seems like overkill.

waxen quarry
#

I assume for more flexibility in the platform movement

somber elbow
#

Mike offered me a solution using lerp. I'm trying it, but it doesn't seem to work. Where is the error here? I mean I think it's in lerp and that's why all platforms move the same way.

maiden wadi
#

There's no real flexibility change. You specify a distance max. Sine goes from -1 to 1. Timeline goes from -1 to 1.

waxen quarry
#

Sure there is, you can make the platform movement unique and varied over the distance

somber elbow
lofty rapids
somber elbow
#

what should i set there?

#

i mean i do understand that the issue is there

#

just not sure what exactly i should connect

waxen quarry
#

For mikes solution your timeline needs to be 0 and greater. No negatives. And between 0 and 1. and add actor start location to the value after lerp

lofty rapids
#

i use tick it's np

#

i used speed

waxen quarry
#

Ontick is cleanest. You could still use a curve if you wanted variations in the movement.

lofty rapids
#

if you just want a smooth back and forth tick or timer

#

where you set the boundaries so it goes back and forth

#

you would have to get the half width of a platform because your starting point is most likely the center

somber elbow
#

Thank you guys!!!!

lofty rapids
#

is that procedural ?

#

nice 👍

somber elbow
waxen quarry
#

Dont even use the branches, use lerp and multiply by -1 when u hit the boundary

somber elbow
#

Ok, this is what I found on youtube where a guy was explaining how to move the platform.

steel star
#

if i have a bp class of type static mesh with default values setup, and i want to add it as a component to another bp class of type actor, do i have to do that via construction script? because i am not seeing that named bp class, static mesh component, in the add component dropdown

#

uh specifically the add component dropdown within the bp designer, with the actor type bp open

waxen quarry
#

this?

somber elbow
#

at least what i have now is way better that i hugew enormous tree of branches i had before

waxen quarry
#

Can always refine it later down the road

steel star
waxen quarry
steel star
#

ship_carrier is an actor

#

ship_carrier_mesh is a static mesh component

#

or thats what i thought it was

waxen quarry
#

Add a ChildActor component and set its class in the properties. Careful with over using this tho.

steel star
#

actually it just says "static mesh" um i guess its actually a mesh asset

#

so that answers my question actually

#

about why im not seeing it

flat coral
#

Is there a way to tell, from a given location, what percent of a given actor is visible? This is for basically taking light-based damage from a distant light source. Stick your toe out, you're 1% visible, so you take 1% of max damage.

waxen quarry
steel star
#

not likely to no. but i do have sockets defined

waxen quarry
#

Im not sure what you are asking, sorry lol

steel star
#

i have figured it out, thanks for being sounding board anyway. might have followup in a min

waxen quarry
flat coral
#

I just wanted to make sure there wasn't, like, a system for this or any prior art, before I did all that work

waxen quarry
#

Good question I would like to know as well

steel star
maiden wadi
#

There's nothing that is gameplay usable. To get the percentage of a visible mesh you would need renderthread access to do a costly check against vertexes. Which you also should not rely on as it's not on the gamethread. And would require some fairly in depth C++.

flat coral
#

That's what I was afraid of

steel star
#

perhaps search some about "unreal engine occlusion queries" they exactly give you the % of pixels rendered that are not occluded, for a given draw call or set of them

#

occlusion queries are nearly free

#

idk if they are hooked up to be easily accessible in UE or not

#

but its something supported by all gpus

flat coral
#

The good news is it doesn't need to be that accurate. It's a first person game so there's some slop on where the player's "body" actually is. The important part is being able to "peek" into damage areas and take a little damage, as a warning that you'll get fucked up if you go further.

maiden wadi
#

Nearly free isn't free enough. Even occlusion culling can very easily get out of hand on some platforms with some map designs. It can cost a few milliseconds on some scenes.

flat coral
#

Maybe I can just fake it with interpto lol

steel star
#

occlusion culling is its own process and happens on the cpu

#

or often does

#

occlusion queries are very very cheap, and only a problem if you block for the result on the same frame

waxen quarry
#

Sounds like the practical answer is just to perform a few line traces hehe

flat coral
#

Ya, though actually mapping from that to damage amount is non-trivial.

steel star
#

doing multiple raycasts on the cpa is going to be very inaccurate and far more expensive

#

again i dont know how occlusion queries are exposed in ue

somber elbow
# waxen quarry Good question I would like to know as well

The only thing is now platfoms go way too far even coordinates 400 and - 400 were mentioned. I placed two lines crossing pink ground to show 400 and - 400 range. And it looks like its just adding something and it tornes out that the limits on Y are even higher than just 400 and -400

steel star
#

but they ARE what you want here

somber elbow
#

it looks like -520 and 520 something like that

flat coral
#

If, say, the front-left-top, back-left-top, and front-left-bottom vertices are visible, that implies a triangular visible area which etc etc.

steel star
flat coral
#

And it's not.

waxen quarry
somber elbow
#

I believe its because it stores not 0 0 0 coordinates

tropic peak
#

I feel silly asking for such small things but everybody starts somewhere.. I have created a parent class for interactable items BP_ItemParent, and inside my BP_Player I want to call a custom event from the **BP_ItemParent ** - DestroyItem. what is wrong with my bps'?

flat coral
#

It's also tough because the "viewer" in this case is literally an astronomical distance away

lofty rapids
somber elbow
#

transparent boxes are the spawn points

waxen quarry
#

Yeah thats the part we cant see is how you are placing the platforms. Try making the LERP range 0 - 400

lofty rapids
somber elbow
#

yep

#

so im trying to compensate it somehow.

lofty rapids
#

you could probably use a large number maybe clamp it

#

but everything will be relative to it's location on spawn, you could make it relative to center but then they would all probably be going in the same movement

waxen quarry
#

Do the platforms always start on the far left side?

somber elbow
#

so like Engage said its just adding those amounts to my movement

lofty rapids
#

it's basing the left right off that pivot point

somber elbow
#

and since for example it was spawned in Y -60 it it goes -460

waxen quarry
#

The original function will have it go -400 left and 400 right of the spawn location

somber elbow
#

if i add clamp then the platform goes to 400, wait some time and then go back and that way i lose that sooth transition between going back and forth

waxen quarry
#

change these numbers as u see fit

#

is 800 the maximum bounds ?

somber elbow
#

800 units you mean?

waxen quarry
#

width yea

somber elbow
#

the bounds in lerp right now are -400 to 400

waxen quarry
#

I mean your spawn range is it always between -400 and 400?

somber elbow
#

yep

somber elbow
#

but not sure how

#

clamp doesnt wort as it should

waxen quarry
#

Bad questions, im confused why this was a problem in the first case. Why do you need the plats to start at a random time in the timeline if you are just going to spawn them in random locations to begin with?

somber elbow
#

nope i dont need them tho be spawned at a eandom time. They are spawned in random positions

waxen quarry
somber elbow
#

no

#

i mean the center of level yes its 0

#

but the platform could be spawned in te range Y -400 to 400

waxen quarry
#

Some kind of sidescroller?

somber elbow
#

nah

#

just doodlejump clone in educational purposes

waxen quarry
#

Spawn relative to what tho? World coord = 0 ?

somber elbow
chrome crag
#

I made a fishing game and in the fishingrod BP i have a rod, cable (fishingline) and a lure. It works so I can cast and return t the socket on command, however the cable component acts a little funny and it goes through my landscape sometimes and appears to visually not be connected after I cast it (I use a physics constrant).
Any ideas?

somber elbow
#

the platforms spawn in those bounding boxes

waxen quarry
#

Is the center line on the Y always 0 tho?

somber elbow
#

These platforms come to 400 or -400 and wait for a while while time mentioned in the timeline is over then they go back. So I got that idling which is not good and i loose that smooth transition between going back and forth

somber elbow
waxen quarry
high iris
#

What is the least effort way of porting some bp functionality from one blueprint to another when doing some refactoring? Specifically when that logic relies on a bunch of local variables. Right now I end up having to copy the variables over one by one, then copy the logic over, but I'm wondering if there's a way to have it somehow infer that it should be copying all of the dependencies automatically for me as well? Or is the manual slightly laborious approach the only option at this point?

I suppose what I'm looking for is some sort of smart refactoring/move functionality within blueprints like what you might see in a code IDE.

somber elbow
waxen quarry
somber elbow
#

you saved my day

#

thats all i have

waxen quarry
#

haha glad its working out

high iris
somber elbow
#

i have to understand what you made there that it makes it work

waxen quarry
#

It just calculates the amount of space from each side based on the relative position you are.

tropic peak
#

I'm trying to destroy an actor/item (for education purposes). I have implemented item interface, and I'm trying to call a custom event (destroyItem) that's located in BP_ItemParent. I'm trying to call it from BP_Player. Unfortunately I'm not referencing something properly as I keep getting the "accessed none trying to read property item) on the DestroyItem node.

Please help. I know it's a simple thing for many of you but I've been stuck on this for about two hours and I'm just walking in circles.

somber elbow
tropic peak
#

I don't think it is

faint pasture
#

Think about it

tropic peak
#

yeah the problem is I don't know how to do it. Basically there's a part of the blueprint that's responsible for displaing a widget on overlap with the player object

faint pasture
#

WHICH item should be destroyed?

tropic peak
#

and if I put the "destroy part" at the end of the overlap it works

#

but when I want to invoke it by pressing E

#

nothing happens

faint pasture
#

because you know which item to destroy

#

its the one you overlapped

#

Set "Item" on overlap

#

Overlap -> Item is TheThingWeJustOverlapped
E -> destroy Item

lofty rapids
#

and invalidate it when you end overlap

#

then check is valid

tropic peak
#

yeah, but how can I get that "overlapped component" and put it in the destroy function?

faint pasture
#

the pawn or the item?

tropic peak
#

it's on the item

faint pasture
#

disregarding whether or not thats a good idea, the item needs to tell the overlapping character "hey, your Item is me"

#

OtherActor -> cast to YourCharacterClass -> set its Item = self

waxen quarry
faint pasture
#

Character should be detecting the overlap tho

tropic peak
#

this bit confuses me

faint pasture
tropic peak
#

is component something in the blueprint "hierarchy" and actor is something in the "level"?

faint pasture
#

your code is all confused

#

I would do it all in the pawn, the items don't need to be doing any of this

somber elbow
#

@waxen quarry thank you so much for help dude

faint pasture
#

the PAWN can do it like this:
Event Begin Overlap -> cast OtherActor to ItemBaseClass -> is it one? -> set Item -> tell the Item to show its widget or whatever.
E -> if Item is valid -> destroy it

tropic peak
#

I wanted to have an item parent so all items can be picked up and when approached they display a text message above it

faint pasture
#

yes, and you can still do that from the character

mild ibex
#

So the media player right. Why doesnt stop or close work? Only play / pause is working for me even with the proper references

faint pasture
#

who's calling the shots here, the item or the character?

surreal bridge
#

I'm still having issues with the widget interaction.

I just made a widget that has a canvas panel and a button and set the button to print text when its pressed, but when I try to click it in world nothing happens

tropic peak
#

well the character but how can I define something as an item without it having a parent, how other items will know what to display if I want them to or how to act

faint pasture
#

read what i wrote

#

The item can still have the show/hide UI functionality

#

but it should not be telling the character that it's the selected item. Let character decide that

tropic peak
#

ok :/

somber elbow
#

What is the best solution to build a logic of picking random platform from a library? For example, i have a library with 5 types of platforms. And i need 1st type of platform to spawn with 60% chance, 2nd type with 20% chance etc. Thats how i made it(just gonna work in this direction), but i believe there is a better way to solve this. Just drop me an idea and i will google it

faint pasture
#

that's not the problem

#

its the character knowing what item it cares about at any given time

#

the character should decide that

#

the item should just show/hide UI when told to

tropic peak
#

okay, I'll try to add overlap events in the character and work from there

waxen quarry
faint pasture
#

Sum weights, roll random number up to sum, add up weights until you cross that random number, last one is the choice

#

something like that

waxen quarry
#

Weighted random selector would be the better solution, but for his purposes he needs something simple and easy.

faint pasture
#

ok so make array with duplicates as weights

#

shuffle array

#

pick first element

waxen quarry
#

oh yea great idea

lofty rapids
#

weighted random not too hard

#

easier than i thought it would be

faint pasture
#

1 1 1 1 1 1 2 2 for your 60% chance of 1 and 20% chance of 2

#

shuffle that array, pick the top element

waxen quarry
#

sure yea but we spent 5hrs today making a platform move left and right, start small id say lol

tropic peak
faint pasture
#

thats what casting is

#

is this thing an instance of ClassWe'reCastingTo?

#

is OtherActor a BaseItem?

waxen quarry
faint pasture
waxen quarry
somber elbow
#

will figure out

#

At least I have a starting point.

waxen quarry
#

How many times you add a platform to that array will increase/decrease the chance of it getting picked.

somber elbow
#

but i believe its the easiest one

tropic peak
#

that worked, thanks @faint pasture

waxen quarry
#

Ive seen it done in professional projects. Its an easy solution to a small problem.

somber elbow
#

i will get back to that solution if i wont be able to tackle that method posted above

tropic peak
#

referencing things and knowing where to put what (which blueprint/pawn/actor) is super difficult for me.

faint pasture
#

When in doubt, just put the data and the code modifying it where it makes sense

#

it makes sense that Character holds SelectedItem and sets SelectedItem

#

in most cases

#

there are some cases where something else might want to clear SelectedItem

#

not many where other things should set it tho

tropic peak
#

yeah I got fixed on having everything item related in the item BP and just calling it from other places

#

I guess it's practice

faint pasture
#

The items job is to respond to being selected (show/hide UI), and respond to being used or activated

steel star
#

ummm. well first off, its not inherited? this is the base bp class and the mesh component and the widget component are both from it. secondly, i DO need to have a known socket of name "center" here regardless of the specific mesh currently assigned

tropic peak
#

interesting stuff happens when you have two items that are overlapping

#

but lets leave it for now I guess

frosty heron
#

@faint pasture can I get your opinion. Why would some people use UObjects for their item? Can't an inventory and item simply be represented by an array of struct?

#

My question is I am not sure how object is used in this context.

waxen quarry
#

Seems awful

dawn gazelle
waxen quarry
#

Thats what data assets are for

frosty heron
#

Hmmm

steel star
frosty heron
#

Well I can pull out default info from DT or DA. But what do we actually do with the object

#

Right now in my old game, using dynamic combat system, it simply have an array of structs for the inventory.

waxen quarry
#

Construct object to make an instance

frosty heron
#

No object ref at all

waxen quarry
frosty heron
#

Are you able to give an overview on how the system go?

waxen quarry
#

Using plain ole UObjects is just not a good idea when DataAssets exist. Use those and dont question any further 😆

frosty heron
#

Well my confusion derives from the fact people use DA and Uobjects hand to hand.

#

So when do the uObject gets created and what is it use for.

waxen quarry
#

UObject is a low level type of object. UClass -> UObject -> DataAsset, Actor, etc.

#

Just like you can make an actor, you can make a uobject. Its bare bones. Low footprint.

frosty heron
#

I know that, my question is the purpose of Uobject in an inventory system.

#

I see people have a uobject inside their item DA

waxen quarry
#

Oh my bad, idk the purpose thats up to whoever coded it.

#

Its a class like any other. You can create instances of it that hold variables and functions.

frosty heron
#

Yeah but it felt like an extra steps and I am still not sure of the purpose when the item can be simply represented with an array of structs. Without the need to construct a new object and committing to any assignment

waxen quarry
#

It might be used in cases where you want to specify a type of object but that object could be anything really.

frosty heron
#

I'm sure they have their reason and this is what I'm trying to figure

waxen quarry
#

Whats the name of the object variable?

dreamy kindle
#

instead of planning ahead of what objects they will use they just make it a uobject and do what they want later down the line

frosty heron
#

Hmm perhaps. Thanks for the input. I will try to skim some docs or sample projects before I jump into my own inventory system.

frosty heron
#

I am ser

waxen quarry
#

The the variable named "Item" or something

dreamy kindle
#

oh okay, in that case all you have to do is make a base object class of whatever ur inv will use then create an array and store that base class type in it and then the rest is ui based for ur inventory

#

thats basically all an inventory system is, just an array

#

Does anyone know this problem im having?
I am using Advanced Sessions with steam and I am trying to get proximity voice to work, I have done lots of things and this is the closest I have been to getting proximity to work.

the picture is how i replicate/use my voiptalker and settings

The way I use push to talk is in the player controller which is just a simple execute console command ToggleSpeaking 1 I have also tested using Start Networked Voice and both give the same result but my issue now is both players can talk and everything works with attenuation but after a few seconds or a minute some sort of audio stutter or something happens like its been garbage collected and then the attenuation STOPS and becomes global. I have no clue if this is a bug, I am using Unreal engine 5.2.1

Please help if anyone knows anything about attenuation just randomly breaking like this.

steel star
#

it seems like my construction script is not triggering when i click play, for actors that i have in the level already, though it is for ones i spawn during gameplay

steel star
#

yes

#

thats what im basing this on

frosty heron
#

Sanity check, drop the target actor into the level again.

#

What's up with your socket problem anyway.

steel star
#

wait maybe i see it now. bunch of garbagte in output

frosty heron
#

What are you trying to do.

steel star
#

sigh why is there no clear log

frosty heron
#

I would just print one to the screen for quick check.

waxen quarry
#

I think construction scripts run when you compile the blueprint or place them in a level. Which is different from being spawned. Makes sense since those changes are meant to be done when creating the instance, like those in a level.

steel star
#

i mean, that sounds like a terrible workflow, if you have to manually recreate any in-level actors if you change a construction script

frosty heron
#

You dont

waxen quarry
#

Its probably just per instance in a level tho.

#

Move the actor around in editor and see if it prints string. If not try to make a physical change in the components list or something.

steel star
#

in any case, i am not seeing "ship_carrier" but

frosty heron
#

Are you trying to do it in child class too? Make sure to call parent/super

steel star
#

this is the base class ship_base

#

neither ship_fighter nor ship_carrier have anything in their construction script

frosty heron
#

Or something like that

#

In your ship fighter and ship carrier

steel star
#

no change

frosty heron
#

Show code

steel star
#

also fighter is getting called already

waxen quarry
#

I dont think youre going to see Print string in-editor until you play the game.

frosty heron
#

So no issue with fighter? Show the carrier construction script

steel star
frosty heron
#

Even moving the actor in editor should run it afaik

#

Or pressing compile in bp

steel star
waxen quarry
#

I just tested, it does not print string in editor. However the construction script runs every time you compile, or make any change to the actor in a level. Even moving it around.

regal iron
#

im creating my own combat framework and am encountering an issue where when i roll the characters sword leaves his hand and then returns upon rolling. cant seem to figure out if its collision based or how to fix it

steel star
#

well, that doesn't work then, because i need the carrier class to assign its overriden mesh prior to running the construction script

waxen quarry
#

And instances in level do not run the construction script on play either.

regal iron
#

any help would be greatly appreciated

waxen quarry
frosty heron
#

Done that in construction script too

steel star
frosty heron
#

Try debugging?

waxen quarry
#

But in-level its not going to run outside of changing it in editor.

frosty heron
#

Only place carrier in the level and add break point

steel star
#

i have a duplicate static mesh component, because i need to specify a transparancy render priority for this second draw

waxen quarry
#

Cant do it on beginplay?

steel star
#

and rather than having to now override and match the mesh between the two, for every subclass

#

i thought id automate it in base class

steel star
#

that is how i had it setup before

waxen quarry
#

I mean you could do both in a single function

steel star
#

suppose ill just set its visibility in editor to false or something, well. theres hidden in game, prob not for in editor

frosty heron
#

Sounds like a bandaid

steel star
#

i agree, but then what isnt?

frosty heron
#

Well setting the skel mesh comp in construction script should just work.

steel star
#

its not a skel mesh comp, just a static mesh

frosty heron
#

I would try to debug and see what happend to your cruise bp

waxen quarry
#

Its a type of effect you are going for tho right?

steel star
#

so three things need to happen

frosty heron
#

Same thing, construction script. Get static mesh comp set static mesh

steel star
#

the subclass which is a specific real ship type, in its bp will set the value of its static mesh component named "mesh" to a mesh asset

#

then the static mesh component named overlay needs to be assigned the same mesh

#

then the widget components named .. the 3 things .. need to be attached to the mesh socket named "Center"

#

im not seeing either of those 2 things done

waxen quarry
#

Is there any reason this all cannot be done in-editor tho?

#

Im guessing that you have a single ship type but multiple 'skins' for it?

#

Let me ask another question. Why do you set the mesh during construction instead of setting it directly in the properties?

steel star
#

the big squished cylinders are carriers

#

the squished cones are fighters

#

the have different everything, except all ships (ships_base) do have a static mesh

#

and the reticules used for indicating selection

#

note that the carriers reticle are showing as if selected when they should not

#

and started in that state, because the construction script, which calls clearselection and affects the visibility state of those ret.components is not being called

#

anyway ill shuffle some stuff to beginplay since apparently (construction script) it doesn't even get called at runtime when you load a level?

waxen quarry
#

Ok but that type of code probably shouldnt be in the construction script.

steel star
#

which is absolutely stupid if true

frosty heron
#

Depends, if you need the SM info from somewhere then construction script is fine.

But if u already know what mesh to assign then just edit the comp right away.

#

If your game is data driven, you can set it in construction script.

waxen quarry
#

From what ive observed is the construction script runs anytime you move or change an actor placed in-level. But does not run when you play the game. Its meant to be a period of time between the object being created and spawned.

steel star
#

yea the thing is i only have the carriers in the scene so i can test

#

i have no plan to actually have the final game loading levels with already allocated ships

#

but w/e question answered i suppose

waxen quarry
#

I mean you could place the code in a function and run the function on construct and beginplay lol

steel star
#

yea

#

for bp classes without C++ code do they call parent::beginplay before or after their own?

frosty heron
#

Everything is cpp. Blueprint node is just cpp code wrapped and exposed to bp

frosty heron
#

If you want to call the super first, call it right away on begin play

#

If you want to call it later, you can do stuff before the call to parent node

frosty heron
#

Construction script runs in the game. Just tested it

waxen quarry
frosty heron
#

@steel star

waxen quarry
frosty heron
#

@waxen quarry

steel star
#

ship_carrier is not a C++ type, its base class is ship_base which also isnt a C++ type, its base class is AShip which IS a C++ type. in AShip::beginPlay i call Super::beginPlay at the top of the method, therefore, its going to happen before -- the question is, what order is it for ship_carrier::beginPlayer and ship_base::beginplay

frosty heron
steel star
frosty heron
#

I didn't read that part, will try to place it in the level now.

waxen quarry
#

Yeah spawned it runs fine.

frosty heron
steel star
#

its not the only thing i need to worry about, because i have dependencies between the two

#

also the same question, but for construction script

frosty heron
#

you can do stuff before calling the super

steel star
#

in the bp i can?

turbid bison
#

super is just a function

steel star
#

in C++ i know i can, because calling the super is a line in code

turbid bison
#

in bp too

#

you can put code before or after

#

well, nodes

frosty heron
#

do something before call to parent

turbid bison
#

not sure if calling parent is even mandatory

steel star
#

ok. but isnt it going to call parent regardless? and when does that occur, before or after

#

and if you call it manually, does that override the normal placement or cause a second call

turbid bison
#

Parent:function is just a node as any other one

frosty heron
waxen quarry
#

Dont need to call parent if you dont want the parent to run. Its not mandatory but good practice.

frosty heron
#

There are times when you have to call to parent

steel star
#

the point of having a base class that has this code is to have it occur for all subclasses

frosty heron
#

especially when using other people codes where the parent initialise stuff.

waxen quarry
#

Ye I always call it because its bite me in the ass before lol

frosty heron
#

in bp

#

if u want it to behave as the base class, don't drop your begin play there

steel star
#

ok so your saying if i override it, its up to me to call the parent

frosty heron
#

Yes

steel star
#

that answers my question

waxen quarry
#

Goes for events and functions too

faint pasture
frosty heron
#

@waxen quarry You are right, it doesn't run if the actor is pre-placed

faint pasture
#

I prefer structs but YMMV

frosty heron
turbid bison
#

if you want a behavior for your item, i'd say that a UObject is better ?

frosty heron
#

always find it difficult to wrap my head around something.

dawn gazelle
#

Why would you want to. That sounds painful.

frosty heron
waxen quarry
#

I would make items a DA and have an optional UObject that can be created anytime I do something with it. Like start a decay timer when its added to an inventory and such...

frosty heron
#

🤔

turbid bison
#

well, let's say that your inventory contains, i dunno, a shotgun. Do you store a struct with just data, and spawn an actor when the player get the gun ouf of its inventory ? or do you store the shotgun object directly ?

waxen quarry
#

There value in separating what is an Item and what is an ItemType. The item might be the real actor class. The ItemType might be what you use throughout your code base to reference the type of item.

#

and the ItemType could store a reference to the Item class.

vivid quarry
#

Is there an inbuilt way to stop a player's animation montage from being interrupted? Of course I can just set a bool on start that is set to false "on completed" but just wondering if there is any tidier way

frosty heron
#

You can probably create your own Play Montage Function which adds a check before playing the montage. The check can be what ever you want

faint pasture
frosty heron
#

eg if there is active montage, if some boolean is set, yada2

turbid bison
#

hmm. Ok i get the added value of that I guess @waxen quarry . first, it makes it easier to serialize the inventory I guess

vivid quarry
frosty heron
#

Well, how would you guys handle usage on the items?
Is that when uObject comes into play?
Populate the Item Data, Create new Object for a sword.
If Player use Sword Item -> Get it's UObject, Run the Use function?

waxen quarry
#

Then use ItemData as the type for anything. Spawning, inventory etc

turbid bison
#

nice. Thanks for the info

#

your item data is just a blueprint with a parent 'PrimaryDataAsset' ?

waxen quarry
#

To create instances of it you will find it here:

steel star
#

@waxen quarry @frosty heron Btw, I have found that an explicit call to parent begin play is required even if you aren't otherwise overloading to do anything -- if you want it to be called for things placed in the level and not just when spawned.

#

Ok. Actually you CAN delete the begin play node entirely. I thought it was always there.

#

So i effectively did have it overriden without meaning to.

steel star
#

well, i didn't drop it there

#

there is one automatically when you create a bp class

#

.. at least sometimes. but yea i get it now. also the construction script node you really cannot delete

#

hence my confusion

verbal girder
#

Heya folks, having a bit of a trouble with tags; feels like I'm missing something very basic.
Here is a blueprint, breakpoint'd, at the moment I'm checking for tags.

You can see that the target, when viewed, has an array called Tags that contains "Player". Then, the get Tags node returns an empty array.

Seems... odd

steel star
#

i guess make sure the target of 'get tags' is the same object

verbal girder
#

That's the same node being inspected there

#

left side is the second picture, right side is the third picture, it's like the variable when going through "Get" becomes empty

maiden wadi
#

What is the issue you're trying to debug?

verbal girder
#

Get Tags is empty when asked for, but when inspected it is not

maiden wadi
#

Cause the blueprint debugger is a pile of scrap. But what is the issue that led you to try to debug this?

verbal girder
#

I am trying to get the tags from the target to compare to

#

to have gameplay implications, I can explain the whole context but it's this single node not giving me the tags on the target that is the issue

steel star
#

put the breakpoint at the actual get tags node, i doubt inspecting the target pin's tags will show anything different than the nodes return value

verbal girder
#

You can't breakpoint a get node can you?

steel star
#

oh, idk?

verbal girder
steel star
#

hm guess you can't. anyway. you see what im trying to do though right? verify for 100% certain that the 'target' pin is the object with the tags

verbal girder
#

Er, I don't understand how I can do that any further than the actual inspection that I displayed above, mousing over the target pin which contains the object which I can scroll to the tags array and see that it has the tag that I want

steel star
#

your screenshots dont make the full situation very clear to me at all, but yes that sounds pretty conclusive

maiden wadi
#

Can you give a better overview of the logic and where the breakpoint is?

steel star
#

including the debug object

verbal girder
#

Sure, one sec

frosty heron
#

Show your entire function.

rotund barn
#

i can try to figure this out by myself (well have already been for 8 hours), but if someone has some time, i could use some help fixing my power up randomizer system. preferrably in a voice channel so i can screenshare, would be alot faster. it works but suddenly breaks. i can also post pictures, but would take quite many pics.

steel star
#

cant say i have time for that, but my immediate thought is: if the way it breaks could be attributed to the random itself being not very random, look into a replacement random number function instead of any ue stock rng

verbal girder
#

Here's the whole function

#

The context is that a projectile is calling who it's overlapping to make sure it's not shooting the same person who fired it

#

since it was doing so haha

steel star
#

where team is a tag i guess

verbal girder
#

Yeah basically

maiden wadi
#

Is there any reason you don't just check the instigator that you have set?

verbal girder
#

I planned to extend this so that the NPCs can shoot certain things also depending on the tag

#

but yeah it'd be essentialy team 1 can shoot team 2, team 2 can shoot team 1 or team 3

steel star
#

i believe there is a node for 'has tag' so you can do this with only one loop

verbal girder
#

Has tag does work in this context yup but it felt a little hard codey

#

or a little redundant since I would need to tell it what tags are acceptable in a different variable

steel star
#

nah, you get the bullet owner's tags, loop, for each does hit-actor have it?

#

soon as you hit yes, done

#

if you reach the end of the loop, there was not

rotund barn
verbal girder