#blueprint
1 messages · Page 171 of 1
simplify things and then make them more complicated after they are working if it benefits the project complexity for example
for example if u 100% need to decrease the size of your bp because its already huge then u can move on to timelines or whatever
simpler is always better, so u can understand what you did 6 months from now
So apparently even that isnt working
Idk maybe I messed up the code because Im so tired from this thing
Here it is though
wait i just noticed it
Yeah I didnt have the height param plugged in, regardless, stop boiling event does the same as start boiling, it increases the values
@dark drum I did the whole thing you mentioned earlier, but I'm struggling as to how I can get the data asset back from the soft class reference, I can't seem to find a node that works here...
I am trying to make a movement like the arrow I drew from the Forward vector to the Right vector. I don't quite understand what to connect Add Movement Input to World Direction. Is there anyone who can help?
possibly an add forward, then after a certain amount of time add left or right ?
hey,i want to change a material to a lot of objects at once,but in the matrix i dont find it
how can i do this
did you try details ?
but probably select them in the outliner, are they placed in the level ?
this will be foliage
i will paint with them
on landscape
no way if i need to change every instance and modify its material
ok i just saved my project everything was fine but now i cant open it again
getting crasg when oading
EXCEPTION_STACK_OVERFLOW
ideas ?
unlucky
lol, aye
ok i found the issue but i dont know why
i have a minimap widget + texture + material
thats whats breaking it
i remade it and it still breakes
omg,a small fun fact,i have 4809 chess games
Probably, I did this with lerp but there were too many glitches. Thanks anyway!
just discovered it
events don't return things
passed or returned ?
if you just want to pass some data and return stuff use a function
hey im currently making a horror game and killer has chainsaw ive setup the 3d sound and all working but i want the chainsaw sound to update location when the killer chases the player ive tryed using event tick to spawn sound at location it works and updates but the chainsaw spams from the start how can i have it play the chainsaw sound once?
So I have a character blueprint that spawns a 2D Metasound on Begin Play and adds it to a variable so I can access it later. When the character dies it stops the sound and destroys the audio component. Then the level is restarted, and a new instance of the character blueprint is spawned in, and thus so should the audio. But the audio doesn't comeback, and instead it seems that the new instance of the character blueprint is trying to access the old characters reference to the sound, even though it should be destroyed. Why doesn't this work?
thanks
so your saying when you load a new level your defaults are not there ? or your beginplay isn't firing ?
It's not a new level, same level but new character blueprint being spawned in
so the beginplay isn't firing ? or it's playing the sound still ?
the sound is a component of the player i imagine ?
It's acting like Begin Play isn't firing
It became a component when I made the sound a variable
check with a print string
it should fire just fine
but showing the code maybe someone might see something also
Didn't fire 😩
ok so that is weird, are you sure your spawning in the right character ?
Why would it not fire? Spawning in a new instance of the class should cause it to run begin play again right?
I'll check
ya it should run when you spawn in, are you possessing it ?
i don't think it would matter either way it should run
hmm
So I might not be destroying the original bp right
Is this a valid way of doing it?
honestly i don't destroy my main character i play a die animation then i pop it back to life
but in theory that should destroy the possessed actor
you can also try get player character
I don't think I have that luxury haha, it's an endless runner and all the stats live on the pawn so it's just easier to kill it and spawn in a new one to reset the game
Ok
this should destroy it fine, doesn't explain begin play not firing
which even if it did exist, should fire off when you spawn another one
Same result so I don't think that's it
Yeah true
so you got no print from begin play, and your sure your spawning that exact thing ?
I figured it out
Player controller cast is failing when I spawn in a new actor
should I be concerned about this? It hasn't affected game play
how do i make some type of vector to feed in to Launch Character so that it launches them in the direction of a moving object?
a car hits a player, i want to launch the player in the direction the car is traveling for the most part. cant figure out how to make the correct vector from the impact or forward vector
are you getting an error? (is the print string on not valid printing)
No errors
I am trying to make a movement like the arrow I drew from the Forward vector to the Right vector. I don't quite understand what to connect Add Movement Input to World Direction. Is there anyone who can help?
In this way, Character turns directly left or right.
I'm just going to work around it and call it good 😂 If I run into trouble later I'll fix it haha
Thanks for the help! Wouldn't have discovered the problem this soon without it haha
i'm not sure you have to add mapping context again to the controller, i wouldn't think destroying the actor destroys the controller, but it's weird it doesn't have the same controller
Any obvious reasons On Component Hit wouldn't give any info about what actually hit it?
All I get here, is the string "Hello"
Most example seem to suggest it should just "work" but if I try casting to a BP of a certain type, it never casts successfully
Which is when I added this "logging"
the only thing i can think is your not getting a blocking it ?
It is blocking if I add an extra print and check for that :/
Because the pawn isn't possessed when this is called. This is an Epic™️ fuckup with initialization that confuses some people because the initial pawn works for this in most cases. However when you do this manually by spawning a pawn and possessing it, it does not work because you SpawnActor, beginplay is ran before this node is finalized, then you call possess.
There is a possessed function that I think is exposed to BP that you should use for singleplayer or server related things. For a good hook on a client you need C++.
so no display names are popping up ?
Nope, Big gap between Hello and Blocking now I've added that
can't you get the car's velocity?
ended up doing get unit direction (vector) from the vehicle and the player, seems to work okay
oh hell yeah lucky luke
Using the original assets as a bit of a learning exercise
an excellent decision
you'll learn unreal faster than your own shadow
your problem is pretty strange though
so the spawn hit effect is working fine and it uses the hit result ?
Is it maybe because your projectile destroys itself before that event has fired fully?
If you try cutting the logic that destroys your bullets, do you get anything?
Although it feels a little strange that you wouldn't get any errors in the log from that.
well it looks like they are using the player characters capsule
and when it gets hit probably if destroy the thing that hit it, so maybe that clears it definately worth a look
i would print the location see if that logs
A nulled pointer handed to GetDisplayName seems like it will gracefully return an empty string (no error), so might be that.
I'll try that, did wonder about it being destroyed too soon
Well whaddya know 🤦♂️
eyyyy
Nice one for that 😄
I think I ran into the same issue just the day before yesterday :D
Haha, always easier when it's fresh
The secret is creating so many bugs all the time that they're always fresh
debugging is quite a skill, you got to be able to think of all possibilities
In this case it's made even more tricky because the hit location, a value type, will be valid, but the pointers aren't!
Nah. It's definitely always option A. Except when it isn't. Then you delete it from the array and check the new option A.
Moved the destroy actor call to the reference that successfully casting to a bullet returns and seems to work nicely now
On the other hand. Why does this character need to care about the bullet? Why doesn't the bullet kill itself?
It did originally but it died too soon
Too soon for what?
You could pool the bullets I guess.
To register that it was a bullet that hit it and not something else
Wat?
Am I doing a stupid?
No. The bullet BP has the onhit/overlap. The bullet hits an actor and applies damage or gameplay effects or whatever. Then the bullet kills itself. The character doesn't need to know or care about the bullet at all. Just that it took damage from something.
any damage
The problem they were having above came from the bullets already being destroyed when the OnOverlap event occurred.
Which, I admit, seems a bit strange to me, because I have the distinct feeling that destruction is deferred a little to prevent stuff like this?
I get you, I should probably write stuff down, there's a reason I went this way initially and forget what it was now
But that way does sound more extensible so I'll look into it some more
Oh, my brain has stopped working it seems
theres an event called any damage, and you can just apply damage
i completely missed out on that in the first version of one of my projects did the whole thing based on variables
and custom events where you should just apply damage and use any damage event
GAS ftw. 😄 Can't wait til they make Attributes BP accessible.
Can you not spawn actors from anim notifies?
Where should I put an object that holds level-specific settings like lighting information, etc. such that any object that's aware could grab that obj and set its own values using it? But when I switch to a diff level I want things to use that new levels settings, etc. I thought about maybe the level-BP, but was wondering if there was some better place.
Yes you can. But route it thru the owner.
You mean like get the owner of the mesh comp and call a function on it?
I would do it that way
Level bp is never ideal, you can't get a ref to it from other bp classes.
Imo maybe world subsystem but that require cpp, if you want to use blueprint. The alternative is to just make an actor that act like a singleton (drop one and only one per world) and just use that to store your values
cpp for setup is fine, I'd just want to be able to edit the actual settings in the editor.
LevelBP won't work. Other things can't get your level BP. Not unless you make a parent LevelScriptActor that they could get. WorldSettings is also viable. World Settings puts it in the world settings tab when you open a level. LevelScriptActor is like a parent to your LevelBP, except that you can actually reference and pull data from it.
Did the custom world settings thing just now
I'm having trouble getting the socket that some child actors have been attached to
GrabPoints sounds like things are attached to them, not the other way around?
No, they are child actors of my weapon, that I can grab onto in VR (that part works fine)
I have them in an array, some of them have been attached to specific bones of the weapon, I want to retrieve those
I was talking about a Server RPC, which was these criteria, but wasn't sure what it was doing
Thanks again for the assistance so far all, still rough but coming together nicely to say it's early days
It's just a regular event that is called on server machine only. You may pass input to an event but no output
and when called on the server, if you create an actor in that function, it will replicate for all clients, right?
No it will run on the instance that exist in the server only
everything that happen on the server can be easily replicated and shown on all clients
Server rpc calls the event in the server only, period
Don't mix it with what you can do afterward
creating and spawning a pawn on the server WILL replicate it to all clients
that's just it
The node does some stuff behind the scene
it's not the node, it's C++ code which should in fact, replicate everything from the server that has been created from the server to clients
Just do a test your self. Make a function that print string, mark it as server rpc.
Of client call server rpc
Then you will see it only prints in the server
Again spawn actor node does things behind the scene
But the event server rpc only get called on server
every function does stuff behind the scene
You are mixing it
Server rpc only get called on the instance in the server. It's written in the description
That's all I can say
ye but you must do something in that rpc
it's not an empty function so that's what I'm looking for
I have no idea what you mean by that
what will happen when I put some code in the Server RPC?
It only runs on server
run on the server and not replicate?
Yes
Spanw node does things behind the scene which probably run client rpc. I haven't look into my self
So don't use that as example
aight, I'll ask c++
Server rpc = run on server, don't overcomplicate your learning
The event gets called on server only
W.e u do there, eg setting variable, print string , play anim yada2
So if u play anim in that server rpc. Only the server character will dance.
Clients won't see the character dancing
the animation just need to be replicated, when replicated from the server, it's just easy I think
Any Widget blueprint experts? Is there an equivalent to a Construction Script in a Editor Utliity Widget?
How do you get a command to run when the editor loads?
I need to GetAllActorsOfClass (lights) and enable them when the editor launches.
I'm even using a Listen Server type game so the server will also be a client :3
Still gonna run on the host computer
When spawning a particle system in a niagara anim notify blueprint, it's not possible to store the returned component in a variable. However, that's exactly what the built-in PlayNiagaraEffect anim notify does in c++. Is there some way to do the same thing in blueprints, or is this c++ magic?
You can't store it on the notify blueprint as they aren't instanced. You have reference to the mesh component in anim notifies - you can get the owner of it, and that should give you a reference to the actor that is utilizing the animation notify at the time of execution. If you want to store or retrieving something, then you should be able to either interact with a component or an interface on your actors to store and retrieve that value.
That all makes sense, but how is it possible to do this with c++? Are c++ notifies instanced?
I'm not sure it's doing what you think it might be doing. All the C++ version seems to do is set a variable and has a function to return it which is something you can do in blueprints. I think you may be trying to use the notify in an odd way?
The niagara state-notify caches the niagara systems in the anim-state-notify mesh itself
The built-in endpoints for anim-notifies are NOT mutable. You'd probably have to drop into C++ if you want to do something similar
Ok, so an animnotifystate is one that is instanced?
no its not instanced
it literally just stores it in the CDO it stores it in the mesh
Err sorry I'm wrong I just checked
The Advanced TimedNiagaraEffect state notify DOES store info about the components directly into the notify-itself though
I think I misremembered^^
TLDR the anim-notifies stores the niagara systems in the mesh and queries it via-tags.
the advanced notify does the same, bust stores the extra meta-data in the anim-notify itself
so what I was thinking of was actually a Multicast... Running on all servers + Client automatically... sorry for that missunderstanding from my part
thx for the help
You rarely want to use multicast just a heads up. Anything that has to be in sync, cannot be in a multicast rpc.
And another big tip is, the only way for client to communicate with server is thru server rpc
Server rpc, client rpc, replicated variable, on rep are your friends. Occasionally multicast is used but only for things that doesn't need to be in sync, eg special effects
ex, I want to have a ball replicated between everyone, sever and all clients, what should I do?
Tick replicate on the actor
If you are not using cmc, you will have to replicate the movement your self
tick = bad performance
The f
how would that be done, by getting and setting the location on each instance frame?
Tick replicate in the actor = mark the actor as replicated object
No other way. Movement are something that you send every tick
And even that is not fast enough
Client has to interpolate on their end
that's why mover exist
My level sequence won't play its cutscene if loaded from the menu, but works fine on the actual game map, is there something i might be missing, i am running it from the level blueprint
Wdym by loaded from the menu
from my UI menu, which is its own level
this works fine alone, though i am trying to deviate to different cutscenes using a actor to simply store a string variable dependant on which button in the UI is pressed
this is probably where my problem is
Probably want to focus on why it doesn't play when you open the map from other level
so its my logic above, i went around these branches it it plays fine
Debug
Is there something special about how Instanced Static Meshes are created that is causing 'On Cursor Over' events not to fire?
seems to be an issue with the variable being stored, I do have the actor in the level, perhaps a delay in it being loaded ..
it isn't loaded yet, so can't set the variable. Stored the variable in the gamemode instead and works fine.
is there any better way to animate actors? I made this animation in a very bad way and I'm still pretty novice in the engine so I would love to know if there's any better way I could do this than using 3 timelines 😭
You can do actual #animation , read the docs, they’re not bad for that category
tysm
Might be a limitation of tilemaps, might be a limitation of my knowledge, but shouldn't this do a gradual fade rather than the abrupt change it does here?
how can I get a data asset back from a class path? pattym showed me earlier this for converting a data asset down into a soft class path and to a string, the string is generating just fine, but how do I then get the data asset back from the class path?
where are you printing those strings?
I had them between the Update from the timeline and the branch
check after the branch where you actually set the fade. good chance your boolean is flipping back/forth
I'll take a look, cheers
Stays set to true all the way through 🤔, I'll add some more logging tomorrow, past my bedtime for tonight D:
I am trying to get the win screen to show up when the player enters a trigger box. This is a blueprint for that trigger box. I am not sure what is going wrong. The cast fails every time
You’re trying to cast the actor to the game mode
thats what i should be doing or thats whats happening?
No, that’s what you’re doing right now
Best to learn what casting does
There’s a bp comms video at the bottom of pins
Thank you for the info! Could you give me a small explanation for how you would go about it?
Sure:
- Learn what casting does.
- Get the proper reference or cast to the correct bp. In this case, if your function is in game mode and you want to check the player was overlapped, you would cast into the player char first, to make sure it’s the right object, and then either get the game mode and cast into it to access that function or use another type of bp communication to trigger the win, or have the GM function call in the player and do that part there.
Step 1 is the most important
Awesome thank you. Yeah I am watching that blueprint communications vid now
Here's what your code is literally doing:
Something began an overlap with me! -> is that thing a GM_Followgame? -> Yes -> Player Wins
-> no -> hello
What you probably should do instead:
Something started overlapping! -> is that thing a Character? -> YES -> get game mode -> is it a GM_Followgame? -> yes -> player wins
The reason why you'd have to cast the result of Get GameMode to GM_Followgame to call GM_Followgame.PlayerWins is because you don't KNOW that the current gamemode is GM_Followgame. You just know it's at least a GameMode
I mean, you know, but the computer does not
Thank you you've helped me understand the logic of it. I think im just plugging stuff in wrong. If i cast to the game mode after casting to the character i get this warning
im not sure what i would do to get game mode in your explanation
Here's what your code is literally doing:
Somethign overlapped -> was it a character? -> yes -> was it a GM_Followgame? -> yes -> player won
do you see the problem?
there's a node "Get Game Mode"
or i wouldnt cast to the player i would just check if whats in the trigger box is a player?
that's casting
casting is not an action verb
it's "Is this thing an instance of class XXXX? If it is, let me treat it like it's an XXXX"
Awesome thank you its finally firing properly with that get game mode as the object in GM_FollowGame
i kind of get why its working but still kind of trying to understand. I will reread your notes until i get it
Do you understant inheritance?
Like having access to the traits of a class?
ok so when you cast SomeObject to SomeClass, if it IS an instance of SomeClass, then you know that you can have access to anything included in SomeClass
When you call Get GameMode, you know it's a GameMode, so you get any variable or call any function in GameMode.
But you don't know it's YourCustomGameMode until you cast to that class.
If you have a Pet, you can't tell it to Bark unless you cast it to Dog
Pet can't bark, Dog can.
But you can tell it to Eat, as all pets can Eat
Yarp
yeah so im defining which game mode is being called
and the get game mode function is just that, to get a game mode
You're getting whatever GameMode is at the time.
oh okay
If the current GameMode is YourGameMode, the cast will succeed
then you can do YourGameMode things with it
is that destructive?
like if my game switches game modes and my code is calling that specified game mode but the game mode has changed
then the cast will fail
What you might want to do if you have a bunch of gamemodes is something like this
GameMode -> YourBaseGameMode -> YourGameMode1
-> YourGameMode2
-> YourGameMode3
as an inheritance heirarchy
and the "get game mode" would plug in to all of them?
sorry i totally get the logic of what you're saying im just having a tough time really understanding it node by node
That's not meant to represent nodes, but the inheritance heirarchy if you wanted to have a bunch of gamemodes
in all gamemodes, someone can win. Put htat in YourBaseGameMode
but only in CTF can someone capture the flag, put that in YourCTFGameMode
If you're new to this I would not really mess around with tons of gamemodes
Yeah these things can get out of hand very fast lol. I am trying to really really scope down for this being my first game
im a professional artist but when it comes to code im a baby
Yeah for now just treat GameMode as "the thing that tells you what pawn and controller and gamestate and playerstate to use"
win condition can be fine in Gamemode too
yeah i originally had it bound to when all enemies are dead then player wins triggers. But im scoping down and i want the win condition to be when the character reaches the end of the level
i didnt know how to get the binding of the trigger box to the win inside of the game mode
now i have to figure out why my UI function stopped working for showing the win screen lol
I can't seem to find the code for the advanced notify, but I do see that AnimNotifyState_TimedNiagaraEffect adds a tag to the spawned effect, and UAnimNotifyState_TimedNiagaraEffect::GetSpawnedEffect looks for that tag when getting that component from the mesh. This sort of makes sense cause the timed notifies only spawn systems attached to the mesh comp, so it always knows where to look for the Niagara comp.
UAnimNotify_PlayNiagaraEffect doesn't seem to do any of that, which is what puzzles me. It defines a protected variable UFXSystemComponent* SpawnedEffect, and UAnimNotify_PlayNiagaraEffect::GetSpawnedEffect just returns that variable. UAnimNotify_PlayNiagaraEffect::SpawnEffect uses the same library functions available in blueprint to spawn the effect, and UAnimNotify_PlayNiagaraEffect::Notify simply sets SpawnedEffect = SpawnEffect I'm assuming the explanation is hiding somewhere in the Niagara Anim Notifies API that declares the SpawnEffect function, but it's still unclear to me how it's possible to do this in c++ and not in blueprints, if they do exactly the same thing on their face.
@stable birch
Oh I guess the advanced timed notify is defined by the same file as the regular timed one, strange.
Ah I see, two classes in one file. I'm not a programmer, so that's the first time I'm seeing that in unreal cpp.
I have like 5 in some files lol
if you count enums and structs
Makes sense if the stuff is closely related. In this case I can see why it would be kinda obnoxious for the advanced notify to have its own file, given how similar it is to the base one.
im not sure why my win UI doesnt show up on screen. Its from a tutorial and i did rename my main widget so im tempted to just start over. I get this error with it
this is the event it is triggering
all the stuff after it works. My movement gets disabled like its supposed to
looks exactly like it doesnt know the new name
im not sure if the reference is broken or something
well there is your bug
oh my god...
🤦♂️
all i can do is make pretty pictures it seems
thank you both for your help
Does anyone know if it's possible for an actor component to override a function from its parent in blueprints? For example, I have a bunch of different actors that are children of "Class A", and Class A has a function "Function A". I'd like to be able to add a component to some of those actors that overrides Function A. Is that possible?
Children can only override their parents. Adding a component does not override existing behavior in an actor.
Unless of course, that the actor class was already looking for said component.
OK, many thanks 🙂
This is inside of a Widget. I am trying to set a variable that is within the BP_ThirdPersonCharacter. However, it doesnt seem like the BP_ThirdPersonCharacter gets the updated result?
What makes you say that
Youd wanna avoid directly setting other classes variables directly btw
As a general practice/rule
If you need something else to edit it, make a public function for it
I have a BP_Projectile that is supposed to deal 20 damage if the Player Class = 1, but when the player selects 1, and shoots it still deals default damage.
That way the actual owning class can handle it as they see fit (validating, updating something else etc)
Youd need to show some more logic for this
The original block is a component hit
This is multiplayer?
When the player's class changes after the game starts then it doesnt recognize the change, but if its set to 1 for testing before launch, it works fine
yea
Just because you set a value on the client side doesn't mean the server automatically gets it. You need to send an RPC to the server indicating the choice and then have the server set the value itself. If you need others to know the value, then it needs to be marked as a replicated variable as well. Finally, you can't use GetPlayerCharacter X properly in multiplayer as that may not be referring to the correct player.
Widgets: Get Owning Player Pawn -> Cast to Character BP.
In your projectile, hopefully you set the instigator or the owner of the projectile as the pawn firing it. You can then use the owner or instigator and cast that instead of using GetPlayerCharacter X.
Yeah multiplayer is always a "gotcha" experience for those who have yet to walk the path
I am brand new to ue5 in general and super lost on getting this to work tbh
Hey all! Just downloaded unreal yesterday, working on a quick little game to get familiarized with the application. I currently have an actor, that's just a mesh block, an input action to move it, and an input map controller. I have not been able to get the inputs to register on the actor, all tutorials I've looked up use a character and not an actor. Any advice? Do I need a Player Controller too?
Youd want a player controller yes
But inputs can be assigned to any actor
Pawns just come with some basic methods for moving etc
Characters take this. A step further with its Character Movemenet Component (CMC in short)
Then you may not want to be trying to do multiplayer at the same time as just learning Unreal. Get familiar with Unreal in general first and once you're more comfortable then you could consider dipping your toes into multiplayer. Multiplayer makes it harder as it adds in a lot of "Why doesn't this work" kind of questions with unintuitive and sometimes hard to troubleshoot reasons.
college assignment due tomorrow
Sounds like a bad assignment
If they havnt covered the core concepts of multiplayer
I took the prereq like 2 years ago I remember nothing abt unreal
A uni tutor that have sense of awareness shouldn't allow multiplayer game for first project, unless they are clueless them self
Why would you pay someone to do your homework if you are serious about getting a job in a game dev industry
Also this is not my entire homework this is one single widget out of 50 others, just happens to be the only one that is replicating variable data. And I am not asking for the answer I am asking for help 1on1
Hey guys! Is it possible to move plug in folders from the engine folder to the project folder without everything breaking? need to do it for the build
Thank you millions brother. Got it to work from your help
Hello my modeling tool in the skeletal mesh editor is causing my unreal to crash. The goal is making skeletal meshes from static meshes (they’re combat vests) and making it a clothing my character can wear. However it doesn’t necessarily fit him so I’m editing the vest meshes itself and it’s crashing. Any tips appreciated
It's not exactly an actual solution, but maybe toss it in Blender? I'm not super well versed in the modeling tools in Unreal, but last I checked they were still experimental and weren't quite there yet compared to a dedicated tool like Blender or Maya.
Your project folder and engine folder have separate plugins. Anything in the engine folder will work for all your projects. So if you need a plugin for packaging sake in your project, just copy it over. Shouldn't cause any problems.
Just copy the plugin into the project folder? but keep the one in the engine folder as well?
I still get the "This type must derive from the 'ModuleRules' type defined by Unreal Build Tool"
Copy the plugin you need (the folder for that specific plugin) into the plugin folder of your project.
If your project doesn't have a plugin folder, you'll need to make one.
If it's in the engine, then it should be able to build....
What's the entire error?
Are you building the the project in VS?
Or just trying to package?
@glossy cloak I created the plugin folder, and copied it.
this is the entire error
Expecting to find a type to be declared in a module rules named 'VRM4U' in UE5Rules, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null. This type must derive from the 'ModuleRules' type defined by Unreal Build Tool.
the creator of the plug-in says the plugin should be in the project folder and not the engine folder
but if I move it from the engine folder into the project plugin folder and fix up redirectors, there are a lot of errors
and I am just trying to package to test some steam functionality
Did you put the plugins folder in the right location?
Oh never mind. It does go directly in the project folder.
Right next to the uproject
You might also need to turn the plugin back on after you remove it from the engine plugin folder.
Is it a C++ project?
If so you might need to build the project again in VS.
¯_(ツ)_/¯
its a BP project, I am no programmer
@glossy cloak plugins folder should be in the project folder and not in the content folder right?
Right.
oh i put it in the content folder ...
Me neither! lol But my project is a C++ project because I needed dedicated servers for Steam.
Hah! That would probably be the issue. I should have known when you said you fixed up redirectors.
Hi!
If I want to declare a local variable of a function, do I have to do it here?
Thanks.
I've found it:
@glossy cloak thanks!
Just double checking; If I spawn an actor at runtime, the construction script won't fire at all right? Construction script only works in editor time?
It should fired for actor that is spawn at run time
But it appears it does not fire on actor that is preplaced in editor.
You have to update their location for the construction script to fire
Right yea. It is all working fine in the editor. I am just trying to make sure that when I spawn an actor during runtime, the construction script doesn't fire, seen as I don't want it to do the same logic in the editor as during game time.
Say what?
If u soawn during run time the construction script should fire. Just do a print string and find out
If you want something to happend in game, use begin play
Construction script ALSO fires at runtime. Before Begin Play fires. : )
Gotcha, that is good to know. Then I will rework some of my logic to take that into account.
Yea, I was just using certain functionality in the construction script to make sure I could see the changes whilst designing the level. But now I want to do similar functionality when these actors are spawned at runtime, so I just had to verify what the order of things were 😄
Not for actors that are preplaced in editor afaik
@grim sand I feel like you are trying to misuse construction script. But it's just a hunch.
Seems like it does based on this print string:
Too many actors, test with 1 actor that is preplaced in the world
Wait for the text to dissapear then play in editor
This is from play in editor, the number of actors will not make a difference here in terms of execution order
Prints are happening from bottom to top. So yeah. Construction script first.
Execution order isn't the issue, constructor would get called first ofc
Same scenario but with only 1 actor. You can ignore the print string about the save game
Placed actors in editor also trigger whenever they're updated in editor, but also when the game starts at runtime.
What I'm saying is, it shouldn't run on actors that are preplaced in editor at run time as theirs already run when placed in editor
Nah. Still does.
U can run it again for editor placed actors by updating their location or hitting compile in bp
The print string shows that the construction script does indeed run on actors pre-placed in the editor
K , I guess I will test later
Sounds good 😄
I had the same opinion with both of you until someone came with an issue yesterday
So it's something that I found out just yesterda
Right gotcha, I am curious about what the scenario is of that issue
Maybe I'm crazy. I'm about 99.9% sure though. lol
I just stepped through some construction script code a few hours ago on my AI when it was spawning.
Spawned actor will run construction script
It makes sense construction script would also fire at runtime, construct tends to fire every time there’s a change affecting the object, running the program would be a pretty big change ig
I might have found some more info on where the confusion might come from. It appears that the construction script won't run on placed in editor actors, when the game has been packaged. The last time the construction script fires, is during the packaging process.
Yea it definitely makes sense. I just need the actor to do different things based on whether we are in the editor or in run time.
So I'm trying to make animations play randomly when attacking and instead of filing up a ton of space inside of blueprints I found this comment
How do I go about doing this? Any ideas?
Make an array variable of type Animation Montage. You can manually add all your attack montages here or do it dynamically wherever you want by simply grabbing the array and "add"ing to it.
Then you can grab the array variable, drag off and do "get random" then play that anim montage.
Mind you that random might be the same element each time 😀
Ah thanks a ton! I'm not too familiar with blueprints yet so that helps a ton!!
If you wanted to avoid that duplicates I can show you how to go about doing that as well.
No problem. Are you handling all this on a character?
For AI, I assume?
You can make a BP_AI_Character as a base class. Set up the array variable on it and build your AI logic that makes them move, approach enemies, attack, etc. Then you can make children blueprints like BP_AI_Character_Zombie or something and then change the array to have new attacks.
You could also add other variables like... movement speed, attack damage, maximum health, etc.
Player character right now! I was trying to make a system similar to metal gear riding's slice mode and instead of the slow motion + plane that did the cuts I instead went with a collision object on the sword to trigger an overlap.
So I needed extra animations to test the cutting out. Thing is, my blueprint right now is CHAOS
Like it's incomprehensible due to how many nodes are connected. So if sn array can fix that imma go with that any day
Is that a video a tutorial youtube? Totally not worth watching
A do once after input... and the endless spaghetti to the reset node... this is not how you want to make a combo system
Yeahhh even I can tell it's not the proper way. He even used a delay to not allow the player to repeat the animations instead of a variable being set to true false
But well, I got no other way to learn
You are gonna be better off not learning from him at all
If you want to look at some examples (inventory, combat, stats) you can look at dynamic combat system in market place.
They are not free but it's all done in blueprint and it can be a stepping stone to learn.
You can see how combos, input buffer and inventories are done
Lol yeah... anytime someone is looping a wire back to a node that's a red flag.
As well as A.I
I can think of maybe one or two use cases for having a wire running to the left.
Already got lost, there are toooons of array types inside of the variables options 💀
Almost none related to animation either aside from the cached animation array
Make a variable. Look for "Animation Montage". Then change the variable to an array.
Hello. What is going on here? https://i.gyazo.com/9a76c6c75ae5ad30204b16d8d53e9837.mp4
This is super annoying 😦
Umm... is there a lock icon to the left?
Or is there some construction script shenanigans going on?
The code is used in construction script. But the changes I'm making here are in a datatable?
A datatable can never be changed from the outside, right?
Huh.
What's the actual variable type? Just a rotator?
Ok I found something really weird
it's a struct
that contains all sort of variables I use in the datatable
but as you can see in the struct variable itself, the default value is set to -0 and can't be changed
usually setting the number to something else, compiling, and then setting it back fixes that
ah yes it did!
it's fairly new
It fixed the struct issue, but in the datatables it's still acting weird sadly
I managed to set the default value to 0 now in the struct
Ah. I do about 95% of my work in UE4 still thanks to an outdated project, so I'm well versed in the bugs over there. lol
but in the datatable it's still like the first gif I posted
very weird, you should just make a new one
Does saving and reopening it fix it?
sometimes you learn not to fight it
Make an entirely new data table? That might not be reasonable if it's got a lot of data in it. :/
but my datatable contains hundreds of items with lots of data 😢
which engine version are you using?
5.0.3
Any reason you haven't moved to at least 5.3 yet?
I tried, but it caused a crash upon launching
5,1 and 5.2 worked, but advanced sessions plugin is not supported on those versions
only on 5.0 and 5.3
make a duplicate, and update one at a time, if 5.3 doesn't work, check the logs
Is this the only time you've ever run into this issue? Does it do it with a regular vector?
I wouldn't recommend updating your main project unless you have source control
first time encountering the issue yes
I have source control
What I will try is to recreate the rotator variable in the struct
see if that works
only redoing the data for that rotator isn't that much work
you really should just move on from 5.0
iirc it had a lot of bugs
5.1 came out really fast
My zombies when attacking knock my player into the air, how can I prevent this? Any settings in the character blueprint I can use?
Found the issue. The issue is transforms. When splitting up the variable in a vector and a rotator there are no issues. It only becomes an issues when they are part of a transform variable. So lessen learned. Never use transform variables inside a struct.
How do I go on from here? I want the player to not be able to spam attacks but since the play anim montage doesn't have a "on complete" end node, I can't set it up like previously
A delay wouldn't really do since all anims have different durations right now
Im not the most knowledgable but have you tried a "do once" or a "Do N" node?
But the do once will repeat upon completion right?
No, you have to reset it manually in your code so
It wont reset until you tell it to
Oh you are right
But I gotta reset it for sure
Nah it acts exactly like before. So it would still need a delay which won't do 🤔
So holding down the attack button is what plays the attack animations?
maybe not in 5.0.3 👀
Nope, just tapping once
Why is it on triggered instead of started or pressed then?
do you have physics enabled anywhere on the two?
There seems to not be an option for pressed
Should I do started? Is it any different even?
I am currently zipping a backup so engine is not open. But if I turn physics off for both the character and zombie it should be fine?
Started should work, im not 100% sure on the difference though I cant remember what it is
it should be, physics is known to cause a lot of janky interactions like that
Ok thanks will see how it goes, thanks.
Never use triggered, always started
Triggered gets called multiple times (I think)
If it were me, I would use a do once node, and reset it after the attack animation is done playing. Obviously you are designing it so when you reset it is up to you and how you want your game to play
Oh but that's the thing, it doesn't have an on complete node at all
So I'm not able to repeat the do once after the animation plays
So you can just spam click to infinity
Oh I see
Oh good point I have to me mindful of that
Whats the return value on the animation node?
Well started would only get called once, so use it as a pressed.
This you mean?
Yeah but what is it? A float? A vector?
I havent messed around with animation nodes before but id assume that returns how long the animation is or the percentage through the animation it is
If thats the case you could hook that up and check if its zero, and if it is then reset your do once node
Oh let me try that then
so i have this code it executes in order and i have this problem , the first time i get printed decrease and the new value (the second print) s everything works fine, the problem is that from the second loop i get only the decrease text printed but not the new value (the second print) what couldbe the problem , i can't understand what i am doing wrong
Oh alright I think I can give that a go
Oh wait what, the less/equal boolean isn't able to be connected to the reset?
I thought a single boolean could fix it
To check the value I mean
I tried to turn it into a variable instead and even though it connected both 0 and 100 didn't do anything it seems
Let me try the branch
You shouldnt be setting its value to anything
Also there is a "play montage" node that has a "on completed" execution line
Oh yup but would that be the same as the play animation montage?
They are similar but I think for play montage you have to input your mesh
Not 100% as like ive said, not a big animation guy
Well damn that actually worked
You are a god
But why wouldn't the play anim montage have a on complete node? Makes no sense
Seemed more convenient
Like they seem so similar too
No clue, there is probably a good reason, some reason you would want to use one or the other
But glad I could help gamer
if I've serialized a transform into a string, how do I convert the string back into a transform?
Thanks a ton I mean it
Saddly there is not much one can find online about these things
Ive had the same issue dw. Help with ue5 stuff is usually more broad strokes, so if you have a more niche problem it can be hard to figure it out on your own
Hmm none of them are simulating physics
There are two play montage nodes, one of which is a latent node and can only be placed in the event graph. This is the one that has the complete, and notify return pins.
The latent node requires the skeletal mesh while the other one is specific to the character class.
hey, since you're around, do you know how to deserialize a transform? Like once it's been converted into a string how do I make the string into a transform again?
That's a good question, one sec I'll have a quick look.
Ah fair enough thanks!
I keep getting this blueprint runtime error over the branch on the bottom as shown
Any ideas?
It was working perfectly until a second ago. It just suddenly started doing that
I'm suprised there isn't a function for converting a string to a transform but either way, if you're using the transform to string, you can get it back to a transform like this. Not the cleanest method but should work.
huh... yeah that is kinda weird that it's so sketchy
I might make a function out of this
should work right? just have the string on the input node, transform on the output? turn it into a pure function?
Yea, that's what i've just done lol. Cleaned up version.
thanks man 🙂 I'm really susprised how difficult it is to deserialize stuff given how easy it is to serialize. Spent most of last night trying to figure out how to get data assets back out of a string.. like I got to the point of the class reference but there's no node to get a data asset from a class reference.. I ended up having to go through a soft object path in the end...
Yea it's one of the downsides to doing it yourself. The save game object class does it for you with the variables you put in it but that not ideal when you're wanting a more generic approach for some of your systems.
I think there's a json plugin you can enable that allows you to build to and from json. Not used it but it might help.
do you know what it's called so I can look into it?
hey, sorry for writing now, but you think I could use a sequencer?
The top one but I have just noticed the bottom one that might be better. o.O Granted its experimental lol.
I'll look into their documentation, thanks a lot
I can't find much on the serialization utils but if you find anything, feel free to share. 😄 lol
so slight issue, I followed your method for deserializing the transform but it doesn't seem to have worked... when I loaded in I got put to 0/0/0
For the substring searches, make sure it includes a space. 'Translation: '
ah, that might have been the issue
nope, added spaces and I'm still getting sent to 0/0/0
how are you serializing the transform into a string?
just using a transform to string node like this
Show how you've set it up to deserialize.
this is inside the function
idk how readable it is but, I did it basically how you showed me
Is there like a Key-Value pair asset that can be saved to disk and access kinda globally? I need to go from my enum "Member type" to the actual blueprint to spawn. I was hoping there was something for maps like there is for tabular data with dataTables..
Can someone explain to me the difference between having this eye open or closed on a variable? and explain it like im 5
tag on reply pls
@jagged moss https://dev.epicgames.com/documentation/en-us/unreal-engine/blueprint-variables-in-unreal-engine
scroll down to Public variables
Maybe because the string variable is never set in the start of the function?
that's not the issue, we found what the issue is later
Ah, alright
also you see the "string" input variable? That counts as a variable within a function so inside a function with an input var node if you type in "get -variable name-" it gets that input node
Ohh, I see
I'm attempting to rotate a cube based on user input, however I want to dynamically adjust the pivot pount to be the bottom edge of the cube (so it appears the cube topples over). Is there a way to dynamically change the pivot point before rotating within blueprints?
instead of linking you an article, Ill give the one line answer. Eye open is a public variable and can be accessed outside the class your looking at. Eye closed is private, and can only be accessed inside the class
I have a simple question. When i press the C key in the BP_FirstPersonCharacter Graph, and i have a BlueprintActor (TestStringBP) which should just print a string as soon as the C Key is pressed in the FirstPersonCharBP, how can i send a message to fire the event in the TestStringBP? I mean i was working with BPIs already, but i can't figure this out because i can't get the message node to show up.
If the cube is an actor, perhaps you could add an invisible component inside it, and then you rotate the cube around the center of the component, which you can move around.
@stoic surge
So i want to use a node to inform the other BP to trigger the event
I'll give this a shot, this is a good idea. Thanks!
Hope it works out!
So i want something like this :
Guys, can someone tell me please how can I increase the size of Capsule Component more then 88 points? My slime mesh don't fit correctly into it. Also, if I wanted to make slime bigger in the game I will need to increase capsule component even more, isn't it?
The radius can't be larger than the height.
Hm, but what to do with character which longer in width?
There's not really a good solution for it using the default character class. You would have to create you're own base using the pawn class and handle collision (and movement) yourself.
Got it, thank you,.
Can someone please help me, its driving me crazy since hours, i looked up so many videos
you didnt even ask a question
recreating the CMC isn't a good idea I think
Alright. I implemented a interface in both my FirstPersonCharacterBP and in my TestBP. If i press the B key, it should fire a event in my TestBP (A print string). How do i do that from the CharacterBP?
Struggling to setup MakeARFilter... I'm just trying to get every actor class under my Content/MetaHumans subfolder recursively... Any idea how to set this up?
you create the event in your character bp and then call it from the test bp
In blueprints probably not but there's nothing wrong with creating you're own movement type component if its needed. Its not an easy task though.
But i want to do it the other way around
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
You only need to implement the interface on the class that needs to do something when it's called on it.
As for your issue, implement your interface on the test BP where when called it does a print string. From the player character, get a ref to the test BP in the level and call the interface function on it.
Could someone help me? I want to create Map that will let me based on which Enum I picked, it will show me other option.
Like if then in Data Table I will choose Hunting Quest, I will get struct info S_Hunting Quest. I want to see only one option, right now I'm seeing all. Do I have to create another array of Structs?
So like this?
yea, as long as your test BP is valid, it will work.
I don't believe this is possible. Not in BP anyway.
I have a set of actors, how can I get a specific element of the set using BPs? What I'm trying to do is get the first actor from the set and check it's world position.
Ok
Convert to an array and get index 0. Generally, the array tends to be in the order they were added to the set but this isn't always guaranteed.
Its valid and in the level, but it doesnt print
Thank you.
How do you set the reference?
Inside the FirstPersonCharBP (the sender)
So you're not setting the ref. When you create an object base variable, think of it as map on how to a specific 'type' of object. Until you 'Set' the variable, there's no instructions on it.
just use delegates, then u wont need a ref
But didnt i set the object reference to my class already with this variable?
That just sets the type of object it points to, not where the actual object is.
Holy, and how do i tell him where it is?
maybe u should watch the video i sent you instead of guessing random things
Hey guys I have been working on a clicker/idle game entirely in Blueprint. My game is coming along well, but I've encountered an issue with the display of my primary resource As the numbers get very large, the display starts to lag and the generation changes too quickly, making it hard to read.
I've heard that large numbers are better handled in C++. Is it possible to manage the formatting and display of these numbers in C++ while keeping the rest of the project in Blueprint? If so, will this improve the game's fluidity?
Thank you for your help!
Now after thinking a bit I am not sure if making a main playable character with Blueprint Character class by following guide on youtube was a good decision. In my game main character have different shape keys which make character mesh much wider in shape. Since Capsule Component size limited by mesh height that mean when my character get wider collision wouldn't work correctly. Can someone tell me please if there is a way to add some additional invisible capsules or meshes in Character Blueprint to set them like additional collision?
As source said, you should watch the video, it's pretty basic stuff that's essential in using blueprints.
No, the character movement component that handles the movement only uses the capsule in the character class. (I checked the C++ for this one)
The "Select" block gives out an array. Is there a way to get just one item from the array?
drag from the array and search "get"
and give it 0 index
Oh it's that simple. Thanks!
you dont have to use c++, you just have to change your use of numbers
@limber parcel I suppose that using letter when the numbers get too big must be a good fix no ?
no but you could do something like if your value gets bigger than 1 mil, you add 1 to another variable and subtract 1 mil from your value, that should keep all your numbers small
and for displaying you can just revert it
@limber parcel Gonna try something like that ! Thanks
now that i think of it, you can also just divide or multiply the values to make them small
@limber parcel but for internal calculations the values will always be huge, is that not a problem?
you can also use it internally and do the multiplication
but yeah, numbers are limited and you have to keep them in check
question, im trying to set the "item drop" array with the amount of available classes (children= in item mesh parrent
get all actors of class will only pick the ones loaded in the map already right
how can i get all available ones ?
anyone :/?
Hi guys, not a question but just wanted to thank everyone for all of their help and input the last few weeks. Thanks to you all, I’ve been working on my project for the past week and have been really excited to find that I’m learning how this stuff works and I barely have to look things up anymore. This is an excellent community and I’m very appreciative of you all.
possibly
right now i implemented a good crouching system, the problem i have right now is when im in a tunnel, then press the sprint key (left shift), my character will sprint, then walk normally (speed of 600), do you have any idea how to not running/walk in crouch mode, thanks.
added sound reduction when in crouch mode:
<iframe src="https://blueprintue.com/render/sujzuocw/" scrolling="no" allowfullscreen></iframe>
sprint nhandle and increase footsteps sound rate:
<iframe src="https://blueprintue.com/render/5bjkqdjd/" scrolling="no" allowfullscreen></iframe>
just post the link to the blueprint ue.
Not the html with it
but it's simple, when you crouch, set a bool saying your crouching.
When you sprint, only do so if the crouching bool is false 🙂
you say to my Google Drive folder with the proyect in it?
after or before the variable "wants to stand up"?
Ok, so you already have a boolean for when you're crouching.
Check that boolean before sprinting
Not sure why you have this branch though on the crouch, it's useless
me neither, hehehe
i will try now...
mmm...
not working
i mean
how do i connect the boolean to the springint system
I have this question. I have created an actor with logic inside and it functions like if you press a switch it asks the door if it has enough switches on and compares it to the amount needed and if it matches it opens. Is it hot-swappable in terms of can I change this into the doors I used in my prototype? So like when I was making my level I could drop an asset and change the mesh by choosing the option to on the details panel or dragging into the square.
Is there a Node that allows you to change the visibility of an object that isnt in the Blueprint?
Like you can make something disappear something that isnt in the controller BP
just get the thing and change its visibility
just change what mesh Dooor uses
you can do that in the level
Show the thing you're actually trying to modify
and where you're trying to modify it from
So, I wasted a lot of time with trying to find tutorials about how to use Pawn Class and in every single one tutorial even for basic movement setup I need to use C++. I guess that mean if I want to use Pawn class I need to learn C++ first or get the *** out from this idea.
What i want is to make that bridge appear when you push the white button that is on the floor
Mario 64 Style
what are you trying to do ? why you need c++ ?
hey guys, is there a way to make the ExponentialHeightFog periodic so its not on all the time please?
Well, in my game main character have different shape keys which make character mesh much wider in shape. Since Capsule Component size limited by mesh height that mean when my character get wider collision wouldn't work correctly. So, I can't use Character Movement Component which bind to Capsule Component and I need to control my main character from Pawn Class. Since I am a complete noob I started googling to how to use Pawn Class. As I can see there is nothing like Character Movement Component and I need to create Movement from scratch, but all tutorials which I find use C++ for that (for example if you want to move your character forward/backward you need to write those lines of code) 🙂
there is floating pawn movement
Use a material parameter. Basically make the material all clear so you don't see the bridge opposed to trying to make the mesh vanish.
Im not sure if you can make what you have used to make the bridge vanish on and off.
But there is a BP node called 'Hidden" you could try that.
Ok, thanks, I am going to google that one now 🙂
idk how gravity would work with that
you may need to do your own or maybe there is another type of movement but i know floating pawn movement will give you some movement atleast
Gravity don't work with floating pawn movement? I am using physics assets which use gravity, I guess...
You do the following
- Get all actors of class
- find the class you are wanting to get a ref to
- get a copy of that
- promote it to a variable
- and that is your reference.
"floating"
idk what happens with the physics have not got into that yet
i just used the floating pawn movement in a project
You might also want to do a check to see if it is valid "Is Valid" otherwise you might get a warning if it doesn't exist.
It may not exist for a few reasons, hasn't loaded in yet, been destroyed etc. So its worth making sure it is valid before you want to try and use that reference.
Keeping in mind that '0' is the first in the list if there are more than one of the same class in the level.
what is it just an object ?
"on the scene" by element you mean you just added a box to the scene ?
it should create an actor
which you can drag from the outliner ?
Yes
It's a Bsp that i transformed into that bridge
Doesn't it need to be a blueprint to be an actor?
i'm pretty sure if it's in the scene its an actor of some sort
Yeah you can make animation sequences
Give your button BP an actor reference called MyBridge.
You can SET it in the level
Then when the button is pushed you can show MyBridge
Everything in the world is in actor.
It should not be bsp tho, convert it to a mesh.
Thank you guys for the great video, i learned a lot but it did not solve my problem. I finally solved it and i was forgetting that the engine cant handle what happen when multiple actors are spawned in the world, thus why i need to set the object reference and why its not set by default
Got it working like this :
Now There's no collision 😕
My character falls through the bridge
Fix that
Is the thing a mesh now?
You shouldn't really be using the get all actors by class node like that. With it being to call an interact function, it can't handle being able to interact with multiple things.
You probably need to look at how to setup an interaction system to handle what the player should interact with. (Normally what they are looking at within range)
Yes
Yeah i just did this for testing purposes, i will do it properly now. I just was figuring out all the time why the damn actor reference cant be set until i realized there cant be a actor reference from the get go because if i have multiple in the level the engine does not know WHICH im referencing
hi, I've got a blueprint set up with a timeline with the length set to 1 and playrate set to 15. When I try run it the timeline is only printing the first and last numbers from the float track. Is there any way I can get it to print the other numbers inbetween?
Try something like this. When you press the input key, it'll do a linetrace from the camera (forward) 200cm (2m) and if it hits something, it'll call the interact interface on it.
Traces (line and sphere) are the main ways to dynamically fine actors in the level.
So edit its collision
i mean drag that variable to the right a bit and lift the add up it would look alot better, thats quite the stretch you got there
try not to cross lines if your showing it, makes it a bit more difficult to understand
it's really visual, not a big deal
also i don't think you can rely on 1, it may or may not be the one your looking for
i'm just not sure if the order is reliable or not
Casting never seems to work for me. I'm trying to read a variable from a user widget in another user widget. I have a user widget object reference variable going into that cast, but it always fails
I'm troubleshooting my chatGPT response within ue5, using the Json Blueprint Utilities (bottom-left). I have to use 3 "Get Field" nodes from Json in order to get the "content" of the nested json.
I'd like to just use one Node. Is there a format I'm missing out on for "Get Field" ? Like my example "choices.message.content" or "choices/message/content" or something? (both don't work)
Are you appending the strings to output that as one line?
Step with breakpoints. Is the reference valid before the cast?
Could you give me an example if you can please?
It should be, it's just a variable with the type set to user widget object reference
I dont really understand how to call the acot in this case
Don't assume. Breakpoint it and be certain.
What's the proper way
R-click the node, Add breakpoint, Run
It's a very good thing to learn to figure out why things don't work
I meant in reguards to getting the object refrence, if this isn't valid what would be the proper way of getting it
It will take a moment for me to boot up Unreal so I say the things correctly
Depends a bit on what is going on and what the relationship of the objects are, and how often the function is called.
Back in 5
Basically, if you can guarantee there's only 1 widget of that type going to be alive, you can use GetAllWidgetsOfClass. Another ( and better in many ways ) is to have an Interface ( which decouples things, which is always good ) and use GetAllWidgetsWithInterface.
If there are many widgets of that type flying around, we can ponder that if need be.
If you are going to be using it a lot, you might want to cache the reference on a BeginPlay or OnCreate, but that again depends a bit on how things are setup and in what order
In any case, debugging is a core skill : https://dev.epicgames.com/documentation/en-us/unreal-engine/blueprint-debugging-example-in-unreal-engine?application_version=5.3
Yeah there would be multiple of the type, the current situation is when the diologue widget is active it's going to start an interface event in the ui widget which determines if the ui should be visible. The current logic I'm trying to add is if a boolean set in the diologue widget is true, the ui shouldn't display
Well, there are many ways to attack it. First thing of course is to make sure you can get the widgets. Then you can decide how to pick the one you want to read by some logic. Maybe it's the topmost one, or it has a certain variable you know, or maybe it's enough to just look through them all and if any one of them has the boolean, that is enough to make the decision.
That said, it sounds like it might be wiser to have some sort of say DialogueController which handles the Dialogues and the state of the rest of the UI. In my opinion the Dialogue Widget ( or a variable within it ) itself should maybe not be responsible for the big UI state
But, best to make it now first how you have envisioned it perhaps
So, I'm following a tutorial for creating an RTS style camera movement system. During the video he uses an AND boolean in the branch to determine whether to apply both the modified X and Y value, and then duplicates the code (his is the first image here) with a specific check for x or for y afterwards and applying those individually.
I'm not sure if I'm missing something, but couldn't I just... not even check if the x or y is not 0, and apply both of them directly to the add actor local offset? If either x or y are 0, it will just multiply it out.. and be 0... and then it would add to the local offset nothing? So nothing would change which would be completely the same thing???
The function should only be getting called when the player pushes a movement button so.. seems like it should be simpler than even what is here.
I mean the diologue isn't the only thing affecting ui visibility so I just kind of consolodated everything that could affect it into one interface event in the ui blieprint. Also touching back on the breakpoints, I don't believe I can add one to the variable, so I can't really do much with them considering I already know the cast is failing
yeah, seems like a somewhat redundant check
show a screenshot of the failing cast area
If i don't set a local variable in the function, I can just do this, too. Looks like the same.
EDIT: For those of you who might search for why you don't want to simply plug the X and Y directly into Add Actor Local Offset, part of the problem is that it applies that movement directly. What this means is the while the single directions would apply everything perfectly fine, having both of them applied at once actually pushes the velocity faster.
Luckily, there's an easy solution: Normalize. In the example I have here, all I had to do to fix this issue was normalize the X and Y axis -before- multiplying the movement and speed modifier. You can actually just multiply the normalized vector directly and plug it straight in. That should fix any weird issues. Good luck, future you.
Wdym, like do you want a print statement or something
Yeah, I generally use local variable only in larger functions where long noodles make things painfully messy to read
Screenshot of Blueprint where the Problem lies
Also now I seem to recall you can actually Get any parameters passed into a function anywhere even without a local var
This cast fails
So you can breakpoint the cast, then hover over the reference input into that node when the debugger is stopped, and see if there is anything there
So right now i have this system for increasing and decreasing the stamina of the player, at the creation of the AC i create this 2 timers and based on the condition it increases or decreasing the stamina, this works fine but i don't like that the timers works 24/7. I thought about another way to do this putting them inside a method and calling them from the BP_FirstPersonCharacter when i click shift(to run and start decreasing) and when i stop to increase again, the problem is that i can not have async inside methods so i can not put this in a methods, any other way to do it ?
If you want, you can create the timer as needed, then ClearAndInvalidateTimerbyHandle as needed. Saving in this area is probably pretty marginal though, I wouldn't really worry too much about it. Just Starting and Stopping it as needed should be fine
Yeah, so there we see that the Reference is no good. You need to look at where you set that Reference, what is going on
So setting a variable type as the object reference will not work
Yes: The reference needs to be set to something that is really created and existing at runtime
Not just a variable type
So, go back to the GetAllWidgets... stuff I mentioned before
Oh yeah, one option is also to set the variable at the moment the widget in question is created. That can be a very good pattern, depending on the situation
thanks man , for now i am gonna do like you said using only 1 timer and not 2 saving a little bit more
Thanks I was able to do it with get all widgets
Guys, I was still looking for some "hack" way to add collision in Character class when character wider then Capsule and I found this old video where author show how can I just add another sphere collision which will work as additional collision to Capsule component. I am too stupid to understand how it works, but I tested and it works. The real question now is am I able to move location of this "sphere collision" with blueprint to dynamically change collision area when needed?https://www.youtube.com/watch?v=H3U6D8XAFRE&t=66s
Make sure the new sphere collisions (or any collision shapes) overlaps with the original capsule collision.
As long as its not root object, I guess MoveComponent should work?
It worked, thank you 🙂
But... If this thing work why nobody use Capsule collision object to solve issue with Capsule Component limitation? Can someone tell me please what problems will this cause me to face in the future?
By the way, after closing game I am getting this warning message: "Invalid Simulate Options: Body (BP_ThirdPersonCharacter_C_0.CollisionCylinder) is set to simulate physics but Collision Enabled is incompatible". Not sure what it mean.
What is the issue, I am not familiar with it?
Actually, I don't know. Looks like everything work correctly in the game for me.
Not sure either, but if it only comes on close, it's probably harmless. Might be interesting to fix though : )
I can't speculate because I don't even understand why this method with sphere collision works.
Well, I don't really see why people don't just adjust the capsule size as needed, but I don't know all the details of the situation
The problem is that capsule can't be bigger then character height. So, if it is a dragon with long body capsule can't cover it fully.
ah I see. Advanced games probably assemble more complex collision objects around body parts as needed. A big sphere is a pretty brutal solution in the end : )
Well, I am definitely a noob and can't make an advanced game, so at least I can use sphere 😂
-
If I have quests in game, should the info if quest was completed be sent to Game State, and then in Game Mode, it would react on if the All quest finished = win?
So there would be dispatchers from players/ events in game to the Game State, and then also dispatcher in Game State, binded to Game Mode? -
And second question, where would be the best place for Quest Manager that asigns quests at the start of the game for players to be? In Game Mode as Actor Component is good place or maybe in Game State? The trick is, that the quests would be global, means all players participate to the same goals. Game Mode or Game State? Please help! 😄
Hmm, I was thinking: if I add this Sphere collision additional to Capsule will this sphere somehow prevent my character from launching magic at enemies from hands? I didn't learn yet how to create magic projectiles and only made melee attacks, but I think projectile should register hit when it reach enemy capsule? Actually, I better go and learn this before asking here my stupid questions.
Are you going to hvae a variety of different game modes, and is this a single player or multiplayer game?
Haha, exactly this gets tricky here because I'm trying to wrap my head around how to approach it! Basically I want to have Campaing Mode, which can be played Singleplayer and Multiplayer, and then I also want to have Multiplayer maps with other win conditions (or without quests for example). This blows my mind so much. Right now I'm brainstorming how many gamemodes I will need, and how to connect all the dots here.. I don't want to put myself in the corner by starting ''bad''.
The questions are mostly in context of Campaing Mode that can be played Single or Multiplayer, so I guess this would be concluded to the Campaing Game Mode which is Multiplayer, but can be played as solo, I guess.
Ok, so then in multiplayer, it would be shared progress?
Yeah, like gather 1000 resources, and every co-op player counts to that.
I mean more in terms of the completion - ie. Player 1 hosts, they're already at mission 15, another player joins, they'd be at mission 15. Each player doesn't have their own sets of missions to complete (in multiplayer mode only).
So this would be more like a match that starts, and each level of campaing will have different quests. There won't be a way to join during the match.
Hello, I need some help with my blueprints. Especially with fast noise wrapper plugin. How do i connect this loop body to pure "get noise 2d" function. Because there is no execution wire. I can't change puriosity in it cause its from plugin and honestly im new to UE and i dont know how to do it. I wonder if i can modify this plugin but as i told i dont know how to do it. In this blueprint i'm trying to generate chunk for my voxel game "like in minecraft".
so do I think right, to put AC_Quest Manager (that spawns quests) in Game Mode, and then, all players report to Game State (which also would get list of quests and their state), and Game Mode just listens if they were all completed?
or actually Actor Component Quest Manager should be in Game State, since Game Mode is here only to decide when is win, and doesn't care about anything else?
The component should probably be on the gamestate so that players can retrieve the data about the state of missions.
You could still have the game mode attach it to the gamestate only when it needs it.
Yeah, this is what I'm also thinking (now). This would make sense. Game Mode should only hold logic when the game is won.
So like 2 conditions: are quests done and is enemy dead for example.
One more thing, is it common to use dispatchers for something like that to report first, from the objectives to the Game State, and then Game State reports to Game Mode with dispatcher? Or interfaces? (like Is Quest Completed). I guess only binding will work here?
pls help 😦
so you get the result and store it into some variable (set) or add unique (array), depends what you are doing with it
I have a problem handling large integers. I try to use scientific notation but my brain can't figure out how to do it i'm trying to achieve something like that :
800 I get: value: 800 Exponent: 0
1259 I get: value: 1.2 exponent: 3
259 300: value: 259.3 exponent: 3
387 789 456 123: value: 387.7 exponent: 9
But i want to get the exponent automatically
When I try to save I get this message:
Graph is linked to external private object SlateAccessibleWidgetData /Game/Buildings/W_BuildMenuSlot.Default__W_BuildMenuSlot_C:SlateAccessibleWidgetData_0 (AccessibleWidgetData)
W_BuildingMenuSlot is my widget that I use in another widget called WBP_BuildingMenu. I cannot save the menu therefore my progress is null?
Also tell me if this is the wrong chat. I didn't know where to post this.
Int32 can only go up to about 2.1 billion so your last example can't exist.
Unless you're using int64s.
I'm having a problem with this code, it's supposed to activate when i collide with the actor and check the bool that is in ThirdPersonCharacter
When the bool is checked it should execute this here
Any idea why it doesn't work?
The branch node is conected to beginplay btw
Here's one way of doing it in blueprints. Not pretty but it works.
That's why it doesn't work.
Begin play only fires when that blueprint begins play. It is never checked again
Instead of just setting a bool, have it call a function that runs the code you need, including setting that bool true.
Would putting connecting it to event tick work?
Yes, but that is definitely not what you want to do. You already have an event that can trigger logic. You dont' need to check every single frame if that boolean changed.
Create a function or event that has this logic in it, and include the boolean if you want (in case you need it for knowing the thing is in that state). Have the overlap call that function or event instead of setting the bool.
Ok, i did that
It works
The only problem is that the animation doesnt play 🤔
any idea why?
@dawn gazelle Thanks for your reply but i'm trying to get something for internal math aswell not only for display I'm working on that at the moment :
If you know for sure the Play Animation node is triggering but it's still not playing, that's likely something to do with the animation/mesh.
i'm trying to get the operation 1000 = 3 100 000=5 , but i don't think log(10) is available
How could I remove the visibility of a bp and then give it back?
Like for example, At the beginning of Play the visibility of an object is set to disappear, adn then when you activate a button, it comes back
This is the script that removes the visibility
I don't understand why when my spawner spawns the pawn for the first time, it runs the code correctly, when the first pawn die and it spawns another, the second one doesn't run the code correctly unless I look at it
This will do the trick without having to divide large numbers. Might be more performant if you need to do it a lot.
guys hi. ı have a problem all client name the same. Why? How can ı change the name
Is there a way to get the actors that are in the view range of camera? And filter through them? Similar to how you would use a loop to go through items.
I dont rlly want to use tracing
#multiplayer might get more luck there i think
oky bro thx.
so, not 100% sure if this is a blueprint thing, but also don't know what chat to ask this in - I'm making an enemy that I want the player to be able to stand on when the enemy is inactive. The problem is that the player just keeps bouncing on the enemy and I don't know why. I placed a box collider on top of the enemy and set it to "block all dynamically" - while the rest of the enemy has no collision (for testing purposes), and the player still bounces on it. I tried changing the collision preset values but didn't really get anyway - any ideas on how I fan fix this?
I'm using the character blueprint, which I am pretty sure is the root of the problem. The only idea I have right now is to make a secondary actor BP that will pop in when the enemy can be stood on, while the enemy mesh is secretly turned invisible. But idk, it just feels like there is an obvious simple answer I am overlooking or unaware of 🤷
Any idea why this doesnt work?
The idea was that the second image hiddes the BP and the first image shows it again
But for some reason it doesn work
Is there a way to ask whether cinematic mode is currently on? I could set a boolean after -every- cinematic mode function, but it seems logical you'd be able to just call the In Cinematic Mode boolean and see what state it's currently in.
could the enemy physics object have bounciness maxed out?
or does it look more like a glitch or something
test if you just place the player on top of it instead of jumping on top of it maybe : )
have you stepped through it with debugger, does it execute all the nodes?
It didnt execute past the visibility node
any error ?
wdym "doesn't work" neither thing works ?
But idk why
you mean it didn't reach the visibility node? yeah, put breakpoint on the cast, see what objects are pinging
I often add print logs to cast fails with object names so I can get an idea of what is going on in more complex situations where it's not so much fun using debugger
Yep, it casts and then it stops
hover over the "Other Actor" or "Object"
it should show some info about who is calling
So, can the ThirdPersonCharacter be casted to "Puente" -> is Puente a child of that or something?
No
there's your problem
other actor is the thing that overlaps
you can't cast to a random thing, you want to check if the other actor is something, why is this puente ?
The BP is "Button" and when you enter in contact with it was supposed to set the visibility of "Puente" to true
Hmm, I dont really get it
so you are in the Puente BP now?
Exactly
Then you need nothing but to get your own static mesh
Wait sorry, That was a mistake
if there are other things triggering that collision, you use OtherActor to filter it so only the things you want trigger it
I'm in "Button" now
And what is Puente and it's relationship to Button
I'll make a screenshot
Ok, so, I´ve been struggling with this for a while:
I´m setting the hidden in game tag in my blueprint in the construction script, I have a separate function for that where I collect the meshes by game tag so I can hide them.
But since that doesn´t hide them in the viewport and I want to see what I´m doing when I´m working on the stuff, I also added another function that then sets the visibility using a for each loop on all meshes to check their hidden in game status.
That works fine in viewport now: I can toggle the different tag based layers on and off and it updates in the viewport.
But I can´t make that work using sequencer.
In the end, I need to render several render passes with different layers hidden, so I animate the boolean variable in the sequence...and it doesn´t update when rendering with MRQ or even entering PIE. I even added the visiibiity functions to the "Begin play" event, hoping that would then also update when the sequence is playing, but it doesn´t.
indeed, so you need to find that actor in the scene and call it
I could use some help on this, if I can´t make this work I´ll have to sit there and wait for each renderpass to render instead of being able to just have the sequences render one after the other and have the layers animated inside them.
Making "hidden in game" and "visibility" variables change in sequencer
How could i do that?
If you are using Level Blueprint, that is kind of easiest, but in the long run not great for object reusability, so I don't really recommend it.
Better is to have the Button have a variable called, say, "MyLinkedActor" of type Actor ref.
Then set that in Level Editing view to be the Puente. Then when player overlaps, you can do stuff with the MyLinkedActor.
Like this?
Optimally you should really just have an Interface : ICanToggleVisibility, for example. That way you wouldn't be casting to Puente, instead you could make anything go invisible/visible
But yes, start by doing it this way, baby steps
Save that, now in the scene you should be able to link those up
have you linked up the object in the level view
Yes
Yes
ok, then debug again, put breakpoint on set visibility, see what is the value of MyBridge when it hits breakpoint
If MyBridge is Puente, then setting root component visibility is not what you need, need to figure that out
ok, so the link is working, nice
hmm, let's see how you made it hidden originally
you used "static mesh", not root
okay, so what you can do now is create a function in Puente called ShowMe
Which takes static mesh and set vis
and the overlap then calls that function of puente
this is in general a better pattern overall : give objects commands instead of manipulating them directly
keeps things cleaner
Yeah, I will try to do that in the future
well, you can start now to get this working : )
Something like this?
Well, I'm kinda in a hurry with this now 😅
Ok, finally it worked
Wew, that was surely something, thanks for the help dude 🥹
debugger is your friend!
Once you have done this kind of stuff a bit more, look up Interfaces, cos they rule
Yeah definitely
How could I Change the from my main camera (in the 3rd person BP) to one of the cameras that is inside another BP, and then switch back again?
Also, for some reason I cant put normal cameras on the scene, only Cine
is the other bp a pawn or character ?
maybe set view target with blend, but thats just a guess i never used it
In the same vein, is there any issue with using Possess on a Pawn and later using Possess on the original Character?
i just possess the pawn and it switches to the camera on the pawn
idk about "issue" but it seems to work just fine
I had some weirdness earlier, but I got mine to work just fine with this.
So, I can change the camera from the character to the alternate one, but how can i turn it back?
set view target again but this time use your other one, and idk if you may have to possess it or is it still possessed ? idk
i do a menu system similar to that
where you possess another pawn and thats the menu
then switch back
somewhere off to the side so i can setup a scene and use that in my menu
Ohhh that's interesting. I haven't gotten to in-game menus just yet, myself. Do you just have the menu pawn instantiate a canvas for the ui?
well i just put the all the widget refs in the hud
Oh, like completely off the board?