#blueprint
1 messages · Page 273 of 1
What is the good practice for widgets? What should I do after adding the widget to viewport when it's no longer needed?
Sorry, it’s possible that I misunderstood something in what you’re trying to explain so clearly, but not everything sounds clear to me. I might have also misled you with my response, or perhaps I didn’t fully understand it myself.
BP_EnemyTemplate has an Attack interface, which exists in BP_EnemyTemplate, and the function itself is implemented in BP_EnemyTemplate. The Attack interface is part of the AI behavior tree, as shown in the image below.
I’m not able to remove Attack, as it’s an inherited interface (if interfaces can be inherited—I don’t remember adding it manually to BP_Skeleton), and it’s called within BP_EnemyTemplate.
The function responsible for the animation override is PlayAttackAnim, which I call in CharacterTemplate and connect it to the Attack interface in EnemyTemplate.
Here is the attack interface, the non visible node is just a string print.
Here’s an example that makes the animation work for me: (Instant of playing fuction Play Attack Anim on BP_EnemyTemplate I play it on BP_skeleton
Play Attack Anim - Fuction that is rensposible for animation ovveride, it is that fuction:
but the goal is to make it work for interface in BP_EnemyTemplate
not in the BP_Skeleton, in the skeleton I just want to choose what animation I want to ovveride, so in the future i just can choose any other animation for diffrent enemies that will inhirate from BP_EnemyTEmplate
Sorry for the spam and I hope thats help!
Call RemoveFromParent on it and set the pointer to it to null.
GC will clean it up then next cycle.
thanks, I'll give it a try. currently something is not working as it should and it looks like the widgets keep multiplying
You are overriding Event Attack in your BP_Skeleton.
Like, it's visible in the screenshot.
so when the widget animation is played the second time I get "removed widget" print twice
Hard to tell with just that code.
RemoveFromParent will only Deconstruct the Widget. It will be fully destroyed by the GarbageCollector if you ensure that all references to it are nulled.
As long as you have reference to it somewhere, it will stay alive.
yeah.. that's a problem.. shit
I wish I could get a better screenshot of the code but graph printer hasn't been updated to 5.5 yet
This is breaking it. You are overidding the Attack event in BP_Skeleton. You need to delete it on the left side.
Currently your BP_Skeleton basically says "Use my version of Event Attack" and that version does nothing.
Damn thats it? THANKS YOU BRO 😭
If a Widget only lives in the WidgetTree, so only added to some other Widget panel and not actually referenced somewhere else, then RemoveFromParent would be enough.
Yeah sorry if that was a bit too much text. I wanted to write it down like this so you can basically follow your own setup once more.
Or the tutorial's setup fwiw
I still have some trouble understanding interfaces. Did I add this interface myself, or was it inherited when I inherited from the EnemyTemplate class?
You could also rightclick the Attack node on the right of my altered screenshot and click on "Add Call to Parent", which will give you a slightly differntly colored Parent: Attack node, which you can connect to the Attack.
But that's a bit redundant if you don't do anything additionally.
This isn't necessarily an Interface problem.
I'm setting the widget reference on begin play, should I nullify it when the widget is removed from parent, and set it before it's played?
(F) FadeInScreen is a custom event from within the widget blueprint that only plays the animation for screen fadein/fadeout
Inheritance allows Child Classes to override Parent Class functions. Also Grandparent etc.
In C++ it would be limited to functions that are marked as virtual and that are at least protected and not private.
In Blueprints it's usually all public and virtual internally, so you will find a lot of functions in the Override menu of the Functions Tab.
Now it doesn't really matter where the Event Attack comes from. In your case, BP_EnemyTemplate got the BPI_AttackInterface (or whatever it is called).
The Interface acts as a Parent Class, just that it itself can't define any Functions or Declare any Variables.
It can only Declare Functions which other classes can then override.
In that case, Attack can be overridden by BP_EnemyTemplate, and you also did that to call PlayAttackAnim.
But now, based on what I said about Inheritance before, Child Classes of BP_EnemyTemplate also inherit from BPI_AttackInterface and can thus override Event Attack too.
@ocean helm
I hope that makes somewhat sense. If not, then it might be worth googling a bit for Inheritance in general.
Even if it's a bit of code involved, the examples are usually simple enough.
Override Menu I mentioned.
Might need you to hover the underlined FUNCTIONS part of the UI to show.
You'll find lots of other functions there too that your BP_Skeleton can override from the Parent Classes (in this case Actor, Pawn and Character)
This definitely explains a lot to me. I learned some of C++ before Unreal, and I came across concepts related to class accessibility, although I didn’t practice them very well. I understand what you’re trying to convey. It makes sense now! Thank you so much! I’d be grateful if you could share your PayPal, so I could send you some money for your help, even though I don’t have much to spare. I can even add you to the game credits if you’d like. 🥺
Bah, save your money. I have a day job I earn money with. Don't worry.
You pay me in learning new stuff and having fun.
So...
Why are you even trying to remove the Widget?
The code looks like you are trying to reuse that.

You are never recreating the Widget after all
Like, you can remove it from parent and then later call AddToViewport again when you need it fwiw
But there is also the big problem of your code with that delegate pin
What exactly is that doing?
Oh that's an Engine function
You are binding tons of times
yeah. basically
When the binding calls back you gotta unbind!
I didn't know that it's fine to leave the widget after it finishes playing
I mean, that's just your own custom Animation after all.
for some reason I was forcing myself to remove it
You can leave that widget there forever if you want.
You also don't need to remove it from the Viewport if it's otherwise invisible and not blocking input or so
It probably doesn't hurt removing and later readding it
But either way you gotta unbind if you aren't destroying it
Or, well, if you aren't clearing the ref to have it destroyed.
But to answer your question from earlier: Yes, you'd need to set that reference back to null if you want the Widget to be cleaned up fully.
hmm
RefFadeOutWidget that is
I'm thinking what's worse, leaving it invisible until it's needed again
or having to reference it every time I try to play it
If you can ensure that its visibility is set to Collapsed and you set it back to HitTestInvisible or so when you actively want to show it, then it would be fine to keep it
Just to avoid you later wondering why you can't click on a button
Due to that thing overlapping in some way
I mean, ultimately, it probably doesn't matter too much.
might as well just set it up now
Then I need to save you in my contacts so you can receive a free copy of my game. Let's see if all these years of learning game development-related fields will pay off! I won’t clutter this channel anymore, not wanting to disturb others. If I can help with anything, feel free to reach out to me. Ciao 🖐️
that's basically all this does
You'd do it something like this:
In EndDay you either do:
- RefFadeOutWidget->SetVisiblity(SelfHitRestInvisible)
- RefFadeOutWidget->StartFadeOut()
or
- RefFadeOutWidget->AddToViewport(..)
- RefFadeOutWidget->StartFadeOut()
or
- RefFadeOutWidget = CreateWidget(..)
- RefFadeOutWidget->AddToViewport(..)
- RefFadeOutWidget->StartFadeOut()
And in StartDay you'd either do (matching the numbering):
- RefFadeOutWidget->BindAnimationFinished
- RefFadeOutWidget->StartFadeIn()
- OnAnimationFinished:
- RefFadeOutWidget->SetVisibility(Collapsed)
- RefFadeOutWidget->UnbindAnimationFinish
or
- RefFadeOutWidget->BindAnimationFinished
- RefFadeOutWidget->StartFadeIn()
- OnAnimationFinished:
- RefFadeOutWidget->RemoveFromParent()
- RefFadeOutWidget->UnbindAnimationFinish
or
- RefFadeOutWidget->BindAnimationFinished
- RefFadeOutWidget->StartFadeIn()
- OnAnimationFinished:
- RefFadeOutWidget->RemoveFromParent()
- RefFadeOutWidget = null
That's kinda all there is you could do
It all more or less results in the same.
is there a simple way of determining if widget anim finished playing?
OnAnimationFinished
I mean you already bound to the simplest function
I guess I need to add something to my example
Hi all, I have a Blueprint character that has animation montages and Anim Notifies. I need to duplicate that Character to create a variant(different mesh, animations, etc.). Since the Anim Notify casts to the original character BP, Do I have to duplicate all of the Anim notify and manually cast to the new duplicate everytime I create a duplicate? This seems tedious since I have a bunch of Anim Notify. What is the best practice for this scenario? This is for my Enemy Characters which will have different animations But will have the same functionality.
Your enemy character and your character should derive from the same base class
You can then just cast to the base class.
You probably should use component to handle your combat. Then you can just get the component for the anim notify.
@tropic peak Altered the list of possible options a bit to include the delegate binding stuff.
You almost never ever want or need to duplicate a Blueprint.
That's what Inheritance is for after all.
- BP_Character_Base
- BP_Character_Variant1
- BP_Character_Variant2
- BP_Character_Variant2_Spec1
- BP_Character_Variant2_Spec2
Etc. etc.
sorry it's been a long day for me and I'm running low on brain fuel, and my daughter is distracting me
- the widget is set to not-hit testable, so do I still need to do anything with the widget's visibility?
You set it to not hit testable when making it visible, and to collapsed when hiding it.
thanks
If you choose to go with the visibility way of handling it that is.
I'm beginning to understand how I should tackle it. Thanks @surreal peak , @frosty heron For some reason my mind went to duplicate the blueprint when prototyping and I as saw I, created a bunch of issues. I should definitely have a parent class for all the enemies who have similar functionality.
Yeah, never duplicate. There are only very rare reasons to duplicate. I'm pretty sure I haven't duplicated a Blueprint in.. probably years.
DataAssets and such, that's something else of course.
one last question. Is this correct? (bind/unbind)
Looks correct, yes.
If you don't want to have those ugly noodles there, you can also make a delegate (called EventDispatcher in BPs) in the Widget itself and call that from within your Widget when the OnAnimationFinished stuff called back.
Then you can bind to that directly on the Widget instead of always grabbing the animation.
Also there is the "CreateEvent" node that you can connect to the red pin of the Bind/Unbind nodes
That will give you a dropdown to select what you want to Bind/Unbind
Removing the Red Wire to the Event itself.
yeah i'll fix the mess later, just wanted to know if that's the right way 🙂
I'm still not too confident with this, it feels like I don't understand it correctly
Best to just ask what you don't understand.
Remove from parent does nothing
@ocean helm Don't take it the wrong way please, but "Friends" on my Discord account remain actual IRL friends :P
RemoveFromParent removes the Widget from whatever it was added to.
There is basically some huge "Tree" like structure, the WidgetTree.
Each Widget having Slots for other Widgets. Viewport being, to keep it simple, the Root of said tree.
UE will render only the Widgets in said Tree.
hmm
If you add to the Viewport, or to any Widget that is already part of the Tree, it will be rendered (unless Collapsed)
yes that makes perfect sense
If you call RemoveFromParent it will be kicked out of said Tree again.
If you go with the Visiblity route, so calling SetVisiblity, then you'd replace the RemoveFromParent with SetVisibility(Collapsed)
Aka keeping it in the Tree, but marking it as Collapsed so UE doesn't waste resources on figuring out how big that Widget is etc.
one minute please, I'm a slow learner 🙂
I'm at the event dispatcher part. I'm familiar with the concept, but haven't used it enough to remember which option does what (call/bind/event/assign), and how to reference it from another place - eg. widget bp
Hello, If i use: "Set Time by function name" with a loop.. That will execute the function endlessly... is there a way to stop a timer? or it's something that we have to control with Branch?
clear and invalidate timer by handle
Set Tiimer by x nodes return a timer handle reference, from which you can stop/pause/start it from
Anyone able to help me with when I do get user widget object from a widget component on my actor why i'm getting none when I try printing the object name ??
i'm doing this on begin play
the widget is valid as well the gets created
and the class is valid
EventDispatcher is a Delegate in C++.
Delegates are something like a Newsletter. Others can register to it (Bind), unregister from it (Unbind) and will get notified when the thing that owns the Delegate broadcasts the news (Call).
Assign is just a fancy Unreal action that automatically creates a CustomEvent for you. Just convinience if needed.
And "How to reference it from another place" is the same as with all other properties of other objects.
You are already doing exactly that when you are binding to OnAnimationFinished.
You just need a valid reference to the Object.
oh right.
Does it return something other than none if you delay the print a bit?
I wonder if the BP calls BeginPlay before the WidgetComponent creates the Widget. Even if it's just a frame.
doesn't seem so just returns none
But I doubt, cause I accessed it on BeginPlay before.
Can you share your code please.
whether i call it after 1 second or streight after the begin play
perfect! thanks, that's true, sometime we don't se the return node 😄
So, something like this?
so the begin play is to the left
I've checked and the rvm cast works fine
it's both the cast of the widget object fails and when I check what widget object was there it's none apparently
i've checked as well that the widget class is matching up with the one being casted to
That's the "CreateEvent" tip, yes.
thanks, I'll try the other way now but it's probably going to take me a moment
Sure
Hm..
The Cast failing if the Object is null is normal.
So the better question is why is the Object null if you expect it not to be null
thats the confusing bit
the widget derives from UUserWidget
and it is set and the class for the widget component which I've checked and the widget is there when I enter PIE and it shows etc
Wild Widget Class name btw
What does GetRVM even do?
Given you are in the BP that has the WidgetComponent on it, why the getter?
it's train sim world
it's getting the model actor as all the data lives there
but the widget is living on the view actor
it's just according to editor it sees the widget object as null when it defo isn't
The thing is
This specific Getter can totally return something else than what you think
And without us seeing what exactly that is doing, it#s hard to help.
You could be setting the Widget Class on Component X but you get Component Y
If you take a simple Actor BP and you add a WidgetComponent to it.
And you set the Widget Class in it. And then on the BPs BeginPlay get the Component and get the UserObject, it should be valid.
If that simple setup works, then your GetRVM thing returns something wrong maybe.
so ignore the getRVM
the widget component lives on the RVV which is that graph you see in the screenshot
we're getting the widget component into the graph from the component list like normal, getting it's user widget object so it can be cast to
the bit which we can't get why is the widget cast specifically fails and return none for the object name of what the user widget object returns
sorry to sound abrubt there
Casting is just a type check. If you feed empty or not the same type the cast will fail.
You can just print string the object to see the type.
Unless you have bp corruption, the computer wouldn't lie.
thats what I thought i was doing in that screenshot
And what does it print?
Yeah the problem is, @frosty heron , that Ryan says the Widget Class is set and the Widget is visible when playing.
So either there is a strange bug, or the Widget that is visible is not from the Component that they get the UserWidget from :P
ok this seems to be very wrong.
Yeah I want to point out that it's probably is null and he maybe looking at widgets from different instance, not the one where the cast is failed.
(that's from within the widget bp)
and the time manager BP
from what I understand I want this ED to trigger when animation "FadeIn" finishes playing
Looks wrong
Yeah pretty wrong haha
Why are you binding fade animation complete on fade animation complete function?
I will show you an example
You want to bind before you finishes your animation.
You should set alarm to work before work started.
Setting your alarm after work started is pointless.
uhh
okay I thought it works a little different
okay it's a tricky one all around no matter how I look at it I'm sorry
if I wanted to do what you just said I would have to stick this behind the play animation (after the fadeInScreen event)
but then
well this is what I thought but I can't think how if the widget class is set how another type of widget would be created
that to me doesn't sound like how a widget component works
god this breaks my brain in so many places right now 
@tropic peak you can set the alarm anytime that make sense.
On construct or begin play is fine in this context.
Is there anything between the entry/exit points and the room actor root component?
If the component layout isn't:
Mesh
Entry/Exit point
Then youll need to modify the relative transform calc
it's more of a "where do I put my event dispatcher nodes" kind of thing
@tropic peak

Maybe this helps a bit more. idk
there's a "play animation with finished event" node..?
how do you constrain a playable character to another object while keeping movement enabled?
Yeah, that wraps the Delegate. You can use that too of course, but that only works in EventGraphs cause it's a Latent Node.
Relatively important to understand EventDispatchers/Delegate for most other cases.
Hm, in most cases by actively altering the Movement Code. That's not really a thing for Blueprint peeps.
argh
You can try to do the same in Blueprints in the Character, but it might give shitty results.
The idea is mostly that you check if the Move you wish to perform violates the constraint
can confirm that
thanks Cedric that makes much more sense to me now
right, so not use physics constraints at all and actually check with distance check etc before allowing movement input
It's a pretty stupid improvement over what you had with just binding to the OnAnimationFinished of the Animation directly.
But it's still good to understand this and in theory also adviced to "shield" inner objects from outside.
If you were to code this in C++, you'd probably have that AnimFadeOut variable private.
And you'd probably not expose it to the outside, but rather handle it inside the WIdget and only expose to the outside what other need.
yeah I mean it's always good to practice important parts of the engine that I don't understand - like ED's
thank you
Hey all! Im on a quest to find how far along a playing montage is between two sections. I'm working on a rail shooter and during a boss' attack, time dilation will trigger and target rings will appear. I want the rings to turn red as the player runs out of time before the boss' attack lands. The trigger for the dilation and hit are controlled by montage events, so I was thinking of taking a lerp of [WhereTimeIs] between [TimeOfStart] and [TimeOfEnd]. This will let me lerp between green and red on Tick, but I cant seem to find where to get this information. "MontageGetPosition" is a thing, but "SectionGetPosition" isnt. This is code that will be used across different Skeletal Meshes, and thus different AnimBPs, so a solution outside of the AnimBP is preferable. Am I going about this the wrong way?
Is that anim notify state?
You can get the anim notify state start time and end time from the anim Event Reference afaik, I just did this recently.
Not in bp but pretty sure they are exposed.
ah, C++. My sworn enemy
Finding the gap there is just end dilation start time- start dilation end time
Maybe doable in bp, pull out the anim event ref and see if you can get the start time end time info.
You should see the param on anim notify start and on end anim notify end
Using anim notify probably a shit show for what you want to achieve btw.
If the window is small and the fps is low then rip
PlayMontage has the Notify begin and end, so I can find the section info like timing, but only after it plays through it
This is a single montage that uses a single animation, not a series of animations.
Also whats the concern with low framerates? Something about frame skipping right? How low is too low, this wont a very big or intensive game
How low is low depend on the window to fps ratio
Isn't there something like "SectionDuration" or Length?
Given you gave your Anim sections too
There is but only for sequencer stuff for cutscenes and cinematics
Hello, I can't tell if this is the right place but is there a way of having a BP component collision sphere with a higher polygon count so its smoother?
Make your own mesh with a higher polycount and set to not be visible but still have collision
A SphereCollision should in theory already be infinitely smooth cause it just uses radius.
^
Maybe not though, not sure. Never had that issue.
Sir yes sir thank you sir
It hella chonky for me even with a larger radius but ill see
// @todo document
ENGINE_API void GetSectionStartAndEndTime(int32 SectionIndex, float& OutStartTime, float& OutEndTime) const;
// @todo document
ENGINE_API float GetSectionLength(int32 SectionIndex) const;
That's part of UAnimMontage.
Those are public, so if you feel confident enough to add 1 or 2 function library functions, then you could expose them.
The ammount of things not exposed to bp 
Nvm had brain fart
Yeah I saw a forum thread discussing that, I think it may be the only way. but putting it into a Library Function might smooth things out 🦐
Would be something like this (pseudo code):
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "YourFunctionLibrary.generated.h"
class UAnimMontage;
UCLASS()
class UYourFunctionLibrary : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
public:
UFUNCTION(BlueprintCallable)
static float GetAnimMontageSectionLength(UAnimMontage* AnimMontage);
};
#include "PathToYour/YourFunctionLibrary.h"
#include "Animation/AnimMontage.h"
float UYourFunctionLibrary::GetAnimMontageSectionLength(UAnimMontage* AnimMontage)
{
if (!IsValid(AnimMontage))
{
return 0.f;
}
return AnimMontage->GetSectionLength();
}
Please give the library a better name than whatever I chose
If you need the other function with the start and end time, then you'll need to change the function signature of course
Hey i am trying to make a Building System with foundations that have physics for a Raft
If i play as Client and spawn Foundation 2 it attaches with Foundation 1 if i have multiple Foundations the whole Foundations start to jitter i also tryed to use Physic Constain Component but having the same issue if i play as Standalone or Listen Server i dont have this issues does anyone know what i should try to fix this?
Physics in Multiplayer, especially if you also want to interact with the objects (e.g. stand on them) is probably nothing you can easily fix, especially not in Blueprints.
Physich and multiplayer 😱
The Character, in theory, can handle it to some degree via its BasedMovement logic.
That requires Server and Client to being able to communicate what the hell the player is standing on.
And the different in location isn't allowed to be too great, otherwise jumping and landing will be a correction.
But getting that Physics Raft to be in sync between Server and Client is a whole different story.
okay thanks for the quick response
Yeah, sorry to sound so negative about it, but it's sadly very true that Physics and Multiplayer aren't the easiest thing to solve, especially in Unreal and especially in BPs.
so i'm back now so anyone know what could make the widget component create a different widget to the one specific within the widget class on the widget component ??
cause it must be a bug as I can't remeber something like this ever happening at least not on normal UE builds
I would recommend going on empty map and testing it with one instance.
You may have multiple earlier and possibly had some instance that have null
Missing component like that normally happend if you touch cpp and corrupt the bp in my experience.
Never had that sort of issue in bp only project.
Can the Level Blueprint not move actors? For some reason it just never moves
all good i found a big issue what i have done i simulated on the first foundation client side and server side physics now the jitter is completly gone but i will test a bit more befor i expand the system
You might want to share your code.
I don't think the LevelBlueprint has any restriction to moving an Actor.
I just figured it out. It wasn't movable 
Welp.
just a reminder to check your message log warnings
Those silly things...
Who has time for logs anyways!
Used to ignoring hundreds of warnings 😆
Increasing the radius to any value just increased the size of the sphere but didnt smoothen out the sphere
Made my own mesh and placed it within the BP, changed the collision inside the details panel to overlapalldynamic with no step up but collision persisted, removing all collision prevents overlap events which I want to keep to trigger sound and post process, smoother though thanks
This is the Easy Building System project plugin from the store, I tried to view the references of those events. They are never getting called. So I wonder how any of those events are supposed to work to add up numbers and data
I try to debug these on the project template instelf also and it didn't work. So how are these working if they are never getting activated?
C++ maybe?
the whole projec tis made with blueprint
Easy Building System doesn't use C++?
nope it doenst
Sorry to ask in here but is there a report function for people spamming and trying promote services though direct messages when it's not requested
Is there a way to see if a name is empty?
Anyone know why this isn't loading rotation?
i was learning how to use data layers today, and one thing confused me there
the documentation page (https://dev.epicgames.com/documentation/en-us/unreal-engine/world-partition---data-layers-in-unreal-engine) tells one to activate layers with the node as shown, but for me (UE 5.4) this node only exists with target as Data Layer Manager
In the end it still works, it just got me confused for a second
is this just a case of an unupdated documentation or am i doing anything wrong here?
No problem, I just wanted to stay in touch in case I needed to send over that free copy of the game :>
Hello everyone! I'm trying to get a way of showing some elements when a button is clicked; A filtering for a Menu, I'd like to be able to select several buttons, say for tables, chairs and you'd see tables and chairs, that currently works with my setup, the thing is, if I click, say, chairs again, they appear once again, I can't get myself to have this working
I've been told that after the "Is Not Empty Branch" I should do a Foreachloop, but I tried and still, this behaviour happens where I get two of the same if the same button is clicked
How can I tell if a character is touching the ground or not? I can't rely on the character's movement mode because it could be custom, walking, or airborne at random when I am checking.
I could bind to Landed but that wont fire if they're already on the ground, right?
Is localization bugged?
I have a shipping build with cooked cultures (project launcher and packaging settings) that works and changes when on standalone mode but the shipped version cant change culture
In general I'd say no. How are you changing culture, through a widget?
Simple button
It changes the brush color so I know it fires
but yeah through a widget
Odd. Are you on 5.5.1? I don't have a localized project past 4.27, but I can set something up to test in a little while and see.
I'm on 5.3.2
would be lovely if you could test
could it be that steam is interfering with it?
Shouldn't. Steam doesn't normally override anything like that. Unreal sets up the language by trying to get one close to the user's active language in windows when the game is opened first time. If that fails it'll fall back to the project default language until a user selects one themselves.
so im trying to make a game that could go onto mobile in the future, a tower defense game with no set paths(basically where you place the towers makes a maze the AI has to work around) and its my first time really straying into mobile
my main question is how much i should be optimising
i know theres the infinity nikki game using UE5 that has a mobile release but i imagine that would have an insane amount of optimisation, i dont really want my game to be high poly and to mainly have a cartoony feel with acceptable graphics being that of the original tower madness for the ipod touch which i am basing it off
https://dev.epicgames.com/documentation/en-us/unreal-engine/localization-overview-for-unreal-engine
I think I found it
that was set to english only
fkn insane that it doesnt auto switch
Unreal checkbox moment
Oh. 😮 Oof
Now I don't have to feel like an idiot posting patch notes before it works XD
I had one of those yesterday... 20 minutes into debugging through complex code and.. Fixed it with a checkbox.
You will prob have to optimize a lot, you're doing UE for mobile for starters and are planning to have a lot of characters
might be smart to seperate character visuals completely from the code driving them
i was planning to try have one central AI
and disable lumen 
a lot of the optimizing will be making smart game design desicions
like one class not only determining the path, but feeding it to all of them, so they werent all trying to path to the next waypoint themselves
you can only do so much to make a boat of lead float
thats true, but in that case are there any pontoons you could suggest 😛
I suggest Unity Dots tbh
i learned game design in uni and they never taught many optimisation methods
that makes sense, as thats programming
I sort a bunch of integers and then it has top down execution
the main programmer i worked with did not seem like he knew optimisation XD
im doing ue for almost a decade and I have no clue how I would approach infinite enemies
im not planning on infinite
will they have collision?
im trying to find a ref image, not just dipping on that sorry
Unreal also has Mass. But do note that getting into ECS is a huuuuge hurdle for a lot of people.
Is ECS stable yet?
if thats a huge resource sink and theres a method around it i could cut that
ECS is a programming idea. Unity's Dots I think is the same thing.
i know thweres the mass crowds plugin but that sounds like its for a lot of enemies
im planning on like maximum of 1 per meter
I had a programming following ECS for a multiplayer fps, I heard complains everyday
as a general rule that is, ofc some may be faster/slower and so overlap
I thought it was something built into UE tbh 💀
Realistically with good optimizations you could probably support 200 enemies on mobile, depending on your needs with default implementations. But we're talking about removing all sweeping movement, using navwalking, making special optimized skeletal meshes, etc.
CPU wise the big thing will be component transform updates. If you have a lot of scene components on them. Specially with complex skeletal meshes and a lot of visual attachements on enemies this costs a ton.
After that you're mostly looking at issues with dynamic light stuff from the GPU from skeletal meshes, though I'm also not sure how this specific case has changed with nanite and lumen.
i know how to only have a single actor make a path, if im able to find the most optimised way to make every enemy follow that i can remove near everything
the enemies will be fairly low poly, as will all assets in the game
Are you using a fab pack?
no, im making my own since i also enjoy learning 3D modelling
Ah oke good, I bought some polygon packs, they look low poly but they arent really
https://www.youtube.com/watch?v=CvOSRhdfEzs the game im basing on(feel free to x2 speed tbh
Thanks for all the LIKES & COMMENTS & FAVS
Happy Gaming
Dan
Road Racer Alpha Gameplay:
https://www.youtube.com/watch?v=YWLY3yDbjGw
RoadRacer Facebook Page:
https://www.facebook.com/RoadR
AddMeGamers Website:
www.AddMeGamers.com
Facebook Page:
https://www.facebook.com/pages/AddMeGamers/161837693872131?fref=ts
AddMeGamer Reviews
http://www....
so be adviced
also this is the second in the series, im basing off the first one that ran on ipod touch
thats the main one i could find a decent vid or pic on tho
even if i was using them im working on learning retop so id likely be shrinking the tricount anyways
most my meshes are sub 1000 with a lot being around 100
this, ironically, would be one of my higher poly projects given im working with more detailed meshes and both humanoid and beast(cow) models
yeah, i never use fab packs personally, i compulsively add them to my library, but after our old programmer(referenced before) bricked our project with some high def models ive never used a temp model i havent personally made or know a team member has made(yes, i know its bad to kepp that habit but its worked for me so far at least)
ye I mean look at this xd
yeah, those leaves would be a sphere for me XD
admittedly an untextured sphere since i dont have a sketch pad and can harldy draw with mouse XD
50 BUCKS?????
the whole environment pack, not just the tree xd
way to make me feel glad i only poach all the free fab models 😅
thats a little better then XD
I cant do art so this is the only way for me
making small adjustments just to see if something "looks better" bricks my brain everytime
@gentle urchin @pulsar axle I've thought about the infinite effect to spawn the rooms. Based on what squize says about grids.
So the grid location will be the seed. Giving random x and random y will always spawn you in a "random" level.
Now you just need to spawn neighbouring rooms.
The system can only have a few exits though. North south East West.
Think about map in 2d.
So let's say you spawn at grid x 5 y 102.
If you want to go north it will be x 6 y 102. And you can spawn the room using that grid number to randomise the room.
Going back to previous location or reloading the level with the saved grid location will always spawn the same room.
hun, never say that
i went into game design, ended up a programmer(admittedly BP main)
but even i have the basics
those things are hand in hand though
if you want to be, you always can
yeah, but art doesnt go in that hand
and my artist friends(who admittedly are proibably just being nice) say my low poly models are up to snuff
and thats before i even learned i had to retop XD
Personally I like looking at this menu, but I wouldnt say it looks nice
im not saying i, or you, will be amazing at it, but what ive learned is everyone can do art
UI is admittedly my main weakness, i hate working on the front end, and the back end
if i have the choice, its the first task i ask another team member to do XD
Chat gpt to make UI?
Have you ever heard of mid journey
Ye A.I isn't reliable for consistent art
personally i try to avoid AI, i dont want to deal with the backlash, if the big man on top gives me ai assets, thats on them, but if its something that goes back to me i avoid it
I used it to generate concept art
this 3 examples of a UI button by chat gpt
glossy and cheap looking
but I found people who could draw so now it looks much better
admittedly does look like a mobile game
ooh, those look quite nice
i tried a 3d model AI
just to see what it would turn out like
doesnt look too bad
definitely would need a retop though
got half way through before remembering it was AI based and id rather not have the fallout from that
I dont understand the fallout, its obviously worse than a human hand
if microsoft wants to be fully ai then let them sink
Ai is just the poor mans jack of all trades for hire
You have to deal with angry mobs that think A.I steal their job.
its mainly cause its datasets trained on people who didnt volenteer
bro if AI steals your job with the quality of today, you dont really care about ur craft or your boss doesnt
have you seen some of the mobile ads XD
There is a bunch of weird AI ads going around
Somehow its more cringe than a standard ad, idk. Its just so off and out of touch
and thats saying something given normal advertising too XD
I think the biggest problem is the rhythym of the whole thing. People and all animals relate the world to their heartbeat to some extent
Its why cats like different kind of audio because their heart bpm is way different
The pace of AI ads is so off
No cohesion, feels like nausea
@daring bison On a side note. I put Finnish in my side project, and it's working in PIE and Standalone. Still waiting on a cook to test that but I'm 99% sure it'll work.
I already shipped and it works on steam now
but ty for the effort regardless
Oh nice. 😄 I needed to get this going at some point regardless, so now is as good a time as any.
it was the internationalization box
I found it because I came across a example .ini from 4.27 with this and I couldnt find it in my own ini
crazy hidden
It is a bit odd that it's not default. I wonder what the reason for that is. 🤔 I'd also be interested in why there are three special sets for the more common loc languages... Like I get that they're common, but.. just include them in the loc dashboard and be done with it?
I'm curious if some people cook Asian and European/US versions separately to strip out the other languages from them when shipping to said regions. That would be.. super odd, but it's all I've got.
How do i change the camera projection mode of the default pawn/controller
its the default camera
cant even get to the actual default camera
can i get a little moire information?
when you say the projection mode, what is the exact result you want?
the difference of size is like 10MB
maybe they did this for mobile games
if you play a animation .. how do you revert the animation mode back to default ?
bah nm is was set animation mode i just frogot to connect the exec pin
i need to change to Orthographic mode
though i cant even access the default camera of the engine when using the default pawn and default controller
i believe getting the camera manager should suffice for most applications?
as for making it orthographic i believe this should suffice
thanks, that works 🫡
np at all hun
i thought i had to access the set projection mode
main thing ive learned is to always just try the simplest option
I figured out what was breaking it!
For some reason, the arrows had to be turns inwards into the room, because I noticed they where always spawning the rooms backwards!
That fixed it instantly
Grid location + initial seed, then you're good to go !
ah yes there was a bug there aswell
first pull from the seed must be discarded
interesting
moving the seed up and down 1.... it sorta shows how it's only actually one stream of numbers ? 😄
We're doing exactly that in Atre. I use a primary game seed that every client gets. And then I round any location based stuff to closest integer and add their X/Y to the seed before making a stream for randomizations.
How do you mean?
So it seems the seed is just the index to start at
In this single stream of numbers?
Isn't this because of you adding the index to the seed?
The stream itself is just a randomization of the initial seed each pull. But that only applies if you reuse the same stream. Where you're actually resetting the seed each iteration.
I thought providing a new seed would provide me a new stream of numbers?
Even if two seeds are next to each other
It's not technically a stream of numbers so much. All the stream does is offset your seeds.
It uh... sec
784 = 01362715...
785 = 13627154...
786 = 36271542...
Definetly not what i expected
Here. When you call like GetIntegerFromStream. It'll internally run this to return a 0-1 that the calling function can use to make an integer out of based on that scalar.
/**
* Returns a random float number in the range [0, 1).
*
* @return Random number.
*/
float GetFraction() const
{
MutateSeed();
float Result;
*(uint32*)&Result = 0x3F800000U | (Seed >> 9);
return Result - 1.0f;
}```
Note it's running MutateSeed before pulling the value. Which is nothing more than a hard coded offset from the seed. So each time you call this on a stream, the seed changes, but predictibly. Which is how you get the same numbers in order. But you have to use the same stream, instead of creating a new one with a new seed.
```cpp
void MutateSeed() const
{
Seed = (Seed * 196314165U) + 907633515U;
}```
For a predictable grid with free directions i feel like i cant really do that
This is ofc just a fun experiment, nothikg im actually gonna use
But imagine trying to setup minecraft chunks
You start at chunk 0,0, and can move in any direction at whim
You mean for randomization of the chunks?
World generation, yes
I'd probably default to Perlin for that.
How would you pull the correct random from the seed
Dont pick an easy solution 🤣
We've been there hah
Perlin as seed generator could work tho
It's nice because it smooths out over distances. And gives you a nice -1 to 1 to work with for whatever you need. And you can use it for a lot of stuff. There are functions for 1d, 2d, and 3d. Though annoyingly they're not BP exposed I don't think.
Yeah they're not
Resorted to plugins when i played with itn
Pre c++ time
Plugins + latent ForEachLoops in bp to support > 100x100 worlds 😂
Grids are fun!
My day just got fun. I get to find a way to make dynamic mesh component affect navigation.
make it double fun by making it a grid assignment !
Generate a sparse voxel octree in the actor, and use that to spawn some ism instances that covers the mesh 🥲
tripple fun with that algo thrown into the mix!§
It's going to be so weird for ISMs to be a CPU optimization from now on. O.o
Question time. How can I work this out.
I want to play montage at random but across network.
But I don't want to replicate the montage
I need to play it locally
So I'm thingking of using network clock
Which I sort of have already but they come with error margin
So how can I use that correctly
Sounds like idle anims?
Imagine client clock is 2.95 but server is 3.02
It's hit react anim but at random. Not caring about which direction it get hit from. So no local dot product calculation, just pure playing montage locally
The only network part is the network clock.
why'd you sync them at all ?
wouldnt you locally simulate hit from the proxy ?
then hit react is local ?
Yeah I'm not sure why you need the clock here? If it's from hit reacts, you're applying damage from somewhere anyhow, so it should probably run off of that?
Hmm right
I'm just trying to figure out how to play it at random
So obviously client gonna hit the A.I first.
It's just going to play a montage there.
Then I have to apply damage on server.
Which then execute game cue to everyone but the player that intiate.
Where does the randomness come in though if it's a hit react?
Let's say there are 3 to 4 animations
I want it to be played at random but at the same time everyone see the same montage
Maybe I'm overthingking this.
Realistically, it won't matter much. But if you really want to, I assume you could clamp the current time to like a second and use that as a seed.
A seed can randomise the array but a simple desync like an attack that isn't acknowledged then the whole order mean nothing.
this is where im thinking not? 😄
Shuffle the array once at the start, make the array replicated and go through it sequentially :D
The hit react will be followed by root motion
Sadly even the sequentially part can desync
arbitrary order an arbitrarily ordered array?
Which is initiated by the server
So the root motion that get played will depend on the montage.
ah i see
Funny enough my wife and I realized that even idle animations don't play nearly at the same time on ESO. That game is so async it's insane.
I was heavily surprised how well sequencer syncs
We had a train sequence in The Ascent, that would drive in a train that you can then board.
That had to happen on everyone. Even with a 200ms ping it was happening at the same time
Ultimately you are doing prediction here
So you won't really get around the idea of sending the server the index of the RM you played
couldnt you just provide a seed that's synced tho ?
You'd need to ensure it remains synced
What if you locally deal damage but server denies
🥹
Yeah that's not so straight forward depending on how the system atm works
We had a lot of issues with that on RS2. :/ It's made me really dislike damage application prediction. Kaos will probably shank someone if they talk about it to him at this point. 😂
Especially if things happen quickly and with higher pings
// Server response
..()
{
if (!ValidateHit())
{
ResetHitReactSeed()
}
I would also not do that. Given that the damage is applied to a SimProxy CMC
I would let the server trigger the GC and that's it
And given that the ASC handles montage replication, I would not even use a GC
Just play the montage on the target on the server
i neeed to get to the meat of the ASC 😄
No prediction of course
no prediction on GC?
No prediction if you play the montage directly on the sevrer
I'm pretty unsure if a SimProxy can even trigger a RM Montage on the CMC.
So the only gain from predicting the montage would be the animation part, not the movement
Hmm atm I don't have any prediction and have the montage played when damage happend on server.
I gotta get ready to get to the office. Will chat more later.
But when I asked for opinions, everyone says they predict their damage
Who the fuck predicts their damage
Have a great day!
Sry montage not damsge
Damage is always server only
But visual stuff like montage can be predicted
Anyway ttyl
Montage, sure, but root motion Montage?
Miku ❣️Your pfp is so cute
Hey guys, I’m trying to shock/electrify my AI, but without animations.
There’s few shocked animations, and the one I found was part of an expensive library. I was thinking about jumping back and forth in animationframes, but referencing an earlier pose is maybe not possible? Or maybe playing an array of animations with a 0,2s timer to interrupt eachother?
I'm confused if you are working with an animation asset or not. You do have animation assets for being shocked?
If you have an animation asset, you can "reference an eailer pose of the animation" in multiple ways.
Your able to directly set the animation to play, or freeze at a specific point through code.
Even without an animation blueprint. Though you could even set this up in your animation blueprint as a state.
No, not for being shocked, I just have a bunch of other anims 😅
Freezing the anim is fine, but I’d need to look into how to get an earlirer pose in that case 🤔 Then again, playing a rapid variety of different anims would maybe simulate the shock effect well enough until I have actual anim for it
I understand, a lot of the play animation nodes have some sort of start time input. You could make a timer which keeps restarting the animation with a different start time.
Then set the play rate to be zero. So it freezes
That would be the simplest, no brain solution.
Hi all, I'm wondering if someone can help me figure this out.
I made a currency system for my game, and I can add money when I press a key, and remove money when I press another and this updates the UI aswell. Now I'm trying to adapt this to my collectable system so I add a certain amount when a collectable is collected. Problem is when I try and add that function to my collectable blueprint I get "Accessed None Trying to Read Property" error from my Collectable BP. Here's my current setup:
From my character BP:
From my collectable BP:
Accessed none means you are trying to access object reference variable that is not yet set / null
the error should tell you which of the null variable you are accessing.
yes but that variable reference works in my Character BP
regardless, it's null at the time you are calling it.
so maybe it was set later on but in any case when you tried to access it where the error occurs, it wasn't set.
What variable is null? Im assuming LitCoinUiRef is null? What does the error log say was null?
you have more than 1 unset variable at the time you are accessing them.
debug and go over your code step by step
Just because it works on the player doesnt mean it will work anywhere D:
you can do is valid check, and print string when it's not valid.
Well based on the working version in the Character BP do you have any suggestions on how to adapt that to the collectable?
the issue is not about "working version" or not
this is the collectable setup
you need to understand why you get the error.
the important bit here is to understand the flow of your code
and why you are accessing something that is NOT YET set
not knowing references, you will just end up with another issue
I guess I'm just fundamentally misunderstanding how this works haha
Oh thats a great idea! Wonderful 🤩
Thanks!
You seem to have a misunderstanding of how references work.
While playing the game, the player BP and the collectables BP exist in two different places in your computers memory. Heres what that might look like:
// The computer memory for the player BP:
BlockOfComputerMemoryForPlayerBlueprint
{
SaveGameReference = MySaveGameInstance!
LitCoinUI = MyCoinUI!
}
// The computer memory for the collectable BP:
BlockOfComputerMemoryForCollectableBlueprint
{
SaveGameReference = NONE
LitCoinUI = NONE
}
As you can see, these two blueprints exist in two entirely different places in your computers memory, and can have different values. The Values in the Collectable blueprint are all set to NONE. Anytime the game loads a new blueprint into memory, all the references will be NONE. You need to specificly setup the references for each blueprint.
If you attempt to access something on the LitCoinUi, and the reference is set to NONE, you will get an error.
You need to make sure you properly setup those references when the collectable blueprint loads. You can do this by setting up those references on the BeginPlay function.
There is numerous ways to get a reference to something. Your collectable UI looks like it already has some code to get a reference to the SaveGame (It must just not get ran ever, explainaing why the reference is set to NONE still).
Ok I think I'm understanding, I'm gonna mess around with it for a bit to see if I can make it work. Thank you!
GOT IT
lmao
Nice
Btw, I said use BeginPlay, but you might run into race condition errors trying to get a UI references from some other blueprint on begin play.
I have no idea how the LitCoinUI is setup
But like if the LitCoinUI was created by the player.
It's really simple, this is in the graph of the UI
im trying to make local multiplayer for a school project, when spawning my second player it doesnt have any controls :) any pointers?
Should be fine! Dont worry, im just overanalizing.
Awesome! Thanks again!
Tbh ive never used local multiplayer.
try #multiplayer
will do!
😂
Why did my Coin Ref disappearrrrrrrrrrrrrrrrr
It was working and then it just stopped, I don't think I changed anything
If you wanna vc, we can sort it out quickly.
I'm down
Ill dm you
Hey, I'm trying to make a foliageinstance converter to convert from static mesh to Blueprint so I can make Pickable objects, It says to use a Class Reference but I can't seem to find it?
Says who? And not really sure what you are trying to achieve. Some pics maybe.
this is what I have, I'm trying to change Flowers that are used on the Landscape Grass Type From Static Mesh to Interactable Items that I can pick up, So I can procedurally place Sticks, Rocks, Mushrooms etc that I can pick up in the world
That's not something you do at run time
Im not sure about how you would do what your asking but I do see that you are not passing any array to the for each loop node ? Someone else might be able to answer if this is is possible.
It makes no sense to convert a static mesh to another bp type.
Creating a blueprint class in editor, will just create a new bp of type actor with the static mesh you selected.
so how do you get procedural sticks, rocks etc spawn on terrain like in medieval dynasty on the terrain?
I don't know, suppose there's a lot of techniques.
but converting static mesh to another type is not a thing
converting an object to another object is not a thing
I'm not a programmer I'm an artist unfortunately 😦 but I remember someone who did this one, changed the static mesh to blueprints on runtime and you could pick up the procedural items
He is probably just creating a new blueprint that takes the static mesh he/she selected
by right click static mesh conver to blueprint
and that is not converting a static mesh to an actor object
that is just manually creating an actor object, with a static mesh component
but it works on runetime he runs around the map picking up stuff spawned on the terrain through the landscape grass type
Must be a misunderstanding or entirely different thing
you can only put static mesh in the landscape grass type
and you just spawn that bluepritn class
and assign the static mesh component in that bp, with a static mesh you pass
yeah that's what I'm doing 😄 ?
Here I'm getting the Instance Mesh, Replacing it with a Blueprint Actor and Removing the Instanced Mesh?
I'm trying to change Flowers that are used on the Landscape Grass Type From Static Mesh to Interactable Items
This part is wrong, the short answer is you can't
ok I guess if "replacement" is worded like that
i mean you are just spawning and deleting
yeah so it spawns the actors in world, then replaces them from mesh to blueprint which is interactable then I can pick them up
You spawn an actor then delete some other object (instanced mesh)
it's not really replacing
so you should figure out how to get a reference to your instanced mesh first
that's what I'm trying to do 😄
then store them into an array, only then you can do the for loop
the wording is incorrect
don't be sorry, Im just trying to make it clear that you can't change flowers static mesh to interactable items
i have autism and adhd I suck at ording stuff
what you can do is spawn interactable items with the static component set to the flower's static mesh
So imo, your first step here is to figure out the instanced static mesh you want to iterate.
in what manner are the instance static mesh gets picked? A radius from the player? a line trace?
Okay so, I am creating an open world simulation game where you can farm, part of that is picking up sticks and stones off the floor, mushrooms and edible stuff, flowers to paint your homes with, I want it all to be procedural because the world is huge, so I can't manually place all this foliage that you can pick up and put in your inventory, so my idea is that I can use the grass type on the landscape that procedurally spawns mesh on the terrain, however you can't just pick up static mesh on the terrain, it has to have an interactive blueprint, I purchased the Dynomega Inventory system so I can use the inventory it's already setup, but what I want to try and do is find a way to replace the static mesh that is spawned in on the terrain with interactable items I can pick up, so I don't have to manually place thousands of flowers, stones, sticks, and other interactables in the world 😄
does that make more sense?
perfect! thank you ❤️
I never touched instanced static mesh or work with open world stuff
but maybe I can help with replacing them
it's easy
provided you are able to get the reference to the instanced static mesh
So how do you want to replace those static mesh? When the player press Interact or something?
i hope you got that figured out already
It's a huge open world 😄
I keep meaning to look into lightweight actors for this kind of stuff.
yeah so one sec let me show you
Its how my city builder works
every interactable actor is an instanced mesh
with a manager, i can get the entity data
based on the component and hit index
Do you mind if I message you squize and pick your brain?
just do it in here
right, so first order of business is being able to hit that instanced mesh
with a trace
okay
so print something like hit component and hit index , to verify that it's correct
with mass?
👀 I thought actors is too heavy
ism stands for instanced static mesh?
yeah
so they are not moveable?
static mesh = they don't have skelebones so they don't animate
that's thingking out of the box
gonna use VAMP to animate them
they can still move of course 😛
I thought vertex animation is only good for cheering crowds
nah it's pretty solid these days
seen someone trying to do vertex animations to do their version of total war
yeah plenty of those around
i'm glad i'm not making those games 😅
nice, they even have names
they are entities, altho singularly named 😄
was gonna do some large random list of names but meh
it's kinda easy tbh (DM)
I have a random float from 0-1. How do I ensure that every time I tick it, it gets the random float, but with for example a consistant 0.3 range? So if the random float is .9, it has to be 0.6 or below 🤔
guys, there's a way to access a specific mesh socket in BP given the name? or i need to get the sockets array and compare the names in a loop to get the one i need?
that's probably the way yeah
sounds like you want a range less than 0-1 ?
RandomFloat * MaxValue
Sorry I'm head deep into this blueprint trying to set it up 😄 But yes ISM is instanced, so it's pretty much free, if you do it right, you can also use Data Tables for ISM, same with Characters, I can't remember but I saw a video where you could have thousands of NPC's using similar logic to reduce memory consumption
Data table ?
these cubes represents what's gonna be an "npc" once i get a proper mesh and vamp integrated
In this multi-part video we take a look at the benefits of Instanced Static Meshes, how to create and utilize them. The differences between instanced static meshes and hierarchical instanced static meshes.
This multi-part video will also go over how to create a instance/object position exporter from Maya or Blender with Python. And how to writ...
this tutorial tells you how to use Data Tables for building buildings with ISM 😄
it's really fucking good man especially if you want to build Log cabins out of logs and not mesh walls with normals and displacement
heh
lol
I really could use a partner who can programme and do BP shit 😄 I'm so bad at coding man I can do art for days, but any type of BP and my brain fries 😄
I really could use someone who do art and stuff
but I'm so limited on time that it's not really much of an option, I work when i can and that's very .. unreliable 😄
If you click on my name you can see my portfolio 🙂 ? and i'm the same bro 😄 I have a wife and 6 kids and a full time job 😄 I probably do 1 or 2 hours a day 😄 lol
Small reminder that this is stuff you should handle on the job board please.
Job boards never get anything done man 😄 it's more just chatting but will make sure any offers will be done on there ❤️ : )
Just chatting would be offtopic (: at which point it would still be wrong to do that here.
We have #lounge #programmer-hangout #artist-hangout for that stuff.
hey guys im new to unreal engine ang im copying some youtube tutorials about widgets and i seem to have ran into a problem
when i press the J button which I set as a keybind the widget doesn't seem to go away
is there something im missing
That code will create a new Widget every time you press it.
You'd want to do that slightly different.
im still learning though can you give me guides
Put a Sequence after the Input Event.
On Then 0, check if the JournalWidget IsValid. If it is valid, leave it alone.
If it isn't valid, create it like you are already doing, set the Variable and add it to the Viewport.
On Then1 you want to check again if the JournalWidget IsValid (mostly for sanity), and after that do your FlipFlop.
To further improve this, you might also want to replace the FlipFlop with a Branch and use the IsJournalActive variable to decide if you want to Hide or Show it.
Given you are a beginner I assume you aren't using the CommonUI plugin (unless the Tutorial suggested that already). If not, then you'd also need to call SetInputMode with either UI or Game depending on the Journal being open or not.
In addition to showing the Mouse Cursor.
It's also good to keep in mind that, if you have more than one Widget that could be opened and require a different InputMode and the Cursor, that calling this where you are creating and showing the Widget would be wrong, because the Widgets could set InputMode to Game and hide the Cursor without knowing the other one still needs them.
I'm actually also using the Horror Engine which is Im also trying to explore and adding stuff into it
No clue what that is, but I believe it doesn't matter for what I said.
There is, by the way, also a PlayAnimationWithFinishedEvent or so node, that gives you an extra pin for when the Widget Anim is finished.
Then you don't need to use that ugly delay.
let me figure out how to add that to my widget step by step
thank you for the guide
Yus. It's sad that YouTube tutorials are still so wrong and outdated most of the time :/
But can't really be helped.
in sequence 0 that triggers the 1st button press and 1 triggers the 2nd one? is that how sequence works?
yes i've seen many tutorials which are like 2-6 years ago
Each press will trigger both, one after another.
ohhh got it
Without it you'd need to ensure that both IsValid True and False lead to the next part. Which quickly gets ugly.
Especially if you have code with even more branches.
In actual code it would look like this:
if (IsValid(JournalWidget) == false)
{
JournalWidget = CreateWidget(...);
}
if (IsValid(JournalWidget) == true)
{
if (bIsJournalVisible)
{
/// Hide
}
else
{
/// Show
}
}
Without the sequence you'd basically need to put the second if code into the first one and then also again into the else of it.
In Blueprints that's just a wire, so it's not THAT problematic. But still shitty to keep organized.
that looks so much easier
i tried adding a close button on the widget earlier but i just close the journal picture and left the pages, buttons intacked on the screen
Right, the problem with that is, that if you handle the Closing in the Widget (in addition), that the place where the Key is pressed wouldn't know about it.
So the JournalVisible Boolean wouldn't change etc.
If you need this to work from both sides, then you usually add like a function to the Widget, e.g. "CloseJournal". That then plays the Animation and calls an "EventDispatcher" (that you'd need to create in the Widget), e.g. "OnJournalClosed".
The code that create the Widget would then bind to that OnJournalClosed to react to it and simply call CloseJournal if it needs to. And the WIdget itself would also call CloseJournal. That way both cases go through the same code-path and both cases would ensure that the code that create the Widget gets notified by the EventDispatcher.
Might be a bit too advanced for you maybe, but could be easy to understand if someone walks you through it. Don't think I have a tutorial for that at hand though.
On top of that, if you haven't fixed your code yet, then you also were creating tons of overlaying Journals on each Key press.
yes im having trouble comprehending this information
Yeah no worries. It's difficult to do things the "right way" if you are lacking the tools for it. I would suggest to stick to what the Tutorial shows you for now.
in the tutorial i watched he added this,
And maybe follow a bunch of them to cross reference if what one of them told you is actually correct.
No idea what I'm looking it.
wait lemme copy what he did
he added another set visibility and made it hidden
after the other one which is set to visible
That's a different widget
Just follow it for now. Makes no sense to analyze it atm.
sure, thank you for you time and help, ill ask again later once i solve it
I'm having a real wtf moment right now. The first image is a profile I've assigned to a mesh. The second are the collision presets on a pawn's capsule.
I have other actors overlapping the first profile just fine, everything in fact except for this one pawn. And I can't understand how this one class is failing to overlap. It's not a timing issue, pawn enters collision long after the game starts. Pawn can be traced and overlapped by other things. But these two specifically just hate each other?
I'm working in the construction script of a blueprint and try to debug the value of a variable by using a print string, but for some reasons I get two values displayed in the viewport. Does anyone know why this happens?
Either you're printing twice, or there's two of the blueprint in the level
Hmm, as far as I see there's no duplicate of the BP in the level and I have only this one print string node connected to the running code.
If it's the player, then maybe you have a player start which is spawning in a second instance of it, or maybe the gamemode is spawning another in
Turns out Navwalking forcibly removes the WorldStatic and WorldDynamic object responses to ignore.
No, I'm currently not working with character blueprints and I'm not running the code via event graph at all. However, even though strange somehow, it seems I've been able to fix this by adding/defining a key in the print string node. Now I get only one value displayed.
It's likely still printing twice. The key just allows only the latest print string with that key to show up. So when it's called the second time it removes the first one and prints the second one
I don't really know what else to suggest other than showing the code since maybe it's setup some way where it'll be called twice even if it might not seem like it
But I don't understand why it should print twice and why completely different values. In addition I noticed that only the first printed value was the correct one and this is the one which gets printed out now.
no one can even begin to guess if you don't show your code
The whole code or only the part where the print string node is connected?
that obviously don't help at all..
zoom out
also get rid of the Key
and print string self
Oh boy fresh print string code to steal 
(Sarcasm)
Hope he's able to get things resolved.
Okay, that sounds reasonable somehow, but shouldn't the print string node then output the same value twice instead of two different values?
You could do an array with all your elements and remove the return value of this select from the array if you just want something
Hello everyone,
how do I do this in Unreal 5.5? I tried to replicate the video, but this video is in an older version and it no longer works. I want to be able to use First Person in the New Motion Matching Sample Character:
Hello guys, in this quick and simple tutorial we are going to see how to be in first person in the new Motion Matching Sample in Unreal Engine 5.4.
↪️Project Files: https://bit.ly/GorkaGames_Patreon
📖Download Free Unreal E-Book: https://bit.ly/Free_Ebook_MasterUnreal_GorkaGames
🔥Discord: https://bit.ly/GorkaGamesYouTubeDiscordServer
Check it ou...
I have this as my sprinting and crouching in my game, but I don't want my character to be able to sprint and crouch at the same time. Could anyone help me fix this problem?
just check if you're doing A or B already
e.g. when trying to sprint, check if we're already crouching
when trying to crouch, check if you're already sprinting
you have the states there already ( the two bools)
How do you change the mouse sensitivity for the UI cursor?
I used branches and it seemed to work. Thank you!
Hello, is there a kind of limitation of using Event Dispatcher?
I bind an event into the HUB. Display the widget and call an event from the widget to update a Text Field. That doesn work.
I bind an event into the widget. And modify the widget text and it works.
when i call the function on construction de value of the text is set and displayed.
When i update the text through the even that the HUD call... the value is not changed
so why the function doens work??? it's the function that doesnt work when i call it with the Change Timer (Custom Event)
Everything else seems to work... so i'm wondering if there is an issue with Event Dispatcher to update a widget on the notify
i try to bind the text to a variable
the print display the correct value, but the text doesnt change...
i start to believe it's an Unreal Engine bug
how can I set a sphere collision inside a bp to not generate hit events when other actors for example "line trace"
custom collision, to avoid those type of actors
but i dnt want to avoid the whole actor, just the sphere collision inside the actor
then i don't understand your question cant you correct it?
You Have a BP with a sphere collision, You want that sphere to avoid the line trace
my actor has a sphere collision which detects other players nearby, but when other players do a line trace to shoot, they get hit event in the sphere collision and not the actual capsule collision its meant to.
yes so for your Sphere you want a custom collision to detect only your BP actors
so it will solve this problem?? :: that when other players line trace, the line trace doesnt end in the sphere collision, but penetrates it
then you need to add collision detection for specificly to the capsule
from project settings, in collision details
yeah bro you are true
I am not good also in blueprints, you can check custom collisions from youtube,
normally the trace are component, i'm not sure, but i expect them to be component and not actor
ok let me play around with the customcollisions. i dnt want to add exception to the linetrace code, bcoz its a lot of other stuff there
but it isnt, the line trace is getting blocked by the sphere collision, it also detects the actor but it shud only detect the capsule collision when the crosshair is in the capsule collision and not the sphere collision
and into your Sphere, you avoid everything except the actorType
then into your Line tracer is there some kind of limitation of collision? i guess you should avoid a type of object no?
using the trace channels will work, i ll check
when people work on hard stuff... i can't change a simple text from a text widget.... 😢
Is there a kind of God of UE5? i summon you to help me!!
@barren tangle using the trace channel worked. it was so f simple. thanks
make some math that can set speed as a function of both sprint and crouch
Speed = 500 + 200 x sprint - 200 x crouch
hey, i am following a tutorial and the guy use a self reference to a pawn object reference parameter in the AI move to node. How is this possible ? I cant seem to do it on my BP
Do I need to do this ?
anyone know why component overlap components/actors seems to be offset if 2 actors have different scales?
it works properly when they are the same scale?
solved: I somehow moved the "basic cube"s box collision, not sure how as I dont recall touching anything of sort.
Right click empty space and type self
I think it was because I created an Actor BP and not a Pawn BP, with a Pawn BP I can get the reference to Self Pawn
That will be an issue
You should derive from a pawn not actor if you want all the juice of pawn in your blueprint
The comp is irrelevant, you will need to derive from pawn so you have the pawn movement comp
Although maybe what you want is a character as opposed to pawn
the "Blend Poses by Bool" isn't working as intended - I attached a crouching animation to my character but the thing is when I'm playing the game, it just loops and loops without my character changing any position while I am crouched and walking also the blend time is working.
If anybody want more I can send a video but if you get what I meant then please reply to this message and ping me.
Anybody come across this issue? I've lost my debug tools to step through my breakpoints.
Is there like a SetChildClass node in Blueprints? How would I change the class of a Parent to one of it's children at runtime?
What are you trying to do
change the class of a spawned actor? Or just change the value stored in a BaseClass ref to be SomeSubClass
I figured out what I needed, tysm!!!
Change the child class of a parent at runtime. Spawn the parent at begin play, and the change the class to one of its children
iirc, there are hotkeys to step through things, you don't actually need the buttons at the top. But that's unusual, I'd try restarting but I'm sure you've already done that
Q: Is it expensive to run a line trace off of Event Tick in BP_Character?
For: If the player is looking at an BP_Interactable, then WB_InteractDot will be added to viewport. Vice versa
Not really
Not unless you put a ton of code in it. That's the typical way to do interaction though. That's how all my games do it anyway.
One of my games uses three multi capsule traces that get gradually smaller to pick the object closest to the cursor.
Gotcha! I thought that much, but wanted to make sure. thanks both of yall
@glossy cloak a long shot but try reseting the editor layout
I'll give that a go. And yeah, a restart didn't fix it, oddly enough. I saw someone else in here mention they lost their menu as well but figured they just didn't understand how the breakpoint tool worked. Lol
It just mean the should move never changed. That or the pose never get use
You should look where you are setting the should move
I have a new pawn that I can control but I’d like to be able to adjust the camera setup for this pawn , would there be any differences in setting up a camera? As in, would I just add a camera / spring arm to it and it would just default to that camera ? It’s currently just FP defaulting and it’s inside the mesh rn
Correct. The cameramanager will always try to find the first activated camera in the pawn. If that fails it'll put the camera at the pawn's center.
I have been stuck thinking about this all day. I have a few items in my game that act as abilities (just collectable abilities) There are three each with a different effect etc, whatever. They show up in the HUD when collected and have bools and all that however.
The idea is to have a button to swap between these abilities, then another to use the selected one. However I am stuck on how to make the AC_Items know which one is selected? and how to swap it? (think like carousel) Would an ENUM be the correct approach for this?
For me, each ability wout be a data asset. And so when granted, you'd populate an array of the data asset type. To carousel through them you simply pick the next index in the array of granted abilities and activate that ability with the picked index from the other button.
okay I will look into that. Right now the abilities/items are actor classes when walked over, are checked as true, the if true added to hud and able to use ability, ability data is stored in an AC_Items component to make sure the player has the items
I haven't worked with data assets that much or even if at all however, but I will read about them
Nice, thanks
I love how you can add function to data assets.
Is there a sane way to manage a bunch of switches? like I'm trying to make an actor say, immune to certain types of damage
I guess a map?
i mean it's an inbuilt variable an the details are just these
or switch on int node ?
GameplayTagContainer.
A simple way would be to type your damage using GameplayTags, add an "Immune" gameplay tag container on your player. Check if the incoming "DamageType" tag from the attack exists in the "Immune" tagcontainer - if it does, they are immune.
Was thinking of using an enum and bitmasking it
If you wanted resistances, that's a litlte more advanced and you'd probably want to use a Map Instead of Tag > Resistance which can also act as an immunity at 100%
That is not inbuilt, it's just a variable that you name. Look into anim blueprint update and see if you actually set it every tick.
Save the effort. Embrace the tags!
I havent seen people talk about it but it seems like the default Jump for ThirdPersonTemplate is frame dependant
It's crying GAS already
muh memory savings though
The fact you have attribute, skill, immunity blocking tags etc etc
setting to 10 fps vs unlimited Im seeing a huge difference
Bruv what memory
You will love GAS for this kind of traits
Need to block something? Just pass a tag
Want immunit? Pass a tag
GAS feels a bit overkill for the scale of my project
What alternative do I use to have concistent movement regardless of FPS? Jumping as default and my dash setting a velocity seem to be frame dependant
Don't necessarily need to go GAS, but GameplayTags make management of checking things like this really simple.
You'll probably need some substepping
when i look that up it seems connected to physics?
Use delta time on the equation or just use root motion to drive your dash.
using root motion feels cursed tbh
Then use delta time if you want to programatically drive the anim.
Though I don't know what's cursed with using root motion
I feel like it would be a nightmare to try to set speed varaibles like for example if you are hit while moving through the root motion
If you change anim then your root motion will cease immediately
Not like you will continue your dash when your character is hit
i c i c
seems to be the same amount of effort 
idk I still feel uncomfortable relying on root motion but I've been struggling to change my code to work with delta time
On the contrary if you calculate dash then you will carry the harden of stopping the dash the moment the character is hit
Try to do the basic first
Move object a to b with X distance
Within 3 seconds regardless of fps
Once you figure that out then work your way up.
thats what im trying to do rn
Delta time is the time it takes from last frame to current frame
currently I have it where I am using a timeline that is 0.6 seconds long, with a distance multiplier = time and multiplying that by a set distance
I was under the assumption timelines were frame independant
You probably don't need delta time if you use timeline
2 seconds timeline will run for 2 seconds
Just lerp
Most likely you do something wrong. Share the bp for others to check.
What's messing me up is after this I set my velocity to this times forward vector, all my set velocities are frame dependant rn
one moment
not as helpful but here's the timeline
At 60 fps this goes my desired distance, at 10 fps it does not move
right now I do not have my dodge animation complete so I am elongating a t-pose animation (also I'm petty as hell and refuse to use a premade dodgeroll lmao)
I'm not very connected to this code so if someone gives a better implementation idm using it
okay so I checked it and everything seems normal but the animatio I imported might be at fault because usually looping animations on preview are not changing their positions while mine is changing position and I imported it from Mixamo. So, anyway I can make it loop in the position in the preview so that it doesn't change it's position ?
If you project has abilities, and statuses, GAS isn't overkill for it.
okay I got it I should've ticked the "in place" option in mixamo while importing this solved the issue thanks for the reply
I ended up caving in and Root motion has been working well