#blueprint
1 messages · Page 259 of 1
Thats where it appears, Convert Selection to BP's.
The camera blueprint is just in the level, the gamemode blueprint gets all actors of that blueprint class which should only be 1 and that's what it references for the Set View Target with Blend function, but its being set twice. Once by characters that are just input receivers, and then again when it spawns the actual playable characters. Both times its using a player controller with the player index.
The last screenshot is the camera movement
Your Active Players, do you update that when a player dies ? 🙂
If I have this setup when the player is killed, it should remove it from the array in the camera bp, which should get updated as it runs on event tick to constantly update the movement and arm length
and when P1 dies it prints Remove Valid which is good, but the camera still breaks
I'm thinking that the Active Players Array IS getting updated, but the Set View Target with Blend also needs to be updated with a new Player Controller Target, as it's defaulting to 0, but obviously if Player 1 (0) is destroyed, it's not being reassigned a new controller
Active players in camera bp
Serm to be its own variable
Not the same as in gamemode
its being set from the actual character spawn in the game mode blueprint which calls to the function in the camera bp which is how it has the variable in the first place
Yes
But its never updated
When player dies
Its a copy of the original array, nothing els
So do you think if I make a custom event in the camera bp that casts to the gamemode bp, setting the new active player array value
that event is then called in the player bp after the player is destroyed and removed from the array
that would work?
Like this?
Just let the camera read the array directly from the gamemode
Nevermind it didn't work... I think its the player controllers in the gamemode, I think the Set View Target with Blend needs to be updated. It's setting the target once then never again
Instead of feeding it a copy
Generally speaking, what is the acceptable size for a player character's BP "Size Map"?
110 mb?
acceptable as in has little affect on the performance
It still breaks the camera even casting to the gamemode to get the array variable... I'm convinced it's the controller target for the Set View... I just need to work out how to make it update on player death
Isnt view target retained by the controller, not the pawn?
It's being set to player controller when the players first spawn in, so I would assume it's being targeted to Player 1, first in the array, so when it dies it's not being retargeted to another Player
This is my attempt to blend two soups into one bowl here. So the youtube tutorial person who im following for my crafting system wants me to go into my inventory_system component and do something like that, only problem is that he is working with dictionaries and my entire inventory is built with struct arrays.
Someone here @gentle urchin earlier told me it's up to me to decide how im gonna fit both feet into one shoe and I did decide, since changing all this again would be like trying to un-ink or remove a tattoo after you just got it done 2 hours ago.
This is the said tutorial in question
He is using "Find" then he gets the Amount
I think it's the same thing
Sorry for the ping. I created a new function in my gamemode, setting the new target for the Set View, just with last index to be quick. I'm then using the cast to the gamemode bp in the character bp to call a custom event that runs that function. I tested it pretty quickly and it does in fact work. So I think the whole issue was completely down to player 1 being destroyed, it was no longer a valid target for the Set View Target with Blend and needed to be updated with a new target. As soon as I tested it and made P1 jump of the map, it snapped straight to P2
Honestly I really appreciate the help you guys gave me, I genuinely wouldn't have gotten this to work without you guys' help and advice, truly assets to the game dev community!
oh damn I also forgot to connect the for each loop to the execute there
This is so weird to me, i need to investigate it later
But glad it worked!!
Im confused about why player1s camera goes to dust, how it swaps, and why your originaø setup didnt work, setting all controllers viewtarget to the same bp camera...
Unless your index was wrong somehow
if i hover over any blueprint pin it shows a small grey window. how do i get rid of it?
@frosty heron For your missing details panel issue in C++
https://brandtborges.wixsite.com/authaer/post/fixing-corrupted-blueprints
wasn't even missing detail, component doesn't exist on the actor spawned at run time 😭
do you think that will work for such case too?
this was the issue
it's there now after I made new blueprint and re-do everything in that bp...lucky I am still early in the development
reading your blog anyway
I'm unsure. Missing entirely from the actor is a bit weird, but unsure how that details panel handles it.
It will at the very least fix the left issue with the missing details panel.
go 10 what
I'm curious if those are the same widget. If not the same I wonder if one maybe pulls uproperties and the other pulls components.
Might look after I'm done building source engine.
Ten million.
Oh, no 😦
I mean, maybe?
I had to cheat and use cpp because I wasn't sure how to get chunky lazy loading in bp, but I built it, zoomed out, realized there's no world in which I need a million tiles for a prototype, and made it 500x500 instead (which is still probably way too big)
What did you make them out of?
instanced static meshes
I think I was doing it wrong in the blueprint implementation in the first place, I'm pretty sure, given the insane difference in loading times, I wasn't instancing jack diddly
Also, once I realized it doesn't really matter if i can see the grid in the editor or not if I just have things snap to the grid when the game runs, I stopped crashing the editor lol
Hey, I'm stuck on an issue and unsure how to proceed (Im pretty new to unreal)
So I have a mechanic where the gravity will flip and I only want certain actors to flip gravity when that happens. Ive got the player all sorted and the gravity flips fine (Im using the Gravity direction in the character movement component for my player). My issue is with other actors, I have an actor which is a character mesh which I want to ragdoll, it does ragdoll when using normal gravity but when I flip gravity, I set gravity to off then AddForce shown in the screenshot below, however the arms/legs etc float and dont seem to get effected by the add force, also the character mesh once it has hit the ground loses all force but wont stay against the floor and moves around a bit, how should I go about it? Thanks.
I want to assume your issue with them resting is due to repeated add force calls. It may wake up the sim and force it to stay awake and act like it's being shoved still. Uncertain how to solve it though. I don't think you can affect things per instance that way. I think they follow a global level gravity if memory serves.
10m no prob with isms ! As long as they're standing still 😆
my problem is I didn't realize how big 1000x1000 100 square tiles actually was, and for prototyping movement and stuff, it's too big lmao
swaps between free-roaming and turn based, and the grid is called for farming stuff
I thought I'd be clever and keep the grids local to the actors during combat, but communication was a pain in the butt
if BG3 and Harvest Moon had a baby, put it up for adoption, and it was raised by pathfinder: kingmaker, is what I'm calling it
very modest project 😐
Holy cow. Not solo i hope
I went withn using DA for my grid,
Gotta learn how to query it and setup the right delegates (assuming they exist)
solo to the point where I can show off a combat scenario and how to plant a seed, it won't ever BE the project it's supposed to be, I just want a prototype
But If I dont continually add force the actor would just float, it needs a continous force like gravity. I know you can change gravity globally but that wont work for what I need to do. Theres defintely got to be a way to still use unreal physics but apply my own gravity to an object that acts in a similar way to unreals own gravity. Haha maybe I just make it so things are a bit floaty when gravity changes and have it as a feature rather than a bug 😂
There is likely a way to do it but it may require C++. And may be somewhat involved. I imagine there was a specific choice to avoid adding an extra vector to every physics body to maintain gravity due to wanting to keep physics sim lighter. At least that would be my first assumption. 🤷♂️
Yeah sadly I dont have the time to actually invest into it as I need to get this current project done in a week + I would have to learn c++ as I primarily just use c# for work, thanks anyway :)
Wait what
Can you change gravity globally these days?
Naaah surely we cant have that luxurious treat?
Hey guys. Is there an easy way to detect if my ragdoll object stopped moving? I want to disable physics on enemy body when it's dead and not affected by any other object
Do BP actors have a destructor event when the object is deleted? or is that something I'd have to manually add
~~Hello guys i have tried everything to solve my issue for a long time now and its partialy resolved but if someone have a more sustainable option i would love it,
my problem is that i have system to chain looped animation montage and fire a new loop after an input and it work fine but sometimes the blend out mess up and 1 frame appear from the idle stated in the animation blueprint of the character and to resolve that i set the blend out trigger to 0 and i make it that anim montage are long enought between loop and transition animation to not mess up cause it could be potentialy too short
my need is to make that the animation blueprint stop interfering between those different anim montage playing almost perfectly in sync but theres is always one frame going wtf any idea on how to disable the animation blueprint or something like this ?
~~
i disabled auto blend out and it work in my case
hey, how do i check remaining ftime of montage less then or something ?
Maybe something like this?
There's also a "Get Play Length"
hmm aye i want % length left tho
Math it.
Current / Total = %
yeah ty!, or acctualy you know if thers a way t turn of "root motiopn" of a montage at a certain time ?
Nope, animations aren't my forte :/
hmm ok well il ltry tthe math ty
Not sure you can do it at runtime?
Its done in the sequence. So you might try and get that and see if you can alter it
hmm
I have this struct that i'm using every time on restart of the engine It breaks even though I refreshed it last time something like this happened I had to compile first then save but as you can see compile has the error block on it
For "Get Overlapping Actors" Does it have a way to use a specific collision capsule?
Disconnect both sides of the for each loop.
Save.
Close and Re-open project.
Reconnect Foreach loop.
Ok so just renaming the struct and setting it back fixed it
Also already tried that didn't work
:/
but I works now what an infuriating bug
That kind of corruption normally resulted in all the value defaulted when you rename the struct.
Reordering or adding more element to the blueprint struct can break it silently
Is it taboo to not have objects implement the full spec of an interface?
or is it more something you can do but have to be careful with
How would I go about making an object simulate physics once it’s touched by another?
You can do it off of its Event Hit with Set Simulate Physics = true
I don't know if it's taboo but I would try to avoid it just from a manageability perspective.
Id always expect all things to be avaliable if something implements an interface
You may return null, but atleast you do that - return null
Is there a way to write a default implementation?
For example I have a door and an NPC, and they both share similar kinds of interaction events, but some stuff like locking the door you can't do to an npc
and it feels like it'd get messy to make a bunch of interfaces for one-offs like that
Use a component ?
I think since I don't know I'm just going to do whatever and find out the hard way
This isn't 100% blueprint related, but I like it here and you guys are nice:
I know without seeing the code you probably can't make an educated guess, but during gameplay, as I move my camera pawn around in my world, I'm getting stuttering as the gridmesh loads in. Is there any tweaking I can do to help with that?
Example: as I move forward, that conveniently un-gridded square of floor is gonna populate a grid, and I'm gonna stutter
I FEEL like once I get actors in there, and tighten up my zoom clamp and maybe institute some sort of fog of war system, this won't be a problem, but if i can fix it proactively I'd like to
here I take the player's name and store it in the steam name text
after storing it, I want to get the names of the players when setting up the server and write it to a player list
Why store the name somewhere else other than in the playerstate?
but steam name is printed blank in gamemode
The gamestate contains an array called the "player array" that contains a list of all the playerstates if you need to get a list of players in the game.
to store the names of all players and print them on a list
thank you people on youtube do things in a very long way 😦
Thanks!
set an enhanced input to hold but its taking too long to actually activate the event, i want to shorten the hold requirement. how can i do this?
Hey tyhis is calcualting the direction based ono the camera from the player character
how can i get the direction based on the mesh rotation
Rotate vector
It's hard to know without a profile. My initial guess is BP loops. Or updating the mesh every addition instead of adding all and then updating. Could even be navmesh updating as you're adding if you're not using lazy gather. Too many things to guess at.
I am using lazy gather, I'm going to attempt to lower the tiles per batch that the grid generates or maybe the range it starts generating and see how that works
Maybe. I'd also just consider doing a quick insights run. Even in editor it'll point you to a better route than shooting in the dark.
Have am to tell what mesh this refers to ? Trying to simulate physics on ''/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap:PersistentLevel.StaticMeshActor_UAID_244BFECC176D819E01_1133485711.StaticMeshComponent0'' but it has ComplexAsSimple collision.
Not sure the best place to ask this, but has anyone dealt with using a DS4 controller for input? Unreal doesn't seem to have native support for it
or is it under "gamepad"
why would you reply to that message to ask that?
Depends, are you wanting generic controller functionality, or the DS specific stuff?
Because I didn't mean to oops lol
lol
For now generic controller functionality
I don't want to use DS4windows
should just fall under the gamepad umbrella
if it doesn't work you'll need to use that, or become a playstation partner to get the integration from epic
cursed
DS4 is such a nice controller but Microsoft is cringe about gamepads on windows
Hey guys. So I'm using gameplay tasks to check a player status, which works fine for that purpose, however - if I have two statuses, the Switch On Gameplay Tag Container node is only executing one exec, it seems.
Removing the Tag right after the switch ensures that if another tag is added, it switches to that. However, I want to be able to see if the player has a status, do this or do that, right, so that wont work.
Any tips? 🙂
nah generally speaking gamepads work fine. Sony is just very protective of DualShock
If you have a short fixed list of status can probably handle it through branch chain, but if you have a lot, could probably make a status effect component with a "apply status effect" function that does whatever it does to its host then create an array and loop through it whenever it's time to apply the status effect or so
if it's a constant status effect, could have it activate on apply then when it's removed it removes its effects
I'm planning to have an elemental affinity system where I need to check if an enemy is Wet, if he's wet, then electrify if you use a lightning spell. Things like that, so essentially with 5+ elements it'll be quite a chain of branches
The latter option sounds a bit better. Was hoping to get by with just a Switch and some Timers by Event to reset the tag hehe
yeah when mixing and matching you kind of need a more robust system
So right now I'm running the Switch into a Timer, which deals damage, does a countdown until the tag and timer is reset. Looking at it now that wont work at all hehe, but oh well
though for something like is wet, you just poll the enemy to see if they have that bool then modify the effect
Yeah I'm trying to run the system through tags in this case, to avoid a lot of bools
but in the case of the status effect array, you can just check if they have that specific effect
Trying to wrap my head around the status effect array setup you mentioned - would I be adding the active effects into an array, and then on each loop check if X effect is active and do X, but if XY effect is active do Y, so a branch chain? Or am I missing the point?
I might just go with the Branch chain. If I do a Sequence into each individual base effect's Branch, I can have multiple effects applied at once, and also do additional checks with each individual branch chain, such as If on fire and water is applied, douse the fire
Hey guys, is there a reasony why i suddenly cant delate/copy nodes?
well the array acts as a one-stop-shop where you can poll actors for status effects
Like for example you have a wet status effect
as long as all actors have that array pool, the effect can add itself to the pool. Then when another actor comes along and says "Are you wet" it can check the pool to see if it's there and process it accordingly
Additionally the Actor itself can poll its own pool for status effects that want to activate every tick
or so
I used it at work when we were doing consoles. What's wrong with it?
it makes things treat it like and Xbox controller and that breaks a lot of things
How so? It never broke anything for me.
Unreal doesn't care what gamepad you use. It's all the same to Unreal. X and A are GamepadFaceButtonDown. Y, and Triangle are GamepadFaceButtonTop. Etc etc. Makes zero difference.
My development PC is also my recreation PC, and some applications have dedicated DS4 input
I'm not sure what that has to do with Unreal though?
so swapping back and forth is a bit of a pain
🤷♂️ Either way, it works well for using a PS4 controller on PC to test gamepad use.
yeah just wish I had a native way to use it
how to get cylinder collision overlap check for actors?
I tried doing a static mesh + overlapping actors but it don't seem to work (does anyone do this and get it working?)
I guess not a problem right now.
Its just because I had issue with it later, but I think it was because I had... maybe physics calculations on select.
How do I even profile cost for something specific like this?
I guess this could be a good reason to go back into profiling exploration 😛 .
@faint pasture sorry for the ping, I'm about to start working on wave function collapse to generate dungeon rooms.
Does it basically just generate textures and we evaluate the pixel as a tile? What about the walls if that is the case?
I'll DM you and go over my setup. You can use my plugin if you want, I need to finish it anyways.
I don't want to trouble you but thank you soo much. Currently at work but if you have github for your plugin, that do be great. Maybe I can figure something out before I ask more questions.
anyone know the simplest way to make this 2D sound repeat only on the next event hit? without the do once, it spams while the player is moving on the ground
Box Overlap actors cant detect light?
I tried Static Mesh Actor and it works fine
But not for Rect Light, Point Light, Spotlight
@cedar ibex you will most likely need to test against collision
Light it self don't have collision
You can make your own light and attach collision that overlaps
Got it, thanks
and are you helping them to the answer?
People here aren't paid
ask a super vague question with super sparse information and you're less likely to get an answer
How can I access a data table row by index in blueprints?
get row names, pick the rowname from the array by your index and fetch the table row
DTs are very much limited to fetching by rowName, anything else has to build up on that
lock the roll axis
What are you trying to do? (need more context)
would i do that in the skeleton or on the camera?
that depends on your setup
Hi, If i have a static mesh which is the shape of C (Ie a half circle which is in front of he character is it possible to get all "overlaps" within the C?
I was thinking that I could do a few multi capsule collision traces along the arc to check for hits but not sure if this is the best way
Or... Maybe I can spawn a sphere trace from the location of the player and move it forward slightly so the sphere center is halfway between the feet of the player and tthe desired location?
This image kinda shows the mask being used for the effect and the desired outcome(I just changed the materials manually for the ones hit)
you can get the actors overlapping the mesh "C" , yes
How as I can only see OnComponentOverlap and OnComponentHit
alternatively you can do a sphere trace, and filter hits by Dot product to facing direction
e.g. dot product of > 0 means it's within a 180 degree sweep
Ah ok thanks ! that makes sense
dot product of > -0.20 or so probably nears a complete C
I did ttthink about doing this but i figured there had to be a better way
I,ll try the DoT Product method 🙂
I do 🙂 its jus how I pictured i might be able to do it with collisions 🙂
but your way seems better using 1 trace instead of 3 seperate ones
and then ignoring anything with a dot <20
>-0.20
Not had much experience with DoT product node I assume pin 1 is the location of the hit actor and then 2nd pin is the location of the player?
hey guys, I'm kinda new to unreal and I was trying to setup this death thing in an actor component, but I can't change the default value of the object reference variable, what do I do ?
How do I see this stack trace?
Message log is empty
I managed to see the erros is here, only happens when the blueprint is compiled, if placed and moved around it's not an issue, not sure what's going on
And now it's gone! I didn't do anything D :
You can't. The blueprint is the "template" of the class. They get instantiated at run time when you spawn them during game time.
Since you are in editor time, there is no instance of the class that you are in. Meaning it doesn't have any reference to any world and can't pin point to any first person character since the class is not instantiated yet.
You will need to set the reference using an event that is run during gametime.
E.g on begin play, you can get the owner and cast it to your bp third person character. If the cast succseed set the reference from the cast result
@remote compass
Sure but it's not something I would do as component should work generically
Also you shouldn't really use open level by name. That is error prone.
And I wouldn't handle moving to level after death in w.e component you have. That sounds like the game mode or game manager job.
I recommend using open level by soft object ptr instead.
Oke, thanks a lot
what are you looking at exactly? maybe don't crop them
It actually stopped giving me any issues. I'm not sure what happened, I tried to fix it all morning
In the control rig you can add a curve node where you can modify the curve in the node itself. Does anyone know if there's anything similar in BP?
Edit: I found it, it's just the 'Curve' structure. It has the option to use an external curve as well.
Edit 2: Actually it's just the 'Runtime Float Curve' haha.
Hi... sorry still got this madening camera/head Tilt when the mouse pans left and right..
what I've tried:
"Use Pawn Control Rotation” -- off.. set in both camera and cameraboom
"inhiert Yaw" -- off
Tried to use Camera lag stuff -- still there just smoother and laggier 🙂
Tried to look into the skeletal mesh .. top stop head bone movent... FPS arms dosnt have a head bone...
not sure what else to do about it
I know 100% I was able to get rid of it in my old now broken project.. so i know it can be done.. but i dont know what i was searching or doing at the time when i found the original info about it..
I cant seem to figure this out xD
show code
you want to check the direction towards the enemy VS your char's "forward" vector
Something like
GetActorForwardVector().Dot((GetActorLocation() - Target->GetActorLocation()).SafeNormalized2D())
I think i need to learn about Dot Product more as Im not really sure how its doing its calculation and i feel copy and pasting without knowing what its doing is probably bad for me xD I really appreciate the help !
this is what i ended up with but not sure about how its working or anything xD
(GetActorLocation() - Target->GetActorLocation()
You are missing this bit
I mean, I don't know math, just saying you are not doing what he is pasting
i switched to easy bp mode in between xD
Ohh its a math calculation im so dumb...
So this prints out -0.7 when its in front of the character
i wasnt to far off with .2
your unit direction is mixed up tho
from char to enemy
not from enemy to char
you can add some debug to it if you want to visualize easier
this gets the visual angle
What the... Setting the opacity of text doesn't affect the drop shadow. o.O
Edit: Got to set the render opacity instead. Don't you just love UE at times haha.
its the quirks that keep us around, right?
imagine if things always worked as per our expectations
wouldnt that be boring ?
had the most shocking revelation about Unreal Engine yesterday
blueprint corruption...
lucky I am not soo deep into the bp
can't believe that it's quiet common too
i swear its like they have a mind of there own sometimes
i cant stand the fact that the bps am inheriting from have a bunch of legacy support crapola in there confugulating things.. no offence to the dev
and the productivity hits.. are just frankly insufferable
I just loaded up my other project which takes a figgin age to load because its all smashed up and sometimes crashes .. but yeah the camera tilt on pan is still there but its so slight ... it actually seems like a desireable effect which is probably why i stopped caring about it before ..
ouf that's a scary story if ever I heard one
I thought only blueprint struct is prone to breaking, damn I was wrong
there is literary no safe zone with this engine
I wonder what you actually did to cause it tho
but yeah it can be a dangerous game
goes for many engines i suppose
had some IDE's do the same on me
corrupting their own files
ruining months of works
I removed a child component
had a sphere collision for my camera
In the end, I opt to use material for dithering
ahh
so I removed it but Unreal went Sike
Not even renaming, I just removed it
and after that one of the widget component just went missing
like it's not missing in the blueprint class but it doesnt exist on Run time...
almost sounds similar lol
I was wondering why I keep getting null ptr, i ejected from the viewport and sees the component missing
if you straight up just rename the component in a regular way it can cause weird shit to happen
regular != correct way
Create a new bp, re-parent, lingking all the reference again. Then I got confirmation that it was blueprint corruption because the component exist on the new bp
need a good ol' sanity check after such a ride lol
good thing you werent knee deep atleast!
whats the other thing i saw.. oh yeah some times if you copy and paste a bit of graph across it will start complaining about missing things fair enough... but then suddenly it renames aload of inputs blabla_1
breaking every thing
and I was told, once they exhibit corruption, it's terminal... something will bug out and the only way left is just to create new bp
that's normal if you copy paste from other bp class but that can be fixed easily
its mostly because you copy a member function that belong to another class afaik
yeah its not to bad you just have to unlink every thing from the _1 then rename it back
yea you just gotta do that 1 extra step
I've sometimes managed to salvage parts by renaming the asset in the windows folder
removing most links, but if i had valuable logic in there, i can extract that
sometimes
🫡
thanks!!!
that is my old project with the smooth camera tilt that doesnt make you crazy
Am I correct in saying that if the actor is always present in the level it's fine to cast to it / hard ref to it?
Yusss
Usually anyhow. It's still good to have code only parent classes to cast to just incase. Keeps you from having big circular linkers to things.
one thing i just noticed as well before when i tried to put the fireing animation onto the player it failed... things where bugging out and it wasnt working... but after the 5.5.1 update that has magically actually fixed it self
so maybe original project isnt as bugged as i thought
Hello, why doesn't my code start spawning things? it spawns with ''beginplay'' going into timer, and I get the print after ''cast to start and death'', but it doesn't spawn
What is 'Spawn Projectile'?
it's an arrow where a moving projectile spawns from
Interesting
What's 'Start and Death Collider'? Is this the thing that is doing the overlapping?
yeah, once it overlaps with the collider it start this code
So the 'Start and Death Collider' is what is overlapping with the turret?
yeah
Odd name but ok. It's most likely an issue with you're collision settings then. Potentially on both.
hey guys im running this in the level blueprint to change PP at run time based on an input event
really werid situation where i can see the value increasing in the editor details pannel at runtime but it doesnt actually update it
so you guys basically all have that little head tilt after pan
like a gurl flicking her hair ha
i totally flick my hair every time i pivot my body
its has to be the stupist thing ever... that you can not fully disable or clamp it properly
duno personally my kneck bone stay fairly strait when i pivot
no hair flick needed
nor did the surface level / terrian height change to justify a movement
ok
its just balls really i cant be making a game with that daft head tilt
or no way to manage it
worse then when the uk pigs put there thumbs in there over arms cut offs arms warmers and shit
Head tilt?
Those are some oddly derogatory feelings to share in a professional space.
well then dont tilt the players head with out the dev being allowed to manged that fully
with out out jumping through insane hoops with the skeletal mesh and and such as we are just basically trying to learn with out being permanently agrovated by the editor and such
That's not a normal pawn's yaw rotation. Roll is unaffected if you use normal control rotation calls to add yaw input. You've either implemented something yourself wrong, or you're using a bad starter from someone who did it wrong.
are you talk to me @maiden wadi
Yes.
ok
yeah i know that project i did some weird thing in the graph to make it more stable
Where is your camera rotation code? Are you using AddControllerInputYaw calls, or are you calculating the new rotation manually?
give me a moment because some of the code is from MGT gravity template .. and some of it was my own .. but yeah i know for a fact i watched a guys video and showed you exactly how to fix the the camera shake to a level where it doesnt look so disgusting
every time the mouse look or what ever event triggers
basically any time my character (in this case, a ball that rolls) hits another object I want a sound effect to play, but it either only plays once, not at all or spams it continuously
The on hit event will fire when its hit by anything. This will include the floor or other things you have in the scene. Normally when I determine if a hit sound should place, I check the velocity of the two objects, if its above a specific speed then it'll trigger a sound. This can help prevent it from spamming when it's not really moving. You can also use the speed to determine the type of sound or even the overal volume.
So I've got a constructor that prints when it runs, and I've got a function to bounce the current level. And what's surprising me is that function is NOT causing constructors to re-run.
Is there some more serious way of reloading a level which will actually force my constructors to re-run?
makes sense in theory.. although i'm still too new to take that knowledge and put it into practice without seeing it done lol
Hi, I've upgraded my project to 5.5.1 (from 5.4.1) and this BP error pops-up. It's trivial to fix (refresh node or add it again), but the problem is after I close the editor and go back it breaks again the same way. Then I fix it again and it still breaks after restart. Node obviously works, because everything works fine (play in editor) up to the point I restart, then it happens again... Anyone had a similar issue?
Good point i should test it prints this when I nav to the level from a different one
Yep, confirmed it runs in that case
Name your "Find Files" function something else. Save. Exit. Open it up again. At that point you should be able to rename the function back to "Find Files" without issues on restart.
I can't rename it, it's UE's function from BP file utils 😦
Try disabling and then renabling the file utilities plugin. If you don't save any of the BP's they might automatically fix themselves when you restart the editor.
Tried reenabling, but I think I fixed it while doing it. It did not help. Will try just reenabling without touching the bp
Maybe version controls (git) breaks it?
I did not have any issues with git up to this point (and I did a lot of development on this project, starting on 5.0 and upgrading with each release with no major issues)
Is there a way to change the time scale for just the world physics instead of everything?
Wow, I went back to 5.4.1, removed the node and then upgraded to 5.5.1. Only then I've added it back (in case the upgrade process breaks something). But the issue came back right after I've added it 😮 Really annoying...
Went back, as in rolled back all the changes in git, so it was a clean upgrade as well
I can only find global and cinamatic time dilations
Is there a way to get a location along a line at fixed z-axis? For example:
My line goes from x:100, y:100, z:500 to x:200, y:500, z: 10 and i wanna know what the vector is when the location is Z = 150 (e.g. from a trace line)
this to me sounds like unknown target
i was wondering how to make it send unkown taget to the hud or something
hello, i have a quick question, i have a variable who is an enum type with 4 enumerators in them, how can i get what is selected when game runs and get the number of the enum in the list? like: thing1 thing2 thing3 and i have selected in my variable "thing2" whitch is id 2, how can i get that id in blueprints? i dont see something like ID or something
You can convert it to byte but why? Enum is just a named int. If you select thing2 then just use thing2, why do you need to convert it to int? That defeat the purpose of using enum.
yeah it just kind of numerical
i have an enum of "ore types" and a structure with same thing but more details etc, they have same order. And based on that choice on the ID i get from the enum, i select the same thing in the struct and edit it or use the id elsewhere
not debugical
If you need to have a pair ( key, value ) use map.
But you can convert the enum to byte anyway then convert it back to int
Just kinda weird imo
yes, i found that i can convert it to byte and i think i get the number i want
i just wanted to find out how i can convert that enum into an integer for the id thing
Convert to byte then convert the result to int
so you need a thing that points to array of things perhaps
what do they do they call that is classic C++
😂
GameplayTags says hellllo
DataAsset pointer cruises by. 😄
ugh EIC really fights me
i actually have to figure out how this thing works now, and it's driving me nuts xD
just gives me 0 value 😦
How can I do this in the details panel?
I want to be able to set the references to buttons & the associated value without having to run bp code, otherwise I might as well create 2 arrays and use them without the map...
wow you're really fan of variables
about 59 at the moment in a single bp, that's why I'm trying to cut them down
Hi guys, does anyone know how I can see the debug of my perception in a bot? Before in 5.1 I used ['] and num 4 but now in 5.4 I don't see my graph debug ?
IDK all these settings, can't use read/write directly to game user settings?
Could you not make your settings widgets just read and write based on tags or something instead of having some centrally managed thing that needs to know exactly which widget is which?
Hi! Can someone explain me what is The difference between query only and physics only in collision enabled option, and why in character default class capsule component has it both enabled?
A query is a line trace or shape trace to "query" if something is in the space. Physics are based on the motions of objects. A character running into the wall is a physics action.
Do you know some tutorials about that?
@lusty birch @dawn gazelle so I've a wbp called OptionLine, and I have 27 instances of this in my graphics menu. Surely each instance needs to be a variable so I can set the unique text inside each one?
Maybe try tarrays or tmaps. Strings can be fetch from data table instead of makearray
You should be able to have an exposed variable that you can feed into the widget itself when you add it to the widget that houses it.
wdym?
currently I drag as many instances of the optionline widget as I need into the menu, then name them all, and make them into a variable
With exposed variables you can make it so the settings handle everything they do themselves without having something centrally have to manage it all.
Ohh good idea, and without needing an event binding that is performance heavy
but that doesn't help me with changing the value of the text to reflect the currently selected object
any idea on how to deal with that?
Is doing a line trace every tick an expensive operation? Wasn’t sure how careful I should be when using it
isn't that what a binding in a widget does by default? Anyway, the preconstruct works almost the same, and only runs once
no, I mean creating event dispatcher in your widget, if you wanna communicate with parent if clicked on widget for example
You'd do something that involves assigning the widget itself to change some value somewhere based on something.
If all these widgets were numeric values, you could theoretically assign each a tag (an FName) or GameplayTag, and then populate that as a map in some kind of save game object. If the value is contained in the map, then you use its value, if there is no value in the map, then you use whatever default value assigned. As far as what it ends up changing, then you still need some kind of thing that manages that. You probably wouldn't want the widgets themselves managing that as you would need something that can update those values at run time without those settings being open.
or I just have the game create the widget on load which allows it to execute the construct node, and apply all the saved settings
You usually don't want your widgets used for logic. They are representing what lies under the hood, and gives you a means to input values.
thanks for the exposable name, that's great. Now, in the parent, I think each optionline still needs to be a variable so I can set the focus on them when using keyboard navigation
so you would recommend?
Hard to tell what you wanna do, check this example, widgets created in for loop and widget have event dispatcher item clicked with reference to itself
putting the graphics settings into a player controller?
this is the option line, there's 2 buttons, each bound to an event dispatcher on clicked (or A/D pressed)
in the main menu, you can see that I have multiple instances for each available setting
among other things, I need to know what the currently focused widget is so I can update it with the next when using the keyboard to navigate
then when you click on the left/right buttons to change the value of the optionline, it needs to update the text that's currently marked as "Text Block"
I think the correct way would be to subclass GameUserSettings to facilitate the settings you need in C++ and creating a function within it you can call to update the values as required.
I'm not sure how all the settings you have actually need to play with the engine itself, but I imagine most of them would probably be best be managed through this object.
Otherwise, GameInstance would probably be better to use so at least you're not having to constantly load and reload the settings and loading up your player controller with something it doesn't need.
the gameusersettings subclass isn't worth the trouble, it's easier to just use a savegame class.
the settings just need applying on the game start, and then they're consistant, hence why I've set it to load the widget, apply the settings, and then destroy the widget again, the settings have already been applied
what I'm more concerned about is the easy & tidy why of implmenting switchers for the options, and how to apply them properly. I'm starting to think I need a massive data table which corresponds to the layout in the widget, which can be used to sort through all the optionlines and execute the right code.
I still haven't found a better way to group all of the instances of the optionline into a single place for easy access though, so I'm kind of stuck with a big makearray setup
I am trying to migrate a blueprint actor I created in one project over to another project. It's less than 15 static meshes and less than 10 materials.
For some reason, Unreal Engine seems to want to list essentially my entire content library as dependencies. It's even including assets that aren't being used in the actor I want to migrate.
Anyone experience this before?
The widget should just be thought of as something that is there to represent and manipulate a value. Imagine at some point you wanted to re-work your widgets - you'd have to rebuild the entire system again if it was managed in the widgets to begin with. It makes even less sense to have to create a bunch of widgets just to have them read values and set the value in the correct place then destroy them if they're not being used.
The thing underlying them that holds that value and utilizes it is what it should be tied to, not a secondary object that is used to just facilitate the communication.
This means you'd need to give the widget some kind of identifier so it can identify itself and call to that other thing any changes that need to be made to that particular identifier, and the object managing it can just do what it needs to do based on that identifier.
GameUserSettings is the object that handles game settings, and it makes sense that it'd be the object to use in this case. If you want to use a save game object, that's fine, and a better option than the widgets themselves. So then your Save Game object just needs to know what to do with the particular setting value or when a value change. So you could create a save game object that has certain functions in it like "UpdateFloatValue" that takes in a tag of some kind and a new value. The function can then check what the tag is, and plop the value into whatever object needs that value, and also store it within the save game object itself, and doing the reverse for getting the appropriate tag and providing the associated value when loading
Your widget then just needs a few things defined about it when you add it to your menu.
The tag of the setting used by your save system and for determining where the value needs to be placed.
Definition of reading and writing the value from the save game object when its value changes.
Nothing else needs to even know about these widgets if they can manage themselves
So for this, I could setup a system where the optionline calls an event in the main menu using an eventdispatch. That then sends info to the savegame object, and also adjusts the option text so the user can see the currently selected option. From there, the save game object can implement the actual logic to adjust the graphics settings. It also has an int function that can be called on load so the graphics menu doesn't actually need to be created/destroyed
You'd have the widget itself do whatever it needs to do to store the values and have exposed variables that allow you to configure how you want that widget to behave when values change and what not so you can configure it when placed into your main menu widget.
The main menu widget doesn't need to know anything about the widget itself.
I mean, I still need each instance of the option line to be a variable in the main widget so I can set the keyboard focus
otherwise nothing is going to work
As an example...
Navigation could probably be done easily by a function that just retrieves the index where the widget is in whatever its contained in and the just return the index +1 if its valid, otherwise go to 0.
Don't need to know specifically about any widget.
all fine until I need to do this? How else am I supposed to update teh text without a direct reference to the widget that contains the text block?
(Again, just an example, assuming you're using some kinds of containers to hold these things)
The widget with the text block communicates to the thing that needs the value.
so the BPFL gets the event dispatcher and can do a bunch of stuff with it, of which I'll probably use a data table & maps to make as dynamic a system as possible
Theres no event dispatchers involved here.
so how are you planning for the button clicks for value up/down in the optionline to be communicated to the function library that will process it?
Create functions in your save game object for each "Type" of widget that you may need and the type of value you want it to store.
That "type" then needs a corresponding widget "type" that will call and retrieve values from the save game object.
All based on the "Setting Name".
Unless of course, you configure this within a single widget and have the widget construct itself how it should appear and function based on a few settings - a bit more advanced, but certainly doable.
So then flow is more like...
Widget value updates > Tells Save Game Object the Change > Save game updates value in save game object > Save game does whatever you want to happen next with the value
such as setting the new graphics settings, cool, I can do that. However, I feel the way my menu works (with lots of headers, and different containers), I need to reference each instance specifically so the menu can update the selected option text which is contined within the submenu
Why is the text shaking like that? I suspect it's got something to do with it failing to wrap properly?
Wrap?
Looks like it's just fighting with something
Like one frame it get set to something, the next it get set to something else.
wrapping because its too big, then it's too small to fit in the space it's in, then it expands itself to fit the space, but then it's too big so it wraps... etc.
Is there anyway to make it so it'll go back to playing my boxing animation blueprint states when an animation is over?
Hit the nail on the head. How do I wrap text without that happening?
You should use montage instead.
Look them up
Oh ok
guys, is there any chance to make it more convenient for a struct? Other then passing IsSet to see if the struct was actually something meaningful? Like you know if it would be reference to object I could pass nullptr and check for IsValid
you can always wrap it in a uobject if it makes sense to you
nah, too much of a hassle
I agree
there's some pass by reference check box
sends the struct as a reference to the original struct
instead of a copy of the original struct
yea, okay, it's different
The widget is equipped item info in an equipped items list. And it has basically it's default state, when nothing is equipped, and the state when something is there
I use it to check if I need to show/hide remove/info buttons and if I should get item name from the struct
I normally just check if ItemInfo is valid
you can't do it on a struct
being a struct, the only way for that to work is a function in a blueprintfunctionlibrary (or c++)
like to check if it's default struct?
yeah
well, can make a method for a struct. like IsDefault or something
so in my c++ structs i have an IsValid
where i just define which things to check for validation
Nice
most of the time, the 'name' is all i need to check
then in some nested structs i may add additional checks
yep yep
oops, but I can't use it in blueprints, right? xD
I will just do it like 🙂
correct x) annoying little detail
so to actually use it in bp you need to implement the bpfl in c++ aswell.. it's a bit backwards sometimes 😄
**Nothing shows up **
It was working 2 days ago when I lastly saved this project, now I have no idea why it doesnt work
@gentle urchin ?
This never gets called either
Work your way up
Break point w.e called it
But you are already using cpp anyway. Why would you want a blueprint struct that is prone to error.
Also blueprint struct is not reachable in cpp so might as well declare it in cpp and have your own function to validate there.
nono, struct is in CPP, I want to call IsValid method in blueprints 🙂
I mainly do my UI in cpp, that's where I needed that. Prolly it's not ideal, but.. xD
Benefit of exposing the original IsValid (if you made one) is that any later updates to it keeps the UI intact without having to update how you check it other places ^^
Name is probably very safe to validate from tho. An item without a name is no item of mine 😄
not sure what that is. to expore this method of a struct, I need to do this?
you expose a method that uses the structs internal method, yes
Nvm got a brain fart
do blueprints require casting to access functions??
I am looking at a blueprint and it's suppose to be AActor* but it can access an interface which is weird because there's no casting, it only mentions that the target is an interface!! 🤔
casting and interface is not the same thing. You use interface when you need to interact with classes that doesn't share the same base class (In most cases you wouldn't be using interface).
Use component if you need an interface like functionality.
To run a member method, you would need a reference to the class. If you have myCustomClass and you want to use the member function of myCustomClass then you will need reference to myCustomClass
and that's the benefit of casting, you can just pass something generic, check the type and run the member function if the cast is successful.
Casting can be thought of as a type check
Interfaces sort of cheat in blueprint aswell doesn't they
they're callable from wherever, more or less always
as if they were in some shared library
static functions
Yeah i had a feeling that they are cheat, because in cpp, there's no way in hell to access a user defined interface from AActor because it's not defined at that level
You wouldn't ever use AActor anyway, you would call it on a class your derive from AActor
I mean there's no difference in blueprint or cpp
isnt there?
you can run interface on anything
as long the object implements it
if it doesn't then it just doesn't do anything, bp or cpp
right, but you can't invoke it without casting to it, right?
in BP you can blindly call it on whatever
didnt think you could that in cpp
but i dont really know 🙂
never used one, in cpp
if (GetOwner()->GetClass()->ImplementsInterface(UI_RotatingInterface::StaticClass()))
{ // ** Checks if Owner Implement Interface ** //
const FRotator L_DesiredRotation = Cast<II_RotatingInterface>(GetOwner())->Execute_GetDesiredRotation(GetOwner());
You can cast anything to it
cast to the Interface
as if they were static functions from some library
you can but you dont have to
and how would you run interface on object that implement it in cpp??
IMyInterface* interface= Cast<IMyInterface>(myAActor);
you cant do myAActor->InterfaceFunction in cpp
you can do that in bp
yes you can? I just did that
You're doing the cast tho
GetOwner() returns AActor
we casting to the interface, the object can be anything
you are casting it Cast<II_RotatingInterface>
object can be anything yes
yes, casting to the interface
how would that be different in bp
in bp you dont have to do that
but you cant just say
Object->RotateFunction() where RotateFunction() is part of II_RotatingInterface
you need the cast
Not sure if we are on the same page
AActor* temp_actor = nullptr;
Cast<II_RotatingInterface>(temp_actor)->Execute_GetDesiredRotation(temp_actor);
You can also just use the execute calls which are static.
MyInterface::Execute_Function(Thing, Parameter);
So they are static calls in cpp aswell?
oh nvm then
not the same
hence the "cheating" remark 😛
it's as if UHT creates static bp functions for the interface calls
It technically is. You don't have to cast the thing you pass to it.
true, just looks different
That's mostly all the BP does, If HasInterface, ExecuteCall
really wished I used component instead. Only used intertface because I am copy pasting some one's system.
🥹
now help me out in EIS ! 🥲
Checkbox number 2. 😄
I'm useless with that one. I've literally never bound an input action in C++. 😂 I take a scripter stance on input actions.
the worst part is
BP just works
no issue what so ever
so im inclined to move .. to bp
I always do them in BP, because I also have a habit of putting most of them in components. Like building controls and the like are all in a component. And you can't easily bind IAs to a component in C++.
really?
damn , never thought of letting components handle inputs
how does that work on an intercomponent level ?
doesn't Lyra handle input in component?
who decides priority ?
No idea, just saw component for handling inputs but I don't wish to chart into that territory
never even touched common UI 😦
I've only added it as base
too many things to learn soo little time

There is no real priority. They work by binding to the owning actor's input component, so it's largely the same as putting them in the actor itself. Except you can have the logic routed to the object you actually want without an extra call.
void AActor::EnableInput(APlayerController* PlayerController)
{
if (PlayerController)
{
// If it doesn't exist create it and bind delegates
if (!InputComponent)
{
InputComponent = NewObject<UInputComponent>(this, UInputSettings::GetDefaultInputComponentClass());
InputComponent->RegisterComponent();
InputComponent->bBlockInput = bBlockInput;
InputComponent->Priority = InputPriority;
UInputDelegateBinding::BindInputDelegatesWithSubojects(this, InputComponent);
}```
```cpp
void AActor::CreateInputComponent(TSubclassOf<UInputComponent> InputComponentToCreate)
{
if (InputComponentToCreate && !InputComponent)
{
InputComponent = NewObject<UInputComponent>(this, InputComponentToCreate);
InputComponent->RegisterComponent();
InputComponent->bBlockInput = bBlockInput;
InputComponent->Priority = InputPriority;
UInputDelegateBinding::BindInputDelegatesWithSubojects(this, InputComponent);
}
}```
The bottom call in these two functions.
Hmm, which one is ease in ease out?
Hi some of the actors in the level are failing to load, Has anyone had a similar problem before and have any idea of what the problem is?
most likely world partition
i don't use it so dunnoe
It is loaded in world partition
ye I'm just saying I think the load fail is a world partition issue
Metahuman doesn't has ik bones?
Can anybody help me: Why is there no collision on the procedural mesh component
Only section 0 got collision created now
There are issues with wp as I understand, in 5.4, I'm seeing at least one
How come you're not using DynamicMesh?
Guys how do i link the Keys of my map (Variant ID's) to each Instance of a button created? because names worked just like that.
But when i watched the value for all 18 created instances. they all have the last Key (Variant: Black) found. now i do understand thats probably because the first executes from completed.
But if i for loop into another for loop it will create 323 instances when all i need is for them each store/get the Key that equals(?) their Value from their Variants Map.
How am i supposed to change the loop to do that?
You don't need to loop through the values, just the keys. When looping the keys, you can do a "Find" on your map variable to get the associated Value with the key.
Also the IDs really should be Names instead of Strings.
Names should probably be FText as well, unsure if that's just for user display or not.
yeah i dont have influence on that its some api stuff, parsing a json and some other stuff i didnt touch in c++
hello, this code is suppose to spawn a circel and then that character is meant to go to that location. however the circle spans but it just doesnt move? if anyones able to help me that would be greatly appreciated. P.S if this is the wrong chat could someone please guide me to the right one. Cheers
Thanks bro that fixed it instantly
There is example code in the TopDown example if I recall that does exactly this.
I tried that but still no collision
You'll also need SetDynamicMeshCollisionFromMesh
Ohh yea I forgot that, thanks!
Now gotta clean up the mess lol
😄 I feel that. Some of my dynamic mesh graphs are... worthy of a flamethrower.
how do you make assets be compatible with all unreal engine 5 version? I currently made a vfx pack in 5.4 but it wont work in 5.3, please send help.
Yeah, but another problem arrived: it`s colliding either with itself, the pawn mesh, or something else, and the car goes off flying. I tried to set the collision by channel but there is still nothing happening
even better: it`s only colliding with itself and not with the rest of the world
I am trying to make helmets that have visors glow through emissive textures correspond to the proper helmets through my character customization Ui I made a variable for texture object reference in my character creator data structure, then added the proper textures in correspondence with the matching helmets in the data table, went into my button change widget, created a variable named EmissiveTexture and used it as a get and connected to my swap head event which I added a texture object reference parameter here are photos
My problem is, as shown in the photos, in the character creator UI the get data table row emissive texture output is idle, and the change button widget is therefore not passing that data to the event. How do I fix that? Secondly, as shown in the last photo, the emissive texture output on the swap head event is also not dispensing that data. How would you go about updating the material that belongs to the helmet skeletal mesh asset ?
"Lightshot" for the win
turns out my EIS issues stemmed from the Trigger I used not updating the value untill Completed -.-
ugh
Hi, ive got this code running on my main menu's player controller, its just supposed to rotate the camera slightly based on where the players mouse position is.. however it only works when playing in the editor viewport, if i launch in PIE or standalone it doesn't work, Offset X/Y & Desired Yaw/Pitch stay at 0 regardless of where the mouse is.. any ideas?
Ive also tried changing the 'Get Mouse Position on Viewport' for both 'Get Mouse Position' & 'Get Mouse Position Scaled by DPI', neither worked outside the viewport
What values?
Hello, not sure if this the right channelf or this question, but here we go:
Let's say I have a map where I have a lot of static meshes that are combined (merged) from other single static meshes.
Can I do instanced static meshes or hism with the combined meshes ? Or it's better to do instanced static meshes or hism with the original meshes that the combined ones resulted from?
Goal: Try to rotate npc's head to look at player character for x seconds. I'm having an issue with actually rotating the character's head bone and setting it. I'm not using a poseable mesh nor am I trying to do this via animbp. Any suggestions for setting the bone rot?
InterpSpeed probably shouldn't be 0?
And yea, I'm not sure if you can manipulate bone positions outside of the anim graph.
I'm trying to use the character from GASP and make it rotate with the mouse, I managed to get the movement working as I wanted but the character is not rotating with the mouse. I added a cylinder and it seems like something in the animation blueprint is overriding the rotation. Anyone got an idea for how I can get this working?
Thanks for responding. I made it 0 so it could snap the character's head so I can tell it's working. I'd set it to something else after the test was successful
Is the cylinder attached to the mesh or the capsule? And you're not rotating the cylinder at all?
its attached to the capsule, and this is how I rotate it
Odd. I'd assume something is rotating the mesh then. Which is.. super odd. Even things that anti rotate the mesh to character movement usually only do it from the waist down for legs.
if I disable the animation blueprint the mesh also rotates
Hi All, what is the best practise to avoid dependencied on initialization of objects? Let's say my actor1 needs to reference another actor2's component during "On Begin Play" but I get null reference errors as actor2 is not yet ready...
Possibly something in the animation blueprint that is using the control rotation?
I'll have to dive deeper into it tomorrow, its quite complex at a first look
Yeah you'd have to check the animbp then. That's spooky shit to be messing with mesh component rotation in the AnimBP though. :/
the character is migrated straight from the motion matching example project
What is the reason for the dependency? Why does Actor1 need to care about Actor2?
inventory component is passed to HUD on begin play so it can be used to display current inventory
For like a Press I to display inventory or a quickbar?
Press I
In general, don't do that. Don't set forced refs in general.
If it's an initialized widget like a Press I to show inventory, then the widget can get the widget's owning player's pawn to get it's inventory component.
If it's a quickbar, the quickbar should be designed to wait for the owning player to have a pawn read, maybe a timed 0.1 s check. When ready, get it's owning local player's pawn and get the inventory.
HUD is a third party in this case which has no business caring about the character in question in this manner.
If c++ is an option you can manage this properly 😄
I decided to use blueprint this time, I know c++ (to some degree) but thought of desiging UI in C++ is beyond my brain comprehension
oh no no
just setting up the events for creating the hud / widgets etc
never would i suffer the pain of designing UI in c++ xD
I highly recommend not. I see people doing it in the C++ channel often. And usually having severe trouble. And somehow still sticking to their anti-BP fuckery despite mountain of issues.
😮
tell me the dirty details
looking back on my logic, it wasnt as perfect as memory told me
OnPossess() -> IsLocalController () -> CreateHUD();
OnRep_PlayerState()->CreateHUD();
Why in the name of all that is holy would you CHOOSE to ignore the power of widget blueprints? That's just stupid.
how do I get owning player in HUD? I can get player controller... what is the best node to use?
I'm all for C++. 😄 I subclass major widgets often, specially to write their internal handling code and such. But as far as creating and managing widgets? I'd never bother with it. I don't even really do that in BP much anymore.
GetOwningPlayer->GetControlledPawn->GetComponentByClass
Also don't do this in the HUD.
If inventory is ment to persist death, you might just place the component on the controller
Do this in the Inventory widget when it's shown after pressing I
that's the plan 🙂 I use HUD as general name (I know it's not 🙂 )
"Youtube and Reddit told me that BPs are insanely slow and despite being a 300 year old programmer, I don't know what scripting languages are for or what a profiler is."
Can't see it
Second
Oh right, they did put that in.
but scripting languages love the extra nodes, so old way is golden 😛
You've gotten that idea out of thin air, it seems 🙂
thanks all, I guess I need to re-design a few things 🙂
Bro... Having left Unity in the dust a while ago, before they had visual tools to help with UI, I never, EVER want to script UI again. Ever. Not even if there's a fire.
Exactly
one more thing, I started reading about GAS - what kind of advantages it provides against using actors/components?
What i do in UMG in hours, people spend weeks to design in whatever html shait they're using 😄
ohhhhh no
aberforth, hold tight!
I used to make websites by hand before all this WYSIWYG editors... I could make my UI 500x faster and more dynamic if I could just use HTML XD
xD
?
More power to ya. I also used to build websites with HTML/CSS/Javascript and I'm never looking back now that we have UMG. 😉
guess i went ahead of myself. Authaer usually chimes in with a 101 good reasons to use gas 😄
😄
It's a pretty good framework , but unsure if i can phrase anything specific for/against component/actors. That's usually down to code structure, separation of concerns etc
GAS itself lives in a component, sensibly enough
yeah, but that still has to be attached to an actor that characted actually "wears" or use
Hotwings man.
Mine lives in the PlayerState. It has the necessary references to the relevant pawn (Avatar) and whatnot
I'm not sure what you mean advantages against using actors or components as the system still relies on both.
Most of the groundwork for handling anything to do with attributes, effects and abilities is already done for you, you need to worry less about how it all gets replicated, and because these systems are designed in a way that these things would interact with one another, it makes it far easier to make these objects interact with one another in varying ways without having to make lots of separate code and instead rely more on using tags.
but I guess it requires c++
Only parts of it require C++.
The only part that specifically requires it are Attribute Sets, but yeah that plugin fixes that.
ok, I'll read into this - thanks again
it's was a steep learning curve for me atleast
loooots of new stuff
figuring out all the moving parts, how they fit together etc is pretty rough
The primary benefit of GAS is something that I don't think a lot of people see until they've seen stuff without it on a larger scale. One of the biggest headaches I've ever seen is having visuals and abilities and attributes insanely interlinked It causes a ton of headaches, and it makes it much harder for designers of FX and designers of gameplay code to work together.
Here I’m using the Make Rotation from Axes node and plugging the normal into the Forward, and then I’m trying to make the x of that rotation relative to the socket, and I plug that result into the Draw Debug Coordinate System to see what happens.
What happens is that it works fine only on one of the slopes and not with the other two; when the character steps on those slopes, the axis is no more facing the direction I want, and when this change happens, I see the X (Roll) has not changed (some kind of a flip happens from the Y or Z without the X changing). Does anybody know why this happens, and what can I do to fix it?
Rotationsomthing + AxisFlippedSomethig = 93.7% Gimballock
how do i see what node connections are being used when playing the game?
Usually you just play in PIE with the BP open.
You may need to select the correct instance from the dropdown in the top center.
the main pain point for gas is that it's prediction is incompatible with the general network prediction plugin afaik
strange I have the right instance and it just doesn't seem to be working
it doesnt get called, I know it used to work 3 days ago, but now somehow it doesn't idk, i didnt change ANYTHING though. It seems like maybe somethign might have not been saved properly
I am having an issue where event dispatchers are not firing in a level BP in standalone. They work fine in PIE, but in standalone and the packaged game they do not fire. This is a problem in one level BP and not others. Any idea how I could resolve this? Also how could I avoid this in the future?
@frosty heron and this isn't getting called either
Hey I'm trying to apply a texture to my material and it looks different in game compared to the material preview. How do I fix? (EDIT: I FIXED IT)
also referenced here
But the problem is this Clocked on Crafting Slot button thing is only calling update when the thing im looking for is already there
But the problem is those slots are not there in the first place so it would never update
I know you fixed it, but unsure if you understood the fix so just going to point out that in level, lighting affects a lot of things and so the material editor may not always reflect your final look. It's usually best to work with the material editor open as well as the level itself. The material preview is useful, but it doesn't allow great editing with your level in mind.
This sounds like loading orders. What is binding and listening to these dispatchers? Because the thing may not exist yet. Initially I assume this is a controller or pawn that is likely spawned later in normal games due to special PIE handling.
Unsure then. It usually works if you are playing with a PIE window open and cause the logic to execute.
many BPs are having this issue, the main one would be like a trigger box like this:
I'm unsure. If it is placed in the level you shouldn't have issues with that. 🤔 But the usual cases are often init orders of things where it works in PIE because it's init order is different than cooked game.
hi guys.
so i have this little spaceship on the twin stick top down shooter arcade. i'm using physics for translations on the left stick, thats nice, works well. i'm using the right stick for rotation, with a find look at. works well on its own. but i cant make it to work with the physics. it doesnt turn.
whats the trick ?
i agree that seems to be the problem, i have tried doing a more explicit event binding on begin play to the same event and now it works in standalone. That seems to indicate it is a race condition, but I'm just using built-in unreal features soooo....
why this doesnt work with physics activated ?
thanks for looking at it. ping or DM me if you think of anything else. cheers
So another quick question: I'm using seamless travel so I have a transition map that has a widget that's added to the screen that has loading animations and tips. Standard stuff. I haven't tried it in standalone yet, but in the pie it doesn't seem like the transition map is loaded because I never go to the tip screen. Am I misunderstanding how the transition map is supposed to work?
Test it in Standalone. I recall there being issues with seamless travel in PIE.
It's worth noting that seamless is pretty "Eh". not worth it in most cases.
I thought seamless was needed or recommended for multiplayer since you stay connected to the server/session
IMO, the only thing seamless gives you over non is that it allows you to persist actors, and copy properties from playerstates. The first one has some bad bugs associated with it for networking that are rare and really fucking hard to track down, and the second isn't really a good use case because you should be able to associate data with a player without needing to copy it from their gameplay actor same as if they log off and come back.
And voice chat over the loading screen. Which you'll get blapped for anyhow if you try to do consoles.
Either way. It's okay to use, but it doesn't really bring enough to the table. Staying connected through a level transition isn't hugely important if you're not derpy with your systems. And it does not work in PIE, just doubled checked that. Your stuff will probably work fine in Standalone.
hey guys, the game we're working on uses world partition, and we're noticing that blueprints that have construction scripts are constantly getting reloaded by world partition in the editor and marking actors as 'unsaved' when nothing changed. it's really annoying when you're dealing with source control. Has anybody else had to deal with that, if so is there any solution, or do we just need to avoid using construction scripts?
What do you mean by marking them as unsaved?
Hi, I need to use 'Get Viewport Size' as soon as possible when the player is loaded into the main menu but if I do it on the BeginPlay or OnPossessed of my player controller it returns 0 for both X & Y, adding a slight delay will make it 'work' but thats not the fix, any ideas how I should go about getting it?
Are you using the function off of the PlayerController?
If you're using the top one, consider switching to the bottom.
are state trees supposed to be an alternative to blackboard and behaviour trees?
Ive tried both, all returning 0
Kind of. Not to Blackboard, but to Behavior Trees. You can still use a Blackboard with a StateTree.
Which event are you running it on? PlayerController Beginplay?
Yeah ive tried the player controller begin play and on possessed events
Huh. What are you using it for? It's not that surprising for PIE.
This, its to make it so the camera on the main menu rotate based on where the players mouse is, i couldn't figure out what was wrong with it but its because Center X & Center Y are 0 because they're not being set to the correct values because the viewport size X & Y are 0
You could probably just get the value where you're doing the rotation. And ignore the logic if the size is nearly 0
Thanks man
Yeah ill just have to do it on tick with the rest of it, cheers!
Sorry, I wasn’t home, there were photos I had taken last night
I mean they show up in the "Unsaved" category in version control.
Is what you're trying to communicate is that when you click one of these, nothing is appearing in these spots but you're expecting them to display something?
yes correct
How are you setting this reference?
I click all those buttons, nothing appears
That's just the Type of the variable. How are you populating it with a value?
The default value is otherwise "None".
I added WB_CraftingMenu in there as well now, since thats the only option it gives me besides none. But the problem persists. No slots are being created still
and around 4-5 major events of mine which I just created aren't getting called
and same thing for these 2 new functions
(Not getting called)
Yea I don't think that's supposed to look like that... I think that's now referencing the widget blueprint rather than the spawned instance you actually want to utilize. You usually cannot set a default value for object references.
For example, if you dragged out that variable as a "set" and tried to select something, you probably shouldn't be able to select anything, even if this particular widget contained a widget of that type.
I see that same behavior you have in 5.5.1, but in earlier versions, you couldn't select any object instances for the default value, even if an object of that particular type was present in the blueprint.
so what would you advise against this?
You need to give the widget the reference it needs to use if you want to communicate to it.
You'll have to do so after the widget is created to give it that reference
But this is for the Clocked on Crafting Slot function which makes it have a different color when you select it and so on, where's I dont even see that slot in the first place
I see but which widget? Slot widget shouldnt be created if there's no items to display like axe and hammer
Whatever it is you're expecting to execute "Clocked on Crafting Slot"
I set the level of these items to a level you can reach by default so as soon as I play the game they should be spawning in my widget
Right now that click will do nothing if nothing knows it needs to do something when that button is clicked.
I see but that WB_CraftingMenu isn't being created in here
Right... It must be getting created somewhere else and you need to pass it into here if you want to use it as a reference in here.
The logic you have right now is that on that button click is saying "Whatever is stored in Crafting Ref execute the interface "Clocked on Crafting"" If that reference is set to "None" then nothing will do it. If it's set to a reference to some other widget then that other widget can execute the interface call as you need.
The alternative... Is to make an event dispatcher in this "WB_CraftingSlot" and call it on that click event passing along the other values you want to pass along.
Then in the parent that is holding this widget, you can bind to that dispatcher by selecting the widget and you should get an event dispatcher binding option, and then maybe that widget has a reference to the thing you want to use and call "Clocked on Crafting Slot"
So should I be creating this output on my button? how did you do that?
can anyone point out what im doing wrong here, casting has been a nightmare on steriods for me to learn compared to anything else
Sorry I dont understand, it could be because I got back from the dentist yesterday after 3 days of constant pain and a fair amount of pain persists so i find it kinda hard to focus the way I could before
You already have a variable, the problem is that the interface target needs to have that variable populated with a reference to the widget that you want executing the "Clocked on Crafting Slot" interface.
should I use cast to get that reference for example?
No. You need the reference to the thing and pass it to this widget.
Otherwise, pass the click event backwards to the owning widget (via event dispatcher) and maybe that has the appropriate reference itself.
No casting needed.
https://www.youtube.com/watch?v=EM_HYqQdToE <--- It's a long one, but it's what many people struggle with, and you're struggling with it right now.
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...
the event dispacher should be inside of the owning widget or the WB_CraftingSlot?
your "main widget" probably has reference to all the "WB_CraftingSlot" widgets.
your "main widget" probably also has reference to the thing (WB_CraftingMenu?) that you want to actually execute "Clocked on Crafting Slot"
You'd create an event dispatcher in the "Crafting Slot" widget with the properties you want to pass back and call it on the button click.
You'd bind to that dispatcher in your "main widget" and have it call the Clocked on Crafting Slot interface, providing it the reference to the thing that you want that interface called on (WB_CraftingMenu?)
WB_CraftingMenu is the main widget
You probably didnt' need an interface at all for any of this, as an interface is meant to provide similar calls of functionality across objects that don't share a hierarchy and where each object can supply its own unique implementation of that function call.
You mean like this?
You probably still want your inputs on the event dispatcher.
You probably wouldn't bind directly to an interface call... is it even still needed?
You probably should create an event that mimics what the Interface call looks like with similar inputs.
To bind the dispatchers you either have to select each of them individually and then click the + like in the example I had above and then have them call the event, (this would result in a lot more nodes) or you'd have to programatically do it by getting a reference to each of the WB_CraftingSlot on construct, looping through them and creating a binding to the single event (results in fewer nodes, but if you're having trouble understanding references it may be a bit out of reach).
But it's grayed out and it's not letting me add inputs to this
its disabled
is there a different method for this?
The + symbols at the bottom right here... These will show up when you have selected a widget that has an event dispatcher present in it.
Clicking on them will create an event automatically in this widget, not the one that contains the event dispatcher itself.
Ok this is my button
I dont understand why do I need to create more events this
when this slot isnt even created in the first place
so this is a handler of click events and press events
but there's nothing (slots) showing up in the first place
It's been a few days since I didnt touch Unreal a lot and I already feel like i almost forgot everything
The symbols will be in the main widget where you've added them. You don't need to bind anything within the button itself.
Your old interface call was doing nothing as you didn't have a valid reference set in your "Crafting Ref" variable, so you had an empty variable as the target for the call, and because it's empty, the call goes to nowhere. So while the button click was set up to do something, it was attempting to do that something but because that variable is always empty, it does nothing.
The parent widget (WB_CraftingMenu) holds the logic that sets up everything else based on the button clicks. This is what your button widgets would've needed a reference to based on WB_CraftingMenu being the one implementing the "Clocked on Crafting Slot" interface. Instead, we're now setting up an event dispatcher in your buttons so that WB_CraftingMenu can listen to when those buttons are clicked, so that WB_CraftingMenu can then do whatever it needs to when those buttons are clicked.
Oh I see
but how do i now implement that?
If you've added the event dispatcher to your buttons... You need to go back to WB_CraftingMenu, and you can select the placed button widgets, and click the + corresponding to the event dispatcher you created in them.
That then will give you an event:
You then have that event call the function you want when the button is clicked.
The interface does nothing.
The event dispatcher dispatches the event, but it doesn't have any input to pass back information like your interface does (you can add inputs to event dispatchers!)
And again, what you're looking at here is in your button the binding to the dispatcher needs to happen in WB_CraftingMenu.
as I understand it you want me to do something like this here
problem is I can't create any inputs ony my dispatcher
While within your button widget, with the event dispatcher selected, at the top right hand corner there is + symbol to add inputs.
When you want to bind to that event dispatcher in WB_CraftingMenu
Go to WB_CraftingMenu's layout.
Click on one of the buttons in the layout.
Look at the bottom right of the screen for this section.
Clicking the + here will create a red event for when that particular button is clicked within the WB_CraftingMenu.
You can then have that event call this event and pass along the values from the dispatcher.
oh I found it
@dawn gazelle something like this?
and then I must also call this event dispatcher at the start of this? but when i search for it it comes up as a function ? @dawn gazelle
No..... Do this... #blueprint message
Once the event dispatcher is called, that's all the "calling" of the event dispatcher needed. Now all you're doing is binding to it to know when it is triggered, and when it is triggered you want it to do something.
yeah but the problem is I have got a lot of buttons on this one
If you don't want individual nodes for each button, then you'd have to do something like this.
I already have individual nodes
But this one at the top will have no way to be executed
But they don't pass back data from the widget like you want...
why?
Your interface was set up to pass back data.
So I guided you through setting up an event dispatcher that passes back data.
The click events you bound to are binding to the buttons directly on the button widget, which don't pass that data back.
A great guide it was!
but this button is for changing category and text on the widget, its not really made to have the same function
A good coherent design pattern keeps adding functionality trivial
Craftable slots are different from those category buttons up there
they have different functionality
for sure. Normally im lazy and put the category buttons in the main inventory widget and just call the filter function
since they have a very singular, trivial task
The first thing I asked you...
Is what you're trying to communicate is that when you click one of these, nothing is appearing in these spots but you're expecting them to display something?
I was expecting that clicking those buttons I highlighted in green were triggering this button click, was that not the case?
Those buttons up there work, the problem is they are not creating any slots even though they are supposed to appaer on "Unlocked" and on "Resources"
How do they "work" if they aren't doing what you expect them to?
If they must be clicked to show something then usually the click of them is what triggers that thing to properly show.
good point
So If I am to follow all the events here
and functions... it goes like this
And then that's where the slots are supposed to be created
This is also not getting called. Ever
Because this is completed way to soon
even tho i collect stuff
What's supposed to populate the "Craftable Items" array here as that seems to be the point of failure.
Well it was working 3 days ago
I dont even understand guys.
Well it seems
it should be getting the names from here
but you told me to remove that one earlier
names gets into an array
I think
The only thing you had here that I'm aware of that I said you could probably remove was your interface implementation which had nothing to do with names.
If you do the binding like I said, you can hook it up to call this part of the function again, and pass along the slot into the "last clicked slot" and that should at least get that part working, whatever it does.
But I assume since you weren't manipulating the category buttons like I thought you were, they may not actually do that..
can you eli5?
I still don't get it
which function?
@dawn gazelle is there an easier method?
is there any way of fixing?
need help with math, I need to filter out any units that are within the blue region.
Does the calculation checks out to begin with?
didnt i provide sample for this already 😄
hello
pls, I need some assistance.
I am trying to use a trigger output named "NewsFinish" on my MetaSound BP to execute a Custom Event in my actor BluePrint
but i don't know how to call it inside my actor Blueprint
the multiplication of forward makes little to no sense
you want the forward DOT UnitDirection
yeah and I normalize it too, even more not makign sense
so delete those 2 parts ^^
your camera manager it seems ?
if player char is at the center, always facing forward, then that
for my healthbar stuff i used camera manager
does this makes more sense?
i just want to detect what's behind the player, regardless of it's orientation
so I just camera forward as the ref vector
right
well my brain is shutting down, I actually need a vector that starts from the player location but pointing forward where the camera is looking at
so dot value of < -0.7 or so should be a good start
atm everything behind the player is positive values
if they are infront of the character, it's positive sign
I wish I have the visualizer 🥹
how can I produce the green vector? where the vector starts from player location and ends a few units in front with the direction pointing at where the camera looking at?
the green vector is a direction vector
not a location vector
same as the red one
0o
If you want to filter things behind the character but possibly in front of camera , then you're doing it correctly
since you're getting direction vector based on character location
🤔
the dot product is calculated from the players position, since you're using that to create the UnitDirection
if you used the cameraManagers location, then that would be the 'base' for the dot product, and would give a different result
Did it make any sense?
make sense but I still don't know how to even produce a vector correctly
. Too much skill issue, need to start from the basic again.
you were 90 % there 😛
don't know how to translate them, don't know how to rotate them, etc , etc
If you want to switch the location base, you need your forward*2000 + baselocation
let me open Unreal.. my explanations suck
ahh adding them to translate the vector
exactly
I'd suggest adding a few visualizers when testing things
DrawDebugSphere for center,
lines for Dot product values
#blueprint message visualizers help a ton when trying to see whats going on
is that a debug command? or something you make your self
if you ahve an angled camera( likely), you want to normalize the forward vector aswell
Normalize2d
self made
wonder what unrotate vector does
rotates it ccw
ahhh
you could rotate with acosd *-1
so flipping?
yeah