#blueprint

1 messages · Page 373 of 1

storm solar
#

I set braking and air control to 0 and that didnt get it to work.

barren tangle
#

Hi, How do you setup a material parameters for a specific material when you have multiple material on a mesh ?

maiden wadi
#

You can use CreateDynamicMaterialInstance to get or create. If you do not specify a SourceMaterial that is all that function does.

grave crow
#

Amazing,, empty level in standalone player, GetAccurateRealTime on tick takes 0.17ms in BP VM. Never noticed until finally had time to open profiler

narrow pulsar
#

A question, when I sapwn a projectile and run authority checks on them it always return as having authority even if I created them on owning client. How can I actually check if it was created on server or not?

surreal peak
#

HasAuthority is based on the local NetRole of an Actor.

narrow pulsar
#

Dont have any IsServer in c++

surreal peak
#

A replicated Actor that is spawned by the Server and replicated to one or more Clients will have ROLE_Authority on the Server and ROLE_SimulatedProxy on the Clients, with the exception of Client-controlled Actors (e.g. Pawn/Character), which have ROLE_AutonomousProxy locally.

narrow pulsar
#

Right now im jsut doing const bool bIsServerWorld = HasAuthority() && (GetNetMode() != NM_Client);

surreal peak
#

If you spawn an Actor, replicated or not, on the Client manually, then it's local NetRole will be ROLE_Authority, cause that Client has authority over that Actor (an Actor that also only exists on the Client and has no mirrored version on other connections).

surreal peak
narrow pulsar
#

my bad

surreal peak
#

Check the NetMode of the World.

#

GetWorld()->GetNetMode()

#

NM_ListenServer NM_DedicatedServer and NM_Standalone fwiw.

#

Or, depending on how they are ordered, just check < NM_Client.

maiden wadi
#

Worth the general note that IsServer does exist in C++ too.

narrow pulsar
#

Yea so I guess im doing it right hmm (I'm doing GetNetMode() != NM_Client)

surreal peak
#

I would give you the tip to properly cover "non-Client" as opposed to your specific Server-model, cause if you ever end up wanting to support Standalone or the other Server-model, you gonna have to fix a lot of crap.

surreal peak
#

Cause I would always avoid including those monsters.

#

Very very often they just do the exact thing one can do without them.
IsServer might just get the world from the context object and check the netmode.

#

Just with the added "benefit" of including half the engine and CoreMinimal alongside them :D

astral stratus
#

does anyone know the GAS system?? id like to ask a couple questions for guidance if possible

maiden wadi
astral stratus
#

thanks!

visual spoke
#

Hey, I have a quick question
If I have music for the environment, and I want to pause it when you get to the boss, would I do that in the level bp? If so, how would I make it stop when the boss' music starts playing?

frosty heron
#

Example:

Begin Overlap with boss arena box-> get actor of class (music manager) -> play music.

#

The music manager can hold audio component. Use that to play / fade / replace music.

steep oyster
#

I am the problem

hollow arch
#

anyone know how to fix? I have a pcg grass preset graph, for leaves (then just flat static meshes i got from megascans, I also using a pcg preset grass for actualy grass too, but anyway..) and for some reason it doesnt put my shadow on the leaves, it just puts it on the landscape through the leaves.

visual crest
#

I want to export render target and then import the created texture but I am not having much success in this. Any one know a good tutorial or how to do this?

tropic torrent
#

yow what the hell 😭

maiden wadi
next hollow
#

I know an actual spaghetti pure chaos graph that is used in a published game. lol

arctic elm
#

Hello.
Why is my object cast to an incorrect type?
Context Sub Class is BP_GOAP_Blackboard. However, output of that node is BP_StateMachine_Blackboard.

This is how have defined the GetContext function in C++.

UFUNCTION(BlueprintCallable, meta = (DeterminesOutputType = "ContextSubClass"))
URpStateMachineBlackboardBase*GetContext(TSubclassOf<URpStateMachineBlackboardBase>ContextSubClass)
{
  return StateMachineBlackboard;
}

What is going on?😟

maiden wadi
arctic elm
# maiden wadi Where do you create StateMachineBlackboard?

In the BeginPlay function of the C++ base class of the blueprint.
The blueprint call is also called in BP_BeginPlay after the C++ class has created the StateMachineBlackboard.

void URpGOAPComponent::BeginPlay()
{
  StateMachineBlackboard = NewObject<URpStateMachineBlackboardBase>(GetTransientPackage(), StatemachineBBClass);
  Super::BeginPlay();
}
maiden wadi
#

Also why are you creating this with transient package as the outer instead of the component?

arctic elm
arctic elm
maiden wadi
#

Just swap that for 'this'.

#

StateMachineBlackboard = NewObject<URpStateMachineBlackboardBase>(this, StatemachineBBClass);

#

You should only use the transient package when you don't have a valid thing to outer something to, or you want it to be managed by something not in a world. Since it's part of this component, it should be outered to it.

fiery swallow
#

Aged like fine mother fucking wine goddammit

#

I'm this close 🤏 to being over it

frosty heron
#

so it's just a subsytem that throws a UWidget and keep it alive X_X.

#

because that's what I write my self for my own loading screen solution b4 someone mention Lyra.

#

now replacing it might be a waste of time.

#

there's a hitch but quiet tiny on my end. I used Open Async level to load the world.

fiery swallow
#

My entire world loads on a persistent level due to some pass inexperience of team members, the loading is so heavy and indeed some thread was crashing that appears to have stopped a long with some errors that couldn't really be explained

#

kudos for loading your levels a good way :

#

Happened way less on DX11 though

surreal peak
#

The Movie Player thing is a funny thing. Iirc it actually blocks and manually ticks the most important parts of the Engine. That doesn't include other threads.

#

Had to find out the hard way. Manually brought up a LoadingScreen with it, then kicked off an UpdateSession call which had to succeed before the game would travel and on the other end tear down the LoadingScreen.

UpdateSession with Steam runs on some AsyncTask thread and thus never progresses while the MoviePlayer blocks almost everything. Literally soft-locked the game with that.

frosty heron
#

How does one get the loading bar progress value for loading screen?

#

for both hard travel and server travel

surreal peak
#

Some games fake it with bar that fills over time and then suddenly jumps to 100% if it took less time, or sits at 99% if it takes longer.

frosty heron
#

There's a loading screen in the market place that have a progress bar.

#

Not sure if they fake it

#

I will take a look at the source code later

surreal peak
#

You can probably get some numbers from the Asset Loader.

#

And base the progress on the Assets being loaded or not. But I don't think there is a progress for the travel itself.

#

There is also a lot of stuff going on, potentially even in your own game, that can causes additional "loading" of stuff.

#

In our game, we know that the game needs to load and spawn tiles and structures and how many of them. So we can show a progress bar for that.

#

But that's obviously our own numbers and that differs per game.

#

A LOT of games don't care about the bar anymore and just show a throbber to indicate that the game isn't stuck and the user has to wait.

frosty heron
#

Gotcha. So I guess its about structure and managing assets.

dark drum
#

When I did some procedural generation stuff, I hooked into the different stages I setup for initial loading. Things like Loading Terrain Data, Generating Terrain, Spawning Terrain, Loading Terrain Fluff, Spawning Terrain Fluff etc...

They usually took different times to complete but gave me an idea where it's at.

frosty heron
#

@surreal peak hopefully this doesn't come as a random ping since we have discussion earlier.
I take a look at the plugin in the market place, they use

float FAsyncLoadingThread::GetAsyncLoadPercentage(const FName& PackageName)

to get the percentage. I guess it's good enough to check the value for the world being loaded?

crimson briar
#

Uh, I have some weird Static Mesh COmponent behavior.
I dragged a Mesh straight from the content browser into the blueprint hierarchy. I changed the collision to match what I wanted. But it somehow kept the old collisions.
After some work and testing it turned out it seems like it refuses to change the collision setting? But only on the SMC that was dragged from the browset. The SMC added with the +Add button works correctly. Even though everything is the same...?
On the screenshot I have set the details panel to display only modified variables but I checked with a full view myself and didn't see any differences. Restarting the engine didn't change anything.
Why???

#

Now I deleted them both and readded them and suddenly it works on both?
My mind is blow what the heck happened there.

#

I can't replicate it again lol. Only this one component somehow got corrupted and wouldn't have correct collisions for some reason.

#

Thanks for wasting my hour unreal.

surreal peak
#

But only on the SMC that was dragged from the browset.
Unless you made a custom StaticMeshComponent, you probably dragged a StaticMesh Asset which automatically added a StaticMeshComponent to the Actor and assigned the dragged Asset.

crimson briar
#

Yes, that is what I wanted.

#

But the collisions couldn't be altered in the SMC

#

I replaced it now, deleting previous SMCs and it works, even though I did everything in the same way

#

Just very weird, It's never happened to me with a basic component like this

dark drum
crimson briar
#

Hmmm, maybe, but everything else was updating properly

#

But yeah, I should've made sure to replace the actor in level too, maybe it would've fixed it right away

maiden wadi
atomic hollow
#

Hello guys how can i connect scene component to bone of skeletal mesh with constraint?

wheat citrus
#

I have been seeing some reports from about 3 years ago, that large data tables with custom structs can brick a project. Has anyone here experienced this or know that it occurs? If so is it still an issue or has it been fixed, and should you then always use DataAssets instead?

dark drum
last peak
#

That is really easy and works perfectly fine even in a bp only project

#

You can also use uobjects instead of structs if you dont plan on having 1k+ of them

shut blaze
#

Anybody have a setup for making a widget sit exactly on the mouse cursor's XY position?
(not talking about switching the mouse cursor)
My current setup seems to not work properly in the viewport :/
Does this only work in fullscreen/final game?

maiden wadi
shut blaze
#

oh wow, thanks, last time I unchecked it, it didn't work also 😅

maiden wadi
#

I wasn't sure if that would work, but it makes sense.

charred berry
#

I have a collider that allows player entry to lift, which works great, but as that is ticked on, a pair of doors is slide open but it’s only supposed to open when player walks on collider inside lift, what might be causing premature aactivation of doors?

#

5.6

trim matrix
#

hey, im having an issue w setting location of my player, but only if the player is running rn, if they hold shift they can run, but if they hit a trigger in level its meant to warp them to another location, and it does, but if the player is running at it when they warp to the new location their speed continues even without input being pressed and the only wat to undo it is to press the movement input for the direction u were holding when running, ive tried to use disable and enable input setting velocity to 0, consume movement input, setting my running bool to false, but nothing works, the only node im using to stop the player is this, and then the warp calls another fucntion after warping on the player, how could i fix that?

maiden wadi
trim matrix
maiden wadi
maiden wadi
trim matrix
trim matrix
#

what would be causing loading into a level ( like a bp using open level by name) to spawn the player outside the level away from the player start but playing in editor w the level open plays just fine

#

its only this one level giving issues, loading other levels by name works just fine w spawning at player start but this one spawns me outside of the map, player start exists and isnt colliding w mesh or anyhting

gritty plover
#

I'm cooking up some truly terrible blueprint work right now. Is there any way to combine the functions of the "In Range" and "Switch on Int" nodes so I can just plug one Integer into one node and have it fire like 3-4 execution pins based on multiple, custom ranges?

maiden wadi
#

I don't think there's anything like that. I'm not sure there's much wrong with what you're doing. But would need more of a concept understanding to say.

faint pasture
#

no need for the in ranges

#

but what is this doing anyway?

#

seems sus

gritty plover
# faint pasture but what is this doing anyway?

It's just tied to a very repeatable action. So every time the player does it, it increments the integer by 1. And then I want it to do something different for if that integer value is in different ranges, i.e 2-11, 12-21, 22-31, 32+.

faint pasture
#

Is there math to get from count to action?

gritty plover
#

The ranges I just arbitrarily hard set. No real math should change the ranges themselves on the player's side.

faint pasture
#

yeah just cascade them

#

if > 1, if > 11, if > 21, if > 31

maiden wadi
#

Count/10 for instance. 0-9 is zero. 10-19 is 1, 20-29 is 2

faint pasture
#

yeah (count - 2) / 10 or something of the sort will do it here, all depends on where these ranges are coming from

gritty plover
#

Hmm. I'll definitely keep that in mind.

storm solar
#

So it looks like my play montage - on completed fires when the End section of my animation starts. not when the section is actually done. How do I set it up so it plays the rest of the animation and than fires the on completed execute?

faint pasture
#

yeah curve might be the play here

#

although if it's fundamentally an integer at the base it might be a bit wonky

charred berry
#

/authaer

#

when player rolls over that, its suposed to remove collision to gain access to lift wihich it does, but its also making the lift doors seen in red, quickly dissappear, go somewhere ODD I know.

#

also of note, in ediitor when I click highlighted box collider, it highlights everything in lift, is this the issue ???

#

also does it if I just click on lift.

#

lift BP

charred berry
#

for whomever is left, its definitely the order of components in BP

next hollow
#

click on the arrow in the components tab, and in its rotation section, should be a little dropdown to the right/ left, and it should have the option of relative, or world
make it world, so that only world rotation effects it, so relative model/ pawn rotation doesn't mess with it.

wheat citrus
wheat citrus
#

perfect, thanks

white parrot
#

Also exposing properties (EditAnywhere, BlueprintReadWrite.. etc)

frosty heron
#

Never ever ever use EditAnywhere on component pointer, otherwise you will break things including your bp.

ruby shard
#

hi, does anyone know how to change the cable model in cable component with a custom model?

ocean cloak
#

I'm having trouble getting my Widget to show up on the screen. I have a simple HUD with an image in the center, but when I press Play, nothing appears.

Here is what I've done:
1․Created a Widget Blueprint (WB_HUD).
2․Added Create Widget and Add to Viewport in my BP_FirstPersonCharacter.
3․The logic is connected after the Enhanced Input Local Player Subsystem setup.

The execution line seems to reach the nodes, but the screen stays empty. I've checked the Anchors and Visibility, but still no luck.

crimson briar
#

Show code and your widget hierarchy

ocean cloak
crimson briar
#

I assume you already checked with prints if the code is 100% reached there?
And that this character is the same one that is used in gameplay?

white parrot
maiden wadi
#

You don't want to call this on beginplay. It'll fail in some cases. Character's Beginplay will run before possession outside of PIE

crimson briar
#

Can I somehow get rid of this warning?
"LogNetPackageMap: Warning: FNetGUIDCache::SupportsObject: StaticMeshComponent /Game/_TavernGame/Maps/UEDPIE_0_WIPLevel.WIPLevel:PersistentLevel.BP_MerchantStall_C_5.StaticMeshComponent_6 NOT Supported."
I think it happens because I attach a locally created static mesh to a replicated actor, but it is something I want to do for now

maiden wadi
#

You should be able to attach locally created meshes just fine. That doesn't look like an attachment issue though.

crimson briar
#

hm

maiden wadi
#

Looks like it might come from replication.

crimson briar
#

Maybe it is some chaining issue then? I have a MerchantCrate, it is a StaticMesh child. It is replicated and added to a merchant stall.
Then this MerchantCrate adds another standard StaticMesh with a price (Add Component to GetOnwer), this one is not replicated. It is spawned separately for listen-server and clients, I have checks to not duplicate anything

#

Hm, no, seems to be caused by attachment, but dunno why since it is attached locally separately

maiden wadi
#

From what I can gather. This log comes from a function that runs when the server is trying to ask if an object is supported for networking. But shouldn't run if the object hasn't been marked replicated, or explicitly added to the replicated subobjects list.

#

Can you run with a C++ debugger attached by chance?

crimson briar
#

Good idea, I'll see. I haven't fully figured out rider yet though, so not sure

worthy frost
#

all attachments are replicated by default

#

you can turn that off

maiden wadi
maiden wadi
worthy frost
#

nope

#

unless he ticked Replicated

#

on the static mesh component itself

#

(which will never work)

crimson briar
#

Honestly I personally have no idea. Every time I need to use attachments in multiplayer I have problems. I could use some serious course about attachments and multiplayer ._.

maiden wadi
#

I dunno. I'd breakpoint that function above for the log at the bottom of it. See where your callstack is saying the call came from and why.

worthy frost
#

its cause i assume this is listen server

#

and listen server is attaching it, which then it goes through replicated attachment on the actor

#

and that would only happen

#

if the actor is replicating movement

#

DOREPCUSTOMCONDITION_ACTIVE_FAST(AActor, AttachmentReplication, IsReplicatingMovement());

#

unticking Replicate Movement on the actor will stop it repping the attachment

#

@crimson briar

crimson briar
#

Oh, interesting

#

Hm my actor is not replicating movement

worthy frost
#

make sure no components have the component replicates ticked

#

in your bp/c++

#

like staticmeshcomp etc

crimson briar
#

Is the warning happening because a not-replicated SM is attached to a replicated SM?

worthy frost
#

you cant replicate staticmeshes

#

they dont support replication at all

crimson briar
#

What do you mean, they do. I mean, SM Components

worthy frost
#

well they kinda do but its not a normal thing to do. most people keep them all local to avoid issues

#

including ism's

#

but yeah possibly thats the issue

#

but never ran into it, cause we dont replicate SM Components, etc

crimson briar
#

Yeah, I was trying to be fancy with the solution here and it backfired as always

#

Thanks for the help, I'll mess around with it to see how else can I set it up

maiden wadi
crimson briar
#

Yeah, after I enabled replication on the Plaque mesh, then I got the same warning on the text renderer mesh that was attached to the plaque.
I think I need to scrap this whole thing, I don't need so many things to be replicated, that was the point of making it like this. But since it seems to be an incorrect approach, I guess time to remake it

maiden wadi
#

What was the original intention?

crimson briar
#

@worthy frost if you have a second more though, how would you recommend approaching something like this?
I wanted to make crates that are on a BP_MerchantStall, with some functionallity inside the crates. So I made the crates a child of static mesh and they hold a few simple variables (like a name and a price) and a dispatcher for when they were interacted with. And MerchantStall oin server spawns them replicated.
I though it would be a flexible solution, I could add crates easly and move them inside the stall.
But then I wanted to add an ISM attached to the crate with the items inside of it and a plaque with the price that didn't need to be replicated aaand a warning happened... And even though everything kinda worked the warning was troubling.

#

Now that I had to describe it it sounds like a major case of overengineering 😅

maiden wadi
#

If you want the simple version. The crates can be their own actors that manage their own meshes(both the crate itself and it's contents) and just notify their owning stall when they're interacted with. And the stall can manage them.

If you have a ton of these buildings, and don't want to make the crates actors it's a little more complicated managing the meshes internally in the stall, but you could do it through some mapped data management.

So you're either replicating an actor with some data, or replicating data that the stall can create meshes from that aren't replicated but are index addressable for your interaction maybe.

crimson briar
#

Yeah, I'll probably see how much of a pain it would be to manage the meshes from the stall itself. I would like to avoid using actors for them since they only have 1 interaction and only teleport between 2 places (stall and a buy stack) that have predetermined locations.

icy imp
#

I am looking for advice on an indicator for a minimap. The user is able to zoom in and out and when max zoomed in, the camera tilts to a horizontal view. The indicator for the minimap would be a trapezoid except for when zoomed in. I could swap out the indicator for the zoomed in max, but how can a create a procedural trapezoid widget?

steady night
#

hi question regarding

when i order another ai moveto, the unit stops and thjen walks to next target, is there a way to not making him "stop" current movement and just like change the destination

maiden wadi
buoyant walrus
#

Guys who can halp me with Blueprients? I need somebody who really knows everything about it, because all day i trying find answer for my question. but i cant

#

I made an Item system using a Master Blueprint with child classes. Some items can be picked up only once, inspected, added to the 'inventory', and disappear from the scene. The second type of items is just for inspection. They can be picked up, inspected, and put back in place.

PROBLEM: After I interact with an item and put it back, the next time I try to pick it up, it doesn't attach to the camera, but attaches to the location of the first interaction.

maiden wadi
buoyant walrus
maiden wadi
#

Can you show your pickup/drop code and the item hierarchies?

#

Kind of looks like some sort of state is set and not updated at the next pick up. Would need to see the inspect/pickup code.

buoyant walrus
#

This start and finish logic

maiden wadi
#

I believe your issue might be that you're detaching InspectLocation.

#

Here. You want to detach the ItemToInspect, not the InspectComponent.

#

@buoyant walrus

#

You may also want to switch to saving and using world space instead of local space locations.

buoyant walrus
#

Ohhhhh i changed it, and now it looks so

#

With world location this iteam also go flying

#

In stratosphere

icy imp
# maiden wadi What controls the tilt?

It is in the player controller. When the user uses the mouse wheel, it scrolls in and out, it uses a curve based on the zoom level to adjust the camera tilt.

steady night
#

hmm, why dose my Struct get reset each timer i open the proejct ?

#

(i do not change anything in it and save)

#

i have it on a actor component then the component is on my character :/

maiden wadi
icy imp
maiden wadi
dreamy mountain
#

is there something to check if a character is inside the collision that isnt begin/end overlap?

#

i would use this but if i have multiple bugs inside, and one leaves, that would break the logic and set it to false in theory

crimson briar
icy imp
maiden wadi
# icy imp It is just an icon. I am looking forward to seeing your solution.

You can do a material for it. Set the icon as a texture parameter. Then that same material can use a MaterialParameterCollection to get the zoom level which you can use to drive some UV morphs. Should be some pretty trivial 2D math.

Then when you zoom you just update this MPC value.

You send a single value to the renderthread and your icons magically just work. No need to tick them or iterate them all every zoom change.

frosty heron
#

client side or not makes no difference what so ever

#

Running overlap every 1 second is indeed counter performant and unnecessary.

#

Have an array of actor. In begin play, add all the current overlapped actors.
From there, just have BeginOverlap -> AddActor to the array
And EndOverlap->Remove actor from the array

hollow arch
#

anyone know how to fix? I have a pcg grass preset graph, for leaves (then just flat static meshes i got from megascans, I also using a pcg preset grass for actualy grass too, but anyway..) and for some reason it doesnt put my shadow on the leaves, it just puts it on the landscape through the leaves.

hardy merlin
#

I am using Soft Object pointers to establish connections within a level. Is it possible to restrict the options to actors that implement a particular Interface?

#

Alternatively, is there a way to use Soft Object pointers for an instantiated Component instead of an entire actor?

frosty heron
#

soft ptr is like a path. until you load it.

hardy merlin
#
  • Create an actor with a public variable of type Actor Soft Object.
  • Spawn the actor in the world at edit time.
  • At edit time, open the object's Details and set the variable to any other object that's currently loaded.
#

It's amazing.

maiden wadi
# frosty heron how do you exactly "establish connection within a level" with a soft ptr to a le...

This is why it works. Cause anything is resolvable by path. If you have an object's pathname you can look it up because that is a path of it's outers and itself.

Your pathname starts at the package. Normally this resolves to a data asset, or table, or mesh. From the content browser. Cause these are in their own packages. And you're telling it to search that package.

Levels are contained in packages as well. And you can have multiple levels in said level. So you get the packname like Package.PersistentWorld.Sublevel3.SomeActorThing

maiden wadi
wheat citrus
#

What is the cheapest shape trace there is? I’m guessing sphere? And is it cheaper to just doing 4 line traces to create a bounding box instead if the object you want to check against is always larger than the spheres radius?

frosty heron
frosty heron
hardy merlin
maiden wadi
hardy merlin
#

If you want better performance, worry more about caching or re-using the trace data instead of which trace is cheapest.

wheat citrus
frosty heron
#

maybe you should just go with any trace you like and stress test it.

hardy merlin
hardy merlin
wheat citrus
# hardy merlin You mean 100s of bullets? Like a bullet hell?

It’s on a decently sized (3d) map with multiple players. If each of them shoot into the open for a few seconds there will be hundreds of bullets. (It’s vehicular combat so multiple weapons can fire at once). So I’m trying to make a more lean variant of the projectile movement component essentially.

hardy merlin
#

Wait, how fast are these bullets moving?

wheat citrus
#

Different speeds but usually not super slow. Like multiple hundred to thousand units per second.

wheat citrus
crimson briar
#

Mathematically sphere trace looks to be cheaper than 4 traces. Line trace is a start and an end. Sphere trace is a center and a radius.
But It depends how the engine itself implements and optimizes them so not sure if you will get a solid answer without testing your case

maiden wadi
wheat citrus
hardy merlin
hardy merlin
wheat citrus
# hardy merlin How long-range are the encounters? How many seconds do you expect a single bull...

For the slower bullets they could be in flight for 5-10 seconds worst case scenario. Current plan is to have a bullet manager that manages an array of structs containing just

  • Position
  • Direction
  • Speed
    And updating each existing bullet by tracing over the distance it should have traveled in the delta time since its last update. If there are many bullets the bullet manager should batch them to update over offset frames.
#

The visuals I then fake with a Niagara particle system

hardy merlin
wheat citrus
hardy merlin
#

Try it out and then profile before writing your own system.

steady night
#

hi guys i need some help

#

im moving all my units in an array to a location

#

but i want them to end in a formation like a line/ stacked formation etc,

#

if i just add values to the cached desination for the array index

frosty heron
#

EQS

crimson briar
#

Or math

frosty heron
#

math alone not gonna give you decent result.

#

you need to query the environment.

maiden wadi
#

Does this actually work? I'd expect this to break given it's an async node being called multiple times

crimson briar
#

Yeah, depends on the required complexity

frosty heron
#

You need to add context such as what's blocking, what position can be filled, which path can be taken.

#

math will be part of the EQS.

#

but doing AI movement without EQS = no way it give decent result in my experience.

#

something blocking == things break already.

crimson briar
maiden wadi
#

It still bugs me. This feels like an encapsulation breach. I'd really expect a function on the units to be called that can check their death status and do their movement stuff.

steady night
#

EQS?

maiden wadi
#

Environmental Query System

steady night
#

since im adding to the locations value i need to acount for the unit rotation towards that location

steady night
#

any advice on how to take the units rotation into account ?

frosty heron
#

or walls

steady night
#

aye thats fine i se thath

#

that can be solved by just some tracing thats no worries

crimson briar
#

I guess you could rotate the final relative vector by a look at rotation towards the click point? Just a thought though, I haven't done this specifically

frosty heron
#

not really, just use EQS it already query all the pathable point. Then you just make some rules where the unit should be positioned best. E.g in line with the leading character.

steady night
frosty heron
crimson briar
#

But if you intend to use it in non-empty enviroment anyway, I think looking into what ColdSummer suggests is a better idea

steady night
#

well this will be flat tho dose that matter then =?

frosty heron
#

No walls? Nothing blocking? Ever?

steady night
#

oh i tought u mean heights *

frosty heron
#

No, not height specifically

#

Obstruction more like

steady night
#

aye gotcha

crimson briar
#

Well if it was a space invaders type of thing I wouldn't bother with EQS for example.

frosty heron
#

Simple move to is fine for prototype

#

With real dynamic environment, you can't get far without EQS imo

#

It's not like you throw away your math.

#

You will need that to rule out which point is best for the A.I to go to.

#

My use case was diamond formation. With main character at the front, 2 wingman npc and a support at the rear.

Kinda pleased with the result.

steady night
#

aye i se your point

#

but for prototyping i will test this first, if i get to tthat point i will look into EQS

#

ive written it down as usual whycry

#

But now for my math problem, how would i includ the Rotation to the foramtions location :/ ?

#

the rotation recieved is for the "command giver" so its a set rotation, i need to use it to calculate the angle i guess and add to the x or y value only

#

or wait, is it just as simple as adding the rotations value -.- hmm

frosty heron
#

don't you just need them to be in the rear of each other?

steady night
#

well im going to do a set of formations u can choose from

#

like so

frosty heron
#

yea totally should use EQS, but where do you struggle.

#

the first one is just a line, if it start from player, unit 1 , unit 2.

#

then unit 1 position is player right vector, multiply by X unit.

#

unit 2 position is player right vector, multiply by Y unit.

#

don't know why I did this on my end, I could just get the right vector.

steady night
#

so sumtihng like this ?

#

well no..

frosty heron
#

array index 0 will give you the same position as the commanding actor

frosty heron
#

because 0 * 100 is 0

steady night
#

yeah but first actor will be where u click so that fine

frosty heron
#

that looks correct to me, more or less

#

the move to command probably stop at some point when it's close enough.

#

there's like tolerance

#

what looks wrong in the video? the orientation of each units?

#

oh wait

steady night
#

well they should always end up at the moving units "side*

frosty heron
#

It's Commanding Actor Location + ( Commanding Actor Right vector * ( array index * unit))

#

get actor location here

steady night
#

well that wont work

#

the move to location is where i click

#

the problem is that

crimson briar
#

You need to calculate right vector from the direction between the initial character and click point, at the click point

frosty heron
#

this is sooooooo much easier if you just bite EQS.

steady night
#

im gettting the commanding actors location when im clicking, so when he end up at the location, hes right vector is another direction from start

crimson briar
#

I don't remember how to do that though lol

frosty heron
#

the units will just force them self to be at the rear or inline with the character.

#

it will keep performing calculation, so they are going to eventually be at the rear of the player or in line. Where ever you set the goal to be.

maiden wadi
#

You just need to transform the location from a transform made from the rotation from the commanding unit to the click location and the click location.

Use said transform to transform the local space formation offsets into world space.

frosty heron
#

you can't even tell where the player going to orient them self when it reaches it goal.

#

so if you just perform the calculation frequently, that would be a solution imo.

crimson briar
#

Yeah, they might end up not facing the same direction, but the location will sort of work

maiden wadi
#

The facing direction is the look at rotation.

crimson briar
#

Unless you added some more code like saving the initial predicted rotation and setting it when the character completes the movement

#

But at this point.. maybe EQS

steady night
#

Authaer always has a solution tho for us n00bs

crimson briar
# maiden wadi The facing direction is the look at rotation.

Yeah but you use it to calculate the location. Characters may bump into each other and reach the location from different sides. So after the movement ends facing will not match, AI MoveTo doesn't have an option to force facing automatically

maiden wadi
#

Yeah, but that's an AI issue. He needs a real BT or ST solution to do that correctly.

steady night
#

yeah

maiden wadi
#

Alternatively, you could put a focus point directly in front of where they're moving to.

steady night
#

the end rotation is the find look at rotation, that would work if i includ it somehow right, but how would i add it

maiden wadi
#

You can't without doing focus points. Which will make them look at that point while they're moving too. If you only want them to rotate that direction, but rotate normally while moving to the point you need a BT solution to do it easily. Sequence a MoveTo then Rotate

steady night
#

the rotation part is no issue, i just want the formation to end correctly

maiden wadi
#

For your formations. It should be fairly easy with this given your current inputs.

steady night
#

well as u said it work, however the AI is the problem but as aspected

#

the only "problem" for this prototype is when changing direction the unit arrays wants to switch places

#

you have any ideas for that ?

maiden wadi
#

Figure the point locations into a world space array of vectors, and find the closest point for each unit. Making sure to remove said point from the array before finding it for the next unit.

#

May need to figure the command unit specially to go to a specific one. This only works for more generic unit formations like this though. Where it doesn't matter if Steve or George are on the left or right of the commanding unit.

#

In like RPG style games where you need the formation to be special, specific unit on the left, specific unit behind. You'd keep the original and make sure those units indexes are stable.

steady night
#

hmm yeahm, i do however have a ghetto solution i think

cold raft
#

Hey, how do i recreate this variable? Got a new pack and its requires a Class Reference as a key. How do you even select a generic class Reference.

crimson briar
cold raft
#

then i get a object class reference

#

i cant connect it to just class reference

mental trellis
cold raft
mental trellis
#

Fine! 🙂

cold raft
#

yeah but that doenst work

mental trellis
#

What's the source you're trying to connect?

cold raft
#

this is what it expects

#

thats the whole thing

crimson briar
#

Hm, I'm not familiar with there being a "Class" type available in BPs

mental trellis
crimson briar
#

You can drag from the pin with this type and try to promote to a variable but dunno

mental trellis
# cold raft

Instead of adding the find and add nodes beforehand, drag off the pin of your world screen map and add the nodes using the menu that appears then.

#

(and don't use the red-labelled pin)

cold raft
#

those are not compatible

crimson briar
#

Maybe ask in #cpp if this is something only available via C++

cold raft
#

this is weird because this pack uses no C++

mental trellis
#

They should be compatible. :/

cold raft
#

how did they even select class refenece

crimson briar
#

I would assume they have C++ parents

mental trellis
#

Are all the objects in that map menu classes?

cold raft
#

i ll just change it to object refences

#

Now it works

mental trellis
#

Lol

cold raft
#

maybe that was a thing in the past

mental trellis
#

Might have been a soft object class, not a regualr one.

#

That's probably better to use.

cold raft
#

also here

maiden wadi
#

Feels like a module load order issue maybe?

#

I've never personally had it, but people have that a lot with CommonUI.

cold raft
#

something is defenitely wrong

surreal peak
# cold raft also here

Unless you selected that, that usually happens when the original type isn't available (anymore).

#

Since the variable is called ActivatableWidget, I assume these are CommonUI widgets.
If the Plugin is enabled, then it's potentially a load order issue, as Authaer suggests.

cold raft
#

Hmm you are correct

#

it was another project didnt have Common UI plugin enabled

hushed orchid
#

hi, we are using raytracing and the shadow is so strong that when looking from a bit far, it feels very dark. How can the shadow strength be reduced?

We are using archviz explorer with UDS plugin, 5.5 version, thanks for answers

Note: Shadows are too dark that space between towers is very dark at certain directions of sun. We are trying to maintain ideal lighting even if sunlight comes or not - something like skylight

but if i try to increase intensity of skylight in UDS, buildings become white

crimson briar
# crimson briar <@341285849301909506> if you have a second more though, how would you recommend ...

Managed to make it work by switching to adding every mesh clientside as you guys suggested. And keeping two arrays on repnotify. One containing crate simple data required for displaying them and one containing IDs of crates that were moved to the second zone.
I think yeah, it turned out better this way. I had some more code to write to manage the arrays but looks like it is a better approach than replicating the crates themselves. Thanks for the tips.

#

The custom mesh component itself still spawns everything it needs by its own (changes mesh, adds ism, plaque mesh, text renderer), so the only thing that the stall keeps track of is this custom crate mesh component.

near wolf
#

can someone tell me what Im doing wrong?

#

I'm trying to expose a variable to rotate the wheels of my car

#

the wheels are driven by a rig with an arrow that moves left and right

autumn pulsar
near wolf
#

I only want to be able to rotate the wheels left and right

#

in a place

#

not driving

maiden wadi
#

Where are you expecting it to change? In a new game in PIE or in the little window in the animation blueprint?

near wolf
#

the goal is to create a widget with a slider or parameter where in game I can change it and it will make the wheels rotate

#

but so far I'm just trying to do it in the editor

#

with an exposed variable

#

I have the wheel steering variable in the details pannel

#

but it's not working

maiden wadi
#

Does it work in your animation blueprint if you change it there on the transform inside of that?

maiden wadi
#

Okay. Good. Then in your Beginplay thing

#

If you put that float to 100. You get the same thing if you play in PIE, right?

#

Or simulate, either way works I think.

near wolf
#

and my car is glitching

maiden wadi
#

Try moving your code here to the Construction Script.

#

That'll force it to run every time you edit a details panel.

If you want to do this from like an editor utility widget, you'd need to call it the same way as you're doing here. It won't work just to change the float that way.

near wolf
#

it's not letting me connect the same way

#

also I wanna make it work with the variable first and then will try to move that to a widget

maiden wadi
#

That isn't the same node. Drag off of the mesh and do GetAnimInstance. It'll find the right one.

autumn pulsar
#

Hey, so I was thinking of doing an "armor/equipment" system, and that would involve swapping skeletal meshes. However I think I'd need some kind of base "skeleton" for the animations to copy the pose from?

maiden wadi
#

You could have copy pasted what you have in beginplay there.

near wolf
maiden wadi
#

O.o Sec

#

Hmm. Yeah, okay that wouldn't make sense to be fair.

Walking that back. You'd need to poll the property from your AnimBP's update event.

#

Or the car actor's tick, either way.

near wolf
#

By the way, it looks like the rotation is working from the graph, but the car is glitching and the wheels glitch between the original posotion and the rotated position while im changing the value

maiden wadi
maiden wadi
#

Yeah. You're basically looking for the leader pose stuff. I think Epic refers to them as Modular Characters usually for their docs.

autumn pulsar
#

Was looking into that, but I guess the "leader" component would need to hold all the animations

maiden wadi
#

I have a vague memory that there's a sample of this somewhere.

autumn pulsar
#

Are you a bot?

autumn pulsar
#

Was looking at this one

#

Seems like with leader pose I can't have anim dynamics per mesh

#

which is kind of annoying for frilly stuff

near wolf
#

yo guys, can someone help me with my bp

#

im still stuck

autumn pulsar
trim matrix
#

i have these doors that run a function on a timeline to open, i have a normal and a reverse to handle player opening doors on both sides, the close rotation is working ok for normal doors but the reverse version seems like it uses the normal close rotation, so it makes the doors rotate the wrong way, how could i fix this,

surreal peak
near wolf
#

sorry for the phone recording 😄 So I'm rotating my wheel using a variable and I'm getting that glitching

#

does anyone know why?

harsh nebula
# near wolf

That is mainly because you're altering the value in the editor and not during play. The value only updates when you stop moving the slider.

#

Finterp node requires you to be in runtime, eg after you push the play icon.

near wolf
harsh nebula
# near wolf the video above is happening in play time

Same thing applies. It's not updating the wheel until you release the mouse. Generally you don't use the details panel during runtime. You need to apply an input to get the steering to work correctly.

Also this depends on what you're after. Are you doing this for a cinematic or game?

near wolf
#

I just wanted to make it work first in the editor just to make sure itworks

harsh nebula
near wolf
#

but there is still some glitch effect going on

rough copper
#

Hello, I'm trying to make a decent drifting blueprint on Unreal 5, is this the right place to ask for help?

maiden wadi
solar needle
#

is there real homing missile tutorial that not actually using a dropper.there is 5 different target BP and homing missile only target 1

#

i am looking for missile hunt the tag on different acto BP

#

tutorial

maiden wadi
#

What do you mean by hunt the tag? Like look for actors with a specific tag in their Tags array?

solar needle
#

so i use get actor with tag i guess ?

#

do all homing projectile use scene component ?

maiden wadi
#

Probably, and yes.

#

If you mean the ProjectileMovementComponent's homing features.

solar needle
#

current youtube tutorial need dropper inside the scene at near end of tutorial

#

i want to make my missiles capable to aim hit at least 5 BP

#

actor

#

so i guess use all actor with tag ?

#

then for each loop ?

maiden wadi
#

It's an okay way to start, sure. Probably get them all and then filter for the closest one.

solar needle
#

i am newbie at this

rough copper
solar needle
#

i guess i make everything from scratch

#

no projectile movement comp

thin panther
#

Why? Your problem should be with selecting a target not making the missile move?

placid elbow
#

Hey everyone!

placid elbow
remote galleon
#

I changed the variable type "Player Pawn" from one class to another and now the blueprint is screaming in a million places (obviously), but the variables between the two classes are identical

#

Please tell me there's a better way to do this, I don't want to redrag and get every variable again

#

No, dragging and linking to Target doesn't work

errant snow
errant snow
placid elbow
placid elbow
errant snow
placid elbow
remote galleon
#

Isn't downcasting possible in bp?

#

I am casting to the c++ parent class of the pawn (that is currently a blueprint) and it fails?

errant snow
remote galleon
#

It was an owner issue in the end, nvm

warm hare
#

How do I go about making my BP randomize between more than two colors?

remote galleon
placid elbow
crimson briar
placid elbow
narrow pulsar
#

How do you guys recommend doing hit reactions? Bind animation to a GA and give ability & try activate once? Or you recommend some other way? Maybe a pose in AnimBP which triggers when we flip a variable?

velvet viper
#

Is there anyway to sort a map by its values (i.e. floats) in blueprints?

crimson briar
#

Theoretically maybe, but you shouldn't rely on map order. By design Maps are unsorted and you can't rely on the order of elements inside of them.

#

If you want a reliable ordering, use an Array

velvet viper
#

I’m trying to sort an array of actors by their ‘score’ value which I’m setting inside each actor; This ‘score’ value changes dynamically so the array order needs to change dynamically

What’s the best way to go about it, I’ve figure out how to sort the score values but it’s just finding which actor correlates with each score value as I’ve had to make them independent from each other

white parrot
crimson briar
#

But he will lose association this way

white parrot
#

Yeah it's not permanent. If the sorting by score is a one time thing then it's fine, or making it a function and caching the result

near wolf
#

Hello guys

crimson briar
#

I guess I would keep the data as a Place -> Actor ref map. Or just an array of actor refs.
Then on a value change, put all actors in an array, sort them with a manual code and put them back into the map.
I don't think there is a one-node solution to something like this in blueprints

near wolf
#

Does anyone know why this is happening?

#

my logic is pretty simple

#

I'm using a variable to move my control rig controller and rotate the wheels

#

but the car is glitching

velvet viper
# near wolf

nothing plugged into delta time and i don’t know if finterpto is being updated on each frame when it’s just off of initialized anim

crimson briar
# near wolf but the car is glitching

Is it glitching when you play with it or only when you change the details. These are two separate scenarios, it can be caused by messing with details and be fine when playing normally.

near wolf
crimson briar
#

Then show a video of you driving it

near wolf
#

what you see in the video above is in play time

crimson briar
#

...so why do you even use finterp?

near wolf
#

to make the wheels rotate smoother? Idk i'm just trying out things

crimson briar
#

Also the glitch can still be cause by the editor, try using a built in event, like rotating the wheels on a timer to see the effect

crimson briar
near wolf
#

I plugged event tidk delta seconds intoFinterp delta time

#

it kinda fixed it the first play and then it's glitching again

#

I'm not very sure what to do, I'm not really a BP guy

crimson briar
#

I would recommend first trying to do a rotation on tick or on a small timer, to rotate the wheels a set amount every X time. Or use finterp with the tick. Then you will see if it is still causing glitching

#

If not, it means it is the editor layer causing it. And depending on what is the car for - you either leave it as is, or you make an ingame widget to rotate the wheels, so the editor layer doesn't interfere

near wolf
near wolf
wheat citrus
#

You could also use a Timeline and retrigger it every time it completes. A bit obfuscated but you can adjust the smoothing as you prefer.

crimson briar
#

If it glitches like this on tick, there could be many diffenet culprits and I'm not too well versed in them. It could be either animation problem - a bad way of changing the wheels causing a recalculation of some sort. Or it could be a material problem - a similar glitch happens with materials using erm... I forgot the name of it, aligning to world or something. Or even a post process changing some stuff around. But I dunno, I'm a systems guy.

near wolf
#

it has to do with the blueprint / rig / animation

near wolf
#

I just created a widget, but it doesn't seem to work with the widget too hmm

harsh nebula
harsh nebula
# near wolf

I also noticed that your trying to set the wheel location not rotation. Is there any reason for this? As normally to turn the wheel you would rotate the wheel bones.

near wolf
near wolf
#

I also tried by rotating the bone

#

and it works, it rotates the wheels (from the editor and not the widget)

#

but I still get that glitching effect of the entire car

harsh nebula
near wolf
harsh nebula
#

In which case I'd recommend finding some tutorials on chaos vehicles and how to add your own vehicle. It might take you several hours, but once it's done, it's done.

Then you'll be able to use the vehicle movement component to control the steering. And also use the vehicle in other scenarios very easily.

Once setup this way your wheels will always touch ground even on uneven terrain and you should be able to link your widget to the steering variable in your vehicle blueprint which for this case you would directly set the steering without the finterp (repeat, no need for finterp) on the even tick. Basically the even tick will be waiting for the variable to update and when updated from the widget it will update immediately while moving the slider. Also throw out the idea of using control rig, it's more complicated than you need.

PS. I'm not fully up to speed on widgets, but you should have an option to update the slider as you move it, rather than it waiting for you to release the mouse.

dark drum
#

When using the 'Mover' component, i've setup the walking state with a transition (using the physics jump check) to move to the falling state. Is there not a transition for moving back to walking state when the actor lands?

Edit: Doesn't matter, i figured it out.

near wolf
sage glacier
#

Hey guys... im really stupid somehow... when i try run my game in standalone mode my game become unresponsive
music still plays and buttons can be hovered to reveal tool tip but clicking the button results in nothing..
ive debugged (evidentally terribly) for hours any new point of view itll be a big help..
ive played around with game modes and controllers for a while and no luck as well

dark drum
maiden wadi
sage glacier
#

its a main menu level using a WBP to create a widget for the first screen

maiden wadi
#

Do you get the pressed effect or only hover?

sage glacier
#

yes i get the visual effect of pressing

#

but no resulting action

#

also my main gameplay lvl is locked at the player start in standalone mode...

maiden wadi
#

The buttons are working in PIE though?

sage glacier
#

Correct

#

Working as intended in pie

#

im feeling gamemode or controller issue but i cant see what or why..

maiden wadi
#

Do you have the callback on the Clicked of Pressed event?

#

If Clicked, can you test Pressed?

#

There's a bug where you can lose focus between Pressed and Released, and it won't call the Clicked event if you no longer have focus.

sage glacier
dark drum
#

Does anyone know why in the recent starter templates, Epic separate mouse look into it's own input action? Is it something to do with the mobile stuff they setup in the templates as well?

harsh nebula
dark drum
# harsh nebula Mouse look is handled differently from a controller.

Not really, the only difference is how you'd set it up in the input action mapping beyond that, I can't see any reason why it was separated out.

It does look like in the controller they have it only added if not using mobile but that then makes me think why didn't they separate out the controller stuff as well so they don't get added.

harsh nebula
# dark drum Not really, the only difference is how you'd set it up in the input action mappi...

There's a big difference in how the logic is setup between mouse and controller. And also a difference in how the axis moves between the two.

With a controller there is a maximum axis limit which is why controller look is relatively slow compared to what you can do with a mouse. So you use raw inputs for mouse, but you do need to limit the maximum speed to a controller to maintain some form of control.

#

You asked and I told the simple answer.

#

PS. Mouse look has been differentiated for a few years now.

dark drum
maiden wadi
harsh nebula
dark drum
dark drum
maiden wadi
#

Do they do anything weird with them in code?

dark drum
harsh nebula
#

Here's the code between mouse and controller look

maiden wadi
#

I thought there was a delta multiplier in the IMC settings?

harsh nebula
maiden wadi
#

So yeah, technically there's no reason for the separation. They may just not have known about it or maybe it was added later?

harsh nebula
#

Yeah, there's so many little updates that sneak through. I just found out a week ago that they added a triplanar node for materials. 1 shader pass instead of the usual 3 with the current method.

dark drum
#

Yea, it can be a pleasant suprise sometimes. Usually when i look through the templates I can usually figure out why they choose to do something. (whether I'd do it that way or not) but this one has stumped me a little. Especially considering they but some more effort into the different template types for first and third person. Unless it's just down to the mobile thing but that all runs through interfaces anyway (called from the UI) so you won't need to add any ICM's.

harsh nebula
harsh nebula
dark drum
harsh nebula
#

LOL. so true.

Epic does do some overly complicated dumb stuff to be fair...

sage glacier
#

good way to waste 7 hours

floral stump
#

calling this in the level beginplay not working in shipping builds

#

I thought only console commands will not work, but how to enable this in shipping builds?

frosty heron
#

GameUserSettings should work 0o? I used that to save and set resolutions, AA and other options.

maiden wadi
#

I'd be interested to know if moving it to the PlayerController's Beginplay fixes it.

#

Level beginplay is a little weird between PIE and shipping. It happens much earlier on compared to other things than you realize outside of PIE

spark steppe
#

i feel like the game user settings have a high chance of changing the frame rate limit

#

tho, your intend isn't clear

white parrot
dark drum
white parrot
crimson briar
#

Did they add an easy way to have combination inputs together with non-combination inputthough? Last time I was doing something with shift clicks it was still kinda annoying

#

I mean situations where you have action on X and on X with shift held

floral stump
#

moved it to main menu controller

#

it only works if called from C++

hearty rain
#

what about game instance ?

floral stump
dark drum
sly rivet
#

hey, does anyone have any idea how gameplay cameras are meant to be used?
i've been trying the plugin and i'm not quite sure where i should be setting the variables, because the system exposes a few different ways
from what I've seen I can create a blueprint evaluator and have it output the values, or use parameters. I think this is what they want you to use, either via blendable or data parameters. But then, am I supposed to be setting them from the director, or is the director just there to blend camera rigs?

white parrot
maiden wadi
# floral stump moved it to controller, re packaged and it didn't solved it

No idea then. GUS is perfectly usable in cooked games with the calls you had. And contrary to your point, so are console commands for the most part.

I'm not sure what could be stopping the FPS setting though. In Atre we're still using GUS but it's wrapped in the settings system we pulled from Lyra. But it has some extra frame rate handling for like menus/mobile/etc.

maiden wadi
floral stump
maiden wadi
#

Yeah. Instead of having to transform them for the camera in code.

acoustic cradle
#

Hi guys, I am very new to Unreal and today I decided to challenge myself to move a cube. However, I was wondering whether importing an fbx of a cube from blender and then adding a skingular skeletal mesh affects moving it completely? I have done this in the blueprint under BP character class and I had also done the IMC. I had also changed all IA settings to 'Axis 2D (Vector 2D)'. I am unsure as to why it's still unable to move forwards and backwards using W and S keys.

#

I was wondering if there's like any weight mapping thing I have to do in UE5 to get the cube moving?

storm orbit
#

Specifically, if your forward is set as a 2d axis instead of a 1d axis, your X value will always be "0" for W, since "forward" is technically [0,1] and you're reading the zero (x) value from the input

dreamy mountain
#

whats the easiest way to assign vectors in the world to a list without handtyping each coordinate?

#

like is there a component or something i can use?

#

im making an orcs must die esque game and im on pathing now, i want to specify 3 vectors as a goal for enemies so they have a bit of variety in movement pathing, then when they get close to it, it moves onto the next list of 3 vectors to aim for

maiden wadi
dreamy mountain
#

hand designed

maiden wadi
#

Say hand designed. Unreal likes to sharpen a knife and backstab you like a noob for doing procedural.

#

Good. 😄

dreamy mountain
#

this game has to be handed in in 20 hours, wouldnt dare do procedural lel

maiden wadi
#

Uhh.. But yeah it just depends. How would you like to specify them?

dreamy mountain
#

enemy bp, so thats just doing movement

#

then in the spawner bp, i was just going to make multiple variables and fill them with 3 vectors each

#

them vectors would correspond to a point in game for the enemy to run to

maiden wadi
#

Is your spawner BP placed in the level?

dreamy mountain
#

it will be, yeah

maiden wadi
#

There's a little thing.. Sec

dreamy mountain
maiden wadi
#

Can't remember if you can do that in BP

#

Yep, awesome. So..

#

In your array, check these.

dreamy mountain
#

yep

maiden wadi
#

Now in your level, pick your actor with the array.

#

Add some points, and you can move them arround like any other actor and it'll update the values in the array for you and visualize them.

dreamy mountain
#

i see

#

very helpful, thank you very much authaer

maiden wadi
#

Should make it much easier. 😄

#

I'm so jealous of hand designed levels. 🥹

steady night
#

hey

#

is this the right way to calculate a chance procc? if crittchance is 0.7 and the random float is 07 or greater it proccs

#

right :/?

maiden wadi
#

<=

surreal peak
#

That's inverted I would say.

#

Cause the chance to hit 0.7 - 1.0 is 30%, but crit chance is 70% :D

somber minnow
#

I have a gameplay tag container in my masterclass and I want to use it on a child class. However, I think adding or removing it will directly affect the masterclass. What approach should I take?

maiden wadi
#

Yeah the one minus is probably cleaner.

maiden wadi
steady night
#

hmm okey

surreal peak
#

Modifying the Child Class does not affect the Parent Class. Only other way round and only if the Child Class hasn't modified the property yet.

steady night
#

so this would be the other way around then, since 0,7 accuracy and anything above that would be a miss

#

so >= is correct in this case ?

surreal peak
#

No, same issue :D

#

CritChance says how likely you can crit.
Accuracy says how likely you can hit.

steady night
#

aye ofcourse... -.-

maiden wadi
#

I'd do the one minus. 1.0-CritChance >= Roll

It makes more sense from a rolling perspective. You want to roll higher, 0.3 to 1.0

somber minnow
#

I can make changes to a tag without a variable inside the child class. Is this normal?

somber minnow
#

I'm trying to learn the tag. My questions might be silly.

spark steppe
surreal peak
#

A GameplayTagContainer is just another variable. It follows the same rules as any other variables in regards to Parent vs Child Classes.

maiden wadi
#

You're rolling 0.0 to 1.0.

You have a 70% crit chance.

You want to hit between 0.3 to 1.0 to crit.

Your math is (1.0 - CritChance) >= RollValue

This means 1.0 minus 0.7 = 0.3. If your roll is greater than 0.3 you crit.

surreal peak
#

Lemme delete this whole convo before I get the couch.

spark steppe
#

pat her head, i like that node

surreal peak
#

ok, one sec

steady night
maiden wadi
#

I forgot those exist. 😄 Yeah that node'll work too.

#

Pass your crit chance to the node.

spark steppe
surreal peak
#

You just plug the float into the node for the weight.
The weight is the chance for the bool to be true.

spark steppe
#

but guess what, it got tooltips (likely)

surreal peak
maiden wadi
#

But still. Do follow the math above because it's important to follow even if the node does it for you.

steady night
#

erhm so just like this ??

surreal peak
#

In theory, yes.

spark steppe
#

if your accuracy is 0-1 range

steady night
#

range of weight is 0.0 - 1.0 so yeah

#

that will work

#

can i print the resault of the weight "roll" somehow ?

#

not true/false but the roll value

#

weight value*

maiden wadi
#

Just print the float before the branch.

surreal peak
#

No you don't have access to the inner role.

maiden wadi
#

Oh. You mean that. No

steady night
#

ah okok

maiden wadi
#

You could do it manually yourself with the streams.

#

At which point you're back at complex stuff instead of single node.

steady night
#

yupp

#

if it works it works

#

thansk

#

erhm ok so...

#

if dodge is 0,05 dose it turn true of false if the roll is Above 0.05 ?

spark steppe
#

false

wide beacon
#

hello, this logic is to aim a gun at cursor, or a single plane, however i have run into a problem where aiming over the character causes it to spaz out, ive tried a clamp but it didnt work, im just trying to make it so the player doesn't spaz out when the cursor is over the character, thanks.

maiden wadi
wide beacon
maiden wadi
#

Does it do it if you do it above the character, or just specifically at the character?

#

Like straight above their head.

spark steppe
#

well, looking up creates a gimbal lock, not?

#

so either limit the pitch at which they can look up

#

or store the last rotation and rinterp (which may introduce cursor lag)

maiden wadi
#

This won't be gimbal lock I don't believe. It's constructing a new rotation from the direction each frame, not adding to one trying to turn upside down.

#

It's sidescroller aiming code.

spark steppe
#

oh, in 3D you get a lock and pitch/roll may flip etc.

maiden wadi
#

I'm presuming they just need to deadzone X or near the player, but which one depends on their answer.

spark steppe
#

wait is it 2D scroller or top down game?

maiden wadi
#

Sidescroller. Plane is on Y

spark steppe
#

ok, but may work for either to just not make aim updates if the cursor is too close to the character location!?

#

which is the X deadzone you meant, i guess

maiden wadi
#

Yeah, but it depends on if it's an issue with it being close to X or the character. If it's X, making it not happen near the character will still break it if they look directly up.

#

If it's just the character, which I doubt given this code, can leave the deadzone not affecting up in the air.

wide beacon
wide beacon
livid island
#

Hi all. I'm looking for tips re: varied gameplay mode implementation. I need to switch between two modes with differences in interface, input, animation, and movement. I want to tie it to what you have equipped. A close-ish comparison would be the difference between having a gun equipped and a grenade equipped, like in Arc Raiders, but with more delta in regards to movement. Any tips, or direction towards a good tutorial or video would be much appreciated. Thanks!

faint pasture
#

rotating to align with the aim point moves the aim point

#

I solved it for my project by having aim rotate an aim vector, and drawing the crosshair there, not the other way around.
AimInput -> direction -> draw crosshair there
Instead of:
AimInput -> move crosshair -> update direction to point towards it

sage glacier
# maiden wadi In a BP GameInstance?

Sorry, went to sleep but yes in a my custom BP game instance i had a unused variable "Level name" that i was not using anymore and this caused this issue a obscure unreal forum help me solve it

narrow sentinel
#

Anyone know when using Entry List Widgets why I'm getting them overlapping and not forming a list like what would be expected

#

my entry list widget

#

but in list view it's overlapping them

autumn pulsar
#

Saw for a weapon, is it better to spawn a mesh to use, or have one on the parent actor to swap out?

maiden wadi
#

Your widget has no desired size is my assumption.

#

Also you don't need a button in a listview. It acts like a button.

narrow sentinel
#

Ohh didnt realise a list view acts like a button

#

Seperate quesrion out of inerest, whats best way to do inventory items, what i mean by this is where inventory items retain data like durability etc but dont reset back to defaults when spawned or inspected

maiden wadi
# narrow sentinel Seperate quesrion out of inerest, whats best way to do inventory items, what i m...

Depends on the kind of system you want. Traditionally it's on a component you can attach to things. The items themselves either being a struct of data of a UObject created with the data on it.

UObject vs struct is mostly up for debate. UObject is easier to work with and nicer. Structs can be lighter weight but only necessary if you're doing some wildly necessary optimizations.

That said, I've also seen people make a kind of global inventory manager where the data lives on it and things access it by a key. I'm not personally a fan of this approach.

slim lion
#

hey, does anyone know if i can rotate my character according to movement input between attacks? This montage plays in a "loop" that just sets different animation for it and i cant seem to get it to work, the rotation i mean. I need my character to be able to change directions instantly in between animations

#

and i forgot to remove this -1 node in the bottom dont mind it

#

obviously the animations are root motion and IMPORTANT, second animation plays before first can end because of my notify for the first to not go into idle and force play second one

narrow sentinel
#

I read on google about using instanced data asset for each item where there is a value tied to it something like that

#

My inventory isnt just for items though, theyll also be materials, etc.

dawn gazelle
#

I'm in the process myself of building out an inventory system that utilizes Data Assets for the immutable data about items and using a UObject container that has a reference to the data asset and also contains the other mutable data. This allows the item to exist as a thing in memory and can be move around from place to place as needed, and modify its values directly. When you want to have it exist in the world, you spawn an actor, give it the UObject and the world object can construct itself based on the data within the UObject including the DataAsset info and have it removed from the inventory it was contained in. Picking up the world actor would destroy the actor but the UObject container would be added to the inventory (effectively a UObject array or set within an actor component).

To save the mutable item data between sessions you'd have to serialize the data it contains to save it and reconstruct it when loading.

Lighter weight than using an actor for every single item, makes items a "thing" rather than just existing only as data, keeps data usage per spawned item lower due to the immutable data being stored in data assets (ie. you could have hundreds of the item spawned, but each doesn't need to keep track of what mesh its supposed to use or what its name is)

maiden wadi
dreamy mountain
# maiden wadi I'm so jealous of hand designed levels. 🥹

as you should be lel
did have another question though, im using this to loop over each point and get a random one from that list, but it isnt running there, the ai just stays in place. i have auto possess ai set to placed or spawned in world, but it doesnt affect anything

maiden wadi
#

As for the AI not moving. There's only a few things it can be.

First your movement point needs projected to the navmesh, I don't know if AI move to does this internally.

Second is to make sure you have a navmesh.. in retrospect this should probably be number one.

And third, it needs the aI controller, which you've set so it should have. Can you check your Output Log? The AIMoveTo should be throwing some warnings if something is wrong.

#

Also the Pawn itself should be spawned projected to the navmesh, it'l fail to move if it's not on the mesh itself.

dreamy mountain
#

it moves now that i changed the loop from that loop to random array item

maiden wadi
#

🥳

dreamy mountain
#

or not, i just got it wrong wahhgone

#

if i use project point to navigation, it just runs to 0,0,0

maiden wadi
#

You have a navmesh right?

dreamy mountain
#

yeah

maiden wadi
#

Hmm.

dreamy mountain
#

instead of running to a point, it runs to 0,0,0

#

which is where the player spawn is

maiden wadi
#

Can you show current code?

dreamy mountain
#

yeah one sec

#

enemy spawner

#

oh my fuck

maiden wadi
#

Query extents. 😄

dreamy mountain
#

so it was returning normal values because that was being passed into the event by beginplay

maiden wadi
#

Also

#

Pure nodes run once per executed node that calls them.

#

Right click your Random node and ShowExecPins on the bottom of the context list

#

Hook that up to execution so that it only randomizes once.

#

Right now you're randoming once for the Print, then again for the Move

dreamy mountain
#

ah ok

#

thats what it returns from the random

#

every time

maiden wadi
#

Change the QueryExtents to like... x10y10z2000

dreamy mountain
#

thats the contents of track points 1

#

like this?

maiden wadi
#

Yep

dreamy mountain
#

if so, projected point is still 0,0,0

maiden wadi
#

That... does not make sense.

dreamy mountain
#

ikr

#

i love ue5

maiden wadi
#

On a random whim, can you put a 0.2s delay before the Random node?

dreamy mountain
#

sure

maiden wadi
#

Curious if there's some order of execution with the controller spawning. There shouldn't be, but..

dreamy mountain
#

atill 0,0,0

maiden wadi
#

Maybe there's a clue in the output logs. I'd open that, Clear it, and then run a test.

#

It should work even without the project though... Curious why it isn't.

#

The project failing is normally a missing navmesh but.. clearly you have one.

dreamy mountain
#
PIE: Server logged in
PIE: Play in editor total start time 0.228 seconds.
LogBlueprintUserMessages: [BP_Enemy_C_0] X=0.000 Y=0.000 Z=0.000
LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden
LogWorld: BeginTearingDown for /Game/Levels/UEDPIE_0_DEBUG
LogSlate: Window 'TotallyNotOMD2 Preview [NetMode: Standalone 0]  (64-bit/PC D3D SM6)' being destroyed
LogWorld: UWorld::CleanupWorld for DEBUG, bSessionEnded=true, bCleanupResources=true
LogSlate: InvalidateAllWidgets triggered.  All widgets were invalidated
LogPlayLevel: Display: Shutting down PIE online subsystems
LogSlate: InvalidateAllWidgets triggered.  All widgets were invalidated
LogAudioMixer: Deinitializing Audio Bus Subsystem for audio device with ID 37
LogAudioMixer: FMixerPlatformXAudio2::StopAudioStream() called. InstanceID=37
LogAudioMixer: FMixerPlatformXAudio2::StopAudioStream() called. InstanceID=37
LogUObjectHash: Compacting FUObjectHashTables data took   1.06ms
LogPlayLevel: Display: Destroying online subsystem :Context_45
#

im not sure what causes this

maiden wadi
#

Okay. Sanity check. Does it work if you hardcode one of those values into the AIMoveTo?

#

Like the pawn moving, working, I mean.

dreamy mountain
#

yeah

maiden wadi
#

And if you connect the Random straight to the AIMoveTo and bypass the project?

dreamy mountain
#

with it set to -1000, 1000
he runs over there, no point is over there

maiden wadi
#

Is that with the random or the hard coded value?

dreamy mountain
#

thats with hardcodede, with random its going places i have no points

#

im seeing if i can find a seting to show the 3d widget points in game

maiden wadi
#

Debug draw them. Sequence off of your event. The RunToPoint. And ForEach over the vectors and DrawDebugPoint.

dreamy mountain
#

ok so its run to a point

#

all of the points are back here

#

no clue why its pushing them past where i have defined

maiden wadi
#

What is the scale of your Spawner?

dreamy mountain
#

1

maiden wadi
#

Oh but it's not 0,0,0... I'm wondering if those are local space points.

dreamy mountain
#

OH i think i know why

#

yeah thats what i was about to say

#

setitng one to 0,0,0 goes to the spawner

maiden wadi
#

Makes sense. You can convert them in a function before passing them to the pawn. Transform them by the Spawner's Transform.

#

Unless there's a checkbox that makes those world space. I didn't look that hard earlier.

dreamy mountain
#

not that i can see

maiden wadi
#

Yeah. Just transform them.

dreamy mountain
#

looks much better

dreamy mountain
#

now just to think up a way to go from trackpoints 1 to 2

#

can you make arrays of arrays in blueprints?

mental trellis
#

Sort of.

#

Create a struct containing an array.

dreamy mountain
#

was thinking to make an array on beginplay containing every point, then when atPoint is true, i can go to the next array in the list

mental trellis
#

Create an array of that struct.

#

If you're using a grid, better to just use a 1d array with 2d<->1d index conversion functions.

dreamy mountain
#

managed to get it

strange owl
#

hi, I'm not sure where to put this, but this channel seems the best option. I'm trying to sort an inventory.. it works if the predicate is Quantity(ints), but fails spectacularly if I try to sort based on weight (floats) Gemini blew me some guff about it being an unstable sort (but that still wouldn't account for the issue) anyway I've included the gemini-bloated comparator that is supposed to do a tie-break. I've used two sorting libraries (as you can see by the orphaned pins on the original one) but it generates the same errors. Next, here is the part where the SlotHolderObject array is populated. The original structure was an Inventory Slot that has as a field the Data Asset, but since there was issues with getting it to populate in time, and that the sort uses Objects not structs, I made the SlotHolderObject to hold hard references to the fields for the sort. All three data structures are shown. S_InventorySlot, SlotHolderObject and PDA_ItemData.. Finally, there is a screen shot of "before" and "after" the sort has taken place. I have no idea what's going wrong.

#

the small digit at the bottom right of each object is the item weight, which is what it's supposed to be sorting by.

maiden wadi
strange owl
#

both sorts seem to give the same results.. the underlying sort is the one in the UE libaries i think.

#

the first image is before the sort, the second image is after the sort (either version)

maiden wadi
#

The slot index tie breaker isn't necessary. In fact you shouldn't need anything but a > check.

strange owl
#

yep, Gemini was adamant, so I added in anyway to shut it up!

maiden wadi
#

Can you show what it does if you remove the nearly equal branch and only do your < check returned?

strange owl
#

yes, I've tried that and it outputs the same result

maiden wadi
#

Also again, this is a Tileview I assume? Given you're making objects.

strange owl
#

I can check again if you like

#

just widgets in a widget container

maiden wadi
#

I'd be very curious what it outputs if you put a ForEach right after that Sort, and do a print for each weight. If they line up there.

Just to 100% confirm it's the sort.

strange owl
#

ok I've removed the tie-break

#

before, after

#

i looked with breakpoints, and they are jumbled like the screenshots after the sort

#

1.5, 8,8,10,10,3,3

maiden wadi
#

Are you 100% certain that you don't have another sort somewhere? Because this looks like it sorted by weight, and then stable sorted by stack size.

#

No, that doesn't explain the weights right after the sort.

strange owl
#

there is only one sort node present

#

the whole blueprint

maiden wadi
#

I'm reluctant to believe it's the sort. I'd assume both of those just do a SortByPredicate call. Either your values from those interfaces are wrong and somehow different than what you're looking at in the debug or... Or the sorts are fucky... Or you need an exorcist.

strange owl
#

I'm considering getting some holy water from Amazon..

#

i've put a branch node in just as a place to put a breakpoint before and after the sort.. i'll have another look at this array..

maiden wadi
#

If it still looks valid, I'd still be interested to see if pulling your weights in a for each loop and printing them gives the same expected results.

#

Using the same interface your sort predicate is I mean.

strange owl
#

it'd be better if I could show the entire array, but could only fit the first 3 elements... before screenshot, before sort breakpoint, after sort breakpoint

#

hmm i'll check those slot indexes

#

red-herring.. the slots gets their indexes set by the iteration over the SHO array

maiden wadi
#

Wait. These values are weird. 0.15, 0.8, 3.0.

#

Your sort is fine.

#

Your inventory display is wrong.

#

Following your other displays, Hammer should be 30, not 3

#

Oh, no that's per item.

strange owl
#

only item weight is counted, not quantityxweight

maiden wadi
#

Does that interface return the whole stack's size or the per item size?

strange owl
#

per item size

maiden wadi
#

Then the sort is correct.

strange owl
#

for now I haven't multiplied by quantity

maiden wadi
#

Hammer is the heaviest per item thing in your list there.

#

It's all in sorted order.

strange owl
maiden wadi
#

It's not 3 vs 10

strange owl
#

those hammers should be before the turkey legs

maiden wadi
#

No

#

Meat is 0.8

#

You see it as 8 because you display the whole stack's size in the inventory.

#

But your data says it's per item size is 0.8. Which makes sense. 0.8x10=8

#

But you're sorting by per item size. 0.8 vs 3.0

strange owl
#

that would be a howler by me if it's true.. i'll check the UMG stuff to see where the value gets updated

#

well herp my derps!

maiden wadi
#

😄 So yeah. Sort is all good.

strange owl
maiden wadi
#

Is that a new edible object?

strange owl
#

the only thing I have to decide is which sort library to keep.. first world problem definitely

maiden wadi
#

I'm partial to the one that has the Reversed argument actually in text and not just a random checkbox with no descriptor.

strange owl
#

that was the Loris one.. the original with the label is the LE Extended Library plugin

#

the predicate sort is missing in UE for Blueprints...my plan was to dig it out in C++ at some point. Glad I opted to use a library FIRST.. 😅

#

that rock looks in the wrong place

maiden wadi
#

If you reversed the sort, this is correct.

strange owl
#

correct mow I think

#

I added quantity

#

sorted by (itemweight*quantity)

#

10,10,8,8,3,3,1.5

#

huzzah

maiden wadi
#

🥳

strange owl
#

nice little feature I only discovered the other day.. see those object A, object B with a little f in the top right? the arguments to the function.. lots of spaghetti removed..

#

much nicer than trailing a long pin to the other side of the graph..

#

i'm going to see if I can remove that cast that Gemini said would fix all my problems and worries.

maiden wadi
#

Gemini has been reading too much Reddit. The cast is fine.

strange owl
#

actually I was going to try and remove it.. turns out it's needed. I guess the accessors are too slow, because it corrupts the sort...

#

"Msg Get Item Weight..." too slow

#

the joy of working with Data Assets..

maiden wadi
#

There shouldn't be any difference between them. O.o

strange owl
#

you'd think.. but using the messages the sort came out wrong as far as I could tell..

maiden wadi
#

It's hallucinating. Interfaces are the same as a cast. They're thread blocking. It is true that it takes more time to do the interface call. They're less performant than a cast accessor. But they won't cause some imaginary wait.

#

What is the interface function doing?

strange owl
#

using messages, sort, using cast, sort..

#

the messages are just accessors

maiden wadi
#

What are they doing in the data asset though?

crimson briar
#

Compared to blocking asset load, the cast is negligible in terms of performance

strange owl
#

all i can say is the images show the messages appear to corrupt the sort

maiden wadi
#

But in your PDA_ItemData. You have the interface implemented with GetItemWeight doing something.

strange owl
#

yep it just returns the value of the variable

#

the "polite" OO way

maiden wadi
#

There has to be something else there. Or it's not implemented in the data asset.

#

You're not mistaking the one on the SlotHolder are you?

strange owl
#

yes, I'm exactly doing that!

#

that's why the messages were failing!

#

now I could go ahead and make accessors for the PDA..or just carry on with the cast

maiden wadi
#

Do the cast. Pointless to change it. The PDA is going to be loaded when these widgets are shown anyhow. Decoupling the link won't do anything.

strange owl
#

cool. good to isolate that bug though. and I won't have developed a prejudice against using messages with PDAs 😅

#

cast it is

dreamy mountain
#

im so lost, any ideas why this wont rotate?

#

trying to make it rotate to at least face the character, then after i can get it to rotate, then make it work for shooting enemies

atomic hollow
dreamy mountain
#

ok so i dont think the pawn sensing is even detecting me

#

im next to it and it doesnt print hello or rotate

crimson briar
#

Isn't pawnsensing a legacy system replaced with AIPerception?

dreamy mountain
#

never used aiperception

#

worked on 5.3 mostly and was taught to use pawn sensing shrugdrmario

deft pivot
maiden wadi
#

Unless you're not, in which case I'm not sure. But that'd be my first guess.

deft pivot
#

idk how thats possible. the only actor in the scene is the beam the character stands on.

#

is there anything wrong with the way the BP's are connected?

maiden wadi
deft pivot
#

just this:

maiden wadi
#

The white things and the grid pattern things are also actors.

deft pivot
#

wait rlly? ._.

#

but they dont have the tag like the plank has

maiden wadi
#

Correct. Which is why it stops and does nothing.

#

Connect the False part of your branch there to the IsBalancing SET for false.

#

I'm 90% sure that'll fix your issue.

deft pivot
#

well ill be damned.. i feel stupid af 😄 it worked !!

#

Thank you 🙂

maiden wadi
#

🥳