#blueprint

1 messages · Page 101 of 1

flat coral
#

Like all these are complex traces lol

#

And I can run like 20 of these guys at a time before I even start seeing problems

gentle urchin
#

Youd add a socket for each face

#

Name them according to dice value

#

Then we can getallsockets -> foreachloop-> find the socket with highest Z

flat coral
gentle urchin
#

They are

#

But the dice got 9000 faces

#

If you wanna iterate them...

#

I guess you could still do the 20 first

sand yacht
#

Sorry I should have been more clear. I don't mean to have the landscape generate the way terraria has it's generation. What I mean with this is preloading an entire procedurally generated world when creating a new save

gentle urchin
#

Just a regular proc gen landscape

#

2d by all intents and purposes

flat coral
#

Anyone know offhand what "Removed from world" means and how it's different from "Destroyed"?

turbid pecan
#

Is there a way to do a generic cast in BP?

#

Like I have two game modes, but I want to be able to have a shared library function that gets the current active game mode and casts to it and returns the “as” result irrespective of whether it’s game mode one or two

thin panther
#

there is no dynamic typing in blueprints

#

however what you can do is set up an interface that does the functionality you want in the gamemode

#

you can also make a common parent between the two

turbid pecan
#

I do have a Game Mode parent class

#

Hmmm

#

Ok I’ll have a look.

#

Thanks Cuppa

#

Damn interfaces are so nice

#

I keep using them for everything that it makes sense to use on

#

Makes stuff so much simpler

gentle urchin
#

I dont think i have a single interface across my not so few projects

wary marsh
#

what exactly is the go-to way of saving data for multiple instances of the same actor? Let's say you got an array of ships which all have a name, position, blablabla, would you just create a struct for each seperate ship and save all of those structs in a struct array in the savegame blueprint?

dire frost
#

yeah that's a good way of doing it

undone bluff
serene kiln
#

Hey all, does anyone know how to set the output directory of a render movie pipeline in blueprints? Ideally like to load the current config then just change the output at runtime

vague shadow
#

is there anyway i can separate global illumination from this? and force the global illumination setting to be high

undone bluff
flat coral
lament fox
#

In my game I want to have a crafting workbench that when I interact with it, it makes a widget visible for the crafting UI. What would be the best practice for creating this widget and making it visible? Do I create the widget in my HUD class or somewhere else?

flat coral
#

#3 is on there because personally I had a lot of widgets that I figured were going to be exclusive, which ended up being not exclusive in some corner case

undone bluff
#

I'm still struggling getting the input right for my inventory widget

flat coral
#

These things matter because the basic workflow for opening and closing a widget, AddToViewPort and then RemoveFromParent IIRC, are very simple and easy and if you can get away with that you probably should just do that. But if this widget might compete with other widgets, you need some way to ensure they don't open on top of each other, they displace each other gracefully

undone bluff
#

So many considerations there

#

I actually just have a class for all the non pause menu game UI and in it I have widgets for the inventory and a generic container

flat coral
#

So if you're working on controller navigation and you're thinking "man this absolutely blows, there must be a better way" there might not be.

undone bluff
flat coral
undone bluff
#

Kinda still trying out my different options on what feels right

random pulsar
#

what object reference does casting to widget need in most cases?

flat coral
random pulsar
#

i use cast for getting the variable,the reference,from that ref i get the information from that object

flat coral
#

Cast does not get anything.

#

"Casting" takes a reference to an object of an unknown TYPE and, if possible, returns a reference to that SAME object but of the type you specify

#

When you call cast you're basically saying to Unreal:
"See this object? Please pretend it's a PlayerHUD object."

random pulsar
#

ok,so if i need the ref here how do i get it?

#

someone told me if i make a variable of this type this aint work

flat coral
undone bluff
#

Let the hud manage the widget and just communicate with it using an interface

random pulsar
#

added it but when i drag from HUD and type my widgets there is nothing,seems like i don't understand it

undone bluff
#

It's a reference to the empty generic native HUD class

#

As far as your actor knows, at least

#

You could cast from it to your specific HUD class

#

But I'd recommend using an interface

#

Look up blueprint communication, it's vital

rugged wigeon
#

It seems unlikely to me that you would need an interface to talk to your hud

flat coral
#

Ya that's usually a pretty safe cast

rugged wigeon
#

interfaces are for situations where you don't have certainty about what you're talking to

undone bluff
#

Fair, casting is ok here

flat coral
#

Worth saying, interfaces are my least-favorite method of generalizing functionality

undone bluff
#

But, I like to not put a dependency on my HUD and all its widgets and just leave the flexibility

rugged wigeon
#

Interfaces are likely applicable for components talking to their owning actor. Other than that, probably not a ton of use cases

undone bluff
#

Well that's not true

gentle urchin
#

and anything the owner needs, it can read?

#

the owner is likely (?) project specific anyway, so not much gained by avoiding dependency ?

rugged wigeon
#

owners typically know which components they have, but components don't know which owner they have. If they do, they're probably poorly designed

gentle urchin
#

(CMC cough)

#

in some cases, it can be warranted

undone bluff
#

Player components are fine

flat coral
#

The disadvantage of interfaces is that you need to write the function every single time you want a blueprint to implement it.
That, in turn, demonstrates WHEN to use an interface: When every class that implements it is GOING to need a different implementation

undone bluff
#

If it goes on anything else I try to have the component unaware of the owner

#

To whatever degree is reasonable

#

Inventory component base class that works with anything and player inventory subclass just for the player controller for example

rugged wigeon
flat coral
#

I really don't like the pattern of "Interface implemented by owning actor, which is then called by components", but that said I have used it a few times

#

I always make sure it's optional though. Component needs default behavior for when the owner doesn't implement the interface

rugged wigeon
#

Well the likely use case is the default implementation for the interface is on the base classes of the actors

#

You probably should not have a large number of totally unique actors with a component

flat coral
#

Oh I do though!

#

In fact I have components so powerful that I can attach them to StaticMeshActors in the level editor and instantly get functionality

#

Like I've got an ActorHealthComponent which tracks damage and destroys the actor when hit, and I can put that on any object in the world to give it that functionality.

#

Also got a UsableComponent which makes an object interactable, which doesn't do anything on its OWN but I've got a subclass that can open a lore pickup or start a dialog on interact. None of these need ANY functionality in the owning actor (though some have it optionally)

gentle urchin
#

so you've subclassed the component?

#

instead of the implementing actor?

#

guess that keeps them reusable but

#

what happens when you want them to .. do both ?

#

you add both components?

flat coral
#

Yep. An actor can have any number of usable components, they have a Priority field and both focus and interact respect it

brazen pike
#

using inheritance to avoid inheritance

flat coral
#

That lets me do things like have a laptop with a lore pickup in the form of an email open on it, but once you get the lore you can ALSO pick up the laptop as an item to sell

#

Even my UsableActor component is itself a subclass of a higher level component which handles glow-on-focus objects

#

Which is a subclass of the ROOT component that handles glowing in general

gentle urchin
#

Somehow i feel like you're leaving out some big caveat to your setup x)

flat coral
undone bluff
#

struggling getting a nice setup for this specific thing

gentle urchin
#

tbh i havn't even considered subclassing components xD

flat coral
# undone bluff Is that per component or the whole actor?

Per component. There are multiple types of glowing components, for example flash on damage, or periodic glow. They can all be different colors and coexist peacefully. Glow-on-focus is specific to the usable component and respects priority of usability.

prime grove
#

hey does anybody knows where can i learn UE5 for free?

kind estuary
#

@gentle urchin I remember reading posts of yours talking about this.
im making a 2d game tile based. Im using no collision. Just checking tiles and who is on the tile.
And the meshes are instances of an ism.

To have better performance, im considering creating a UObject for each one of them instead of an actor.
Store the UObject in an actor manager, and in the UObject i have the reference for the index in the ISM.
Is this okay? Am i missing something here?
I think i read that you did something like this in the past.

flat coral
undone bluff
#

how do you handle assigning components that you want to glow?

flat coral
undone bluff
#

oh so the whole actor glows?

#

yea that's what I meant to ask

flat coral
#

Yeah. I don't have a use-case for making like one part of an actor glow, all my usables are, like, a button, or a tablet, that's pretty self-contained

undone bluff
#

I often need to assign individual components to actor component functionality

#

and there seems to be no really nice way

gentle urchin
undone bluff
#

I wish there was an eyedropper for component references like with actors

turbid pecan
#

On the subject of interfaces, I think it’s nice to use them where two things don’t share common behaviour but need to interact.

flat coral
#

These crates in my smoketest level are for testing glow. The front one has every type of glow component.

kind estuary
#

should i use actors?

gentle urchin
#

Up to you really

kind estuary
#

they are better for replication

gentle urchin
#

are you planning on replicating?

kind estuary
#

though they are more memory intensive

gentle urchin
#

it's always a tradeoff

flat coral
kind estuary
kind estuary
brazen pike
#

You probably want to decide earlier rather than later if you are doing replication

gentle urchin
#

^

brazen pike
#

tacking on replication far down the line is almost always a bad idea

kind estuary
#

maybe i should go with actor they are veryintuitive to me. Though doing it as objects could be a good exercise. I hear i need to learn to work with uobject

#

though uobjects are weird

gentle urchin
#

especially if it's something like VAT ISMs with big numbers

#

Mass is also a thing

kind estuary
#

so its not possible to replicate uobject?

gentle urchin
#

It is

#

definetly

flat coral
#

Fuck UObjects tbh 🙂
If they were any use, things like GameMode would be that instead of an actor

strong rover
#

Surprise movie night so I came back a few hours later than I expected 😅
Looks like the guy no longer wanted help, good stuff.
Thanks again for the help.

gentle urchin
#

Whats your target number Wolf ?

#

how many npc's are you aiming for

#

workers or whatever

kind estuary
#

though then depends on how many players

#

since its already 2d and tile based

gentle urchin
#

gosh

kind estuary
#

and no collision

gentle urchin
#

well best of luck xD

kind estuary
undone bluff
kind estuary
#

so i can replicate them in the future @gentle urchin

undone bluff
#

just likely not replicating them individually I'd think

gentle urchin
#

I'd like to see an RTS with 8x30k replicated easily

faint pasture
gentle urchin
#

I'd imagine it taking atremendous amount of work to get that right

#

but idk

random pulsar
#

is there a way to refresh the icon of the actor blueprint?

faint pasture
undone bluff
#

you'd probably just replicate the commands for a start

kind estuary
faint pasture
#

unless they change very rarely then you could do some other sort of system like diffing

faint pasture
kind estuary
#

i thought it was squize

#

i have little experience in replication/multiplayer

#

but if you guys say a uobject can be replicated

#

then whats the issue?

gentle urchin
#

Im not replicating anything tho 😄

faint pasture
#

What are you actually trying to do?

#

something akin to Factorio?

kind estuary
#

im half way through the basic setup

faint pasture
#

or a struct of arrays

#

or hell, just use a map

kind estuary
#

thats already done now the thing is the units

faint pasture
#

units can just be plain old structs too

#

depends on your system though

strong rover
# prime grove hey does anybody knows where can i learn UE5 for free?

I'd recommend you first install UE5 and start a "3rd person" project.
It comes with the core essentials ready for you to mess around with.

Start reading up on this page.
It's a lot of reading but then this is a tool made for many different kind of specialists to work on multimedia projects, if it were easy there wouldn't be jobs.
https://docs.unrealengine.com/5.0/en-US/understanding-the-basics-of-unreal-engine/

Once you know how to open a blueprint, wire up a few things, or do some basic geometry and you're getting a little impatient, start looking for things on Youtube like:
"UE5 Level Design Basics."
"UE5 How to make an automated door." or somesuch.

Welcome to being a UE5 newbie.
You can now do next to nothing but you know how to start the engine and can understand the very basics of the interface.
Pick a direction, and keep reading on the official documentation, keep Youtubing tutorials.
With a few weeks, you can do basic stuff.
By a few months, you might reliably be able to make your own stuff!

... And keep back-ups, maybe hook up to Version Control (Github, etc) so you don't lose your hard work.

Essential skills and concepts to help you get started in Unreal Engine.

gentle urchin
#

I'd probably aim to replicate as little as possible

flat coral
kind estuary
gentle urchin
#
  • ID
  • Health
  • Vector2D Location
  • Vector2D Direction
  • ActionPoints (Move, Attack)
    ?
kind estuary
#

has no collision

#

has the tile he is on

faint pasture
#

no i mean the gameplay elements of a unit

faint pasture
#

do they attack, have spells, have buffs and debuffs, what data do they have?

kind estuary
#

that

kind estuary
#

and move to tiles

faint pasture
#

Yeah just use structs

kind estuary
#

what about if the game becomes good and i need to make it multi?

faint pasture
#

Struct Unit
ID
Name
HP
Attack
Defense
OnDeathEffect
WhateverElse
Location
AimDirection

faint pasture
#

you'll still have objects involved for the visualization of them, but the actual gameplay logic is just numbers shuffling around

#

you're rendering with an ISM right?

kind estuary
faint pasture
#

For each Unit in UnitArray -> update the ISM

#

done

#

it'll run fast as hell too

gentle urchin
#

probably some singular lerps during movement

#

atleast client side

faint pasture
#

yeah you'll have to split out the background sim from the rendering a bit but you get the picture

gentle urchin
#

noot sure i'd imagine this with 30k but oh well

kind estuary
faint pasture
#

imagine a city sim

gentle urchin
#

if they're all clumped up together on one tile, sure

faint pasture
#

you can EASILY have a city sim with 100k agents running around, no problem, if they're just 100k entries in an array

#

then for rendering, you just gotta show the ones nearby etc

kind estuary
#

to avoid stack of dooms

faint pasture
#

so a player can see how many tiles at a time?

#

your pathfinding is gonna be hell lol

kind estuary
#

so it goes like a 100 tiles+

faint pasture
#

yeah for sure just use structs IMO

kind estuary
#

pathfinding is done

faint pasture
#

in fact you'll probably want a SoA I'd guess

#

done?

kind estuary
#

converted from c++ pure

faint pasture
#

you're saying you can have 10k agents navigating without the cpu exploding?

kind estuary
#

i have no nav mesh

#

i get the path

#

using A*

#

then the unit goes

#

"unit travelling" 🏃‍♂️

#

has a an array of tiles checkpoints, it checks the tile it goes to before it moves if its now occupied

faint pasture
#

and you've tested with 10k agents trying to do that?

kind estuary
#

i tested with many tiles

#

i think it wont change

#

because it just checks the tiles if they are occupied

faint pasture
#

how often?

#

To make something this big you will 100% want to be doing a managed tick sort of approach where you do everything in one big fat loop, doing all the phases in order, almost like an ECS.

#

It'll actually be very simple code

kind estuary
#

lets say you are making a move from tile 0,1 to tile 0,6. You select unit, and then click on tile 0,6 to move.
Does path finding calculation returns path. All tiles are empty so you can move directly. You start moving, but just to make sure, you check tile 0,2 if it is free? Just in case someone move there meanwhile. It is free? Then move there. 🏃‍♂️ Takes about 5 seconds to move there, then check the other tile.

#

until you are on your destination

#

so you move from tile to tile but each tile it takes a while to reach it

gentle urchin
#

At this speed, how can you even think about 30k?

#

Even 300 will be painfull to play with

strong rover
#

I thought it was 30K 'units' inhabiting one tile at once, moving tile by tile as a horde.
Must've misread.

gentle urchin
#

Any number in one tile-space is fine

#

But if they wont stack on a tile... ugh

#

30000*5 seconds is forever for moving them 😅 thats the part i dont grasp

#

In Civ you reach what... tops a hundred units ?

#

And the lategame there gets pretty slow

grizzled gyro
#

Hey Guys! I need some help with the new Chaos Vehicle Controller. Im a 3D Artist and kinda bad with the blueprint Logic ... has Anyone here worked with that System before and can spare 5 minutes to look at my project ? any help appreciated 🙂

gentle urchin
#

Gotta ask the question so we know what we're saying yes/no to

kind estuary
#

have to rrethink that

kind estuary
#

but realtimish

gentle urchin
#

Ish

kind estuary
#

so far its just a battle

gentle urchin
#

Sounds like a horrible inbetween place 😅

grizzled gyro
#

Well Im trying to get my own model into the system but its wont move at all except from a little physics wobble. im thinking it has something to do with its size since its a huge ship. I tried giving it alot of thurst but that didnt work , neither did playing with some mass values

gentle urchin
kind estuary
gentle urchin
#

I initially thought it was bp related 😅

kind estuary
#

but here is the thing

#

i see all these tactical battle games and they look beautiful

#

but they take too long or are boring because of turn based

#

so just make them move from tile to tile

#

in real time

#

but taking some time before moving to each tile

faint pasture
kind estuary
#

violá problem solved

faint pasture
#

It'll work fine CPU wise if you're smart about it

#

but you'll have to do some batch processing and divvy up work a lot

kind estuary
faint pasture
#

It'll look like this:
Tick / Timer / Whatever:
calculate all immediate orders
do movement updates
do some part of pathfinding
do some more work
move some more work

kind estuary
#

so at best we calculate the path finding only once

kind estuary
#

or twice

faint pasture
#

or 30k times

#

since the thing you're going around is also pathfinding and going around things

#

it can work if you divvy it up, maybe calculate 100 paths per frame or whatever

dense bone
#

How to execute some code when other actor has reached specific distance from player?
I know that I can do that with get distance, but the question is when should I fire this check?
My current idea is bad. I want to run function on tick that gets all actors of class and then calculate distance between them.
Is there a better way to detect when actor is enough far away?

faint pasture
#

thats' still 2 seconds between pathfinds per unit, maybe more

kind estuary
faint pasture
gentle urchin
#

They wait

faint pasture
#

wat

#

waiting is fine, he said go around so that implies recalculating path

kind estuary
kind estuary
#

its only once

faint pasture
#

but the other 9k guys did the same thing and now they're in the way

kind estuary
#

then it goes all the way as long as it dont hit another block

gentle urchin
#

Knowing paths, you can even predict whos there

faint pasture
#

what I'm getting at is this is absolutely NOT an easy problem. This will be a ton of work

#

but it'll be doable

#

do it all data oriented

twin shale
#

I need a sanity check...Since when is 4-2=0?

faint pasture
#

arrays of structs

#

this is C++ land btw

strong rover
# dense bone How to execute some code when other actor has reached specific distance from pla...

Never "On tick" is the answer I can always give.

These kinds of calculations depend on how accurate you need it to be. Is it a space-faring game where there's a pulse with a 250 meter radius and it has to hit on the edge?
Or is it more loosy goosey? If Loosey Goosey is okay, start with 0.2 seconds.

Have a countdown run endlessly and that's when you do a quick "Distance upkeep" phase.
You can later keep the stopwatch on just the player and start optimising with arrays of relevant units, etc.

faint pasture
#

depends on how many things have to check, and how important it is to be fast

kind estuary
faint pasture
#

if it's important and there's not many (a fighting game), then tick is absolutely fine

gentle urchin
faint pasture
kind estuary
#

5 seconds per tile

faint pasture
#

oh ok

#

you got gobs of time

kind estuary
#

let me see if i find an example

faint pasture
#

yeah i get it

#

yeah you'll be fine

kind estuary
#

like in crusader kings

faint pasture
#

just batch things and do your pathfinding between the moves

kind estuary
#

but instead of a country its a tile

faint pasture
#

do all of them move at the same time or spread out over time?

twin shale
kind estuary
faint pasture
#

OK then you'll need that in your pathfinding

#

because until they move, they're in the way

#

but when the time comes to move, the thing in the way will have also moved so it won't be in the way any more

kind estuary
#

but lets say you move 100 guys, if they dont hit a blocked tile on the way that became blocked meanwhile, then they will never A* again

dense bone
gentle urchin
#

It can straight up lie 😅

faint pasture
gentle urchin
#

With or without intent

faint pasture
#

but tick is fine for now

faint pasture
kind estuary
strong rover
# dense bone I was creating function that hid other players' nicks if they had passed certwin...

The "All actors" part is what prompted me to say never on tick 💜

For things like that, you can do the following.

Assuming the distance to hide/show is 50 meters and players can only run on foot or somesuch.

1 . Every two seconds, check for all players in a 150 meter radius and add them to an array.
2 .Every .2 seconds, check that array for players within 50 meters and toggle accordingly.
3. To hide the inaccuracy, consider making the nicknames fade in/out of existence. It'll obscure the loose fit when there's no hard pop-in.

faint pasture
#

they both think they can move there

kind estuary
#

then the other willwait

faint pasture
#

that can probably work

#

it'll be super frustrating to see a giant army all go single file around a corner

#

but it'll work

kind estuary
#

yup thanks for putting all the questions

strong rover
#

Get it to work now.
Optimise for aesthetic later.

faint pasture
#

you want to do this in a Subsystem IMO

#

subsystem with arrays and an update function, you can call into it from BP for adding/removing/querying, telling it to update

#

thats what I do with my 1D physics engine

kind estuary
#

subsystem so the stuff is globalized

#

i didnt use subsystem yet

faint pasture
#

SpawnUnit:
Get UnitSubsystem -> call SpawnUnit

strong rover
#

Get All of Class

faint pasture
#

I would just use an overlap sphere tbh

kind estuary
#

at the moment im getting the UnitManager->SpawnUnit (gets grid actor to check if tile is empty) -> spawn

faint pasture
#

On overlap -> show name
On End Overlap -> hide name

strong rover
#

My bad, yes. Adriel is on the money here.

faint pasture
kind estuary
faint pasture
#

yup

dense bone
#

Thank you

kind estuary
#

will do them as you said, array of structs + ism index reference

faint pasture
#

You could do it all with 1 big subsystem or have 1 for units, 1 for tilemap, 1 for this, 1 for that, etc

frosty blade
#

Hey guys i have a question, is it possible to apply a tag to a target from a animation notify blueprint?

faint pasture
#

Do you want the notify to do it or just tell its owner "hey tag something now"

frosty blade
kind estuary
faint pasture
faint pasture
#

I love them, use them all the time

frosty blade
#

what im trying is something like a melee attack, it traces the sword and then i want to apply the tag to whatever i hit. after that im trying to do a wait gameplay event and apply a gameplay effect. but for now nothing is working sadge

faint pasture
#

I would test that the hit is happening, the tag is getting applied, the event is happening, in that order

frosty blade
#

Like im getting the print for hit something for example, the part im not sure is that get instigator actor if its working since its not inside the Blueprint of the character but inside an animation.

#

and also when i try to do a Has tag on the enemy im hitting i dont seem to get anything from it

kind estuary
#

why dont i use them?

faint pasture
#

Because you can have multiple subsystems

#

you COULD just make components that live on GameState to accomplish sort of the same thing

#

but I like subsystems becase you can just get them wherever, no need to get gamestate, cast to yourgamestate, get component

#

You can think of a subsystem like a component on the engine level

kind estuary
#

ah thats new to me

#

this is great no need to cast, no increase in size map

faint pasture
#

It'll be literally this simple to interact with

Whatever -> get subsystem -> call function

kind estuary
#

awesome

timid rune
#

Does anyone know how to prevent my character from spinning while attached to a an object that uses physics constraints

whole jay
#

I'm wanting to make a game in the style of old like, dark fantasy nintendo games like Twilight Princess etc, I really liked how they made it so that when you walked up to an interactable object such as a door etc, you had to walk right up close to it, and it would spawn an UI element such as "Open" etc, what would be the most efficient way to go about doing something like this? Obviously line traces probably aren't the best way because you'd have to do ontick but I'm not sure
Just a collision box and cast to character? Or is there something more efficient?

#

Obviously I'd prefer something I could implement into the CharacterBP like an interface as it would be more efficient in terms of code

strong rover
#

Collision box.
Check if it is a player character (Assuming single player)
Trigger UI if true.

whole jay
#

Is there a way to do that without casting?

#

Also would doing a collision box on the character and having it return an object value be more efficient?

flat coral
#

Not really. The advantage of having it on the interactable object is you can tell where they overlap, since that's a spot on the level where the interact button would be ambiguous

strong rover
#

If you can store the player-character somewhere and access it by a macro maybe?
But you can set the triggerbox to only work on a channel that includes the player for collision, at which point you can also do away with checking if it is the player.

The amount of times you'll then cast will be reduced by so much that the cost is negligible.

whole jay
#

Because I'd like you to be facing the object to interact with it

strong rover
#

Then you can do the inverse.
Have an interactive object channel.

Put the colission on the player and have it only detect on that channel.
On a hit, check if the player is facing that object.
If yes, check for which object, send that to UI to process.

flat coral
#

...Does Unreal seriously not have a cone trace? I was about to recommend that to 'em but turns out it doesn't exist? I swear I remember that being a thing

whole jay
#

Wouldn't that be great if they did

strong rover
#

If all interactive objects come from the same parent BP, you can have an enum which allows each interactive object to then be identified to the UI and get the appropriate Text and whatnot.

flat coral
#

Anyways you don't even need to check facing, just have the collision box offset on the character model

#

So that any object in the box is interactable

whole jay
#

I think that'd actually be a great way to do it, that way all you have to do is set each object's channel

sacred cradle
#

I am stuck on trying to get jumping working in my animation. I am trying to blend the jump anim with the movement, which works like a charm the first time. I am not sure how to reset the blendspace jump and replay it any time my character jumps.

I want to be able to jump, a delay between the jumps, the jump being based on speed (reason I am using a blendspace), and the jump resetting every time it finishes, so no looping.
I am not sure how to tell when the jump has finished, or how to reset it using blendspaces in the AnimGraph.

flat coral
strong rover
#

Good safety to build in for sure.

flat coral
#

But yeah my game's first person and I've basically got a rectangle welded to the character's face which is for anything interactable

whole jay
flat coral
#

Wait no! I considered that but used line traces instead for better accuracy. I have a lot of interactables close together sometimes, like buttons on a keypad

#

But that's just because I really like that immersive sim shit, if you don't have that requirement don't do it that way, it's definitely a little worse from a gameplay perspective.

strong rover
#

I just learned a few things for later, thanks.

outer torrent
#

Hello guys
I would like some help with simple logic, but I'm a newbie and I'm a bit lost.

My goal is to create a skill casting bar for my character. In this case, when he clicks to use the skill, start charging the bar, and then release the skill. I managed to do everything, EXCEPT the bar loading, for example, it took 10 seconds to load completely. Is there something in the blueprint that helps with this exact case?

flat coral
barren dove
#

you're probably using a timer to count 10 seconds out
instead of that, increment a variable, then have a progress bar read that variable , once it fires the spell, reset the variable to zero

flat coral
# outer torrent yes

I think I'm unsure of the issue you're facing. Is it that 10 seconds is too long? Or do you not know how to make the widget?

outer torrent
wind path
#

Hey guys so I have a question, so Im working on a mario cart type racing game and I have these portals where you get boosted/Launched when you go through it, and it works just fine, but when I stack multiple boost back to back it lauches the character too far and fast. When I stack 2 together its fine but adding a 3rd one just overkills it. I know it has to do with the multiply node but how would I cancel or reset it when triggering the next boost? If you can help much appreciated thank you.

whole jay
#

What would be the best way to, on overlap, get Other Actor, and reference whether the other actor is listed in an array of blueprints within a structure?

barren dove
flat coral
whole jay
#

For example

#

Like to check if that actor is within the Doors array for example

barren dove
flat coral
#

Like if "total cast time = 10s" and "Current charge time = 2s" then "current charge percentage = 2/10 = 0.2"

barren dove
#

its an inelegant way but it'll work

flat coral
whole jay
#

That's what I figured after thinking for a minute LOL

sacred cradle
whole jay
#

Can someone tell me why my boolean isn't returning as true?

#

Wait should it be class reference

faint pasture
#

Either way, the UI just fetches the value it needs (binding) or is told (Character/Ability tells it) or binds to a dispatcher

#

binding is fine if you got a few things. If you had a bigass WoW style UI you wouldn't want to bind

surreal peak
# whole jay Can someone tell me why my boolean isn't returning as true?

Because you can't test it like that. The OtherActor pin is a pointer with a specific memory address. The array points to the BP Asset itself, which is not the same memory address. This can't return true. You can't fill in a pointer/reference to a spawned actor upfront in some default value array on some asset. That's logically impossible.

sacred cradle
surreal peak
keen ice
#

I need help with widget replication, i have a system that calculates damage a certain way, the widget then displays your damage in a widget as a score, and the score is sorted into D-SS. however, it doesn't work as intended when in multiplayer. It's broken in confusing ways, but basically, it plays the widget on both players, and sometimes none. I can go into a deeper explanation if needed but for now, here is my blueprint system

fiery swallow
#

Quite a few possibilities

keen ice
#

ok i will show the whole system

fiery swallow
#

Hang on hang on

keen ice
#

as im sure you can tell from my programming im a beginner lol. so feel free to roast my work if needed

fiery swallow
#

Just tell me really quick

#

Whats this D - SS business, does this happen everytime you attack someone, or only when the game ends?

keen ice
#

this happens every time you kill a creature or player

#

or technically any time you hit one

fiery swallow
#

Alright is this client predicted or does the server directly tell the player they killed something?

#

Wait hang on see

#

Does it happen when you hit them or when you kill them

keen ice
#

when you hit them

#

the player does enough damage to one hit kill, but technically its every time you hit somthing

fiery swallow
#

Is it client predicted? As in does the client wait for the servers response, or does the client have its own hit trace or whatever?

keen ice
#

im not entirely sure, but I'm pretty sure it works as you described because I'm running this logic off a multicast event which is called by a server-run event

fiery swallow
#

Multicast is most likely your problem

#

There are tons of ways to do this

#

A reliable method would instead be as follows...

#

Client attack enemy -> server acknowledges the hit -> server does an RPC to the client that attacked with their attack score -> client receives RPC and creates the widget

keen ice
#

hmm ok

fiery swallow
#

No multicast necessaey

fiery swallow
# keen ice

This image for example is looking all wrong

keen ice
#

yeah its janky :p

fiery swallow
#

Attacks should never be a multicast, because it only matters if the server does the line trace, and applies the damage

keen ice
#

yeah the whole multicast system as you said, may be the cause for several problems in this system, like the executing of the damage itself simply just wont do it randomly

fiery swallow
#

It's a good attempt, I don't mean to downplay your code. But it's definitely the multicast

keen ice
#

no ofc, like i said im new so il accept whatever

#

thanks

hollow frost
#

Is there an alternative to using "Get Actor of Class" to give an Interface call a target? For example, I'm trying to get information about whether or not my player is moving forward in a sword blueprint to determine the type of swing, but I don't know how to get the interface function to run and then pass through to the sword without using "Get Actor of Class"

fiery swallow
#

@keen ice
To quickly fix this problem, you could save a reference to the player that threw the attack, and then check if the local player is equal to the player that threw the attack, if so then spawn the widget

#

But that would be a bandaid fix to a bigger problem

faint pasture
# keen ice

That's pretty borked.
First off, widgets don't replicate, and they aren't network aware. Start with the source.
You want information about damage events to be displayed on everyone's machine as widgets, correct? Like damage numbers in WoW?

keen ice
#

yeah

faint pasture
#

how many of these, like hundreds flying all over the place? Are they meant to be in 3d (widget components) or on the HUD (2d widgets)?

fiery swallow
faint pasture
#

what's a player?

fiery swallow
#

Correct your own player pawn lol

hollow frost
fiery swallow
#

If it's in an animation blueprint then there's a node which automatically gives you a reference to the owner. "Try get pawn character" and then just cast to your character

keen ice
hollow frost
#

I thought it's good practice to avoid casts as they create hard references, which bloats the size of blueprints?

fiery swallow
faint pasture
#

that is saying, literally:
"Get the first shield you find in the world. Tell it that it is swinging"

#

not "get my shield" or "Get the shield I care about", just "Hey, gimme a shield"

keen ice
#

the widgets never actually leave technically tho they dissapear because of the animation ☠️

hollow frost
faint pasture
#

still gross

#

get MyShield

hollow frost
#

I'm not well versed in blueprints either, I'm learning lol

hollow frost
faint pasture
fiery swallow
faint pasture
#

Event DamagePopup or whatever

keen ice
#

ahh thats a good idea

fleet sigil
#

Is there any way to remove the object reference here?

hollow frost
keen ice
#

what would be the advantage of that?

fiery swallow
#

But anyway, yes, get the owner of the sword, and retrieve the MyShield variable from there

hollow frost
#

Which would require a cast, correct?

fiery swallow
#

Assuming the owner of the sword is the player holding the sword

faint pasture
fiery swallow
#

If the character already exists in the game a cast won't matter...

keen ice
#

ohh ok. so if i want it to only pop up for a single player, what replication method would that be?

faint pasture
#

You haven't said why the sword cares about the shield at all

hollow frost
faint pasture
#

the one dealing or recieving the damage

keen ice
#

dealing

faint pasture
#

Are they doing any damage calcs at all, predicting or anything of that sort?

#

or are they just telling the server to shoot and letting it handle it from there?

#

show your code from a button press to the damage actually happening

keen ice
#

ok

keen ice
keen ice
fiery swallow
keen ice
#

thats all the logic for the attack in those 2 sc

fiery swallow
#

The only time you shouldn't use a cast or hard reference is when there's a chance something may never need to exist in memory

keen ice
fiery swallow
#

Like an elite Easter egg sword that's hidden far away in never land

hollow frost
#

So as long as X thing exists in the world, casting to X won't add the entirety of X back into memory, on top of the version of X that already exists?

fiery swallow
#

So no, casting will make no difference

hollow frost
#

so if X is 100mb and already exists, and Z is 50mb, and Z casts to X, an additional 100mb won't be put into memory

#

I wish I knew that like, dozens of hours ago

fiery swallow
#

What you described isn't the fault of casting

#

Even if you didn't use a cast those 100mb swords would still stack in memory lol

#

Interfaces aren't gonna save you there

hollow frost
#

If it's not spawned in it wouldn't add 100MB though?

fiery swallow
#

Exactly, but that's nothing to do with casts

#

Casting is only bad because it loads an object type into memory even if you don't need it

hollow frost
#

I thought casts made a reference to the thing you're casting to that's the full size of whatever the thing is

fiery swallow
#

But keyword being if you don't need it

#

No bro, not using casts isn't gonna give you Thanos power levels of RAM utility

#

Casting is only bad if you are Casting to things that may never exist in the world

hollow frost
#

So you only want to use casting in the event it will always exist?

fiery swallow
#

Pretty much. Like a BaseCharacter, or BaseWeapon

hollow frost
#

🤔

fiery swallow
#

The idea for example is Basecharacter is really an empty container containing information of other base references

hollow frost
#

But I'm still confused on the point of Interfaces then? In this one example, how would I indicate to this interface call to use the FPPawn as a target without creating a hard reference?

fiery swallow
#

Thats because whatever video you watched lied to you most likely

#

Interfaces are not a replacement to casting

hollow frost
#

Well not video, more like video(s) and dozens of reddit posts 😂 It's really hard to find good information about good practices

fiery swallow
#

They are an alternative solution to fix an entirely different issue

#

Such as interaction events

hollow frost
#

Yeah, I'm using an interface for interactions and it works great, no hard references

fiery swallow
#

Door, and light switch would not be suitable to a shared base class, so you'd have to create 2 separate "interact" events which is also not feasible

hollow frost
#

The problem is I also applied interfaces to basically every single thing i made

fiery swallow
#

Interfaces exist only to solve that problem

#

Not to save you ram

#

It just happens to save you ram when you don't know how to cast properly I guess

#

Not only that but interfaces are a huge nuisance because looking at the code you won't even know what object is receiving the interface call when it's time to debug

#

It's a huge pain

hollow frost
#

So in the pic I sent, it would be better to use a cast assuming it's in an actor blueprint that will basically always exist?

fiery swallow
#

It's absolutely not meant to be used as a "better cast"

hollow frost
#

😭 I wish I knew this when I was first making all this that would've saved so much time

fiery swallow
#

If you know that the shield object type will always exist in the game then definitely casting to BP_Shield won't be a problem at all

hollow frost
#

So I wont experience any issues casting between my player, the sword, and the shield blueprints as long as they are all core parts of the game

fiery swallow
#

That's why I said it's almost always okay to cast to Base classes assuming you set those up correctly aswell

#

Base classes should only contain empty references

hollow frost
#

Is this discord associated with the unreal reddit? This really should be pinned information

fiery swallow
#

Child classes will fill those references

fiery swallow
#

Same with the whole "never use tick" nonsense

#

Beginners often misuse tick

hollow frost
undone bluff
#

blueprint is damn limited though if you need to do something every frame but not always

hollow frost
#

everything I read about how they worked lead me to the conclusion that using casting would make the game's performance bad

fiery swallow
#

They did everything except mention the part where interfaces use casts

hollow frost
#

Yeah, I just figured that out today unfortunately

fiery swallow
#

I figure if I can save atleast one person a month from casting phobia I'm making a difference in the world

hollow frost
#

It definitely just saved me hours more of trying to figure out something lol

#

What about event dispatchers, what is the problem use cases for those? They seem somewhat similar to Interfaces but I assume their purpose is different

undone bluff
#

Calling an event on tick and bind/unbind as needed doesn't sound bad

#

Using it to drive a curve would probably still be better than a timeline

thin panther
#

useful resource

undone bluff
#

"calling around 300 empty tick nodes in a single frame costs around 1ms per frame" holy shit nice reminder to always turn off ticking on actors and components when it's not needed

#

that is a lot more expensive than I expected

fiery swallow
#

You can see a list of everything set to tick by running the command "dumpticks" in the console

undone bluff
#

ooh nice one

meager spade
# hollow frost What about event dispatchers, what is the problem use cases for those? They seem...

Basically, let's say you have class A that has an event dispatcher, by calling the event you are doing the same thing as calling each individual function that is listenting to it. It saves you having to know which functions to call and also helps with decoupling. All the other classes just decide to listen to you calling the event instead of manually calling each single function individually

fiery swallow
undone bluff
#

event dispatchers are great for components

#

I mean you kinda get the use case just by looking at how native classes use them

meager spade
#

I remember that they were a little bit intimidating when I started out

main lake
main lake
fiery swallow
#

Because if it had anything to do with casting vs interfaces I'd love to see it

hollow frost
#

Is he suggesting that interfaces is better

#

Oh I know the video you're talking about lol

#

I just watched it today

undone bluff
#

Interfaces: I don't know who I'm talking to but I wanna tell them something and maybe request a message back
Event dispatchers: here's a message with no return address to anyone who cares

hollow frost
# fiery swallow Because if it had anything to do with casting vs interfaces I'd love to see it

This is how to find what is using the most memory (RAM) in your games and how to fix it to reduce lag.

Get access to the project files and more on my Patreon: https://www.patreon.com/MattAspland

Check Out My Game Studio: https://www.copagaming.co.uk/

#UE5 #UnrealEngine5 #UE5Tutorial
____________________________________________________________...

▶ Play video
main lake
#

yeah

hollow frost
#

I saw this about an hour ago

#

Had nothing to do with me using interfaces originally, all my stuff is from months ago

#

the cubes go from like 110mb to 1mb

main lake
#

I talked about it with more experienced devs than me and they explained to me that there's no big optimization there compared to what he's trying to say in the video

hollow frost
#

this is what he's talking about

#

I find this feature a bit confusing having just learned about it. My sword child actor says it's 1mb larger than my base sword BP, but in my file explorer it's not

main lake
#

Like it doesn't change that much as in his example the character will be loaded in the memory anyways, so you're casting or not won't change that much compared to his sayings showing the 111 MB going to 1Mb.

hollow frost
#

I assume it's referring to it in a vacuum?

undone bluff
hollow frost
main lake
#

because in the beginning I thought that each actor I drop in my scene would cost 111Mb (when not optimized) and they told me it doesn't work like that

undone bluff
#

honestly the worst offender are often inventories

#

my god

#

common fuckup

main lake
undone bluff
#

inventories that hard reference every item in the game, their model and textures

main lake
thin panther
#

Don't get me started on the data table for every item that has hard refs to bp classes, models and textures

undone bluff
#

yea that's like up there one with one of the worst things you can do

faint pasture
#

then you can just load the game and be done with it

undone bluff
#

I mean if you can load your entire game into memory at once then you don't gotta manage haha

faint pasture
#

when you load the game you're really gonna LOAD THE GAME

thin panther
#

Yeah frontloading the entire game on super small games is a perfectly valid tactic

faint pasture
#

So when do assets get loaded? I've noticed sounds being delayed the first time they are played, is that when they are loaded? I thought it'd be when the thing referencing them was loaded.

#

or is that delay between being loaded and being cached by the audio system or soemthing

undone bluff
#

you can set them to prime on load to avoid this

#

if you don't have much audio

#

they are a special case though

hollow karma
#

I have a Blueprint class that derives from a custom C++ class. It is DA_Item1 derived from DcsItemDataAsset

I have a Blueprint Actor class with with a variable of type DcsItemDataAsset

I cannot, however, assign the variable a default value. My DA_Item1 does not show up when I try to assign the default value.

Why?

fiery swallow
hollow karma
#

It's class is declared as

UCLASS(Blueprintable)
class DCSINVENTORY_API UDcsItemDataAsset : public UPrimaryDataAsset

Is that what you mean?

fiery swallow
#

I meant DcsItemDataAsset

#

something like

#
UPROPERTY(BlueprintReadWrite)
UObject* DcsItemDataAsset
#

or whatever

hollow karma
#

DcsItemDataAsset is a class, not a property.
DcsItemData (no asset) is a variable added in blueprints to an Actor and it's type is set to DcsItemDataAsset

fiery swallow
#

🤦

#

my mans

#

does your variable have the UPROPERTY BlueprintReadWrite

hollow karma
#

My variable is not defined in C++. It was added through the Blueprint interface

fiery swallow
#

You can't inherit a variable from an interface

#

you can only inherit functions from interfaces

hollow karma
#

It did not say I was. In that sentence "interface" = UI

#

In the UE Editor, I created a Blueprint class that inherits from Actor, and then in the Blueprint editor for that new class I added a variable

barren dove
#

Hey can someone gimme a hand here
common button doesn't appear in my gui, just the text?

fiery swallow
#

if so you need to create the object first, and then set the reference

hollow karma
#

I'm asking why nothing appears in the dropdown when I try to set the variable's default value

#

DcsItemData is a variable of type DcsItemDataAsset
DA_Item1 is a blueprint that inherits from (and therefore is a) DcsItemDataAsset
When I click the drop down in screenshot above to set the default value of the variable, nothing shows up. I expected it to show my DA_Item1 blueprint

fiery swallow
#

I think there's 2 different types of data assets, perhaps they are not the same

#

the only other thing I can think of is the cpp asset you created was nor properly exposed

#

this is a question I would have asked in #cpp

hollow karma
#

Yes. There is PrimaryDataAsset and regular DataAsset. Mine are a type of PrimaryDataAsset

fiery swallow
#

I'd bite the bullet and ask in cpp, I think there's something involving proper exposure to blueprints

hollow karma
#

It could be

fiery swallow
#

most people who use blueprints only likely won't know the solution to this

desert juniper
#

Ddi you make it via the standard create blueprint menu? or the misc menu?

desert juniper
#

This is the way to make an instance of the DA class

#

otherwise you are just defining the architecture for another parent DA class

hollow karma
#

Hmm. You mean it can't be a Primary Data Asset? I am new to assets, so I may very have picked the wrong base class

desert juniper
#

the C++ class should be either PDA or DA. either one is fine

#

when you want to make a blueprint instance of that class, make it via the Misc > Data Asset menu

hollow karma
#

It is a PDA. It does not show up in the Miscellaneous list, though

desert juniper
#

Not this oen

hollow karma
#
UCLASS(Blueprintable)
class DCSINVENTORY_API UDcsItemDataAsset : public UPrimaryDataAsset
{
    GENERATED_BODY()
#

It's declared like that

desert juniper
#

UCLASS()
this should be enough

#

no need to specify it's Blueprintable

#

other then that, you don't' need anything else.
go ahead and rebuild. make sure you close the engine, build project, and see if it shows up in the misc list.
to be clear

#

in the Misc list, choose Data Asset

#

then choose your C++ base class from that list

hollow karma
#

I did that. That did not change anything.
Could this have something to do with this class being part of a plugin I am developing?

desert juniper
hollow karma
#

Doh!

#

I forgot that when you click "Data Asset" it then gives up a way to refine the class you want

desert juniper
#

🙂

hollow karma
#

It works now. Thank you very much!

desert juniper
#

one more thing @hollow karma if you want to use the asset manager, make sure you override
virtual FPrimaryAssetId GetPrimaryAssetId() const override;

hollow karma
#

Like I said, I'm new to Data Assets of all kinds.

hollow karma
desert juniper
#

I was struggling with DA's and the asset manager for some time before. feel free to reach out if you need some help.

hollow karma
#

I've read that and some other things, but it's not really stuck in my head yet. This project should help with that as I try to actually put things into practice

desert juniper
#

with the added advantage that you can run logic on them

#

basically an object that can store data. it's meant to store data, and not generally recommended to be manipulated at runtime, unless you're clever about it

hollow karma
#

That's what I need it for

tribal gazelle
#

What node do I use for a begin play inside a game instance? Event init does not seam to work and cannot find any other nodes.

frosty heron
#

Gi gets creates before your world even exist and gi can exist outside of worlds

tribal gazelle
#

I can see a begin player or construct nothing

frosty heron
#

Meaning if you want nodes that require a world you will need to pass GI the world context obj

tribal gazelle
#

So I would have to call functions inside it from elsewhere?

frosty heron
#

Depends on what function

#

In cpp pretty sure u can just pass world to do stuff in the level

tribal gazelle
#

Trying to handle things like missions in the GI and trying to initiate a prologue

#

Well just trying to call something lol

frosty heron
#

Doesn't sound like the right place

#

You should have a manager for it

misty badger
#

I don't get it, does Game Instance is single when testing in viewport for multiplayer? Or Game Instance created per viewport window?

lunar sleet
frosty heron
#

Each game instance (each computer/machine) have one

#

Having said that you can make a game instance subsystem. That one has no limit

#

Oh I'm not sure about multiplayer pie. It should create one for each

#

Can always test is later

#

Just do a set and print of variable

misty badger
#

Oh yes, each pie window has it's own game instance. Thank you god!

summer sail
#

Is this a good way to implement double tap? I test if "move" executed for less than 0.1 secs and set a bool to true if been tapped. Then set up a timer to reset it if it takes too long.

frosty heron
#

I would think something like that would have been covered with enhanced input system

#

Not sure how tho

summer sail
#

I read the documentation but couldnt a way to check for quick taps maybe I missed something.

#

what is your thoughts on this solution anything i can do better?

finite hearth
#

How would I get the player controller of the possessing player, from the the possessed actor?

frosty heron
finite hearth
#

One more: I am using attach actor to actor to snap a camera actor to a unit actor. Everything is fine, but there's some funky collision of the camera - which results in my camera being offset from it's intended vantage.

I believe it triggers whenever the camera is bumped, but I don't see any collision settings on the cam.

Anybody have advice on how to lock the camera to the relative location of the parent actor? Or should I not be using attach actor to actor?

lunar sleet
#

Nvm I just saw the collision part

#

There should be something tho

finite hearth
#

The collision of the falling tree is set to only block world static, so I don't understand why it would mess with the camera location.

lunar sleet
#

Collision is double-sided

#

Both parties need to have the same setting for it to work

#

I.e. the camera can block the tree even if the tree ignores it, and thus get bumped

finite hearth
#

But I don't see any collision settings on the camera or spring arm.

finite hearth
#

I think the problem was my spring arm. I was settings its location using a transform. I changed my logic to use "Target offset" and the camera is no longer being bumped.

frosty heron
#

The camera have collision setting if that's what u r looking for

#

Channel and the radius

frigid summit
#

hi guys how do i fix this it always return not valid after charcter death Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetBlackboard_ReturnValue". Node: Set Value as bool Graph: EventGraph Function: Execute Ubergraph Corpsebpfull 1 Blueprint: corpsebpfull1

#

when i print it to string it always return hello

unborn raven
frigid summit
unborn raven
frigid summit
#

seems like death make blackboard disactivated

frigid summit
lunar sleet
#

Destroy actor should not come before anything else that accesses the object

#

it invalidates it because it destroys it

frigid summit
unborn raven
lunar sleet
#

You can always hide something instead of destroying it, if you still need to do things to it after

frigid summit
frigid summit
lunar sleet
#

Ok, if get blackboard returns None it means you don’t have a blackboard set when that event fires

frigid summit
lunar sleet
#

You need to set the blackboard inside the AI controller bp, are you doing that?

frigid summit
lunar sleet
#

And also, organize your code better it’s very hard to see what is happening in that screenshot. Your isValid check is not connected properly

#

Right now your event fires and if the AICon is valid, it keeps looping through set value and isValid

#

Write your code from left to right like you would write in English.

frigid summit
#

ok

frigid summit
lunar sleet
#

Fix the current event. Connect the nodes properly

frigid summit
#

this is on death event that still make it unvalid and the charcter is not destroyed : (

frigid summit
#

same like on animation finished event it also return unvalid i dont know whyyyy

lunar sleet
frigid summit
#

ok

#

wtf even the ai controller is unvalid

lunar sleet
#

There you go, so whatever corpsebpfull1 is, it’s not possessed by an AICon, least not when this event fires

frigid summit
#

ok than i will call the possess in the event begin play

gentle urchin
#

Or set it in the bp's default values

dull dawn
frigid summit
gentle urchin
#

Proof or it didnt happen

lunar sleet
dull dawn
#

should i do it on a custom event?

gentle urchin
#

Done on tick is the issue

#

Beginplay would work nicely

#

Or custom event

lunar sleet
#

Yes, you’re currently recreating the widget 60-120 times per second

gentle urchin
#

But it must be exevuted by something

dull dawn
#

ah i see ill try thanks

lunar sleet
#

There might be other issues like input mode but def start there

frigid summit
#

i set poseess in begin play and after on death and still unvalid

#

seems like the death disable everything

lunar sleet
#

You should only be possessing it once, and do so before the game even starts

frigid summit
lunar sleet
#

Go to that message

frigid summit
lunar sleet
#

Is it set to Autopossess AI on Spawn and Placed in World ?

frigid summit
#

maybe i need to set custom controller than

dull dawn
dull dawn
#

but i need to show the ui from my level BP no?

lunar sleet
#

No

#

Level bp is something people that have no idea what they’re doing teach on YouTube or wherever

dull dawn
#

ah

lunar sleet
#

You can show UI from your player controller if you need something centralized

dull dawn
#

so then i can cast to thirdperson bP from my actor BP correct?

lunar sleet
#

You can communicate with any bps from anywhere except level bp.

dull dawn
#

it worked thanks

dull dawn
lunar sleet
frosty heron
#

Tldr don't use level bp

frigid summit
silk sail
#

I am working on a multiplayer game. My character has a variable to represent the current hotbar slot that is selected. The variable is changed locally. How can I pass it into a function will be called on the server?

knotty cloud
#

Hi, Im trying to make a very simple flashlight for a vr project, Initially Ive been using a duplicated version of the pistol from the base project with the firing disabled and im trying to have it with a simple button press to turn the torch on and off, I can pick it up however I cant use any controls on it.

I changed the Input controls from the weaponL/R to my own custom TorchL/R which contains a single mapping to either B or Y on the oculus touch controller ive added some print strings to try and get some information into the output log for me to check after ive taken the vr headset off after testing but nothing shows up.

north lynx
#

Hi!
I have a problem
When I use my own textures from Substance Sampler, UE5 don't scale them down according to my settings
Any ideas why is that?
Here's code for changing the Texture Quality

frosty heron
silk sail
frosty heron
random pulsar
#

hey guys i want to create a widget when all actors of class parent food are collected,but i think is is a bad practice to get all actors of class each time i overlap with a food.Is this a bad logic or no?

#

also it is better to write it in game mode?

frosty heron
#

Ye pretty bad and make it not scaleable

#

Just get what u need to get

random pulsar
#

i mean i get only the parent?

#

or how

frosty heron
#

What's the goal

#

To collect food?

#

Get a ref to those that you need to collect

#

And just check those element. Don't check anything else u don't need

#

Like if u only want to collect food from the kitchen, only get the food and check food from the kitchen. Don't get the entire world food

random pulsar
#

now i speak with an npc,when i finish the dialogue there spawns food,i collect it(they just add a counter on widget ,increment, and destroy .)after i collect all the food i want to create a widget ,but i need somehow and somewhere to check if there are no more food in the level

frosty heron
#

Dialogue with Npc -> Spawn food -> Store the spawned food in an array

#

that will be the food that you need to collect

#

everytime a food is collected, take it out from the array

#

once they are empty, you can execute your finished logic

random pulsar
#

i am sorry i made a mistake,they dont spawn,they just show themselves and enable collision

#

on begin play they hide

frigid summit
frosty heron
frigid summit
frosty heron
frigid summit
#

set value as bool of enemy

frosty heron
#

what if the food is spawned before the quest is taken?

frosty heron
random pulsar
frosty heron
#

just spawn them after quest is taken or dialogue is initiated

random pulsar
#

its also a bad practice but it works😂

frigid summit
random pulsar
#

now no need ,the problem is not here

frosty heron
frosty heron
#

instead spawning them and storing them as a variable (array)

frigid summit
frosty heron
#

knowing to do this, will get you long way

frosty heron
frigid summit
frosty heron
#

always start simple if u are not sure

#

start a fresh black board and BT and just set the value

frigid summit
random pulsar
frosty heron
#

everytime you collect food

#

take one out from the array

#

when it's empty, it means there is no more food

#

and when there is no more food do X

dense mica
#

Hi @novel silo , apologies for pinging directly. I'm having the same issue, are you certain issue was related with BP structs? This seems to be happening on UE5.0+ only, but I couldnt pinpoint if its always related with BP structs or not

#

To give you more context; BP structs are very fragile becase they dont break in Fortnite since Epic probably dont use them

#

Its a corruption/serialization error

#

And there isnt a better debugging tool, this is directly related with reflection system and probably BP compiler

#

Ubergraph is a BP virtual machine data structure, where BP compiler combine every event node into a single hidden event node, this is related with how Blueprints designed in backend

#

Your BP struct set member thing seem to be used in a function, which might be a false-positive to get suspicious from it

random pulsar
random pulsar
#

is this a good practice to load the next level?i want by clicking on the button to load next level

#

level names are Level1,Level2.......,Level6

dense bone
pallid swallow
#

I am quite new to unreal, do you guys know if it is possible to set the size of the default floor actor on event begin play ?

random pulsar
#

you can do this in a few ways

#

first one is in level blueprint right click get the ref of the object drag from that object and type set actor 3d scale

#

and in new scale let the scale

#

you can modifi it in details panel just unlock the scale,and type the values

#

and one more way

#

creating an actor ,there getting the ref of the object ,place the actor in the scene make it instance editable,get the ref of the actor in blueprint and make the same as in level bp

ruby apex
#

Spent one more day, still don't get how to make it work. Help please (question about blueprint transitions in anim instance) #animation message

turbid pecan
#

Is there any authoritative information around why I would NOT want to store all persistent globals in my game instance? Stuff relevant to cross-level gameplay and so on.

pallid swallow
undone bluff
#

static lighting?

#

also uh, allocate some more vram with r.Streaming.PoolSize [memory in MBs]

random pulsar
#

i dont have enough information to tell you why

#

place the camera higher idk

pallid swallow
#

When I don't resize it goes like this

pallid swallow
undone bluff
#

literally first property in the details panel on any light propagating or receiving actor

#

static is baked, stationary is cached and movable is real time lighting

pallid swallow
undone bluff
#

You set it to movable, right?

pallid swallow
#

Yes, by default

undone bluff
#

The light source?

pallid swallow
undone bluff
#

I figured it's the default but that looked exactly like what would happen if you tried to scale an object with baked lighting

#

I cannot think of anything else it could be

pallid swallow
#

I will try in a complete blank project to see if it's linked to metahuman or something I did

#

Same issue in a new blank project without adding anything

marble tusk
pallid swallow
#

Make so much sense

#

Thanks

brittle mural
#

When I create an empty actor class in my project and double click on it, I get the following error. I deleted the Saved and Intermedite folders and tried again but the situation is the same. Can you help me?


UnrealEditor_RigVM
UnrealEditor_RigVM
UnrealEditor_RigVM
UnrealEditor_RigVMEditor
UnrealEditor_RigVMDeveloper
UnrealEditor_BlueprintGraph
UnrealEditor_BlueprintGraph
UnrealEditor_BlueprintGraph
UnrealEditor_BlueprintGraph
UnrealEditor_Kismet
UnrealEditor_Kismet
UnrealEditor_Kismet
UnrealEditor_Kismet
UnrealEditor_EngineAssetDefinitions
UnrealEditor_AssetTools
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_UnrealEd
UnrealEditor_ContentBrowserAssetDataSource
UnrealEditor_ContentBrowserAssetDataSource
UnrealEditor_ContentBrowserAssetDataSource
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_ContentBrowser
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_Slate
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
UnrealEditor_ApplicationCore
user32
user32
UnrealEditor_ApplicationCore
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
UnrealEditor
kernel32
ntdll```
barren dove
#

stupid general question: all the UE editor windows seem to be set to "always on front" in an order that infuriates me, where is the setting so that they behave like regular windows?

lofty rapids
#

Level{LoadLevelNumber}

#

this way to goto next level you can increment currentLevel, and load the next level

#

or load whatever level you want

novel silo
#

can I make threads in here?

dense mica
#

threads are disabled in this server

novel silo
#

alright, so my problem was finally here

#

well, my bro problem, I didn't knew much about the project, but for whatever reason this got corrupted at this point. Since I know more about git I helped here just by trying different commits

dense mica
#

i find this very interesting because callstack doesnt make sense when I compare it with the screenshot, Ubergraph is something strictly related with things in event graph

novel silo
#

My bro did the best at commiting mostly every step of the tutorial e was doing to "take notes" along

dense mica
#

I think my client also has same BP structs so we'll start with removing them

#

thanks for the confirmation

#

BP structs are also known for being completely broken anyway so its best to avoid them

novel silo
#

I think this was the before, at some point he turned this blueprint into the one I posted before

#

might be the the other way around, the chat we had was very uninformative 😅

#

Bascially at some point he changed it and building broke, very flimsy in my opinion

#

In any case, pretty please, use version control and don't forget to commit often! 😘

blissful summit
#

Is it normal for set actor location to increase the frame time on the game thread a lot?

#

Theres a pattern in my project where whenever I use set actor location/relative location the FPS will drop until it finishes moving

#

or is that purely an editor only thing

#

(i am calling set actor location every tick until it reaches destination)

snow oasis
#

How Expensive are Branches?

#

This is just a simple system to make it so when you are out of ammo a Click sound Plays.
Is this fine or is there a better way to do it?

lofty rapids
#

i don't see branches being expensive, something like an if is pretty common stuff

snow oasis
#

Alright so just dont worry about it?

#

unless its like an extreme example

lofty rapids
#

i mean i wouldn't worry about branches unless you had a whole lot, like a real lot

#

i don't know what that number is but it's just such a simple task under the hood

#

i mean i wouldn't worry about 100 branches imo it's probably not an issue you need to worry about

snow oasis
#

Yeah

#

Alright Thanks.

kind estuary
#

@faint pasture I created a World subsystem.
Each unit is one struct instance and one instance of ism.
Where do i store the struct? In an array?

#

Or a TMap?

#

Seems a TMap is more efficient

#

else im going to have to iterate through it a lot

#

or would you do an array

neon lion
#

i have a tarray of ustructs, how can i get one of them from it by reference
so that i can modify the struct i get, and in doing so also change the one in the array

#

aha nevermind i figured it out, how to get an array item by ref

kind estuary
#

@faint pasture And the first barriers im coming accross with the Struct system is that its not adecuate for interfaces and functions.
So if my tiles are occupied by buildings or some other type of object other than units then things will get complicated, and at that point it might be better to use UObject or AActor

#

ill let this simmer a bit 🫕

gentle urchin
#

Tmap doesnt replicate

#

Array also comes in fastArray

#

Tile struct differ from unit struct

#

Tilestruct contains some bools to identify if its occupied, which team occupies it, and if it's still passable etc

#

No need for actors or uobjects so far

#

Everything is just data

stoic root
#

A little assistence please 🙂 I'm trying to make an object (saw blade) rotate as it goes down a path. The path works as expected however i cant seem to get the blade to perpetually rotate. Any suggestion please? Thank you.

gentle urchin
#

You can play this out with 0 visualization

kind estuary
#

so in the tile struct i have AActor* Entity

gentle urchin
#

The building doesnt nedd to exist

#

As an actor

#

It can too be just data

kind estuary
gentle urchin
kind estuary
#

but how do you then interact with that. You need 2 references, 1- FUnit, and another FBuilding

#

And check all the time

#

and may need more structs

#

then different functions for all

#

can become a nightmare

gentle urchin
#

You click on tile -> you look up tilestruct
It has an ID for building and an id for units

kind estuary
#

so what if you have more types

#

then it becomes a mess

#

Id for building, Id for units, Id for pants, Id for socks

#

with AActor

#

You have one reference

#

and then you can cast, or use interface. And win <-

#

or no? @gentle urchin

gentle urchin
#

You gotta maintain and update all these references too

#

Back and forth

kind estuary
#

though its more maintainabLe

#

idk