#blueprint

1 messages · Page 195 of 1

frosty heron
#

0 is the start of the timeline, 1 is the end of the timeline

final berry
#

Nah probably just in need of a break 😉

shy aurora
#

your probably right ive been working on this since like 6am xd

final berry
#

Yea at some point you just don't see it anymore unless you take a step back 🙂

shy aurora
#

do you mean set the A B from 0 to 1?

#

because when i plug the door alpha into the alpha the value disappears

#

or would i need to change the value before plugging it in?

shy aurora
lunar sleet
#

What's with the 2 bools?

frosty heron
shy aurora
#

oh alright

shy aurora
devout tide
#

but if you dont want to wait for it to fully open/close before retriggering, remove that branch and variable completly

lunar sleet
#

ig if you don't want to be able to override current door activation you can keep it but eh

devout tide
#

your alpha should go to the lerp alpha, which should be a value from 0 to 1. That should then change the location properly from 0 to 550

lunar sleet
#

ok. which part are you unsure of ?

#

do you have a basic understanding of how Enhanced Input System works?

shy aurora
lunar sleet
ionic nacelle
lofty rapids
#

also what does your timeline look like ?

lofty rapids
#

ig you should just be able to hook up that line it should work

devout tide
#

just connect Door Alpha to alpha as the screenshot above

shy aurora
#

yeah ive done that and when i press my interact key nothing happens

devout tide
#

are you sure the interaction triggers then? Add a breakpoint to the interact event with f9 to check if it triggers, or alternatively a print string after the interact event too

final berry
devout tide
#

also make sure is door moving is set to false by default

finite dragon
#

Hi everyone! I'm new here so hopefully it's okay to ask this here. But I'm having some collision issues with UE4.27. Every VR Interactable collides with my pawn, despite setting custom collision presets. Maybe I'm overlooking something simple, but I cannot figure it out.

lunar sleet
shy aurora
ionic nacelle
# lunar sleet ok. which part are you unsure of ?

Not sure how to structure it, I have managed to make a cube spawn underneath the player, this is what Ive currently got, I feel like its something I should do in the ongoing section?
The ability is basically spawning a rising pillar underneath the player

lunar sleet
#

First off, Triggered fires on tick. So don't spawn an actor on Triggered

ionic nacelle
lunar sleet
#

Do you want the cube to spawn only when you initially press this input?

ionic nacelle
lunar sleet
# ionic nacelle Ah

To clarify, OnGoing fires when you're using a Hold trigger (needed alot less often than you'd think), in between the time the input was actuated and the time when the actuation threshold has elapsed). If you release the button before the actuation threshold has elapsed, Cancelled will fire, otherwise Triggered will begin firing. This doesn't apply to your situation, just for future ref.

lunar sleet
lunar sleet
ionic nacelle
ionic nacelle
lunar sleet
finite dragon
ionic nacelle
steady night
#

hey

#

i wanna spawn system in a circle around target :/

lunar sleet
lunar sleet
steady night
#

eqs ?

lunar sleet
#

EnvironmentQuerySystem.

lunar sleet
# ionic nacelle

Get the return value of the spawn actor and plug that into the get actor location (the one that’s sitting by itself on the left) since you’re trying to get the location of the cube

timber crystal
#

hello guys i want the controller back after i respawn the enemy he is not moven anymore ... waht is the right way?

#

maybe to not destroy?

ionic nacelle
lunar sleet
merry chasm
lunar sleet
#

After this you should watch your first hour in Unreal on the Epic portal and the bp live comms training pinned here so you can learn the basics @ionic nacelle

ionic nacelle
lunar sleet
ionic nacelle
#

I probably didnt describe it too well initially

lunar sleet
#

To clarify. Triggered fires on tick which means every frame. Which means if you’re running at 120fps, you will be adding 1 to your Z 120 times per second or so

#

And you can change that value as you see fit

faint pasture
#

that's assuming the pillar is some separate actor

#

Either way, you just need to tell something "hey the button is pressed" and "hey the button isn't pressed" and let it do the growing on tick.

ionic nacelle
lunar sleet
#

You get better at it over time

ionic nacelle
lunar sleet
#

Just a matter of getting used to bp, the rest is usual logic stuff

faint pasture
#

@ionic nacelleWhat component within what actor should be doing the growing?

#

is this a separate actor or part of your pawn?

ionic nacelle
faint pasture
#

the whole world?

#

the character?

#

a ice wall?

ionic nacelle
#

of a cube

faint pasture
#

is the cube part of the pawn or a separate actor?

#

when is it spawned

ionic nacelle
#

its a blueprint class actor

faint pasture
#

ok

#

does it always exist or is it spawned when you press the button?

ionic nacelle
#

spawns in once the action key is pressed

faint pasture
#

ok so do it like this

#

Button press -> line trace (to figure out where to put the cube actor thingy) -> spawn it -> save a ref to it -> set bGrowing to true on it
Button release -> if cubeactorthingyref is valid -> set bGrowing to false on it

Cube:
Tick -> if bGrowing -> Scale = Scale + MakeVector(0,0,Scale.Z + GrowthSpeedFloat * DeltaSeconds)

#

tune GrowthSpeedFloat to taste

#

It's that simple

lunar sleet
#

Are we growing this pillar or just moving it up?

faint pasture
#

he said growing but same idea

#

just modify position instead of scale if that's the case

ionic nacelle
faint pasture
#

The general form is the same for many things like this

Button down -> spawn the thing -> save a ref so you can talk to it later -> tell it something
Button up -> tell it something else

Thing.Tick
Do something based on some variable

faint pasture
#

GrowingCube will need 2 variables, bIsGrowing and GrowthSpeed

#

the character will need a variable MyCube to know who to talk to on button unpress

#

start with printing a string on button down and button up

ionic nacelle
faint pasture
#

idk 100% how it's done with the new input system but find the events that fire when button is down then when its up

#

use print strings

ionic nacelle
#

Giving it a whirl now, thanks for the help

dark drum
# ionic nacelle My main confusions are, "Button pressed" isnt something you can right-click and ...

What button... The thing is there are many. With the old system you could specify just a key press but this isn't a good way to handle it.

With enhanced inputs you create an 'input action' and then define what keys will trigger the action in an input context mapping. You can have multiple mappings that you can add and remove at runtime.

These input action events have a triggered which is triggered most ticks as well as having a started and completed pins.

wise ravine
#

Anyone know a handy tutorial for making an inventory/mine/drop/craft system?

frail onyx
#

I accidentally hit override on a function that i have on my child class? is there a way to get it back to how it was?

faint pasture
#

You have sort of 2 ways of thinking of any given item. The item existing in the world (dropped, held), and the item existing in the back end (stored in inventory)

#

Sort of like a dollar bill vs a dollar in your bank account

#

a dollar bill is a thing, a dollar in your bank accoutn is just a number.

wise ravine
faint pasture
#

I mean I think about it a little bit but I just start making the thing

#

What you need all depends on your requirements. Like Minecraft for example

#

a stored item is just an ID + a count

#
  • some other data for enchants or condition
wise ravine
#

So should I be doing that in unreal for my project?

#

or is there another way of approaching that

faint pasture
#

depends

#

I have no idea what you need from an item system

#

do you need items to be fungible or not is probably the first thing to think about

#

Like, is 20 apples just
ID : Apple
Count : 20

#

or do you need to think about individual apples

#

20 customized guns wouldn't just be
ID : Gun
Count : 20

#

that's not enough info

wise ravine
#

right

#

So there would be 2 different types of items

#

Back to your money anology, that could be a dollar bill and a 20 dollar bill

faint pasture
#

well IDK if you have customization or wear or other individual stats about an instance of an item or not

#

In my money analogy it'd be if you care about the serial number on the bill or not

#

do you care about individual items or is an item just identical to any other item of that type

wise ravine
#

depends on the item

#

thats why there would be 2 types of items

#

some of the items are 'special' and need more info, other are just repeatable and not unique

faint pasture
#

I would start with fully fungible items to begin with

#

a sword is a sword, a gun is a gun, an apple is an apple, and they are all just clones of each other

#

then your backend, the data structure to talk about what's stored or what can be dropped or what can be crafted is just

Thing
Count

#

Thing can be a data table row, just an ID, a data asset soft ref, whatever

#

hell I'd lose count to start with

#

just have an array of ThingID, whatever that is, and that's your inventory

#

You got 5 apples, you have
InventoryArray:
Apple
Apple
Apple
Apple
Apple

#

and if Apple is a data asset ref, then when you want to drop it, you can go like:
DropItem -> read data asset -> pull BP class out of it -> spawn that -> remove item

wise ravine
#

So an inventory is basically just a bunch of arrays

faint pasture
#

can be yeah.
It can just be a single array for the first draft

final berry
faint pasture
wise ravine
#

either that or I'll have to find a flexible tutorial that I can add to later on

#

not something unoptimized

faint pasture
#

Either way, you want some source data. You want either a data table or bunch of data assets that represent all the items in your game.

#

btw blueprints are data assets, you can just store BP class refs if you wanted to get real janky with it

#

MyItems:
BP_Apple
BP_Apple
BP_Apple

#

the general form is that the DEFINITION of an item, the thing that says what it is, is static. That's like the ID lists from Minecraft.
An inventory is just some way to say that you hold x number of x item ids

#

spawning an item in the world is just reading that id, getting to some spawnable thing from it, and spawning that

wise ravine
#

sorry it's gonnat take me a few minutes to fully understand this 😅

dark drum
hollow pecan
#

Hi all, Just a quick question, I think I am missing something stupid so wondering if any of you know what may be the problem. I am trying to move an object using a timeline on 1 axis relative to it's world location. For some reason (And no matter what axis I try to change) the object ends up in a completely different world space. But it goes there every time and idk why and it's killing me inside xD

dark drum
hollow pecan
#

A bit messy but just trying to get it working lol

#

I merged a bunch of actors together and then converted into a bp btw, Maybe this is part of the problem?

versed sun
#

Try this instead:
Dont set your actor location inside the timeline, that is just a headache to change
Make your track inside the timeline go from 0 to 1
Use a Lerp to change the desired location from Start to Goal

hollow pecan
#

Ah you legend! It works perfectly now thank you

shut quarry
#

Im passing in a variable which is an Actor class reference into a function that'll spawn the actor in the world at some later time. Should I use Soft or normal?

#

class reference

narrow pendant
#

Is it possible to call a function in a macro via a timer by function name?

I'm trying to call my function UpdateCharacterGravityDirection via a looping timer until a condition is reached (until current velocity equals target velocity). Once that condition is reached I want to clear the timer handle.

#

I was expecting this to keep calling the function but it only gets called once

faint pasture
#

gravity "happens" per frame, use tick

#

The only reason you wouldn't want to do it on tick is if you were using async physics, then you'd want to do it on whatever the async physics update event was

steady night
#

is it possible your map having to many actors so the ai cant move them ?=

hollow pecan
steady night
#

wdym ?

hollow pecan
#

Try pressing P in the editor when you have a nav mesh in the world, Shows the areas the AI can move

narrow pendant
# faint pasture Why do you want gravity to be applied on a timer? It'll literally be worse than...

I don't want to apply gravity per se, I'm making a movement system where I change the gravity direction (walk on different sides of a cube etc) I figured I'd only need to update the gravity direction until it has reached the goal direction. I don't need to update it always right?

so once the gravity direction has changed, gravity would still be applied on tick by the character movement component, I'm not fudging with that

steady night
#

some units arent moving..

#

ive been trying to bebugg for hours cant seem to find our why

steel star
#

could be literally anything

steady night
#

jepp

#

and one thing would be to many actos ? i dnno i havent tried with many actors before

#

altho its like 30-40 so that would be mindblowing if that was the cause

faint pasture
steel star
#

have you -actually- debugged your ai's blueprint? set the debug object to the one not moving

steady night
#

im doing it

#

trying atm

faint pasture
#

If you're gonna be anything near tick time just use tick.

narrow pendant
faint pasture
#

.01 is 100 hz

narrow pendant
faint pasture
#

For the specific scenario of choosing to either update or not update the direction of gravity, I would just tick, check something, then either do it or don't. Or just do it all the time.

hollow pecan
steel star
#

isnt there literally a 'tick enabled' call? i think

narrow pendant
steady night
#

@hollow pecan same actor same blueprint same settings exactly

faint pasture
#

It's probably faster to just always update the direction of gravity than to do that half of the time.

hollow pecan
narrow pendant
faint pasture
#

The fact is if you're in blueprint then performance is not a concern. And if you're in c+ plus, then just doing the thing predictably without branching is probably faster than doing it sometimes and not others.

#

I don't know, I haven't really found a use case for macros. Outside of maybe custom loops. I don't like macros that add stuff.

steady night
#

@hollow pecan yeah everything checks out "it rotates" its changing its speed" (CMC actual speed) obviously all is my settup but its the same as the others

faint pasture
#

A macro is literally just copy paste nodes

narrow pendant
#

yeah, I'm just a bit confused why the function doesn't get called continuosly

steel star
steady night
#

yeah

narrow pendant
#

anyway I'll go back to how I did things before and not deal with that problem now 😄 appreciate the insight ty

steel star
# steady night yeah

maybe its stuck on something? jiggle its position around. or figure out where "speed" is actually applied and debug why not

hollow pecan
steel star
#

but deleting other actors if fixes this one, would tell you something for sure

steady night
#

hm

#

@steel staryeah i have >.<

#

@hollow pecanyeah i have

#

tried everything xD

#

is there something in the cmc that i can check if its locking ?

hollow pecan
steady night
#

hmmm i think i got a clue

#

im using these red stuff (actors with 0 collisions) as patrolpoints

#

where to walk to

#

im asigning them on each npc individually from viewport

#

but it seems some of them are bugged O.o ?

#

anyone experienced this ?

#

hmm i think i got it

#

i had them placed on different sub levels

#

yeah that did it

#

loool

#

such a dumb issue xD

onyx gull
#

one of my newer projects (made in 5.4) allows me to right click and scroll my mouse wheel to adjust the camera speed. Another project of mine (in 5.1) does not seem to allow this? Or at the very least it seems to be much less user-friendly. It doesn't seem to affect the actual value being displayed, just a hidden value that seems to be limited to the one being displayed? I thought I remembered it working just fine in the 5.1 project but idk if I'm misremembering or if I somehow broke it?
Ultimately I'm wondering whether it's just not a feature that 5.1 had, whether it's changed, or whether it's some sort of editor setting that got messed up (and if it's the third, how can I fix it).

celest trench
#

Hey everyone! Kind of a general question for a blueprint implementation, how do seed systems usually work?
If I have a defined integer, I'd like to "randomly" select between different options based on what the seed is. So if the seed is the same it will always be the same outcome, but different seeds could happen to be one of the different options.

Currently I am just using the modulo on the last 3 digits in the number and depending on the value it selects an option, but this feels like a waste of the actual seed itself overall. What would be an ideal way to do something like this?

dark drum
celest trench
prime stump
#

Hi, I'm revising some old settings menu stuff for saving and loading players video and audio settings, I notice that I'm saving all the settings on Event Shutdown on the game instance.. is there any actual reason to do this?

#

Its causing me another issue which i can resolve by removing it from the Shutdown event but i cant remember if i put it there for a reason or not lmao

dusky cobalt
#

Does anyone know how is Get Hit Under Cursor by Channel works? Like how does it shot the line trace or something? I'm not sure if better to use it or line trace for clicking around in top down game? Anyone know difference and which is more reliable? I cannot really easy debug Get Hit Under Cursor like I can with line trace.

dark drum
prime stump
dark drum
dusky cobalt
#

If I have some class with 5 components, and I cast to that class, does it automatically gets every component into memory? So it would be actually better to call to components because they wont reference up and other components? (if set correctly)

dawn gazelle
winter pebble
#

I've hooked up a widget blueprint to an "Open Level (by Name)" node, but when I press the button it just quits 🤔. Also had this issue when trying to use an execute console command (Command: "RestartLevel") node

dawn gazelle
eager python
#

Finally fixed two of my overlap problems. Fingers crossed I don't find more the instant I start validating.

dawn gazelle
winter pebble
dawn gazelle
#

No crash notification thing comes up?

winter pebble
dry sleet
#

Yes, it should be present in Saved/Crashes I do believe?

#

There's also Saved/Logs which might contain info.

winter pebble
#

This is the log for my main menu widget (which uses the open level node)

#

and this is what happens when I try to restart the level

dry sleet
#

Cmd: quit is strange to see there.

winter pebble
dry sleet
#

Doesn't look like a crash -- at least that log tells you nothing.

winter pebble
#

I definitely don't have a quit node in either of those logic chains

dusky cobalt
#

I'm curious how many ''nests'' do you guys usually have for your classes so each of them stays ''light'' and serves one purpose? I have some idea to do something like
BP_Selectable > BP_Interactable> BP_Master_xxx (logic) > BP_Child_xxx (meshes/heavy stuff) and maybe I could fit even 1 more after thinking a bit more.

I was also thinking about separating my Data Assets into 2/3 parts like DA_Gold_Base (integers/texts/ very light stuff) and DA_Gold_Mesh(heavier stuff), so I don't have to set soft references (I'm not good with them yet! 😦 ) these would also be separated into Master/Child (LightStuff/HeavyMesh).

Are these good ideas or is it overkill and if something is already in the game then i'm basically trying to fight something impossible. Maybe Resource is bad example because 99% of time all of possible resources will be on the map, but let's say we have 12 units each of them has different mesh, but there are currently 3 spawned, I guess there is no reason to load the rest of them?

And additional question to that is if there is just array of things (like Data Assets), and it's on let's say Player Controller, but nothing yet casts to it, it's anyway already loaded in the memory because it's on player controller, who happens to be in game...? Like good example for it would be if player can choose 3 factions which all have different units / buildings, how to make sure that it can choose faction, but at the start of game he loads only one? Choosing faction should be in 1 blueprint that is in lobby (here we can have all factions data loaded, and then he sends only that Data Asset further into the level, and the blueprint which was used to chose faction should not exists anymore?

dry sleet
#

The gist of it (to the extent I can summarize it) being that for any class you want external access to (i.e. BP casts), you'd want one base class with only logic functionality and as few asset dependencies as possible (BP_MyClassBase).

#

Then when it's time to add meshes and sounds and lights, you add them to a subclass of that (BP_MyClass or whatever).

winter pebble
#

Stupid. I am so very stupid.

dry sleet
#

That way, when you need to do a good ol' BP cast to trigger some functionality from another actor, you don't need to hard reference the class containing all the assets -- you can access the base class which contains only logic, meaning it's cheap to keep loaded.

winter pebble
#

Hey look, everything works fine now! 🤦‍♂️

dry sleet
winter pebble
#

Thanks for the help anyhow @dry sleet, @dawn gazelle 🙂

dusky cobalt
dry sleet
#

As for data assets, I've always made them in C++, which helps avoid linker load... but I'd advise trying your best with soft refs at any rate.

#

They're your friends!

#

The thing that makes them trickier to use is exactly why you want to use them -- it prevents assets from being loaded when you don't need them.

#

In BP it's easy to resolve soft refs in actors -- just use the Load Asset Asynchronous node.

dusky cobalt
#

They are complicating the things.. loading unloading.. some things not working.. i dont feel confident using them yet

dry sleet
#

Still, I'd advise going that route rather than splitting your data assets out of memory concerns.

dusky cobalt
#

I mean, with resource example I think i'm fighting something impossible because it's like loaded in the game from the start to finish.. .so no matter how I set it up, it's already in the memory, right 😄

#

unless player gathers them all, then that's the only case

dry sleet
#

Perhaps so, but this also applies to the editor!

dusky cobalt
#

maybe that is still good practice, for sure will keep code cleaner

dry sleet
#

When you load an asset with tons of linker burden it will need to load those assets as well -- and that is true recursively. It can become a terrible spider web of dependencies.

dusky cobalt
#

Yea xD I just finished cleaning 1 class and now it's time for next ones. I think I will try with Master / Child + separating data assets because it seems very easy. The 1 thing I'm wondering about is how to make it with factions, so player can choose from 3 at the start, but then only 1 gets loaded? Would it be like to put FactionManager in the Level_Lobby, but then in the next level (map) load BP_Faction with 1 Data Asset? It's how these things are done?

dry sleet
#

I'm a bit tired so take it with a grain of salt, but this sounds like an excellent place to make a data asset containing all the data making up a faction.

#

DA_Faction_DinosaurGang.uasset

#

Then you'd have the ability to create an arbitrary number of such data assets to define further factions as needed as the game progresses.

#

I generally think of it like this:

#

If I need to create 3 variants of something, I might as well design this in a way such that I can create 100 variants.

#

The data asset would contain a lot of soft refs to meshes, sounds, and such, naturally.

#

That's fine -- the engine will need to load the class types of those assets, but it will definitely already have those in memory (and they're native regardless).

#

What you want to avoid is having assets such as meshes being hard referenced.

#

And this is where soft references are good -- a soft reference still means the TYPE it refers to gets loaded, but it doesn't necessarily mean the ASSET it's referencing gets loaded.

#

You need to request that yourself, which is their strength (Load Asset Async).

dusky cobalt
#

and then I have to unload them at some point or I usually care about loading it only before using?(so like on Initialization/Begin Play of that thing that uses it?)

dry sleet
#

When you have loaded a soft reference, you get a hard reference. This will stick around until you no longer need it, at which point the Garbage Collector will clean it up for you.

dreamy ice
#

Is the only way to play an Anim Montage in BP if I have an active animation blueprint for the mesh?

versed sun
#

doesn't everything unload on level change? or do i understand that wrong

dry sleet
#

For actors it's not necessary, they get cleaned up when the actor is destroyed, no sooner no later.

dusky cobalt
dry sleet
dry sleet
#

(the node you get automatically, that is)

#

If the asset has not been loaded previously you can get Null from that.

#

There is Load Asset Blocking (Synchronous) and Load Asset Asynchronous that will help ensure you get a valid pointer back.

dusky cobalt
dry sleet
#

In the asset manager, deep in Unreal's bowels.

#

Or registry or database or whatever it calls it.

#

Generally, just use Load Asset Asynch when in BP.

#

It never hurts!

#

If the asset is already loaded it just returns it immediately.

dusky cobalt
#

This one?

dry sleet
#

Yup yup but there's a trap here.

#

You'll want to wire that cast from the Completed pin, not the one you've pulled from now.

#

The unlabeled pin of that node fires immediately, even before that asset is guaranteed to have loaded.

#

The Completed pin is fired first when the loading is done.

dusky cobalt
#

Okay got it.

dry sleet
#

Otherwise there's a risk you'll cast on Null.

#

The only other things to keep in mind is that Async Load Asset only works in the Event Graph (because it's latent).

#

Not inside functions, etc.

#

You can use Custom Events (instead of regular functions) to try to stay inside the Event Graph for when you need loading done.

dusky cobalt
#

so to have more detailed example, if I set as variable as RTS_PlayerState (not a native PlayerState), and set it at Soft, and then I Async Load + Cast it's a ''proper'' way to do things? That way I can have literally the most heavy thing as the variable, but unless I Async Load + Cast it's not gonna take any memory?

dry sleet
#

Just to add: The Synchronous version of that node (Load Asset Blocking / Load Asset Synchronous, I think it's called?) is available inside functions, because it's blocking, but it carries with it some pitfalls (it can cause bad stutters, not just because of the loading operation you request, but because it forces everything that is currently being async loaded to be finished immediately as well).

dusky cobalt
#

oh lol, yeah I heard that this one stops whole game until it loads the thing, like with for loop I think?

dry sleet
dusky cobalt
dry sleet
#

That setup will demand, immediately (even upon opening the editor and loading this blueprint), the loading of RTS Player State (because of the cast), and all it contains.

#

However, if that type only contains logic, or small, cheap, data (in the way a good data asset should), it's perfectly fine.

dusky cobalt
#

Hmm, so I should not really cast after loading in most cases?

dry sleet
#

You need to!

#

This is the part that's hard to explain -- but the thing you need to consider is the makeup of the assets being hard-loaded.

#

Say for instance I have a weapon.

#

And I decide to make this weapon out of 10 different meshes (because it's cool and modular).

#

If I make a blueprint containing all those meshes, directly specified within components, it will need to load them all.

#

Haha ok 1s...

#

Yes! A weapon!

#

And the weapon has a mesh and a gun sound and a mesh for the bullet casing and a niagara emitter for the muzzle flash and what not.

#

You define that weapon in a Data Asset like this:

#

Mesh = Mesh Asset
Sound = Sound Asset
Bullet Casing = Mesh Asset
Flash = Niagara Emitter

#

Those types are already guaranteed to be loaded in Unreal, since they're core to the engine.

#

The only thing that is heavy to load are the assets themselves.

#

So if those are soft referenced, it's not expensive to load the concept of a weapon.

#

And you can retrieve any part of a weapon as desired.

#

Perhaps you don't need to know about the muzzle flash if you're only looking at it in the inventory -- so don't load that emitter.

#

And the data asset itself is so cheap to load -- just a few pointers (or soft references in this case).

dusky cobalt
#

Okaay, so If I have Static Mesh soft reference, then I cast again to Static Mesh to make it hard reference?

dry sleet
#

You have a static mesh soft ref, then you use Async Load Asset to get a hard ref to a UObject, which you then cast to its correct type (Static Mesh).

#

Indeed, that's 100% correct.

dusky cobalt
#

Haha, okay got it 😄

dry sleet
#

And when Unreal loads this blueprint, it doesn't load the softly ref'd static mesh. It only loads the concept of a mesh, which it has already certainly loaded already.

#

Yeah, you'll figure it out! It's very nice to get this in early in development, let me tell you :)

dusky cobalt
#

it's because of the Async Load Asset node or because of Static Mesh beeing soft reference?

#

because usually anything that is on execute pins in the blueprint already has ''weight'' on the blueprint, right? so I guess it's the node that is stopping the cast from beeing loaded ?

dry sleet
#

Hm, not sure I get what you're asking.

#

The runtime cost of the node execution is very small at any rate.

#

The loading is the big one.

dusky cobalt
#

Ill do some tests with the fresh blueprint.

dry sleet
#

What this node setup does is essentially:

"Hey, load /Game/Art/Dinosaur/Dromiceiomimus.uasset/ please, at your leasure."

#

"Sure, I'll load it... but first, tell me what it is?"

#

"It's a mesh!"

#

"Oh, a mesh. Let me look up what a mesh is. Yeah, I got it."

#

"And now it's loaded. Have at it."

#

(well actually it already knows what a mesh is at this point)

#

(actually, imaginary dialogue with the engine might be a sign I need to go to bed, glhf hope you figure it out :) )

dusky cobalt
#

Well, thank you so much for sitting with me and explaining it

#

I really appreciate it ❤️ !

dry sleet
#

No worries! It's pretty tricky and it took me a while to get in the habit of!

dusky cobalt
#

I watched some videos about it but they never click at first time so your iteration really, really helped, 1 more video and I think it's gonna be good already

dry sleet
#

Yeah, just doing some experimenting will probably get you the rest of the way.

#

It's pretty intuitive once you start using it.

#

The linker loading (hard ref) stuff is not super intuitive though.

dusky cobalt
#

Haha, I guess you are talking about Size map? because I tested it and when having soft reference but using cast on begin play to rts_playercontroller, it shows size map as I had hard reference of pc, but I guess it's just on paper and I have to believe that this thing is not loaded until it really happens.

dry sleet
#

If it's on the size map it's still hard referenced somehow.

thin panther
#

using a cast does indeed create a hard reference. That's what that blue pin is

#

Though in this specific instance, it's likely not a problem

#

could make a code only base class for your controller that you cast to though. Not that I can imagine why your PC has asset refs.

maiden wadi
dusky cobalt
#

Yeah so it's just bad example, because in the case of Static Mesh, it's not gonna load that 100 mb Static Mesh at the start and even if I cast to Static Mesh, it's still not gonna reference it out of the box, like with RTS_PlayerController

dusky cobalt
dusky cobalt
#

Damn, guys you are so helpfull but it's time to sleep haha 😄 I'm gonna dream in blueprints.

#

Thanks a lot

frosty heron
paper smelt
#

How do I make phys constraint go back to a specific rotation when something is not pushing it

remote meteor
quiet violet
#

how do i make a skeletal bone follow a camera?

steel star
#

ik chains and setting target positions

steel star
#

with great difficulty, avoid if possible

quiet violet
#

sadly i really don't know unreal TT

steel star
#

then the answer is: avoid showing it that way

quiet violet
#

its a third person only game 💀

steel star
#

where you pick things up with your cursor and drag around by their hands?

#

or what

quiet violet
#

im in way over my head but i really want to learn

steel star
#

i dont understand the actual question, is the problem

quiet violet
#

do you have any tutorials you send?

#

im trying to make the lower spine bone follow the camera

#

but my brain to square to understand

steel star
#

i mean, is that a character controller?

#

you just want the turn the character to a new rotation?

quiet violet
steel star
#

so, you dont have the ability to move an individual bone
you rotate the actor, and play an animation

#

which should already happen, if you are in control of it

#

and bind the default controls

quiet violet
#

im sorry if im annoying you

glossy cloak
#

Do you want the entire character to rotate when the camera does? Is that all you're looking for? So they can strafe?

#

Or are you trying to get the character to look/rotate it's upper body when you move your camera?

quiet violet
steel star
#

ok i see, so a look animation

glossy cloak
#

It's complicated. I'd save it for the polish stage once you've got more of the game built and have had more experience.

quiet violet
#

fair and smart

glossy cloak
#

Unless you REALLY want to do it now, then look up a tutorial on Youtube for getting the character to look in a direction and apply it to your use case.

#

https://www.youtube.com/watch?v=8skq8t_Fffk - This will get you started. But it's not an exact tutorial for what you want, so you'll need to take the concepts and apply them to your use case.

Hello guys, in this quick and simple tutorial we are going to learn how to make a the AI look with its head at the player in Unreal Engine 5.
↪️Join my Discord Server, NOW: https://bit.ly/GorkaGamesYouTubeDiscordServer

👉Awesome Unreal Engine courses on Wingfox: https://bit.ly/GorkaGamesWingfoxHorrorGame
Check out my Steam Game! https://bit.ly/3...

▶ Play video
quiet violet
#

thank you for helping me atleast

steel star
#

doing it for the whole upper body is going to have consequences that make it even more complicated

glossy cloak
#

But if you're JUST starting out in Unreal I'd spend your time on the bigger picture things. Getting bogged down in polish and details can really hinder development and lead to burnout really quick.

frosty heron
#

find look at rotation already do most of the heavy lifting

frosty heron
#

just make the head look to origin again when the rotation reach certain treshold so they dont break their neck

glossy cloak
# quiet violet i am, sadly

Which is great! It means you have a ton of small wins ahead of you that many of us don't have the luxury of attaining anymore. lol. It takes a lot of us a lot of work to get that dopamine hit you'll get just doing something simple. : )

glossy cloak
#

And without some additive animations going on it'll feel really stiff.

#

So while, sure... it's not all that complicated, I was simply suggesting focusing on gameplay and not the details.

steel star
#

its super easy to get bogged down on any specific visuals

quiet violet
#

"realism"

steel star
#

but i mean, if its a boxing game, well ;D

frosty heron
#

looks like five night of freedie's fan game?

#

just be aware of copyright stuff

quiet violet
#

we've got a winner

quiet violet
fiery sierra
#

It’s just a cautionary. Game devs don’t always hit people. But you could be the odd one out

quiet violet
#

i know

#

i might not release the game anyway just incase

steel star
#

fan game = free?

quiet violet
#

yes

steel star
#

then yea who cares tbh

quiet violet
#

thats a fnaf thing, if you want to make a fangame it HAS to be free

fiery sierra
#

That’s still very cool. I know a fnaf lore whore who follows all the fan games too haha

steel star
#

if you have to take it down, ok replace the models and republish

fiery sierra
#

I mean fan game should always be free

quiet violet
#

thats what im saying

quiet violet
steel star
#

thats the only reason im giving this advice

#

otherwise it would be "no, do not steal art"

quiet violet
#

i really don't care if they want the game gone, i'll take it down in a heart beat

fiery sierra
#

I’d definitely start small like they said a bit ago though. I was jumping in and trying to polish too early and realized I needed to just get mechanics working.

quiet violet
fiery sierra
#

Now my top down 2D shooter is just squares an arrow and a circle for projectile XD

quiet violet
#

bru

steel star
#

i mean that is quite a bit working, if you can move at all

#

but the character animation might be real real high up on the list for next ;D

#

i guess its all style dependent though. so.

fiery sierra
#

I have movement. The pawn looks at the cursor. And you can damage things, die and get random drops from the enemies. Etc

#

It’s just the core stuff so far though and it’s not done yet.

#

Just a small project I wanted to make to learn the engine before my big project.

#

Also @quiet violet if you want help with anything lmk. I’d like to help if you want. I’m new to unreal too but I catch on quick 🙂

fiery sierra
#

Bet. I’ll add you 🙂

quiet violet
#

added

midnight kiln
#

Still have had no luck in fixing this. I don't see anything in my uproject file which could cause the SkeletalMerging plugin to load late after the blueprints

{
    "FileVersion": 3,
    "EngineAssociation": "5.3",
    "Category": "",
    "Description": "",
    "Modules": [
        {
            "Name": "SabotageGame",
            "Type": "Runtime",
            "LoadingPhase": "Default",
            "AdditionalDependencies": [
                "AIModule",
                "Engine"
            ]
        }
    ],
    "Plugins": [
        {
            "Name": "ModelingToolsEditorMode",
            "Enabled": true,
            "TargetAllowList": [
                "Editor"
            ]
        },
        {
            "Name": "StaticMeshEditorModeling",
            "Enabled": true
        },
        {
            "Name": "GeometryScripting",
            "Enabled": true
        },
        {
            "Name": "AnimationBudgetAllocator",
            "Enabled": true
        },
        {
            "Name": "SkeletalMerging",
            "Enabled": true
        }
    ]
}

I found a similar thread from someone on the dev forum, but no solution was found https://forums.unrealengine.com/t/corrupted-blueprint-nodes-related-to-a-plugin/473212

#

AHA! If, rather than worrying about plugin load order, I change my game's module load order from Default to PostDefault, the issue is fixed. But that's only fixing the symptom I think. There's some race condition somewhere that is causing plugins to load in the wrong order even though I don't have anything weird in my project file, and that hasn't been fixed by just moving the game module from Default to PostDefault

trim matrix
#

I know this post is old, but does anyone know what gorgeous font is being used in that screenshot?

fiery sierra
# trim matrix I know this post is old, but does anyone know what gorgeous font is being used i...

he might actually have the answer, you could additionally use this site, copy the image and paste it in here. Find one that's similar and then google a free download for it.

https://www.myfonts.com/pages/whatthefont

midnight kiln
#

life of writing async functions in blueprint because Epic refuses to add real local variables to macros

topaz condor
lunar sleet
#

And why are you using only the failed pin of the AIMoveTo, what sort of hocus pocus is this?

midnight kiln
# lunar sleet What macro? That’s a BTT

because it's pointless to collapse to a macro when I'd have to do the same thing (drag all of the pins across the whole graph). And oops that part after the finish execute should have been hooked up to path success

lunar sleet
midnight kiln
#

I don't want to have global state for something that should be a local variable

#

I could replace all of my C++ local variables with global statics. Should I? No

#

same for blueprints

#

and there's the added issue that BT task variables can be shared across multiple AIs

lunar sleet
#

I think you have to make them shared for that to be a problem iirc

#

Way I see it tho, you have other problems there

#

For instance, you’re putting everything in one task when you should have one task to find your target and a separate task for the MoveTo, and use BB keys to pass the info along the tasks. There’s also a built in MoveTo task, tho that may not necessarily work for your case.

#

#gameplay-ai would be better at dissecting that code but imo that would help your code org a lot

#

So you can avoid the spaghetts

midnight kiln
#

BTs have even worse organization. Blackboards are shared across even subtrees, so using a blackboard key for minor bookkeeping is going to quickly inflate global state

#

and then for any object pointers you have to cast each time you move between nodes

lunar sleet
#

🤔 Why would you need to cast each time?

midnight kiln
#

because get blackboard value as object is an untyped UObject?

lunar sleet
#

I mean sure but you can just give the next task the BB key if it’s a target actor, it doesn’t need to know what it is. Again, you’re better off debating this with Luthage in #gameplay-ai , she could prly explain this stuff better

glass thunder
#

behavior nodes in behavior trees are definitely intended to be rather atomic by design

#

complexity comes from the arrangement in the tree

#

this BTT is doing too much

#

also blackboard isnt global state...? but it certainly represents the state of the tree.. You shoudnt put data in the blackboard that isnt used by other tasks

surreal peak
#

Wasn't there the option to allow sharing data with different BT instances?

#

Via the BB that is

#

That would at least give back a reason for putting stuff into the BB even if only used in one place

glass thunder
#

i am not suuuuuuuper familiar with ue's bt (but have a lot of experience writing whole behavior tree systems from scratch for other engines) but i seem to recall that there's essentially a "static" kind of variable that you can set for all instances of a BB

#

but i may be misremembering that x_x i havent really dived too deep on that sort of stuff

#

imo though, if the data you're trying to store isnt going to be shared between nodes, it doesnt really have to go in the blackboard

#

lots of nodes in a behavior tree can have internal state (like a selector or sequencer) so that as you tick the tree, they can iterate over their children for example

ocean holly
#

Hello,
is this the right channel to ask questions on BPs related to morph targets, sequencer, and similar stuff? As I'm facing issues with trying to expose morph targets on sequencer via BP, I want to make sure I'm asking in the right place.

surreal peak
ocean holly
#

well, considering it's early-intermediate beginner stuff (I think) would it be best to ask here or there? I've done a search before but I couldn't find similar issues

frosty heron
ocean holly
#

Let me preface that I'm doing this for personal projects, I got a character off artstation that comes with morph targets. Said morph tartges also control part of the clothing and I wanted to control directly via a BP in the sequencer while say, for example, I assign different animations to the skeletal mesh. I tried an animation blueprint for the morph target that lets me use them in the sequencer but obviously I can't animate the mesh this way. I was trying to use a character BP for this but I think I'm stuck on how to call the mesh correctly. There was a thread on the official forums that actually explained it but the accompanying video was set to private so I'm not sure what I should do.

frosty heron
#

Why can't you animate in the sequencer?

#

you will have access to the skeletal mesh's morph

#

bp and sequencer is apple and orange imo. What you do in the sequencer is contained there, the bp just play the sequencer

ocean holly
#

I need to access the morphs directly from the sequencer, and I cannot do that if I put the mesh, and for example, I want to put certain morph target default value which is different from the default value of the character

frosty heron
#

but you can?

worldly skiff
#

Is it possible to make Mouse Click and Mouse Over events to use different Trace Channels?
I'm using Mouse Clicks for movements (top down game) and they should ignore Units Capsule Components, while I want those Capsule Components to fire Mouse Over events. But both seem to use Visibility channel by default. I can change that to any other channel sure, but they will still use same channel.

frosty heron
#

@ocean holly These are all morph targets

#

I animate the character talking entirely in sequencer

ocean holly
#

@frosty heron Yeah, sorry I wasn't clear enough. my problem is setting up the BP like that. the animation BP was set tp something like this (with the value of the morph as variable)

frosty heron
#

@ocean holly same with me, it's the only method to see morph target in sequencer as of now if im not mistaken.
Make sure you set it to instance editable and expose on cinematic

ocean holly
#

Ok at least I got this part right!

#

The problem (which I assume is something very beginner level) is setting up the character to see this animation BP. Should I set a character BP and that's it? Because if I use the mesh directly I don't even see it.

frosty heron
#

You can create a character bp that have the skeletal mesh component uses the anim bp you set up

ocean holly
#

I really apologize for my ignorance...once I added the character here should I do something else?

frosty heron
#

you need to make sure that the mesh uses the anim bp you set up

#

in other word, this class here

ocean holly
#

I wasn't doing things wrong then...but I don't see the AnimBP in the list, just the character own post process BP. Is it a matter of naming?

frosty heron
ocean holly
#

@frosty heron Ok now it works...kind of. For some reason if I set the default value in the BP it shows correctly but in the sequencer, despite having put the variable as I said before If I try to change the values it does absolutely nothing...

frosty heron
#

have you tried to animate in the sequencer? if so , show a picture of it

ocean holly
#

As you an see the variable with 0 represents the part of the morph that I want to edit but if I put it to 1 I don't see any modifications. However if do set it here and recompile the character BP it shows them correctly

frosty heron
#

Show me NewBlueprint

#

and go to the detail panels of the skeletal mesh component and screen shoot that

#

show to me that you have set the anim instance class there

ocean holly
#

Ok just a sec

frosty heron
#

ok I also notice something

#

you must have an animation running for the morph target to work

#

@ocean holly if a key is run inside the red box I highlighted, it will not work for me

ocean holly
#

But now I noticed something... if I apply any animation to the "CharacterMesh0" it does nothing

#

@frosty heron I tried it in a fresh project and the morph target works (I think something broke in the old project). But selecting the animBP doesn't let me use the animations, in the sense that if I add an animation track nothing happens.

ocean holly
#

@frosty heron This is the sequencer and the BP set up

frosty heron
ocean holly
#

Yeah no worries, thanks for the help

spiral kite
#

I want to make skin stealer but something is wrond can you help me

frosty heron
#

You first ask the server what costume is the target acor is using

#

Then server set the mesh and that's it

frosty heron
#

you have to be more descriptive

#

the code looks like it should work (though not great for multiplayer)

spiral kite
#

I can't access the other player's skeletal mesh

#

Something is wrong after break hit result

#

And you said it's not good for multiplayer. How do I make it good

frosty heron
#

you are doing the trace on server, this means that people with considerable ammount of delay may missed the trace because it takes [Insert ping here] for the RPC to run on the server.

So in your screen , you might supposedly hit the trace but in the server machine since it doesn't necessarily see the same thing, you might end up missing it.

#

it would be more tolerable for the player if you just trace locally, then inform the server what you hit

frosty heron
#

then adjust collision settings accordingly

spiral kite
frosty heron
#

that's just spoon feeding and I have my own problem to sort out right now

mental trellis
spiral kite
#

my tracers don't hit clients player, what's the reason?

fiery sierra
spiral kite
#

I try to steal the opponents mesh

#

I try to make skin stealer class

fiery sierra
#

that's a little more complicated than that from what I can see on the internet. It I even tried to make it using resources and haven't been successful granted I'm new to UE5 but I digress. skeletal meshes are more than just the mesh that sits on top.

spiral kite
#

I want to access the skeletal mesh of the other player

fiery sierra
#

I tried making it work, tried a few ways, but skeletal mehes are complicated from what I can tell, so even if I got it to work animations would likely be broken. From what I can tell there's no cut and dry way to make this work. Unless someone else can answer this I think my hands are tied. Sorry dude.

frosty heron
#

networking has is not relation in this sense , that's just your Trace not hitting the actor

#

again, as I have suggested before, check your Collision settings

#

if it's a character, you can trace to the character Physic assets or you can trace againts the capsule component

spiral kite
#

I know, I just wanted to emphasize that this is a player, not an NPC.

frosty heron
#

it doesn't matter if it's a player or npc or anything

dusky cobalt
#

What is the best programming pattern to juggling with UI buttons? Like my mind is blown how to make it more dynamical without considering literally every possible switch from one to another. Or maybe I should look into Common UI and staking widgets? But generally biggest problem is how to decide which commanding buttons to show when having selected multiple units and also allow to switching ''type'' when units are already selected to allow showing command button of 2nd type of unit, as well as how to connect with that possibility of using spells for that type of unit (like if I click Q, the buttons visible are for archer (skills) i want to only get archers cast their spell and not all of units. Do I literally try to take care of every possible scenario with switches, something like that needs a manager (how could this manager work more or less)? Anyone could give any tips? I have some ideas how to do it but it's gonna take so much testing and checking every case to switch here, turn on here and turn off here. Unless this is way I'm looking for insanity check. Do I just brute force it?

frosty heron
#

the only thing the trace care is the Collision Query settings

#

if the one it's tracing againts doesn't set to block (in your case Vissibility channel) then it's gonna go through

indigo stratus
#

Hey guys!
Is this safe?
And are async loaded assets automatically unloaded, once they are destroyed and garbage collected?
Cheers!

mental trellis
#

But why 2.3s?

#

Why not just wait until it's loaded?

indigo stratus
#

Thanks! So in this case I just wanna play the level sequence trigger and after it unload it.

#

I have Blackfade

#

I just use the 2.3 in all situations.

#

but thanks !

#

i just want it as backup, so if the levelseq is not loaded, for what ever reasons. it does trigger it.

frosty heron
#

Like what's the reason.

How do you do the black fade?

You can use delegate to check if something is finished.

With widget you can use OnAnimationFinished with sequencer you can use OnFinished

indigo stratus
#

@frosty heron Thanks. I know that I can. It's a huge project and it's just the way it is now. But thanks anyway. Have a nice day ! 🙂

boreal scroll
#

Hi, I'm a newbie. Does anyone have a tutorial or an example of QTE (frequent button presses many times)? I want to move a character from a sitting position to a standing position using QTE. But I can't find any tutorial or example.

#

Or maybe you have ideas on how to do it in a proper way

frosty heron
#

just record the number of key presses within the quick time event window?

boreal scroll
#

It's not that simple., I want to play "standing up" animation when user is clicking button and play "sitting" animation when user is stop clickig on the button. And if user stopped clicking on the button, but started again clicking, animation "standing up" should start not from the start, but from the current position.

frosty heron
#

it doesn't sound complicated either

#

sounds like a blend space

#

you drive the blend value everytime the button is clicked

#

add the value on click and have some timer where it subtract the value

boreal scroll
#

Blend Space and Blend Value are new things for me. I thought I could somehow use animation montage for that purpose. But thank you, I will investigate blend space. ❤️

bright hamlet
#

Assets Available from here: https://marketplace-website-node-launcher-prod.ol.epicgames.com/ue/marketplace/en-US/profile/PolygonBlacksmith?count=20&sortBy=effectiveDate&sortDir=DESC&start=0

In this series we are creating the common mechanics found in RTS games, everything from unit selection, AI combat, and base building.

In Part 23 we work on...

▶ Play video
#

Bunch of similar on YouTube

dark drum
# indigo stratus Hey guys! Is this safe? And are async loaded assets automatically unloaded, once...

The time it takes an asset to load will be different on each machine. You should play the sequence on the completed pin and fit any logic to that.

Any asset is garbage collected at some point when it is no longer being used or referenced. The sequence asset will automatically unload when it's no long playing and isn't referenced anywhere.

Also, in regards to a comment you made, if it never loads, then there's nothing for it to play. You'll get an access none error.

violet turret
#

HI,In Unreal Engine 5, I have animations with a "camera bone" that extends from the root. I also have a movement animation with shakes for the "camera bone". However, when enabling "Use Pawn Control Rotation", the shakes stop working. How can this issue be resolved? Thanks in advance!

normal viper
#

hey guys
hope u all having a great day
so i have a problem i just created a light bulb and a light switch and made the interaction with and interface the thing is i can interact with the lightswitch on off without problem but i also can interact with the light bulb it self and turning the emissive color on and off as well
any solution so i can only interact with the light switch Only

steel star
dusky cobalt
steel star
#

if the container can layout an arbitrary number of buttons, when you show the ui clear the buttons, then loop over the things you have selected, and dynamically create and add the button widgets to it

dusky cobalt
#

Yea I realized because my biggest mistake was that each ''unit'' was taking care of adding himself to the UI, and I took a try and instead of each unit handling it, right now HUD does everything, like takes all Selected Units and shows what is needed and in the way I want it.

steel star
#

nice

dusky cobalt
#

that was like eureka after it worked 😄

steel star
#

much easier to debug the code too, if its written in one place, and not being executed across different actors

dusky cobalt
#

It will also let me a bit of other things I was wondering how to deal with so i'm really happy

steel star
#

loops are op ;D anytime i am doing something more than twice in a row, i make it a loop

#

or at least consider it

lunar sleet
#

just a reminder that they're expected to complete in one tick

dusky cobalt
#

yea I was anxious but then I realized what if I did next one on completed.. it shouldn't be so bad and well, it worked! 😄

steel star
#

i cant imagine you have 100s of selected actors at the same time in this game

#

keep track of what is selected in an array, as they become selected and deselected, then you dont have to iterate every actor

lunar sleet
dusky cobalt
steel star
dusky cobalt
#

Yay! 😄 thanks for confirming whole idea

spare sentinel
#

is chat gbt plus better then the free version?

lunar sleet
#

sure

#

prly still not worth it for UE

spare sentinel
#

not worth chat gtb plus?#

lunar sleet
#

yes, chat btg minus no no

somber elbow
#

Hey guys! Im working on my platform game here. Its almost done, but Im not quite happy with the distribution of platforms. I am using Random float in range, clamped with screen borders to define each platform location. But this random float for some reason only gives values that are super close to each other. So the platforms mainly spawn in the center. Sometimes they spawn on the sides, but I just do not like the way Random Float defines the spawn points. Here on the image you can several examples and on the right side I marked with orange color how I would like it to work. Do you have any ideas how to tackle it down? The only way I can see is to add a variable measuring the distance between the two platforms, and if it's too small, just run Random Float again. Maybe you have a better solution.

lunar sleet
dusky cobalt
#

Is this correct way to check the Array of Names and break loop if it finds 1st match and then it will set that first match as current type?

steel star
versed sun
dusky cobalt
#

but still need to break?

versed sun
#

nope

steel star
#

"return" means "execution returns to the caller of this function"

dusky cobalt
#

like this?

versed sun
#

perfect, and make it pure

dusky cobalt
#

and it's gonna stop when it finds first matching thing?

steel star
#

there is likely a 'contains' node that takes an array and an element, or at least if not there should be

lunar sleet
#

Contains Item

versed sun
#

Find

#

also

lunar sleet
#

aye, FindItem/ContainsItem

#

depending on whether you need the index or just true/false

dusky cobalt
#

Well, so I have Array of Names which are supposed to be sort as priority by player.
Let's say there is priority of:
Worker
Archer
Warrior,

but the player now selected only Warrior, so I need to check if it's not Worker, not Archer, and finally it checks it's Warrior and sets it as ''current''. Same would be if we selected more units and also would allow the player to switch which units he wants to display as firsts.

#

Do I need nested loop for that?

lunar sleet
#

if you're trying to sort an array, cpp is better at that (TArray::Sort is a thing)

steel star
#

it will do the same thing, but is likely implemented in C++, so much more efficient but also just less annoying to setup in a bp

dusky cobalt
#

Hmm, its not working the way I want it, I will try to describe it once again maybe I will understand what I really want

steel star
#

loop over the array of tags you have pre-allocated to be in order of priority

#

first one that is contained, return it

#

done

#

or isnt there a "has tag" node, if these were actors you would call that

pine trellis
steel star
pine trellis
#

@steel star its a function inside a c++ I think? why isnt it there I followed the directions

steel star
#

google is saying set gravity direction is an unreal 5.4 node, and no mention of get gravity direction existing

dawn gazelle
#

If you have Unreal 5.4, you need to get the Character Movement Component and then get the gravity direction from it.

steel star
#

oh, this was just it being filtered out of the list ..

spare sentinel
#

is chat gbt plus without limit?

#

so i can aks questions every time without limit?

twin shale
#

Alright...I'm missing something. I spawn an actor, then in the BeginPlay I rotate the actor, then I turn on the ProjectileMovementComponent. The ProjectileMovementComponent does not care about the new rotation at all

dawn gazelle
twin shale
steel star
spare sentinel
#

the version 4 which cost is much better then the free version 3.5?

thin panther
#

neither are good for unreal

steel star
#

isnt there now a 4a, which doesnt require plus?

dawn gazelle
spare sentinel
#

why is chat gbt not good for unreal engine?

steel star
#

if you want to try it just make a trial and cancel it

dawn gazelle
#

Because it's a large language model that is only predicting what text comes next. It doesn't actually know what it is doing, so unless you know what it may be doing wrong, you'll get wrong answers.

steel star
#

but its unlikely to be able to answer unreal specific questions that go beyond things covered in actual unreal documentation

twin shale
steel star
#

i use it to figure out the terminology when i dont even know how to search documentation for something

dawn gazelle
#

That said, if you know what you're doing, ChatGPT can be a great resource for doing some heavy lifting as you can then correct it when there are problems.

dawn gazelle
dusky cobalt
# spare sentinel why is chat gbt not good for unreal engine?

It basically agress with anything you will suggest to it and it's not gonna come up with anything better or correct you actually, at least in my case. It can be helpful to wrap your words if you have problems with writing detailed texts, but generally it's shit and misleading, just have in mind it's my experience when trying it for unreal. I'm not saying it's not usefull generally.

twin shale
dusky cobalt
#

Also 4.0 version of gpt is free now but with limits of answers so why not try it and see yourself. @spare sentinel

shut quarry
#

When instantiating a class, is there any way to have a parmaeter in the constructor?. For instance, int he ^ blueprint I want to pass in a String parameter, but I don't know how

craggy flicker
#

maybe this is more of a multiplayer question my bad

wanton cove
#

what is the point of local player save game if it doesn't persist other players saves after reload?

wanton cove
faint pasture
# dawn gazelle That said, if you know what you're doing, ChatGPT can be a great resource for do...

Exactly, I use it to spitball a first approach to something if I'm totally clueless.

For example, I barely passed my thermodynamics and fluids class in college. I'm making a physics engine that has to handle compression and expansion of gasses. I used ChatGPT to shortcut to the general "shape" of a function to do reversible compression on a gas volume, basically "What would the temperature and pressure be of this volume if compressed by this ratio". It just saved me a bit of math work really.

shut quarry
#

why is the iteminfo not showing

dry sleet
#

that will also give you a pin on the construction node

shut quarry
#

got it, ty

glossy cloak
#

Question. Years ago I made choppable trees in a game and I used the foliage brush then swapped out each foliage instance with an actor I could interact with when I begin trying to chop it.

Is this still the best way to handle foliage like this? Or is there a better solution these days with UE5 that I'm unaware of?

dry sleet
#

But I've never used it myself.

faint pasture
#

It all depends on what you need

#

Do you need "a daisycutter just dropped and I need these 1,000 trees to fall over"?

#

or just chopping 1 tree at a time

glossy cloak
#

This is your vision range, so I'm pretty sure I can afford having 20ish actors on the screen. They won't be running on tick until you interact with them, so it should be pretty cheap.

steel star
#

its not about on screen

#

its about how many in the level

glossy cloak
#

Thousands.

steel star
#

then they cannot be individual actors

#

wait until they become cut, to become that

glossy cloak
#

They'll be loaded and unloaded as you leave areas. I'll probably use level streaming.

dawn gazelle
steel star
#

any loop over actors becomes that much slower, i guess its a matter of what main thread timing you can hit

#

try it out i suppose

glossy cloak
#

If they're not running on tick, then does it matter if they're sitting there?

dawn gazelle
steel star
#

generally i think of numbers like "200, 400" as reasonable numbers of actors to have alive at once, but this is really more in a unity engine context, im new to unreal

glossy cloak
#

yeah... 450 of them dropped me from 80fps to 55

#

For context that was running a listen server with two players. But still. It's a noticable hit.

#

I'll set up the foliage method AND use level streaming.

Is there a way to set an actor BACK to foliage after it "respaws"? Or should I just deal with the overhead of whatever the player interacts with during a session?

steel star
#

time to read up on the foliage system, which i have not myself, ;D

faint pasture
#

have that thing keep track and put things back

glossy cloak
#

It's been a few years since I set that up, so I couldn't remember if it was possible. I don't remember putting it back, so I wasn't sure if it was possible.

I'll just get to work and stop asking questions now. lol

steel star
#

sounds like something that could easily require custom C++ additions

glossy cloak
#

Nah. You can grab individual instances from the foliage actor. I know that much.

faint pasture
#

I would probably have some FoliageManager thing that owns the foliage and the actors representing them etc, then you can easily keep track and put the tree back to being foliage if it didn't get chopped.

steel star
#

oh, nice

glossy cloak
#

Honestly I'm gonna check the marketplace for a solution before I get my hands dirty. I've learned that a few dollars is often better spent than a few dozen hours of time.

faint pasture
#

I've learned the opposite.

glossy cloak
#

Lol Well it depends on what you're spending the few dollars on.

faint pasture
#

most plugins seem to be pretty opinionated and it can be very hard to get them to play nice with other systems

#

Depends on the plugin though. I'd never ever buy a "game mechanic starter pack" but a very self-contained system could be ok

glossy cloak
#

Yeah. That's basically the plan. It's rare I find exactly what I'm looking for and often just do it myself. But I'd rather spend 5 minutes searching just in case.

steel star
#

perhaps make sure first you can represent your scene as you want it, with foliage

#

ie to compare to that earlier fps hit

shut quarry
#

for the widget item called "Uniform grid panel" is there any way to set the number of columns / rows? Bcuz rn its two rows and I only want one.

pine trellis
#

How can I make a viriable look like this ?

steel star
lofty rapids
pine trellis
#

I created it the variable but I cant get those options to show up

steel star
#

ive never seen that node before that just says 'get' you can use a "is valid" node and connect anything into it

pine trellis
somber vector
#

It's from right-clicking and choosing the "convert to validated get" option

pine trellis
#

I dont know how to get the varible

somber vector
#

As mentioned above

steel star
#

drag drop the variable from the panel that lists them, onto the blueprint

#

choose get

#

connect to a 'is valid' node

lofty rapids
#

that won't give them that node

#

it's a solution sure, but not for what they are wanting

somber vector
#

If you want the thing on your screenshot, drag your variable into your bp, right click it and select the bottom option

pine trellis
#

it looks like that when I do

somber vector
#

No, you need to get it, not set

#

Then you'll be able to right click and select the validated get option

pine trellis
#

oh ok

#

@somber vector thanks!

#

im going to go to the bar get some food and drinks and come back

somber vector
#

No problem, although I think engage was the first one to give the correct answer:)

#

Enjoy your evening!

wise ravine
dark drum
wise ravine
dawn gazelle
#

If you're following a tutorial series, you probably want to start at the beginning. Creation of the ItemBase object is the first thing done in the first video of pattym's tutorial series.

queen vault
#

Hey guys. I'm having trouble that the owning player save (SveGame) is not valid. How do I make it valid?

#

These are the errors when I remove the isvalid statement.

dawn gazelle
#

Unfortunately "Begin Play" of one actor can happen before the "Begin Play" of another, so if you happen to be loading in BeginPlay of the BP_Player blueprint, that's no guarantee that it's set before the Begin Play of this actor.

queen vault
dark drum
dawn gazelle
#

Definitely not.

#

You want to do something when the save is loaded. So you can check if the save is loaded, otherwise, you need to know when it is loaded so you can continue from that point - you can use an event dispatcher that you call when the save is loaded and other actors could potentially bind to it so they know when it is ready.

dark drum
queen vault
#

Thanks, I'll try it now.

odd kiln
#

Hi all

#

I'm trying to "Spawn" multiple "Actors" at the same place after some seconds

#

But when I do it the "previous" spawned actor is destroyed, I don't understand why

queen vault
#

Thanks everyone I got it working!

lunar sleet
odd kiln
faint pasture
#

especially your collision handling setting

odd kiln
#

"Collision Handling" is "Always spawn, ignore collisions"

faint pasture
#

show the lifetime of the actors you're spawning

#

just show all the stuff

lunar sleet
#

and maybe a screenshot of your Outliner where you searched for Actor_

glossy cloak
odd kiln
#

It's ok thank you all I just found that I had a "Destroy Actor" somehwere in my code.. sorry :/

trim matrix
#

hey. im working on a 2d platformer and im trying to recreate the jumping from the foreground to the background level element from, mario wonder, mutant mudds, and yoshi’s crafted world. how would i do something like that?

tropic peak
#

I want to change cameras based on the player state. Lets say the player is using a workbench and I want the camera to point directly at the workbench where I have (or will have) various interactable elements. Should I keep all cameras in BP_Player or is it okay to have a separate "workbench" camera in BP_Workbench too?

#

It sounds like a pretty straightforward thing to do but I've spent quite some time trying to figure it out and it doesn't seem to get me any closer to what I want to achieve.

lunar sleet
#

🤦 why?

tropic peak
#

I have an interface that allows me to reference the pllayer, but for some reason the bp above returns none when trying to access the player actor.

gray tide
#

Can you change an items index in an array?

tropic peak
#

it's set in BP_Player on beginplay

lunar sleet
#

understand that it'll overwrite the current element, so you will need to cache the initial value in a temp variable beforehand if you're swapping

gray tide
dusky cobalt
# tropic peak

Do you have plugged Player reference inside this interface ''event'' inside Player Controller?

lunar sleet
#

why even pass the ref through an interface before saving it?

dusky cobalt
#

btw you could just cast to BP_Your_PlayerController and it's faster than using interface

lunar sleet
#

I mean at the very least it prevents you from passing nullptrs as refs to your other interface

tropic peak
#

I don't know. I read/heard a hundred times casting is expensive and I got into a probably bad habit of avoiding it

lunar sleet
#

ugh

#

another one lol

dusky cobalt
#

It's the tutorials, I was the same like this 😄

tropic peak
#

I'm fairly new to unreal. I believe what people say :/

lunar sleet
#

cast costs are irrelevant for you.

tropic peak
#

let me try just casting it.

dusky cobalt
#

Casting is free. Just casting. It's the problem where you are casting. If something is already in the level like Player State, Player Controller you can rather cast to it without thinking. You just need to avoid casting from Player Controller to things and holding big assets there.

lunar sleet
#

also

#

please watch the pinned bp comms live training if you haven't already

#

it's long but worth every minute

tropic peak
#

I have a huge problem referencing stuff. I've been working on improving for the last couple of weeks but I just feel dumb when I need to reference something.

dusky cobalt
tropic peak
#

I know it's nothing scary and is a very simple concept but still I keep doing it wrong.

lunar sleet
#

it's cause tutorials out there teach it in an ass-backwards way, putting the cart before the horse

tropic peak
#

I'm not really using tutorials anymore

lunar sleet
#

that is the single best resource to understanding cast, interfaces, dispatchers, etc.. I never truly understood casting until I watched it tbh - even though I thought I did

tropic peak
#

not yet, I'm going to try and get it to work with casting and I'll save the vid for tomorrow. It's the last thing I was supposed to do today as it's 1am already. I'll definitely watch it

#

Announce Post: https://forums.unrealengine.com/showthread.php?101051

This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...

▶ Play video
#

cool, saved

dusky cobalt
#

at least watch it first before you ask questions, there will be questions anyway but at least you have some fundamentals to work on, if after you watch it you still have questions, its cool, sometimes you need live discussion to process

tropic peak
#

oh yeah that's for sure. I don't want to be a bother to anyone if there's a vid explaining what I don't understand.

#

apologies.

lunar sleet
#

once you get a handle on bp comms, it'll make all this stuff easier

dusky cobalt
tropic peak
#

to activate a cam I need to deactivate the old one->activate the desired camera or is there a toggle or something?

#

is what I meant

dusky cobalt
#

and don't be afraid to ask, it's how you learn and also I sometimes write myself and then in the middle I finally figure something because describing it ''out loud'' to someone made me realize my mistake

lunar sleet
tropic peak
#

yeah the yellow ducky method. I do that too

lunar sleet
#

usually rubber ducky but sure

#

so what is BP Player, your PlayerController?

tropic peak
#

BP_Player is my player

lunar sleet
#

and that's not where the cast goes. you swap that funky interface that you plugged the player con in, for the cast

lunar sleet
tropic peak
#

can't recall. it's the point and click one, top down I guess

lunar sleet
#

ok, when you open it, what does it say at the top right for Parent class

tropic peak
#

oh and that camera change thing I posted above is not in the BP_Player but in the bp_workbench

#

it says Character

lunar sleet
#

yeah, so you can't get the Controller and try to plug that into the BP_Player ref, they are not the same thing

tropic peak
#

yeah. the controller is BP_TopDownController

lunar sleet
#

k so if you need the player character

#

you use get player character -> cast to BP_Player

#

You then set the return value to Player

tropic peak
#

that makes perfect sense

#

and it even works

#

curious

#

what does that mean?

#

popped up in my game window when I changed the cams, never seen this before.

#

(it worked btw)

lunar sleet
#

you're using a lot of heavy assets probably. Did you download a bunch of Nanite level stuff from Quixel?

tropic peak
#

nope

#

I'm using mostly the assets I made for prototyping

dusky cobalt
#

try to bake your light maybe

tropic peak
#

holy crap camera swaps can be intense

dusky cobalt
tropic peak
#

I'm using the metahumans model though

lunar sleet
#

this has helped in the past too https://youtu.be/uk3W8Zhahdg?si=HcVxf_MDHLdurklx

This time on Unreal Tips & Tricks, we look at how to manage the Texture Streaming Pool size to take advantage of more video memory, or VRAM. By doing this, we can avoid going over our allocated VRAM budget for streamed textures and MIP maps. We'll also take a brief look at how to modify multiple textures at the same time.

For more details, plea...

▶ Play video
tropic peak
#

I gotta say BP start to slowly "click" for me. but I keep feeling like I'm not using it "the right way", or that I'm not utilising all tools it offers (eg. interfaces)

#

I guess there's always time for refactoring but I need to get in the mindset to just get things to work for now.

lunar sleet
#

good building habits are important, but refactoring is life nevertheless. Perseverence is key.

tropic peak
#

I think I called "it's working" a bit too early. something weird is happening and it doesn't look like the desired camera got activated

dusky cobalt
tropic peak
#

because I never really understand what the right way is

#

It'll come with time I guess.

dusky cobalt
#

at the start it's really important to jsut get familiar with things and try to get grasp of everything, then after getting some portion of knowledge, go and build something with this, after you build, go again and watch some more things, watch things you watched again, ask questions and then again try to hit and build some things

queen ore
#

hello i have an exploding barrel which on shot at , fires a take radial damage used to kill any enemy character nearby . But I wanted to also affect other barrel in the vicinity from the explosion. Which doesnt work

lunar sleet
#

yeah, the right way is the way that works, you can optimize later as needed.

dusky cobalt
#

there is gonna be a lot of iteration of things you build but it's good because you are progressing, also its good to really protoype shit things and then you know what you need to connect to what and rebuild it so it works together

tropic peak
#

Ok I made a mess with the cameras, I'm gonna read up on activating and deactivating them.

dusky cobalt
#

watch live training first, don't skip fundamentals 😄

lunar sleet
tropic peak
queen ore
lunar sleet
queen ore
#

yes i did

lunar sleet
#

is this checked on it?

queen ore
#

it wasnt ticked , but checked with it on . Didnt work 😭

lunar sleet
#

out of curiosity

#

how are you handling the damage receipt? AnyDamageTaken?

queen ore
#

event anydamage

dusky cobalt
#

how are you line tracing what was hit?

#

just show more code

steel star
#

its a radial damage event

#

he did show it

dusky cobalt
#

oh right, and before that?

shut quarry
#

in blueprints is it possible to pass in a reference of "this" like if im in an actor and i gotta like return myself how do i do that?

lunar sleet
shut quarry
#

actor reference

lunar sleet
#

self

shut quarry
lunar sleet
#

what you doing there?

steel star
#

but returning to the caller, the caller just called you so already knows

shut quarry
#

Ok so I have a struct with a value called TSoftObjectPtr<AActor> itemRef; so a soft actor object reference

lunar sleet
#

drag the variable into the graph and plug self into it if needed

shut quarry
#

and I'm tryna pass myself in

#

(in blueprint)

#

the struct was created in cpp

#

using it in blueprint

dusky cobalt
steel star
#

its very unlikely you want to use TSoftObjectPtr

shut quarry
#

I mean, so im currently in an item class

#

and since there can be a lot of items

#

i figured its best to keep it soft

#

and then it'll load when the player uses it

lunar sleet
#

if you're passing self, the class is loaded

#

you're in it

#

the instance is live

shut quarry
#

ok fine ill change it to a normal instance

#

but how would I pass it in?

steel star
#

who is allocating the struct

shut quarry
#

erm what? a struct is just like a fat variable

#

idk about allocating and whatnot

queen ore
steel star
#

who is calling "make struct" node then

shut quarry
#

its all in one class

steel star
#

alright, so then whats the issue? that sounds fine

shut quarry
#

like I got class defaults like the name of the item and whatnot, but I also need to pass in a reference of the object, but I can't do that for some reason

#

here llemme show u an image

#

like

#

what do i put as the item ref

steel star
#

the issue is 100% that weird soft ptr

#

well

shut quarry
#

i put in BP_BaseItem bugt im pretty sure thats the class

#

not my current instance

steel star
#

ok this is all happening in blueprint assets, not with blueprint nodes

#

and i cant tell which way you want to do it

shut quarry
#

🤷 i dont care mind either method, I just wanna pass in an instance of myself

queen ore
#

any damage in barrel

shut quarry
#

okay forget the struct, i wanna create a function that s called "getSelf" and all it does is return a reference

steel star
queen ore
#

part where radial dmg is applied , works fine on the enemy character

shut quarry
#

is that a node?

steel star
#

yes, get self

shut quarry
#

oh

#

found it

dusky cobalt
shut quarry
#

ty for the help

lunar sleet
#

that's what I was pointing to in my first response lol, I guess I wasn't clear enough

trim matrix
#

Sorry if this a dumb question, but how can I make a sphere trace stop tracing when it hits an actor?

lunar sleet
#

uh, are you tracing on tick or something?

steel star
#

give the actor collision setup to "block"

lofty rapids
lunar sleet
#

idk the way that question was phrased was confusing to me

lofty rapids
#

idk about stop tracing, but you can get the hit actor if it's blocking

#

i just assumed they were looking for a hit

trim matrix
lofty rapids
#

does it actually take any damage ?

#

as far as things fire off, you can check if the event is actually firing the anydamage, and is the hp display on tick ?
i'm guessing the other barrell is supposed to explode as well ? @queen ore

faint pasture
#

there is no duration to a trace really

glossy cloak
#

Hi. I'm back. I'm looking for a solution to using a foliage instance static mesh to find a corresponding data asset. (spawning a resource actor from foliage when interacted with).

I'd love to use some sort of tag or enum system, but that obviously isn't built into the basic foliage instance static mesh.

Any ideas? I'd rather not do a series of branches for each resource type.

faint pasture
#

Are you painting in editor?

#

I think foliage has a per instance custom data somewhere right?

glossy cloak
#

Painting for now. I'd like to experiemnt with the procedural tools though.

#

per instance custom data... I'll check. That would 100% work.

faint pasture
#

I mean worst case you can just have a mapping of mesh to data asset or whatever

#

SM_Tree -> Wood
SM_Rock -> Stone

glossy cloak
#

Not that I can see.

glossy cloak
faint pasture
#

map container

glossy cloak
#

Oh right.

#

Durh

#

Yeah. That's actually a good solution. No custom data from what I can tell.

#

Idk why I didn't consider a map. This is why I came to the professionals. XD

queen ore
faint pasture
glossy cloak
#

This was so much cleaner than I was originally anticipating. lol. Thank you.

queen ore
#

this is my current value , its hard to say if i shud go low or high. The order of explosion is always the say tho

faint pasture
#

tune it to taste, it's your game. You decide how big an explosion should be

lunar sleet
#

inner radius same as outer radius might be a problem but 🤷