#blueprint
1 messages · Page 101 of 1
Youd add a socket for each face
Name them according to dice value
Then we can getallsockets -> foreachloop-> find the socket with highest Z
Wait wait but aren't sockets at the mesh level? The faces are all the same mesh, no?
They are
But the dice got 9000 faces
If you wanna iterate them...
I guess you could still do the 20 first
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
Anyone know offhand what "Removed from world" means and how it's different from "Destroyed"?
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
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
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
I dont think i have a single interface across my not so few projects
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?
yeah that's a good way of doing it
afaik only relevant to level streaming, when the level it is in gets its UWorld::RemoveFromWorld called
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
is there anyway i can separate global illumination from this? and force the global illumination setting to be high
instead of setting overall level you just set the Global Illumination Quality
The hack way to do it would be to just grab the current value of Global Illumination Quality from the settings before calling that, store it in a local var, then set it back to that after calling overal scalability level
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?
Questions you gotta ask yourself:
- Can the player move around at all while this widget is up?
- Is this widget exclusive?
- No, actually though, is this widget exclusive of EVERY other widget that can have input? Can you open main menu when the workbench is open? Can any other menu open in ANY circumstance?
#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
I'm still struggling getting the input right for my inventory widget
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
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
The thing you need to know about navigating UMG widgets via gamepad is that it fucking sucks. It never works right out of the box, and it's a lot of damn effort on EACH widget to make it work how you want.
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.
I got that part figured out so far I think, but my issue is that you can still play the game while the inventory is open on the side and drag out items
Dragging and dropping is one thing I haven't messed with. I actually considered it for one UI and went a different route just because it seemed too hard to do right
Kinda still trying out my different options on what feels right
what object reference does casting to widget need in most cases?
Imma head this off at the pass and ask you a question instead: What do you think Casting does?
i use cast for getting the variable,the reference,from that ref i get the information from that object
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."
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
Honestly like 90% of programming is "I've got this value over HERE, and I need it over THERE" and trying to make that as un-gross as possible
Playercontroller > get HUD
Let the hud manage the widget and just communicate with it using an interface
added it but when i drag from HUD and type my widgets there is nothing,seems like i don't understand it
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
It seems unlikely to me that you would need an interface to talk to your hud
Ya that's usually a pretty safe cast
interfaces are for situations where you don't have certainty about what you're talking to
Fair, casting is ok here
Worth saying, interfaces are my least-favorite method of generalizing functionality
But, I like to not put a dependency on my HUD and all its widgets and just leave the flexibility
Interfaces are likely applicable for components talking to their owning actor. Other than that, probably not a ton of use cases
Well that's not true
wouldnt that be dispatchers ?
and anything the owner needs, it can read?
the owner is likely (?) project specific anyway, so not much gained by avoiding dependency ?
owners typically know which components they have, but components don't know which owner they have. If they do, they're probably poorly designed
Player components are fine
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
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
which confuses people to no end
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
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
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)
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?
Yep. An actor can have any number of usable components, they have a Priority field and both focus and interact respect it
using inheritance to avoid inheritance
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
Somehow i feel like you're leaving out some big caveat to your setup x)
I mean, if I am it's because I forgot it lol
Is that per component or the whole actor?
struggling getting a nice setup for this specific thing
tbh i havn't even considered subclassing components xD
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.
hey does anybody knows where can i learn UE5 for free?
@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.
I don't even know where to pay to learn UE5
how do you handle assigning components that you want to glow?
Oh I think I misunderstood, the component makes the actor glow
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
I often need to assign individual components to actor component functionality
and there seems to be no really nice way
My current solution uses actors, but it could easily be replaced by uobjects
I wish there was an eyedropper for component references like with actors
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.
ah
These crates in my smoketest level are for testing glow. The front one has every type of glow component.
should i use actors?
Up to you really
they are better for replication
are you planning on replicating?
though they are more memory intensive
it's always a tradeoff
This feels like premature optimization.
maybe in the far future
indeed
You probably want to decide earlier rather than later if you are doing replication
^
tacking on replication far down the line is almost always a bad idea
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
so its not possible to replicate uobject?
Fuck UObjects tbh 🙂
If they were any use, things like GameMode would be that instead of an actor
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.
Whats your target number Wolf ?
how many npc's are you aiming for
workers or whatever
like 30.000 per player
though then depends on how many players
since its already 2d and tile based
gosh
and no collision
well best of luck xD
that should be super doable
so i can replicate them in the future @gentle urchin
just likely not replicating them individually I'd think
I'd like to see an RTS with 8x30k replicated easily
Wherever you are. Just open it up and go.
is there a way to refresh the icon of the actor blueprint?
never, you'd have to do some sort of lockstep thing
you'd probably just replicate the commands for a start
Adriel, was it you who made an rts with uobject + ism?
unless they change very rarely then you could do some other sort of system like diffing
nah that's not me
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?
Im not replicating anything tho 😄
Might be simpler just to have some fast array of structs IMO
What are you actually trying to do?
something akin to Factorio?
this @faint pasture
im half way through the basic setup
yeah nah just make an array of structs for your tilemap
or a struct of arrays
or hell, just use a map
thats already done now the thing is the units
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.
I'd probably aim to replicate as little as possible
Honestly that's my advice on UObjects summed up: "Are you sure you can't just use a struct?"
i thought about that, though structs are bit more clumsy in bp. hence why i consider the uobject
Give an example of a unit
- ID
- Health
- Vector2D Location
- Vector2D Direction
- ActionPoints (Move, Attack)
?
A unit is like a plane turned to the camera, instance
has no collision
has the tile he is on
no i mean the gameplay elements of a unit
yes
do they attack, have spells, have buffs and debuffs, what data do they have?
that
they attack
and move to tiles
Yeah just use structs
what about if the game becomes good and i need to make it multi?
Struct Unit
ID
Name
HP
Attack
Defense
OnDeathEffect
WhateverElse
Location
AimDirection
it'll be 100x easier to network an array of structs than anything else tbh
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?
yes
yeah you'll have to split out the background sim from the rendering a bit but you get the picture
noot sure i'd imagine this with 30k but oh well
singulair lerps?
imagine a city sim
if they're all clumped up together on one tile, sure
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
im planning on 1 unit per tile
to avoid stack of dooms
so a player can see how many tiles at a time?
your pathfinding is gonna be hell lol
it can zoom in and zoom out
so it goes like a 100 tiles+
yeah for sure just use structs IMO
pathfinding is done
converted from c++ pure
you're saying you can have 10k agents navigating without the cpu exploding?
so its like this
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
and you've tested with 10k agents trying to do that?
i tested with many tiles
i think it wont change
because it just checks the tiles if they are occupied
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
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
At this speed, how can you even think about 30k?
Even 300 will be painfull to play with
I thought it was 30K 'units' inhabiting one tile at once, moving tile by tile as a horde.
Must've misread.
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
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 🙂
Gotta ask the question so we know what we're saying yes/no to
thats right...
have to rrethink that
its like civ
but realtimish
Ish
so far its just a battle
Sounds like a horrible inbetween place 😅
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
Also #chaos-physics
yup maybe it will suck...
I initially thought it was bp related 😅
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
So what happens when 10k units are bunched up like a Chinese traffic jam to get through some area
violá problem solved
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
there lets say you want to move to a tile and another unit is already moving in there, your unit waits, or goes around the other unit.
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
so at best we calculate the path finding only once
Yeah, the goes around
or twice
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
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?
thats' still 2 seconds between pathfinds per unit, maybe more
no he pathfinding only once at the start
what happens when someone moves in the way?
They wait
yup waits 🫷
it can also recalculate the path
its only once
but the other 9k guys did the same thing and now they're in the way
then it goes all the way as long as it dont hit another block
Knowing paths, you can even predict whos there
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
I need a sanity check...Since when is 4-2=0?
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.
tick is fine
depends on how many things have to check, and how important it is to be fast
okay so imagine a game of chess, where units move slowly from tile to tile
if it's important and there's not many (a fighting game), then tick is absolutely fine
I never trust bp debugger
how many moves per second if there's nothing in the way?
5 seconds per tile
let me see if i find an example
like in crusader kings
just batch things and do your pathfinding between the moves
but instead of a country its a tile
do all of them move at the same time or spread out over time?
I can see why, lol
they move at the same time
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
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
I was creating function that hid other players' nicks if they had passed certwin distance.
that doesn't have to be on tick, just have a timer or a slow ticking thing that'll update it every so often
With or without intent
but tick is fine for now
Struct Unit
bool WillMoveNextUpdate
its because you dont pathfind again unless the next tile you are about to move is blocked by a friendly unit that is idle there. If it is an enemy you simply -> Combat.
But if is a friendly moving you wait. Still no recaculation of path. If a friendly unit moved in, you are just checking the tile if it is occupied -> yes -> is the unit occupying idle? yes-> then go around it (recalculate)
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.
ok what about 2 units both moving to teh tile 1 unit is moving off of
they both think they can move there
one will move first and have the tile struct marked as occupied by this unit even if you are not there yet
then the other willwait
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
yup thanks for putting all the questions
Get it to work now.
Optimise for aesthetic later.
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
SpawnUnit:
Get UnitSubsystem -> call SpawnUnit
How to get players in radius?
Get All of Class
how many players are around and what is the base class of them?
I would just use an overlap sphere tbh
at the moment im getting the UnitManager->SpawnUnit (gets grid actor to check if tile is empty) -> spawn
On overlap -> show name
On End Overlap -> hide name
My bad, yes. Adriel is on the money here.
Yes, UnitManager should be a subsystem in the Real Thing™️
okay, its so its accessible everywhere correct?
yup
Pretty smart ❤️
Thank you
will do them as you said, array of structs + ism index reference
You could do it all with 1 big subsystem or have 1 for units, 1 for tilemap, 1 for this, 1 for that, etc
Hey guys i have a question, is it possible to apply a tag to a target from a animation notify blueprint?
Does the notify know the target?
Do you want the notify to do it or just tell its owner "hey tag something now"
(hope im not wrong) i'm using a sphere trace by channel and then i want to apply the tag to the target it hits
okay will dive into subsystems tonight before i shoot footy -> 🦶 🔫
If that's a general mechanic in your game then that can be fine
Subsystems are just objects that are globally getable and automagically created/destroyed. You'll want a UWorldSubsystem probably. They don't tick, but you can make them tick, or subclass the tickable version.
I love them, use them all the time
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 
start printing and breakpointing to make sure things are happening.
I would test that the hit is happening, the tag is getting applied, the event is happening, in that order
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
are the main unreal classes like gamestate and gamemode subsystems?
why dont i use them?
no
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
It'll be literally this simple to interact with
Whatever -> get subsystem -> call function
awesome
Does anyone know how to prevent my character from spinning while attached to a an object that uses physics constraints
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
Collision box.
Check if it is a player character (Assuming single player)
Trigger UI if true.
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?
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
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.
Because I'd like you to be facing the object to interact with it
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.
...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
Wouldn't that be great if they did
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.
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
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
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.
Nois
You MIGHT still wanna do a line trace from the character to the interactable, otherwise there's a risk the player will be able to like press a button through a wall or something. Dunno if that's a risk for your type of game or not
Good safety to build in for sure.
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
Honestly I wonder if that's why older zelda games made the interact range like 2 inches away lol
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.
I just learned a few things for later, thanks.
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?
The bar's just a widget right? The actual charge-up time is tracked separately?
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
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?
I don't know how to do the logic to make the bar slowly charge until it is full (in the player's view)
I created the logic behind calling the skill, it releases the skill, this whole part works. But I can't make the bar, on the HUD, slowly increase its value, for example, from 0 to 1
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.
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?
as a chunky example
instead of a 10 second timer, use a .1 second timer
each time the timer fires, increment a variable +1
when the variable = 1000, you fire the spell and reset variable to zero/stop the timer
then you setup the tricket you have there to read the variable, and it'll do what you're looking for
Well, if you can set it from 0 to 1, you dont NEED to slowly increase it. You just need to figure out what percentage charged you are, and set it to THAT
he can use interp to, (iirc) to set his input to a scale of 0 to 1 and he's all set
Like if "total cast time = 10s" and "Current charge time = 2s" then "current charge percentage = 2/10 = 0.2"
I will try this
its an inelegant way but it'll work
Sure I'll try 🤘
That's what I figured after thinking for a minute LOL
I have gotten it to reset every time I jump, and blend properly. The problem now is how do I get the time remaining of a blendspace in blueprints? I need to know when the jump animation ends and reverse the JumpTime Timeline.
Can someone tell me why my boolean isn't returning as true?
Wait should it be class reference
Either grow a ChargePercent on tick/timeline or use time (ChargeStartTime)
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
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.
I got this figured out I sent out dispatchers from a new state starting, in the long run jumping with blended blendstates is working now.
The only thing you could do is have the struct array be of type class and then grab the class of the other actor and compare those I guess. But if you use contains it might only check against the exact class and not including child classes.
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
Youre not showing enough code to see the actual problem
Quite a few possibilities
Hang on hang on
as im sure you can tell from my programming im a beginner lol. so feel free to roast my work if needed
Just tell me really quick
Whats this D - SS business, does this happen everytime you attack someone, or only when the game ends?
this happens every time you kill a creature or player
or technically any time you hit one
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
when you hit them
the player does enough damage to one hit kill, but technically its every time you hit somthing
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?
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
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
hmm ok
No multicast necessaey
yeah its janky :p
Attacks should never be a multicast, because it only matters if the server does the line trace, and applies the damage
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
It's a good attempt, I don't mean to downplay your code. But it's definitely the multicast
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"
@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
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?
yeah
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)?
Yes, about 100 million, can you provide more context. Are you trying to get your own player?
ahem, player PAWN? lol
what's a player?
Correct your own player pawn lol
Totally depends. In this context, yes, but I have about a gazillion "Get Actor of Class" nodes all over the place, as I wasn't aware they created hard references.
Here is another example where I'm passing to my "shield" blueprint
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
just think about that
no there is ment to only be one and it spawns every time you kill an enemy, i made an appearing and dissapearing animation in the widget, so now that i think of it, its prolly stupid to just keep spawning the same widgets over and over
I thought it's good practice to avoid casts as they create hard references, which bloats the size of blueprints?
Nothing wrong with hard references provided they are necessary
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"
the widgets never actually leave technically tho they dissapear because of the animation ☠️
Well there is only one of each as only the player has them
I'm not well versed in blueprints either, I'm learning lol
Wouldn't that require a cast?
That can be fine. I'd start out by making an event that makes the thing appear.
In this case, directly after creating the shield, or picking it up, you would save a reference to it. As Adrien said, the reference would be something like "MyShield"
Event DamagePopup or whatever
ahh thats a good idea
Is there any way to remove the object reference here?
Yeah but that would be in the player BP, correct? I should've specified to begin with, but both of those images are from my Sword Blueprint
what would be the advantage of that?
Why would your sword care about the shield your player is holding?
But anyway, yes, get the owner of the sword, and retrieve the MyShield variable from there
Which would require a cast, correct?
Assuming the owner of the sword is the player holding the sword
once you have that, you can call it however you want (multicast, etc)
If the character already exists in the game a cast won't matter...
ohh ok. so if i want it to only pop up for a single player, what replication method would that be?
You haven't said why the sword cares about the shield at all
I was under the impression the cast would add the size of the player onto the blueprint that is casting? Is that not the case
for which player?
the one dealing or recieving the damage
dealing
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
ok
Your making me get ready to make a full tutorial on casting lol. If you know with 100% certainty, your base character will always exist in the game, then a cast is going to cost you nothing
thats all the logic for the attack in those 2 sc
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
Like an elite Easter egg sword that's hidden far away in never land
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?
If it exists in the world then it's already in memory
So no, casting will make no difference
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
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
If it's not spawned in it wouldn't add 100MB though?
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
I thought casts made a reference to the thing you're casting to that's the full size of whatever the thing is
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
So you only want to use casting in the event it will always exist?
Pretty much. Like a BaseCharacter, or BaseWeapon
🤔
The idea for example is Basecharacter is really an empty container containing information of other base references
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?
Thats because whatever video you watched lied to you most likely
Interfaces are not a replacement to casting
Well not video, more like video(s) and dozens of reddit posts 😂 It's really hard to find good information about good practices
They are an alternative solution to fix an entirely different issue
Such as interaction events
Yeah, I'm using an interface for interactions and it works great, no hard references
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
The problem is I also applied interfaces to basically every single thing i made
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
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?
It's absolutely not meant to be used as a "better cast"
Yes
😭 I wish I knew this when I was first making all this that would've saved so much time
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
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
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
Is this discord associated with the unreal reddit? This really should be pinned information
Child classes will fill those references
I believe people continue to tell beginners not to use casts as a safety precaution because they often do use casting incorrectly
Same with the whole "never use tick" nonsense
Beginners often misuse tick
I've repeatedly read the idea that using casting should be avoided, which is why I'm in the situation I am now
blueprint is damn limited though if you need to do something every frame but not always
everything I read about how they worked lead me to the conclusion that using casting would make the game's performance bad
They did everything except mention the part where interfaces use casts
Yeah, I just figured that out today unfortunately
I figure if I can save atleast one person a month from casting phobia I'm making a difference in the world
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
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
useful resource
"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
Funnily enough, converting tick to a function also decreased its costs
You can see a list of everything set to tick by running the command "dumpticks" in the console
ooh nice one
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
Event dispatchers are great for performance. I use them wherever it would make sense
event dispatchers are great for components
I mean you kinda get the use case just by looking at how native classes use them
I remember that they were a little bit intimidating when I started out
Did the video you watched showed the BP_Character goes from more than 100Mb to less than 10 MB by showing you the memory usage through the profiler ? 👀
Link pls
Why ?
idk what that means
Because if it had anything to do with casting vs interfaces I'd love to see it
Is he suggesting that interfaces is better
Oh I know the video you're talking about lol
I just watched it today
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
I assume he means this https://www.youtube.com/watch?v=JWDnTDi_aLY
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
____________________________________________________________...
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
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
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
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.
I assume it's referring to it in a vacuum?
because it's presumably including any dependencies it has
Yeah that's what i figured but wasn't sure
Because the way it works is like it's showing you other dependencies its using so that's why the memory is big (the 111Mb)
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
? 👀
inventories that hard reference every item in the game, their model and textures
it costs alot in terms of resources ?
Don't get me started on the data table for every item that has hard refs to bp classes, models and textures
yea that's like up there one with one of the worst things you can do
Unless they're small
then you can just load the game and be done with it
I mean if you can load your entire game into memory at once then you don't gotta manage haha
when you load the game you're really gonna LOAD THE GAME
Yeah frontloading the entire game on super small games is a perfectly valid tactic
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
oh yea with audio files you gotta make sure to preload them even if they are hard referenced if you want to avoid any latency
you can set them to prime on load to avoid this
if you don't have much audio
they are a special case though
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?
This right here
🤌🤌
is DcsItemDataAsset set to BlueprintReadWrite, or EditAnywhere?
It's class is declared as
UCLASS(Blueprintable)
class DCSINVENTORY_API UDcsItemDataAsset : public UPrimaryDataAsset
Is that what you mean?
I meant DcsItemDataAsset
something like
UPROPERTY(BlueprintReadWrite)
UObject* DcsItemDataAsset
or whatever
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
My variable is not defined in C++. It was added through the Blueprint interface
You can't inherit a variable from an interface
you can only inherit functions from interfaces
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
Hey can someone gimme a hand here
common button doesn't appear in my gui, just the text?
Are you just asking how to set a reference to an object you created?
if so you need to create the object first, and then set the reference
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
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
Yes. There is PrimaryDataAsset and regular DataAsset. Mine are a type of PrimaryDataAsset
I'd bite the bullet and ask in cpp, I think there's something involving proper exposure to blueprints
It could be
most people who use blueprints only likely won't know the solution to this
how did you make DA_Item1?
Ddi you make it via the standard create blueprint menu? or the misc menu?
The standard menu
This is the way to make an instance of the DA class
otherwise you are just defining the architecture for another parent DA class
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
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
It is a PDA. It does not show up in the Miscellaneous list, though
Not this oen
code?
UCLASS(Blueprintable)
class DCSINVENTORY_API UDcsItemDataAsset : public UPrimaryDataAsset
{
GENERATED_BODY()
It's declared like that
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
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?
Doh!
I forgot that when you click "Data Asset" it then gives up a way to refine the class you want
🙂
It works now. Thank you very much!
one more thing @hollow karma if you want to use the asset manager, make sure you override
virtual FPrimaryAssetId GetPrimaryAssetId() const override;
Like I said, I'm new to Data Assets of all kinds.
Yeah, I still need to add that, actually.
Here's some good documentation that shows off the tradeoffs with DAs, Tables, and plain UObjects
https://benui.ca/unreal/data-driven-design/
I was struggling with DA's and the asset manager for some time before. feel free to reach out if you need some help.
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
DA's are just a data store.
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
That's what I need it for
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.
What nodes? That shouldn't have anything to do with init or not
Gi gets creates before your world even exist and gi can exist outside of worlds
I can see a begin player or construct nothing
Meaning if you want nodes that require a world you will need to pass GI the world context obj
So I would have to call functions inside it from elsewhere?
Depends on what function
In cpp pretty sure u can just pass world to do stuff in the level
Trying to handle things like missions in the GI and trying to initiate a prologue
Well just trying to call something lol
I don't get it, does Game Instance is single when testing in viewport for multiplayer? Or Game Instance created per viewport window?
There’s only one game instance afaik. #multiplayer can confirm
There is only one. You define which to use in game project setting
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
Oh yes, each pie window has it's own game instance. Thank you god!
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.
I would think something like that would have been covered with enhanced input system
Not sure how tho
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?
How would I get the player controller of the possessing player, from the the possessed actor?
Get controller node. It will return generic controller. You can just cast from there if you need to access your player controller stuff
#enhanced-input-system might be a good place to ask
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?
Why not just disable the collision between them?
Nvm I just saw the collision part
There should be something tho
I'm sure it's a check-box that I didn't tick. But there are so many!
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.
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
But I don't see any collision settings on the camera or spring arm.
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.
The camera have collision setting if that's what u r looking for
Channel and the radius
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
Plug the ‘IsValid’ in before using the blackboard for anything else.
yea before it destroyed on event begin play it return valid but after death it instantly become unvalid
Call the blackboard before calling the death event
seems like death make blackboard disactivated
yea on the begin play i call it
Destroy actor should not come before anything else that accesses the object
it invalidates it because it destroys it
the proplem is the on death event disable the blackboard maybe and it become unvalid
Would only happen if you try to use the blackboard after calling set lifespan or destroy actor
You can always hide something instead of destroying it, if you still need to do things to it after
i dont call destroy actor or set life span the casanim slave on ended (death animation ) on ended it become unvalid) so no destroy actor here
so the proplem is the animation make the blackboard disactivated maybe
Ok, if get blackboard returns None it means you don’t have a blackboard set when that event fires
yea and i tried on animation finished and it return same unvalid
You need to set the blackboard inside the AI controller bp, are you doing that?
yea i use run behavior tree and use blackboard on controller begin play
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.
ok
what event do you want me to send to fix this
Fix the current event. Connect the nodes properly
this is on death event that still make it unvalid and the charcter is not destroyed : (
yea i did
same like on animation finished event it also return unvalid i dont know whyyyy
Try printing the return value of get AI Controller
There you go, so whatever corpsebpfull1 is, it’s not possessed by an AICon, least not when this event fires
ok than i will call the possess in the event begin play
Or set it in the bp's default values
hi im having this issue where i cant enter text in an editable text box what could be the issue
i set it
Proof or it didnt happen
Why are you creating the widget on tick, among other things
should i do it on a custom event?
Yes, you’re currently recreating the widget 60-120 times per second
But it must be exevuted by something
ah i see ill try thanks
There might be other issues like input mode but def start there
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_GetAIController_ReturnValue". Node: Possess Graph: EventGraph Function: Execute Ubergraph Corpsebpfull 1 Blueprint: corpsebpfull1
i set poseess in begin play and after on death and still unvalid
seems like the death disable everything
You should only be possessing it once, and do so before the game even starts
how do i posess it before the game start do you mean in gamemode
Go to that message
i already set it in default values
Is it set to Autopossess AI on Spawn and Placed in World ?
i added a custom event in the level bp how do i call that custom function from my actor bp
By not using the level bp
but i need to show the ui from my level BP no?
No
Level bp is something people that have no idea what they’re doing teach on YouTube or wherever
ah
You can show UI from your player controller if you need something centralized
so then i can cast to thirdperson bP from my actor BP correct?
You can communicate with any bps from anywhere except level bp.
it worked thanks
yeah i was searching why that doesnt work
Laura explained it at some point. Iirc it’s a relic of the old system, before Kismet 2.0, the lone survivor of the system overhaul
Simple , the bp class exist outside the world. It has no reference to the world(level) your level bp reside
Tldr don't use level bp
still not valid after charcter death i dont know what to do
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?
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.
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
If client set variable it will only set the variable locally for it self. The only way for client to communicate to server is via server rpc.
Can't stress this enough #multiplayer pins have the basics and beyond covered. If you want to make mp game, I would suggest to read thru it
I just read through it. So you are saying i need to set the variable with a server rpc?
As client if you want to tell the server to change the variable then yes.
Changing the variable on client before sending server rpc is needed too in many cases. This is called client prediction
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?
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
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
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
i am sorry i made a mistake,they dont spawn,they just show themselves and enable collision
on begin play they hide
hi do you know how to fix this error accessed none trying to read property callfunc_getblackboard_returnvalue
your blackboard value is not set
yea but i set it in the blueprint
you can just spawn them when the dialogue is called
set value as bool of enemy
what if the food is spawned before the quest is taken?
well comp don't lie
its not,thats why i made this,you finish dialog and then they show and enable overlap
I only see u hiding the food which I don't c the point
just spawn them after quest is taken or dialogue is initiated
its also a bad practice but it works😂
is this right or not it always prints not valid
now no need ,the problem is not here
don't know, but it's not even connecteded to begin with
problem is you are using get all actor of class
instead spawning them and storing them as a variable (array)
yea i just disconnected its actually was connected on death animation finish
knowing to do this, will get you long way
can't debug your project
ok
always start simple if u are not sure
start a fresh black board and BT and just set the value
ok ill try
brother believe me ,the way its now seted up it will not work
we are kind of all over the place, I don't even know what to say
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
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
yeah i get it ,thanks🙂
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
Hi,
I've problems with my chat system. For unknown reason it is only showing message on client who send it. What might be the issue?
https://blueprintue.com/blueprint/97fjccfg/
This is my component BP which is replicated. I was planning to bind event dispatcher to every actor that own that component and then execute event on all locally. What I am doing wrong?
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 ?
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
Spent one more day, still don't get how to make it work. Help please (question about blueprint transitions in anim instance) #animation message
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.
Do you know why when I press play it doesnt render properly ?
static lighting?
also uh, allocate some more vram with r.Streaming.PoolSize [memory in MBs]
?
i dont have enough information to tell you why
place the camera higher idk
When I don't resize it goes like this
what is static lighting ? Should I look more into that ?
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
When I change it I don't see much difference
You set it to movable, right?
Yes, by default
The light source?
yes
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
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
Try setting the Z scale to something higher than 0. That 0 height scale might be messing with things
Omg this is it
Make so much sense
Thanks
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```
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?
just keep an integer currentLevel, and format text to creat the current or next level name
Level{LoadLevelNumber}
this way to goto next level you can increment currentLevel, and load the next level
or load whatever level you want
Hey, I can try to recover the talks I had, let me see
can I make threads in here?
threads are disabled in this server
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
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
My bro did the best at commiting mostly every step of the tutorial e was doing to "take notes" along
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
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! 😘
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)
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?
i don't see branches being expensive, something like an if is pretty common stuff
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
@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
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
@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 🫕
Array
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
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.
You can play this out with 0 visualization
ah. well you need a reference to the object (unit, building, etc...), that is on top of a tile
so in the tile struct i have AActor* Entity
yup it can
Youre not applying amy rotation to it
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
You click on tile -> you look up tilestruct
It has an ID for building and an id for units