#blueprint
1 messages · Page 169 of 1
Hey all, looking for some generalized help on how I should organize my resources data for a banished-like game. I have a struct of what each type of resource has, then I have a data table of that struct, and then I have an enum for each row name from the resource data table. Lastly, in the building master I have a map of that enum where the float is the amount of that resource in the inventory (or needed to construct it). Let me know if there's anything I should do to streamline this
That data table is going to cause you issues btw
You've fallen into a classic trap that a lot of tutorials teach.
That is, hard refs in a data table.
When you reference one row of that data table, all rows are loaded, and all the dependencies. Meaning just by grabbing a single row, you've loaded every icon, every mesh, and every material, and every texture that anything in that table relies on. Move to soft references
does anybody know how to change an image in a widget on a button
I'll look into this, thanks!
I've followed this tutorial to get a day/night cycle going with the sun position calculator https://www.youtube.com/watch?v=Zg2NaZcyAjk . Could anyone point me in the right direction to be able to add the day and time updating on the player widget too?
Hi everyone! I hope someone can point me in the right direction. I have a third person project using the default template. I have a blueprint for a ball, where I have a sphere as root component and has physics enabled. The ball also has logic to increase the scale based on distance moved (think like a snowball growing bigger)
what I want is upon event trigger, have the player and ball snap to each other so that while moving, the ball still remains in front of the player (with physics still enabled on the ball). I have tried to attach the ball (but that doesnt work with physics). I also tried physics handle. I managed to kind of get something working with that, but I dont feel it is the correct approach? (I might just be using it wrong haha). I also gave a quick look to physics constraint, but I had better results with physics handle. I feel there should be a simple way to do this and I am just completely missing it haha. any help would be greatly appreciated!!
you could try something like this
Select the texture you want to change it to
I am trying to find out how to freely deform models in UE5 according to game play, but I am having trouble figuring it out.
To simplify and specify what I want to implement, I would like to move one vertex of an object in response to key inputs in the game. For example, when the player takes a step forward, the vertex should move forward by the same amount.
It seems that it is possible to move an entire object using the Geometry Script, but I want to be able to move just one vertex to deform the object.
My ultimate goal is to create a game that deals with 4-dimensional objects, so I need this knowledge. Alternatively, if you know any useful methods for dealing with 4-dimensional objects, I would greatly appreciate it if you could share them with me.
I apologize for the beginner's question, but thank you in advance for your help.
Note: This question was originally written in Japanese and translated into English using GPT (Generative Pre-trained Transformer).
anyone?
You might want to check up with #geometry-tools for specifics, however I know certainly you can manipulate vertices with geometry script. It may be involved, and you may need to build the mesh from scratch, I'm not 100% sure on whether you can manipulate a specific vertex on an existing mesh. Geometry script definitely sounds like the right start though. I can't think of any other way you would approach it without making a custom system, or using something deprecated, like the procedural mesh component.
Also, wow, GPT is really good at translation, at least from Japanese to English 😆
physics handle is correct
Make sure not to over-constrain the ball.
Only constrain on X and Y, leave Z free, and all rotation free
I guess no one has an answer to my question?
I did get better results with physics handle in terms of the ball rotating as I am moving it. But I was not able to set X Y Z constraints in the handle, that I could only do in the physics constraint. For the handle there is just toggles for linear and angular constraint, which enables the damping and stiffness options.
So the fact that I cant disable constraint on the Z axis, means the ball goes with the player if jumping (not end of the world, might just disable jumping when pushing the ball).
I have a location set infront of the character, which I constantly use to set the target location, and use high linear stiffness to keep it there. is this the correct approach to set the location?
That can work, or maybe you can use a constraint component and it'll give you more options
physics handle uses a constraint under the hood so it's all the same really
if that is the correct approach to setting the target location, do you have any suggestions on how to modify that location to accommodate the growth of the ball. ( I will share videos now to show what I currently have)
You'll probably have to do some math
I'd just make sure it's not too stiff so it can move around a bit
I was not able to get the rolling working as smoothly with the constraint vs the handle. but I might need to do a deper dive on the settings
I bet if you made it stiff enough such that when turning left and right it lags by like 15 degrees, and did a bit of math to make it not suspended in the air or shoved into the ground, it'd work pretty well
is this now with the physics handle or physics constraint?
handle
would work for both tho
handle is basically a wrapper on constraint that doesn't let you split out your XYZ limits
here is a preview of what it looks like when grabbing the snowball. The box infront of the player is what I use to set the target location for the physics handle. it remains infront of the player, but the rolling isnt perfect (might just need to adjust some settings)
and this is the stiffness and damping settings
and here is a preview of the ball growing with distance moved (not being grabbed here). I need then to find a way to accommodate this growing size, to set the new target location, so that it remains x distance in front of player, but also doesnt float or clip into the ground
the model looks dope!
okay thanks ill try this
thanks ❤️
@small coral
hi all
is there anyway i can access the current behavior tree task inside ai controller?
Thank you so much for your detailed response!
Can anyone help me find out why my character clips like crazy in my 2D level?
This happend when I am supposed to run into the wall beneath, it just clips up the wall like nothing.
EDIT: I'm pretty sure it has to do with my character sprites hitbox.
Same here ( currently standing on the tile right of the character ) supposed to fall down
@lofty rapids @faint pasture Thanks again. Your comments put me on the right path and my game is working as expected with no error messages.
if someone could ping me with some hepl on this, would be greatly appreciated
I want to chain two characters together, meaning that one character moving further away from a player will eventually drag them with them.
**Use cases: **
- If one player jumps down a ledge and the other one doesn't, the one who jumps should hang over the ledge.
- If the player on the ledge moves further away from the ledge, they will eventually drag the player up
Does anyone have any pointers, tips or guides on how you would accomplish something like this? I found this game Chained Together on steam, that seems to do exactly what I want: https://store.steampowered.com/app/2567870/Chained_Together/
Dive into the epic adventure of "Chained Together"Begin your journey in the depths of hell, chained to your companions. Your mission is to escape hell by climbing as high as possible.Each jump requires perfect coordination to scale the platforms and escape the scorching heat. Traverse a multitude of worlds, each offering unique challenges. Diver...
June 2024
does it add to the next one ? or does it keep putting it in the same spot ?
when i get a different perk, it adds the second one to the first slot
ill put 5 in a row and show you, hang on
each machine has a perk id, but no matter which you go to, it gives that order of perk
-- perk machine bp --
https://i.vgy.me/J4L40n.png - perk machine
https://i.vgy.me/yyHDRv.png - buy perk
https://i.vgy.me/e88wlx.png - new perk
-- moves to widget bp --
https://i.vgy.me/s0fNZc.png - AddPerk
https://i.vgy.me/flcThe.png - is perk slot available
https://i.vgy.me/fhwQuS.png - get perk icons
@lofty rapids thats all the code involved in it, should help with fixing this, because ima be honest, sat doing this for a few days, its been broken for the past few and i just really want this done and fixed lmao
in this enhanced input action in your cube bp ?
yes
probably not a good spot for it, you probably want that on the player
Hi, sorry to interrupt. How can I check if a variable has any value/content in it?
I want to check if the variable (object) has a savegame blueprint in it. If not create a new and if it does continue:
its only there because i had an issue with buyables where you could buy something from like miles off, so went with this to fix it, dk if theres an easier fix
are you always going to use cubes ?
by that i mean the same bp ?
think about the input action (i'm surprised it even fires), but for each block it will fire most likely
1 - wonderbarr
2 - magic fingers
3 - barraidaide
4 - tutti shooti
5 - 1-up soda
when you overlap set a variable on the player like interactactor
then when you press the key check if it's valid
but do in the input on your character or player controller
so when you hit the key it only happens once
thats mostly a problem idk if it will fix everything but it's a good start
Hey,
I am currently working on creating a rebinding menu using user settings from the Enhanced Input Subsystem. I want to develop a system where each user can customize the trigger type, modifier key, and key binding for each action. To achieve this, I created a custom input trigger with multiple options, including:
Modifier Key: None, Left Control, Left Alt, Left Shift
Trigger Type: Pressed, Pressed Continuous, Released, Hold, Hold Continuous, Hold Reset, Double Click
However, I am facing difficulties in allowing users to change the modifier key or trigger type in the user settings; currently, I can only modify the key binding itself.
Any suggestions on how to resolve this issue would be greatly appreciated.
it already only happens once
thats what the buy perk does, it checks if you already have said perk
i'm saying the enhanced input action
think about it
you have it on multiple actors
i'm surprised it even fires on a random actor
but it's most likely going off multiple times
for the amount of cubes you have in there
it's not specific to when your overlapped
just the way i would do it is put an interactable actor on the player as a variable
i have an interactable variable
if you invalidate the variable by setting it to none, the when you hit the key you check is valid
i would also use started
and i'm assuming interactable is false by default ?
thats such an odd way to do that
yep
how so?
because your triggering all the events and checking a variable
instead of triggering it once
why overcomplicate it when this works, but this isnt the issue
the issue is that it displays the wrong perk
and skips over a slot
nope
it prints when im in the box and press f
which is my input action
where it fires off the following
hello
1
2
- press f again
hello
ok, i fixed one issue, being the perks not giving me the right one, now its just that skipping of the first slot
make sure your array is organized properly
maybe perk2 is supposed to be perk1
try to flip them see if it works
Alright, for one of my smart objects I need a Box (Fbox)
For test, I managed to make it work by using my current actor's position.
My game is taking place in a shopping mall. I would like, when an NPC gets in front of a store, he looks for smart objects to interact with within the store.
My issue: How can I associate a particular box (or set of boxes) with an entry point to pass it to the action?
not related to your issue, but just out of curiousity, what is your game about? a game in a shopping centre seems like a neat idea
whats the code look like?
Hey guys, in today's video, I'm going to be showing you how to create a grappling hook system for your games in Unreal Engine 4. In this, the player will shoot a grappling hook, and the player will 'fly' over to where this landed. You can also hit right mouse button at any time to cancel the movement along the grapple.
Grappling Hook 3D Model: ...
Can anyone help me figure out import this grappling hook into unreal engine. The engine shows just parts of the grappling hook
#gameplay-ai is best for smart objects
Hi! For an endless runner project I have a main floor blueprint that gets repeated. It contains an audio component, but it only plays on the first instance of the floor. As soon as I start running across the platforms, the audio disappears. Is there some settings I am missing or something?
so you have an audio compent, and it plays on the first one, but doesn't play when you spawn a new one ?
Why can't you do the logic on overlap? Is your game fps or tps?
TPS. On overlap? meaning?
Tps stands for third person shooter
Fly stands for first person shooter
What sort of camera style are you using.
I know TPS and FPS. It's overlap I'm asking about. What do you mean "by overlap"?
When the character overlap with the box, a reference can be passed. So what stops you from interacting between the box and the player.
I don't think you need to check distance with the player as well imo.
I'm having a bug with an individual level transition instance. I've got like 7 in the level, but this one and only this one is uninteractable. doesn't even notice when the use command is sent to it.
Is there any kind of instance bug possibility? Does that happen?
Debug
how?
How to debug?
yea, also what
U can use print string, find out the root of the problem
If your interact never get called, find the caller and keep working your way up
No, the interact gets called, it's just that it's not getting sent to this specific instance. If it was getting there, the debug string at the top of the bp would print when it hits it
But it's not
Again work your way up, make sure interact gets print in that instance? How? Again work your way up. Check the collision setting etc if you are interacting with a trace or check your overlap.
Make sure that instance have the right collision etc for the interact to trigger
hey
looking for some deeper insight on how to best manage sound for character
eg pairing sounds to discrete behaviors
ex i have a charging enemy that plays a sound for that charge
what are some best practices for managing sounds like that
preserving audio components vs respawning and destroying them?
when should i think about a higher level sound manager component etc?
realized i'[m just defaulting to managing each possible sound in parallel and that feels sub-optimal
--can't really find any resources on this subjecft
Oh, no the box thing was to test it. It was what the tutorial on Smart object did. I'm now trying to go outside the tutorial and make preset "areas" and have NPCs interact in there. It's not going to be the player. I was mostly asking about the clean way of remembering "areas".
Since my game is multiplayer some sounds needs to be heard by others so I spawn them (along with any particle effects) using a multicast. For sounds that play for the local player only such as when the character doesn't have enough stamina to perform an action it doesn't need to be heard by other players so I just play an audio component that's already on the character. I also have level placed sounds that run continuously in the background.
Using audio components attached to the character or having one-off sounds spawning in with auto destroy doesn't really matter all that much for performance as far as I can tell. I think its best to make use of whatever management / organizational system that works well for you. Also maybe try asking in #audio you might get a better answer there.
hey so im trying to do a like delay between attacks, but only while the player is in the attackrange box collision; how would i do it without causing an infinite loop and crashing ue
I solve this by using Set Timer By Event. Also the Process Damage event in the screenshot does a bunch of gameplay logic to damage amounts etc... but for your example you can just replace it with the Apply Damage node you already have. @dreamy mountain
i tried to adapt it because the enemy is only damaging the player but it didnt work, is the overlapping actors array you have that important, or am i just being an idiot
@broken wadi
Just replace the array with a single actor, should be fine then. The get overlapping actors node you have isn't necessesary because you already have done that step with the On Begin Overlap.
ah ok
How do you play only one section of a montage? I see there is a "Starting Section" but then it just continues playing my following sections.
i got it working, thanks lawlster
do you also happen to know how to add a delay before triggering a natural heal after the player takes damage?
thats my health system, and it gets called on event tick
its in the player bp
Instead of using tick, on the Event Begin Play setup another Set Timer By Event with 0.5s loop. Then you can call your health regen event. Also you can use a negative number on the Apply Damage node to for healing.
otherwise it's likely to bite your butt considering floating point precision
oh really? thats neat, didnt know that
or use nearly equal -> not
That way you don't have to constantly check the stuff before the delay every frame since you only want to apply a small amount of health 0.5s anyways.
Doesn't appear to be possible so I just tweaked the Animation Segment start/end time and got rid of my sections
Yes it's possible
Loop it
Set the next montage to it self
Is it possible somehow to ensure a constrained component actually attaches to the Physics Constraint location? Everything works perfectly when I set the contrained component at runtime (using a trace) except for one thing, and it's that it leaves this massive gap.
The "Next Section" tag is read-only in the editor. There are functions to set the next tag in BP/code
You go to your montage asset, look at the montage section. Find the section you want to loop, select the tick box and select the section again. The section will have diff color
I do it all the time.
You are not looking at the right place, I'm not talking about abp node
I am in my montage asset, I am able to add sections but they automatically set their next section to the one that follows in the timeline
Again you can modify them
Keep trying or look up on the internet
I can't show you cuz I'm at work and no pc for obvious reason
Just read what was said above again if you lost
Not looking at the right place
The section would be in boxes
Eg mine will look like Default->punch-> dead
Where dead is looped
Selecting the tick box or w.e next to the dead box then selecting the dead section will loop it
oh I see a Montage Section window at the bottom right, let me try toying with that
lol that is a wacky UI. Okay, clicking the stop button and not setting it to itself but clearing it to None worked
thanks!
(looks like a stop button to me lol)
the designer probably struggled for hours on what shape it should be and was like fk i guess a square
Assuming a 2d sidescroller, if I spawn a projectile in a blueprint, how do I properly set its initial velocity? At the moment when I'm facing left the projectile shoots to the right still, due to initial velocity being set to 1000 in the x-axis. If I try and spawn it then set the velocity with the return value from Spawn Actor it doesn't move at all, so I assume I'm missing an extra step, or approaching it entirely wrong... Any suggestions?
x2?
Is that for me sorry?
@tulip karma i misread what you were saying a bit, i feel that you set the velocity but isnt updated correctly
Yeah, that's my feeling, just not sure where atm ha
assuming the projectile actor just spawns and starts moving from some initialization method. is velocity inherent variable in the actor class?
Just found something about deferred spawning that might be what I need
also i would think rotation would matter, maybe just rotate it when you spawn
have not worked with projectiles much but it's a thought
That's not a bad shout, deferred spawn doesn't seem to be available from blueprints anyway so I'll take a look
try to set like 180 in the spawn
Yeah, no idea why I didn't think of that earlier D:
Balls, it rotates the sprite but still shoots right, guessing it's that initialVelocity still D:
is it a normal projectile ? or like mentioned whats going on with the shooting ?
Yeah just an actor blueprint with the Projectile Movement component
Anybody know why this might be happening:
The first montage plays fine, the second one plays, but it never goes to the completed pin, or the blend out... it only goes to the EXC pint (top one)
Anyone know how to disable character movement when crouched?
The issue is, if I use the EXC pin, it does not care how long the animation is and just moves to the next node
Show code? It sounds like you're spawning the projectile with a world space vector rather than one relative to the player.
if I set the blend tree up, it will repeat from the EXC pin, and every time after that it runs fine with no problem
It's getting the initial transform from a socket location so I think you're right there...
with a state machine, and inside the crouch state you turn off movement via the movement component... or.. you can make a root motion animation and use the root motion to control the location
Assuming your character actually changes axis when turning left, you should be able to convert the vector from world space to local space.
I don't have experience with 2D in Unreal though.
This is how it looks ingame
I'll see what I can come up with
so here when you change bullet rotation to the opposite, it only rotates the sprite ?
Yeah exactly
You can try using an Inverse Transform Location node.
How would that work sorry?
any tips with doing using the movement component, i cant make animations or do anything with root motions
Create the state machine in the animBP
from there, create the state (crouch)
in the crouch state... pull the characters current speed and set to 0
so, while they are in that state they will have 0 movement speed
So, it goes from exc pin -> interrupted (no clue why, as I have done nothing with the code at this point) -> back to exc (where it stays and does not go to completed or interrupted agian)
Just to verify, if you turn your character, does the rotation/x-axis change too if you print string it? Or does the socket transform remain the same?
Socket transform stays the same :/ it uses the scale to change the direction the sprite faces
Then that's probably part of the issue, as the projectile will always spawn with the same transform.
Not sure how to solve it though, sorry 😛
Interestingly even if I break the transform apart, set all the rotation values to 180 and then log that out, the rotation is still 0 🤔
You could change the transform location depending on the scale I suppose. So if the scale is -1 or whatever you use to flip it, you can inverse the x-axis when spawning the projectile.
That's exactly what I was attempting 😄 wrong screenshot derp
does the bullet have anything on beginplay that may be making it go that one direction ?
Only the InitialVelocity that's set in the x axis but that's not in beginplay it's part of the projectile movement properties
How does welding components when attaching them work? Having some issues with it.
If I set the initialvelocity to -1000 it always goes left, set it to 0 and it just stays still because there doesn't seem to be a way to set the velocity after spawning
@tulip karma "You need to create a Float var (Ball Speed) in the projectile class. Set it as instance editable and exposed on spawn. Next set its default value to your absolute minimum speed. Save.
Open the construction tab. Drag the projectile movement component (PMC) into the graph. From it drag out and Set Initial Speed and Max Speed. Use your Ball speed as the value.
Now you can dynamically set your ball speed on spawn. The Spawn Actor of Class (your projectile) will now have a "Ball Speed" pin. So calc the speed and pipe that value to the Spawn actor node."
~Rev0verDrive
I'll give that a look in the morning, eyes are starting to dry out now D:
Thanks for the info
Hello again, I have an actor with a component on which holds stats and information and I was wandering is it possible to get the components variables without spawning the actor? This is for a vehicle shop and I want to show the stats like top speed, acceleration, power and more without spawning the vehicle actor similar to Forza. Because I use a component I cannot just get the class defaults but I want to use this component so I can use it with other vehicles like helicopters and bikes.
Use a Data Asset
Would I have to make one for every vehicle
Yeah I believe so. There’s also DataTables which can hold multiple rows
If it’s just values you can prly store them all in there
But if I were to make a change in the actor I would have to also change it in the data asset or table
If you’re making a change in the actor, I’m guessing the actor is spawned by that point
I meant in the editor like changing the top speed to balance a game
Well yeah but you’d only need to change it in one place, provided you make the actor take its values from that storage
Oh ok, I never thought of using it that way. I thought data tables were just to reference data
Thank you
do you have an example of what that would look like? ive only just gotten all my character stuff put together and working properly over the course of a few weeks and many different tutorials
sadly, no. I am an artist by trade and only fiddle. I know how to make things work (in theory) but actual application of doing so... not so much
I have been playing with this damn blend tree for 5 hrs now..lol
something my coder could do in seconds lol
fair enough, i just put the blendspace together instead of my other one which i kept, this project im currently working on is practice for my later project, i just need to figure out how to disable movement when my character is crouched, then i have some more animations to implement
make a crouch state and put this inside there
how to get those to the result node... no clue
but this is how you set the speed 😛
ah mine is a much different look lol
some people like uber complex ones 😛
so... with this setup
you could never go from jump to crouch
or from crouch to jump
without going through idle first
No, and its done like this on purpose
I suppose, depends on the game I guess
in any case, the path doesnt matter
the logic is the same
in crouch start you would put the nodes I showed you
its based off of an older game, battalion wars to be specific
and in Crouch end, you would put the same nodes, but with the normal values you want
This question probably gets asked a lot, but I haven't been able to find anything quite matching what I'm asking specifically.
I have a project where a component will be fired using a projectile and I want there to be different behaviors depending if the thing it hit implements a specific interface. What is the best way to check whether the component being hit is an implementation of that interface? Is there some way I can use casting to tell?
I intend to use the OnComponentHit event unless there is a better one
The node to check if something implement interface is "does implement interface"
You shouldn't really need to cast if you are using interface. That totally defeat the purpose
Would I still need to cast if I then want to call methods from the interface using that object after verifying it?
U gotta make up your mind first if you want to use interface or cast.
Interface is used when you have common function for classes that doesn't share the same base class.
If u are going to use interface, just plugin the object to the interface
Eg hit actor -> interact
No casting needed
When I try to connect the pin it doesn't work
The only way to make it compile is to use a cast
No that's just misunderstanding on your part. Show your bp
That's not interface
If you want to use interface you want to implement the function IN the interface
I'm trying to tell if the object being hit is one that implements the interface, and if it is, call the method it implements
When using soft references, for example, an animation montage.
Prior to playing the animation, I want to load the asset using Async Load Asset, correct?
If so, should I ALWAYS call async load asset or should I check if the soft reference --> reference is valid and only run it if not?
Image A vs Image B vs ??? (Is there another way I should be doing it?)
Then make a function in the interface . I_Grapple
Then in your grapple point bp, implement the I_Grapple function which execute the grapple function
I did that
Then it's just on component hit, hit actor -> I_grapple
Not from the picture no you did not
Sorry, my second image made no sense 😂 This one. #blueprint message
I did
For now I just want it to return true since this is a placeholder
This is in a different class, so I can't use self
You are not even dropping interface node. It's the one with the msg icon. Follow the instruction above
The picture u showed is trying to use grapple succesfuk in your bp grapple not the one derived from interface
In Unreal an "Interface" is a very specific thing.
What you have there is a function that is contained within a class.
To call that function directly, you must have a reference of that particular class or any of its children.
No I have a separate interface that the class from that picture is implementing
Then call the interface not the function that live in your bp grapple
it says right on the node... "Target is..." which indicates its a function.
Is this what you mean?
Now you can plug hit actor or any object to the target
Ok thank you
So you have an object and an interface known as Grapple Point?
I would suggest to prefix your interface with I_
I have an interface called grapplable point and an object that implements it called grapplable cube
It only has the grapple successful method
And I wanted to call that method whenever the grapple hook hit something that implemented that interface
In your grapple cube, override grapple successful, add a branch and on true call what ever function you want
Yeah this is what it looks like now
The does implement interface might be redundant btw depending on the context
Cuz if they don't implement it simply does nothing
It's not because later that branch will also have a completely different thing happening in the false pin
But it's fine to do if u want to filter the code after the interface call
Ahh yeah that's fine then
Yeah this would actually be very bad if it does nothing when it finds that it's not an instance of grapplable point
Soft ref is just a path to asset. You will have to load the actual object if you want to do anything meaningful with it.
Ya, I just mean. Do I need to do the "is valid" and not run through "Async Load" every time it's called, or does it not matter?
It won't be valid unless you load it at some point
Sure, but say I'm using the asset every 10 seconds.
Should I:
a. Check if valid --> Load if not --> Use
b. Load --> Use
I guess to put it another way, is there any harm in calling "Async Load" if the asset is already loaded?
👍 That's how I had hoped but wasn't sure. Thank you
Not sure about doing soft ref on animations tho, felt like micro optimisation
But I also don't know better
Right now the things I put on soft ref are material textures etc
ya, I went a little wild but I'm going to dial it back to things that make sense 😂
Everything that goes to my DT or DA I try to soft ref it. Can't afford any hard ref there
How would you go about loading a soft reference (static mesh) both in the world at runtime but also in the construction script when placed in the world?
Async load doesn't seem to work unless it's in begin play. Load Asset Blocking works but then it won't be async 🤔 Unless i'm misunderstanding
If u gonna load it anyway, there isn't much use to use soft ref. You load things that are on demand. Eg inventory info from data assets or DT
well the reference is stored in a data table
and then used when the actor is spawned
No idea with construction script
My experience is doing very minimal things there
Mostly setting anim leader pose and setting comp ref
Ya not sure the best way to go about doing this 🤔
I want to have a soft reference to the static mesh in the data table, as it could become a pretty big data table over time.
But I also want to be able to put the item that uses the data table into the world in the editor. But Async Load doesn't seem to work for that, so you can't see the item when you place it. Works fine when I hit play.
Hey,
I am having an issue,
Whenever I possess an pawn Why does Possession moves Camera to default position? How to stop it?
Can you one help me out regarding this.
Wait so you're posessing a pawn and the camera's acting weird?
Yes
Is the camera a component of your player class?
No its default unreal camera class.
Oh so it's a separate object?
Try unchecking this in your PlayerController.
Yes its attached to the pawn (i.e my custom vehicle). When character seat inside vehicle I want to set vehicle camera at the position from where the player goes inside vehicle. But as I possesses the vehicle pawn camera goes to the default position
I tried it once the vehicle is possessed it goes to the centre of vehicle
So the camera is inside the vehicle?
Yes, in the hierarchy of vehicle. The camera is placed at back of the vehicle.
Can somebody help me with getting an interp setup? I tried a timeline, I tried a set time by event... i failed all 😛
I dont know why it doesnt interp. The value switch worked
but interp...nope 😦
Interp requires a current and desired value. The current value must be updated each frame.
That is what the FInterp does, no?
It doesn't update any values. It just gives you an output.
so I need to inertp the value with a lerp?
If you don't give it the current value for this frame, then it'll always give you the same value output.
I thought that was the point of the delta time
In your example there, you'd want to plug in GetCurrentFOV into the current value input.
The delta time is just how miuch time has passed since the last frame.
It interpolates how much the value output should be based on that time and the two input values.
Wait so what's the specific problem? Is it going inside the vehicle when you enter it?
I set a defaultFOV (current) at begin play. Which pulls the current FOV
that is 90
TargetFOV is 120
the switch happens, but no interp between the switch
so that is where I am lost. Do I use the timeline and alpha from there?
It needs to be fed a changing value for the current value.
If you don't have a changing value, you'll always get the same value output.
okay, that makes sense, but I have no idea how to do that (primarly an artist here :P)
is that where the set timer by event comes into play?
and then I use the update timer handle (variable I created?)
Interps happen over time.
If you want it to look smooth, you want it running at the frame rate, not necessarily a timer.
so, you are suggesting I put this on tick?
You can use tick or a timeline.
so I had a timeline, but again, I dont know where to put that node or hook that in
here I have added at timline, I will add a track called alpha and that will act as the interp speed
Current: Get Current FOV.
Target: Whatever your desired FOV value is.
Delta Time: Delta Time from Tick or Get World Delta Seconds
Interp Time: how fast you want it to go from current to target.
So long as your "Get Current FOV" is returning the last set value, then it should work ok.
https://forums.unrealengine.com/t/why-does-possess-move-camera-to-pawn/280233 This is the problem that I am having someone has posted on forum but the issue was not answer yet on forum also
I’m really new to UE4 so bear with me. Coming from an Unity background, I’m quite lost. I want to have a Top Down Camera and 2 players that can be controlled locally using the keyboard. I created a new PlayerController and binded the keys to move the players around. In the BeginPlay method, I instantiate 2 players (simple Pawns with a static m...
okay... so I alreayd have this lol
No you don't, at least not that I see.
this pulls the FOV value from the curentFOV
You have "Target FOV" going into Current.
You have "Default FOV" going into Target.
I dunno what you have toing into Interp Speed.
World Delta Seconds is fine.
Target FOV would need to change every frame in order for it to work right.
They do list a workaround at the bottom of that. I'm not sure what else to try
I was thinking same 😅
Is it doing it on tick?
no
Then how is it updating every frame?
I thought that was the point of the timeline
You are setting the FOV of the camera component on the timeline.
That is the only variable you are changing.
You want to get the FOV of the camera and plug that into Current.
Then when the next frame goes, it'll read the new value.
The next frame, new value, etc...
Right now, if you're only setting "Target FOV" once on begin play, then that value doesn't get changed.
I didn't say that.
and from tick, I pull the FOV from the camera
You want to get the FOV of the camera and plug that into Current on the Interp To
You can do this on the timeline.
Hello, I want to take the rotation value of Bonn and control it so that it doesn't go beyond a certain angle. What should I do
Okay, that shift seems pretty small
Really, if you're going to use a timeline, you're probably better off not using an interp and just have a float track with the start and end value you desire.
Otherwise, it could be outputting a 0 to 1 value and you can use that in a lerp instead.
is there a better option? that isnt a timeline
problem with lerps is they are not smooth
finterp to has an ease in and ease out
I guess I could do that with the timeline
You can control that with your own float track.
Make your curve smooth
Make it output 0 to 1
Lerp between those two values based on the track.
so, in theory this should reverse it
lol nope, that went back to being shit lol... damn
Use one connection from the update to your SetCameraFOV.
Whenever you're setting IsSprinting true have it call an event that calls Play (not from start) on the timeline.
Whenever you're setting IsSprinting false, have it call an event that calls Reverse (not from end)
so very close lol
so, the first time I do this, it works
when I press again, it just goes from 90 to 90
reverse was not working at all 😦 So I tried this way. I know its not correct
Use Play From Start
Okay, when I use play from start I get no interp. I just go directly to the target value
Hi if your string of executions / execution line is very, very long, perhaps too long and set to execute during a PreConstruct on a Widget, what would happen? Would the execution get cut off once the widget appears on the screen, or would it just continue to execute? 🙂
this is what I am having happen
Don't use two timelines. A single one needs to handle it otherwise you have two different start and end times.
so I have three values I need to play with here
current (whatever the camera is at now) | target (120) | default (90)
I haven’t had that much luck with FInterp. Timeline is usually used with Lerp
Not interp
lerp sorry 😛
okay, so that worked
but now I need to go from the 120 to the 90
so.. how do I do that?
because current is now 120
so.. if I reverse it, I get nothing
okay, that works for a button press. I can hardcode the values in this case
The "A" and "B" of the lerp, just need to be the default value and the target.
default into A, target into B.
Haven’t heard that one before
thank you for the help
its from stepbrothers. Sorry, boomer/millennial here
okay, well now that is working!!!
Thank you both for the patience and working with me! ❤️
Finterp just works with delta seconds and the speed and the current and target to reach the output of this frame for those values.
So like... You're running at 60FPS, your delta time should be about 0.016.
If you had a current value of 0 and a target value of 1 with an interp speed of 1 , that's an indication that you want to move to the value 1 in 1 second, but you're starting at 0.
The last frame took 0.016 (according to your delta time) so the next frame would need to be (target(1) - current(0)) * interpspeed * delta seconds + current = 0.016 as output.
So long as you store that output and feed it back into the current value, the next one would be (target(1) - current(0.016)) * interpspeed * delta seconds + current = about 0.032
next frame... (1 - 0.032 * 1 * 0.016) + 0.032 = 0.048
etc.. all the way until you reach 1. So long as the current value gets updated each frame, then the math of the finterpto can do its job.
I bow to your knowledge and helpfulness!
I think if I wanted to make the camera aligned with velocity, finterp would probably be the better option
right?
How you are going to align your camera?
you asking me?
Yeah, sorry didn't reply your post.
all good, what do you mean by align?
this is what it looks llike normally
You said you are going to align the camera with velocity?
I meant... the idea would be, the faster I am going the higher the FOV value
the slower I am going the more normal the FOV is
Ah, ok. Yeah, you can use finterp for the FOV interpolation.
this gives a sense of speed and helps to sell the idea of sprinting. With a PostProcess effect this will make it even better
Or, you can make another camera mode like sprinting, then you can switch between two camera mode.
Then interpolating everything between them.
yeah, we have a camera plugin that we did that with. The problem is that its not update for 5.4.1 yet
It is more common way if you have different ones.
we have been busy with making switch triggers for the dungeon, and the boss AI
I just wanted to hack something in before the coder wakes up! 🙂
Ok, then it is enough.
Is there a way to grab the speed of an actor that's being animated with control rig? Or at least a component of it. Calculate component velocity of course returns zero, and the other also returns zero I guess because control rig is what is technically moving.
Is there a way I could compare the actor position from the PREVIOUS tick? I tried the position history one and it also didn't work.
Because posses will make your controller posses the pawn which will use the current active camera.
What do you actually want to do?
You can cache your previous velocity. That way you can get the velocity of previous frame.
Don't know about control rig tho. I only use it for foot ik
can some one explain to me why this is happening and how to fix it? basically the float out of my function has data put into the out pin but there is no data coming out of the function. The strange thing is I have another BP of this thing in the world and it works perfectly...
But I can't get the velocity of any frame. That's the problem. So I'm thinking manually use get position and somehow store that
Yes u can?
You can get your previous velocity
Event tick , get OldVelocity. Print old velocity. Get current velocity (velocity this frame) set old velocity = current velocity
Every tick, your old velocity is the previous frame velocity
But I am saying all these velocity things return zero. Since I think control rig doesn't have velocity. And anything being controlled by it is relative to its parent (the controller) so it's all zero. So no I can't.
So ok yes I could have a variable called old velocity but it would he zero
So I think I need to do it somehow using the actor or a bone position. But I don't know how to store it
What blueprint is trying to do this? Can you not make variables?
Yes I can make variables but I need to get the velocity of a joint and it only returns zero, my assumption is because it's being controlled by control rig so doesn't 'know' it's moving. So that's why I'm thinking to do it with world position
Pass it from anim bp?
If you need example look at how the default tps template pass bool to control rig
This is being animated by hand as a regular control rig
Not sure the connection between getting the last position of a bone with animating by hand via control rig
No connection, but it's not coming through an anim bp
I think best way is getting the joint world location, storing it and then getting it again and comparing it to the new one but I don't know how to store it tbh
Calculate velocity from position history! Get socket location! I think I did it
Only thing is I wonder if I can store the history from the sequencer rather than ticks or live update
Hello, I have attached my camera to my player controller like that
in another blueprint when i get the player controller. how can i retrieve the attached camera?
You are not attaching any camera tho
You are setting the new target to the camera
Nothing to do with attachment here
What are you trying to do? I never have to reach for the camera like that.
Prolly get player camera manager and go from there.
Ye prob get player camera manager get camera. I'm not sure tho
U can always do a test
i'm trying to create a parallax effect. and i need for that to find the camera position
ok thanks i will try the camera manager
yes it's working thanks
In a 2D sidescroller or something? You shouldn't be doing this on the gamethread if so. Should be in your shaders.
it's a 3D game. i just want to put a background just for that. I know it will not be performant but let see the limitation of that approach. If it's not good enough I will try other way
It's more about the simplicity. Moving a UV by the camera position is easy in a shader and "almost" free.
because you understand UV... that's a part the game that is difficult to learn and doesn't seems logic to me, without a good documentation or tutorial. People doesn't really explain how to manipulate and understand those UV 😄
but after test the movement of the backgorund is not smooth so i guess i will have to find how to do your approach
What are you trying to parallax exactly? Context matters quite a bit.
i would like to have several layer of backgorund. And make them move on different speed base on the "distance" from the camera.
To give the illusion of depth on those flat images.
So like a sidescroller? Same Idea but in a 3D game?
If yes. Are the backgrounds 2D or 3D?
How do I send a text from an array in a blueprint to appear in a widget, I have this in the blueprint but dont know how to get it in the widget.
Who makes the widget?
me
I mean what class
How is the widget spawned?
I havent made that part yet
Whatever responding the widget should tell it what to say or tell it what object it should look at to get what to say.
Then the widget can set its own text
yes, but 2D images
i would like to make a simple backgorund like that with different layer of images
the blueprint approach sounds good but CPU is not enough good for that
Which direction is your track? X or Y?
hey guys, i have a variable in a parent actor that i want to set in a child actor from another actor. but when i set the variable of the child in the other actor i cannot access the variables in it. how can i do that?
@barren tangle So UVs are fairly simple. They simply map a 0 to 1 value. 1 to 2 is the same as 0 to 1. 32 to 33 is the same as 0 to 1. If you scale your UVs to use 0 to 2, you'll zoom out and tile once. If you add to your UVs, you'll pan them.
Thankfully there are some easy shader nodes to help with it so you don't have to do everything manually. Panner is one of them that'll help you here. In Image1 if you put Time into a panner's time value it'll just constantly pan the image sideways which gets you close to what you want.
In Image2 we're taking the camera's world X location and feeding it to the panner's time. So when your camera moves long the X axis, this image will pan.
You'll likely need to invert it, and slow it down significantly. But if you do something like this, the background will 'just work'.
but UVs means all pixel of the image? the screen? because. most of the time is an input node. So does it mean we manipulate all pixel of the image? and we try to apply the value that we receive in input? and that value is between 0 and 1 ?
you need to make sure that your variable is accessable, to do that click the check box for "Instance Editable", if you want to have control over the variable when you spawn in the BP then you need to have "Expose on Spawn" checked as well. That should make your variable accessible to other scripts/BP in your game/project. Hope that helps.
Thank you so much. I did that (of course i had to do that) but it is not working
Maybe because i set the variable where i get the child just as a generic actor?
ahh, I think I know what you mean now. Why is it not appearing in your variable list, it wont. Just right click on the BP page and type in the variable name, it should appear in the list.
Not specifically all pixels. UVs are just coordinates. If you put a 1024px texture on the same thing as a 128px texture. Most of the pixels might be the same color due to UV mapping. The 128 scales up or the 1024 scales down and they "relatively" match. One just has more definition so less blurry when close. If zoomed out far enough they look the same.
The reason being is that at 0.5x 0y UV, you're roughly around 64 on the 128px size, and 512 on the 1024px size. It just makes textures relative mostly. And learning to manipulate them lets you move textures around or scale them, without having to do it with other costly means.
No i know that i have to write, but it wasn't appearing even when writing. Not i'm changing the variable types, i think that's where the error is
in your other actor, how do you find the Child Actor?
are you sure you have the child actor? can you acess to its function for example?
i will try to put some different value and see how it react to try to understand it
with a get all actors of class and then getting a random one, but i set the array variable to a generic "actor" now i set it as the parent actor, and i can access it directly
i didn't resolve my problem but at least i got to being able to set the variable. I suspected that before, casting to the parent actor referencin that to the child set in the array before, and setting the variable from there, i was setting the variable for the parent and not the child. Could that be?
Uh... In what world is 3250 / 125 = 0?
if you use a generic actor you have to cast it to the target actor. generic actor doesn't know the type of the parent actor
Ah, exec pin that used it wasn't executed yet so it hadn't run
Kinda stupid question, but why there is not all variables in the Get Class Defaults? There is exception for widgets? I wanted to get the Widget Unit Tooltip straight from class defaults, but seems like I have to first get Actor Of Class and create variable of Actor, and then from Actor I'm able to get it actually?
Hi, I'm currently working on physics hands for VR. I do this with MotionControllerComponent and Physicshandle who grabs a separate actor of a physics hand.
The problem is, because of the way i manage the character, the MotionControllers are inside a SceneComponent which updates on Tick to be in front of the player. but because of it (i think), the PhysicsHandle does not follow the right location. I think it's following the location relative to the parent SceneComponent instead of the Controller world location, but I'm not sure... I tried to change the world to the relative and back, but it was never a right location... Can anyone help?
In the video, the white cube is the Physics Hand and cube with the grid is the Motioncontroller.
The HandPositionFix function runs in the tick and changes the HandOrigin (the parent component of the MotionControlers)
hi! I am trying to create a tooltip widget and make a custom button that will always reference that same tooltip widget. How do I get the Tooltip widget variable that I have created and stored in the HUD from inside of my button?
I can get it with context sensitivity turned off for some reason
But I dont know why.
First thing, there is no way you will need any casts if you are trying to do something like that.
I hoped not, but how? I could get the variable without this.
What is your content of the tooltip? Like what it's based on?
it sbase don the buttons details.
Ok, where are your buttons?
so button already has tooltip information already, just trying to pass that to the tooltip widget
You need to create widget tooltip inside buttons.
So like, create ''base widget tooltip'' with all variables that are coming from Button Reference or what ever.
and then inside button, you create widget base widget tooltip, and pass reference of the button.
and the tooltip with get populated with all the informations from the buttons.
buttons are everywhere. Main Menu, pause menu, credits screen etc... theres a build menu in the game which will use a different tooltip widget if i can get this working for the menus.
It should not be a problem, unless your whole structure is bad
then you have to think about fundamentals
I can show you my example
I was just working on tooltip too
Like, if you have a lot of buttons, and you made them all separately without any like ''base'', then you have problem.
because you have to also manually now create widget inside each of the button
so I shouldnt create the tooltip in the HUD then?... because then id be creating this tooltip widget for all buttons that exist.
Example: I have BP_Unit parent class, that then has like 20 units, doesn't matter
because I create it all in Parent class once
I send there Reference of the unit to the Widget
and then it's all populated in the Widget
Tooltip can be handled by an interface if it makes sense
Does my example clear this question or you still not understand? 😛
so I can show you my next step
because here it get's complicated a little haha
so when the tooltip widget is created, it always gets struct info, in my case button info.
Yes
but seems bad to create widget for each button?
What are you trying to do? I think there might be tooltip built in for the buttons already?
Button should just hold the struct. One tooltip widget, which can have its contents filled from some struct
Or are you trying to make a nice tooltip with a lot of info?
Yeah there already is a bit of tool tip mechanics built in. What should your tooltips look like?
yea trying to upgrade from built in option
My tooltip is a little bit more than just text when I hover over something.
Then in game tooltip build menu will have this with added costs for buildings.
So either have anything you'd need to show a tooltip for inherit from some base class, or have them implement TooltipInterface so they can be queried for the tooltip data
It's kinda like button should not give a shit about what it is in your widget kinda.
Button is just for clicking.
You really need to wrap your head around the data driven way to do this kind of stuff if you want to make something like an RTS.
The tooltip info should be created in the building / unit / resource / character / anything.
I showed you how to create base widget that get's populated with the info of the unit.
so now how I use it
I have another Widget, which is actually a button. It's also created only once, and is taking info from any other unit (so if I have 20 units, doesn't matter, I have one Widget ProduceUnit, and it's beeing feed with the data of each unit, what ever is needed). And since I feed there Unit Reference at the start, I can also access the Widget Tooltip that I created inside that Unit (can be building, resource anything).
and then I have UI Interface that I send to PlayerController (or HUD if you want).
I send that Tooltip Widget info to the PlayerController
and the playercontroller get's that Widget and adds it as a child to the Main UI > Tooltip Box
it's really intuitive once you understand it
i honestly like this blueprints/node style
what is it?
Flat Nodes are free, and then there is Electronic nodes for 10$
both are plugins from marketplace
yes, this one xD
Why do you need to refer to the instance?
probably just get the CDO to get the info
cdo?
class default object
I cannot get Unit Reference or the Widget from Class Defaults, I was even asking for it 1h ago here
well that's what im saying. Depending on what you are doing, you don't need an instance to reffer to. If you are just reading static data, you can just get the default class object from the class
I don't understand
I only have class reference at first and I cannot get Widget as variable from class defaults, so that is why I get Actor of that class in this case
Nvm, I already see you are doing it
Yeah, some things I could getfrom class defaults, but I had problem with the Widget that is in that class. I was asking if it's normal or what i'm missing 😄
but I just got actor of class and made work around
In this case it kind of is, I'm using it here later
and Im not decided yet
if I will get just Unit Reference here and then Get Unit Widget Tooltip
and send just the Widget
or I send Unit Reference and get Widget from that Reference in the playercontroller
not sure which will suit me more, so left two inputs 😛
someone remember how you add "debug keys" editor only on the character controller ?
Im not sure why the Widget is the one showing the UI to the player tho.
What kind of game are you making? If you are just trying to do a mouse over, maybe you can call it from your player controller or else where and just call interface to the widget
I feel like it';s not widget job to set reference to what the player interact with
well anyway, hard to make suggestion from my end. Just hope you work out what ever you are doing.
It's just complicated because there is widget first of the thing that you can produce like Unit Produce
like first I have W_ProduceUnit right xD
and inside that I put that Unit Tooltip
so when you hover on Produce Unit yo uget UnitTooltip showed
and I might want to use that UnitToolBox in the MainUi for other things later, not sure yet
This is best approach I came with myself and it kinda works for me and I think it's scalable
#blueprint message nevermind seems like UE5 only feature
in bp there is a play sound 2d node,but how do i mute the sound?
by volume i know how
is there another way?
What's the point of playing a sound if you are going to mute it?
u can put fingers in your ears and pretend u cant hear it
also Play 2D is fire and forget node, if you need to get a reference to it, use Audio Component
i have a ui with 2 buttons, on and off
those buttons mute and play bg music
what about it, are you not using Sound Classes?
How you gonna play? 🦶😂🤣
no,i just created a cue variable in game instance and 2 functions,then in widget i cast to the game instance and get the functions
i know this is not right
yes, it is not right.
Use sound Classes, you can set the volume and other settings based on classes
it breakes a lot of opp rules
sound cues exist
specifically talking about this one tho
https://docs.unrealengine.com/4.27/en-US/WorkingWithAudio/SoundClasses/
@random pulsar check the link above.
You suppose to group your sounds based on it's class (SFX, UI, Game, BGM, and so on)
that way you can just call a node to collectively set the setting for a specific class.
Im having a real hard time getting rid of these warnings. Ive remade the enums, replaced references fixed the bp's etc etc. 12 hours of messimg around. Theres no duplicates...its driving me insane. The new project I migrate to works...its in the output log of rhe project being migrated from...does it even matter? Readt to lose it...any help is greatly appreciated.
Thanks Cold
is it possible to remove a Enumerator Selecting ingame ?
like if i have a Enum with 5 options can i remove 1 option ingame ?
@random pulsar After you set the sound classes, this is how I set the setting
your button can easily just set the volume of the game to 0 and the BGM to 1
ohh nice,i also found an issue that your setup might solve,the off button didnt turn the music off
well its not like your BG music variable ever been set. You must have get Accesses none error.
Play Sound 2D is fire and forget, it does not return any Object you can refer to.
and there is one more ,when i press the on button multiple times ,there is played the same music a lot of times
how do i solve this one also?
with a boolean ckeck?
you are using Play Sound 2D, it is your source of problem
unable to reference to it, there's nothing you can do to stop it or changing it's setting as it is unreachable.
Use Audio Component
Button Pressed -> Audio Component Stop Sound -> Play Sound
How do you do a folding sword animation? for example sword is divided into 3 parts and its unfolding one part after another.
one way is to animate a static mesh rotation and another way is to do skeletal animation
which way do you prefer?
deff skeletal mesh and do everything in your 3D program
im tryna set a scoreboard up, but i cant change the visibility of the board, idk how to fix it
https://i.vgy.me/J1b2Hq.png
https://i.vgy.me/ULTxx8.png
it just doesnt change it from hidden to visible
try to add it to viewport and remove, dont change visibility
Okay... I just realized that if I won't have Actor of Class in the level, this is not gonna work.
What are other ways to get variable from the class?
or I will just have to use cast?
I know I could put actors somewhere far in the level and it would work, but just curious about most straight approach?
Why do you need a reference to a spawned unit there?
This is a Widget of a Produce Unit Button. I create these from Building (Building holds data, which units it can produce, and the array is of Classes of units).
So in this button I only have Unit Class Reference.
Then this same blueprint, I have logic that on hover/unhover I send info to PlayerController to show Tooltip of the Unit in the UI.
BP_Building
You should be able to pull that off of the class defaults. Why would you need an instance of the class?
I need to get Widget_Unit Tooltip from Unit Reference Class or Unit Reference
Any idea why it's not showing here?
It's in the class, maybe I need to set it to User Widget?
The class for a unit shouldn't hold a whole widget. It should just hold the data required to construct that widget.
We should probably already has. What does the tool tip for A produce unit button show? Presumably a description, some of the unit stats, other stuff, right?
Oh, should I create it just somewhere else? like inside Button Unit?
Yeah
like it works, but only for the units that are in the level
like I have other buildings with other units, and if they werent spawned, then I dont see them because Actor Of Class doesn't work.
Okay, if I understand right. I just have to create that widget
in here
instead of Getting Actor of Class
You shouldn't be getting actors of any class for any of this.
Yeah, hmm
From the building, you should be able to figure out which units the building can create. Given a unit class, you should be able to figure out all the info needed to fill out a tool tip for the create unit button. You don't need to have a created unit to do that.
Like that?
I will expose other things for that widget, this is example of 1 detail.
and then I will just send that widget further
Yup
That's even better
lol, thank you!
really my mind was kinda blown because not everything was working and couldnt find reasons, then I found out it's beacause these actors must be loaded in the level, which is not always good
hello guys, i need a little help, want to reduce the sound timing of my footsteps when in crouch mode, because it hear as if it was walking normally, it's a FPS game and right now i have no animations in the game, these are the blueprints, i hope some one can help me, thanks.
<iframe src="https://blueprintue.com/render/sujzuocw/" scrolling="no" allowfullscreen></iframe>
<iframe src="https://blueprintue.com/render/kbj4hqcs/" scrolling="no" allowfullscreen></iframe>
<iframe src="https://blueprintue.com/render/n4qx3svf/" scrolling="no" allowfullscreen></iframe>
you could artificially slow down the footsteptimeline, by adjusting playrate, based on movementspeed i suppose
well, that will works, i already set the "stop sound effect" when speed is 0
im new with the engine and im trying to add a second parameter, "when walk speed is 300 (crouch mode), play the footsteps more slowly".
my footsteps are at 0.45 each time in the timelime
and when im in crouch more i want it to be at...0.80 more or less.
then, when i get up again, go back to 0.45
just check your walk speed and then change the footstep sound speed
After I open the new level AI stops working properly(AI Move to). If I set navmesh from static to dynamic in project settings, it works inconsistently, and can follow player just to suddenly abort. Also, after I open new level, and press Alt+S, it no longer shows navmesh.
If I start level with ai directly, AI works perfectly. AI is spawned on the level after some time
the walkspeed is ok, i want to slow down the footsteps from my timeline when in crouch more.
why do you use timeline? Can't you just change it with Set node?
i have no idea how to do that, i used a time line because the course im doing right now 🙂
here is Enemy Ai class
what does that look like ?
hey, here are the blueprints i used:
<iframe src="https://blueprintue.com/render/sujzuocw/" scrolling="no" allowfullscreen></iframe>
<iframe src="https://blueprintue.com/render/kbj4hqcs/" scrolling="no" allowfullscreen></iframe>
<iframe src="https://blueprintue.com/render/n4qx3svf/" scrolling="no" allowfullscreen></iframe>
i dont see footsteps timeline
yeah, same
thats probably where you would have to change
oh ok i had to go more right
I want to make sure my audio is finished playing when I click my PLAY button before starting the scene, which node should I use? How can I do?
the footsteps CUE works just fine when walking
now i need to slow down the footsteps sound and play it when in crouch mode.
i would consider another timeline that you run if your crouching
i can do that, but how do i tell the engine to play it when in crouch mode?
i copy the timeline, and modify but how to add that timeline in particular when in crouch mode to play it
thats my problem
you may be able to say if max walk speed = 300 then play the other one
if it's 600 then play the basic walking
or use a boolean for isCrouching
im trying to rotate the first card upside down in my blackjack game but it wont rotate in the correct way even though i have tried all three axis. Where is my mistake?
so it's upside down but not facing the right direction ?
its like in the resident evil game where the opponent wont see the first card like this
yes, this is what i want.
you may be able to say if max walk speed = 300 then play the other one
if it's 600 then play the basic walking
or use a boolean for isCrouching
like in the picture the card should be flipped with back face facing up but i tried all 3 axis but still wont rotate correctly
after the croush timeline?
when you play the sound, check if your are crouching and play the other one if so
What happens if you lose?
when you check if moving, also check if crouching and play the crouch if so, if not play the normal one
let me try...
goodbye fingers
Nice.
[Crossposting this from #cinematics , because it's more of a blueprints problem I suspect.]
Hi guys, I am trying to hide my HUD during LevelSequence playback, using a simple BP function. I know SetVisibility to Collapsed is being called, but it's still visible during playback. Help please.
Does anyone know how i can toggle a image visibilty with a button inside a widget
Guys, I have this PLAY button, currently, for the Menu scene, I have a separate card so "MainMenu", this card contains the base GameMode of Unreal Engine "GameMode".
I have a completely custom GameMode with the game UI and everything, I want when I click the PLAY button it loads my GameMode "BPI_GameMode_MP".
How can I do?
Set the gamemode you want to be after level is opened in the level.
override world settings basically
This did the trick, with the Velocity set to either 1000 or -1000 depending on the direction, thanks again 😄
Don't actually need the set initial speed either
Makes sense too?
Yeah, it's exactly what I thought I needed deferred spawn to do 🤦♂️
I'm stupid! Yes Thx u!
I almost had it like this at one point but I missed exposing the variable on spawn to make the pin appear in Spawn Actor D:
how would i change what needs to be hit for the event anydamage on an enemy? i want a custom non capsule collision hitbox
im using that yellow one instead of the capsule
Even ideas for things to investigate would be good, thanks
maybe on collision call damage actor
and it should trigger
but whats the error ?
Is there anything bound to visibility?
how do you mean bound to?
If it's not that, put a breakpoint on where it hides it and see if the breakpoint gets hit
oh I've never set breakpoints yet, didn't even know you could, in BP
ya learn something every day!
But I know it's being called, from tracewrites
is that snippet from the class settings of a widget?
how do i do that
tried to delegate to it
just didnt compile after disconnecting it
whenever you damage the actor through a node, that event will be called
so just call it on collision, what are you trying to do ? be able to shoot it in that box ?
I mean yes
Show where your attack or weapon adds damage to the thing it hits
just have the capsule not block the projectile and have the other hitbox block it
and voila it'll work
hey guys, I have a questions here that I'm not even sure what keywords should I looking for. I have an asset, every time when I press interact key player should move to its location and press again player will back to the original location
I achieved this function, but I also want the player camera can change to the asset's camera
Like this, what blueprint node should I use?
Set view target with blend
You’re trying to connect it to blend time there
Show the entire error
The mouse moved when I made the screenshot
ok I tried to make it work, now it looks like this
Ok don’t just connect things at random lol
ok, do you have suggestions? I just try to make it work by my interpretation
destroy after you apply damage
wait you mean the camera itself?
I will try this method, thanks
@frosty heron can you tell me please where do you right the logic for audio settings?I write it in game instance
It says Read Only. Is it an interface function or something?
its a widget and i followed a tutorial,but there is 4th version of unreal
i have 5.3
that should have nothing to do with it
Project Files : https://www.patreon.com/posts/51131533
Last time in unreal engine survival series, we implemented audio settings UI/widgets which includes sliders to change volume in different sound classes and other audio related settings such as audio language selection and subtitle settings. Today we are going to create sound classes for each...
Lol, I've seen that guy's crap before. I'd steer clear
He should rename his channel to CodeLikeMeCauseIGotNoIdeaWhatImDoing
i dont like him also
ok, where did you get this function from and what type of widget is this slider thing
but i dont find other tuts
Is your slider isVariable checkbox checked?
its a widget with a slider,i plan this to be the music slider
yeah
so why are you using a dispatcher, what are you trying to do with it
man,no idea,follow the tutorial
I don't have time to watch crappy tutorials. You don't know what you're trying to achieve?
he creates a input variable in dispatcher and connects it withthe slider event
k, no idea why he's doing this, but here, if you want to make that happen
did you bind this dispatcher anywhere?
not yet
in the widget?
ideally, wherever this dispatcher is supposed to be bound
guessing it's either in the widget or some parent class
but for now you can create it in the widget itself if need be
this is just to show you how signatures work
now click on your onValueChanged dispatcher in the left panel
Click Copy signature from and select the MasterVolume event
make sure you've compiled first
thx
it worked
how? which collision preset do i set each to
Do you know how the collision settings work?
@dreamy mountainhttps://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/Physics/Collision/Overview/
Having some trouble with crouching, and not sure on the best way to resolve it, if I don't change the capsule size when crouching the sprite is in the correct position when I crouch, if I reduce the capsule size - which for collision purposes is what I'm after - the sprite clips into the floor, I guess I need to offset the sprite somehow so that the sprite remains in the same position it does with the unchanged capsule?
yes
Is there an easy-ish way to achieve that? So many different options D:
Could just author sprites so the pivot is at the center
Ohhh, I forget why they weren't to begin with now tbh, I'll take a look, cheers 🙂
set view target with blend
I have an actor component that is created and destroyed at runtime, that needs to get a reference to a specific actor in my level. The actor component is added to my player character.
The specific actor will always exist in the level, and only one of them.
What's the best way to handle this?
Just GetActorOfClass it, IMO.
Nothing wrong with a GetActorOfClass to do this.
Any performance overhead? I'm making a tower defence which will have a bunch of actors
idk if unreal does some pre-filtering magic or if it brute force gets everything
That's not how that works.
that's one of the rare cases where get actor of class is fine to use
it's oneshot, so i wouldn't care about 1ms vs 0.4ms
I believe it uses a hashmap for lookup. If you have tons of actors, then I wouldn't necessarily set a reference to conserve memory usage unless you plan on using it extremely frequently (like on tick).
LOL
i think it just iterates over all actors
It does not.
If you create three instances of some classes. One is an Actor. One is a Pawn. One is a Character.
Unreal puts each of these instances in a bucket for every one of it's parent classes. So with these three classes. You have three buckets. Actor, Pawn and Character.
However, Actor has three instances. Pawn has two instances and Character only has one.
This is because Character is a Character, a Pawn and an Actor.
Pawn is a Pawn and an Actor.
And Actor is an Actor.
So when you ask for a Pawn. It goes directly to the Pawn bucket and dumps that list into an array of two to return to you.
Oh cool, so in this case get all actors of class sounds incredibly efficent for my usecase
Largely there's not really any overhead of GetActorOfClass. GetAllActorsOfClass "CAN" be bad if you're returning an array of hundreds, but that's mostly the array allocation more than anything.
apparently i mixed it up with GetAllActorsWithInterface
which iterates over all actors
hey
looking for some deeper insight on how to best manage sound for character
eg pairing sounds to discrete behaviors
ex i have a charging enemy that plays a sound for that charge
what are some best practices for managing sounds like that
preserving audio components vs respawning and destroying them?
when should i think about a higher level sound manager component etc?
realized i'[m just defaulting to managing each possible sound in parallel and that feels sub-optimal
--can't really find any resources on this subject
Yeah. Anything that doesn't have a Class input is bad.
yea, same for Tags
Are you using GAS?
no
how can i make sure a UMG is not overlapping Other UMGS ?
another widget laying them out
i have this issue wherea a widget is overlapping another widget even if i change the Z order
is there some other settings for that ?
Oof. Well. Normally you'd have something similar to a Cue that GAS uses. This manages your visuals for an ability or effect. Spawns and maintains particles, plays sounds, sets material parameters, etc.
EG if your charge was an ability, you would simply create a cue when starting it and end that cue when it was done. Can also do it by applying a GE too, less manual that way, and probably useful to add more tags and stuff. But either way one way or the other the starting of this ability creates that Cue. This replicates for multiplayer so it also works on clients. And that cue's beginplay or init sets up the visuals/sounds. Like starting to play a charge effect or binding to the character's animBP for footsteps to play a different larger thudding sound. When the ability ends, the cue dies, unbinding things, killing particles and stopping sounds.
Character doesn't have to know about these sounds, particles, or anything. It's all about the cue. So that same character can just be used anywhere regardless of abilities it has and doesn't have to keep a lot of stuff softreffed or loaded.
@jolly oriole
ZOrder only works in the same panel. There is n opglobal ZOrder
can anyone help me with debugging what is happening with my blueprint i am trying to make a keypad that when i want i can make the code random and it doesn't seen to want to work properly i am transferring over from unity and don't understand the blueprints too much
i am using horrorengine as a base and it is blueprints which i am not use to
the pics show where i am getting the leads from and the blueprint min is 0 max is 9 if that helps
Are you just adding the randomly generated values and not multiplying them to match their digit?
should be just adding
Like here... if it chose 5 2 4 6 for the random numbers, the value would be 17.
But then you're checking the player's input for 5 2 4 6 would be 5246
just generate one random number between 0 - 9999 and padfill
also you really want them to test out 10.000 combinations?
thanks i am just not use to blueprints because i copied it from the base on the other
no i will have it around my map just one number at a time just want it randomized though
Use array
thx just needed a second pair of eyes
I'm having trouble with a mediaplayer component... Here's a graph of the widget that gets a reference to a mediaplayer from an actor to create autio controls: https://blueprintue.com/blueprint/ymaazoba/
The player skips every other track. If I have tracks 1 to 5, the player will play 1-3-5. Or 2-4-6, or 3-5, etc.
If I switch the tracks manually with Previous and Next functions, all of them play. But autoplay only ever plays every other one.
I'm losing my mind because there's nothing whatsoever that could cause it
I'm having a problem where I have a projectile component with an initial velocity set to 700, but when I actually spawn the actor, it refuses to move no matter what I try
Is there any reason that would be happening?
I need some one who is good with box extent math. I am 90% sure this is right and should work but once I moved my box to a new place the enemies can consistently spawn out side my box even though they should not be able to get within 1000units of it when spawning. https://blueprintue.com/blueprint/hrle1oeq/
white circle and red circle position itself to the enemy actors position in screenspace
but it doesnt quite work
is there some sort of parallel node, or split node, which takes one execution path and outputs two
id rather not have to drag out from the tail end of the previous thread
i guess i can make that a function
Hey folks, I'm attempted to have props be clickable in my project. I was avle to have them clickable and print a string under the top down game mode - but my process doesn't work in the third person. Any advice?
How do you get the UPlayerInput object for an APlayerController? It has a property for it but its not exposed to blueprints for some reason
did you enable click events in your player controller ?
aaah the 3rd person template didn't include the player controller, i'll port it over from the top down see how that goes
you should be able to just make a blank one
and set it in there
unless you put code in there
then you'll have to copy that over
no code at all, there was some blueprints for movement but i didn't have movement enables any how
just create a blank one, and set it in the override
the third person template definitely contains a player controller.
then you can enable click events
enabled... still nothin'. Maybe i should stop trying to pull these long sessions 'cause it's the easy stuff i'm forgettin' here
that's what i was thinkin'! I knew i wasn't losing my mind, but the content browser refuses to believe it's there
Question:
So I'm making a game where only in one level I'm utilizing a grid object I've made. I want to be able to utilize the information from the grid from outside it, so I have it being defined in the game mode itself so I can point to it when I need to.
If I run this on levels without the grid, it'd cause problems since I'd be trying to set the Grid variable to something that doesn't exist. So, how could I add a check between the Get All Actors of Class and the Set Grid to make sure it actually found something before trying to set it? I think I need to add a branch, but I'm not sure what I would need to set the condition to check for.
ohp, got it!
its not in the content browser, its attached to the character as "character move component"
aaaaah, but then is a seperate blueprint in top down?
hello, how to make minimize button from blueprint?
they might have done something different for the top down template, i'm not sure.
fair nuff, but preciate the free knowledge!
i always just use the third person template as my base.
check if actor exists?
seems to be the most "complete"
try "is valid ?"
I have an issue where in UE 5 where my ai character will only T pose instead of usning blend space animation. Ive been following leaf branch games RPG series and have been stuck on this for several days. I looked at a fix for this and use acceleration for paths was already checked by default. How can I fix this?
https://youtu.be/soyBFtFFsNE
In this episode we go through how to fix your AI using UE5 mannequin to play animations when moving instead of having its animation idle sliding around in Unreal Engine 5.
Join the Discord server here: https://discord.gg/zBeebU7uv3
Support the work of LeafBranchGames on Patreon here: https://www.patreon.com/LeafBranchGames