#blueprint
1 messages ยท Page 251 of 1
Please I need help with my unreal engine 5.5 project, I would like to seek knowledge on pixel streaming and AWS
I cannot thank you enough, i was ready to spend next couple of days learning riggin in maya cos of this problem, thank you so much ๐
Worried.
The system automatically decides what Actors to update or respawn, don't worry!
Hey, I am having trouble making my stamina regenerate after my character is no longer moving, but "left shift" is still pressed. I looked at a reddit forum regarding this, but no luck. Basically what happens is when my character is not sprinting and goes into their walk cycle or if they are idle, holding shift just pauses the stamina regeneration. when I release shift, stamina begins to regenerate again. I have been looking at this for two days, so the answer could be staring at me in the face and I just don't see it. Any thoughts on this? I appreciate the help.
always makes me worry when i have to rely on someone elses 'automagic' ๐
it's my own struct declared in c++, why can't "break" it to get the properties?
make sure it's UStruct(Blueprintable)
and where ever you have it, make sure it's UPROPERTY(BlueprintReadWrite)
if you are not using Resharper, then please get Rider
I forgot about setting properties as Blueprint read/write
thanks
I'm glad it saved some time!
Lol, I literally read that line as "Don't worry, it'll relatively work. Until it won't. But I'm not putting in settings. Have fun."
Hey i am stuck on my Health System. The Health Bar stops being subtracted, when the value of Variable "Health" is 0 and Variable "Current Health+Armor" gets only subtracted until Variable "Health" reaches 0 and still has the added value from the Armor left. How do i subtract the leftover value ?
I am doing a replicated projectile with client prediction of the projectile
does anyone know how to replicate the projectile and sound?
in a way that the client firing it will see the projectile and sound first, but not hear the sound from multicast nor seeing the projectile spawn on server
You could put a stop sprint or regain stamina node here. You'll probably run into an issue that upon moving again while still holding sprint won't start depleting stamina again
@foggy swan I was thinking something could go there or maybe I had to put a string of code at the Sprint input. I tried to add to the ongoing pin for the sprint input, basically saying (yes character is sprinting, then get velocity, if not moving regain stamina) but it still did not work. also to your point, putting a regain at that location made it a tad a funky. so I am still stumped.
Hey guys, i have a problem on my game. I have an vehicle and a player, and the player can enter the vehicle and drive it, and also leave it. The problem is that when the player is not driving the vehicle, and he goes to the vehicle the vehicle starts being pushed away by the player, this has something to be with physics but i cant find out how to solve this. Can anyone help me?
basicly, when the player goes against the vehicle, the vehicle gets pushed/launched as if it was like a plastic ball or something like that
Calling this function, i've got 19 objects in the Room Exits array, but when the first for loop completes, there are still 9 objects in the array left?? Anyone know why the for loop isn't finishing going through everything? The IsNotValid doesnt get called at all, either...
In the second array i tested, and added remove at the end of the debug sphere and theres still array elements left ๐ญ its so weird im stumped
Might of found the issue?
I think its still adding things to the array when its not finished
Because you're modifying the array while looping through it forwards. Which is a no no.
Ahhh
If you want to do this, iterate through it backwards
Reverse loop?
So you need to use the standard for loop macro (not the foreach loop)
Ahh
The first index would be the length of your array. The last index would be 0.
Like this?
The for loop is immediately ending even though the length is 19
Honestly I think it might be because the other screenshot i showed was still adding stuff to the array
AH it does increment only
Womp womp
Check if they have a reverse for loop
But also - yeah, if you're adding stuff during the foreach loop, that can cause screwy stuff as well
Pretty much, don't modify the array during the loop. Have a temp array and then do stuff to that, then set the old array equal to the temp array
Hi guys, I have this problem with my simple trigger box: when the player begin t ooverlap it, the arm length change smoothly using Timeline. However sometimes it works and other times happen this, without concluding the stage.
Somebody knows a solution please?
Try adding some mass?
I assume that at what point the component or actor reference in the timeline becomes invalid. Add a check Valid in the timeline body.
i've tried that, but it doesnt fix
ok wait, where?
How can I put it in the timeline body?
Like this?
Add reference to your player and the spring arm component in input object to valid node.
I tried but sstill same issues
By the way, player on map only once? .
If the player is not once, more. save the link to the Player, which is placed in the overlap after DO ONCE. Otherwise, there may be a situation where the script works twice on different players, and in this case your player will change during Taimline processing
The player is only one yes, but there are others Trigger copies in the map
How does one smartly handle and call upon these variables?
You need to store a ref to the actor that triggered the timeline and clear the ref when complete. The issue you're having is that if the timeline starts and then something else overlaps, it just updated the return value on the cast which messes up the rest of you're logic.
Also, the additional isvalid nodes are redundant in this case as the cast will act as one.
Anyone knows what this could be? I'm having crashes at the start of a packaged build, it's obviously something related to sound sources but I am absolutely confused as to what could be causing it.
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x0000000000000060
UE4Editor_Engine!FSoundSource::NotifyPlaybackData() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\Audio.cpp:647]
UE4Editor_Engine!FAudioDevice::StopSources() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:3987]
UE4Editor_Engine!FAudioDevice::Update() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDevice.cpp:4347]
UE4Editor_Engine!FAudioDeviceManager::IterateOverAllDevices() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDeviceManager.cpp:922]
UE4Editor_Engine!FAudioDeviceManager::UpdateActiveAudioDevices() [D:\Build++UE4\Sync\Engine\Source\Runtime\Engine\Private\AudioDeviceManager.cpp:913]
UE4Editor_UnrealEd!UEditorEngine::Tick() [D:\Build++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1965]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [D:\Build++UE4\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:426]
UE4Editor!FEngineLoop::Tick() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:4921]
UE4Editor!GuardedMain() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:178]
UE4Editor!GuardedMainWrapper() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:137]
UE4Editor!LaunchWindowsStartup() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:273]
UE4Editor!WinMain() [D:\Build++UE4\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:320]
UE4Editor!__scrt_common_main_seh() [d:\agent_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
Hey guys. anybody knows why this might not work? I'm trying to make an Orbit camera on a spring arm without using MovementComponent (the character has to be static). Whenever I clamp Y axis, the camera somehow goes to Location 0,0,0, but clamping X works (I don't want to clamp X, I was just checking if it works)
The third person template uses an orbit camera. You can just use the same setup as that.
Yeah but It uses the movement component thing
Which requires the root to be set to movable
I need it to be static
Like this
It doesn't need to use the movement component. The third person camera rotation uses the control rotation.
It throws warnings at me and doesn't actually move
What warning? And how did you set it up yourself?
Just a spring arm and a camera as a child of it
Show the hierarchy.
Firstable thank you for helping
What is the first node, GET valid/ not valid? where I can find it?
Sort of. Get the var and right click on it and convert to a validated get.
So the 'CollisionCyclinder' isn't in the actor so the message you're getting is most likely down to something else. As for it not moving, you need to set the spring arm to use the control rotation.
Capsule Component (Collision Cylinder)
It is in the actor
Ahh ok. As an FYI, it's a pawn so it's expected to move. Why are you wanting it to be static?
Well I just want it to be possesable but to not be simulated in gravity
the sole purpose of it is the camera and some more stuff
Set the movement mode on the movement component to none.
and the capsule to movable?
Yes.
thanks
Interesting, I never know that. Thanks a lot
cable length is really small try something much larger
that change nothing ๐ฆ
Hello! Any ideas why I could receive twice "Hello" in the log message? Could this has something to do with events on server?
Where/how do you apply damage?
In more than 1 way, but it looks like the variable isn't updated in the second call. Could that be, because it is a async function ?
How do I change the values of the post process component via blueprints?
Also can I get some tips on this component?
Hard to say why without more context
Yeah sorry. I'm not sure how to debug this. I was just wondering if it would be possible that the DamageReceived-event is called twice and that in both events the variable is still in it's default state (false) (because it might happen in the same frame or so?)
Ok I've done that but i still want to clamp the movement down from 10 to 80 degrees
How do i do that via pawn rotation
Depending on where and how you're calling the applydamage function this could happen. And also indeed if you are running multiple instances of the game like server and clients
Question regarding functions that spawn actors.
I want to create a function to spawn projectile actors as part of my base character class. Issue is, the exposed variables (damage, speed, visuals, etc) that I would like to set up are not available compared to calling the Spawn Actor event.
Is this the wrong approach, and would I be better off making a custom event instead?
Why can't you use spawn actor node?
Have the variable in the bp sphere you like to pass as instance editable and expose on spawn.
Preferably a struct when passing data in multiple quantities
Yeah I guess that's reasonable
nvm fixed it
For data though, I was shooting to work on a shmup with multiple weapons...
Goal is to store different values inside a data table, and tap into them for the base values
You can pass any data from the weapon
Data assets would be nice imo.
You just pass or read the data asset of the weapon,
E.g. DA_M4
Or DA_Ak47
Yeah each weapon would just affect properties of the spawned projectile, interact with resources, I will iron out the fine parts later but I should look into data assets then
Be aware with Data table or data assets, make sure you don't have hard reference.
Noted... Yeah hard references tend to be risque
The worse thing can happend is you load all unnecessary data. E.g. all the icons of all the weapon in the game.
Just use soft reference and work on loading system
Yeah hard references make sense for things you know will be there
I.e. the absolute base class for all projectiles seems like a decent hard reference
But the thing with Data table, if the DT is loaded all hard ref in it will be loaded
This is just something you should bare in mind when working with data table
Hmm I wasn't intending to have references in the data table at all frankly
Just give every cell a set of data and look at that data when needed
Hey guys. Is it possible to make a static mesh component of a pawn not rotate together with control rotation?
Strings, floats, ints and so
K that's good, though icons and mesh normally live in the same collection as damage, fire rate etc.
Well it's more like the whole actor to move with the control rotation.
Yeah, though I feel you can cheat out by calling icons and mesh after checking which cell you're picking from
You either have the setting on or off
huh?
What cheating?
You cannot stop cheating on non dedicated server games. Just let them cheat cuz you can't do anything about it.
I mean cheat out in the sense of
Instead of hacing texture A loaded in the data table
There's a setting that rotate the pawn actor to rotate with the controller rotation
You load the texture in whatever thing is picking from the data table
Use control rotation yaw, pitch, roll iirc.
I can't picture it 100% well I admit
Nothing you can do to stop people manipulating memory in their own game.
Don't overthink something you have no control of
Yeah I'm aware
Is that a setting of the root?
I am literally not referring to that
No it's a setting of the actor or character movement component, can't recall.
I say "cheat out" in the sense of doing a hacky workaround to logic stuff
But name is something like use control rotation (something)
Like doing if (!false) for some ungodly reason
Is it accessible in runtime?
Yes
I toggle it between locomotion and aiming
sorry can't seem to find that
Are you in character?
But regardless. Are data tables a bad idea, then?
Because I tried to use them for a Resident Evil esque kind of inventory system. I'm not familiar yet with ideal practices
result of โuse controller rotation yawโ and โset actor rotation (actor rotation (pitch, roll) + control rotation yaw)โ was seemed same. so, iโm really wondering that what is difference between them? is it just different way of setting character rotation? or something different?
Type use controller
That was a while ago, though. Haven't touched DTs in a bit
I'm using data table my self (kinda regret it).
Most people opt to use data assets.
And wise people claimed there are bugs associated with DT. Something I haven't cross as well but if I can redo my system, I would totally use DA
Thanks for the wisdom then. I feel DT are certainly useful for a variety of things but if there are functionally similar yet superior ways, I'll try it out
Data Assets don't have the like spreadsheet import niceness that DTs have.
DAs are more like a single row of a DT, in UObject/asset form.
But you can just put a big table on a DA and make it like a DT.
Right, like daekesh said, it's got the import option (JSON).
It's also easier to view the entire collections.
Ok but you are not in character
It's a property of a character, which you try to conjure in a static mesh component
Yes I figured it out
Thanks a million
And what if I want some components to use it and some not to?
That will definitely occur later in the development process
If this is a battle ship or tank, i am not familiar with the process but it's probably not an easy fix.
Also I am not sure about using character for your battle ships. Character movement component only support capsule collision.
You probably want to use pawn and implement your own movement solution.
Spaceship)
Yes this character is only used to write the ship that the player builds into an array
It is then reconstructed in a pawn
Idk why I did it like that
Collision is probably not going to be a concern
Anyone able to help please, I have got the unreal insights open due to the editor be stupidly slow for me
I'm not 100% what I'm looking at though to see whats causing the editor hanging which I feel it's doing that a snip of where something off is happening
Is this while you've hit play or are just in the editor?
just with editor open
@frosty heron Checking DA, these are great. They are read only, yeah, but overall seem extremely efficient at streamlining all the different processes
Just need to think where and how to do each weapon's more unique mechanic elements
Like say, a weapon with automatic fire vs one that you need to hold down and release to fire
Thanks for telling me about these still
And this only happens within a single project, not any others?
it's only started happening about half hour ago, my project has been fine all day
only thing I can think that changed was I installed to engine a plugin the Narrate 3 quest plugin thing but confused how that would cause this hitching to happen
this happened other day to be fair and I couldn't work out then either was was happening
for me something must be going on here as it's on the timermanager it's appearing to lock up
but I can't see whats being do in that time to see what is causing
how can i check if if a player is walking or running or just stopped ? i believe there are events for these changes ?
If you're using the Character Movement Component, it doesn't have any events to signal when the player starts or stops moving, let alone to detect if they are walking or running.
The only means you can validate what the character is doing is to check on tick the velocity of the character movement component and then determine the state based on that value, but even that may not be accurate as you could potentially be falling with some directionality on X or Y which doesn't necessarily mean they are walking or running.
When you close out of the engine and reopen the project, does it resume with that behavior or does it fix it?
yes true, i guess i can also check if the player is on ground
would this work ? im very new to blue prints but created a function to detect this
This would effectively do nothing. You'd want the result of your AND as a return value on the return node and remove the branch.
You'd also want it to compare to >= not <=. If velocity <= 0.1 then they wouldn't really be moving.
So I deleted two things from the map closed and reopened and the issue went away
Not sure though why it decided to do it in first place cause I've been in editor all day and it been fine. Unless it got a bit messed up when I put the plugin in
so like this
Now there's more of a problem here... This is assuming you must have at least > 1.0 movement on all axes for it to return true which may not be the case if you want to know if they are walking as they could be walking negative on the Y axis, or they may not be moving at all on the Z axis. Instead, use "Vector Length" on the velocity, which basically determines if there is any movement at all including if negative. You want to check if it's >= 0 to ensure there is some movement. If you increase it to >= 0.1 that means the vector length would have to be at minimum 0.1 before the function returned true.
Hi guys, I'm having an issue with rotation interpolation, as you can see, the tank turret is supposed to follow the mouse and it works fine unless the tank is on a slope, the turret just goes to the side and does not track the mouse anymore until you go to a flat surface again. The rotation is controlled in an animBP and only happens when using interpolation with RInterp To Constant, you can see in the video that the machine gun does not have this issue and it uses the same target value as the turret, just without interpolation
this is the animBP, the first transform bone node uses interpolation and the other one for the machine gun doesn't, both bones use component rotation space
appreciate any help, thanks
What happens if you don't use the RinterpTo Constant?
so i got it to detect , but its not detecting if im walking , for example if i jump then is false because of the check on ground, but walking or not it returns alsways true
Ah sorry, should be > 0 not >= 0
= 0 means even if vector length is 0 (no movement) it would return true.
yeah that works
backwards or forwards it detects now
im not sure if this is the right thing to do, basically what i wanted is to check if player stopped and set the walking state again, because after i sprint once it stays on sprint
i am using the motion matching sample, and by default it sprints and to walk you need to toggle a key , so thats why i was trying to get this done this way
it works correctly if i don't use any interpolation, if i use the normal rinterp to, same thing happens sadly. i need this to be interpolated so i can control the speed of the turret rotation instead of just instantly setting it to the desired rotation
Rather than RinterpTo , use FinterpTo.
What space are these rotations in?
the bones are rotating in component space but it happens with any of the others except world space, if you mean the current yaw and target yaw, i believe they are in relative space but honestly i am not completely sure, here is how i got them:
i also tried this, but i got the same issue
If you're not using any interpolation and it works, just quickly, then that means the float value should be what you need. FinterpTo Constant should be the correct node to use as you're just adjusting from one float value to another. The RinterpTo Constant doesn't work as it's using the 0.0 entered for the Pitch and Roll which augments what the Yaw will be.
yep, that's the way i understand it too but oddly it just doesn't work with that either, i get the exact same behavior using FInterp constant for some reason, honestly not sure what else to try lol but thanks
Show the spatial layout of this bone and the bone that works (machine gun I think)
is this what you mean? sorry still learning these are the details for the turret bone that has the issue
this is the one that works
is there any good plugins maybe for a better movement system than the default one? by default the movement feels clunky
@dawn gazelle thing that's confused me is why editor decided to bug out on me
Can someone help me figure out why the damage isn't apply on overlap? it's prints the string so it works apart from the - float
Where are you setting the "Zombie Health Amount" in your widget for it to update?
"Accessed none" means your references aren't working
No errors now, still same issue
It turns out the damage is applying, but progress bar is not updating
Also, how are you sure that each individual enemy has their own value? It looks like you're using a single reference from your HUD, but each zombie would be referencing the same one.
ah damn
i got a paddding var on a widget base class
in child classes i can edit them since they are instance editable
but, if i override the value, i got now reset arrow showing up
how do i make a category appear first in the editor before others? DisplayPriority only changes the order in the category AFAIK
How is it clunky?
slow, no sprinting, no crouching, jumping is slow and has no maneuverability
well just being a bit faster isnt all
there are like 30 tunable parameters
i dont want anything redicuously complex like ultrakill but stuff like sliding i want
its the mechanics themselves i wanna change
not the pure movespeed stats
You can always implement a custom movement mode
or see if GMC is a bit easier to do on the BP side, not cheap
https://www.fab.com/listings/7e786da1-35e1-458e-96e0-7b1bdb333b39
๐ฅ DEVELOPER SHOWCASE - Check out this showcase of GMC-based games made by our community.๐๏ธ TRAILER - Watch the original GMC release trailer.๐ฎ DEVLOG - Hear about indie developer Rory's experience with the plugin (not sponsored).๐ SURF DEMO - Surfing GoldSource physics demonstration.๐ BHOP DEMO - Bunny Hopping GoldSource physics demonstration.๐ F...
I'm messing around with some editor tools and I ran into a weird issue. Whenever I add a dynamic actor component from the editor it shows up in the editor, but it disappears in-game. I've tried setting hidden in game to false and visible to true, but it still happens. Anyone know what might be happening here?
thats expensive af lmao, maybe one day if my game actually gets some kinda traction i could do that but theres gotta be decent ones for like 20$
Anyone know where I should put this get valid for each AI to have their own independent UI?
No way
You are severely underestimating how much work you're talking about.
how do i create an array of object pointers in blueprints? having trouble, can't find it found it
Im trying to limit my pitch on my camera due to the camera allowing the player to do a full 360 view. How can i limit this?
ive tried using clamps and it didnt work
Yea, but who knows how well this is actually programmed? The trailer video also looks like the movement is "clunky" and doesn't seem like it offers much more over the CMC other than sliding which if you're making a single player game you could probably make the logic yourself fairly easily.
The screenshot below is part of the documentation on how to use this plugin.... When I see code like this, it's something novice Unreal Engine blueprint programmers do (including myself when I was a novice), and they're telling you to edit this section in order to incorporate a new ability, which is kinda crazy.... Reading some of the documentation looks like this system is extremely inefficient, and while the product page indicates there's multiplayer support there's nothing about multiplayer support in the documentation itself. The documentation also doesn't show you how to actually make an ability other than adding it as an option, so it's usefulness is questionable.
The locomotion channel on the creator's Discord, hasn't had a post since August 2023 in it and the one before it was June 2023, and the one before that was December 2022. So "community" based support for it probably isn't great either. The creator's last post in this discord was from August 2024, and almost all their "recent" posts are advertising their products, where the last post in their own Discord server was from July of 2022.
No insults meant to UnlaeD, as they've likely been an Unreal developer for years now and the documentation may be out of date, and the system may have been built earlier in their journey and just never did any cleanup or streamlining (which is fine, if it's working how they intended).
all fair points, i just dont like extortionatley huge prices on plugins, and if you use it thats fine but at the same time i am working 3 days a week rn and my game is just something im working on in my free time. i dont really have a lot of experience and wouldn't even BEGIN to be able to use the other one to its potential
I can fully understand that, as I also wouldn't want to spend that much on a plugin.
and dont get me wrong some plugins i can DEFFINITLEY see being worth like 200$
But, sometimes plugins and their pricing can be deceiving @_@
yeah
one of the first things i looked for was some kinda proceedural dungeon generator
and all the ones on the market were 200-400$
which they looked good, but i needed something basic and easy
and then i found a free one that was open source to download off github and its worked amazingly
it can generate the dungeon, and destroy the dungeon
and hide rooms you cant see
I'm watching some tutorials but they are using an older version of UE, so these two green nodes do not seem to exists anymore.
What would newer versions of UE use instead?
i got 22 possible ability cards and i wanna write the logic for when they take effect. How can I organize the blueprint code here so that its not super cluttered? My idea is to create a blueprint function library with 22 functions that contains the logic for each ability card effect and connect them to the switch node
These are simple getters for input axes defined in the project settings. If you're using Enhanced Input, you should be able to call a get of your particular input
I made a simple takedown system from YT and it works fine, but I want to add more animations / takedowns. I made a structure to store the animations as pairs, but they arent playing together. Example - sometimes Player01 takedown anim plays but the enemy plays Enemy02 montage, so they dont sync together. How can I make them use the correct anims within the pair while still keeping which anim pair that gets played random?
Each pull from a random node to different nodes will result in a different value. Promote the "Random" return value to a variable before your sequence, and then use that variable to read the values.
Like this?
Yep, that should do it
Oh I see. So this would basically be the same thing?
Something like that, yep
great thanks!
Thanks a ton, seems to be working as intended now 
This would be kind of annoying to manage. Every time you add a new card type you'd have to go into this section to add more values and it'll end up looking something like the image below (I posted this a little earlier indicating that it's something that novices do, including myself when I was a novice).
The better way to handle it is probably through objects. When you want to add a card to a deck (ie. an array) you'd construct the object that represents that card add it to the array, and the card will contain its logic and values. You can call whatever functions or logic you want on the card at the time you are accessing it.
So then when you want to create a card, you can subclass the main "card" object class, and define the values and functions as you need them so they can perform the logic they need to when you want them to.
If you set it up correctly, you don't need to change any underlying code when adding a new card, you just create a new card blueprint and modify the code that is contained in the card blueprint itself and you avoid the unwieldly spaghetti of switching on values to then execute something based on those values.
yeah this seems like the best solution that follows the object oriented programming principles. But i already built a ton of systems based on the cards being represented as structs ๐ญ At least i planned the game so that im 99% sure i will only ever have 22 cards. This is good to know though for my next game
Oof, what is this?
That was from a plugin someone was looking at potentially buying.... It's supposed to be what you need to modify in order to add a new movement ability.
I will deffinitly not buy the plugin ๐คฃ
i cant add logic to structs but perhaps i could add some type of variable into the struct that references which blueprint function library to execute if thats even possible?
but yeah i guess that still comes down to making a switch node somehere which is bad practice
You could make the structure include a reference to a constructed object that contains the logic. Or a class and then construct it when you need it and call a function on it.
ouf that plugin looks harmfull
You want to design it so that you'll only have to implement the new shit in one logical enncapsulated place
as Datura says, subclassing some _mastercard seem very appropriate
Well in your example it would be in the Event Tick, but I rather suggest you to do that through Bindings or even better through Events
Hey, so I've got a bit of a noob question.
I've got a situation where I have a blueprint inheritance structure like
BP_Weapon -> BP_MeleeWeapon
and then an actor structure like
BP_MeleeWeapon -> A_Weapon -> Static Mesh -> Spline Component
The BP_Weapon bp has a field called leadingEdge which is of type "Spline Component".
I'm trying to use the spline component to get specific points on the mesh during runtime and animation (feel free to suggest alternatives).
Basically, does anyone have any idea why I can't set the leadingEdge field on my A_Weapon (it's a BP_Weapon inheritor) actor to the Spline Component present in the actor blueprint (that I physically placed there)? The spline i've added doesn't show up in the dropdown, and I can't figure out how to set it otherwise.
What am I doing wrong?
Thanks!
Regarding input mapping, how can I have it so Alt + Middle Mouse Button need to be pressed before I can rotate the camera left/right?
Hi guys
Suppose i have a gameobject and then i am having its 4-5 child ,So in unity on disabling the parent object , it automatically disable or donot render the child object
So in Unreal , is this functionality exists or not .
If yes , then please help me how to achieve that
I used a chorded action
what i typically do when i need children to return something child specific that i implement in a parent class is create a getter for it in the parent class
Hmm so something like this?
That did it, thanks!
Any idea why this is happening? ๐ฆ
Delete the function, then override it again.
Didn't work, but it seems that I forgot to combile the base class, thank you ๐
Am I safe to assume that this Spline variable is a reference to this Spline in the actor hierarchy?
Should be, ye.
Shweet, so there's no smarter way to achieve this, yeah?
by smarter I mean, via a variable, rather than a function that AFAIK doesnt actually point to a variable
I guess its functionally the same, just wondering from a editor perspective
(by the way, thank you, I don't think I'd have thought of this solution for a looooong while :p)
Any idea guys?
Child in what context?
Component or actors?
For components, you can just set the visibility on the actor. There will be prompt that says propagate to child. Tick it to apply the vissibility to the children's.
You can do it via variable, as long as the parent owns the variable
the child objects can be a combination of widgetComponent , SceneComponents, actors, meshes and actor components. Also I want to do this on runtime as well.
The function returns the same reference tho
set visibility
include child is a bool in that function call
Thanks buddy , got the reference
Now one moe help
Suppose i have Keyboard input on Widget 1 and that is not visible on screen as of now , but that still taking an input
is there a way that it should take input when its visible , or i need to add that isVisible check on each and every input actions
Whats with this white balls symbol?
It means replicated
Christ thatโs a lot of errors
ok ty
widgets can use input components, altho im not sure how relevant they remained after Enhanced Input came along
I think the common thing these days is to change the mapping contexts when you open/close widgets
I could be wrong tho
If you use a CommonActivatableWidget it even has a param for an IMC
Ive read this a couple of times and im still confused what your problem is. What are you trying to do?
Oh I see you got answers below. Nevermind!
How did I get to enter direct path for an actor to save in to reference variable in BPs? I did this recently, wasn't hard to figure out then, but I seem to have saved over that BP and now I can't figure out how to do it again. I need variable field where I can copy paste the actor path from outliner
The soft reference variable just gives me this box where I can pickup actor from list, not a field where you can enter path as text
Hi, does anyone know why the download image node does not work in an call in editor function of call from construction script
but if i have a call to download image on begin play it works as expected?
success or failed to download are never called when calling the function in editor
Hey there!
I have found this as part of Tetris like game and I don't understand why they are using Set Global Time Dilation:
I understand what it does, but I have no idea about if it is a good option to speed up or down the blocks' movement.
Thanks.
Probably because it relies on constructing an object that is expecting the game to be running as it is a "latent" node indicating it wants something to happen.
Would there be a way to get it to work in editor or should o approach it a different way?
You'd have to use a different approach. That node will likely not work at all at editor time if you're finding it's not working when you try.
Probably the path of least resistance for a global slow mo
Yea, as cold said, it'll be the easiest way to handle changes in block speed as they come down. Personally I wouldn't use time dilation as it would affect other things which might not be desirable. (such as particles)
I would have the blocks have their own speed that controls how quickly it comes down and the input would updates it's speed directly.
@frosty heron Do you find C++ slower to code compared blueprints? I was recreating an interaction system in C++ (it all works) but damn it took me so long to setup haha. (a few hours compared to what would probably take 15-20 mins)
only cuz I am newbie, the others find it around same time / faster
my speed is improving but deffinitly not as fast as bp atm
So it's not just me then, good to know. lol.
Pros be like
I am soo used to visual stuff, but after migrating to codes, I am more comfortable typing things out. Like with source control, I start to use the terminal instead of the GUI
cuz it's soo easy to just run commands
@dark drum https://m.youtube.com/watch?v=ovpiYkYFlPM&pp=ygUXZXh0ZW5kaW5nIGVkaXRvciB1bnJlYWw%3D
This is soo good and only a few lines of code actually to add sliding bar or custom viewport
In this talk, Tanglewood Games will present how to add extra functionality to the Unreal Editor by leveraging its existing framework, enabling the creation of tools that feel native and intuitive to use, and that are tailored to custom projects, modular, and easy to maintain.
These frameworks will be presented through a series of practical e...
I should probably keep at C++ but BP is a like warm hug in comparison haha. But Rider definitely made the experience more than manageable.
Yea, I like the idea of being able to build editor tools. I was looking a editor utility widgets and blueprints which is pretty cool.
Yeah just don't be afraid to cross over when you hit limitation.
Actually you can keep most things bp
But anytime something not exposed, just expose it
For example World is not exposed for some reason
But it's soo easy to expose them to blueprint.
Oh yea, I forgot about this.
debug. Print Ground speed value every tick
in Pie, you can also select the instance
Ground speed changes like it's supposed to
Cancrouch is checked in the player bp?
post the result
then make sure u actually go to crouching state
That is some ass quality. Cannot even make out the numbers. What is the animation graph showing when you're trying to crouch. Like ColdSummer asked to provide.
The quality is fine for me
How the hell do I crouch when I'm seeing the blueprint
Great! Thanks.
What's the transition rule from the crouch transition to crouch?
Thanks!
Crouch in your game, then open the Animation blueprint and see what its doing.
Why this event is read only?
automatic
@little moat is loop checked on?\
What animation?
I assume crouch idle
your Blend Space
yes
post it
It's a hold input
last suggestion, try to re-add the blend space
they dont get updated for some dumb reason
If you make changes, you have to re-add the blend space
shift + f1
How do I freeze my game?
I'm trying to see the anim bp while crouching
Found out that it doesn't even go into crouch state
It never goes to crouch idle
I put it as automatic transition to go into the crouch state but for some reason it doesn't
From Standing to Crouch Transition its automatic?
Nope
The rule is if "IsCrouching"
anyone using batch ticking nowadays? I saw its a new thing in 5.5?
Does anyone know where I can find the documenation for game user settings?
Google seems to only give forum results
official docs return nothing when searching it either
I only want to kow which number correlates to which setting. For example, what is 0? Low? Off?
Official docs for most things were broken when they switched them to the new website. Either way the best documentation has always been the source code itself
is it normal that when changing the user setting for Global Illumination the game crashes? ๐ค
can we disable level instance loading/visibility in shipping/PIE?
Anyone know what is the point (benefits) of the setup Epic usually has (Lyra for instance). With empty character blueprint, and one copy pose variant and one retarget variant. Is it to account for small skeleton variations? I think I understand the setup, but not quite the point.
I created a new variable of "Float curve" type, I compiled the bp and I can't assign any external curve to it. Why?
I believe there's two types of float curve. You're probally after the object version.
thanks
can someone help me understand why this isn't working on tick
whats not working, you're adding nullptrs
It only works when the widget is closed then reopened. I want it to switch which buttons show without having to hit nevermind first
Hey man I understand the code, but once the ref is validate... how can I manage it?
Because for the moment it only works once, so Iโm trying to figure out
You are trying to display the buttons in the widget, right?
yeah, if I use visibility, it will leave a gap inbetween buttons
In the Set Visibility node, there is an option called "Collapsed", use that option
When the timeline has finished, you should be clearing the ref, (set to null) so that it can be triggered again.
Maybe I'm wrong something
That looks right, whats the issue?
Ok so, I have two trigger box, one is to move away camera and other one is to move close. However it only comes once in both cases because after overlap the trigger the ref is valid, and seems to not become null
That might indicate the timelines don't finish. Add a break point to the set node that's called when the timeline finishes to see if it gets called.
Ok it never finish
It only works for other copies, but if I walk through the same trigger it doesn't work because tell that the ref is valid
Is the timeline set to looping? If not, is it set to use the last keyframe?
Strange thing, It ends because the "Print string" works. However it seems that the variable remain valid
No it's not looping and not last keyframe
this print appears
I think I solve it
I add this because if the condition it's false, the ref remain validate so it doesn't work again
Ahh yea, of course. You could just move the set node to after the branch on the true. That way it'll only set it if the condition is met. Then you wouldn't need to clear it if it's false.
Soo it should(seems) to work with this method ahah. Do you approve? ๐
It should yea but you'll be setting the var just to set it to null again if the condition isn't met so you might as well only set it if the condition is true lol.
So you suggest to move the branch to the start and then put the "Get Valid/not valid" only if the condition is true?
No, the set node after the cast, just move it to after the branch on the true. Granted its a minor thing lol.
Ok now should be correct, right?
Hi guys, sorry to bother you, I'm going quite crazy, and nobody seems to know anything the subject but I have a strange issue with RemoteControlAPI (epic plugin)... I'm trying to call a function from a BP through a PUT. It works, My BP function is called, and the function is supposed to change a variable to TRUE. It does, but the variable automatically goes back to false after..... it's driving me crazy, and was wondering if anyone tried something similar yet ? Thanks.
Thanks a lot bro ๐คฉ
Is anyone here familiar with the AsyncLoadingScreen plugin?
Hey how i can add tactical sprint
like basicaly now i have sprint function like pressing shift max character walk speed more and than low but i want to add if shift button pressed 2 times so do tactical sprint
What is this error caused by?
I don't see any broken code inside of that error reference
I click on it and it leads nowhere?
if basically want to use a double press button to activate something ?
This is caused by BP Structs being awful and buggy. I highly encourage getting some very basic C++ knowledge so you can define them there.
Try recompile again. Or try close and open the editor
show us the variable NewVar (I don't even see it on the screenshot)
already did that
yes
currently i have this
There is no NewVar
well, try migrate this to another project and reimport
Usually those are caught after editor restart
Prompted with "do you want us to remove said variable?"
C++?
Should I just fix the struct? lol
you should either restart, migrate/reimport, or recreate your bp which seems corrupted, before going through c++
restart: done
migrate/reimport: I did import it from a project but I did copy-paste it inside of the folder explorer, not through the asset migrate tool because that one wouldn't work, I just clicked and clicked and it didnt work
this entire BP is really big, i just spent >5 hours debugging it from the copy-paste project
the issue really looks like coming from the copy paste. So, you can try migrating it from here to another project, then check if its ok in this new project, and do it back again
then you're good just do whatever you want in branch after the sequence depending on if PressedAmount>1
I have one problem, how i can scale actors in game? when I play and they are far from me i barely see them in my case planes but i want them scale a little bit to be more visible any tips?
I dont want change their scale it will be weird
but is there any way ?
There is a problem with that though
Im importing, I go to the folders, and there is nothing inside
I only see folders
I can't use the "import" thing
is there a toggle yet for findplayerstart? I really need to turn this thing off.
you don't have to import. Just migrate your BP into another project. Then open the project and look. Then, if ok, migrate back to the main project. No import needed
trying to change e speed while in crouch using the motion matching sample
but i dont see any change to speed
is your Max walk speed crouched even used somewhere ? By the way be carefull you have two conditions there
it prints the value
and i assume it is being used im not sure
this is from that motion matching sample
thats on the character movement
I don't have it. Please remove the 'want to sprint' pin in "set members", set it to true. Also put something bigger like 500 to try in the "+". Also check you're being croushed by looking at "is croushed" variable. In the end, just look at what the Max Walk speed croushed is used for.
i chnaged this value to see if anything changes but it did not
I assume is probably not being used
right click/find references
also try connecting directly without iscrouched branch.... just to be sure
yes is being used here
yeah did that as well but still dont see any changes
wouldnt modifying this values here afect it?
im guessing this overrides my changes ?
it might be overrided somewhere else
@sacred roost @thin panther i still get the same error
looks like you're good to redo your bp (or at least get back the original one, and redo it without copy pasting)... sorry
how do you do a delay between a for each iteration?
doesnt seem to like anything i do
how can i get the forward vector of component movement? this is where im currently at based off of some unreal forum posts, but its not working. basically i want a flame thats on a stick to rotate so it kind of lags behind movement, currently it looks very unnatural.
if i remember correctly, you cant do that. you may need to manually do a for each loop logic and add delay there.
ahh alright thats a pain
thanks
forEach is a macro, copy the macro and add a delay is the way i have seen people do it with a new macro that has the delay
Hey guys, Really stupid question but can the name of a blueprint be used as a variable? for example if the blueprint is for floating text, is there a way to change the blueprint name, or part of it to actually change the text inside the blueprint?
ah my bad, i forgot you could just do that, yeah no need to reinvent the wheel
it's horrible to look at, but it's the way
no and you never ever will need to do such
yeah thanks!! ill do it the same
don't forget the exit condition... right ?
What an atrocity
it's not stupid if it works.
๐
proper way would be macro for sure. But this works fine.
(wait a min i'll show you something)
i would need to if i wanted to give myself or other devs a super fast way to change something minor without having to go into blueprints. I wouldn't ask if i couldn't use that function lol, but thanks for the info.
In Second Life you can easily use the name or description of an object as a variable and its actually used a lot.
you're misunderstanding everything. You can change the name of an object if you want. Just store it in a string, and change. You can then use it as a variable. There is no way, even in second life, that you could change on runtime the name of functions or whatever that are indeed c++ objects
look at this beauty
Let me guess, you donโt think itโs stupid cause it works
You need to be able to read your own code in the future and easily see when something was disconnected by accident. Writing code like that will be hell for later debugging
OR you're happy to be the only one able to read it. This way you cant be replaced. Actually not that hard to read... Even for me in future self. The thing is more about attroucious links back before their first exec.
(that was the point, not lack of commenting and all)
this isn't an infinite loop ?
nope, it's idling
wdym idling ?
when finished, it starts over, and over. It's infinite for sure, but no crash.
It's for a floating island. The island keeps floating up, down, with random up, down, rotations... When it's done, it's doing it again. Infinite loop is crashing memory fast. This is just doing over and over again the thing without triggering memory issue as it is in finished state every loop. Not sure how to explain it better...
that's like calling a macro itself every x seconds, when job is finished
looking at the code you might get the island going very up or very down at some point, after 100hours or 1000hours... needs campling
probably because it's "completed"
well it looks like an infinite loop
yes. Try it ๐
maybe completed runs later and thats why it doesn't block, but this doesn't block anything ?
you have to understand that infinite loops are issues because of memory
meaning the rest of the code keeps running ?
Not strictly
In BP it's evaluated function calls in that graph.
So a for loop with 500 iterations and 100 nodes each iteration is likely going to trip the infinite loop detection
not strictly because exceptions, when unreal detects it
Still no
BP tries really hard and is very good at not letting you get a stack overflow
BP's infinite loop is just "we did too many nodes here, panic"
yeah, then, the calls get reset
Not by the engine's definition. Those are latent k2 nodes, meaning other node graphs can execute while that one waits. It just reenters at Completed
as far as it doesn't throw an error
since it's a new frame and a completely new stack frame, no infinite loop
i see, idk much about latency i need to learn
you know stackoverflow means memory, and the bp infinite loop "we did too many nodes here panic" is related to the stack
ok we can agree i guess
I know what it means, but it's literally not the case.
It's a node counter. You can actually execute nodes far over BP's infinite loop limit.
It's literally just counting executions
Not memory related in the slightest
Oh nice to know. And the limit is ?
Think it's by default 100000 node executions, I might be wrong.
It's definitely in the thousands though
But it's a useful one to know if you ever have a large for loop that is expressly not infinite, yet you still hit the error
ah, it's a million by default
Surprisingly easy to hit especially with nodes that are more nodes under the hood
But be careful increasing it too much, while you will be able to do it, you will likely hang for above acceptable levels
I'm quite sure there's no real application needing more.
at least i can't imagine one yet
No, normally even approaching that limit makes things a good C++ candidate anyway :P
but also it will throw if it takes to long on lower amounts
i thought it had to finish in a tick or else its considered infinite
sort of, that's the maximum number of iterations it can have in a single frame
for an actual infinite loop it's going to exceed that
For a large loop it's going to exceed that
But what Marc is doing is using a node that lets execution continue while the results are waited on.
basically async ?
yes
What is this caused by?
got a feeling i got a memory leak going on
But editor's gc is like half working i think
Pretty surenit gave up at this point
Here i thought they fixed the large array detailed view
But they just slapped a warning onnit while still being shait
They should let you specify indexes to inspect... 45 to 99 etc
Hi guys, I'm trying to make an elevator that only works if three generators are activated
But I'm trying to figure out how to set a value to my reference object( the elevator) to validate it.
Somebody know how to make it please?
hi erhm
my brain tired
tips on formula to get Minutes/seconds from a timer float value
i have had that problem with editor versions, try shipping see if it is in there
This was definetly a me problem ๐คฃ
My player start is set to a pawn but when I play the level it's spawning as like the editor camera instead
How do I fix this?
set the default pawn in the game mode override
Pls read before trying to help cause I already said I did that in the message
ok I know that I have to set the value for this object reference, but I don't understand how to make it
I tried with "get all actor class" but it works only for one elevator
you could use 3 global booleans and just when you interact with elevator check the booleans
does this need to be reusable or is it a one off ?
i don't think what your trying to do here is going to work, what bp is the one with disable input ?
ok so
This is the BP_ Generator
set the value of Elevator in the editor
so the generators on the level know what elevator they care about
This is BP_Elevator
@faint creekYou can set this on instances of Generator in the world
After activate 3 generators, all the elevators copies in the map are activated
soo making it public?
oh all copies. Might be easier just to get actors of class
What do you actually care about? Do you care about specific pairings of generators and elevators or is the rule that "if all generators in the level are on, all elevators in the level are now active"?
I make this alternative( for BP_Generator), but it only works for one copy
Generator:
E pressed -> get all actors of class Elevator -> for each loop -> call Elevator.GeneratorTurnedOn
Elevator:
BeginPlay -> get all actors of class Generator -> set NumGenerators
GeneratorTurnedOn -> GeneratorsOn++ -> if GeneratorsOn == NumGenerators -> Activate
That'll auto-adapt to numbers of elevators and generators
"Generator turned on" is a custom event right?
wait, could I also make an array???
the way you have multiple E events is just not the way to do it
and you shouldn't even have those keys in those bp
should be in the controller or player bp
Dumb question: How do I get a reference to a static mesh in the scene, inside of an actor blueprint
Is there a way to make Userwidgets inherit from macro libraries
No, but what are you trying to do?
use macros in multiple userwidget blueprints
without having to recreate in every one
But you can call function libraries from the widget
You don't need to have inheritance for that
You'd create the macro library at either the "Object" or "Widget" or "UserWidget" class, then it should be present in any widgets you create.
Ah macro of course, not function
I know, that isn't an option though
Why isn't it?
oh it isn't for reparent, need to recreate i guess
anyone got suggestions on good blueprint plugins to make my blueprints look nicer? the curvy lines look kinda weird. i'm adjusting my editor settings but i could have sworn someone gave me a suggestion for a popular plugin
Electronic Nodes
hm. I'm currently using names for a bunch of things and I'm considering that maybe I should be replacing a lot of that with gameplay tags, since for things where I'd want a name like data tables, I can just use get tag name
any reason I shouldn't do this? I can't imagine there'd be a noticable performance hit for my game, I'm not doing anything too crazy with them. anything going to trip me up in terms of manipulating gameplay tags compared to names that I should be warry of?
Only two that I can think of right now is that you can't really create GameplayTags at runtime where FNames you can, and if you don't think about what tags you need in the beginning and plan your tag hierarchy, it can be a real pain to try and clean it up later, especially if you've been plopping tags all throughout your code.
and if you don't think about what tags you need in the beginning and plan your tag hierarchy, it can be a real pain to try and clean it up later, especially if you've been plopping tags all throughout your code.
this hits home. i actually had to restart my project completely. not because of tags (for other reasons) but it was refreshing to be free of the terrible decisions i had made with the tags
it becomes especially bad when you start to rename tags. you have to make sure to apply redirects correctly or else your assets all go bad and you won't know unless you do a heavy round of QA
because it's all free floating and dynamic there's no static checks to help you, so you can literally package the game and not see that something is broken if you rename a tag
however i really enjoy tags. i like that i can use them in C++ super easy (with native tags)
I'm already kind of in that position with my use of names, I think
since it's all just me typing stuff and other things making sure what I typed matches what else I typed
you do get static type checks in C++ with native tags, so that's nifty. it's the assets that are a problem
another thing that i like about gameplay tags is that you can perform queries
you can say, give me all tags that start with Condition. for instance
but you really have to plan your tags in advance. i would advise thinking about your hierarchy first.
not much you can do ultimately. the second time around is always better
yeah, I'm trying to figure out how those work
since I was specifically wondering if I could easily return all of the subtags of a parent
since that would be quite useful and seems like obvious functionality, but I'm struggling with it
Hi I am having this weird glitch all of the sudden where the third person character is opening the door despite not colliding with it?
I have tried removing the widget component from the character, changing collision size and removing the ability to do a line trace
Otherwise I haven't touched anything else directly related with collision, it seems to be when the character is rotated a certain way it causes this ie walking into the door normally does nothing but it I stand to the side or rotate it open?
Think I see the problem nvm
this blue line rotates with the character. its another collider? I don't remember adding another
nvm I am slow, I just removed the widget again and tried to replace it. for some reason the widget had a collider. Sorry!
I'm starting to think this might be an impossible task by way of blueprints but I'm trying to develop a system to visualize the closest points between two meshes on their surface I guess by using complex collision to give me those vectors. "Get Closest Point on Collision" is certainly not the way, I don't believe it will read complex collision, I still get pivot point/origin or some other errors
and once I have those vector by way of line trace I put start and end point of a simple cable component as the visualizer for runtime
You probably can't do it analytically but you can always move with a sweep and see where it hits
Hi there, I'm trying to lower my assets sizes by arranging other assets references but I'm facing a 2 ways cases rn, so I got a BP referencing a Niagara System which reference itself a 8k flipbook Texture that is big (142MiB), should I compress the texture itself OR convert the ref to the NS to a soft ptr and then async load it ?
Also, this looks like the source image is a .exr, I don't even think if it can be compressed.
I'd probably go with trying to compress that texture. If you need to use it then it would have to be loaded anyway, and I wouldn't think loading and unloading a large texture would be great for performance either.
not totally trivial
in BP, play with the friction settings
unless you're talking about the walkable slope angle
Is it kosher to return from inside a loop like this? To be clear, expected case for this function is to return none if no one has the thing.
I'd add a none return on completed but early exit from a loop is fine
Add the none return just for clarity, or have you actually been bitten by bad behavior in that case?
Clarity and the fact that it even works without it is pretty much BP just throwing you a bone
I know but bones like that are the little treats that make me like BP as much as i do ๐
If I want to take a container of gameplay tags, find every tag in that container that's a sub tag of a particular tag, and put copies of those tags in another container, is there a 'correct' way to do that in BP with gameplaytag specific nodes or do I just need to do it manually with a loop checking each tag in the container to see if it matches the parent tag?
So I'm able to detect the slope angle when walking on it. Now I need to figure out how play a sliding montage loop when the character is on a slope over a certain angle. (45+)
(This is only 2.5D so the character only needs to go one direction... I'm hoping a montage will do the trick.)
Any thoughts?
doesnt CMC already handle that
What thats cheating ๐
keep it simple:P
One could argue its a different type of slide i guess
Or its intention atleast
yeah I've seen some interesting things done with it, like making ice material with reduced friction.
But when "sliding" down slopes (anything above the default walking angle) UE treats it like the character is falling (and plays that animation) so I'm struggling to figure it out
Thats just the animbp logic tho
Just add a check for current slope angle and change the anim depending on it ?
You might even want to use a blendpsace for it tbh
If bSliding -> BS_Slide(angle)
Working on a gun system, for a shmup. I want some feedback for choosing between these 2 systems.
A) Features Actor Components that each containt all gun logic, stat, data, etc and tap into their owner for modifiers.
B) Is based on Data Assets. Each actor has a base attack component (if player, they have a special Player version) that only fires off events of the gun. Each data asset has all possible properties like firing type, damage, projectile size etc.
Anything outside of these two is welcome if suggested, too.
Where does W S go?
They all map forward and backward strangely enough
You need the Swizzle modifier
You see by default the values you plug into a vector 2D input always go into X
Swizzle makes them go into Y
Put Swizzle to both A and D inputs
umeal jengine
I can put a swizzle and a negate on A
Why is this alwys not valid?
Thank you very much ๐
No problem!
Is it not valid in game?
Because X goes before Y and values go into whatever comes first unless you tell them where to (or your input system splits them by default like a joystick)
Some IES systems however split X and Y axis of the joystick to treat them differently, then they need swizzle.
As for the widget, I see 3 events lead into the valid check. Which one fires the is not valid?
No problem!
the middle one
And this one as well is not valid
both of em invalid, causing problems in regards to the display of the widgets
Anybody know what this "V." symbol about blueprint local variables is? New in 5.5
PreConstruct can end up being called in the editor. Put a branch and feed in the "Design Time" bool into it - you only want game related logic to execute if it's false.
Your "Display Inventory" event looks to be what sets the inventory component to use, so if you end up calling PreConstruct or UpdateInventory first, then it may not be valid when those are called.
If an invalid value is passed in, that can also make it invalid in the widget.
should i do this for both player menu and inventory grid?
If you're going to use PreConstruct and want it to read values that are normally only present at runtime (like GetPlayerCharacter) then you should branch and use the false path to enure you're not attempting to read something that doesn't exist at design time.
Even then it might be to early
I usually do OnInitialized->SetupBindings()->UpdateInventory()
good idea, I'll use it on both then but still I don't think thats the issue
that might be a good idea to keep in mind in general for optimization ๐ค
Why is this only finding the first item in the array
Guys, should I flag some particular option here? when I set the reference from an active and persisting widget, the pointer is always invalid (wtf)
nvm, passing it by reference fixed it
Hello. Blueprint newbie question: I'm wrapping a PCG graph in a blueprint and I have a button that deletes the previous spawn, spawns new meshes, disconnects the meshes from PCG and stores the actor with the newly created meshes in a variable. Or that's what I want it to do, at least, in reality it just seems to execute some of the nodes sometimes. I'm guessing the problem is that everything happens before the previous node is finished, but I don't know how to control that. Any help appreciated.
Do anyone knows how to connect Level blueprints with behaviour trees, I have created dialog system in behaviour tree but don't know to trigger events after completion of dialogs
you don't
don't use level blueprint for any gameplay purposes
Then how I trigger a event after completion of dialog
I wouldn't know anything with what you have under the hood. If I were in your shoes, I will not make dialogue system using Behavior Tree
also the reason why you shouldn't use level blueprint is the communication is one way.
Blueprint classes can't reference the level blueprint
if you are following tutorial and they are using level bp, just stop watching their garbage content
Then how I can connect behaviour trees with blueprints
normally behavior trees would have Services to grab data from it's owner.
How can I create same, do you have any tutorial
No, I don't touch A.I much. But I don't like the idea of using BT to run dialogue system
you can probably look at the pinned material in #gameplay-ai to get started with behavior tree
I'll admit I'm a bit confused when I see that 'communication is one-way' thing as disqualifying for use of level blueprints.
Surely that's just a constraint to be aware of, not a fatal flaw that makes them useless?
I used level bp but I know it's limitation and the context I am using it
if you are using it for your gameplay framework then it's not the right place
but often tutorial dumps stuff in level bp then people eventually hit road block
and ask, how can I communicate with my level bp
well you don't & can't (unless you go CPP , but even then why would you)
make your code re-useable and accessible instead by not placing it in level bp
Means their is no way to connect blueprints with behaviour trees
no one say that though
Ok thanks
you cannot reference your level blueprint from blueprint class
you can have a reference to your behavior tree from any blueprint class, just get a reference to it
normally the BT lives in the A.I controller
Why is this not working?
not valid
It's also being set in here inside of this function
This print string is also workign just fine, it does output stuff
Same. Awfull ๐ฆ
Did someone say Flowgraph plugin?
Opinion on this setup? I have a patrol point bp which has an instance editable index for the point. On my AI controller I have an array for the patrol points and I populate it with GetAllActorsOfClass. Then on the task I cast to my custom AI controller then get a copy at the my variable CurrentPatrolPointIndex if it's equal to my array length then I set the CurrentPatrolIndex to be 0. If it's not then I move the AI to the spot of the patrol point and increment CurrentPatrolIndex
If I want to "loop" background music and have it select randomly between a few tracks, how would I do that?
(I can do a random select node, but how do I know when a track/sound is done so I can play the next?)
ChatGPT has faild me.
I'm making a blueprint that has a delineator, with a material attached to it so that when the sphere trace from the player hits it (While within a sphere collision around it), the emission value is increased. It's all working fine and dandy right now, but how would I go about making it work hitting multiple delineators (actor blueprints) at once?
It seems the current issue is that it's only creating one dynamic material at a time. I assume array's is the answer but I'm unsure how to properly implement them in this instance
Thanks anyone for help:
What are you trying to do?
Oh shit nvm
I don't get how this doesn't work
I can interact with multiple actors at once even with a single trace
Here you can see only the first sphere trace "activates" the emission, if you will
then once activated the emission value updates fine on all of them
So once activated the emission activates on all of them?
No, it only activates for the actor I'm looking at, but it only activates for any other actors once it's stopped colliding with the first actor.
You can see in the video each actor has a sphere trace, but only once the closest trace hits it does it activate
If I set a print string to show the DMI it doesn't seem to be creating new ones per actor, so I guess it's waiting for the previous actor to stop hogging it so the new one can use it
I guess what I wanna do is create a new DMI for each extra actor it's looking at that it can use but can't wrap my head around it
Where you're playing the music, make sure to use CreateSound2D. It'll return you an audio component, which you can then use to bind OnAudioFinished
Should this work so that I cast a line trace 50 up from my mesh?
No
Forward vectors a normalised, so your multiplied vector is going to be around the origin. You're also travelling forwards, so not necessarily along cardinal axes.
You want to multiply the up vector by a float value of 50 units. Then add it to the location.
X isnt up
We're in unreal
Z is up
But theres also GetUpVector on an actor, where youd multiply the entire vector with 100
I thought I added 50 to z
what's the math to keep scale proportional to distance? so as something moves closer or further from camera, it looks the same size?
Is there a solution and/or plugin for the fact that someone decided changing the location of the "Step through" button as you step through was a good idea?
Anytime you step through to a blueprint that can be simulated, it moves the whole panel over so you can't just keep clicking through because the button moves. It's insanely frustrating UX.
lets say the object is 1 in scale, and camera is 10 metter away. You get your ratio, 0.1. And to achieve it, https://forums.unrealengine.com/t/camera-distance-to-character-in-meters/1218047/2
Ok here are the basicโฆ suppose we have a camera and some object like a cube: You want to linetrace from the camera towards its viewing direction and evaluate if it hits some object. You must do this for the linetrace: this is the results: you can see that is hitting because at the end there is a red rectangle. in the blueprint: ...
edit/layout, back to ue4 probably
I mean : Window/ load layout.
Does anyone have any ideas for a way to make an actor smoothly rotate to a certain rotation inside of a behavior tree task? I can't call timelines or a timer to do a normal rotation interp. Right now I am using "Set Focal Point" but it winds up rotating the actor in a stepwise way which looks janky, and also does not trigger root motion and turning animations.
There's the code if it matters, the Spawn Focus Point is just set at spawn and is an arbitrary point 200 units in front of the actor's spawn location
And there is the result of the current code, there are turn animations but they are not being triggered
Tick exists there
Im using control rotation ๐ง
In the controller
And cmc set to orient to it
ah! of course. not sure why i assumed it wasn't linear...
thanks
I did just try using the "Set Control Rotation" node in place of the SetFocalPoint node but the actors don't actually rotate back, they just go to the location and stand there in whatever direction their walk was facing them
did you check the face control rotation checkbox?
That one?
yeppyep
Yeah that's on, I also tried Orient and they still did not rotate on arrival, but I need to keep Orient off anyway since the enemies strafe, walk backward, etc
I want to trace between camera and a random point on a plane parallel to the viewport.
So i need to multiply the random offset by the normal of plane??
how do i get the normal based on rotation?
hmm the forward vector of the camera i guess
this is using the Control Rotation
it's starting a bit slow due to my movement logic, but the rotation part itself has no jitter what so ever
Yes it is! Is that being set from inside of a behavior tree task?
Ah OK, I think I might have to wind up removing the rotation section from the "ReturnToSpawn" behavior task
void ATurnBasedBaseCharacter::SetTargetLocation(const FVector& NewTargetLocation)
{
/* If we're sitll moving, we don't want to update a new location just yet. */
if (!bReachedLocation || NewTargetLocation == TargetLocation)
{
return;
}
if (ConsumeAction())
{
bReachedLocation = false;
bIsMoving = true;
TargetLocation = NewTargetLocation;
GetController()->SetControlRotation((TargetLocation-GetActorLocation()).GetSafeNormal2D().Rotation());
EndTurn();
}
}
Since there is not really a very clean way to get an interped rotation within that task
Yep, I mean make a new task that is on tick, since the return to spawn task is on execute
So it only tells them to move once, whereas in order to interp I would need to update per tick
This can be enabled and disabled at runtime. When you know strafing and what not isn't needed, you could enable it.
So I will just make a new task that comes after the ReturnToSpawn called like RotateToSpawn or whatever that does run on tick
The Grid is perpendicular to the camera.
I'm trying to randomly spread my lines all over the grid.
ideally they would stop at the grid too.. obviously multiplying by forward vector here doesn't work
you want random points of that grid to trace towards that one center point ?
if they start from the grid you'd want to use the forward vector as the direction, Right and Up as offsets
personally i'm not really sure what the desired outcome is so hard to give tips
the center point is the camera.. so the starting point of the lines.. the idea is to detect hits with other objects and adjust camera focus based on detected objects that are in front of the focus plane.. not past it
i'm also going to aesthetize this whole process.. so it's not just a tool.. think of it as a crosshair floating in space near the target, kind of..
oh i found the node
can,t find a reference for it and i'm not sure how it works tho.. also i don't see how it let me spread points all over it randomly
i should have studied math hahaha
This part is good but it always hits the center of the plane.. basically I was trying to inject a random offset in there.. but maybe I can try to rotate the forward vector instead
oh nice
excuse the mess
Point is the point you want to project, so the trace end.
Plane Base is a the fixed distance from the camera you want to trace (along its forward vector)
Plane Normal is the normal of the plane you're projecting on to, soo same as forward vector in this case
ah I see.. so you get a random point using a rotation as well.. and it's the project point on to plane node that forces it to be along the plane
constrains it to the plane, yes
lengthwise
not sure what happens if the trace is to short to begin with.
possibly nothing
if you rotate the forward vector chances are it will be too short i guess.. so I could force this initial point to be further away
hence your x 100 I guess
and x 50 with the plane
correct, i just wanted to make sure
i didnt test the alternative, being lazy and all
yeah it seems to work.. since the "on to plane" node doesn't care about actual plane size, some of the traces are outside but they stop at its location.. that can be adjusted based on the random angle rotation
also that angle could be tied to my field of view
thanks
it's a bit complicated with the FOV horiziontal vs verticial
true
since its usually widescreen one way or another
yeah i wouldnt
just have a centered focus area of some sort
covering what the player most likely intends to focus
ignore the rest
I think this is where I'm stuck. Most the animation changes I've set up have built in functions (jump, crouch, etc)
I have the ani set up in the state, but I'm not sure how to "call" it.
in the animBP you'd fetch those values from the owning pawn on "tick"
as to which values to fetch, you'd need to calculate this somewhat yourself
OnMovementModeChanged (Falling) -> activate bSlideCheck, where you can trace downwards if there's no state in CMC telling you that it's sliding
GOT IT! I need to update the animation of course, and then keep him from sliding up hills ๐
thanks for the help!
Indeed. You can directly pick your texture in the dropdown
๐ I forgot that this is technically a 'falling' state so now the slide ani is also the jump ani
I assume the best course would be to make a custom value here?
personally i'd just have an additional bool to the falling state
but custom also works fine
you could just rely on velocity tho
where you have some blendspace
for falling vs sliding
and use the velocity dot product vs inversed UpVector as the scalar input
I'm just curious, did you ever consider the new mover plugin?
I have never used it myself but I'm quite curious about it. On the surface it seems to be much more flexible than the cmc
haven't heard of it
Oh hold on
pretty heavy to get into tho, right
The recently released Mover plugin is an experimental tool supporting movement of actors with rollback networking. In this session, we will discuss its high-level concepts, compare it with CharacterMovementComponent, take a look at what's running under the hood, and see what's planned for future development. Please note the README documentation...
Have no idea. For sure if you already have a lot of mechanics working with cmc it's not worth it
But, if you're just starting out, the flexibility it offers is at least interesting
You need cpp for it afaik
is it out of experimental ?=
Nope
Hm don't think so
heard it took quite some extra work to get it working properly
But on project titan they used it and it worked pretty well
I was just curious to hear more voices/opinions about it
something like this
with some trim you'd figure a nice dot value to swap (or blend) between sliding and falling
(ofcourse, dont calculate dot twice, just use the calculated value ๐)
some important guidelines for people who learned from YouTube videos (or eventually even some udemy courses...)
Myth-busting "Best Practices" in Unreal Engine by Ari Arnbjรถrnsson
Text version: https://dev.epicgames.com/community/learning/tutorials/l3E0/myth-busting-best-practices-in-unreal-engine
Presentation: https://www.youtube.com/watch?v=S2olUc9zcB8
thanks, also going through the pins..
@surreal peak can you update this post and add the information that since 5.5 you can right click a pure node and make it non-pure (show exec pins) to avoid the necessity of a cache variable
#blueprint message
For what it's worth this flowchart still isn't perfect. You can define it in a BP base class too
Doesnโt loading a bp base class load all of its children tho? I thought that was part of the issue
I told Cรฉleste, thanks! We aren't on 5.5 yet so weren't aware
Nah
Or are you saying define in base, override in child
No
Loading a child will load any parent. Loading a parent won't load any children.
Oh ok good, I misread Daekeshโs post
Basically, you have a weapon. Weapon has an asset.
Cast directly to the weapon when it's not loaded, you load the asset too. If you have a weapon base with no assets, and just the events, functions and properties you need, you can cast away to it. It still loads, but the cost is so miniscule.
It's worth noting that it's not specifically the cast doing it, but the blue hard reference, and you will incur the same cost with any hard reference like that.
The "casting loads things" issue is literally the exact same reason you shouldn't use hard refs in data tables to assets.
Hello guys, I currently have the issue that I have to press the left mouse button multiple times to activate this ability.
Once I start spamming lmb, this ability eventually fires again but it's really inconsistent. Triggering it for the FIRST time works, though. It's only the consecutive button presses that cause the error.
Do you have any idea what the reason for this might be?
The issue isn't the ability itself. Cause this print string also does not fire when pressing the button.
This is my input mapping context for the button.
Do you have other settings on the input action?
What do you mean with other settings?
Triggers and or modifiers
I don't think that I do.
The ability is also pretty self contained. It shoots a projectile, returns it to the player after a while, then destroys it. Afterward, it ends the ability.
I mean if that is all, with only a triggers set to Pressed, you should be able to spam a button as much as you want and consistently see the print string working
I thought so too, unfortunately that's not the case. The issue occurs after I unlock the ability and use it for the first time.
Then it starts getting inconsistent.
The ability is another thing, there you can have more things going wrong but you say that the print string is not consistent too which is weird and the only reason for that I can think of is if you have other settings for how the input is processed
this screams a bit of non terminating the ability right away. But it's the print string thing that is throwing me ofg
Off
After I use the ability, the following happens:
- Pressing LMB once does nothing
- Pressing LMB once every second does nothing
- Pressing LMB in quick succession (like 0.2 sec or so) shows the printed string and activates the ability again
Hmm just to exclude everything can you show your input action?
And if you remove the activate ability entirely and leave only the print screen you get the same behavior?
*Print string
Ah
Then the issue is in the ability. What are you doing there?
Most importantly how are you ending it?
And are you using any node like waitinputpressed/released?
I spawn an actor rotated toward my mouse cursor position. Then I bind to an event in this actor.
And once that event gets triggered, I end the ability.
So to end the ability you are waiting this event. Then I think the delay you're seeing between activations is due to this
The ability won't reactivate until it's over
The vectors on the left are just to find the rotation and spawn position of the actor.
Yea but the problem is most likely where you bind the event
I don't know what that event is but it's likely taking more time than your input presses
This is in the spawned projectile.
This event gets called in the ability after a delay.
Ah a timeline. Makes sense that it take some time to complete! Just to debug, try to end the ability right away, without waiting this event
You should see it activating consistently
Okay. Am I going about this the wrong way?
