#blueprint
1 messages · Page 319 of 1
It's usually better to have the data relating to one thing in one place.
Otherwise you're having to go all over the place trying to find the information
If your unit data comprises of a field that dicatates what mesh it uses, then it may as well have fields that dictate the parameters of that mesh as well.
The only case one could make that you possibly shouldn't, is if there is heavily shared mesh data between multiple units so you're not having to declare the same information multiple times in your table making it easier to update them all at once rather than having to edit each individual unit. If you're getting that far in though, it may warrant exploring data assets instead of a data table.
ive started making an enemy, trying to make it look at the player, it does, but then when the player stands on the enemy, the player spins out of control. i could disable collision on the enemy but i want collision on it still bc i dont want the player going through the enemy meshes. what could i do to work around this?
I want to know how I can bind my main menu’s play button to a sequencer/Cutscene so that whenever I press play it plays that cutscene
thats especially the case
because lets say you have 100 units and most are cubes with scale 1.0, 2.0, 1.0. Only 3 are spheres with scale 3.0,3.0,3.0
But later on you will have other units maybe like Cones or Cylinders or something
It would be better to have them reference what unit data they have
so you dont write it manually 100 times
it just gets what unit type it has, the mesh and the scale
So you could have a separate data table with the unit types, with the mesh, material and the scale
and just get it ->
could also be a class
I really think it depends heavily on what differentiates them and how you want to organize things as it doesn't matter for the first definition as you're going to have to give them the original data anyway when you're creating them, it mostly matters for how you want to manage changes later on and how any change needs to propegate between those units. A class may actually be better suited than a data table.
Can always use a Data Table for some kind of base values of particular units, and then use some math within your classes to then generate the values for each speciifc unit type.
Then you'd only have to have minimal data tables and everything else could be calculated rather than having to define 100s of units.
I'm not very familiar with level sequencers, but I imagine you can get reference to them and they have some kind of play function.
OnClick of button > Get Your Sequencer (Get Actor of Class [level sequencer]?)> Play
Alternatively, set up an event dispatcher in your widget, call it when the button is clicked. In your level blueprint create your widget > use the return value to bind to the event dispatcher an event in your level blueprint that gets your level sequence > play
Data asset...
yeah i still think i will roll with your initial suggestion and set up the property of scale inside the unit data table, even if they are mostly the same.
though i have done in another game the other option, that is to have a second data table, where i had for example the data for the clothes of the character.
So you have one character data table, and in each entry you would have a TArray of names for the clothes they are using.
So like Jacket, BlackShoes, BlueHat.
This would reference clothes defined in the other Clothes Data Table, that have all the different properties for each cloth, including color, size, resistance.
With this you can have YellowHat, that is basically the same mesh as BlueHat, but just a different property (FVector Color)
I kind of prefer Data Tables 🤨
maybe its just what im used to
but its nice to have all in one file
than a bunch of separate files
data table is working for me in all games
i tried data asset and didnt get its advantages
though i heard from others that they are more customizable
They can have functions. These can be great for getter type functions. Especially when you start get have a lot of data in them.
The only advantage of data tables is that you can import an CSV but unless it's numbers you need to be in the editor anyway to select all the relevant assets.
When working as a team, having them seperate is a lot better. People can tweak individual data assets without overriding someone else's changes. (assuming they're different DA's)
When you're doing "Get Data Table Row" I believe you're actually making a copy of the data of the data table in memory for the particular actor that grabbed it. Each time you do this, you're also having to do a lookup to find the particular row to get the data... On every single actor that may want to retrieve that data.
When you use a Data Asset, you're referencing the asset and all actors that reference that same asset are referencing the same data in memory. Since you're assigning a reference, there is no additional lookup required, it can just go straight to the asset and read what you want directly.
With a Data Table, all non-soft reference objects and data within the table must be loaded when you're referencing the data table. With Data Assets, only the non-soft references and data within that particular data asset would be loaded when it is referenced, (ie. you're not having to load the data for 100s of unit types if they're not actually needed)
🫡 got it 🫡
🫡
back to the issue with rotation being offset which I did fix somehow beforehand
VR widget still doesn't work
It's because you go to play the sequence and then load another level. This will cause the previous level (including the level sequence you've just attempted to play) to be destroyed during the level transition.
I'm working on an Amnesia-like door system, and I figured the best way to move the door was by applying a radial force at the raycast impact location on the physics door.
To my surprise, it worked beautifully! However, there's just one small issue: when the raycast hits the middle of the door, the force applied is much greater than when it hits near the edge. I believe the best solution here is to clamp the door's angular momentum.
The whole system is made in Blueprints, so I don't have access to any C++ functions that could help with that. Is there any way to limit angular momentum in Blueprints?
any help?
I need help does anyone know a way to fix actor being rotated around some point that's not on it? VROrigin is at Z -88, X and Y are 0
im trynna make a death effect similar to GTA's where the player dies and the camera floats above him and overtime adds more relative location on the Z
this is the newest setup with my cameras
But when im dieing im not using any of these cameras
instead I create a new one
but this camera always stays stationary somewhere above the map or smth, it doesnt slowly move upwards or anything like this
I tried to do this with timers too & still not working
I even just tried to save the last position of the head
somehow it never finds the proper location to spawn this new camera that is supposed to move upwards
Also I made this system to turn my player into spagghetti when he dies
I thought that it was because the code had no delay, or not knowing what time the sequence had finished. I tried making this code but I realized that every time I pressed play the game would spawn another sequence in the world, here's a video showing what I mean
Does this look logical the way it is structured? My attempt at a "data driven gait system"
hi, ive made this enemy that shoots at the player every so often if they are inside the range that is a sphere collision, im trying to now add the player shooting it into it, but i dont want to use destroy actor incase i want to set it to respawn later, i have it visually dissapearing. but the firing code still happens
That 'Make Array' just adds 8 values that are all the same. It looks unnecessary to me.
It also seems strange that you go from Gameplay Tags to Enums, why not just use the enum directly as the input?
Then there's the set node for you're gait data, all the other data will be empty as you don't specify the struct data.
More or less playing around with different ways to achieve the gait system, the gameplay tags I was attempting to test how it plays it's role on the overall system if I add some network implementation, I definitely can go with the normal enum route as that's how it was before I had this idea. The array has 8 values of gait set seperate by integers in the array, no? I was looking for a simplified way to set the tags to the gait and back into the execution line without having many set nodes. If that makes much sense lol
All the stuck data is specified inside the structs, basically a daisy chain of relevant mapped info, I can post the structs in a but when I get home
The details panel shows the values inside the structs but that may be difficult to visualize on the structure
You clear all the data with the set node. You probally want to use the set member node instead to keep the other data intact.
No, each array element will be the same value as each one gets set to EGait which will be what ever was set.
The gait gets set and all data is pulled on the relevant gait, such ass speed and active set bool, it seems to work but making sense is another thing lol
Yeah, each of those set nodes is also acting like a getter. It gets the current value.
The current value is only ever executed if the set node’s input exec wire is ever fired
So I have sprint that triggers the tag, the tag triggers the setting gait, the gait set pulls the data from the struct, that's basically my intended way to do it in my head
I also wanna say, that Make Array setup with all those reroute nodes stacked up, it might look pretty, but it makes it impossible to tell which index goes to which getter. You can hover every pin individually to diagnose it, but it is slower.
I have the array top down but I see what you're saying stacking the pins
Like matching the layout to the left
Not saying I'm right BTW just elaborating my reasoning
The fact it works is a mystery as it shouldn't. As I've mentioned, you clear all the data when you set the gait as you don't specify the struct data.
The gait is set and the data is pulled after
The struct retains the info and is set after the gait is set by an input that calls a tag
The creeping toggle and scroll adjust works as well with clamped variables pulled from a struct as well
The main benefit you’ll get from tags is if you ever want to have multiple gaits blended together, like a crouch run, crouch walk, crouch encumbered.
With Tags, you can represent the entire nuance of the gait with a single GameplayTagContainer. You add a tag when you need to represent an additive trait, and you then need to remove it to withdraw that trait.
For instance, when the player presses Shift, you add the “Running” tag. You remove it when they release.
You can do this for crouching, say “Crouching” for the tag.
You stuff everything into a single tag container, and your animation setup can run through and ask “Hey, should I be Running?” “Hey should I be Crouching”
That's my plan with the tag and then guiding it to the server when I get their to have better networking by tag calls
It's not, the data isn't there. No data in means no data out. You'll need to swap this to the set member node to only change the gait inside the struct.
You can also just set up a buncha bools for each of these, bIsRunning, right? It’s a lot less to initially set up, but it does prevent you from doing it entirely programmatically.
The data is set by default values I'm the struxt that's why, the gait pulls the defaults
I have books toed into the struct as well
Yes, its set in the defaults but at runtime you clear it with the set node.
But this thing you’re doing where you use a tag to decide a single enum, where the enum has a 1:1 mapping to the tag, it feels like you’re doing extra work (unless you are in the midst of migrating from enums to tags, then, this is unavoidable)
It doesn't get cleared at all in runtime though, the data is retained at all times it seems on the set up
I can ditch the enums possibly with using tags directly in my struct probably
I'll post a few more pics in a little while, it's not a dead set project just a toy I'm messing with
Oh wait, i bet you've set the defaults for the struct itself. This would cause a lot of confusion and mean changing the defaults in the character class would have no effect with your current setup.
Yeah it's set in the struct itself and I gave myself enough data as in min and max speeds but setting those to the CMC max speed seems to work with how it's set up, I think I have some redundancy going on though or just blatant wrong doing LOL
Again, my previous statement is still true, you need to swap the set node for a set member otherwise defining the values in the character class is pointless.
Your "Update" event on your timeline is constantly creating new camera components. You probably only need to create a single one. You can move the add camera component node before the play of the timeline.
A few other things I would probally change is having the gait as a seperate var. This will be more useful when getting the gait into the anim BP to change to the relevant animations.
You could probally just use a map where the key is a gameplay tag as well to skip the conversion to an enum.
Im doing it like this now
Thanks for the feedback!
I made it even more simplified but still doesnt work
not even this set world rotation works
also this timeline is always stuck at zero
it most likely isn't
you would have to set a breakpoint on the next node and check the value after a few frames
if it triggers multiple times, stuff like that can be buggy in BP Debugger
is that even your active camera?!
just adding a camera won't do anything on it's own
other than adding a camera
Are you getting any errors in your log when you do execute this? If you're detaching the camera component without reattaching I'm not sure it exists in the world.
Ive added a print string on that timeline and it seems to always be moving the values inside
it may not even throw errors if it's connected like this!? while still being on the verge of being garbage
yes, i automatically set the 3rd person camera enabled after the player dies
why do you detach it?
nope, im doing a validated get on my cam too
it's a component which needs some kind of owner
but i wanna detach from player orientation
I wanna move the camera upwards, and it should just fly out of the player's head or control
and just move upwards like a drone
like it's dieing soul
which you can still do while it's attached to the player
That does'nt mean you have to detach it
just set its world transform on a temporary tick (the timeline)
btw you don't want your timeline output to feed into a position delta, that's completely incorrect, it'll be framerate dependent and never end up in the same place twice
just have your timeline output a 0-1 and use that to lerp between WhereCamStarted and WhereItShouldEnd
Dead -> save where cam is -> calculate where it should go to -> timeline -> CamLocation = Lerp(Start, End, TimelineFloat)
or use set relative location
i mean sure but idk if the dead guy is falling over or what
that would be even worse i think
since the physics tick happens later and may change the actor transform
making it unpredictable
get the camera world location, save it before the timeline in a var
then set location/rotation mode for the camera component to absolute before the timeline
then use SetWorldLocation on the cam in the timeline, and add the timeline value to the z-axis of your saved location
and then stop struggling with the basics...
if you mean my mesh, my mesh is falling over & turning into a spaggetti with ragdoll physics
you mean something like this?
no, absolutely not
ooh i gotta see that
you are adding a new camera every single frame for the duration of that timeline
I was doing that before yes
stacked nice above each other
now im doing something more like this
that's likely closer, but just because i can't see half of it
and because it's missing half of what i've said
Ik but hold on I havent finished yet
you haven't even started
you got two one things right, which is saving the location~~, and adding the timeline value to it~~
then use SetWorldLocation on the cam in the timeline, and add the timeline value to the z-axis of your saved location
Ok so I should do an addition to the current z as I see it here
that's still affected by physics
which is why i said to set the cam component to absolute world space (there's separate nodes for location/rotation)
although 1 frame of physics error won't matter at all for this
it may cause jitter tho
yeah after it finishes it might move, dunno his design
it still doesn't work btw
ofc it doesn't
let's see the float track
absolute world space?
Don't worry about that for now, get a camera to move before concerning with changing component space and all that
What does that float track look like?
does it go from 0,0 to somenumber, somenumber?
maybe it's a game where you play a silverfish!?
with this current code, have the float track go from 0,0 to like 5, 2000
that means 5 seconds in the camera will be 2000cm higher
Can't see shit, fit the curve to the view
click those buttons
Looks good, it'd be way more flexible to just output a 0-1 range then set up the way I showed a few screenshots back but that'll work
0-1 range feeding the lerp like this will let you just set the end pos however you want
and yeah you'll want to change the camera to use world space before the timeline if you want it to not respond to the actor moving AFTER the timeline has ran its course
but if you wanna have the sky high camera follow a ragdoll down a mountain slope it'll work as-is
assuming cam is parented to mesh and not capsule
I should change the set relative location & rotation to set world location & rotation?
Doesn't matter, as long as it matches your StartPos
Do you know the difference between relative and world?
did you use set world location & rotation or relative location & rotation ?
Relative means relative to its parent. Something being at 0,0,0 RELATIVE is where its parent is
World means what it sounds like, something at 0,0,0 is at the world origin, it doesn't care where its parent is
I did the detach as it does seem to work and it also disables the camera boom from going around 😛
I wondered what detach does to naked components
probably jsut sets them to use world coords i guess
I'm thinking it moves it up in the hierarchy
Look at me, I am the captain root now
XD
I hate the whole component/actor thing, I've got a fun situation where actor position replication is being clobbered by component transform replication.
annoying, shoulda just been components the whole way down
Im pretty sure im doing the same thing as you and it doesnt equate to anything
I think I havent exhausted the possibility to where my component hierarchy is safe from errors
Im using this 3rd_person_camera which is parented under a spring arm which is parented under a character mesh ...
I find that this is the best setup for my cameras but might be bad for when I wanna have my player die
is it the active camera?
yes because im seeing my body through a 3rd person camera
I only have 2, a 1st person camera & a 3rd person camera, but ill activate it again just in case in the beginning of this event
that wont do it afaik
test with the other cam
oh it works
After I added the Set Active node it works, even tho the 3rd person camera was already active (because I was seeing through it) ✅
anyone know why constant force of gas not working on actors?
Has anyone had this problem where specific functions or event logic only works when you put a break point on it?
My blueprints have a box collision attached. Whenever a player enters the box collision, an event should be fired. The problem is, sometimes the collision takes either too long to notice the player entering (0.1 to 1 second) or, which is even worse, it just doesn't notice the player all until the player walks right into the middle of the box. I have tried many things and it didn't work
Hey everyone, I need a bit of help with my Blueprint setup.
In my task, I’m checking whether the InteractionType of an interaction point matches the CurrentTaskTag from my ScheduleComponent using MatchesTag.
The issue is: GetInteractionType() returns multiple tags
This causes my branch to constantly flicker between True and False
Question:
How should I change my setup so this comparison works reliably and doesn’t flicker?
Is there a better way to check if the CurrentTaskTag exists within a set of tags?
Hey guys! Just doing a quick survey to see how many would be interested in this. Would you? https://youtube.com/shorts/PhUUP8D-eX8?si=5ZaiVHTmHFOlzQiN
Hello, I'm fresh in learning UE5 and want to make something like heroes of might and magic but with some twisted mechanics. While learning how to code using blueprints and making camera move when mouse is near the edge of the screen i made this monster in screenshot. I don't know how to make which direction vector is chosen to my offset function. Can you help me? 🙂
I'm not new into programming, been making very small games in unity but never used blueprints. Can you recommend some good tutorial for good practices in blueprints? 🙂
"which direction vector is chosen to my offset function" <-- it looks like it adds something based on if your in those sections. What seems to be the problem with this ?
im wondering is there a way to use only one offset function and chose direction vector for it
you may be able to set a vector variable, add the vectors together, and then put it into movement afterward
but i think what you have is fine, not much making it cleaner doing it the other way
Ok thank you for help 🙂
if you had many branches and nodes i may suggest that way, but this is just a few nodes
Did that just a bit ago in our latest project. Then immediately turned it off locally. 😂 Edge of screen scrolling is annoying to me.
Any of you lovely lot able to give a newbie some insight on how to implement this crosshair system i've been toying with for a day or 2?
a simple crosshair is to draw it on a widget
put it in the center and show/hide the widget
Im trying to implement it so that the crosshair is drawn at the end of a raytrace, but having some difficulty
i've managed to get it like 80% there, but theres a couple little bugs that im trying to get my head around
what are the bugs ?
are you drawing with a widget ? or are you using like a decal ?
The "crosshair" widget i've created is created over and over and over again so eventually you just end up with a crosshair smear coming from the weapon, and the crosshair isn't quite at the end of the raytrace
drawing with a widget, tried with a decal and I couldn't see it once it got like 5m away, and drawing it on enemies was horrible 🥲
ya i see the widget is probably better
so the crosshair is in the correct place ?
create the widget on begin play
and just set its location
don't create it after the trace every time
well your moving it with a node i c
so that should move it
you use the reference from when you created it
instead of keep creating it
that will fix the duplicate
you keep stacking widgets the performance will drop as well
i usually put my widgets in the HUD
but you could just do it on begin play of the bp your using it with
i've just tried doing it on begin play and it only gets updated once, not in real time
show the code
did you put all this on begin play ?
yarp
thats not what i meant
ah
do the line trace and movement on tick like you were
but create the widget in begin play
then you right click and promote to variable
and use that reference to move it
so as not to keep creating widgets
but just moving the one you have created already
put the set position in viewport after the timeline
right click on the return value of the create widget, and promote to variable
i don't have things hooked up, but this is the basic idea
notice i created the widget, set it to a variable
and then used that variable to set position in viewport
instead of creating it on tick
essentially, create it once but update it's position everytick
exactly
"Blueprint Runtime Error: "Accessed None trying to read property Crosshair Widget". Node: Set Position in Viewport Graph: EventGraph Function: Execute Ubergraph BP Weapon Component Blueprint: BP_Weapon_Component"
lemme just make sure i havn't done a silly mistake
the variable is empty so you must not have set it before the tick runs
do you have allow tick for begin play checked ?
that was it
i didn't "Set" it before trying to call it in the event tick
that'll do it
thanks for the help on that one! would you mind giving a hand to get the crosshair actually lined up on the end of the ray trace?
ahhhh ofc
does it look like the top left is in the center ?
it's looking at the origin point of the image isn't it?
yes
more or less yeah
it's puting the x, y on that point, but the 0,0 isn't center most likely
makes sense, easy way of nudging it in the right direction(s)?
would i do that in the Screen Position - Set position in viewport connection?
essentially at the highlighted node diversion?
That weird, it's 100x100 but i had to subtract 25 each way
interesting, thanks so much for the help!
spent 2 days googling and couldn't find anything like what you've just talked me through, but then it might be a case of it's so simple no one else needed a tut on it hahaha
finding tutorials for very tailored issues is usually a hard time
Yeaaaah, im trying to avoid tutorial hell but when you're this new it's kinda hard not to
i just went over blueprints tutorial and that seemed to help me quite a bit
now that i've done a tiny bit in blueprints it's beginning to make sense how things are done but im very much still learning how things are done etc
now to figure out a headshot system, thanks to your help getting my crosshair accurate!
what is this mean?
is this the player start ?
it could mean it's colliding with something @muted gorge
move it out of the collision
Hey all. Is there a way to search a Data Table using a column (like "Category") and find associated row names in BP?
I need to create widget buttons for each entry in a subcategory.
Ex. Mechanics > Combat > Dodge.
The Subcategory of Combat is where I need to reference the DataTable to create a button for each entry widget (Dodge).
Hey when I cast to pcg volume everything is fine until I close the engine. After that always the node turns into a "bad cast node" and needs to be replaced by another cast to pcg volume node, anyone knows whats up?
https://www.youtube.com/watch?v=HOpyZ8552oA&t=429s
Is it true that we should use soft pointers almost everywhere if we point to a heavy asset?
I haven't seen almost any soft pointers in Lyra (besides lobby background) and I have no idea what should and should not be a soft ref
Example from Lyra: ExperienceDefinition --> LyraPawnData --> PawnClass --> InitialInventory (x3 Item Definitions) --> AbilitySets/WeaponBlueprints->Meshes/NiagaraSystems
All mentioned above is fully hard ref.
Would it make sense to replace anything/everything with soft pointers? I recently dug into LyraExperienceManagerComponent and see I could async load there everything my experience uses before the game actually starts (so PawnData for example) but what if I have multiple pawn data assets and only half of them is going to be used, then It would make sense to keep pawn classes inside as soft ref, then what about initial inventory, probably all of those items are gonna be used but let's say for example someone never switches to 2nd or 3rd weapon given from initial inventory and uses only the 1st one, then it would make sense to store them as soft ref and async load as well right, same for ability sets related to them?
BUT what if someone decides to never shoot their equipped weapon, all niagara systems used for decals which are hard ref by weapon bp should be soft pointers in that case too am I right?
How can programmers create environments where designers, artists, and game logic work as one? Through intuitive data systems. Learn the art of storing data in Unreal Engine, as we analyze how different methods impact designers and/or help teams scale.
We’re excited to bring you sessions from Unreal Fest 2022, available to watch on demand: htt...
It all depends. If most of you're stuff is going to be loaded anyway (pretty common in smaller games) then there isn't much point. This said, music (audio assets) are usually good to soft ref either way as these can range from 3mb to 30mb depending on compression and you would rarely have more than 1 playing at a time.
In terms of lyra, with it being a FPS shooter template, these tend to be fast paced games so having to load/unload assets could result in hitches if it happens frequently.
If you only have a handful of weapons having them all loaded so they are ready can allow for a faster response. If you however have 100's then yea, you'll need to soft ref most of it (probably get away with just soft refing the data asset) as having all of them loaded would most likely be impractical.
if you rebuild the bp does it do the same thing ?
possibly it's corrupt
Thanks again for the help earlier @lofty rapids, managed to get a health bar and headshot system implemented now! Did a quick and dirty pass over the animation(s) handling im doing and tidied that up a bit too, think it's working a little bit better than before!
best way to learn is help others, helps consolidate your knowledge!
How do I rebuild it?
i mean create a new one and do it from scratch unfortuanately
but just put that stuff in it
see if it fails or the bp is just corrupt and it works in another bp
if you can't replicate it in another bp then it's probably corruption
which means you'll need to redo the bp
Well i switched it for a tag check so that works now, but when you say rebuild I could just ctrl c ctrl v the code right?
ya, just to see if it's the bp is corrupt
or there is another reason why thats happening
create a new bp, and copy the code
that works too
I see. Well im prob gonna aavoid that for now but if need be useful to know. What makes it go corrupt?
idk much about it, but it can happen
it's something to check atleast
if your saving it, and everything works then when you re open the project its f'd that just imo seems like corruption
it's not working as expected
but there could be other reasons i'm still learning
you have any c++ ?
does anyone know what's wrong with this code? when the player is spawning in the world it should check if a specific cutscene is playing (the cutscene is being referenced in the viewport), and when it's playing it should debug that text, but it doesn't.
Try a delay. If that works then your LevelSequence isn't yet playing when BeginPlay calls.
If you want a proper fix and the delay helps, then check if the SequencePlayer has a callback for when the Sequence starts playing, and hook your logic up with that in case it's not nyet Playing.
the sequence is not meant to play on event begin play
the event begin play should just check if the cutscene is playing
But you are checking if it's playing on BeginPlay.
i want it to debug the text whenever it plays the cutscene
So why are you expecting it to be true?
hm that's right
Then check if the SequencePlayer has a callback for Started Playing or so.
how do i check that?
The same way you found "Is Playing" you can look for something with "Bind" that sounds useful.
And if that doesn't help, probably via the API Docs
is something like this better?
No, bind the play event on begin play. This self referential loop isn't what you want
bind the Delegate of on play to begin play? or you mean to connect it normally
thanks!
In general ? Yeah. Regarding this BP? No
you use hot reload at all ?
What's that?
"Hot Reload in Unreal Engine allows developers to recompile C++ code while the editor is running, without needing to restart the engine."
Like live cpp compile ?
live, right
instead of close the editor, compile
i've heard this can cause corruption
random question, is there a quick way to get the impact point where a player lands from a jump? Im trying to just spawn a dust effect on landing but using the capsule or mesh or a socket at the root produces inconsistent results, sometimes the effect spawns above the ground or randomly around the center of the character
I am using on landed for obvious reasons, I figured just grabing the location of some other element like the root bone would work but I think the inconsistencies of when it technically hits is messing it up
I'll try the trace the thing
should be able to just make it a quick basic function, might be able to use it again later
traceDown(actor) {
return location;
}
might also work to take the last floor location from the character movement component
thats not a bad idea either, in that situation would I would just use the location pin no?
tho, i'm not 100% sure if it contains x/y or if it was just a z-height
Z height should be fine for what im doing. all im trying to do is spawn a little dust particle on landing
If I need more info I can swap it out to the line trace idea
well you were right lol. Its doing the correct Z location but it doesn't move with the player on the XandY axis it always spawns at the same location. Welp time for a trace I guess lol
thats exactly what did
or it doesn't update for some reason, but yeah, linetrace check will be just fine either
I did put it in a library function since I think I could use it for other stuff, but I dont think that would change anything since im still feeding in the character movment
Yeah I've used it but a long time ago
got it thx for the tips
what am I doing wrong here? I referenced the correct widget in the vehiclehud variable
so you have two variables where do you actually set them to there values ?
you set the correct type of variable, but you most likely didn't populate the variable with the actual reference
setting the type does not set the reference, you have to actually set the variable value after
I just realized where I severed the thing that sets the variable in the controller bp
severed the wrong one
I put the connection back, removed the "add to vieport" and it works now
had a bit too much of a panic lol
Now to fix the binding issues
because it still removes the text in there, when I simulate the game(and they are invisible in VR)
no errors ?
Nothing, lemme relaunch the engine, maybe it'll show errors
wheres the part that shows the speed ? i don't see that code
I forgot to bring it back in the player controller for some reason
you asking this reminded me to
when you see accessed none on a variable it's because the variable is empty
so it's another problem with a different variable
same problem, you need to actually set the value
if it works in pie and not in another mode then it might be a timing thing
where do you set this value ? Vehicle Movement Component
when does this run ?
it is being set, I also used cast to but it's redundant so I removed it
begin play
turning off and seeing if it will fix the issue
now it does not display an error, still empty widget
so you compile save
did so
not a thing in the log
what does the update speed function look like ?
in player controller
in widget, gear, then speed
ok so it's not set, you set it to not tick before begin play ? and the begin play and tick are on the same bp ?
yes
idk why this error is happening if you set it begin play and don't tick before that
Generally speaking you should be checking to see if the references you're attempting to use are valid. That would make this cleaner and you wouldn't have to play tricks with tick
okay Put print string to it, it shows the speed and gear
and RPM gauge gets filled
but it's because the vehicle is possessed in this moment
in vr shows up too now
the problem is the accessed none
message log is empty
collision issues came back but at least now it's easy to see speed
it didn't show any errors about the hud
now it does show warnings about physics which never showed up
probably the error before was blocking everything from working
when you get errors like that you got to fix them
warnings not so bad, but like it says you need simulate physics and your using addimpulse
I ignored it because the main problem was VR controls not working
Fixed those - moved onto this error
it was an error that only messes up only the gauge widget, so I didn't pay attention to it
so take the print string out you know they are actually activating
is the speed displaying ?
nope
even more confusing is the part that it stopped responding to inputs from the steering wheel and gearbox
only car's skeleton warnings
which it does have enabled
if I simulate physics on each wheel it'll just disconnect
I didn't even get in the vehicle blueprint, only thing that was modified is this exact car's BP, not the main one(excluding camera controls, which don't play a part in physics)
idk any deeper then looking at the nodes, maybe debugging some errors
idk how the physics should work or the vehicle should be setup
is it #chaos-physics ? might get better help in there
atleast the errors are gone
it's still processing
alright
it could take awhile for a big video
it's 130 MB, not that big of a video
Get 'Handbrake', it allows you to re-encode the video. Often reducing the file size significantly.
whats up with the throttle ? you said a reset might fix it ?
USB Hub might've had an issue with the port that wheel is connected to while I was working in this session in unreal, I restarted the editor because it usually solves issues like this, it didn't
idk enough to fix that
never used a steering wheel
is it steering ?
or the whole thing just isn't working ?
It would work flawlessly if I was possessing the car, but in my caseit's impossible to do what I want with it
So I just basically teleport in the car, weld pawns together and pass through controls from vrpawn into vehicle using custom events for inputs
And it seems like inputs decided to not get passed through despite everything working in theory
VR turn with controller broke too
somehow
it works but now rotates with an offset again
not a single thing was changed in the pawn blueprint
Whats the problem with possessing ? your saying the controls work if you possess it ?
VR controls will not work if I possess the vehicle, no matter what I do and how much do I try to merge vehicle and VRPawn together it just won't work how I need it to
hands just basically fall off when you possess(even a modified) vehicle
i c
the steering wheel works if you possess the vehicle ?
you may be able to pass movement to the vehicle
if you don't possess the vehicle you won't have those inputs, but the code for the input should be in there probably something like add movement input and some inputs which you could just mimic in your vr pawn and pass to the car while your in it
I passed inputs through calling a bunch of custom events in vehicle pawn through VRPawn, it worked until it didn't
Example: gear shifting and neutral, with the responding part in VRPawn
does the gear shifting work ?
it does
now you just need to do the steering and throttle
just look on the vehicle for how it does that
doesn't the steering wheel have a shifter also tho ?
believe me or not, I did, I jus thave to figure out why won't it recieve the inputs
it has, just as paddle shifters which are separate "gear up" "Gear down" events which I didn't bind
you might need to add context, you notice on begin play of vehicle it adds a context ?
#enhanced-input-system is a beast idk much about it
the same enhanced inputs on the car, don't work on the pawn ? do the events actually fire ?
it's probably the context
it adds context when you overlap the vehicle
Car calls the event in it's blueprint
why are you adding and removing default ?
it's vehicle default mapping context
I changed the descriptor but not the asset name(which I should)
Add vehicle related mapping context when overlapping with the vehicle
remove vehicle related mapping context when not in vehicle
as a precaution to not make car receive unvanted inputs
is the box the whole size of the car ?
it isn't but it's everywhere that player can be
I'm gonna just get the values and print them out again, something aint right
you add the context but you probably have to add the events in your vr pawn
the keys will work with context
but you'll still need to run the code
meaning the context doesn't run when the keys pressed on the vehicle
events are in the vrpawn
it did work before, idk why it won't, I added the mapping context on begin play, yet it won't work
see if the events are firing off
when you move the steering wheel
and push the throttle
put some print strings
did, no reaction
ok so your context isn't working
I am gonna try removing one of the plugins (rawinput) and see if it will change anything
since I am using a Joystick plugin that supports wheels out of the box I might find a workaround
I figured it out
thing just got confused and reassigned a different name to the steeringg wheel in the mapping context
probably because of conflicting plugins
so you can drive the car now ?
doesn't want to move but I have to check out if it actually does add the throttle input or not by moving the print string to another bp
see if that event is firing
it does fire, car doesn't move for some reason, digging deeper
worst thing is that it won't show any errors, so technically it works, but it doesn't do anything
I'm going to sleep, can't figure it out, I've lost already, so might as well
It gets steering inputs, gear changes, but, throttle doesn't get set in there for some reason, no error about it
I just want to mention this can probably be simplified to a single input action and a single 'SetGear' event where you pass in an int.
I will look at it in the morning,
I didn't find a single guide for H pattern shifters in the wild so I just went the easiest route(one I know would work) and it does work if events are fired at all
And idk how should I figure out the rotations of the mesh I use to visualize gear shiftinf
While takes a while, it does display each gear right because each gear has it's own rotation values
But will look at it in the morning
Not a single input action (turns out it wont trigger if the action value is between -0.5 and 0.5) but you can get it down to 2 and have the values controlled by modifiers on the Input context mapping. 🙂
Neutral is a separate one.
It might give you some ideas tomorrow. 🙂
hi i have this item box blueprint to randomly give the player an item when its shot, using an enum, i have none in there as the default value, but i dont want the box to be able to give "none" i tried setting the min of the random in range to 1 instead of 0 but the same happened
Remove 'None' from the pool?
nope it still does it
It cannot, if you remove it from the array on the right of the last screenshot.
i did
Also your randomizer is wrong. Max should be LastIndex. There is also a Random function pulling directly off of an array.
Length is one more than last index. So you may be pulling from the last index, which returns the defaulted None value.
What is the three here?
lives
i think this was the issue
It feels weird that it would hit the max every time that many times though. You should have only hit that rarely.
it was, i was just printing the curent powerup off event tick so i could see what the player was given
Ah. But yeah, the array nodes are much nicer. There's a simple one and one that uses a stream, if you needed them seeded. Don't have to do the index math yourself.
ty
Hate to ask late at night but I'm outta ideas.
I'm doing a simple drag and drop operation from a widget to a world space actor.
The widget has a on click and drag override event and a drag handler. The issue comes with the drop event.
Apparently, the player controller doesn't see anything related to the cursor while it is in capture mode or pressed down.
When I drag something, and then release it, that release timing resolves everything previously and so the new position is unaccounted for.
I was thinking of using a tick even when I am dragging stuff and when I let go, I call an event to get the mouse position.
My issue is getting the mouse position to world space.
I tried to get several 2d vectors but they are never quite right... any ideas?
Conversely I tried attaching a widget to an actor and have that handle the drop event but it won't fire. I guess viewport widgets and actor widgets are different when it comes to drop events
If i plug this into a left mouse button event, it fires fine
if i plug this in either the mouse release event or on a drag cancelled, it will not trace but will print string further down the line somehow
Ah I see why it fails. It's all 0,0,0 because the cursor, at that time doesn't exist on screen
Where do I get ResetDefaultCMC from?:
That is a custom function. See the Target is underneath that says where you get it from
Ah
Hi I have a weird problem
sometimes if I dont keep this blueprint open
then my images will not be rendered properl
I looked it up online, someone recommended using a delay because maybe the images dont have enough time to loda
I tried to use soft references & now im back at hard references
this problem happens always
but even more so with soft referencies
When using soft references you have to load them. (Load asset blocking or async load asset)
Loading assets in the editor is a little different to a game so manually opening a BP will also load the assets for the editor session.
Also, what's the point of the screenshot? Is this what works or doesn't work?
yes at the moment im back to using hard references
and still get the same problem
I've also had the problem where a particular part of code would not work/execute
unless if I put breakpoints on it
and sometimes if I kept the executing blueprint open, it would work, if I kept it closed it wouldn't load the code properly
Instead of the delay, swap it out for a print string. You probably aren't setting the image in the class used.
This problem happens when I completely ignore it & do something else, for example if I reset my editor or if it crashes there's a good chance that it might happen again
but there's no way for me to debug it at all
because it only happens every once in a long while
and when that problem occurs I dont get any print strings printed or delays or anything like that
at least so far when I tried with print strings I never seen it but its very rare error so idk how to debug this very rare error
This sounds like the widget never gets created in those instances.
Either way, it can be good to double check the log as sometimes print to screens get suppressed but still show in the log.
The widget does get created but it just displays a white blank image
I'd lean towards the image not being set in whatever class you have assigned. That or the class isn't set.
How do you create/add the widgets?
How i can fix this when i click attack Sphere duration it spawn fast
Could you show us the code?
it's good
I will do this after I pass the exam/defend my diploma
Hey! I’m building a simple flying AI using ProjectileMovement with homing enabled following Gorka tutorial
I want the actor (a glowing spirit) to orbit around the player, like it’s gravitating around them.
But I have two issues:
- It keeps accelerating endlessly, even with low initial speed, max speed, and homing acceleration.
- I want it to orbit at a stable distance, not rush or stick too close.
Any idea how to make this orbit motion smoother and stable? Or is there a better way than using ProjectileMovement?
Thanks!
In what context does it make sense using ActorComponent on a moving Actor, instead of using that Actors EventGraph?
Gonna need better context. What does the actor moving have to do with an actor component?
huh ?
I'm using projectiles for my game and once they hit a certain speed they begin skipping over frames and will miss, is there any way to prevent this or fix it
possibly enable CCD, and/or adjust sub-stepping
I tried ccd, didnt seem to do anything, unfamiliar with sub-stepping tho
what do you mean by skipping over frames?
I'd just roll your own projectile that uses traces instead of sweeping if you really need it to handle high speeds
sub-stepping might help ?
Depends on what the problem is
"This involves increasing the number of physics simulations (substeps) within a single game frame"
"To handle fast-moving objects in a simulation, you can adjust sub-stepping settings to prevent tunneling (where objects pass through walls or other objects) and improve collision detection."
I know what substepping means, we don't know if tunneling is actually happening. If it's ProjectileMovementComponent it just sweeps the collider afaik, it shouldn't tunnel.
i c
sorry I had to get a video to best show what im talking about
I also tried substepping but it didnt work from what I tried
but in the video I shoot the projectiles at about 500 speed, and then click a button to change it to 2500 and as u can see they just begin missing and skipping frames
unless I put the afterimage over the enemy it wont hit
are you using projectile movement component or what
yeah its an actor with projectile movement
using initial and max speed for the speeds
You have sweep collision on right?
Trying to turn off the inputs on VRpawn when in car(variable is switched depending if pawn is overlapping another pawn)
the boolean incar isn't working ?
i c you have incar is false then to the movements, it looks like if you set incar to true then the movements shouldn't work as long as it's the same variable
yep, it should break the inputs when in car, I think I will try making a different boolean modifier just to try out
and these are all on vrpan except for box collision ?
that boolean should work, for some reason you must not be setting it or it's a whole other variable
first two are vrpawn other two are in vehicle
so when player is in the box - it calls the event in pawn, and it sets the boolean
right i see that, check if the events are firing
it looks like it should work unless the events are not triggering
make sure box overlap is working
any errors ?
doing it rn, I set it to ignore everything, but overlap pawns
generate overlap events is checked in both
no
its probably not firing the overlap, pretty much the only reason why it wouldn't work imo
event's don't fire, yeah
just attached a bunch of print strings to it and nothing comes on
hey people! importing heightmap from 512x512 image gives these weird ridges, image itself seems normal, how can i approach this problem?
changed the collision type and it works
That's a resolution mismatch and edge padding
ooh, so that thing
i tried setting image size exactly to 528x528 but it seems to exceed the max size and i cant import it anymore
Lol. You have to import heightmaps the same resolution as the landscape resolution? It's too stupid to do basic UV averaging mapping?
im alright with less or more resolution, the mismatch is what i wanna fix at any cost
now to fix VR inputs not working when teleporting out of the car..
(walking not working, turning does work it seems)
why is that not 512 x 512?
You need CommonUI for a start. And you need to modify it's CommonAnalogCursor. Requires C++ to implement easily. It'll be a buggy mess in BP.
tks
anyone here good with UE4?
Other than having less features it's pretty much the same as UE5.
can we speak in dms
Just ask you're questions in here. No need to DM.
ok basically im trying to make a slight modification to an existing pak file thats compressed with oodle and uses AES key for extraction of assets and when i packed everything together with unrealpak im getting an error like this:
like upon launching the game
the file exists too so im like wtf
#packaging would probably be a better place to ask.
Why not ask in the sea of thieves modding discord?
there isnt an official one and i own the fan one
Hey folks, I'm trying to rotate an actor to face away from the surface it's on (which I can do fine) WHILE maintaining the ability to rotate the actor in its **local **Z-axis.
I can't seem to merge these two behaviours together, but separately they work fine. Primarily I can't 'merge' that local rotation with the OnTick() updated surface normal rotation in world space. Any advice?
Make rotation from ZX
Or XZ, whichever one prioritizes the Z direction
Just feed it normal as Z and current forward as X
Ok interesting, thanks, let me play around with that!
You could also look at the rotate around axis node.
So something like store the desired local rotation and rotate the normal-based rotation BY that stored rotation each time it updates?
Yea.
If normal and local use can change over time, if just do it in a 2 parter.
Tick -> update for yaw control -> update to enforce z direction.
Use CombineRotators or AddLocalRotation, whichever approach lets you just add some local yaw.
The problem is that the local yaw isn't kept the next frame, because I'm setting the full rotation back to the normal value
Dont
I think the crux is that I can't work out how to merge the 'saved'/current rotation which includes the local yaw changes, and the per-frame normal rotation
Tick -> update rotation to yaw around Normal -> update rotation to enforce normal preserving Forward as best it can (in case normal has changed)
It's the last part that I can't work out
how do I preserve that
Make rotation from ZX
You can do the whole system with that node if you did your yaw changes by rotating x around Z before feeding makerotfromzx
How is yaw changed, is it added to per frame or just set like LookAt?
Changed on input
Tick -> Z = normal -> X = rotate vector(forward, z, input x speed x delta seconds) -> rotation = MakeFromZX(Z, X)
forward == -normal in this case?
The current forward vector of the thing
rotate vector(forward, z, input x speed x delta seconds)
I can't quite figure this part, RotateVector() only takes a vector and a Rot right?
Rotate vector around axis I think
Set it to "Play from Start" instead of Play, which plays from the current location
yeah this seems to be working really nicely, really appreciate you taking the time to walk me through that!
thanks very much!
ah idk, the closest range to 513 is 505-568 or smth, cant go in between
what i did was changing heightmap size to 435 and now it aligns perfectly
resolution higher than 512x cant be imported, 505 gives mismatches
F shortcut key should zoom on node right?
i know HOME will do a zoom in on a node
i don't know if F by itself is a shortcut, i don't see it doing anything
I have a timeline that moves an actor along a spline. I am trying to make it so that the same timeline can be used for multiple actors even if one is already in progress. Is this possible? Would I need to use something other than a timeline? EX: timeline is actively half way through moving an actor, a new actor attempts to start on the timeline from the beginning while the current one is still going
"if you have a Timeline inside a function and call that function multiple times, the new execution will override the previous one rather than running in parallel."
hello can someone help me i stuck
Yeah that's what I've been running into. Maybe I'll add the timeline per actor instead of in the controller, that way they can be called and ran separately at the same time
im creating a pon game in unreal for local multiplayer and i created two paddles which are pawn classes and two playerstarts
now problem is i want to spawn two pawn classes which are pedals at player start using game mode blueprint
#multiplayer is it's own thing its a lot more complicated then single player
What happens if you hit play in editor with 2 clients?
How should I implement multiple soundfonts for my instrument in my mod?
I am currently making a mod for an Unreal Engine 4 game where a piano is added that has muliple soundfonts. I have made a child blueprint of a vanilla instrument where I can set an array of tone samples. Now, I want these tone samples to be changeable while holding the instrument. A simple solution would be to make an array of samples per soundfont and then set that array to be the instrument's tone samples every time the soundfont is changed. However, I have 100+ soundfonts that I want to use and I don't think creating 100+ arrays would be the best option. Any suggestions on this? Could I make some kind of algorithm that automatically goes through all the samples and somehow saves them? I should also mention that due to me modding a game and not creating one from the ground up, I'm restricted to use blueprints only, no C++ code.
Oh and by soundfonts I just mean a collection of samples in C in different octaves
Can you make a custom struct?
Yes I can. I can use blueprints freely. Just no C++ code
SoundFont = struct
That's what I'd do
And then what? Make the items of the struct the soundfont arrays?
That will still leave me with a bunch of arrays
Yeah I'd do:
SoundFont:
array<sample> samples
Instrument:
SoundFont MySoundFont
you can have a data table of SoundFonts
You mean map by data table?
no, a data table
What's a data table?
It's a table based on a struct, each row is the struct
DT_SoundFonts:
Piano (samples)
Organ (samples)
Glockenspeil (samples)
SoundFont:
Name
SamplesArray
I guess that works but I would still need to manually add all those samples. Well, I don't think there's a better way tbh
You somehow somewhere need to manually add samples
I have actually been using maps with structures before because I didn't know of data tables. Data tables seem way more intuitive tho
As a bonus though, you can import/export data tables to CSV in excel
also you don't need to load every soundfont in the world to spawn the thing
Well, then doesn't really make a difference in my case
just need to load them as you swap to them
if you name the samples right it can make it silly easy
Either way, something somewhere needs to type a sample name a thousand times
Well, I was thinking of an algorithm which goes through the folders and then makes arrays automatically. But that would probably be a bit too much for what I'm doing
That's sorta doable
how many samples total?
128 soundfonts x 8 samples
are they already in folders in Unreal?
1024 total
Yes each soundfont has it's own folder with the 8 samples
Look into editor scripting stuff
Alright, I will
For instance this puts all subclasses of some base class into an array for my data asset
hanky shit but it works, it basically automates me filling an array up
If you can extract the folder and some elements of the sample name into strings you can probably do something
Yea there should be a way. The way I got those samples was I exported them from an .sf2 file using a script. If the naming would be a problem, I could just modify the script to export the samples with different naming
your modding a game and you have access to blueprints that you can alter the game with ?
thats interesting
Yep, the game has a whole own SDK with custom nodes and stuff to interact with the game
thats pretty cool
you should cache before you loop data
if it's comming from a pure function for sure
Anyone had any luck with state trees before as currently I'm fighting a losing battle on simply getting mine to work just in general
state tree like in #animation ?
no the newer AI thing
it used to be behavior trees but they then introduced State tress
possibly #gameplay-ai might know about it
Hi, when playing in viewport everything works fine but when i build the game and play the "set game input modes" dosent seem to lineup ? anyone know a reason for this ?
Where and when are you calling the set input mode nodes?
in editor i dont use any
thats the weird part
im just wondering why i would have to with a built game if its handled differently or something
Any idea why my movement inputs aren't moving the pawn? Print strings conform that world direction and scale value are changing appropriately, and confirms that the correct player controller is possessing the correct pawn. IMC is added to the GAS Companion component (though, trying to add it via the enhanced input local player subsystem doesnt work either). Walk speed is appropriate and the IA_Move is set up correctly both in the IA and the IMC. This event is firing when WASD is pressed, but the pawn is not moving. IA_Look works fine, and is on the same IMC
IMC and IA here
any errors ?
Nope, nothing showing up 🤔
so the event is firing, but the add movement input isn't working ?
what game mode are you in ?
are you using a set input game node ?
possibly ui only ?
I've only one game mode which is set as the GameMode override of this map. Elevating the player spawn results in the pawn staying static in the air. Can't figure out why one portion of the IMC (camera control) works but movement and jumping do not. What do you mean by UI only?
chedk your character movment component
is the default land movement walking ?
and do you float in the air ? or do you drop down to the ground ?
Default in the CMC is indeed walking - the pawn floats in the air rather than falling
hi all, i have a character that can move left or right, but for a few milliseconds wile the player is turning he is not facing lft or right, essentially turning on a 360 arc, so this could cause bugs, im trying to set up some sort of global logic that checks if the player is either right or left. I know you shouldn't really compare a float, so i used a dot product, but this could still potentially cause issues if the player trys to do an action if hes facing 0.9. Any ideas on how to fix it so the player only acts if he is facing left or right? Thanks
Gravity is enabled in the character root as well
left or right meaning you have a camera on the side ?
and your possessing the pawn ?
camera like hollow knight or cup head
Yep, used print strings to verify both the controller and possessed pawn 
do you have anything running on begin play ?
what i did for a "sidecroller" is rotate him when you press the keys
so press a rotate left
d rotate right
Good thought - there's quite a bit on begin play, but disconnecting it doesn't change anything
I could do it like that so its either left or right but looks a bit unatural with no time to turn if that makes sense
ya you could do it on a timer or something to make it more natural maybe a timeline
Hi im trying to make a rock-throwing mechanism, unfortunatelly it never works
my energy variant decides the amount of throwing power I should have based on my current energy level which I get from my widget though you could say I could get this from my stat_component 📜
but anyway this is an old set up in need of an update, it was working before but now it abruptly stopped working where's before I was able to get this to work and adjust based on player energy ⚡
idk what happened 2 days ago it all went to the drain
also instead of player's head I was using an arrow that was acting as a socket starting location for the starting point of this rock, that was placed roughly on the dominant hand of the player to simulate the effect & look as if it was coming directly out of the player's throwing hand, yesterday Ive added a 3rd person mode too into the game, wheres before this was only 1st person available camera, now you can interact and every trace will come from player's head rather than player's camera which can vary depending on which camera you might be using at a particular moment, so this is why I've added this get head bone mechanism, but anyway 🫲
Ill probably change it back rn 🤔
"throw_socket_arrow", i'll change it to throw rock arrow or smth like that 🏹
this is what the energy variant looks like 🪫 🪨⚡ 🫲
what I had before was this: Negative values instead of Positive. **Negative **values worked ✅
Sometimes instead of throwing the rock forwards it would throw the rock backwards instead ❌ 👎
hey 🙂 is there an "official" way of getting certain Blueprints to tick in the editor? I know you can enable "Call Function In Editor" on functions but I basically want the EventTick node to evaluate in the editor. Currently I am just running some of the nodes I need inside an Animation BP as A hacky workaround, since AnimBPs can tick in the editor but I'd rather run it directly inside an actual Blueprint actor instead if possible.
fwiw this is because I'm working on pre-rendered cine content, not a runtime game so I don't need to worry about hacky methods and performance so much. Just anything to get it working would be useful. 🙂
it stopped working like no rock is thrown ? it goes the wrong way ? whats not working about it, does nothing seem to happen ?
whats with the loop in the "throwing mechanism" ?
it spawns (bcs im spawing it) it doesnt have velocity, stays in one place then falls straight down in place without any force on any direction. ⬅️ ↖️ ⬆️ ↗️ ➡️ As for the loop, that's just a widget reference finder 🔎📩
It's not your problem here but you really should put the business logic in the other classes, not in your UI
I know that should be in the stat_component, thanks for reminding me tho, i will fix that 🙏
Ok I have update about the whole throwing thing..
I made it work like this ✅ (kinda)
That's just -1 x ThrowAmount
Even tho the values inside of the EnergyVariant are positive, I tried to make them all negative anyways, now he is throwing the rock forward with a 30 degree skew to the left , very annoying
that's when my energy was around 90-100%
and I fast forwarded to where my energy got to like 30-40%, the weirdest part was that when my energy got this low, the rock ended up actually going backwards again.
This effect wasn't dependent on which camera was active, same effect was observed no matter which camera I activated
it seems that even if I activate the 3rd person camera, I can still rotate the first person camera I think, but even if not activated, the rotation is stable because the player's body position will rotate anyways ( I might have to enable camera 🎦 visibility to debug it better
⚙️ ) at the moment it's hidden in game for both
what do you mean going backwards
are you moving at the time when you throw?
What is a good way to assign each PC connected to a server a different ID?
Like I can have the server print out how many player controllers are connected, but I'm struggling to find a nice fluid way to say 'First connected gets ID A, second connected gets ID B' for my editor testing scenarios.
This advanced dialogue system features questions and responses all using the behaviour tree as a make shift dialogue tree. In this second episode I show how to start a dialogue with an NPC using behaviour trees as dialogue trees.
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind ...
Im trying to follow along with this youtube vid
but when im in the main window, or i fullscreen the window, the position for the interact message is way off
nope
That's just -1 x ThrowAmount
if I do that then it will just cancel itself out
what I want is to get the negative values!
ThrowAmount - 2 x ThrowAmount = -1 x ThrowAmount
yes
thats what seems to work & thats what im trying to get
but this system
only works when energy is high
Something fails when it goes lower 
gonna put a few breakpoints here🛑
oh wait I know why it fails
Thats it right there
turns out I dont need to make any of them negative
or have this ThrowAmount - 2 x ThrowAmount = -1 x ThrowAmount
I might change/remove it right now
Simple✨
Now what I noticed is that the 1st person camera doesn't rotate while Im using the 3rd person camera as active
I thought that wouldn't be the case. But it is

You should use the player's Camera Manager - you can use it to grab whatever the player is using, regardless of the camera settings
I thought of that but I wasn't exactly sure how the player camera manager worked so I kept it out of the question
is it too bad that this gives me the root component ? 😭
I'll try it anyways ✅
Nah, use the manager and call "Get Camera Rotation" and get the forward vector
don't use root
it already works pretty good ✅ 🤔 ceteris paribus
Basic Billboard question time here. I have an sprite (yes it is an actor BP) that gets spawned in my project, the idea is that you are looking at a top-down map view from a great distance and can zoom in with your mouse wheel - the sprite stays a consistent size whether you are far awar or up close. Very elementary.
Now my issue is simply that I want to click on the sprite and have something happen (just a print statement for now). Ok so I hit the OnClicked event on the Billboard - and of course nothing happens. Says I need to put some collision in there, understandable, I added a box collision although I am sure I am not doing this right (that box isn't going to "scale" with my sprite when I am zoomed very far out, I assume? Anyway I cannot get the hit to register whether I am far away or up close anyway. Doing some googling it looks like I may be missing some things, but the answers that come up seem out-of-date to the current version of Unreal anyway. Anybody have a quick and easy suggestion for this?
gratias tibi ago, thanks! @storm orbit both options work
Try on released event or On Begin Cursor Over
make sure click events are enabled in the player controller
sorry I am a dummy where do I find this?
uh, idk, i think the default player controller is in engine content
but i dont think you should edit that
make a new one or duplicate it and edit that
then set that as your characters player controller
this is in Project settings?
the player controller blueprint
Your billboard will use the collision of the attached root (like a capsule or box, whatever the actor has).
Mouse clicks will trace on the Visibility channel. You must have that set to block on the collision mesh root in order to register for clicks
I don't think I have one
not a BP anyway
idk then
i got that guess by adding a billboard to the bp i was in and hovering on click toread the description
no difference sadly
What is the collision preset for your actor? Also, you would need a collision object (sphere, box, capsule) above and have the billboard parented to that. Typically, if a component isnt supplying a collision shape, it looks UP the hierarchy, not down
How heavy of an operation is getting a data table?
I have the get wrapped in a pure func: GetItemDataByItemID
I've just been using the pure func because I am lazy, but should I be storing GetItemDataByItemID's output at a var?
It's not a tick call, but let's say when the player moves inventory around or uses items.
Game is multiplayer and this code is run on server. Wondering if this might be hurting server performance.
I believe it really depends on how big the data table itself is and what it contains as the entire data table needs to be loaded into memory when first referencing it in blueprint.
If you have the reference to the data table in some function library, then it's not always going to be loaded, so then it would have to load in every single time you use that function.
Also your linear limit is 2 cm. That's not very far
Give it less oomph
But if it's meant to not really be an impulse, animate the linear position target with a timeline.
0,0,0 to 300,0,0 back to 0,0,0 would go out 3m and back
Make the timeline go from 0-1-0 then use the output to lerp 2 vectors
That sounds hilarious though, I'm 100% stealing it for my game
I used to do it in Garrysmod with hydraulics by yeah these vehicles are getting the boxing gloves on springs
How do I set this one up? It looks like a function but when I tried setting it within, I can't connect them to the other parts within the Blueprint:
The left one has 2 parameters
a CharacterMovementComponent object ref and that structure
I presume I need GAS Companion if I want to make my right one the same as the left?
dunno, try add those parameters to that function
are you copying something?
I'm copying this part specifically:
Have you tried add the parameters?
I did:
so change one to a charcter movement component reference and the other to a player character movement profile
btw those are outputs, you need to add 2 inputs
Ahh
ok, that now makes alot more sense.
Ok, my mistake.
Now I gotta drag this into my function here:
In ensuring this function actually works:
anyone have any idea why my event dispatcher doesn't consistently fire?
Basically I have it set up so that every time the player overlaps a point, it does a bunch of stuff with the UI. this works fine until the next set of objectives are unlocked, at which point the event just doesn't seem to fire for some reason. I've done breakpointing and print stringed it too. The exec flow is no different, buf for some reason my widget just never updates after the objectives change
If by "next set of objectives are unlocked" you mean "im adding new entries in the "Active Cap Points" then yeah you aren't subscribing any new entries here, you only iterate the array once on Construct
works now. Thanks
Hi I seem to be having a problem
I made a system that will prevent you from being able to run 🏃♂️ 💨 if your energy goes too low 💤 ⚡
this system works fine so far ✅ but there is a problem
❌ ❓
The problem with it is that if you keep your run shift button pressed you will be allowed to overide and hack this system as long as you keep running forever ⌨️ 🏃♂️ 💨
Even tho I have a **condition **there set up it somehow still **remains **useless 📑💩
I tried to **debug **my running conditional system with these ways:
-
ive set my energy level on begin play to be around 10, so that I can run and see on multiple occasions how the condition reacts. So now I begin with "almost" incapacitating energy
-
Ive put breakpoints on my collapsed graph here to see if it ever goes to false.
Result: I couldn't actually get my energy low enough because this breakpoint would tick every milisecond so it would not let me gradually and progressively reduce my energy level.|| (-> But actually I can relieve that using few more print strings instead✅ )||
If the condition you're talking about is the one in the collapsed graph, then it'll never stop you from running because it's only determined when you begin sprinting
After you remove energy, you need to check if they still have enough energy, if not, stop running. Its usally a good idea to have individual functions for starting and stopping sprinting as they maybe required to be called in other places.
Update:
Ive put a print string here, and it never fired 
You're timer also isn't looping so it only drains energy once.
actually the drain energy waits every 2 seconds and then drains ⏲️ ✅ Im pretty sure it works ⚙️ ✅ I'll put some more print strings there too to be sure 🖨️
if this isn't ticked, then no it wont work lol
true but I thought this key event ticks or something, because everytime I press it with break points it brings me back to the graph every second, so it never lets me do anything, even if i keep it pressed it brings me back to the graph every single time
The key event is only called as it says on the outputs, when it's pressed and when it's released
good point, but I think of functions mainly as tools for cleaning up messy large chunks of code -> which I then replace with collapsed graphs, even tho they are not rly the same
What Jyakhay is trying to say is that when you trigger the breakpoint it actually causes the input key to trigger the released as well, so when you play it retriggers in the pressed input. (Also you should stop using the legacy system)
functions aren't for cleaning up messy code. They're for creating reusable bits of logic. You should be using them more often. It also gives additional info when profiling as BP functions shows up in the stack.
do you mean this call stack?
That wasn't the one I was referring too but it probably shows up in there as well. I'm referring to the profiler where it breaks down how long things take to process/calculate.
is seems really strange that you can't use this profiler thing with collapsed graphs or things like macros(?)
I never used this tool I think
I'm pretty sure that screenshot it from the depreciated profiler. 😅
what are the benefits of enhanced 🆚 legacy ?
Legacy is only there for compatibility with older projects. Enhanced Inputs allows you to create Input Actions (such as Jump) that you can then add different keys too that trigger that input action. So you can add 'Space Bar' and 'Face Button Down' to handle both keyboard and gamepad.
It also used Input Mapping Contexts which is the input actions that can trigger and by what keys. These can be added and removed at runtime meaning you can create groups of inputs based on specific modes such as say Character, Vehicle, Build Mode, Combat etc... and add/remove them as need to prevent conflicts/overrides for things that aren't needed at that time.
That's just scratching the surface. Then there's modifiers and triggers.
Hello, I am trying to implement a save game and load game with various saved data, including a fraction counter integer, checkpoints, Cubes picked up Integer, and a timer. Upon the player dying, it currently saves the checkpoint (if it has been passed through) as well as the amount of cubes picked up on player death. I am currently unsure of how to save the fraction counter integer since the function for the integer incrementing is held within another BP actor.
I have references to the widget within my player character as variables but I am unsure how I would set them within the save game to override upon respawning.
Does anyone have an idea of what I could potentially do?
BP Save Game Variables
Code logic for creating saved game and overriding data
Current code logic for loading said saved game data
"the fraction counter integer since the function for the integer incrementing is held within another BP actor" <-- are you saying you can't get the variable value because it's in another bp ?
so , i'm downloading and loading 3D file runtime, it works fine in editor but in packaged build (shipping , dev.) mesh's rotation changes.
I'm not setting rotation of actor anywhere in any class.
A little more context the fraction counter integer is held within the fraction counter widget as a function that is then called in the BP Moving platform to be more specific
is the fraction counter a local variable to the function ?
i would put the variable in the game instance tbh
simple solution to access it anywhere
I wouldn't put it in the game instance. The load order changes in a build which could mess up your setup if not careful. I'd go for either the game state, game mode or player state depending what it is.
The only variable is the fraction numerator that is local
Whats the counter for?
counter is for when the player overlaps a collision box on a moving platform the counter increases by 1
Is it just a single box or multiple?
Multiple platforms
so for example I want the data to save if the player steps on 2 platforms and dies then proceeds to respawn at the most recent checkpoint. The UI would still show 2/3
the load order does change, i was wondering that
instead of resetting back to 0 which is currently does
I'd store it on the game state then if it's a global type variable. Gameplay specific variables shouldn't be stored in widgets. Instead they should read the data that is stored somewhere else.
So it's like health?
in this case no since I am not saving health between save and load states
Yea, the game instance is the first thing that loads in a build (of which there's only ever one instance) but in the editor, the map is usually already loaded. So if the game instance attempts to do something in the level on begin play for example, it'll fail in a build.
So theoretically I should have created the updating of the fraction counter variable within my character blueprint?
I'd be tempted to store it in the player state then and then have the widget get the value from the owning players player state. It'll be easier for your save system to access the player state and store the value as well as reapplying it when loading.
You could. If you have a few stats related to the player, sometimes it can be worth having a stat manager.
Hey does anyone know how to replace the animations that come with the pack I Purchased to make the default third person character animations?
you have a character and you want to use the animations from the default manny ?
Yes Ive tried retargetting and it wont work
I cant find this folder ABP_GenericRetarget
maybe #animation might be able to help, but this is a difficult thing to use an animation on a different skeleton
usually the animation is made for the particular skeleton
Generally, is using a child actor component the best way to equip items on players?
no
just spawn and attach
if that's what "equip item" means in your design
Yeah just want it to be in a socket in the hand of the player
thanks 🙏
Wait what if I don't even spawn it, I just take it from the world and set the transform to the socket + attach it? Would that work or is it weird to do it this way
in that theory then all your guns would be loaded i think
it might actually be faster then spawning tho
but spawning and destroy kind of clean it up
Right
Yes
I actually really like it like that, I very much like the thing that you hold in your hand being the thing that was on the ground, you can have all sorts of immersive effects from that.
A wand of continuous blasting should continue to blast when thrown away in panic
If a pan stops bullets, then a dropped pan, a worn pan, and a held pan should all stop bullets.
I'm using UE4 and currently trying to use Editor Utilities. How would I make an editor utility that could put wav files into an array like the following:
This is how the waves are stored:
001_folder
- file1.wav
- file2.wav
- file3.wav
- etc.
002_folder
- file1.wav
- etc.
I would like the Editor Utility to add a data table entry per folder with all the waves of the folder in an array inside.
Yes in fact I liked the idea at first too but since I have more than one item slots I eventually have to destroy the held item when I change slot
Sure, or just hide it
Or don't, put it on your back
🗿
That's genius
Thanks for the ideas, time to cook
And how do I even add data table content via node without importing from a Json or CSV
Or is that just not a thing? Should I just use a map instead?
Cool, everyone just leaves the chat when I ask a question...
could be no one knows the answer also
editor utility blueprints
I'm assuming, never done it but I'm sure it's doable.
I don't understand how I would save something using Editor Utilities
Or do you mean like creating a json file using an Editor Blueprint?
That may be doable
you can just edit the data table
if you need a hack to edit the data table from runtime, since you can't, you can use a savegame as intermediary
No I can't. Are you using UE5? I definitely don't have that node
I was using asset action utility as parent
That's for doing something to a specific selected asset
you probably could do that, thats how I fill up my data asset representing all the items in my game
Yea, this might actually be also something I need tho
Wait...
I still don't have the node
ue4 ?
I'm on UE4. You sure this isn't a UE5 only thing? I searched the web and a lot of people also said it's not editable. Maybe they're all old posts from UE4 where this wasn't possible yet
So I actually have to make a Json string now to write to data tables...
4.27 lists it as a node
No way... I'm using 4.26

How come you're using an such old version of UE? 4.26 is about 5 years old now.
I'm making a mod for a game. I don't have a choice