#blueprint
1 messages · Page 313 of 1
Is Valid
either works
It will determine if the object reference you plug in is valid. Aka not equal to none.
boo.
funny thing is the item still collects
i would continue to debug and troubleshoot but i gotta sleep
funsies in the morning
Bye
if the userwidget reference variable is not valid, you shouild create the UI widget, then save it to the user widget reference variable.
I have a dumb question:
What does this line mean? When I make my own classes, this line doesn't show up to separate my components and such
It's a means of distinguishing inherited actor components.
Or at least, that's what it kind of shows.
okay so in this context, is it the collision and static mesh that are being inherited?
It seperates between scene based components (have a transform) and those that don't.
Projectile movement for example can't actually be attached to anything, where as things like collision, particles, sounds etc.. can as these live in the world.
So if I set up an Actor, attach a collision, static mesh, and projectile, all the same, it doesn't end up doing the same thing?
Im not sure what you mean.
I can set up an actor with all the exact same components but I don't get that horizontal line, I'm assuming because of the previous response in that the one I create isn't inheriting any of the components
Oh I get you. If the actor is just a child of actor, then it won't separate the none scene components. (not sure why) but if you then have a child of that actor, it'll separate the scene comps and none scene components.
Anyone good at motion warping stuff ??
Hello. I am trying to make so my first person camera can rotate up and down a full 360 like it can rotate left and right instead of being limited but I dont know how to do it. Does anybody know?
Anyone know how to use this copy custom attributes? Is this copy the variable from the source mesh animation bp?
Should the datatables also be C++ or doesn't it work like that?
Hello i am constructing a spline at runtime, i want to make sure that the spline point type are linear. But for some reason this isnt working
no matter what i do the points are always curved, even weirder is i have another function that constructs the first 2 points of my spline, and that one indeed work, the point are set to linear
i think i know the issue... i think when i check update spline after adding the point it also update the number of spline point for the next nodes, so i am operating on the wrong index
DataTables are ok in bp's, just struct and enums.
hey guys, need help splitting a HISM-based map into chunks in UE5
right now I have a voxel-style map (with height variation), all cubes are in a single HISM, but I can only go up to around 75×75×20 before it starts lagging
I want to split it into chunks (like 16×16) so I can have multiple HISMs and eventually stream chunks to make the map bigger
anyone done something like this? how do you set it up properly in Blueprints? any examples or tips?
Hint, it's not the camera that's limited
Im making a mini map that im running off a scenecapture2D currently but i am going to have multiple levels. Is there a way to write the code to pull the map data from each level itself to save headache of setting that up on every map. There will be about 40 of them in total.
I don't recall 100% but I think ControlRotation has limits applied, and add pitch and yaw definitely can't make it go beyond vertical. You need to work in rotation land, combine and delta rotators are your friends
You don't do that properly in blueprints
That is very much C++ land
aight imma aks in cpp chat. thanks
hi all, i am coding a pickup system. sack_bp's mesh's physics is enabled, and when the key is pressed, the mesh's physics is disabled on runtime and sack_bp is attached. But it doesnt work. If I disable physics on engine (before the game) it works.
any suggestions?
Has anyone here used the terminal ballistics plugin. I have the sample project and it doesn't really show much. I need to know how to get tracers working with the bullets
here my code
is it just a me thing or does it feel like modifying structs created in the editor feel like walking on egg shells
Is the issue with enums the same as for structs or is it something different?
yes, its similar
show the component layout of the thing
sorry for responding late. 2nd image is collision settings of mesh
when char picks it, response to all channels becomes false as it works on runtime
Hello, i encounter problem when compiling specific blueprint class named [parkour component] it is completly crashing engine, it crash even without changing anything and then compile. If i do the same action with another BP class, everything is fine. I can play my game normally, but i cant modify that one specific Blueprint class. Weird one is also, when i add function, then remove it, engine starting loading a lot of stuff that is not even connected to that blueprint. I tried copying it and replacing it and then also everything is fine. Okey, so if i found solution to my problem, why i writing this? Becouse when i restart the engine, the problem comes back. New component have the same issue like old one.
My issue is similar to this one https://forums.unrealengine.com/t/ue5-crashs-when-compiling-event-graph-of-actor-component-unhandled-exception-exception-access-violation-writing-address-0x0000000000000030/1250480/2 but no solution either.
Did you ever figure out what’s causing it? currently having this problem with a actor component, as you said functions in same actor component work fine, event graph in every other thing works fine. Even if i add a “print string” that isn’t connected to a event and try to compile, ue5 crashes.
Its a bit complicated component, so i dont want to rewrite it. My guess is structures might be a problem but i dont know how to check them.
Component didnt display any issue within it. But if i click compile its crash anyway.
reloading doesnt work
There might be a problem within Locomotion Anim class, becouse i using Parkour Component with Thread Safe update function. If i remember correctly, it started crashing after it. Yeah but there is no warning and everything teorically compliles fine...
Whyyyy this engine is so cursed i losing sanity trying to fix something :_:
is this true or false ?
false
If u have problem to know what is inside variable
use this
If u start the game and then move on connection, its shows current value inside it
how to compare vectors to see if Actor is within Start and End drag positions ?
Hello, I have a problem with mouse positioning. Get viewport size indicates the size, in fullscreen as well as in window. However, Get mouse position returns the position from the top of the screen, not from the viewport. So there is a shift with the mouse position because of the taskbar and the title bar. How do I get the mouse position from the top left corner of the viewport?
Dont cross post #rules
Understood. First and last time
What's with the nerd faces lately when people point out basic rules?
Looks like randoms that don’t actually contribute anything
god. my widget wasnt moved correctly to my widget switcher and it caused me hours of debugging all i had to do was move it to the widget switcher
its awlays some tiny thing
assuming you want just X and Y, ignoring Z
bIsInBox = p.x > min(a.x, b.x) && p.x < max(a.x, b.x) && p.y > min(a.y, b.y) && p.y < max(a.y, b.y)
Although this already exists
Anyone know whats going one here
the value I'm putting into the contains is matching with an entry in the array but for some reason it seems to fail on the branch
FTexts don't work the same way as comparing strings - Text essentially has an ID associated with them, so unless its referencing the same ID it won't match, and because you're converting a string to text, it will be creating a new ID each time.
arr makes sense why when I loop through and do it that way it works
as in checking each one induvidually
The Text === comparison converts the Text to a string for comparison. The "Contains" node checks if the reference to the text is equal (checking if the ID is equal)
There is a little more to it in the code, but the "Contains" node does a few other tricks to try and see if it compares, but the === node is far simpler.
If you click the little flag beside the text in the array, you'll get the localization options - if you uncheck the "Localize" option, then it'll find it using Contains.
If you're populating that array from some other source, you need to get to that source to uncheck this option.
This however also means that you wouldn't be able to localize your commands which I'm not sure you want.
This looks like network code "Execute on All" ... and you're shure the "GetMesh" is the root component of the item you want to attach? And you call it on the correct server?
out of interest how difficult would it be to implement something like UEFN do where you can add to an Delegate an actor Ref and fire an event on it ??
I want to save my music current time so I can use it later but there is no sound "get playback time" node. What's the best way to save the current playtime of a song?
haven't found any native functionality which would provide this value to blueprint either.
You may track your time by yourself 😉 Like we do sometimes for animations.
Or you "code" it in a meta sound
Best would be just to pause it, store the reference to it and continue on the later point.
If you're using an audio component, you can bind to the OnPercentPlaybackChanged before playing the audio and that'll give you a % value of the duration of the audio.
You can store that value indefinitely... When you want to play the sound at that %, you need to get the sound, get its duration, then multiply it by the % and that's your start time.
Does anyone here have experience creating third person combat system? A modular approach that can be scaled?
willing to pay for some tutoring
That is an incredibly vague ask
just do it one mechanic at a time
The space of combat systems is so large that there's really no one-size-fits-all
You'd probably be better off posting a job request then randomly asking here if you're wanting to hire someone. #instructions has info on how to post it.
Is there anything that would cause a widget to be more translucent outside of direct opacity sliders? I've looked all over this widget and I can't find any reason why it's slightly see-through. Is the only widget I have that does this.
Hi does anyone know why this thing fails to work?
I checked the function and looks like it's working the way ti should
it also clears the thing successfully each time at the end
But the problem seems to be here
for example, I stack 2 pancakes on the pan
So when you interact with it, it's supposed to pick-up: two pancakes, one frying pan
Instead I pick up 3 pancakes, 3 frying pans
if you use a button, or any other widget and you set "Set Enabled == false" the contents will be transparent and grey
3 things.
-
Describe what seems to actually be the problem... is it that you're not destroying your sound? Do you get really weird results in your inventory??? Like, what could you possibly mean by "I checked the function and looks like it's working the way ti should" when you first said "Hi does anyone know why this thing fails to work?" ??
-
You've shared a handful of graphs, but I actually can't tell what's going on here or how any of these are supposed to relate to each other.
-
The first thing that actually jumped out at me is that you've got a nested loop where for every single key you're looping over each value and doing a thing with that key and every value. I think what you probably wanna actually do is use the
Array Indexfrom that first For Each loop as the index for aGetfrom the Values array. I did a lil mockup of what I'm talking about
why is there no "Select" node used? To select the values?
Oh thank you so much
But your red arrows seem to indicate you think there's a control flow issue - like why doesn't the output result in you running "Empty Your Variables"?
sorry I should have started with that message, my bad
Ah
Yeah it looks like the double loop is the issue
Also, you're using collapsed graphs and macros and stuff - nice! Most folks don't know about collapsed graphs. Where'd you learn that?
thanks, Ive been reading a lot of documentation on devs.unrealengine even tho it's kinda boring it helps sometimes learn new stuff
youtube is easier to watch than reading most of the time though
yeah this is a great suggestion
I didn't catch that you had that degree of duplicate logic for some reason
that means I should make an array here like this? and then select with the integer
Thanks everyone, I made it work, looking something like this, the only problem now seems to be that when I go on layer 2 on my pancake tower, I stack my pancakes like normal, but when I retrack my ingredients and try to take em back, I pick up 2 pancake rounds, and 2 frying pans at the same time. Even tho there's only 1 pan placed each time
Maybe @sand shore was correct all along in that there is something wrong with my nested loops
Everything looks correct though
try my suggestion out
Even when I go inside of my Add To Inventory function there's nothing suspicious going on, or is there?
For example right now I have 2 pancake rounds stacked on top of the pan
but it only adds 1 at a time? perhaps that's where the problem lies, it also seems kinda hard to debug with regular break points
because my for each loop breakpoint only fires once 🔥 and then never again
even to it probably fires more than just once thinking Im trying to remove 2 pans while there's only 1
Here's how I would write this part of your algo:
for (Pair<ItemName, Amount> ItemSpec : Map)
{
FindValidSound(ItemSpec.First);
InventorySystem->AddToInventory(ItemSpec.First, ItemSpec.Second);
}
But blueprint doesn't let you iterate over the key/value pairs like that, so you really need
TArray<ItemName> Keys = Map.Keys();
TArray<Amount> Values = Map.Values();
for (int i = 0; i < Keys.Length(); ++i)
{
FindValidSound(Keys[i]);
InventorySystem->AddToInventory(Keys[i], Values[i]);
}
But what you're writing is:
for (ItemName : Map.Keys())
{
for (Value : Map.Values())
{
FindValidSound(ItemName);
InventorySystem->AddToInventory(ItemName , Value );
}
}
How about this...
Add a print string here
Your print string should say "Adding (number) of (itemname)"
whats the append for?
oh I see
append string can be used to make more complicated debug
What is the Format Text Node in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
Matter of fact use Format Text and "Print Text":
Thank you!
What's the best way to go about detecting combat? to start combat music.
break it down, think about what types of things in your game are associated with combat.
is it only the case that combat is happening when damage is dealt? Well, what about attempted attacks? Does spellcasting mean that combat has started?
Figure out what combat means to your game, then think about all the places in your game that could contribute to combat. Is there a good way to have all of them talk to each other? I would make a single component (or something else) that everything can message and say "Hey combat might be happening"
Anything more specific / actionable requires knowing way more about the game
Do you have AI, and do the AI have the concept of having a target they want to fight or escape from?
I'd use that
Yea right now when an AI acquires player as target I start combat but that then leads to how to exit combat lol
you'll want some sort of a time out or something
Whatever your music manager is, it can just occasionally check if any AI are in whatever the combat mode is, if so, switch to combat music, if not, switch back to normal
of course you could make it event driven but same idea really
Yea message on entering with AI UID then remove when loos target or dies.
You can have a lotta fun with it too. Maybe you have a perception stat, and with low perception you only know you're in combat if an arrow hits you. But with higher perception, you know from the moment a goblin detects a stimulus
(or maybe paranoia where it takes your character longer to think combat ended)
I'd still check though just so you don't have to worry too much about the removal
since it's not just "I died, stop combat music"
I'd just check on a 1s timer and also check when AI says to (when they initiate and exit combat)
How much fps hit are timers? I generaly try to stay away from timers or ticks that can potentially end up running the entire game or for long periods of time.
zero?
you are doing so much work on a single frame, iterating over a few pawns to check if they're in combat is literally nothing
Really Ok thanks Ill add timers and events
I'd use a profiler to look at the actual overhead of things if there's something you'd wanna do (like using a timer) but you're not sure about if its expensive.
Here's a pretty good overview for the Insights profiler: https://youtu.be/5rjm1s-pAMk
Trace Channel List: https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-insights-reference-in-unreal-engine-5
In this video, I go over all the basics of using Unreal Insights in UE 5.5. I show you how trace events work, then I go over how to record traces using the trace widget and using console commands and finally I give you a...
I cleared all the other print strings I had, but not a big result, it still is showing this Name: "Frying_Pan" Quantity: 1.
This is what it looks like inside the graph
but how many times does the pan appear for every time it runs?
2 times
and how many times would you expect to see pan?
should I put another print string in between the 2 loops or after the 2nd loop?
once
This is how it looks like it's working rn
I mean you can add as many prints as you want
but I want you to try replacing the second for each loop with just a get node
but the values are a list
sometimes you want the 2nd element in that list, sometimes you want the 1st element
sometimes you want the 5th element
etc.
Oh wait a minute
I can use the Array Index for that task☑️
So, the Values and Keys lists are the same length
If you had two types of inventory items, that means that you also had two quantity entries
by looping over both lists, your inner loop logic runs 2 * 2 == 4 times
What a timer does is attach itself to the world timer manager, and it checks if the elapsed time >= the desired amount of time for the timer to execute every single frame and if so triggers its attached delegate. Since timers are handled in C++ land, this is really next to nothing but if you had tens of thousands to hundreds of thousands of timers only then you may start to see any sort of impact to performance from the timer itself.
Need help to create Dynamic Mobile Input UI (movable touch buttons) in UE4/UE5
Hi everyone! I’m developing a mobile FPS in Unreal Engine (4/5) and want to let players drag & drop on-screen buttons (Fire, Jump, Sprint, Ability) anywhere they choose. I’ve already set up basic UMG buttons and have a rough idea of spawning them dynamically in Construct, but I’m looking for a polished guide or video tutorial to do this the right way.
want instruction on :
Enabling touch-drag of buttons at runtime
Persisting the new layout (saving/loading positions)
Seamlessly switching between “edit mode” (drag enabled) and “play mode” (touch triggers action)
What I’m Looking For:
Video tutorials showing a complete drag-and-drop UMG system for mobile controls
Example Blueprints or walkthroughs for saving/loading widget positions
Tips on clean implementation (e.g., toggling edit vs. play drive)
draggable UI elements aren't exactly beginner friendly but tutorials for such systems do exist
Hi guys.
I'm working on a project where I want to spawn some vehicles at different locations according to the button pressed on the UI.
The problem I am having is that I am able to spawn the car correctly and possess it but the rod and the plane is not spawning no matter what I do.
I have tried placing break points and print strings to see if the cast is successful and if the custom event is firing correctly and it is firing alright, but I am unable to see the rod and plane spawning in the level nor in the outliner. Any idea what could be the problem?
P.s. The onclick event is being called on the main menu and the spawning is done on the player controller.
Double check the spawn location and if spawn anyway (ignore collisions) is checked on the spawn node
That was it. There wasn't wany collision happening in the first place but it worked when I switched it to always spawn ignore collisions.
Thank you so much
Need some help adding mod support
Hey, im building a shooter game with upgrades like "Rounds" where players get to pick upgrade cards that upgrade their gun's effects. and add new effects etc. I want to make this moddable so players can eventually add their own cards. I have never added mod support before though. Is there someone who'd want to nudge me in the right direction on how to add mod support for this specific feature?
I feel like everything should be data driven and stored in a datatable, but not sure what to do from there
I'm really struggling to get a C++ struct in my project. I've tried several ways, but either the C++ stuff doesnt show up (when starting the .uproject) or I get compile related errors when starting from epic launcher. Not sure what to do
If you gonna boot the project from your uproject. Then you need to build for development.
Unless you have a valid reason to start from launcher just run from IDE, ideally using debug config when developing.
So when launching from the uproject I dont get any C++ stuff in my content browser. I read that I need to build the solution that was created when add visual studio files. I did that, but nothing changed 🤔
Did you read what is said about building on development config?
If you get build from source warning is because your project is outdated as you haven't build development
@final berry
Im using visual studio, but dont see a target option, only the development config 🤔
screen shoot it
if you are serious about developing, get a rider btw. Visual studio without JetBrain plugin is practically a text editor.
are you opening your project .sln?
iirc it shouldn't say UE5 but your proejct name
try screen shooting without cropping
(Opened the configuration manager as well)
this doesn't look correct
This one stood out to me
are you opening the project .sln?
Yea
right click your .uproject -> Generate visual studio files
Yes, I did, that created that .sln
Just instal Rider firstly, then run the uproject file with the Jetbrains Rider @final berry, if you encounter any problems then let us know
anyone know what this V. means?
local variable
It is yea. There's one to denote it's a var passed into a function as well. Super handy.
out of interest what would be better. Letting the widget handle getting a value it needs from the Actor or it listening out for when the value changes and then it being sent through ?
It depends, if the widget only for displaying data for a specific actor or component letting it handle it can be nice, assuming you have a reasonable path to get a ref to the desired actor.
If it's more of a reusable widget, using event dispatchers are great. The widget would just have a function that has the data passed in it should display then where the widget gets created can do the binding for the widget and tell it to call the relevant function.
so it's a unique widget which only displays stuff that it's owning actor is set to retrieve.
Are you expecting it to make a "structure" in your content browser, the same as a BP struct? Because it won't. C++ is not assets
Yea I think in the mean time I found what I wa slooking for 😅
No
That doesn't make content either
Clicking that is the same as making a C++ file any other way
When you make your struct in C++ you just use it as a struct type. Nothing gets added to the content browser because it's not content
I'm thoroughly confused 😂 All I wanted was just have a C++ struct
You have a C++ project? You can open a .sln file?
And you have a .h file with the struct in it?
I dont know anymore, Im getting pulled in so many directions Im lost
This is what I got
Ok cool, we have some code. Right click your .uproject and open it with Rider (this means you don't have to keep regenerating project files every time you make something)
When I open it I get this dialog
Click open, should be fine for what you're doing. Cancel should be fine as well
So Im actualkly opening the sln, not the uproject then, right?
It doesn't strictly matter. It's a preference thing. You can just open the uproject, you can also open the .sln. The latter just means you need to refresh the project files when adding things outside of Rider.
Alright! Now what 😄
There's that dropdown at the top that says AutomationTool. Change that to your game project, which should be Vanguard
🥲
If you dropdown that little "Games" thing on the left hand side what do you get?
Right click the little Vanguard project and build it
And while you're waiting, post the contents of Vanguard.h
Hi, I wanted to ask if someone can explain to me, because this is something I couldn't understand for a long time. I know that the Test int will be 16 and that the first loop is 0,1,2,3 as well as the second but why, how? Wouldnt making a single loop from 0 to 15 be the same?
I dont get what is happening exactly : (
in this case where your just incrementing test each time, it would be the same as just looping in one loop
it can be easier if you have an x and a y, to be able to set that
so if it was one loop you wouldnt be able to add a whole inner loop very easy in comparison
Im spawning actors in this shape so I am changing X and Y
with this you can just set your x and y and it should count them, although this could be done with maths as well
Test = x * y
This is how I was trying, I made some changes but I wanted to spawn four actors adding to Y then go back to center add four adding only on X
hold on I want to change it
okay so this is where I was and now am, I can make two columns but dont know how add the third and align then like the red plus
okay hold on I got this
I have a dialogue system with choices, but I need to call specific events/functions depending on the choice and dialogue. The thing is, there will be a lot of choices, is there a way to call specific events by name besides console command or some other way for this?
Ideally I would also prefer to pass the selected choice into the called event
I've got a persistent crash and I think I narrowed it down to a world context obj node being exposed in a custom function library a friend built for me--can I just connect this node to the pin on player state?
You can make Functors: objects that just wrap a function. The outcome of a choice can have an array of functors that it executes one by one.
So of course after some hours of "???" I finally made it in like 5minutes although I got two actors too few but I should figure it out soon.
oh yea
Remove the world context input pin from the function. For the node that need world context, you can pull from the pin and there's a get world context var specifically for that function. (doesn't work if you copy/paste from another function) From my understanding it'll get world context from the thing calling the function.
tY!
Something like this might be better.
Minor tweak to prevent the duplicate actor in the middle.
Haven't actually used C++, so I don't actually know how to do that, and it will probably be problematic to expose back to blueprint?
So far only thought about making enum bound to choices which will fire specific event on switch. But switch with like 20+ things sounds sad
You can do it in blueprint.
Define a base class of type UObject. Give it a function that does nothing but has the parameters you want.
Make subclasses of that function that do specific things. You can give variables too.
In your choices, make an array of instanced functor objects. Then call the function on them when needed
It looks and is but making it on my own was really fun and rewarding. I'll save your BP and try to understand it tho, thank you!
No worries. 🙂
Hey all, I’ve got a question about previewing spawned actors in the editor.
I’m using DataTables to drive enemy and weapon data. At runtime, I spawn a weapon actor and attach it to the enemy at a socket — that part works great.
But now I’m trying to preview these in the viewport/editor without pressing Play.
-
Is it okay to use Child Actor Components (CACs) in a “Preview Actor” just to visualize things like weapons in-editor?
-
In that setup, would I swap out the preview content for the real, data-driven version at BeginPlay, or is there a cleaner or more standard way to handle that transition?
What's the standard approach for what I'm describing?
The short answer to CACs are that they're fine as long as you never specify the class they display in an actor class on it's components as a default or save them into a map by placing said actor on a level with a CAC with an actor class specified. So if you're just doing this for a preview actor that isn't used in gameplay, it might be fine.
That said, I'm not sure why you wouldn't just have a map with a basic actor that can be customized like any general customization menu. Then you can just display the data driven version there as it would be in game and not have odd translation code between the two. Is there a strict necessity to have the view be in editor?
I think i understand the 1st part, but not the 2nd. I'm still getting familiar with UE. I think I'm missing assumptions/context. What do you mean by "general customization menu" and a map? The reason I'm hoping to show in-editor view is to see how the character would display in-world without the need to hit play everytime. Essentially looking for a smooth workflow for tweaking data and seeing immediate results to iterate quickly. I'm unfamiliar with what workflow would best fit me
Hello, what do I need to do in my AnimBP to avoid this behavior
the jump animation doesnt work when jumps are happening in quick succession - why?
hello, i need some help. im trying to do some shot like behavior by left mouse click to reduce enemy mannequin hp, but something wrong and i don't understand what is it.
screenshots below are "ThirdPersonCharacter" player blueprint
this is enemy bp
ofc health has value 100
also i don't see the trace line by clicking left mouse button
That's all a bit over the place.
The rotation stuff is wrong, you need to use the forward vector of the camera rotation.
I would suggest against using these Tags to identify actors. That's never gonna scale well.
Why do you have this strange event dispatcher setup? Calling ApplyDamage on the Hit Actor should be all that's needed.
why is it so god damn hard to use gamepads with UI, i cant even get it remotly to work, the gamepad works ingame with my game no problem but cant get it to react to my ui in any way... is it something basic im missing ?
Focus mostly.
CommonUI helps by making menus autoamatically focus an area. It also emulates a mouse cursor for hover and click events which is nice. But you still have to have correct navigation blocking on your containers.
I'm doing funky stuff with gravity.
I need to find the closest vector to the gravity direction around the axis of the forward vector. Anyone know how to solve this?
hmm
so for instance i need to block "left" for examble
dose that make pressing left wont do anything or
how dose it work
There are a few different options.
Escape is default. It means that if you hit this widget and try to leave it going left, it'll allow it by finding the best target to the left that can be focused.
Stop is just that, if it hits this barrier it'll stop and leave focus where it was.
Wrap means it'll find the right most focusable target within this same container.
Explicit means that it will set focus to a specific widget.
Custom and Custom boundary allow functions so you can do... custom stuff. Custom will run if this container or any child gets a navigation request, boundary only runs if it hits this containers boundary.
ok thansk that clarifies it abit,
the "forcus area thats turning blue showing whats focused
is it psosible to change it ?
to another color or higher emissive color or something ?
can barely see it
getting old tho
or i cann use the hover functions for that i suppose
ah or, on focused dosent count as "hovored"
That focused thing is an engine thing. I'm not sure how easy it is to change.
In Red Solstice 2 we almost had a focus widget that was put at an extremely high ZOrder above every other widget. It was a canvas with an image, and the image was ticked into place over the currently focused widget. This unfortunately requires C++ to implement though because you need to ask the SlateApplication for the current focused widget to get it's screen space dimensions to place the image. After that you can make the image whatever you like.
We didn't use this though because we swapped to CommonUI, and CommonUI moves an invisible cursor around when using gamepad to the center of the focused widget which triggers a widget's normal OnHovered code. So you have the same look as if you moused over it.
For some reason, by projectile attack is failing when it used to be working.
The projectile stats are updated at its Propper values when it feeds data into projectile construction.
But when trying to call that information inside the created projectile they are now at its default value and therefore it fails at the casting in the second picture.
Why is the construction script of the projectile base failing?
Are you still using BP_ThirdPersonCharacter as your character class, or somethign that inherits from it? You'll also need to show what data you're feeding into that structure on the spawn node.
Ok, so closing and re opening the project fixed it.😕
I'll keep an eye on it.
something might of been up with the construction timing? Im not sure...
Before the second image was it's default values
Is your struct BP or C++?
Also you set these variables from struct that you feed on Spawn but I believe construction might run before the struct variable is set, so it's beeing set with the defualt one.
this is wrong use of construction script basically
just move logic from construction script to some other event and call it after spawning projectile like InitializeProjectile()
Anything exposed on spawn should be set before the construction script runs.
Hmm, okay, my bad then. Would you say its correct use of construction script though?
It's fine. It no different than making it instance editable, dropping it on a level and altering values in the details panel.
Good to know.
Does anyone know how i can get a transparent background on my texture render target from a scenecapture2d. Capturing a couple actors in a completely empty level but the background is always black
IIRC it needs to be ran through a material to display correctly .
any idea how to set that up
Give me a few and I can check one of ours.
ok ty
Does any know if it's possible to get the current selected actor in the level editor inside a widget?
Like on selection binding
Is your widget an editor utility widget?
yeah
Seems our tech artist moved some stuff around and changed it a bit. 👀 It isn't nearly as simple as I remembered. This google image is similar though. For some reason the settings on the scene cap have inverted alphas. You also have to have the correct settings on your scene capture component to write the alpha into the RT.
Hi, this is the first time I try this node, but it does not work. Does anyone know why?
This may be what you're looking for.
Yeah I saw that. I'm specifically looking for an on selection changed event or something. Similar to how the details panel picks up selected actors
Not sure if that system is too deep idk
Ah. I recall seeing something like that a long while ago, let me dig a sec.
May not be BP exposed though.
Sounds good
what capture source are you using?
All seems C++ bound. Only thing I'm seeing is this possible multicast from the level editor module. If you can do C++, here's an example of how an SWidget is binding a function to it. This is actually ran from UUnrealEdEngine::NoteSelectionChange, which quite a few things also call to update the UI around this. But definitely nothing BP exposed, oddly.
FLevelEditorModule& LevelEditor = FModuleManager::GetModuleChecked<FLevelEditorModule>("LevelEditor");
LevelEditor.OnActorSelectionChanged().AddRaw(this, &SMergeActorsToolbar::OnActorSelectionChanged);```
I don't recall what the other project is using. And I can't check, I don't keep it downloaded.
Authaer do you know about gameplay cue in mp settings? Doc says it's replicated but my gameplay cue param hit result arrive as 0 value for client.
Attach a "make raw value~" node with raw value and give proper value if you sre using only bool then set x to 1
And make sure to use it with input sub system i always use it's interface event with direct player controller
im watching a UE5 2hr tutorial on the basics, and luckly im using blueprints and the ui is easy to use
Hi if I'm going to have lots of variables on a player or component is there any better way of storing them than simply having that many variables ?
You can use structures to store groups of variables, but that also makes it slightly harder to manipulate and access them and I'd only recommend doing this if those values only make sense as a packaged group anyway.
You can use enumerators to clean up bools if they're meant to be mutually exclusive (ie. your player could have IsJumping, IsWalking and IsFalling as bools, but you could have these all under one enumerator if the player can only be in one of these states at a time)
Otherwise, just make sure you're putting variables where they make the most sense.
"many" is relative, it can be totally fine to have 30 vars on your player
just see how many vars engine classes has 😆
but splitting systems/features in comps/actors can totally help
okay thank you both for advice
Why does my character still fall ?
Any ideas how to fix the issue where it decides to change it to apples when it's not apples?
I know it has to have something to do with the Set
How are you playing them? From a play event in an ability or from an Effect?
Cleaned up code but still the same issue
void UAGAttributeSet::PostGameplayEffectExecute(const FGameplayEffectModCallbackData& Data)
{ // ** This gets executed after gameplay effect is applied ** //
Super::PostGameplayEffectExecute(Data);
FEffectProperties Props;
SetEffectProperties(Data, Props);
if (Data.EvaluatedData.Attribute == GetHealthAttribute())
{
SetHealth(FMath::Clamp(GetHealth(), 0.f, GetMaxHealth()));
}
if (Data.EvaluatedData.Attribute == GetManaAttribute())
{
SetMana(FMath::Clamp(GetMana(), 0.f, GetMaxMana()));
}
if (Data.EvaluatedData.Attribute == GetIncomingDamageAttribute())
{
const float L_IncomingDamage = GetIncomingDamage();
SetIncomingDamage(0.f);
if (L_IncomingDamage > 0.f)
{
const float NewHealth = GetHealth() - L_IncomingDamage;
SetHealth(FMath::Clamp(NewHealth, 0.f, GetMaxHealth()));
// Inject the final incoming damage to the hit result gameplay effect.
FGameplayEffectContext* MutableDataPtr;
MutableDataPtr = const_cast<FGameplayEffectContext*>(Data.EffectSpec.GetEffectContext().Get());
MutableDataPtr->GetHitResult()->Distance = L_IncomingDamage;
const bool bFatal = NewHealth <= 0.f;
if (!bFatal)
{
FGameplayTagContainer TagContainer;
TagContainer.AddTag(FAGGameplayTags::Get().Effects_HitReact_AI);
// Play hit react ability if the actor has one with gameplay tag
Props.TargetASC->ExecuteGameplayCue(FAGGameplayTags::Get().Cue_HitReact, Data.EffectSpec.GetEffectContext());
I'm injecting the hit result after PostGameplayEffectExecute.
Then I will ExecuteGameplayCue passing the EffectContext.
On server, the damage is correct but client's one always 0 = (.
Shouldn't the EffectSpec gets replicated to clients?
Which code path does your client take? A predictive path or the main one?
EG which one of these?
void PredictivelyExecuteEffectSpec(FGameplayEffectSpec& Spec, FPredictionKey PredictionKey, const bool bPredictGameplayCues = false);
void ExecuteActiveEffectsFrom(FGameplayEffectSpec &Spec, FPredictionKey PredictionKey = FPredictionKey() );```
Also your issue might be your IncomingDamage attribute. It may not be set yet on the client by the time this GE runs.
I have no idea 😛
will do some debugging, thanks.
I thought server ExecuteGameplayCue, I pass the EffectContext param, and it should replicate.
I assume this GE affects incoming damage?
GE_BasicDamage effects the IncomingDamageAttribute.
That's where the server calculate damage. Then it ExecuteGameplayCue for clients to display damage number and SFX.
which I naively think the cue gets replicated. I guess not.
in this case, i'm not predicting anything.
Server apply the GE
server also execute the Gameplay Cue
Client did execute the gameplay cue when Server execute gameplay cue however the gameplay cue param value isn't the same.
actually default value for client.
From what I can tell in the engine code, it looks like the RPC that is sent for the cue would take a copy of the context and send the data with it so long as the passed along effect context is valid.
Bump
You're reusing the widget reference...
Yeah, first box created a widget and set values in the map.
Second box created a second widget and set a second value in the map but overwrote the widget reference.
First box hit again uses the reference the second one overwrote, but will not create a new widget because it exists in the map already.
Hello Fellas.
I have a question regarding PhysicsAsset of one of my characters. I might be wrong in this channel so pls tell me which one I should ask if that is the case.
So, I have setup a PhysicsAsset for my NPC characters. My main problem is, that the camera of the Player character collides with one of the Primitive-collision bones through that PhysicsAsset.
I would like to know how to disable the collison for with the camera? It has been some time since i setup the PhysicsAsset so I am not sure how I managed to setup the collision at all. Hope anyone can help.
I know but I don't know a work around
Was this message for me?
You could use a Map of ItemID > Widget reference.
Ideally you wouldn't be using your game logic to drive the creation and management of the UI and instead have the UI update itself when things change by using event dispatchers or bindings within the UI itself.
Yes
Would anyone happen to know how to pause a timeline for a double door when it hits the player? Im trying to just stop the door from moving when it collides with the player. Currently it is doing that, but sometimes the door goes the other way when the player leaves the collision, like it reverses for some reason
Ive spent days trying to fix this with chatgpt btw lol
Will you show your BP
Yeah I am going to work on making it more like this once I have got it working as I need
do you mean like this?
Yea i will in a bit; not at my pc right now : (
I'm trying to set my text to the Integer value of Inventory. Any clues where I'm going wrong?
You have no object that Inventory exists on. You're trying to pull that integer from thin air instead of the object it's being held on.
Do I want to cast it from the BP_ThirdPersonCharacter somehow?
the errors window and / or hovering over the error will tell you something like "Self isn't a reference to InventoryHaver" and then you gotta ask yourself how you can link a reference you know to be an InventoryHaver to the thing.
Cast will not help you, you need to route your reference somehow
Cast is a check "Does this reference have the type I think?"
Cast isn't a hammer space fetch-all
Oh
Don't think of casting like fishing. Think of it like casting a movie star.
You're not reeling something in, you're trying to make it pretend it's something else.
what class in your project has Inventory?
BP_ThirdPersonCharacter
And this is the widget?
Correct, the Widget for the UI
https://dev.epicgames.com/documentation/en-us/unreal-engine/gameplay-framework-quick-reference?application_version=4.27
https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/Widget/GetOwningPlayer
If you look into the structure of the gameplay framework and look at the functions available to your user widget, a path will reveal itself.
this stuff won't have changed in a long time, so if you're on 5.X it'll still be valid info
Okay thank you so much, I'll review this documentation
closing the door with the player in the way does stop the timeline, but when the player gets out of the way, the door reverses the timeline and im not sure why lol
So I was able to create a reference to the BP_ThirdPersonCharacter however how do I specify that I want the inventory and not just the object itself?
Hello, for educational purposes, why is this an infinte loop? I want the projectiles to keep facing the player while flying towards him and when they collide with an actor on the ground they are destroyed
While loops are meant to be concluded within the same frame, they're not meant to continue to execute until their condition is met.
For something like this, you may as well put the rotation logic on Event Tick Instead of setting a bool to destroy the actor, just call Destroy Actor on it when it is meant to be destroyed.
The overlap event is not necessary to trigger once so use sphere trace and check distance from those colliders,
oh I thought using tick is not recommened rather
Tick should be used if you're trying to do something every frame. Movement is usually something you want done every frame.
Okay, thank you!
The variable "use pawn control rotation" inside camera components makes the camera movement weaker when it is atached to a head socket, does any one know if there is a way to control this?
@maiden wadi Hey, im trying to use commin UI but i cant find any suitable tutorials for what im wanting, any recommendations ?
I'm currently working on a Tricks system similar to the Tony Hawk's serie. I've already implemented the button presses with the narrow time window and what serie of inputs give in terms of Tricks, that I indicate in a String — I'm essentially « Translating » the serie of inputs as 1 to 3 Strings into a String with the Trick's name, and make this hold as long as the last trick input is pressed, and the Player's not on the ground, and a larger time window of 3 seconds not ended if no new tricks are entered.
However I don't know how to indicate how many tricks have been entered in a combo, how to add up the combo score (with Multiplier) and how to display the tricks names on the HUD as they add up. I'm quite sure I have to store the tricks names in a String Array (or Set ?) as they pile up but not sure how to implement that (adding elements in the otherwise empty String Array in real time ?). The later would solve the two first concerns.
You shouldn't need to hold an array of tricks performed unless you intend to do some additional calculations with the trick names.
Your UI just needs to know what trick was executed and basically append whatever text is currently displayed with the next part of the trick list.
Successfully perform trick =
trick count + 1 (for the multiplier)
notify UI to add performed trick to text display
(if you want to add tricks to an array do it here)
On land:
calculate your total score using the trick count
reset trick count to 0
(reset trick array if needed)
On bail:
reset trick count to 0
(reset trick array if needed)
The only place the tricks would need to pile up is in the text being displayed.
The score is a running count based on the trick performed & if you're grinding or whatever which would increment as you continue to perform it.
The Multiplier is something that multiplies the total combo by 1 point something to around 10, and it increases as the tricks pile up.
How do I store these ? In a String Array ?
I basically need Strings with Indexes, then I'll see how it goes with Score + UI display.
It can be if you want. If you're hoping to localize you'd probably want to use something better like an array of a structure with a Text and a Float or Integer --- this way you can store things like 720* 1080* or distance which you can format later on.
anyone know if u can have two cursors for split screen ? (Controlled with gamepads) ?
There's UMG Gamepad Virtual cursor widget for that, just change the Player Controller index for each Player
What node should I use to add / remove elements to an Array in real time ?
as a pluggin or ?
Yes it's a plugin.
It's free.
Sometimes it can be difficult to optimize your game UI for a gamepad. In some cases you can use mouse trigger events that are used with the system cursor, but you need gamepad support in your project. You are in the right place!With this plugin you can control the system cursor with the gamepad. Select the desired stick and call just one functio...
isent this the one ?
I don't think it is...
oh thanks, its for ue4 do u know if any issues with ue5?
I only use UE4.
ADD, REMOVE ITEM, CLEAR
You probably want two variables to handle your text display - the array for all the performed tricks so far, and one for currently executing trick. You'd format the output text so it combines the two. This also means you don't really have to manage the array much other than ADD and CLEARing it.
I've never used Add for an Array and I feared it would just add the String to an already existing Index / Element... So yeah, I'll check that and I'll post an update if I manage to pull off what I need. Thanks.
oh, so i implemeted the plugin but how do i use it cant find any tutorial/reedmee on how to set it up ?
can i have help for this issue?
anyway to create labels like Components , Movement to create variable groups ?
There is a "Category" field when you select a variable that can help you sort them into groups.
Click on the variable and in the details panel there's a "Category" section where you can type out a new category to place it into
^
What's the best way to stop/slow down global time with some exceptions ? I know that I can set global time dilation down then increase custom dilation on specific actors to compensate but the problem arises with timers and delay nodes, those only get affected by global time dilation and not by the custom dilation of the actor they're used in
tnx
im not gonna lie, i dont think i know what im doing
just use "play montage"
why use that node
drag it from mesh
nvm
Sorry can you tell me where can I see that? Also how do you track these sort of thing down. I can only look at call stacks, is there any other method to figure out a system?
do you know any ways to get 2 cursors controlled by gamepads in split screen :/ ?
Nope, sorry.
Split screen is something I never want to touch.
Though if I have to guess, you can get separate UI for split screen.
Can't you just add cursor for each of the local controller.
thought people just made a fake one that works exactly like an actual cursor
well nothing seems to works, and how would i make a cursor for each ? i mean i have a cursor widget but its just a widget itsn ot "cursor"+
I mean it'd be the same as moving anything else with a gamepad right? create a cursor (widget) for every player in your game, make sure it's got like a Z super high Z order so it's always rendered on top. And then update the position of the cursor every frame. Everytime you move the thumbstick in a direction, add the directions value to the true location of the cursor
yeah well thats what im trying to do really only way i can think ov
but icant get it to wrok
it's not necessarily an easy thing to achieve because you'd still have to handle actually clicking other widgets and stuff, and that's a whole nother can of worms
that's not right at all
you're getting the mouse cursor location of your actual mouse
you should be getting the position of the widget cursor you made
well in the controller i imagained this would work
like "override" it to my acctual cursor
when im using my stick the cursor goes invisible tho idnno why
you lost me there bud
"set mouse cursor widget"
that dosent override it to my cursor or what dose it do the n=
oh its only displaying it
how do i get the position of the widget, cant find any options for it
Depends, what are you wanting?
thats my 2nd choice my 1st choice would be to get a cursor for each player controlled with gamepads thats what im trying to solve but thers 0 tutorials on it
Like cursors moved with the thumbstick?
y
You won't find tutorials on it. It's a kind of divisive topic in UI and gamepads. A good portion of people really dislike gamepad cursors. I like them, which is why I wrote the changes I did to the CommonAnalogCursor for Red Solstice 2. Which in theory should work with multiple players.
In the analog cursor they are already moving an invisible cursor to the focused widget, what I did was just changed that to take the input delta and move the cursor instead. Mine was done similar to uhh... Farcry 6. Analog stick moves the cursor and unsnaps it from the focused widget. Pressing DPad automatically snaps it back to the best widget and does normal navigation. So you get the best of both worlds with the easy nav of dpad but the freedom of the cursor being able to go anywhere.
hmm
But yeah, you won't find much on the topic for Unreal. A good majority of the UI experts in the UE community are against gamepad cursors. So you mostly have to write one yourself. If you can do C++, I'd recommend just using CommonUI and checking out the CommonAnalogCursor, it was pretty easy to change.
hmm mkey, but for choice 2 then instead, with common UI
how do i use it lol... i mean ive got the plugin but for navigation
It's automatic. If you have the plugin enabled, you're already using the CommonAnalogCursor and such as long as you've set up the other stuff like the... I forget what is CommonUI and CommonGame anymore. I think it's mostly the CommonGameViewport?
erhm how do i set that up ?
like im really struggeling with the UI & gamepad cant get anything to work -.-'
everything is set on "not focusabel" except my "item(widgets)"
is that not how it should be done ?
I wish this was the craziest thing I've read about "under the hood" programming technique's
when setting navigation of this widget, dose it "include the children" ?
since its them im trying to navigate
the "window" is unfucused
It counts if you are navigating away from that child and that navigation would take you past this container, if that makes sense?
Yeah. 😄 I was initially really surprised by the severe pushback against it when I was looking for stuff on it. Cause we really didn't have the time or budget to be redoing every single menu in the game to be purely navigable. Would have taken a major redesign. So it was kind of our only option given how much of the game's UI is centered around tooltips.
I'm not quite following?
Ill try and make a small demonstration tomorrow so i can show what i want and u can tellenme what im doing wrong 🤷🏻♂️
I just follow along with the code execution in the engine code. You're calling ExecuteGameplayCue() which calls UGameplayCueManager::InvokeGameplayCueExecuted()
This function sets up the cue parameters which involves calling UAbilitySystemGlobals::InitGameplayCueParameters() with the effect context which executes the below code and then it calls AddPendingCueExecuteInternal() which adds the cue to an array called "PendingExecuteCues" for processing.
PendingExecuteCues is called by FlushPendingCues() which loops through the cues calling Call_InvokeGameplayCuesExecuted_WithParams from the replication interface of the ASC. This function then ends up calling UAbilitySystemComponent::NetMulticast_InvokeGameplayCuesExecuted_WithParams()
void UAbilitySystemGlobals::InitGameplayCueParameters(FGameplayCueParameters& CueParameters, const FGameplayEffectContextHandle& EffectContext)
{
if (EffectContext.IsValid())
{
// Copy Context over wholesale. Projects may want to override this and not copy over all data
CueParameters.EffectContext = EffectContext;
}
}
Thx.
Anyone have any useful applications for Montage Meta Data?
Would anyone be able to help me out i'm very new to unreal and how blueprint works so bare with me.
I'm tryna get the box's normal via a line trace so im able to spawn the poster's actor using that normal rotation (Hoping that makes sense). Only issue is there's an weird offset so its not going 100% in the right direction (First image uploaded).
I've followed along with this video https://www.youtube.com/watch?v=8LroeZyFbMs and had a look at this forum which do the same thing https://forums.unrealengine.com/t/how-to-get-the-surface-normal-from-line-trace-hit-location/308647 yet It still doesn't work. I'm assuming im just not understand how blueprint works so it'll be helpful if someone points me in the right direction
Tutorial #2 - Spawning objects (in my case a Land Mine) rotated to fit the surface you place it on
Very easy setup, all BP and of course - here's your code!
https://blueprintue.com/blueprint/5jj59197/
|} Many of my projects are located on my Google Drive, don't forget to check it!
https://drive.google.com/drive/folders/1LqJFwqdGPXbHd-sLYEcc6...
Hey guys. So I’m trying to get the vector perpendicular to the surface of any object hit by a line trace. I don’t want the impact normal, instead, I always want the result to be a right angle from the surface of the wall. As in the attached pic, how can I modify the line trace hit result so that I’m generating the vector of the white li...
It honestly doesn't seem like a bad option though. You basically got the best of both worlds with D pad and analog stick haha. Would you still prefer to make your own system?
I'm unsure what you mean? The copying of Farcry 6 was mine. I personally prefer it over pure nav or pure cursor.
Oh I thought you meant you made your own analog cursor system from scratch.
So the question was would you prefer to make your own from scratch, or just build off the common cursor you mentioned
Your math here for your rotator is a little odd. Rather than all of this, drag off of Normal and do a Rotation From X Vector. See if that gives you some okay results.
Nah. I just extended CommonUI to do it. And I already use CommonUI in a lot of other things so I would 100% stick to it. Not much point in writing my own since it would need to disable CommonUI anyhow.
Why is it always the easiest solutions
Thanks 😄
Hi im having an axe animation montage socket action going on in my axe weapon, I want to hit an animal with that weapon and so here is my .
What I already have here is a mechanic that makes trees chopped. But I haven't made it work for my chicken animal so far. Trees work ☑️ Chickens not 
And I made a new Blueprint interface Animal_Fight for this here. I might change this later because I dont wanna make damage to chicken when I hit a tree, I should probably add in my hit actor a == and then my chicken character reference
but the problem is here... why does this not work?
my axe should enable an imaginary fire-ball for a quick 2-3 seconds that will create this damage
This is the right screenshot
to simplify, I just want axe to kill chicken
anyone want to make a quick $50, im on a time crunch and need a mechanic looked over on discord and perfected. will paypal or whatever
The overlap logic is incorrect
You are checking an instance reference with a class
Instead doing the wrong comparison with ==, just cast the other actor to w.e it is meant to be.
Though at this point, what is even the objective with interface.
You shouldn't even need to cast or check the class if you are going to use interface.
It should just be overlap -> call the interface. If the object doesn't implement the interface its not going to do anything anyway.
yes exactly I removed the interfaces, since I realized theyre kinda useless
instead of cast, I gave my target animal a tag
But you are building your functionality over interfaces.
and now im comparing that tag
Eww
I wouldn't recommend doing that.
You can approach it in 2 methods.
Actor component or interface.
Pick one and stick with it.
interface
Overlap event -> other actor -> call interface. It's as simple as that.
If thst other actor implement the interface it will execute the corresponding function.
but its not even hitting anything in the first place
it only fires up once when I pick up my axe, thats it
its as if it cant see anything else
good point on that though
That bug is kinda irrelevant with the interface though.
Collision does kinda get confusing
Also you are simulating physics
So your axe may be detached from the original actor root.
You probably should do some test with the collision. Make sure events are fired as they should.
Just print string on event that you expect to happend. If not figure out why.
Since you have problem with the overlap event. When you play in the game, open console and type show collision.
See if your overlap fired as it should.
im using break point
Ok I just made an experiment
I've added my Sphere collision underneath my static mesh
but before Im even hitting my animal
it already is hitting this interface even tho theres a branch there
now the fire-ball sphere is parented exactly where it should be, aka always follows the sharp edge of the weapon
What's the difference between these two nodes? Why is "Play Montage" not working for me, but the other node works?
PlayAnimMontage ends up calling (AnimInstance from the Mesh of the Character) AnimInstance->Montage_Play(AnimMontage, InPlayRate) and is meant specifically for use with the Character class and triggers on the "Mesh" skeletal mesh component of the Character class.
Play Montage is meant for any skeletal mesh component, and it ends up calling into the same AnimInstance->Montage_Play function call, but also provides you with those additional latent outputs for different events that can happen with the montage.
Really, either should work for you if you're triggering it on the Character mesh.
Ohh okay my bad, I forgot there's a branch condition hindering from this function to work
Is this the right way to use notify name in play anim montage? I've already set a new notify name called " SHOOT" and use a switch node to check the notify and fire the event. But it is still not working for me
If I remember well in your own UI widget you have to look after the Virtual Cursor nodes, that you have to set On Begin Play, and I think you have to Show Mouse Cursor also (drag PlayerController's blue output and look for Show Mouse Cursor).
Edit: Why do collisions on static meshes that ARENT the root not trigger hit events?
I thought it would be as simple as this. That's what I used to do with my UI.
I have a problem tha tmight sound or look really easy
but my chicken falls down out of the map after I kill it & attemt to set ragdoll physics on its body (skeletal mesh)
is it necessary that it must have a working physics asset associated with its body?
This is where I set my physics
and this is also my skeleton's collision presets
Hi, I'm having a problem. I'm trying to get the instigator of my actor but the GetInstigator node doesn't seem to exist? SetInstigator is there but not get
Quick question with using Save Games in Blueprint. Upon renaming variables or re-ordering them causes the savegame to corrupt and will not load in a shipped game right? I just want to confirm this as I have been hard at work adding custom settings on my game, but as I have shipped a beta build to steam, the Save Game is no longer being found, but was being found before the update. Only thing that changed was most likely re-ordering the list of vars in the Save Game and adding more variables to it as well. What's the go here? How do I know what is safe to prevent such issue? As soon as I deleted the save game from my AppData Local folder, it re-created a fresh one and all is well.
hey, how would i make something bob up and down like it was following a sine wave for height?
because no matter what i do, it doesnt work lol
Yes, changing the save game object can affect the validity of the saved data.
Adding new variables is normally ok but when loading, they'll just be set to the default value.
Renaming or deleting vars could break the saved data.
You can include a save version number that gets set when saving data. Then when you load the saved data, you can check the version and decide what happens. Sometimes you can do some data correction (you'd have to setup what this would be) or just delete the old save game data.
Appreciate the detailed response. Not much info out there on this looking around, so it's worth knowing. Cheers.
It would depend on what the thing was. A timeline is a simple option.
What about getting the default values back? So when the player presses Reset To Default for a Settings UI, it will bring it all back to the same values. Do I just Get Class Defaults for the Save Game and pull from there or?
an actor, its for a moving platform
its so i can just drop it down wherever
You can do timeline with a loop so it goes up and down and sets actor location.
If you have meaningful defaults setup for the settings, you can use the get class defaults.
Well they're custom settings for things like Sound, Mouse and Gamepad Sensitivity, etc.. So I need to set some sort of default value somewhat. So I kinda have to use what the Save Game's defaults are. Yeah
First of all. Do you really hold your health logic inside widget instead of component? You set health directly on the widget? It's first thing worth changing. Health Component -> Creates Widget -> Widget listens to health changes. When you want to apply damage you call it on Component. It makes it easier to reuse not only on one chicken animal, but rather on ANYTHING that can be ever damaged, simply by calling ApplyDamage on GetComponentByClass. After you ApplyDamage-> you do -Health and call OnHealthChanged event dispatcher, which the widget you created in this HealthComponent listens (binds on creation to update it's text variables).
For the physics, you probably need settings on capsule to not fall down trough ground. I guess it's probably set right now to not have any collision, and your mesh also doesn't ahve collision so when you set it to simulate it falls trough.
You canalso try to after setting to simulate the physics, set Collision Enabled to Query and Physics on the Mesh.
I mean it's also a component, its a widget component
I understand what you mean but I feel like i would be unecessarily creating a lot of blueprints if I had to create blueprint for each item that has health and stuff
isn't this creating more clutter? im not debating which is better or anything like this, im just genuinely asking because for me this has always been hard to understand why its important to construct things in this way youre saying, and Im seriously trying to wrap my head aroun this
whats the additional benefit of creating a blueprint just to hold health variables ??
Ok I see now , ApplyDamage is more useful?
It's just separation of concerns and modularity. If you had HealthComponent all you would have to do it add component to the actor. With your current setup, you have to add WidgetComponent, then in each actor you have to create widget, set widget in the widget component, initialize it etc. that is a lot of repeating of code for each actor.
and more intuitive?
Im also doing things this way for my character stats too, so that means I must change that too before its too late I guess
Also these are certain rules that you should apply that make it good programming practices. Throwing random things and gluing it together is not good way to learn how to make things properly.
Widgets should just display things. That is their job. They shouldn't do any logic like checking if character is poisoned for example.
This should be taken care in the component either HealthComponent or some other EffectsComponent for example.
Is this for crowd control damage type of attacks against multiple "enemies" NPCs?
I don't understand?
why would I use Get ... By Class unless if it's to make damage for example on multiple enemies like, apply damage ( the correct method ) on all chickens Get All Actors of Class or get ALL widgets of class ( the not so correct method )
Isn't this node really heavy on CPU/RAM side ?
Ive heard some person say here that using Get Actor of Class makes a whole blueprint cost like as much as 500 MB in disk space from 3-5 MB that it would be without this node.... Or something along those lines... 💀
But I have to add widget component to stuff anyways because thats how im letting the player know, by displaying NPCs' health
What... if your chicken is Actor, you need a way to somehow get it by either sphere trace, line trace, or on click or whatever. When you got the chicken by any method from above, you get healthcomponent of that chicken and call ApplyDamage on that. Chicken gets damaged, widget listens to it and displays current health.
Also are you planning on havving 5000 chickens? or 15? because if its less than 100 it literally doesn't matter.
Unless you actually need to get all the actors of a specific class, don't use it.
For things like radial damage, you'd just use a sphere trace to get the actors in range and then apply damage to them.
Having this component lets you not care if its chicken, dog, wolf, enemy, monster or w hatever. you hit actor -> get component by class (healthcomponent) and apply damage.
For the physics, you probably need settings on capsule to not fall down trough ground. I guess it's probably set right now to not have any collision, and your mesh also doesn't ahve collision so when you set it to simulate it falls trough. You canalso try to after setting to simulate the physics, set Collision Enabled to Query and Physics on the Mesh.
🔎
Is your ground set to block PhysicsBody?
Why does you're chicken need to know about the player specifically? (I know it's not your issue, just curious)
I have a sphere collision attached to the sharp edge of my axe so whatever the "fire ball" touches gets turned into KFC or ashes. 🍗
And for my trees I use the same axe only that it has 🎬 🎞️ 📨 a notify on the anim montage. The fire ball is parented by the axe mesh itself 🪓
radial damage = "crowd control"? aka fight vs multiple enemies/npcs? 🥊
yes 
where does my chicken know about my player?
It has a ref to the thirdperson character.
Have you done 'Build Landscape'? It's not always needed but can help it make sure it's generated all the relevant data required.
oh good notice, it's because of the health preview
Splash damage might be a better description, things like explosions.
nice idea btw
Ahh i see. If you only intend to have one type of character this should be fine. Just be aware that it wouldn't work if you wanted a second character type.
Possible replacement that doesn't require a specific class ref is something like this.
i want to slow my player down, or at least stop them in place when they let go of an input button while theyre in the air so its easier to control; what nodes would help with this?
im guessing i put something onto the movement input action finished node, but i dont know what to put
So I have an actor component that acts as a weapon system for a vehicle and on begin play it creates objects for each weapon on the vehicle that handle the actual firing and cooldown code per weapon. There is a variable in the actor component "maxAimDist" that controls the distance that any weapon can aim to at most. Is there some way to make that variable "global" over all the created weapons or do I really have to getOuter() -> castToWeaponSystem() -> getMaxAimDist() every time?
you could have a custom "drag" function. You can calculate it however you want but general idea is that you take some small percentage of your movement in any direction and remove it each frame, very simple approach shown in the first two images. You could also add a check to see if a button is pressed in that direction. Optionally to stop them right away just get the velocity split it into x and y components and set it to 0 if there is no input that way, as shown in the third image.
I'm about to truly suffer because structs aren't safe to use and still corrupt projects for blueprint users 
Like you could technically use c++ but that's not modular outside of weird fancy plugin stuff I guess I don't really use c++.
So if anyone has any tips for saving a container of variables without using structs i'd love to hear. I wanted to use objects as containers except objects apparently cannot be saved.
I did find a different way to do this all in blueprints I think, it'll just be painful
My plan right now is to make each variable also a array so you can make the savegame object serve as both the variable container and the saved inventory. So each index represents a item. It's just so shitty to work in, I don't understand how structs are still a issue almost 10 years later. Like they're such a basic vital thing to have in a engine
I'm not willing to roll the dice, they've been notoriously unstable sadly
Basically they can corrupt your project
This is more prone to occur by nesting or making changes to your structs at some later point
there was also some infamous bug relating to making widgets and something about structs.. I think? I don't know I haven't really done that
Like if i'm spending a lot of effort and time into making a modular inventory system I can reuse in any project I can't just have it randomly corrupt, that'd kill me
structs should be fine as long as they're not used much and don't change later on I think
Shameless plug. 😅 I go over how to use uobjects to create an inventory system. Part 9 through 12 cover how to save them. I use the same core concepts in my inventory systems (be it with more complex stuff on top).
https://www.youtube.com/playlist?list=PLcwVLBaUNnHoujbPwOAdMgNtq1ShoHIGc
Have a getter function in you're weapon objects that handles the getting the variable for you. In your weapon objects, when they want the max distance, they can just use the function.
An alternative is to have the component pass the distance in when it creates the weapon objects.
Assuming you're using the character component, take a look at the various settings on it. There's a few related to air control.
Ohh thank you, it's very interesting to see others handle this. Going trough it for inspiration and learning right now 
The only redeemable quality of using structs for an inventory in my opinion is that it's easy to replicate. With uObjects, it can be a little tricky in BP only land. (In C++ you can just add the object to the replicatable subobject list)
Oh I see yeah thankfully I don't really have to worry about things like replication for my project haha
Just to be clear, i don't cover replicating. I try to avoid MP when I can. 😅
with a stroke of luck i have fixed it the second i spent 2 hours on it, to have it figured out the second i ask for help lol ty anyways
Why does this not working with single selected villager
what does not work?
we can't see when you click without getting the desired result...
when i am trying to deselect single villager it does not get deselected
its always stays selected , if i try to select another single villager its now two that are not deselected , only way works if i drag and select multiple and deselect all
because it's in your selection area
oh you mean i need to reset start and end pos of drag box right ?
the last step, where you clear the array, move the clear array to the completed of the for loop
and check also if the actor is NOT in the array before selecting it
wait nvm
it won't be anyways because you clear that before
test this: select a single villager and try to deselect it, but HOLD the mouse button down to confirm that it selects it again when you release the mouse
i add some print string inside Started Then 1 for loop before setting it to false but it was never caleld
also array lenght is 0
because you clear it on mouseUp
yea that's more likely part of the issue
it's cleared once you release the mouse, and then it will be empty the next time you do something
okay so on button up i clear array and then do only check for inside the drag box witch if its not there is no logic added currently
I'd say the actually selection needs to be handled on completed, even if it's a single click. (no drag) Just check the start and end and if the distance between them is small (1?), just get whats under the cursor and select.
yes cuz now on started i add to array but on completion i clear array completely before doing anything
all sorted tnx for suggestion . How can i increase select range i mean now i have to press exactly on a villager and when they move its fairly hard sometimes
My interfaces keep magically being turned into custom events
also found that many other U.E. users have had this bug before, does anyone know what this is caused by?
A few things jump to mind but the main ones are either a load order issue, (unlikely if it's BP interface) or some naming conflict with another function or variable.
Do a small sphere trace where you click and use the result from that to select.
you mean this ?
Yea.
maybe a box trace, depending on your drag selection visuals
Not for the drag select though, just the single click.
yes but it doest seem to wrok click radius seems to be the same as with hit under cursor
Show how you've set it up.
Alternatively, if you want to get the HUD class involved, there is this node.
I have all my third person cahacter movement on the controller BP. Anyone know how to access the On Landed Event from a character controller?
Bind to the 'Landed' delegate i believe. There's also the on movement mode changed one.
Thanks! Giving it a shot!
Where would I do that, ideally? Already at begin play?
OnPossession most likely with you having it in a controller. That way, you can unbind from the previous character and bind it on the new one.
Check! It's working! Thanks a lot for the help!
how come tags is not listed where all variables are but still part of the actor ?
Hey, This is what im after this is "it", how do i need to navigate the "Parent Widgets to make this like this " ?
For the green arrows, it looks like a bunch of custom or explicit ones.
i just found the explicit one,... that makes sense
also if i have the window opened i cant focus anything but i need to pick up a new item then it allows the focus
should i use game mode input and focus directly ?
what could cause this
@maiden wadi i mean how do i controll the flow or something cant navigate at all it loses focus i can chose next or anything
i dont have that node :/ maybe it dosent work on ue5
If you're asking why they aren't listed in this section, it's because the Tags array is part of the AActor class and is inherited by any child classes. By default inherited variables are not listed here.
My ACharacter mesh still doesnt have the animaiton even after this, why is this
Is this a 5.0 bug or something
What's the best way to communicate between actors, like when an event is fired and each actors interested run different events, like Actor A run, Actor B jump etc.. I'm trying with interfaces but it only works between two actors, perhaps I need to mix things with delegates and gameplay tags?
Interfaces can work with any number of actors but realistically you can just have an event in the parent and cast to the parent and call that event. Then each child can implement that event however it wants
What do you mean by it only works between two actors?
Explain what you're trying to do, it sounds like the actors A and B should bind to a dispatcher that triggers them to do their own thing
The interface method would look like:
ThingThatStartsItOff:
Event -> for each loop over ActorsThatCare -> interface call on the actor
For example, if you wanted to navigate to Orange from Green. You would select green and do Explicit on it's Up direction, and then set the Orange one as the target. This is assuming the orange one is a userwidget though. If those are individual buttons then you would instead set the explicit to the first button in the orange area. If it is a userwidget and you're explicitly setting focus to it to let it handle it's own focus, then the userwidget needs to allow focus setting, this is false by default, and you also need to override OnFocusReceived, to internally set that to the first button.
Hello, I came across a strange behavior in which the EventTick-Event of a "Child Actor Component" doesn’t tick in the packaged version of my project.
So here is the Setup:
- Create a new Map
- Create an Actor A and another Actor B
- Add the Actor B in Actor A as a “Child Actor Component”
- Add PrintString in Actor B’s EventTick-Event and let it print a message each tick
- Add Actor A into the created Map
- Now, create another, 2nd map (in my case World Partioned)
- Drag and drop the 1st map into the 2nd map as a child map
- Now click on “Platforms > Windows > Package Project”, don’t forget to set the 2nd map as the entry map in the ProjectSettings
- Now start the compiled, standalone project and watch out for any PrintString messages
In my case for my project PrintString doesn't print anything which leads me to the conclusion that this specific setup prevents the “Child Actor Component” to tick.
This only happens in this specific case of an Actor placed in a Map which then is placed in another map, and ONLY in the packaged project! So when I place the Actor A into the 2nd (Parent) map, everything works fine again as well as in the Editor itself when I leave everything untouched.
Is this normal? Did I do anything wrong maybe or is this a potential Bug? Maybe I missed a Setup for this kind of Setup?
yeah thanks, im having so many issues with this... that part i udnerstood but dosent work as intended
the children inside that wont the also go to explicit even if they are in row 2,,3,4 not the first top row ?
y
Hmm. I don't recall specifically off hand. Maybe they do. I didn't use a lot of explicit. Most of mine was Custom functions in Red Solstice 2. I think I have a little over a hundred or so total through the game. 😄
Or, Custom Boundary mostly. Cause I wanted to do things when navigating towards the boundary.
Interesting if explicit doesn't work at boundary... Could be worth an engine PR to add an ExplicitBoundary if that is true.
If I call an event with interface to the actor with the code it works but I have some other logic inside another actor who I want to fire at same time
Yeah this is normal with Events, even interfaces. What Adriel said tracks though, you sound like you're looking for a dispatcher.
I have a ship where during sailing send some events to other actors and to some components of the ship itself, and I'm trying to do some best practices reducing hard references
Perhaps using interfaces + gameplay tags I can get what I need
use a dispatcher
make dispatchers on the ship
the things that care can bind to them
the ship doesn't need to know or care about who is listening, it just calls OnSeaStateChange or OnRanAground or whatever
I was/still using lot of dispatcher using get actor of class of the actor - call the event, trying to find a better method to have things more orrganized
A common dispatcher you already use is stuff like Event Hit or OnBeginOverlap
the thing generating the hit or overlap doesn't know or care who's bound to it, it just says "something happened, do what you want with that information"
the bits and bobs will need to have a hard ref to the ship class but that's fine, the ship is gonna be loaded by definition anyway. They can know about MyShip, the ship doesn't have to know or care about them
@faint pasture yes that's the part who was most confusing me using interfaces, where to get the Actor reference.. looks like it's easy when using a line trace or event overlap to get the reference to the Actor
That's another monster to understand... if some Actors like a ship or a vehicle are constantly loaded and doing stuff, isn't better to have a hard references? I'm not sure what are the safe rules to follow
Something somewhere is adding the part to the ship right?
that's when the part should know what ship it's a part of
or if it's in editor, begin play, get attach parent actor, cast to ship, set MyShip, bind to dispatchers
"get attach parent actor" that's new to me! cool!
Thanks @faint pasture I'll give a look 👍
How do I change the current/absolute position on a Cine Camera Rig Rail in runtime as it's playing? If I try setting the variable, it just flickers for one frame. Also tried turning play off, setting the position and turning play back on. The moment the play is turned on, it just ignores whatever value I set.
nvm I got it working. Just need to set the drive mode to manual first, then set the position and then set the drive mode back to how it was.
where am I going wrong, I am trying to set the "orbit center" of a spring arm under where the mouse cursor hits on the body
I made this collision box that reacts to the channel
since the trace occurs in worldspace i subtract from the mesh world location which should give me the local location, but it doesn't
so I assume my brain is fried
ok I restarted the editor and it works, uhhhh, I did revert my map changes hmmm
maybe rotation issues
I see, I need to have the actor rotated at 270 degrees since I rotated the mesh to -90
so uhhhhh this approach is flawed, any good approach to zoom an orbiting camera towards cursor location in local space?
If i have a fname-to-struct map, how do I change the member variables in the struct? I tried a janky set array elem but it doesn't seem to update the data
or are structs immutable or some shit?
When you're getting the Keys or the Values, they're always copies. You'd have to add the structure back into the Map again if you want to update it.
Its stupid but I ended up removing the key-value pair from the map, and re adding it to the map again lol
order doesn't matter here tho so its ok
Its not needed because Add will overwrite the value of the key if it exists. If doesnt exist then it will Add it as new key+value.
oi, were you ever able to get this figured out? I want to make something similar where you use a plow/seeder/fertilizer etc to change states of the ground for farming, but there's basically no info on that online, all results are just for tile-based placeable plot systems 🫠
I know Ranch Simulator added it recently, and they're using UE5, so I know its possible, I just need to know how they did it so I can recreate that for my own needs
No, I'm just asking about a specific system within a game
I'd start with something analogous to a heightmap
some bigass array of data that represents the state at that XY coordinate
For something as big as Farming Simulator it'd have to be chunked and probably have all sorts of optimizations but at the end of the day it's just a data structure and system that lets you read and write data corrosponding to some XY coordinate
A heightmap has a Z for every XY
You want a GroundPlantStateStructure for every XY
Probably jamming all sorts of data into as few bits as possible
OwnerID, PlantID, Fert value, row yaw, growth value, etc
probably in a SoA layout instead of AoS so it's very fast to iterate over to generate ownership maps or fertility maps
FarmingSimDataStructure
TArray<int> Ownership
TArray<float> Fertility
TArray<int> PlantID
TArray<float> Growth
int XSize
int YSize
float CellSize
So the above makes a ton of assumptions about your game but is an example solution
if you want something detailed you will have to break it down into what you want and what your game currently is
sorry, I download a paragon asset but it seems broken so I want to re-bind these event with default manequin. Can I just copy these and paste in the paragon pawn bp to make it work?
that should work yea, I did that before for an outdated asset and it worked just fine
sadly, mine doesn't budge when I try to rebind these 😦 I suppose it's due to the event it's using right now?
EnhancedInputAction IA_Move, it's for the manequin.
How do I use these as inputs for my characters. It seems not running even I try to reproduce from watching youtube.
Why does creating an AnimInstance asset via the "BlueprintClass" menu option not function the same way as creating one from the "Animation" menu option?
Seems to work the same for me, the only thing it doesn't do VIA the blueprint class method is prompt you for a skeleton until you try to open it.
Yeah
Are you sure you've set up your project to use the enhanced input component? Are you sure you're possessing a pawn that is also adding an input mapping context to the player input subsystem? Hvae you added the input events to that same pawn?
I imagine the blueprint class prompt creates a generic template, the animation prompt handles stuff specifically in order to work on that asset via an editor menu. It just wasn't obvious at first.
Sorry I'm new to this so I'm trying to figure it out. Thanks for the pointers 🙂
hi i have a small weird bug... I can kill things even when my axe is idel, just by touching them I immidiately kill them..
I have a notify state in my animation montage but im not sure how to use it now. I forgot how I did it. This my notify state.
So because I forgot how it works I invented a new method for tackling this issue...
So this is how im doing it
unfortunately these events here never get activated because its probably hard to find valid target I assume
so should I cast to my NPC animal characters from that notify?
my axe can attack NPCs and things like Trees.. (so far)
with trees it works fine, but not animals
so inside of my axe I've added this destructive collision sphere fire ball that will burn everything on its path (its attached at the sharpest edge of your axe)
also this is my end notify
If you want to reuse your notify state, then you probably want to call the "Animal Damage" interface after your "Chop" interface call and then remove the overlap check in your axe.
As an FYI the mesh comp refers to the skeletal mesh component. I would imagine the 'Unchop' wouldnt actually do anything.
Assuming you have some sort of equipment/inventory setup up, you can get the owner of the mesh component which would most likely be your character BP. From here you can use the get component by class to get specific types of components such as your inventory component t or equipment manager (depending how you've set it up) to get the held item for you to call stuff on such as 'Unchop'.
Datura's advice helped a lot, I actually didn't even need that cutting collision sphere on the edge of the axe cause I can just use this same notifystate for the chicken too, i realized the problem was that I wasn't using the choppable interface which is shared among all my trees pretty much
but I might need to change this interface and add a new one to seperate & add different sounds
cause I dont wanna play tree chopping sounds on every chop swing vs something
that means its not necessary to use this mesh component target?
I didnt know that stands for component, thanks
i thought it meant "Composition" or something like that
Yea, you could use the 'Apply Damage' event (callable on all actors) and pass in a custom damage type. The thing you hit can then decide what it does base on the damage amount and the damage type.
It depends. The mesh component is the only thing the anim notify event has a reference of in the world so is your access point to other things.
In this case it looks fine.
I have a base class that I'm checking for in a cap point. In it there's an enum for the team colour. In my spawner I get the reference to what is overlapping it via a cast to the base class, which should and does succeed if the actor overlapping is a subclass. However when I try to read the team colour enum for the the overlapping actor in the spawner, the spawner uses the base class enum rather than the instance of the subclass overlapping it. Is there something going on here that I'm not aware of or is my unreal just being strange?
Show how you've set it up.
are you able to join a vc? I can record a video if not
No, a quick screenshot would be fine.
ok, I might have to do a couple tho
sounds like I also need to get my health and stats the fuck out of the widgets and completelly change this system so that all these things are affected through components
and same for the energy level in the game probably
or things that affect your energy & power level
this is also kind of an RPG mechanic I think
energy affects how strong axe swings attacks can be for example vs the tree or vs the wild animal
🤔
Yea. I did a video recently for an oxygen system. You can pretty much do the same thing for all stats to be fair. It uses an actor component so the same concept could be used for things like health and stamina. It might give you some ideas.
oh nice I didnt know you have such a good youtube channel, im checking it out
got it working in the vc, turns out it was to do with how the actor was being spawned and had to expose the team enum on spawn and set it in the spawn actor node
Oh just to be clear, there's nothing stopping you from putting multiple stats in the same component. This can give a single point it can be accessed.
can Apply Damage also be used to reduce oxygen?
If you wanted, on the received damage event, you'd get the component and call reduce oxygen. (Or reduce health if that's actually what you're after)
I keep meaning to do a video on damage and damage types. Often an overlooked feature but people end up creating something that does the same thing. 😅
just wondering... at part 2 is the oxygen system series completed or will there be more videos?
I was contemplating another part where we do something when oxygen gets to 0. Maybe covering damage/suffocation. 😅 But I've not got anything specifically planned at the moment.
I think it hasn't got assigned yet, but I don't know where to look at. In the blueprint of the pawn, I already set the IA_Move.
You need to get the enhanced input local subsystem from the player controller and add mapping.
As a pro tip, splitting inputs into different input types such as locomotion, camera and interaction can be useful as you can add and remove them at runtime as needed.
Input actions will only trigger if the IA is on an applied mapping context.
if i wanted a ui where players would select a team by clicking a button, then the host presses start, would i do this logic in the gamemode? or should i have the teams made prior to starting the gamemode
current logic (not sure where to continue)
my widget ^
I want my AI move randomly, I set up this and print the succuss log and different locations, but the AI position doesn't move at all, can't figure out this issue
The acceptance radius is way too large
Also instead of a timer you should probably call Random Wander when the AI Move To node succeeds or fails. Otherwise you might interrupt a not yet finished move
I change the node to move to location or actor. It looks work
The issue you were having is because your random point within 5000 units was always within the acceptance radius of the move (5000 units), so no movement was ever required.
Another way of putting it: I am at a spot, I choose some random spot within 5000 units that I'd like to move to but I'm ok with being somewhere within 5000 units to that location.... Welp, I'm already within 5000 units of that location, so I don't need to move.
Anyone know how I could handle having my npc pets continue its blueprints when the player travels to a different level? Or maybe I could just keep the level persistent and have others levels get loaded far away idk…
I’m trying to make it so that the player’s pets at home continue their scripts/blueprints autonomously while the player goes to a different area like a town or something.
On top of that I’m trying to figure out how I could have the players pets follow them!
My current thought is that I just don’t unload levels that have pets active in them but where would I put the other maps? Thousands of units away from view? My last effort solution is to just have the game instance save EVERYTHING like variables and positions the pets are in…
Any guidance appreciated!! ^_^
Depending on what you want from your pets, you can "simulate" your pets doing things rather than having them actually loaded as full-on actors. If there was things that are meant to happen over time, like say, their hunger growing, you can store the last time you were with them and what their hunger value was, and then when you return, calculate the difference in time, and determine how high their hunger should be when you see them again. When you return you can simulate them doing different things while you're away as well, like if they knocked over a plant or something, you can give it a % chance based on how long you were gone and some behavior metric they may have and then when you return you roll to see if it should've happened or not.
This function only exists within this blueprint? It's not inherited?
I copy pasted it, and even when copy pasting it again it still has this behavior
Have you restarted the editor?
nope, I probably should of done that instead of copy pasting the inside of the function unto a completly new function
Can someone help me, I've been stuck on this all day. I'm trying to get a specific animation to play when my character has double jumped. The Variable "Has Double Jumped?" is setting to true and false when I want to which I know because of the print string, but when I try to use the variable in my Animation blueprint in the New State Machine so it activates the animation when true it never activates or prints the string? I also do have the variable set to public
You've really put a lot of thought into this huh 😏
Great advice!
I'd probably just use a montage instead with it being event driven. You'd just play the montage as soon as you double jump.
If you need to stick with it being in the state machine, you'll need to look at the different states. If the character isn't in the state that can transition into the double jump it could get missed/skipped.
Also, it can be worth having the animBP fetch the value at the start of the tick and store a copy of this.
Hello there! I'm facing an issue while compiling my game using BuildCookRun : a Blueprint for one of my widgets gets a variable in its OnConstruct from my custom C++ GameInstance class. While packaging in editor, everything works fine, but BuildCookRun leads to this error :
Oh, sorry for the transparency issue, wanted to translate some of the names:
Would any of you happen to know why? Thanks!
As a guess, the variable was either deleted or renamed and there's no redirect for it. Have you checked the widget in question where it gets the variable?
Also #packaging for packaging specific questions. Folks over there might be able to provide better help.
Well, I tried with a new variable and that leads to the same problem. Will ask over there, thanks and sorry!
How to expire the projectile bullet correctly?
I use destroy actor but it seems not work
This is my inventory system, it works fine and how I want it to, however, I'd like to make it so that when the player hits next page, it replaces all the buttons with the inventory items over 7 indexes, any ideas?
im trying to restart the level when this event is called but its not working anyone know why
Use this to get the level name.
i tried that before but it didnt change anything
ARK did this on a basic level. 😄 They fixed it, but there used to be a bug with that. Ignore a base for a few days. Come into range, get spammed with things dying due to hunger even when they had a full thing of food nearby.
omg this was all my fault, I can't believe I spent so long trying to figure thiss out. I messed up and didn't realise cause I accidentally set it in the new state machine to go from double jump to land when double jump animation had 30% of it's animation left. It's always the most silly things omg
Did you get a message in the logs that stated the level doesn't exist?
Also I had to do a work around by using "get air control" Instead
It's very difficult to follow whats actually happening. I also have a feeling that what ever is happening with the stepping branches could probally be put on a forloop to make it easier to read.
does it have to be called in the level bp or can it be called anywhere
That doesn't answer my question.
I need to find a way to basically get the next 8 indexes
I would spend a little time cleaning up what you already have, reduce the empty space and provide some new screenshots.
maybe a montage could be better suited for this
Well I got it semi working by using a get gravity scale node in my anim bp, but the problem is the animation always plays? I have it hooked up to a Less than node with gravity scale having to be less than 1 to be true. After the double jump the characters gravity scale gets set to 0.8 and floats back down. I even have a print string to tell me what the gravity scale is so I know it is going below 1, but the animation still is play whenever I jump at all, not only if it's below 1
hey,
so I have a vehicle with 4 door, which can be opened. as i need to update the collision i added it to the door bones. but now the bone simulates physics and it looks like this. anybody knows how to fix this?
This is about as clean as I can make it, it looks a lot but all of the branches on the right do the same exact thing except gets a different numbered button
You can replace the branch chain with something like this.
hahahah yeah just like that
That looks good but I want to limit it to 8 slots per page, If I do it like this it'll go over the 8 threshold no?
If you want it to do exactly 8 entries then you can do this. I don't know enough to know if the other work work fine.
So I can essentially get rid of all of this and just use that?😅
Pretty much but actually you might want to actually include the break version. 😅 You just break when you've done what ever you need to do if it's empty.
Wow haha alright, this will defintely make things look cleaner
Strings. Strings everywhere. 👀
This is what is called an anti-pattern. If you ever find yourself doing something over and over again with only very slight changes in blueprints, you probably want to rethink how you're approaching your solution to your problem.
Yea Item ID's should be names.
Thanks guys, I'll update this now and keep it in my future practice
For the other sections where you get a different text box and what not, use a select node. 😉
For the bit which determines the categories?
I do just want to clarify that this is just to tidy up what you currently have. 😅 I assume these are the individual item entries for the items?
This is how it currently works
Even better would be if the text fields were generated at runtime so you don't have to populate a gigantic select node like that either... The more you can do programmatically the better as that means not having to modify it later if you decide to add more inventory items later, you just add more items and then "It Just Works™"
As a little tip, avoid setting values on things from other things. This makes debugging a pain in the... It's far better to make setter functions that get called and you pass the data in and the thing handles what it should do with it.
So if you make each item entry it's own widget, you would have a function called 'UpdateItemEntry' and you pass in the item data. The widget would then decide what it does with it. Whether that's updating a text field it owns or updating an icon image.
Another thing I sometimes do if I have to manually build an array is actually make a getter function for it. Then everywhere uses the getter function so if I need to add a new entry I only have to add it in one place. Granted I try to avoid ever needed to do this. 😅
So this should work in appose to the large version I made?
No, it was to only replace the branch section onwards.
So after this bit on the true.
the first branch?
Second.
Got you, so would I no longer need this bit if I'm bringing up the data table further on?
Ah I would because thats checking the item category
It was to replace whats in the green bit.
I notice your for each loop has the first and last index, is that relevant? as mine do not have those
The last index should be 7 if you wanted a fixed amount to mimic what you had previously.
These are different nodes. "For Loop with Break" vs. "For Each Loop with Break"
Yeah my bad I just noticed that
so how does it determine which index to insert?
as it's not getting the inventory array
That was up to you. You said you needed a limit of 8.
Ah okay I'm following
Personally, I would just populate an array with the item data that meet the category requirements then you can just get the relevant ones from the list so from 0-7 or 8-15 etc....
Is there no way to make it do that automatically? or would I need to calculate the max possible items the player can collect, then do the math to see how many 8's go into it in order to figure out how many pages to create
For the page numbers it would be the ceil of the elements in the array / 8.
For the indexs you get from the array that would be based on the page number. (N) So assuming we start from 1 (instead of 0).
Starting Index: N-1 * 8
Ending Index: (N * 8) - 1
I'll give that a go, meanwhile thanks for this, looks so much cleaner now and works the same lol
each loop is a crazy tool I need to get used to haha
hi. i need to clamp between 0 and 99999999
i can use clamp.. but i think there's a thing that does that.. clampwith 0 but no max??
the simplest thing you could do is check if its less than 0 then set it to zero if its true
num > 0 --- select (num, 0)
Leave one at 0 and connect the other value and it'll choose the highest value. Clamping to above 0.
I tried following what you said mixed with some gpt help as my math is awful but I cant get it working, can you see why when I hit next nothing happens?
I've highlighted the stuff I've changed since last message
I would do something like this.
I am trying to store TouchInput Data into a Variable Map but it look like UE has issues with Map indices.
map entries (Finger Index and Location) get added and removed by touch press/release and entry indices increase/decrease
0,1,2,3,4
but this only works one time. after releasing all fingers and putting them down again, the index is messed up:
0,1,0,0,4
also tried clearing the map, before trying a second time - same behavior...
So I should use an add instead of insert?
If you want to go down a similiar root. I've not tested what I've provided but logically it should work and simplify things.
So you create a list of all the items that match the category. Then when you change the page, you don't need to update the list so you can just update based on the new index.
I don't think this has anything to do with maps. You can't have three 0 Keys in the map. That's just overwriting it. Which means the first press is running touches 0-4. The second one seems to run 0-1-0-0-4
Where would I put these events?
Is 1 event supposed to go on page down pressed?
So if you change the category, then you would call the Update Items.
If you just change the page, once you've updated the number you can all the refresh items.
How would I update the number?
As in the page number?
the number I'm supposed to update as nothing is happening with this new code so I pressume that might be why
I would agree, but thats whats the console is returning when also printing the Touchindex:
to me it seems like unreal is having trouble with adding a key value which once got removed
Hi,how do i check the x velocity and y velocity at the same time?i want the character to play walk animation when its velocity is greater than 0
it works fine when only at x velocity but how do i do this with both?
i tried xy velocity ,maybe i made it the wrong way
So when you change the cat, also call the update items function. (Possibly reset the page number as well)
When you press the page down or up, modify the page number accordingly and then call the refresh item function.
Also, on the update items function, at the very beginning, just clear the array so you don't get duplicate items in the list.
thx!
It's finding it fine, it's your expectation. Maps are not kept in order. Lets pretend your enums are integers for a sec and say you have added 0-4. You have...
0-1-2-3-4
If you ask 2 for it's index you're going to get 2.
You remove 2, you now have
0-1-3-4
You add 2 back. Your map keys are now
0-1-3-4-2
if you ask 2 for it's index you're going to get 4.
Bro I'm so confused 😂
I hate math😅
i rigured that out
somehow i dont even need it
you are right, its all there but not like an array in a consistent order...
You hate math and you chose gamedev as a hobby? 👀
In all fairness I hate academic math too, but I loved learning it when in the context of learning programming.
Haha I love game deving, building mechanics and watching results etc, but I hate the + then divide then multiply etc, it gets too complex for me 😅
You just have to learn to visualize it in order. I had the same issues with vector math early on, I still find myself holding fingers up to visualize points in space and mimicing how math functions affect them.
Not much different with other number types either. Less about the actual math itself and more about understanding what it's doing to the numbers.
vector math is complicated if nobody thought or showed you 😛
but it helps playing around with it
adding bunch of draw debugs if need be, to understand the relation between two locaiton vectors and their direction vector etc
Gets better over time tho 😄
Question: I made a tweak to a blueprint where it is doing an operation during construct that is now breaking the editor.
My editor is compiled from source
I can delete the uasset out of the project.
Is there any particular change I can make to be able to edit that blueprint without letting it do its construct operation?
Hello, i have an interaction system that requires position history from 2 actors (one of which does not change and is controlled by the player), does some calculations and send back results to both actors.
I was wondering what is the right way to approach this from a performance perspective. Should i have a "manager" actor pull data through interface or reference and send back result, or have all the logic on my "pawn" actor?
If i use a manager, should i have each actor keep track of their position history and store them in variables to be sent in a message or have the manager do it internally for all concerned actors?
In the event you save the asset with blueprint code that causes a crash on evaluation. You can turn off PreConstruct evaluation in the Widget Designer settings in the Editor Preferences.
p.s. version control would be the answer if this is something that can't be toggled from config files
what are the best way to stop Behavior tree
Yes, I would probably make a controller for something like this - depends a bit on what exactly is using the information, for what. If it was like a Radar, I might let Radar take care of the show.
Performance angle doesn't seem that critical assuming the ticks are lightweight and the data is not huge
just use the clamp node, what's the problem?
Oooh, very useful to know.
VC: I do have version control. Interestingly enough I grabbed an earlier version of the uasset and it also causes problems. So I am rather perplexed. I'll try turning off the preconstruct evals.
I'm wondering if like there's a built up memory leak that has corrupted other assets of the project.
Thanks for the help Karma!
If it keeps crashing ( with unreal crash window ) you will want to get a proper stacktrace by installing editor symbols from launcher options
is this good way connecting nodes or should i create new calls ?
for pure functions or getters it doesn't matter
it's all the same
I prefer to have everything local to the executable node so it's just 1 thing and don't have wires all over the damn place
tnx
Are those under Editor-Widget Designer (Team)?
I checked under User Interface as well as searching for PreConstruct/Widget/and similar terms.
Not seeing anything that implies it affects PreConstruct evaluation. I also found the UUserWidget remarks you were referencing.
I'm on UE5.2, wondering if that might be the source of not seeing that.
how to make node like this ?
Right click an object based ref and convert to a validated get.
tnx
I believe they're talking about this
idk.. trying to learn.. trying to optimize
This is my inventory system, does anyone know how I can make it so that the commented bit doesnt get the whole inventory, but rather inventory items that match the active category?
Alright. I need a math wiz for this one... I'm trying to make a couple of little retro game clones (Asteroids, Joust etc) that should transport the player from one side of the screen to the other when the player goes off of the viewable screen. I want to be able to calculate this dynamically based on the player's screen size but I'm not sure how to find the screen edges in world space.
Ah, I was in the Project Settings not the Editor Settings.
Editor - Widget Designer (Team) made me think I was looking at Editor settings.
Thanks!
Your items should be probably struct with variables like Category. When you put item in inventory, these should be struct with variables like ItemName and Category. Then you would Get All Items that are inventory (array) and for each get their category, when category that you want to check matches, you get that item to the array of items found.
I made a class from object, and now my project hangs on launch
Did I go real wrong somehow? I was trying to replace references though
Hey guys how would I implement a system where when the player level up they have a choice of 3 upgrades to pick from.
I'm happy with how it is currently, I only need to make it do a check on category
Is it safe to make a custom type to write into a save game file?
Start by learning UI basics, implement a generic 3 choice menu that allows you to dynamically setup images / text, the rest is self explanatory. If you have no experience working on UI I would first consider making a simple menu, then attempt this.
I have experience with UI, Its more the issue of the leveling up the UI not displaying correctly...