#blueprint
1 messages · Page 174 of 1
In the screenshot I sent
I'll be more considerate in the future btw
Which is where, inside the task?
Not about being inconsiderate, but about getting more specialized help
What are you trying to set it to? @tired hollow
Sorry had to go do something. Trying to set it to a vector, which I do have set up in the blackboard
Make sure it’s the right type of object in the Bb
I also have the key (in blackboard) set to Instance Synced
What do you mean
In Unreal 4 I could just set it to a Vector value and it worked
The bb key itself needs to be a vector
K good, sec
Go to your task and on receive execute AI, take whatever vector you want to feed and set blackboard value as vector using the key you made
that's it. give it the value you want
The nice yellow Value thing is a vector
give it whatever value you wish
or feed it a location
here's an example
Okay, but if I never did set it to use the key I made in the bb, how is it gonna know what I'm talking about?
you assign the key on the task inside the tree
I never could set it here
here, a better example maybe:
BTT (1) BT(2)
Forgive me for not understanding, I have a learning cognitive disorder
it can get confusing, since one is called a BB Key and the other a BB key selector, but the latter gets shortened if you resize the details panel
But now I understand
I have a bttask_blueprintbase derived blueprint and I'm tryna grab the TargetLocation which is a blackboard value how do i grab thta?
the task which wants the targetlocation is bttask_chaseplayer I'm just adding arndom decorators at this point
Each AI controller could have one blackboard instance, so you need to get the relative AI controller then get the blackboard.
How do I make it so that the pink text also disappears?
set visibility on it too
Thank you! I figured out that I hadn't set it as a variable yet, and that's why it wasn't showing up.
Could someone help me? I need help remembering the name of this blueprint node: It makes it so that the nodes after it only happen once and cannot repeat. You can also reset the node, that's what I remember, so if someone knows the name of it, I thank you in advance!
I absolutely cannot figure out why this code only runs on the server and it makes no sense at all
nvm I found it: "Do Once"
I seem to be having an issue with calling a function from my Function Library from inside of my Primary Data Asset.
I don't seem to be able to use any of the functions inside the library.
I'm guessing it might have something to deal with World Context, so if there isn't a way to make that work, is it possible to make a static map accessible everywhere?
what code
this really brings your name in the light
You are correct. Data Assets do not have a world context which prevents the use of function libraries within them.
I think without the use of C++ you're kind of limited in to how you can have easily accessible static data. The only other way I can think of is to create a macro library based on object which would allow it to be used everywhere, but all you're essentially doing then is making a bit of template code to retrieve your data that is under the hood going to be copied and pasted wherever you use that macro.
How can I isolet this? I only want to see fruits & Veges. WHen I cahnge Category I want to show specific items.
'Do once' I think it was called. Sorry bit off the pace, you found it. Cool.
any shortcut to hide / unhide the blueprint and details panel and only show the event graph?
Close it. Reopen it from Window -> Details
I don’t think there’s a hotkey but you can check if you can bind one
is there a way to bind keys? closing and opening is tedious
There is, in editor settings. Whether you can bind one to open the details panel I’m not sure
You can also resize it into oblivion iirc
just learnt you can dock panels. that makes it much easier than readding lmao
thanks 😄
How do you use local variables in blueprint? I want to do the equivalent of changing a value of a function call based on an input (value == 0) ? EnumVal1 : EnumVal2 without declaring a variable for the entire class
Its for a ui widget so I dont really want to use cpp
inside the function go below the variables section and youll find local variables
cause they're two different things afaik in bps
events can have latent nodes while functions can't
for temporary variables you can put them in a separate category such as Transient, and also mark those properties as transient in the details panel. transient variables won't get serialized/saved.
^
That won't make them local tho
yes, they won't be local
also mark them as private.
Also macros 😛
Also events can be replicated while functions can't.
I'm a little late to the party haha
It's not possible in blueprints. (As far as I know)
If the data asset is only going to be used in one type of blueprint/class, you could get outer and cast. You can then use its outer to call the relevant functions.
Hi there friends!
Did anyone know how can I create the outline material on the object when player is looking at it?
Line trace by channel as far as I know have to work on event tick to work properly with that and we all know that it is laggy
I can't find any good tutorials about that and don't know what to do
Note: I have post process material, but I need to create code to highlight objects only when player is looking directly at it
Line trace is relatively cheap
You can do it on tick
Just don't do the highlight logic if it's already highlighted
Alright, but how can I check if player ended looking on the object to turn it off?
Cache the reference when you hit a player
On the next trace, check if hit actor is == to the ref
Now the highlighted object resets only when I look at other actor, but still not when I'm looking at "nothing"
Alright I fixed that, but I have yet one error to fix
This Set render Custom Depth has one time error and don't know how to fix that
Nevermind, I fixed every issue
share your fix briefly for others with the same problem
I'm getting some weirdness with linetraces and screen space here:
I have a widget that overlays the end/ hit location of a linetrace to act as an aiming cursor. Obviously the widget gets the screen space location of that point. If that location goes off screen at any point though, it's like it kills the widget somehow...
Afternoon guys,
Trying to get back into UE after a few years and trying to make a tractor beam.
The current set up I have is that when I hit an actor I currently suspend the physics so I can move it, but it looks like the second I simulate phyiscs it refuses to let a trace hit the object. Does anyone know either:
- What I'm doing wrong
- What I could do instead incase the version I've put together is bad practice
If the tractor beam has already hit the object you want to pick, why do you need another trace to be able to hit it?
No so it goes:
- LMB - Trace out for the object
- If it hits a valid object, stop simulating physics and let me move it
- Once I let go, simulate physics
** But then it doesn't let the trace hit again if I try to move again
It might be that suspending physics also suspends trace interactions. Might be worth making a custom channel for objects you want to move?
Ah gotcha
Does it simulate physics properly after you let it go?
Yeah it falls to the ground, but seems like turning on physics makes it hate line trace
Can we see the code for turning on/off physics?
Very complex business
Shouldn't the bool be checked in the bottom one?
At the moment you're un-setting physics in both
I believe it was, bare with
Yeah it was, that's me messing with it a bit before screen grabbing
Tried it again, I can move it until it hits the ground
So if I throw it up, I can catch it, but once it hits a surface it gives up
So physics works again until it interacts with another object again?
Hi everybody, not sure if my question is in the right spot. I have a task with which I'm stuck since several days regarding the CollabViewer Template (ArchViz version) in 5.3 for tethered PC-VR with Quest 2 HMDs
I need to teleport all players to a certain location by the press of the button. This code in the Level BP works for the location, but not for the rotation. All VR players keep looking in the pre-teleport direction.
Even weirder - If I catch it in mid air it stays supsended but doesn't move. That might be a symptom though
Physics work whilst its not tethered, but it becomes hostile to line trace
Are you changing the object's collision at all? (Query/physics?)
I shouldn't be, unless by turning off the physics simulation I am
Have you tried running some print strings on tick just to check things like physics sim/ collisions etc. to see when issues might be kicking in?
That's all I can think of, that by turning off they physics it messes with the collision preset
Hi, I am a newbie and I am having a problem. I tried to generate a .exe from my project on Shipping mode and the functionalies that I have collapsed in functions like in this case don't work (but they work on the editor). Is there something that I am missing?
is this all blueprint?
There are some nodes that only function in editor, and break in a packaged project (Get Display Name is one I can think of off the top of my head) it's worth checking if you have anything like that in there
blueprint and c++ combined
do you have any editor module? or if you wrap any of the function with #if WITH_EDITOR?
I have C++ modules, but I don't know if they're editor modules or not
if you don't know then nvm, shouldn't be the issue
I'll link this two blueprints, on this one https://blueprintue.com/blueprint/sxnugk-f/ The section Above doesen't seem to work and this one https://blueprintue.com/blueprint/rfh4zzfe/ doesen't work at all
Hey devs , i can't change engine scalability settings of Textures ,Shaders ,Post Process and Effects to LOW . It got reset to EPIC every time as shown on video , any ideas?
Can anyone help debug some weird behaviour I'm getting from my behaviour tree? my BTT_Waypoints task refuses to fire regardless of which event it's plugged into. My Selector is functioning correctly and the State is being set as expected, but the Sequence node seems to not want to trigger it's child nodes for some reason.
UE 5.3.2
I know it's stupid but have you tried restarting the editor/ your PC?
yes , didn’t help
and I have investigated, and nope, I don't use #if WITH_EDITOR on any part of the code
no idea then
ok, thanks for trying to help me
Can anyone give me advice with structs? I cannot decide which way to choose and I want to be consistent with this on whole project.
When setting struct in any blueprint. Should I then break this struct and set every variable separately so I can then just point to that variable get/set it easily, or should I keep it clean and always get Struct, break it, and get 1 variable.
1 example below, like I would need to use Team Number in 3 different places, either I will have it separately (which means I would have to ''initialize'' each variable from struct, or just always get struct and break it). What are you guys doing usually ?
Here it is
GameState / GameMode
I'd personally keep it in a struct.
If it's related info, I always like it in a struct.
Though that S_ suggests this is a blueprint struct, which should not be used
lol, you didn't even answer the question. The answer wasn't where to put the logic, it was should the team size be a member variable or be in a struct... which can be on a gamestate
I thought it was already a struct, sorry then
I know this is like everyone personal choice how they use it, so I wanted to see how people usually approach it, because both ways may be correct
I wouldn't bother storing it in it's own member, just get the struct and get the info.
Caching is good if the operation is expensive, but this isn't
Yea, this feels better, like blue print is more clean
You're also keeping the relevant data contained where it should
I dont have basically 2 times the same thing
please read above about bp structs though, they can bite you, hard
in pinned message?
Always declare your structs in c++, you avoid most of the issues and require little to no actual C++ knowledge.
Can I ask a question?
always
Oh, that's good to know. So like every struct I have in my project, just create it with C++?
Hi, is there an elegant way to get a unit vector's direction relative to a character's rotation in blueprint?
Yeah, if you're unfamiliar with the language, header preview gives you basically all of the code.
There are several hoops you can jump through to minimise the risk of bp structs, but I don't remember them, and they're not really worth it anyway
I started moving everything to Data Assets in my project and I will have a lot of structs
good to know xD
Not 100% sure what you're after here? Do you want to convert the rotation into a unit vector?
done
kind of like convert a hit normal to a character's up/left/right/down
You just want to know a left right forward, backwards, up, down?
Im making an rpg. And my character has social interactions with other characters.
This spawns a UI with a vertical box with different answers i can give to specific questions.
For now im using a Switch statement to manage the outcomes of certain answers i give.
So for example, friend says. "Hey, join me in this quest."
And i answer "No, i have more important stuff to do."
Then that will go to the switch case Disappointed: -10 opinion.
Is there a better way to do this?
This seems like it can get weird fast
I would very strongly recommend you something like Flowgraph plugin.
Type "dialogue" in marketplace you got a lot of free plugins
How would I go about making this transition smooth? I made it so the time slows down and I want the original colorful post process to switch into my grey post process, just gradually
@cyan boneI made a mockup for work about this recently. General idea was to push a widget to screen for each segement of conversation. I changed this later to push a single widget and use that one. But same idea. Widget sets up for dialog, and broadcasts events that the flowgraph listens for. And you can just hook up your outputs to where ever you want to go from each node, and each node has it's own conversation data from a datatable.
is there a way to do #if directives in blueprints? 🤔
Not easily. Things like Prints sort of do this where they'll literally disconnect on non editor builds. But it's not simple to do.
thanks so thats with the flowgraph plugin
okay will get to it
hopefully it works well with quests and changing opinion stats
and other things
Dang, oh well. Just wanted to differentiate and switch based on wether it's being played in the editor or not
cheers anyways!
thats the issue. because doing the dialogue its easy. but each dialogue has an outcome
You can make a node for each thing. Dialog>Choice1>LowerOpinion>Dialog, etc
so my switch statement isnt that bad ?
i can also make a struct
data table
Not likely. I just prefer flowgraph for this because you can make a graph per conversation and see it visual in a tree and you get the whole visual of what is going on at a glance. Much easier developer tool.
It's worth noting that flowgraph is useful for a lot more than dialog. We started using it for mission/quests, dialog, in game events that can't be done easily in a sequencer, etc.
Is it possible to get Dedicated Server's Mapname & Port in blueprints?
Something like my node base dialogue system might we what you're after. It is BP only but the general concept could be built on especially if you like to dabble in C++.
Welcome to this tutorial on how to create a dialogue system in Unreal Engine 5! In this video, we'll go over the basics of setting up a dialogue system using Unreal Engine's powerful Blueprint visual scripting language.
Whether you're a beginner to Unreal Engine or an experienced developer looking to add dialogue functionality to your projects,...
Hi! I wanna change the material of a mesh but loop body doesn't work
Your first index should be zero and the last should be the number of materials
(I think)
yeah you're right now works thank you
How could I go about making a smooth transition between 2 different post processing volumes? Post process existing within the character BP and getting enabled when pressing the button. I just need the transition between them to look smooth if possible
thanks a lot
What is an easy way to change a forward vector (I guess a vector in general).
Say I get my forward vector but I want to add 30 degrees in clockwise direction (want to keep Z the same)
Or would this approach before forward vector work? 🤔
Rotate around Axis is probally what you're after.
Nice. Thank you.
does anyone know how it is possible to sort closest location between 2 actors who have a vector location(image attached)
As in finding the closest object to the actor?
closest to self in this case
array has enemy character classes as source
ah
will try see if that works.
For each element, check if it's closer than the last. Then on completed, use that closest actor for whatever you need
easy to closest, not so easy to sort it
yeah i was about to think here that how would I approach now getting the lowest value out of all these distances in float value
Is it a bad idea to get a reference to an actor's world (or relative) transform rather than its location if I'm splitting the transform pin and using just the location data? I currently have a BP where I do this because I'm unsure whether in the future I will want to use the rest of the transform data in the BP or in a child of it.
and through the loop change the highest or lowest float based on if the current one is > < the variable
Local variable for:
- Distance check (Default high value)
- Actor to use
Each loop, check if distance is lower than the current check distance, if yes update the actor.
On complete use the stored actor for what you need. Then clear the actor reference and reset the check distance
Something like this maybe
I don't think there's any harm in that. Plus like you say, it saves any rewriting if you need the other parts later on
Thanks.
okay but what is check distance? where does it get its value. it could be 10 million for all i care
im trying to get the closest actor to the player character (closest enemy) so I can lock to it.
In that example, it's a local variable I created and set to have a really high default value (so the first actor checked will always be closer)
so what happens is you set a variable like minDistance as a float and this stores the shortest distance. Every loop you check the distance is less than minDistance, if it is you set the minDistance to the value and set the selected actor. So when you loop through all the actors, at the end you got the closest actor
Im sure there is a BP node called find nearest. have a look for that. It comes off of an array if i remember correctly.
Oh jesus, there is as well 😅
it returns AActor unfortunately but i need a direct custom character class reference.
you can cast to what you need ?
but the loop will work just as well
just be careful with a lot of actors to loop through
bp is a pain in the ass with loops and large numbers
heard that yeah, c++ was a lot faster with loops
a few actors will be fine in bp
just drag off the actors to check, you should find 'get all actors of class' and select your class. should work.
i would just cast to what you want if you used nearest actor
saves you going to the trouble of the loop etc.
wouldnt casting to the main enemy character class reference the parent character
because i got child classes inheriting from parent enemy
wdym "reference the parent character" ? in memory ?
Casting just lets you use the returned actor as that specific class, including children created from a parent
ah nevermind, I just casted to the child class and it worked just fine
wondering if casting to the parent class would also let me get reference to the other child classes
okay that answered my question
thanks once again
to all of you 😄
I am trying to make it that each time the player presses r the cube rotates with an ease. but it only works one time. then it stops working, what am I doing wrong with this code?
The timeline i use goes from 0 to 1 for the alpha
why is your b 0 0 90 ? i feel like you probably want to add 90 to the current one ?
and do you reset guild preview transform ?
sorry i am noob, but i see what you mean. i do want to add 90. but it doesnt seam to work
i dont think i reset the transform
do i just need to set it after the rotation is done?
because the thing has finished. You need to pull off of the Finished node and tell it to play again.
Sorry that would give you a never ending rotation, but the issue may be with the fact it has finished and you aren't telling it what to do afterwards.
I don't think it will automatically reset each time you press r.
no the problem is i set the second rotator to x0.,0 y0.0 z90.0
so it only goes from the current rotation once. after that the current rotation is 90 so it cant go to 90 again
but how do i reset it back without changing the rotation
first time i tried to use ease, i notice it only rotates once too so i'm looking at it
use play from start instead of play
but you need to add the 90 as well
insteall of just setting it to 0 0 90
you just probably want to prevent spam of it
with a boolean and reset it on finished
Hi, I searched the solution but it seems doesn't work, is this the correct way to set the collision of objects off in blueprint?
Ok I found out the issue, the collision is disabled, but the nav mesh was not rebuilt
Is there a way to rebuild the navmesh after the door is opened?
click on your door frame and door mesh components and find a catagory called collision, you set collision there.
You can then start to enable and disable that as you need. But each mesh in your BP needs to be told what collision it has. Be that for collision against pawns, traces, physx etc.
You also need to make sure your 3d mesh has collision on it. be that simple or complex collision.
Thanks, but I just figured out it's the nav mesh issue
My character can through the door after the collision is disabled even it's not opened
is your nav mesh set to dynamic.
I'm going to check it right now
It worked, thanks!
I am hitting a behavior I am not aware of whats going on under the hood.
I have an array of structures(str and int) getting passed into a function library function.
I have a print out of my elements in the array before and after it is passed into the BFL function.
the print out only prints the array before it enters the BFL function, but the array becomes empty within the BFL function.
do arrays get dropped in memory? do I need to make some type of copy? I am stumped.
If your array is one bp and you destory that bps reference, you will lose the data.
the source bp is a player controller calling a BFL function.
would the controller reference drop?
send a screenshot plz
is your array a local variable? that may be the issue if it is.
Oh im mistaken, its my boardArrow actor in the scene calling it, not the player controller.
the player controller calls "draw straight arrows"
unless this is just me still not understanding replication, and something drops here
there is nothing plugged into that foreach loop
yes the array loop needs to have an array plugged into it otherwise it wont loop as you expected it too.
well its printing...
heres a side question. when using the get(copy) node, can i use -1 as an index or do i need to connect "length" to it in order to get the last array item
thank you for the help. cant believe i didnt see i forgot to connect it.
my core issue, was using get(copy) on that same array wouldnt yield anything.
is it possible to make a montage node uninterruptable so that interrupt node never gets executed(i think it exists because a montage can get inerrupted during animation but not sure exactly)
Hi all!
Any resources or insight on how to record and store user input?
What do you mean with record and store? Do you mean for like a replay feature, or do you mean registering input and storing those values/keys pressed?
Sorry, should have been specific!
For a replay feature!
AFAIK you wouldn't actually record and store the user input. Instead (depending on the game type) you would record the players location in an array and play that back from whatever point you started recording.
If you are familiar with Overwatch, that is how Tracers recall ability works.
If you want anything more complex, like in a multiplayer scenario, you might have to actually record the gameplay that is happening based on certain parameters. Relatively sure this becomes C++/Plugin territory though
how can i use a widget to change the name "TestGesture" in this bluprint
Then in that case, I'd want to register the input, keys, values etc!
Thanks in advance, appreciate the help!
You can use a button and based on "On Released" You can set a string variable and communicate that value to whatever this blueprint is.
Right gotcha. Then as soon as your game has achieved all parameters that would suggest the replay needs to start being recorded, have a boolean on event tick and off that save any variables you would need to play back through once the replay 'recording' has finished.
Do keep in mind though, I don't suggest recording input from your players. Instead just save their world location and play that back. Saves a whole lot of hassle.
Animations would form a problem in this case though.
Could you share a little more about the type of game you are making? There might be easier solutions
Cheers, you're mega helpful...
Yeah, it's the actual recording of the input I'm wondering how to do..
I'm thinking store it in arrays, but I've never done it before ...
It's a racing project, which is why I thought recording input would make more sense...
I'm trying to develop a ghost system..
Would only the local player (I'm assuming this is multiplayer?) see this ghost?
Like in track mania for example
Not multiplayer!
Just regular pre internet game😅
Great, then it is extra easy 😄
Literally just start with on a timer with a small time interval (think 0.1s) saving the world location of your player in an array
Then on the second run through or reset, or whatever prompts the ghost car to appear, use a VInterp on a timer with the same time interval to run through all of the indices of the array.
Sounds super simple!
Thanksss
The only thing I'm wondering, the ghost car wouldn't drift or skid if it only follows location, am I correct?
Or maybe I'm wrong 🤔
Correct, but you could fix that by saving the transform instead. That way you also include the rotation
TRUEEE
Great idea, thanks a million...
Super helpful and kind!
If you ever need music or production help/advice, let me know (assuming you'd need it in the first place!)
how can i tell where this actor inherits from? or like what do i have to plug into "object"
Glad the advice has been helpful 😄 If you need anything else, feel free to reach out. Might take you up on the music request in the future 🙂
In the top right of any BP you can see which object type that particular actor inherits (Parent Class) from. Assuming your name is indicative, I would guess that this particular BP inherits from Pawn object
So you can right click type "get pawn" and plug that into the object field
like this?
No, right now you are getting the controller. Can you go into BP_CameraPawn and tell me what it says in the top right of your screen?
it says pawn
this is the correct node right
Check. Then just type Get Pawn and it will give you the right object type.
I'm assuming you are trying to do this logic outside of BP_CameraPawn right?
Yes it is 🙂
No worries
Should this work in an executable? I have many functionalities that use this and they only seem to work in the editor
Yep this will certainly work in a packaged project. I assume this is happening in the player controller right?
yes
Right, yea this should absolutely work. If it isn't, it isn't because of this particular node, it will be something else.
sorry to disturb u again but while your here, is there a way to "slow" the on tick node down? so it doesnt impact performance or sum
How come you are worried about the performance on tick?
If you want to slow it down, the easiest thing to do would be to use a timer instead of event tick 🙂
what should I take a look at?
idk doesnt "on tick" imapct performance? because it has to check every tick? or is that no problem? Thanks again btw!
Depends a little on the feature. But check to make sure your inputs are firing appropriately through the use of print strings.
There are some nodes that are editor only, but those are incredibly rare and are most often also commented as such.
you can set tick interval as well
I used a print String o the node and it returned me 0,0,0
I'm glad you asked. Event Tick is perfectly safe to use and sometimes necessary to use because there is functionality that needs to run on tick. We just need to be considerate of what we are trying to do on tick.
For example; Should we set a health variable on tick? Probably not. A timer would be better suited in most cases.
Do we want to set the rotation of an actor to constantly face the player, then event tick is perfect to use.
Why is this doing this? (No one is helping me in ai channel)
ah okay tysm
Turn on "Can Affect Navigation Generation" in your class defaults.
Also, I am assuming here that you mean that the part under the character isn't navigable? Or are you facing a different problem?
That did not work
No, the AI cannot move
Even though I have a navmesh
Right. I am assuming that you are in fact not clicking perfectly at the 0,0,0 coordinate of the level. Maybe use Hit Location instead of Impact Location. If it still returns 0,0,0 then please post some screenshots
Right yea that is an entirely different problem. Let me hop over to the #gameplay-ai channel
Okay I'm there
nope, I am creating a Point Cloud Editor, the functionalities that don't work are related to placing an actor when left clicking. I checked if the point cloud has collisions, it has
and this also gives problems, it should move the Pawn horizontally when right click + horizontal mouse movement, but only moves vertically (works fine in the editor)
maybe it is related
Quite honestly, I don't really understand what you mean with a point cloud editor
point clouds are a kind of 3d models that represent places or terrain . I place actors above the model for example to measure a distance between two coordinates
When i want to attach a sword to a character, do i use a slot?
Right I see. Cool stuff!
So based on your originally mentioned problems about it not working in packaged builds, I have at the moment no reason to believe you are using any editor only code. So it must be something in the functionality itself
You can use a socket on the skeletal mesh. The folks over in #animation can tell you more
Its good, just couldnt remeber the name. 😉 thx
ok, I'll look closer, but it's so strange, everything works in the editor 🥲
Right, and you have confirmed that whatever input that does this, which works in editor, does not fire in the packaged development build?
I'll use the example of the distance measurement: I click a button on a widget and allows me to place 2 sphere actors, then I click on the model and the spheres appear where I clicked ( on the editor ofc) when I do the same thing on the built program, they both appear in the same place, far away from where I clicked. On this screenshots, I clicked on the exact same places
Ah I see. That is a little weird indeed. Have you done a full rebuild instead of an iterative one? Sometimes when we add new collision channels it doesn't fully register in the build
How do I do that? I have tried selecting "Package Project" on the Platform Section and using the quick launch for the purpose of showcasing this to you as fast as possible
Or by rebuild you mean rebuilding on Rider for example?
ok, I'll try that
Then you can do a full rebuild through UE and see what comes out of the packaged build
Right I see. I find this a really tough one to debug to be honest. For whatever reason the get hit under cursor results in a hit at 0,0,0. Let me have a think
maybe this also helps to find the problem
Yea this is strange to. So in the editor it is working fine, but then in the packaged build it is only moving in the vertical direction right?
yes, is so weird
Does anyone know the "correct" way to check if a UObject is valid in a threadsafe ABP? I'm currently using a pure thread-safe function that'll take a UObject, cast it to an Object, and return true if the cast is successful (and false if it fails)? TIA
Should I send you the Blueprints?
yea if you can send it using this, I can try to have a quick look https://blueprintue.com/
ok
It's a lot of stuff so I'll send the ones related with the distance and the pawn problem
Sure, I have a couple of minutes to look at it before I head off for the night
why not use location instead of impact point ?
idk the difference on a hit result with cursor
Yea I was thinking the same initially
Yea from what I can see there is absolutely no reason to assume that any code here wouldn't be functioning based off the nodes you have used.
The only thing that concerns me is this location to transform node, but I am pretty sure that won't be causing the issue
"Calculate Correct Hit Point" is a C++ function that allows me to make sure that the sphere is placed in the correct place
Right I see. Yea I am really not sure what is causing the disparity between editor and packaged builds to be honest
F
Sorry mate, wish I could be of more help
maybe it's the channel?
don't worry, thank you
maybe this is the problem?
out of interest is there a way for me to have a soft reference to something in the level and actor and on that actor I have a list populate of the various components that I can choose and then alter that components settings
the idea is I need something on an actor to change at runtime but I don't have the source files to be able to change it
at the moment I'm replacing the actor with a child version and destroying the origanal however I think that is guessing issues with texture streaming so finding another way of doing things
Should beavle to add and remove components at runtime
is there an visual freindly way to visuals the components within the actor to mark what I want to remove ?
I have this map
my idea was I pick the actor from the world and then put the component type that needs to be removed, however when I try to do this I get the following
and the map value isn't allowing me to select a component
Not really, an easy way. All depends too. Like if your just swapping one component for another, you could probabaly use an enum, and a function to add and remove when the enum changes.
in this case removing
yeah so anyone know how I can select components in the world ?
like you can with actor variables ?
Hello. I'm experiencing a very strange issue. I have a spline component in my weapons. However, whenever the weapon is destroyed, wherever the spline component is referenced in the code it produces an error upon destruction. Even when placing isvalid nodes, it still procudes errors. How do I fix this? 🤔
The spline component is referenced 3 times in code. And at all 3 points I have placed isvalid nodes. And yet still I get errors saying the code is trying to access the spline component AFTER an isvalid node and it not returning valid.
I have never experienced this with anything else. Only this one single spline component produces these errors.
I have no idea wtf is going on here o.O
It doesn't break my game, but it always spews a whole bunch of errors whenever I stop playing and it's super annoying
show the code
Cant really use the world to select components, as they are really meant for attaching to actors inside the actor blueprint.
not sure if relevant to blueprints specifically but I know this channel is quite active:
if I have a character made of mostly hard surface meshes, is it more performant to separate the mesh into a bunch of static meshes and attach each one to its bone?
or have a single skeletal mesh?
damn not sure what to do then here cause for some reason i can't remove the component
does it need to be in the world? Are you trying to change the component at runtime? Or just like an editor feature to quickly set stuff up..
That'll let you use nanite, whether or not that matters, depends
the meshes themselves are quite low poly so idk
I'd use whatever fits the best in your workflow
if most of your dudes are bendy but some are rigid then just make them all skelliemeshes
I would set up a function in the constructor to add and remove components with an enum.
I think I got it, cheers
I suppose I could split the rigid parts off and parent them separately to the skeleton, alongside the bendy parts
minimise the number of vertices the skelly mesh has to track
It won't make much of a difference, just do whatever is smoothest in your workflow
less vertices, more draw calls
so i have the array of components it's found
Checking for only components that have that withing their object name which I've checked and does give true
and then I'm destroying component, for some reason the component isn't destroying
I think you qant to call "destroycomponent"
I see the possile issue
that bit more specifcally
I don't have source files so only have cooked files so I can't alter the BP in the level only make a child or alter at runtime
I can't I don't have the uncooked asset to make the function
Not sure I'm following
so i'm in the PC editor for TSW
and they only allow you to have the cooked assets so the level etc is all in cooked assets that can't be saved
this means to alter them it has to be done at runtime until they can work something out, also at the moment I'm replacing the actor which causes additional memory usage so I'm trying to do it instead where I remove the specific components needed from the actor at runtime.
why doesnt this work?
can anyone help me? im trying to set the "slot index" variable to 1 WHEN the current date and a date from a data bank are equal; however the setup keeps outputting 1, every tick even when the date in the data bank isnt equal to the present date.
Because completed will always fire regardless if the loop is broken or not. If you only want the 1 to be set when the values are equal, then you should move that set to immediately after your branch.
ohhhh that makes sense thanks! but how do i stop the loop then?
Hi, can someone tell me if I am misunderstanding something here?
I'm trying to break hard references in my project, right now I'm just trying to understand the effects of soft references.
I am replacing hard references with soft references, but the reference viewer and the size map still show as if they are hard references. I checked/unchecked the 'Show soft references' box and they still behave like hard references.
I created a blank blueprint with nothing but a soft reference to a weapon actor, and it still shows as if this were a hard reference.
Am I misunderstanding something? This appears to be behaving exactly the opposite of what every bit of documentation and discussion I can find
wait nvm it works! thanks HOWEVER now it wont stop setting it to 1 AFTER the date is already over
how can i mkae this setup stop running after it already sucessfuly found the match and then just start again when it doesnt match anymore?
pro tip: make sure your player controller has 'mouse events' enabled before you spend a day trying to figure out why mouse over events arent triggering
like and subscribe for more top tips
nevermind guys i figured it out
There's little benefit to using a soft reference to a blueprint like this as it still requires that soft reference class to be loaded for the blueprint to be able to access it.
I understand. I'm trying to split content into multiple pak files for distribution reasons in this case, and the hard references are appearing to be an issue
It works good for things like Textures, Materials, Sound effects, visual effects, because all of these things use a base class, like Texture2D, Material, Sound Base, Niagara System, etc. The soft reference then doesn't have to load a specific instance, it's going to only need to load the base objects, and then when needed you can load the actual assets.
So if you converted your soft reference to "Actor" or your own minimalistic truly basic class that has not much in it except variables and functions defintions (not actually populated) then your soft reference for a blueprint could be very small.
Hm, so a soft reference still causes the object that it references to be loaded?
what would be the difference between using a hard reference to a base clase and a soft reference to a base class?
When you look at a class like "Actor" it's mostly empty. There's no materials, meshes, sound effects, etc. attached to that actor class. if you use "Actor" as a soft reference then, you still need to load the Actor class, but it'll be lightweight, and it's guaranteed to be loaded anyway as everything placed in the world is an actor.
That soft reference can now contain anything that derives from Actor, but it doesn't require you to have a hard reference to the class that is set in the soft reference. This means you could have a very heavy asset, let's call it "BP_SupaHeavy", that contains all kinds of meshes, materials, sound effects, etc. and store it in your "Actor" soft reference, but because it's stored as a soft reference, all that stuff doesn't need to be loaded.
The moment you change that soft reference from "Actor" to "BP_SupaHeavy", your blueprint that contains the soft reference now has a hard reference to the "BP_SupaHeavy" blueprint as it needs a reference to the class to be able to store something of that class, and that means it has to load all the content that BP_SupeaHeavy has. What you gain is that now you can only specify blueprints classes that derive from BP_SupaHeavy, but it wouldn't need to load any assets of any child blueprints of BP_SupaHeavy, just like when you had it as an Actor soft reference and it didn't need to load the assets of anything you placed in it.
If you have a non-soft class reference then the moment you specify the class, the engine will need to ensure that class is loaded when this blueprint is loaded.
No I mean a hard reference to an actor versus a soft reference to an actor, like this
Documentation indicates that the soft reference is supposed to break memory-related dependencies
they can both be references to a base class
I think this is mostly pointless.
Actor objects won't exist until runtime anyway. Whatever they are would have to be loaded in order for you to have a reference to them.
They are intended to be loaded asynchronously
But you wouldn't need to async load a refernece to an object that already exists in memory.
I think they are there for a pretty good reason
I think soft object references are mostly meant for assets.
Not for runtime associated objects.
You can softref stuff like actors in sublevels and such. Not sure it'll help much with the pak files. Maybe. 🤷♂️
IMO, you shouldn't be referencing stuff with hard refs anyhow unless it's a core part of the project.
EG base programming class reference. So those should all end up in one pak anyhow. Anything else shouldn't have linkers to it to force it into a specific pak.
That still doesn't sound right though - either the object exists in memory, or it doesn't.
If it doesn't exist already in memory, then you can't have a reference to it, whether soft or not.
If it does exist in memory, then it wouldn't matter if it is a hard or soft ref, so you may as well use a hard ref variable of a base class that contains the bare minimum (no meshes, textures, etc.)
Unless I too am very much misunderstanding hard vs. soft, which could potentially be the case.
To fully utilize soft references you have to use base classes for the variable type and then specify the type in children.
When setting a variable to a soft ref it will still force load the type the reference is set to. For example if you 3 class (each a child of the previous), Class A, Class B and Class C.
If you set the soft ref to Class C it will still force load class C. However if you set it to a soft ref of Class A, you can then set the type to Class C without it loading class C. Class A will still be loaded.
Soft refs are more for when your handling the spawning of stuff dynamically. If you're referencing something that would already be spawned, you would still use a hard ref. (This ignores handling actors in sublevels)
It's becoming more commonplace. Still weird to me too. But sublevels can be async loaded in an out just like an asset. And the main level might need to reference stuff from the sublevel for.. whatever reason. SoftRefs are a path and weak pointer so they work good for the idea. Cause the path is likely to be like MainWorld.Sublevel.ActorName, and it can look up that actor if it's loaded to populate the weak pointer for use.
Thanks for the explanation, I'm a little confused still though.
So the type that the soft reference is set to is still auto loaded in memory, just like a hard reference?
I don't mean the variable is initialized, I mean the asset type that it references is loaded
Yes
From my testing, yes. So generally it would be a base class of the things you intend it to use that would be loaded anyway. (Usually a light weight class with no heavy assests)
So if it were a hard reference, you could still dynamically spawn a child of the type and assign it to that hard reference achieving the same behavior?
If I want to fire a cursor event when interacting with spawned instances, do i need to make my own 'mouse hit' blueprint? 'OnBeingCursorOver' only fires once despite mousing over different instances that are touching
Then the cursor isn't leaving the instance.
I'm mostly confused because the documentation indicated that using soft references is specifically useful for breaking references and reducing the memory footprint that you'd see in the Reference Viewer and in the Size Map, but they still indicate that nothing changed
Ok so all of the spawned objects count as a singular instance?
What is an object in this case? Different actors or?
static mesh
As in multiple StaticMeshComponents on an actor, or an ISM component with multiple instances?
ISM component with multiple instances yes, sorry
That will count as the same oncursorbeginoverlap then.
ah, damn
ok ty
i was trying to be efficiency conscious spawning instances instead of separate actors but maybe i'll have to forego that for now
What kind of mesh counts are you talking about? Because ISMs are required for GPU performance.
honestly it's probably overkill, this is (intended) to be a very simple infinite scroller
The doc is right
Soft ref is the path to the asset, u can think of it like string
I'm currently spawning anywhere from a 3x3 - 7x7 grid, doing A* to generate a path, then creating a level from that path, so its not that many meshes
each mesh is a 'chunk' of a level, kind of like binding of issac
So i use soft references a lot with my quest system. Specifically for a 'Listener Object' class that grabs references from the world and binds to various events that is used to track the quest.
The quests themselves will only create the 'Listener Object' when the quest is active. Because this is defined as a soft ref, having the quest created won't automatically load the listener object ref (until I tell it to) and all the classes it references. This is useful when you might have different levels where a quest only targets classes from that specific levels. It means that the quest system wont force load all the assets that were used in the previous 9 levels even though the quest object itself is still being used. (to indicate it's been completed) The actors in the previous levels might use different meshes, sounds and materials that might not be present in level 10 and thus shouldn't need to be loaded.
I'm not sure if that makes it any clearer lol.
i literally cant do anything
cant open most blueprints
Thank you, this helps me conceptualize it. Do you know why using a soft reference would still cause that asset type to appear in the Size Map for the blue print it contains? Is this intended behavior?
Yes. The only benefit to soft reference is to prevent loading of assets if they aren't currently needed. If you had a "Sound Base Object Soft Reference" now you're talking about storing reference to an asset that exists before the game starts, and which doesn't necessarily exist in memory. You can load it when you need to use it or when you want to load it.
For an "Actor" to exist in memory its class and references must already be loaded into memory. Therefore you can't have an "Actor Object Soft Reference" that does anything more than "Actor Object Hard Reference".
If you must store an actor object as a soft reference and want to avoid the issues you're seeing in your screenshot above, then you need to create a -true- base class that doesn't contain references to textures and materials and all that other fun stuff, including any of its components - those too must contain nothing that loads anything more than itself. Once you've done that, you can create a soft object reference to that new class, and it'll be small.
Yes, it still force loads the var type, just not the value you set inside it. So with it being a weapon base, it'll load the weapon base class but not the weapon you select as its default value. (This is why hierarchy can be important)
Generally though, soft actor references are more for when dealing with sublevels.
You'll probably use soft class references more.
Oh no. Assets in a base class.
Reminds me that I need to do a heavy cleaning pass on our latest project soon. 😬
Ran into an issue when following a tutorial on setting up meshes. Im in UE5 and can't figure out how to properly set this up like in the UE4 tutorial on the right.
Set what up? You're just missing a connection.
I can’t cast the manaquin to the bind animation to apex
Your Manny's Animation Blueprint needs that delegate then.
I need to include animation event dispatcher in the manny?
No. Their ThirdPerson_AnimBP has a delegate in it named AnimationApexDispatcher. You apparently put one somewhere or you wouldn't have that node. You need to put that same delegate on your ABP_Manny so that you can do the same thing.
@storm solarGo back to timestamp 6:30 in your video.
6:50 more like.
Let’s say I want the arrow keys to move the hand of my character up/down/left/right
or if I want the head of the character to follow the mouse…
How would I do that? All I know is that I need working IK (which fortunately the base mannequin has) so the other limbs follow the one i’d be moving, but no idea on how to do the actual moving part.
Hello!! I want to get the name of my level (level1) and add +1 to the name to start the next level (level1+1 = level2) how to do it?
You’d have to split the string, convert the last char to an int, +1 it, then append it to the level part of the string and convert it back to a name
like that?
No, you need to split the string first, and get the last char
Or just convert it all to chars and get the last one
Prly easier if your levels are named something like level_1 so you can split on the underline but renaming levels in UE is…risky and also not sure if it lets you use special chars
Might be much easier to just have an array of strings with each level name and just grab the next one
My levels name are: S_1 S_2 S_3 and E_1 E_2 E_3
That should make it easier to split
my character (based on manny) seems to stuck on a fall loop in its blueprint, which hasn't been a huge issue once in world and playing its fine.. until its unpossessed. The camera that remains (which i am using) has this falling animation wobble in it
There's a setting thing for still ticking the CMC without possession. Otherwise the CMC goes into a dormant mode.
would that be the best way to fix, or is there an issue why its idle seems to be the fall loop
RunPhysicsWithNoController, which is false by default.
just checked, its already on. Which i guess is why its standing correctly when played, but the anim still affects the FPcamera
Is it on a spring arm?
Ah, I made the event in the third person character blueprint. Not the APB manny, thanks.
is there a way to check if a struct is the same as another struct? Like say I have a shop item and I want to check if another save shop item is the same?
Pull out the equal node
Drag from the struct and type equal maybe
yea same problem
right now I am having to go through this slop to check every facet of the item info to see if they are the same
and that just seems soooo stupid to me
there has to be a better way
Yeah I ran into the same annoyance trying to do an is valid on struct
Are you just trying to restore settings from a save object? Not sure im gathering the use case here
no I am make a lock on a refreshable shop menu. It checks to see if that Item is saved and adds the little lock icon and it also needs to check if saved item is the same when I unlock it to remove it from the save items. up until this point I have always just used index refs but I cant use a index ref this time because the player can sort the shop and it changes the index values....
First off nice looking UI 👀
thanks
Second you said normally you use an index, meaning an index -> structure right? But that doesn’t work here since the index can change
yep
Ah I see ok 🤔
Well then another suggestion to make testing to see if it’s the same a little smaller
Perhaps add a unique ID to each struct/item
Then you only need to compare if the ID matches?
And assume the rest match
hum. that could work but changing structs mid project can end verey very badly lol
I hear you there lol
does anyknow how to fix this ?
like this
change "L" in append with the name you have in your project
My UI is gonna be customisable with themes, right now every button on my primary UI opens a seperate widget.
Currently, i'm in my primary UI and can literally put in my other widgets.
I know this is old news to you all, but my question is - why should i NOT put all my widgets into my primary UI instead of leaving it like it is now and opening seperate widgets. (especially with the UI theme being customisable in mind)
if these buttons you are clicking are like "show inventory" and "show status effects" where each of those are independent ui screens from one another, and you already have them implemented that way, then why change them?
different behaviors.
How can you setup collision of static mesh so that you can't walk through it and also when you pick it up it doesn't cause issues with movement
look at the static mesh component's collision section in details. check complex collision and for the mesh to use, choose the normal mesh its already rendering.
then when picked up, turn its collision back off
if its a giant high poly mesh you will need to make a reduced one to use instead, later on though
Hi,
I have these Event activating a Variable in a Actor BP , I now want to use this variable as a Condition for a Branch in my Character BP - I'm trying to do this with a BP Interface but it's not working , anyone know why and can help?
i dont think you need to use an interface there.
how?
i read that wrong, and am not quite following your BP to what youve described
"I have these Event activating a Variable in a Actor BP" is that when u change the bool "ACtivateCameraTypeB"?
is it always false?
no I have another Camera Type A switching it to True
so the NewParam is None?
its to pass the New Camera
These Events are activating these Var, I want to use this as a Condition
I just need access to one of the Var for this Branch condition
so I made this BP interface but it's not working
its not sending the interface message to your character because the target is the camera
I can test connections etc like this right?
hey guys, I'm trying to use this BP to attach a niagara system, but its only working sometimes. Is there a better way to attach the system at the impact point on the hit enemy?
Do not cross pins
rule #1 of unreal development, be incredibly OCD about not crossing pins
Congrats, you are now a UE gamedev
instead of on 1, i would put the execute for the print between the camera node and the branch node but yes that is how you check ur values during runtime
sounds interesting, it hink i used a breakpoint once, many years ago, and i forgot what they do, never heard of watches ⏱️
Breakpoints can come in handy when you want to step through the code live and watches = right click a value pin , watch value. You may have to select the debug object after you hit play, but it’s also another way around just straight up printing
target is Player Character now but still not working
@plain cypress make sure u cast to your character.
did you include the interfaceclass in your character bp as well?
yes, if thats the character you are using.
BPI_Player is another Interface
i just tried this andi couldn't figure it out, breakpoint just turned the screen black when i hit play and watching a value didn't seem to actually do anything , maybe it's that debug object part that i'm not getting
cuz i have no idea what that means
except the debug part
its meant to take you back to the editor and show you the code being paused at your break point. you can mouse over variables and check values..
oh that is actually super handy
very ;D
I have a maze that is generated and in the process, I generate the rooms and afterwards the navmesh gets transformed and regenerated
I managed to isolate it to one behavior in the tree that stalls
this is the behavior
this returns false for some reason
I'm not sure how to further debug this
the BB value is the same as the generated value
ah but it seems to be identical to the actor location
Or does RebuildNavigation not work? :/
As the GetRandomReachablePointInRadius is a pure node, each pull of a pin off of it will result in a different value being generated. You can really only have it hooked up once to actually get a result of any value. I believe there is another non-pure node that is meant to replace this one.
@dawn gazelle i think it was deprecated. regardless, it seems that the output is the same location as the actors and I cannot get the nav mesh to rebuild
I am running the console command after maze gen
hm I can swap it
sec
same result
the boolean returns false
meaning it couldn't find a location
when I do ~show navigation
I don't see it
maybe the nav mesh isn't overlapping?
it is!
huh
interesting
Hey hopefully this is an easy question: I have a blueprint that has a StaticMesh variable "Mesh" and the blueprint has two Static Mesh Components "Mesh1 and Mesh2" I have a function that I've exposed as a handy little button that sets the Mesh to Mesh1 and Mesh2. I have this blueprint all over my level and when I press the button it works. However when I leave my level and come back, the changes that the button made don't work. Is there a way I can "Commit" my changes, or have the blueprint mark the instance as dirty or something?
Visual Logger helps debug AI stuff
I ended up figuring it out, the original node was dropped awhile back.
I reconnected it.
The nav mesh was simply not touching it.
It seems to lag for 5s at the beginning and afterwards it works.
I tried nav invokers but they were worst in performance.
You will need to save the changes because every time you load that level it will be resetting to the original state of the level.
You mean by going to file-> save current level? When I do that the changes aren't saved. Any changes I make to an Actor via blueprints don't seem to mark the actor as dirty
No, sorry. By Save I mean have a game save instance which saves the details of any changes. Then when you load the level again, be that from a main menu or when that level is called by the player entering the level it is loaded including details from the save game instance. Take a look at save game instances on you tube. Sadly it will involve a save game system.
That's not what he is trying to do tho
Sorry, I'm talking about scripting the editor. I just want to make level editing a bit simpler
I'm just setting values of a few actors (that are instances of a blueprint I made) with an Actor Action Utility
Game instance won't even exist in editor time
sorry, I see what you mean now.
Apologies for the confusion. I understand where I described the situation ambiguously
Bit odd. Those should save as long as you're modifying the instances on the level.
There's nothing else modifying Mesh1 and Mesh2?
That's what I thought. Give it a shot, I guess. I feel like I'm going crazy
is the code in the construction script of your BP?
Usually any changes you make get set so this is a strange problem.
And your variables are 'instance editable' .
The code is not in my construction script, no
Even when I take the meshes out of the picture and I just move a static mesh object with my script, it doesn't mark the object as dirty
My blueprint just gets selected actors -> Foreach -> Add actor world transform (adds 40 to the X).
Changes I made with editor utility widget are presistent
Only did one for material instances the, haven't try instance in a level
Mark them as dirty?
I don't see a blueprint node to mark an actor as dirty
Otherwise that'd be my first choice
I keep seeing people say call "Modify" on the object. Where? From what? There's no blueprint node for that
hmm.... Wrap it in a transaction?
The Construction Script runs following the Components list when an instance of a Blueprint Class is created. It contains a node graph that is executed allowing the Blueprint Class instance to perform initialization operations. This can be extremely powerful as actions like performing traces into the world, setting meshes and materials, and so on can be used to achieve context-specific setup.
https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Blueprints/UserGuide/UserConstructionScript/
That is my best guess, hope you find the answer JP.
Executed when instances of a Blueprint are created to perform initialization actions.
Construction script is not gonna help here
Hey I've got quite a large issue and am wondering whether anyone can help.
I've just been working on my game, trying to do some replication for multiplayer, then the next time I open the project, it just crashes whenever I press play. I believe it is because the main third person character blueprint has broken. The mesh is gone, their is nothing in its details panel when I click it in the components area, and all its children components that are attached to sockets are now just in the center of the actor.
Any idea what has happened, how to fix, or how to access a version of the game from a while ago?
@bitter otter I assumed you don't use source control?
no, sorry im a bit of a newbie, thankfully i was able to recover an old version of the blueprint, how ever, just to learn what are you talking about?
To prevent losing your entire project from corruption and more, you should setup version control system now.
Follow the link above for instruction
As for your error, while anything can happend, the common game breaking bug in 5.3 got something to do with cmc. The band aid is to reparent the character to another actor then back to character. You will lose the work you had but at least the project will run.
If you setup version control system, you can just revert to precious commit to unfuck your project, these days using source control is a pre requisite
cool, i shall look into it 👍
Hi, i just need to ask, are variable in anim blueprints replicated? and if so why are my variables not replicated to the clients?
no they are not
hey i got a "Child actor component" in my bp
is there a way do "disable that Child actor in that component so its not ai controlled
No, it saves you from doing shit code
And simplified things
Anim blueprint job is just to read from its owner. The same like widget
If you are doing logic in either of them, you are doing it wrong
You shouldn't have. They're awfully broken
it is also not great to allow the use to set variables as replicated and not replicate them in any way, even more so by not warning the user that the replication does not work
Read docs on what actor replicate.
It seems to me you have missed multiplayer compendium pinned in multiplayer channel. It is your best source to learn basic unreal networking
how can I get an actor location inside of a BT task?
because you can make it replicate through replicated subobjects, but it's a horrible use case for anim bps
You can declare a variable in your blackboard and set its reference
@frosty heron Wondering if I did this right. So I can go into my task and use Set Blackboard Value as * but I don't know how to get the actor object/reference?
I'm not sure how else to set the value.
You can set it in your custom service
Or w.e it's called been forever since I last touch A.I
Decorator?
I just don't see how to set the value anywhere outside of within the BTT which won't let me access the actor afaik.
Which Actor you want to access?
One that I placed on the map as a marker.
If it is the AI owner, it is very easy to access
Pretty sure it's called service
You could cache the marker in a global class such as game state
Then you can access it from almost anywhere in blueprint
Hey folks
I can't remember when to use Block vs. Overlap for collision settings.
I'm trying to do a Box trace by Channel with a custom channel for my enemies.
If I set the enemies to have "Overlap" for that channel, I don't seem to get a hit result with my Box trace by channel.
But I'm afraid if I set enemies to have "Block" for that channel, I won't be able to get more than one enemy with a trace when I want to do that.
Any clarification please?
Block to block traces
You can do a multitrace right?
But then Block also means I can't get any actors behind that right?
If u want to get multiple targets use multi trace
I don't want multiple targets in this instance, but I do at other times. (with same enemy and trace channel)
@true crypt You don't really replicate AnimBPs. You replicate stuff which they can poll and use.
@frosty heron That might work but I will need to access more than one variable/actor so it looks like I need to use BB for that.
You have to use both?
@ionic cypress How to go about setting up a global class? Is there docs for this?
Declare the variable in black board. Use service to set the value
You basically have game state initialized when you start your game. So just add the reference in the variables in game state when your marker blueprint begin play.
It is a boolean flag, so you can turn it on/off as you wish
Maybe I have to use Overlap setting because I in other cases need multiple targets?
But then I also MUST use a "Multi Box Trace By Channel" even when I just want the first (closest) target?
Global in what sense?
The most "global" class in blueprint is probably game instance
need to know what kind of node this is. Basically copying programming to make a shield.
I don't see such a bool?
It lives when your game start and gone when you exit the game
It has no replication so that's why I didn't recommend. lol
Is he doing multiplayer?
Well, you might make a function yourself and input a boolean, right?
No idea, but if so, it is a pain to switch anyway.
@frosty heron Still unclear how to get the Actor/object reference within the service?
So you mean I should implement logic with a bool to decide if I do multi box trace or just box trace?
Exactly. Just a simple blueprint function can make it work.
Yeah that part is easy, but my issue is I don't get any result with a regular "Box trace by channel" when the collision on enemy is set to Overlap for that channel
How about set to block?
It will be a pain to switch single to multi regardless but one that is ready for mp project would have know that.
Then it works, but my question/fear then was, can I get enemies behind it if I use a block? (I would use a Multi Box trace in that case of course)
If you don't know how to set ref, you might want to start from there.
There is soo many ways to get actor depending on the case. Something generic like that can't be answered.
Hey guys, we're having these moving blocks that come from under the ground and they're supposed to lift characters. If the block is already slightly above the ground surface, it works, if it starts invisible, it doesn't. Why is this/how does this work?
Edit: Other items don't have this problem, so it's purely related to characters
If the channel is visibility, it won't.
You may do a simple test in level blueprint. I tried multi trace for objects and it actually returns all the objects in the route.
With a "Block" setting?
Well, just regular staticmesh, it is not channel, so just for the object type you set.
If you just want the closest, do you need a trace here?
Because that is my main question.
Must I use an Overlap collision setting, and then do a multi box trace even if I only need first target hit (and then do logic to determine which of the targets was in fact closest after)?
Or can I just a Block collision setting, meaning it will work with a "non-Multi trace by channel", but it would also get all actors for a multi trace by channel ( meaning I would save doing above extra logic for single target use)?
I can't give you the correct answer without testing, (don't remember it) but it is the same for you right? Just try those combinations
That's not that much
If it is not working for all the combinations, might just try to trace for object?
Fair enough. I can set up some tests.
Figured folks might have an easy answer right away, so might as well ask how it actually worked.
I can set up some tests myself. 🙂
I'll work on more clear questions in the future as well 😄
Sorry for not giving you the answer immediately. Usually I don't remember those results until next time I use it for my own work, lol
No worries at all. I have the exact same feeling.
That is why I did not want to change it from Overlap to Block. Because I'm sure I spent hours last time getting to the Overlap decision back then xD
Hi. I have a weird issue where sometimes my multisphere collision traces do not detect collision, while in other times they do. There seems to be no clear reason why sometimes it will detect a shape and sometimes not? What could this be? 🤔
As you can see, sometimes it won't detect (left) and sometimes it will (right)
What on Earth could cause this?
yo anyone know why my character is still taking damage when landing on my cushion?
I'm trying to get the position vector of an actor in a BTT. What I have seen shows to use Get Actor Location node but I don't have that in UE5.4?
I foundd the issue. It was because the rays where going from within the rock to outside, so it couldn't detect the inside of the rock. Simply changing the raycast to go in the reverse direction fixed the issue 🙂
you do have that node, it just needs a target so, maybe call off of an actor?
@trim matrix You are right. Thanks!
Assumed I could just drop it in then set the actor..
Why are you hard coding the ref?
i have a feeling you are trying to check the class instead
also I am betting BP_CloudCushion is an actor not a component
you were right, I fixed that, and changed it to actor and I am still taking damage when landing on it
I thought this would be easy too
that's just gonna get a random cloud in the world
is that really what you want to do?
I have fall damage implemented, and I want the cushion to negate fall damage
so if I have 10 clouds in the world, I am grabbing one random one, then when i landed on cloud cushion, if i fall into the one that i set, I get damaged, otherwise nothing happend ???
Seems to me what you want to do here is to check if what you hit is a type of Cloud
if it is apply the damage
Hit actor -> Cast to your cloud cushion (I rather use interface here btw) , if cast sucessfull do damage
if cast failed, print the hit actor
I tried both Get All Actors Of Class and Get All Actors with Tag and they both always return blank...
Within my Game Instance BP
Don't use Get All actor of class to reference unless you want to get ALL actor of the type in the world
I'm not sure how to get just one?
Because while game instance init, your stuff is not ready
Is there an event for when my actors are ready?
doing the opposite of that worked thank you
In your actor begin play
I don't see BEginPlay
Not in game instance
Game instance runs when your game run
your world probably not even spawned yet
Opposite? that sounds like you are doing something wrong
Ah so I can just set the value in the actor BP.
In your actor BP to access a global class such as game instance
Where ever make sense. You decide when to set the reference and when to get the reference
yeah idk, on cast failed I take damage, if cast successful I don't. Having it setup the way you said where when cast is successful I take damage had the opposite effect, where I was ONLY taking damage on cloud cushions and the rest of the world negated fall damage
you need to know what you are actually hitting. Print string the hit component / actor
figure it out, don't play the guessing game.
your code needs to work as follow
If X land On Cushion, then apply damage
instead if ANYTHING land on the cushion, apply damage
Can anyone help me I am having an issue where if I set the flipbook to anything else it will start to flicker between the two can anyone help?
I have a nav mesh set up but my AI MoveTo does not run up the ramps I set up. It basically runs toward the correct X coordinate and stops to avoid the ramps.
have you preview the nav mesh?
make sure that the ramp is reachable
It is reachable. I had that issue earlier. The nav mesh extends beyond the limits of the starter map in all directions.
Well, I assume it's reachable.
print screen?
can u preview the nav mesh?
open console show navigation
the picture you send, shows nothing
I don't think that did anything?
At the bottom it just comes up with ShowFlag.Navigation and doesn't change anything when I hit enter.
this is what it should look like
Play in editor, open console then type Show Navigation
or just press P in editor iirc
Gotcha. Found the issue but not sure how to fix it. Needed to press P to show nav meshes in the editor.
work on your Nav mesh settings, change the values as needed
good morning all
i hope you are good there
i need a little help, if some one could give me a hand
i leave my question here:
https://forums.unrealengine.com/t/stop-sprinting-when-in-crouch-mode-with-timeline/1876901
Hello guys, i need a little help here, im using a timeline to croush smootly but when transit from sprint to crouch mode, my character dash and keep running, or if in crouch mode and press LeftShift, it will start running and make noise, i don’t want that, i want to keep in crouch mode (stealth) even if press Leftshift, and only stand up when th...
if you can help me with an image to correct that blueprint, will be VERY appreciate, thanks
I need to get Actor Location (owner of the component), inside the component. Is this the way?
can't you just get Actor Location from the Get Owner?
I think you can drag off of the Get Owner return value pin and select Get Actor Location
Any clues for fixing my nav mesh on the ramps? I tried changing a few obvious settings, but I have only made the nav mesh worse.
Ohh, right, wtf me 😄
tried the brush settings obviously but no great options
nav mesh volume bound settings
it probably helps to google what each setting does
Figured it out by adjusting Agent Radius in the RecastNavMesh-Default.
Hey guys, trying again. We're having these moving blocks that come from under the ground and they're supposed to lift characters. If the block is already slightly above the ground surface, it works, if it starts invisible, it doesn't. Why is this/how does this work? Other actors don't have this problem, so it's purely related to characters it seems.
Does the lift only start moving when you walk onto it?
no it's timed so it just happens
But do you walk into the area when it's not visible?
Yea you walk over it while it's invisible, then it comes through the floor and the character just stays where it is while the meshes move through each other
The problem might be that you don't step onto the platform.
Yea I guess, so this is expected behavior? There's no way of "replacing" the floor so to speak? It has to be the character moving onto the surface?
hello all! any insights about how to order property Categories? (I want my custom category Input Data to be in the first place). Half an hour looking in the internet and trying things and nothing.....thank you so much
You could try making it stay 1 uu above the actual floor.
Honestly I don't know much about the cmc, this is just a guess.
Yea I think that works. But there's also stairs meshes moving upwards so unless we move every step of the staircase separately upwards, it won't work in those cases.
With that I can't help. 😦
is it possible to attach preview skeletal mesh to the arms mesh , in character blueprint? same way as you would assign mesh a custom blueprint asset but not the animation blueprint.
or same way as you would add a preview skeletal mesh to the bone socket inside animation asset
hmm i rember it was possible to add "make noise" in a anim bp for the AI hear sensing
or am i wrong ?
Thanks though!
Np. Good luck!
@broken badge yeah i know these i just thought u could add them in an animation sequence
@steady night You could use a PlaySound notifier in the animation sequence and bind it to fire a noise event in the owner's blueprint?
aye
I am confused here, why is my forward vector sphere/line trace acting so weird ?
forward vector is normalized, so it's based around the origin
Menas you're tracing from where you are, to wherever that is in front of (0,0,0)
Thank you!
@pseudo fulcrum
How do you mean?
Sorry, still not following. What extra information are you trying to get from the UTC?
Ah gotcha, yeah sorry
I'm trying to run a synchronous for loop with a delay between iterations. It seems like it runs asynchronously.
replace "while" with a branch and connect the completed of the "delay" back into the branch @steel oriole
@devout tide Perfect solution. Never would have thought of that.
Any solution for printing formatted text with inputs in blueprints? Pretty much exactly this but couldn't find a link to it. https://www.reddit.com/r/unrealengine/comments/tply60/advanced_print_node_you_can_format_the_string/
Format text > print string/ print text
Same as here (just above) probably #blueprint message
@thin panther Does this work with more than one variable of the same type? It seems like I can't get additional pins for second integer.
It needs to have a different name else it'll repeat the value attached to "Integer"
I thought that was to denote the type? Why change the name?
Whatever you place within { } is basically a variable name for the format node. They input pins always start as wildcards so you can plug anything into them
Oh I guess the tooltip confused me. Is that just meant to be helpful for reading types but not the engine itself.
You can see there that the pins have no colour, they have no type, they're wildcards and automatically infer the types
If you set the type like {Integer} it automatically comes up as an integer pin. DIdn't see the wildcard pins.
The names are just for you, just like the vid you could use {0}, {1} and {2}
I didn't know that 😅 But yes, you can put any name you like in there and it should pop up with a grey pin that accepts any value type
Yup. Man it's so difficult getting started with the simple stuff in UE. I probably would have quit without this chat.
Can I set reference to the building like that? Building will be owner of this component.
Absolutely you can
awesome, thank you
I'm trying to put health bars over enemies. I created a widget and added it to the enemy capsule component with proper rotation. But it doesn't appear over the enemies.
The health bars appear when I drag in an enemy into the map editor, but they don't show when they are spawned.
I'm adding components to the building based on what type of building it is (more like if can do something, so i can have multiple components in come cases). Now, I wonder if my way of setting up the components is good or this actually should be handled by the component itself. Should component actually take variables on it's own from the Owner (so maybe I could cast, get and set inside component). I'm still working on end product and just trying to make it work for now, and at this point it got me thinking. I can only guess this should be inside the component and not from the main actor. So just simple question. Should I move setting these variables so the components do it themselves? And can I use casting (Get Owner, Cast to BP_Building, and access all I need?) Kinda still bad? becase what if I put component in something that is not building? damn Any feedback?
I can show you on my example.
That worked. I needed to set the Space to Screen for some reason. But it totally changed the scaling I set up within the capsule. I guess Screen makes it act like a UI component rather than a capsule component and I need to scale it within the widget itself?
guys how can i make here 1 will be always true?
@dusky cobalt Draw size didn't change anything. But changing the size in the health bar widget worked.
I think you can use Widget Component for that and set class of Widget to be health bar
how can I rotate this scene component (buildghost)
@sturdy pivot Add rotation in Z axis
not working
or if you want to set like it is now, grab the Z from the break rotator, add a + node and connect the second left pin to the literal float you have there, then plug the + result (the right pin) into the Z axis of your make rotator node, for X and Y simply keep the original values from the break rotator
this should work
All you're doing there is setting the z rotation to -100.
If you want to subtract 100, you'll need to use a subtraction on that break node, and plug it back into the z
yeah I suppose he has IsLeft bool to either subtract or add, so could simply use the Add Realtive Rotation, break the delta rotation and for Z, add a select node that connects into the boolean from the function input. Then 100 and -100 for the two values
with add rotation, simply delete all the other stuff
this is all you need here
okay let me try
So you want a random bool of the three? Like one of three will be true ?
thank you
ye
I mean the way your doing it there is no guarantee
So maybe a random int, and based on that int turn it true ?
You can also do a switch on int ?
I would think a random int, switch on int, set the one to true
Set all to false first then switch one to true
But what sort of logic are you doing with these bools?
does anyone know of a good way to make combinations of things? Right now i have a system where an enemy can have a certain status effect which if hit with another status effect will combine react in a specific way. For example if a burning enemy is hit with water it becomes steam, but if a burning enemy is hit with lightning it becomes an explosion. The current way i have implemented this makes it all very messy and just involves a bunch of branches. It really feels like there should be a better way.
why does this cast result in this error? "Blueprint Runtime Error: "Accessed None trying to read property Widget switcher". Node: Set Active Widget Index Graph: EventGraph Function: Execute Ubergraph WB UI Blueprint: WB_UI"
The short answer is it isn't.
There's nothing accessing the widget switcher there
I'm trying to do add reroute nodes back to a branch to the left. It works fine without the rereoute nodes, but I can't connect the last reroute node back to the branch exec.
Just seems like I can't use reroute nodes to go backward
Use a timer for things like this
Yeah I had that problem before
Going backwards is normally a sign of something wrong
Will there be performance issues? Because logically it works great. The while/for loop won't work because it is asynchronous and I need a delay between iterations.
I think I only got one reroute node to work backwards, two made the line look weird. And no reroute nodes shouldn't effect performance, if that's what you're asking.
what do you mean exactly?
I wasn't worrying about performance issues with reroute nodes but performance issues with the delay at the end and in a synchronous loop vs using events without synchronous delays.
You've got an error that you're accessing a widget switcher when it doesn't exist. Casting to the camera pawn, not anything else in that screenshot is doing such a thing.
It should probably be fine. Just test it if you're worried.
I can't really tell you if there's a problem because I can't see the whole loop
It's pretty basic. I don't think there is an issue but was thinking about maybe at scale. But it's still going to use delays regardless
im trying to check if "Item Slots grid" have the Classes from "recipie list"
but im not sure how to complete the function
since it can contain more in the recipie list
or nevermind
ohhh oml im stupid
sorry
thank you so much lmao
is it possible to migrate a blueprint function to another project?
You can prly copy paste it, you’ll need to recreate any variables it uses
How do I get the posessed pawn/AI character within a BTT? I'm not sure how to cast it. Do I start with Get AIController and then cast straight to a character blueprint?
Seems like the cast failed doing that..
No
The BB has a self key
Using self as a reference in the cast also failed
Or do I need to get the BB and then self from the BB?
Copy pasting just produces a new empty function in the new project. Non of the internals are copied, even if they are only standard nodes. Copying the internals directly works but only if they dont contain custom nodes functions themselves. I was hoping there was a file I could import instead.
You make a bb key selector
You get value as object from it
And on the task in the tree you assign it to self
Also we have #gameplay-ai , for future reference
You can migrate the entire bp
Does it automatically get assigned to SelfActor ? Or I need to set it somehow in the BT?
And on the task in the tree you assign it to self
do you know where would I find that, cause I used the 'import from file' and went to where the bp is in the old project but the folder is just empty in the import window
Go to your old project. Right click the bp, migrate (under asset actions iirc)
@lunar sleet Thanks got it working with Get Blackboard Value as Actor and using the SelfActor key.
alright, thanks
So I set the owner in Spawn AIFrom Class and I'm trying then to access variables from the owner BP. I'm trying to use Get Owner and then cast it to the owner BP, but the cast is failing?
This is within a BTT
Does anyone know a more efficient/easier way to set these without having to connect every single one? It works well this way but I'd like to know if there's a better method
make little pure functions
There is a SetMember function for Structs, but it also has its limits. Ultimately handling Structs in BPs is a pain.
and very risk averse
I have a question because I made two characters in EU5, one is a tank, the other is a plane, and when I wanted to give them a given amount of health and attack, in the plane, when I created these variables and added them accordingly, everything worked fine, but when I wanted to move the attack variable to the tank, it was added. some pin called target(self) what should I do with it and where to connect it
you're trying to set a variable in a different class than the one it came from
if you want to have the same variables, create a parent class and make them both children of that class. Then in your parent class you can create your 2 variables, and both the tank and the plane will automatically inherit them
and also maybe look up "your first hour in Unreal" on the epic portal + watch the bp comms live training pinned here so you can understand the basics (not that you should try using bp comms in this example), much to learn young padawan
Thanks
Did you take that "screenshot" with a phone?
is it possible to call a custom function from a cast of a parent object?
So... in short I want obstacles to spawn on top of the auto generated platforms. The Z is done, simple, looped it to make the obstacles look as if they spawn on top, not in the middle. But the X and Y, I have a problem, you see, each platform has different size so I want the obstacles to teleport to a random location within its size, how do I do that?
ignore the error
the platform is a different BP
I think you can use get bounds or such @agile moss
you can override a function in the child and then when you call that function from a cast to parent, the child will do what you told it to
I'm gonna research that node, looks complicated, thanks
omg it works more than perfect, ur a lifesaver
I tweaked some settings in my RecastNavMesh-Default and now AI MoveTo command fails from one point to the other. Not sure how to fix it or reset my RecastNavMesh?
Next to every variable in the editor you have little arrow that can let you go back to default.
or if you just want to go back, delete it and put new one
I only see one reset arrow