#blueprint
1 messages · Page 237 of 1
Am I understanding this correctly:
The player/object can travel on the spline, Point A and B are points on the spline. You want to find the shortest distance to get from point a to b? The spline can loop
Yes, and for the object to be able to go past the spline length and loop again if it needed to. For instance 0 to 720 in terms of degrees
ok here is some pseudocode:
float SplineLength
float A (Distance of PointA along spline).
float B (Distance of PointB along spline).
//Option 1. Clockwise
float Distance1=B-A
//Option 2. Counter Clockwise
float Distance2= SplineLength-B+A.
float Shortest=min(Distance1,Distance2)
right, that part is already sorted by the existing code. I dont have to explicityly get the min. I guess because it doesnt loop by nature, so when A is 180 and B is 90 it doesnt go to 360 then to 90 it just goes 180 -> 90
so it's picking the shortest path already. The problem is moreso not being able to move over the 0 point. so in the 25 to 260 example it goes linearly from 25 → 360 rather than 360 ← 25
hm my code presumes that a<b.
a>b might cause problems
for example, a = 260, b=25.
distance1=-235
distance2=595
its a problem I've been interested in solving for a while now. It sounds plausible but at the same time unreal doesnt lend itself well to the issue
IF a>b then..
else
yea
or you can just set the smaller number to a, and the bigger one to b
I also cant reverse the spline or set any sort of direction, its very strange
thats prob the easiest
local_b = a > b ? a : b;
local_a = a > b ? b : a;
does condition ? true : false exist in cpp? or is it only a java thing
it does
oh
im a bit confused about what the issue above really is tho
"move over the 0 point" , I'm unsure how to interpret that
Me too, at first.
Here is my guess.
The player/object can travel on the spline, Point A and B are points on the spline, the player can teleport from spline end to spline start and vice versa. You want to find the shortest distance to get from point a to b.
if the spline can be anything but circular you'd need to check both distances
like you did
if A > B
distForward = GetDistanceAtPoint(A) - GetDistanceAtPoint(B)
distReverse = GetdistanceAtPoint(B) + (SplineLength - GetDistanceAtPoint(A)
else
distForward = GetDistanceAtPoint(B) - GetDistanceAtPoint(A)
distReverse = GetDistanceAtPoint(A) + (SplineLength - GetDistanceAtPoint(B)
I think this would be correct
assuming teleport from Start<->End
seems the A,B swap would do the trick afterall
good evening all.
- i have 2 character actors, one parent and one child.
- for the parent actor, I gave him directional hits and it works wonderfully. Once I compiled my parent, i compiled my child as well.
- i think im missing some information, but it doesn't appear that my child actor has inherited any of the new damage code that i gave the parent today.
- i deleted the child from the map and threw him back in there.
- i am using 'event point damage'
is damage an inheritable feature?
thank you for responding so quickly!
i dont have any code in the child that i am calling. doesnt it populate automatically?
i apologize for my ignorance on the matter. i am very new to this
it inherits the code from the parent, as long as you dont override the events in the child
if you override the events, you'd need to also call the parent function. This would allow you to extend the parent code
otherwise, leaving child with nothing, simply inherits parent code
hm. i will try making a new child and see if anything happens
Parent :
- Has Damage event functionality
Child1
- Has no new code what so ever.
- Correctly Inherits parent Damage functionality
Child2
- Has the Damage event in the event graph, with the regular damage calc.
- Replaces Parent functionality and puts in place it's own
Child3
- Has the damage event in the event graph, with a call to parent node along with some custom VFX/SFX.
- Extends Parent functionality
(assuming you're using the damage event. It's true for whatever event you're using ofcourse)
i think the reason why my hit reactions arent working is that the tutorial im using is using both UE4 and UE5 animations. the child is using UE4 Manny and i dont think that my UE5 anims are compatible. im checking.
that could definetly be an issue
but you'd solve that by allowing the child to override the hit reaction animations
so, make them variables 😄
i most certainly did. thank you for your help. just this conversation helped me get unstuck mentally
yep! it was the incompatible animations that were the problem!!!
I have a new question and its the last bug that i have, which is awesome.
in my child actor that is working really well right now.
- when his HP = 0, he ragdolls, 4 seconds of time passes, then I am calling, 'destroy actor,' which works perfectly
- the issue that i am having is that he is wearing armor. when his HP = 0, he enters into a dead state. Once dead, i give a 4s delay and then destroy actor.
-- but for whatever reason, it will not delete my Spawn Actor class where my armor is stored.
-- I did a test that when i set a bool of 'HP= 0, then destroy actor' it still wont destroy my Spawn Actor, which is silly.
No code suggests how you handle destroying them
All actors got on destroyed delegate tho
So equipment could just bind to instigators on destroyed ?
Or owners*
Beginplay -> GetOwner()->BindToOnDestroyed
I apologize, i was working out my next screenshot
Is code just for testing or what?
Seem strange to check for hp right after you spawn them
Also
Delay in loop doesnt work
Only the first delay will activate, and the last index being used to destroy
You want to delay -> foreachloop -> destroy
If you want to destroy an array of things
yes, i am testing out how my player would respond to damage.
so i made a child of my player.
you gave me an idea. i will try and write some custom events on destorying actors
Id just let the equipment bind to owner really
It would just work™️ for players and AI
Hi, I can't remember if it was always like this, but often (though not always), when I use CTRL+D (the shortcut for duplicating) in a blueprint that hasn't been compiled, it doesn't actually duplicate the selected nodes. Instead, I just see a kind of weird refresh effect which does nothing. Anyone know if it's normal or if there is a fix for it?
Try searching for "ctrl+d" in editor preferences?
IsNearlyEqual
Searching for CTRL+D doesn’t return anything useful. I'm using Unreal 5.2.1 Source and 5.3, and both versions have this issue.
is your duplicate node hotkey set to ctrl+d?
Yes, it works as intended right after compiling the Blueprint. However, after some time, when I use CTRL+D, it only triggers a weird refresh effect without duplicating the nodes. Other shortcuts still work normally during this time. I suspect it might have something to do with using two monitors (laptop + external monitor), but I'm not sure.
- I don't think monitors are the issue?
- How long is "some time", minutes? After a few new editor sessions?
- Are you using any related plugins.
It's quite random and happens on the same blueprint window,
I don't have plugin related to managing blueprint or anything close.
ctrl c then ctrl v works?
Yes
uh then there could be a lot of reasons. why not use ctrl c ctrl v instead?
Duplicate is just so much faster, but either way, it's only a minor annoyance at most.
I'm running into a really, really, annoying problem with replication on the stock character and character movement components. I'm just trying to set the rotation of the skeletal mesh on the character (separately from the controller or pawn rotation), and it's just not working even though technically it should be. The rep notify for the rotation change is firing and the rotation change variable is correct (printed it out to debug) but the actual relative rotation setting function does not appear to want to work. It's not inheriting any rotation from parents, and it works on the host, just not the clients.
Any help would be appreciated. Even if it's just to say that this is a limitation with the character class, that's fine.
Hey folks
I'm trying to handle some collision settings so that I actually get a hit when I do a "Box Trace By Channel".
I have a specific channel and set the collision setting to "Block". This works fine for a simply cube I place in the level.
However this is for instanced meshes. What do I need to do in order to make that work as well?
(I add all these instanced meshes via a Construction script)
change "collision enabled"? You've set "Collision enabled" to no collision
You can just set the collision response on the instance component. All instances added to the component will use the same collision settings. (Assuming collision is enabled for the static mesh instance component)
I think I have already done that already. Here are the current settings on the instance component:
Thats looks fine, does the mesh you set for the instance component have collision setup on it?
Not a 100% sure what you are asking so maybe not.
find the static mesh in the content browser, open it up and then click show > simple collision.
nothing
because it has 0 collision primitives
but uses complex collision as simple (so mesh geometry is used as collision)
maybe not a safe bet for instanced meshes? 🤷
try setting collision complexity to something other than "Use complex collision as simple"?
if no one here knows it for sure, just try to add a simple collision (e.g. box collision) and set the collision settings back to default
if collision for the instances works you know what's up...
tho with that shape, i guess you want kinda precise collision with a hole in it, which is a pita with primitives since you need a lot of them
Add it to the Static Mesh itself somehow you mean?
I actually prefer a simple collision setting. It should only block building placement (actor placement). Not movement.
yes, in the main menu of the mesh viewer (last screenshot) there's a option to add a box collision
which you should then see (assuming simple collision is still checked in the view settings)
you'll most likely still have to change the collision setting in the details to default, and/or figure out a way how to toggle it for placement
But if I set it to default and my custom trace channel ("Track") is set to ignore, that would be the case here as well right?
Feel like I have to specifically set that channel to Block. And therefore can't use "Default" Collision Presets?
The collision preset would be defined on the instance static mesh component not the static mesh. As a reminder, the static mesh and the component are different. The static mesh contains all the vert, normal, collision and material data. (To name a few) while the component is what takes that data and handles the rendering of it.
You can define default collision channel behaviour in the static mesh but that can be override by the component using it.
by default i mean the setting which currently is set to complex as simple
i don't have UE open right now, might be named different collision complexity or smth like that?! :>
This?
Don't even see a collision setting unless I'm way off 😄
Collision/CollisionComplexity
no
it's still set to complex as simple
you want project default or simple and complex
Okay
That worked after restarting Editor. Seems a bit buggy. Might just be me not understanding something.
Big thanks though. 🙏
Hey there. Noob question: i have a actor blueprint called bp_weapon with a float named damage. I also have a gameplay ability called ga_melee. The GA should now access the damage variable from the weapon to set the gameplayeffect by caller. How can i access this variable in the GA? I thougt about blueprint Interfaces, but i always get knots in my brain by understanding how those interfaces work. Inputs, Outputs, Messages, Events, etc. How would a simple implementation of getting a variable from another actor look like? I watched lots of videos but i can't get through it :/
Watch pinned video on bp comms to understand how to use them. To access another actor, you need to a ref to that actor, which you can usually get through interaction, tho there are other ways
GAS might have some other rules tho, #gameplay-ability-system if you need more help on that
Thank you, where can i find this Video? I will also try it in the GAS Channel.
hey I want to implement killing enemy which spawns souls like vfx that tracks player once it touches player it gives us some currency (e.g souls)
what's the approch and how does that VFX tracking work
Sorry I keep popping up here with the same issue - pretty sure this is my 3rd attempt to ask for help, but all my other sources have been just as lost as me on this. Everything I try feels like one step forward and two steps back.
I'm trying to create a function that will accurately transform world position to screen position without using the current player camera. Right now I've got as far as mostly understanding the Matrix translation, and the odd thing is it accurately tracks the Y but not the X position!
I've added a second widget using the default node just to test the accuracy, and that's working, so it's something about the way I calculate things.
If I plug the "Viewport Size" value directly into the Screen Position, then it correctly places the "X" marker right in the bottom-right corner, which tells me the Viewport Size is accurately read ... the only thing I can think is there's something in the Matrix calculation that needs to change.
I know when I was doing this via trigonometry before, I had to calculate the X and Y separately because the FOV is Horizontal - not sure if that's a clue as to why it's not working? Maybe the Matrix only works directly for the vertical and I have to do something with aspect ratio to correct the X? But at this point I'll just be stabbing values in and crossing my fingers, I'd really appreciate if someone has an explanation!
IF the bools are meant to be exclusive they shouldn't be bools, should be an enum
Why can't you use the project world to screen node?
I have a larger project where I have a working "photography" system where I used the Project node to mark/score tagged items that you've photographed.
https://x.com/alanjack/status/1836772327981224197
The problem is I want the player to hold an actual camera, and for the picture to be taken and scored from THAT camera's perspective. Again, I have that camera mechanic working just fine but I can't project the location of what is photographed to the photo because the Project node always assumes you're using the player camera.
It looks like it's working in that link, but the projection isn't accurate because it's still coming from the player camera ... and once I switch to "selfie mode" it's completely broken
sounds like just modifying project world would be easier
sorta looks like it doesnt really care about the camera but rather the viewport
Right, but it has to use a camera of some kind to derive the matrix from translating the location, otherwise it would have no frame of reference. I'm assuming since it takes a player reference it's pulling the camera from the player view.
I did go down the road of trying to hack it by switching the player view target but the only applicable node (set view target) assumes its okay to take at least one frame to switch over.
And yes, it would be easier to switch to C++ and extend the node but that's kinda why I'm in this channel and not the programming one, I'd rather figure out why this isn't working.
no delays if transition time is set to 0
atleast, this is not the reason for the delay
viewport might not be updated utnill the next frame tho
GetViewPoint does seem to use some cached data if the PCM exist
you could try and change the tick group for the camera manager playercontroller
There's an internal "UpdateCamera" function that seem to update the cache
Actually, it's called from the PlayerController now that im looking at it
void APlayerController::UpdateCameraManager(float DeltaSeconds)
{
if (PlayerCameraManager != NULL)
{
PlayerCameraManager->UpdateCamera(DeltaSeconds);
}
}
Is your end goal to have a Screen Space 2d vector of a 3d World vector?
Yeah, basically I need an accurate screen position because if I make sure the viewport and the photo being taken are the same size, I can use the various screen positions I get to effectively "score" the photo.
I had this working just fine with the straight player camera but unfortunately I need to project from a camera that the player is holding - specifically so the player can take "selfies" as part of the gameplay.
Does the person sitting behind the screen always see through the lens of the camera?
Nope. They're looking at a screen on a cameraphone object. The player having to hold the phone in their view is part of the challenge of the game.
Does anyone know how I could make a BP (a puzzle) destroy an invisible wall actor in the level when completed?
Maybe you can use event dispatchers in level blueprint and call destroy actor node 🤔
Like from level blueprint, u can send these actors references and when needed, u can destroy via character or controller too .. btw, that wall actor is also bp actor right?
GetActorWithTag - GameplayMessageRouter - Hard linked reference
many roads to rome
the hard linked reference might be the easiest, assuming the BP and wall is spawned at editor time
Thanks guys!
How to create this dropdown menu with the editor utility widget?
https://gyazo.com/4aaa303aff86c5d45e2a639d437d5f3e googling this doesnt give me much. it's in a control rig blueprint.
Anyone know when it comes to a screen space widget thats sits in world how I can stop it resizing based on distance from it to player ??
at the moment it's resizing and I'm not wanting it to do so but I prefer the benifits of screen space where it's infront of everything when visiable
you mean its not resizing , and you want it to
as per default its a fixed size screen space widget
other way around
it is resizing but I don't want it to
so thats what it's doing but I dont want that sizing it's doing
is there not a way to force it to remain a certain size ?
like it would be if it was in world space but obvs I prefer screens space as it's on top of everything doing that where as world space it wouldn't be
You're wrong. Its not resizing. Thats why they retain their screen size
Being screen space you want them to resize
So they become smaller the further away you go
ohh in that case yeah I need it to resize
apologise on that one
guessing I would have to implement logic to do that ??
Hey peeps,
Yesterday I posted asking about how I can get the distance between the mouse cursor and a widget. Someone did try and help but sadly their method they showed me didn't work. I'm trying to get it so if the cursor is x distance or closer, it affects the opacity of the button in the widget. Is anyone able to help at all? It would be really appreciated.
Can someone give me a general concept to how to make a mesh crushed/flattened (like a big boulder rolled over them)
how can change projectile speed in runtime and dynamic...?
Anyone know at all how I would resize the screen space widget so it's fixed at a certain size regardless how close or far player is away ??
I'm doing a moving platform, how to make it move up after activatrion (from blueprint)? towards a direction for a certain duration, retriggering will refresh the duration and then slowly returns to the starting place?
like a infinite runner game ?
i'm sorry for asking this but if i'm having some trouble with some Blueprint code where can I go to request help?
Here
i.. really should of read that first before panicking
I wanted to ask about THIS, I think it's blueprint related since it's the only code I have but the problem I'm havin here for my little project is that the enemies bar doesn't go down till, I assume, it reaches 100 and then begins to update
can't you just start out the enemy health by 100 ? or using timers that whenever health reduces, timer starts to fill health ?
It's health is set to 100 I believe, I'm unsure about timers as it's my first time hearing about those
I begun unreal last month for the first time ever
oh, can you say what it means like, it reaches 100 and then begins to update ?
gotcha!
I kinda just did a bit of stupid maths mistake and I fixed it.. my division node had the wrong numbers
i had 150, not 100
Does anyone know how to have a chooser table as a variable so that it can be set/updated per instance?
So I don't seem to have Primary Data Asset ??
I'm trying to do it so I have a data asset which has inside a struct for terminal log entrys that I can have for my terminals in game, Reason I want to use data asset as it'll be easier and better as then everything that needs them specific logs can use the same data asset however i can't seem to find it
nevermind found it
Chooser table?
It's an experimental feature. You can setup condition columns and it'll run checks from the table and return the relevant row.
I don't think you can do what I'm trying to do though. Whilst you can have a chooser table variable, you can't seem to 'evaluate' it. :/
lol. I believe they were origianlly designed for inside anim BP's.
Hello I am using a Widget Component and I notice a quality difference between the 'Screen' and 'World' space types. The issue is that I want to use it as 'World' space, but in the game, the widget appears blurry and not sharp. I've tried many solutions, but I haven't been able to fix it. How can I resolve this.
What is the best way to do billboarded grass for a top down game? should I just slap a bunch of widgets or does a material make more sense? I dont need it to fce camera all the time just a specific direction
DataTableRowHandle
gonna need some c++ for that im affraid
Guess I'd look into the tablerow picker, which kinda does this already
how about just using gameplaytags?
as row names ?
while it doesnt directly go from your filter , you can have neat , searchable nested names
you'd need to filter the list before pushing the slate dropdown
deep dive into the engine is the way to go, I think
Nvm, that wasnt it
people prefer using existing stuff i.g , unless their in some corp, where engineers just make it for you if its valuable
wild guess lol
hm ive got a few animations where when i put on root motion the character can still run aroun while doing them :/ ?
anyone got any info on this
yeah i have
when i enable it it still abels the character to move while :/
yeah
well nah, i have 4x chars on 3 of them it works on the 4th one it dosent
sec il lshow u
oh wait fixed it..
i had wron physic asset on the char
classic
solved that also lol
your helping out alot today
As is, my inputs control Up and Down and left and Right. Though i want also the diagonals.
How do i set input to move in the diagonal. So basically when you press W+A it should move in this direction ↖️
W+D should move in this direction ↗️
S+D ↘️
A+S↙️
How do i do this the official way? I was thinking checking if key is down when input in the controller. Though maybe there is a better way?
There’s no “official way”, but in 5.0+ we use enhanced input
Hello all! Im trying to make my screw driver rotate from 0 to 360 in the Pitch axis, essentially doing a full pitch rotation, however, when printing the value to make sure its working, it weirdly, in quarters goes from 0 to 90, then from 90 to 0, then 0 to -90 and vice versa, instead of just doing 0 to 360. I was wondering if anyone could maybe point me in the right direction in what Ive done wrong here :)
If I pass a DamageType Variable in a widget blueprint by expose onspawn is it possible to switch on DamageType or select? (Trying to change color based on the damage type but cant use this as the wildcard) should i just add the color as a variable on the damage type?
i think there's an add relative rotation node
rotators are prone to gimbal lock at some point
currently this code gives me a fifty/fifty on the actor being turned the right way any improvements to make it one percent? I just want the charater to teleport in front of and face toward the player
idk what that is
you are ignoring the actors forward vectors
also you are using their old location to calculate the rotation
ah that makes sense
also i assume i should just keep this without multiplying
that part is fine to determine the target location
however i'm not sure about the lookAtRotation part
oh i meant for finding the rotation
it works perfect now thanks for the help!
Can anyone help me understand what is an object reference is? This might sound simple, but it is a fairly deep quesiton, so please answer if you are experienced with programming. Coming from c++. I always thought OR(Object reference) as a pointer, pointing to chunk of memory on the heap. So I let say I have an OR, A and B pointing to the same memory space. If I call destoryActor(A), both A, and B should be invalid, but I found out that is not the case, anyone can explain how OR work. Been using them for years but never really think about it until now.
If both variable A and B are a reference to a certain actor(In the world). DestoryActor(A) should work, unless A isn't an actor
For a blueprint Actor's object reference, the cpp equivelent would be "AActor* foo"
Object "references" in BP are actually pointers
references however in BP have diamond shaped pins (instead of the round ones)
Hey for some reason i cant find a target for my variable
its like its not compatible with my third person whenever i try to connect for some reason why is this happening?
Question about timers. I have 5 pistons, 1st, has 0.2 delay, next has 0.4 delay and so on. They are not synced up the way once would expect at lower frame rates. How would you fix this
i would use one timer (with the shortest duration, and trigger all pistons from there)
Gotcha, i'll give that a shot
That would work, yes
anyone know why my enemy is just standing there, he wont move
what was that camera swapping node again?
set view target with blend, ty @gentle urchin
I've got a GameMaker code pattern I'm trying to use in Blueprints :o essentially, I'm trying to make a simple state machine, but I'm not entirely sure how to go about it...
Basically, with this I can really quickly set up code to play when states transition, or during them, and when the states run during an object's Step/Tick event
just by defining 'State_Menu = new State(); State_Menu.update = function(){//code}'
but I feel a bit disoriented looking at Blueprints-- I'm not sure about the timing of different events, especially when I set my player object to take input from the Game Mode to move, and I don't know exactly when the movement is decided and executed upon... and I don't know how to set up something like the above, unless I do something like set up an entire component for each individual state??
A lot of things I do in Unreal just seem to work without me understanding the logic or timing behind them, so I have no idea where to put things
Do I make input events, and then check to see if the player's in the appropriate state to respond to those inputs in those events? Or do I run state code in Tick, detect input in each individual state, and respond there?
I've never personally used WWise, but from the few things I looked up, they call PostEvent to play a specific sound. And you should pass Self as the Actor when you do.
What are you trying to do exactly? What do you need the state machine for? How does this apply to inputs? It's hard to help simply translate without context.
Not without more information as to what you've done. Presuming that is a Character, does it have an AI Controller possessing it? Do you have a navmesh around it? Is it running a behavior tree or any sort of movement code?
Say that I have a character who can be in the following states: idle, walk, dash, casting, attacking, and attack recovery
If I want the player to do a different attack while dashing, or be able to cast right out of attack recovery but not during the attack, then I need to be able to change how the player object receives inputs in each of those states
Rather than just putting a switch node after each input node, and hoping concurrent inputs or events are executing in the right order so as to not break anything, I was thinking of simply executing a 'run state' function in the Tick event which handles all possible inputs for that state so I can have full control over what the player is doing
Obviously I would also need to change how the player moves for each state-- idle would be no movement, walking would be typical, dash would be in a single direction without the ability to change direction, etc
like, for a crude example:
StateWalk.update = function(){
if input_check_pressed("Dash")
{
state_machine.swap(State_Dash);
}
}
And then the next step would play State_Dash's update function instead
Sounds like you need GAS. Or similar. You don't need crazy switches. For example with your attack thing and casting thing. If you have a special attack while dashing, then you make two abilities. NormalAttack, DashAttack.
DashAttack has a tag requirement of Dashing.
NormalAttack has a blocker while dashing.
Casting(not sure if this is like spells?) Have a block tag for Attacking.
Casting may have a requirement tag for the Recovery state.
It just becomes a basic system where you pick which ability to use based on the input, based on the current tags applied.
that makes sense, but also like... just generally, a system like this is useful in a lot of ways, when it comes to organizing behavior, theoretically I could swap out the code and use it to organize the game's states, like whether it's currently in dialogue or in a menu, paused or in gameplay, etc
To be more specific, what I'm trying to do is specifically replicate the basics of the game in GM that I learned the language with, to try and figure out how to do the same things in Unreal and get a foothold on understanding it
You don't really do that in Unreal with the game's states usually. If you're in a special menu like dialogues, or an options menu or something where you want no gameplay inputs, you put the game in UIOnly input mode. If the game is supposed to pause in the menu you put that there too. CommonUI makes this a lot easier with their activatable widget trees so that you don't have to write a bunch of complex stuff like this just to manage it.
As the classic example, if I'm playing an FPS/TPS game and I'm running around I want GameOnly inputs with permanent mouse capture so that I can look around without holding the mouse down and so the mouse is invisible. If I open an inventory widget, I want my mouse back and I probably don't want gameplay inputs. So you put it in UIOnly. But then say you pop up an Options menu which is also UIOnly. Lets now give two ways this can back out. Normally backing out would go back to the inventory. But lets say something happened and the chest you opened was destroyed, dismissing the inventory widget underneath the options menu. You back out of the options menu. Based on these factors you have two input modes to pick from when backing out of the options menu. GameOnly or UIOnly. And there's no decently sane way to pick that from the options menu itself.
CommonUI simply reads the frontmost activated widget to determine this. So if the primary widget on screen wants UIOnly, it'll be that. If all of the UIOnly widgets are removed, it'll default back to the one that wanted GameOnly. Etc etc.
And on top of this it makes it easy to manage trying to pause based on which menu you're in as well.
You probably could write a state machine to manage this for you if you wanted. And if your game is small enough to warrant it without learning Unreal's intended ways, then it might be worth it. I would recommend the... StateTree or StateGraph I think it's called? It's an engine plugin. It's literally just a component that can go on any actor and run a state tree. But if you plan on staying in Unreal for a significant amount of time with a fairly scalable project I would recommend trying out some of the engine's intended methods for these problems. They've generally arisen due to the growing complexity that usually cripples projects when they try to write a monolithic thing to manage everything.
Gotcha XB
It's just really odd going from a system where you have to be really specific or else things will not happen or break, to a system where so many things are just... taken care of for you, but it's not always clear to what extent
Haha. Yeah. Learning Unreal is a task. And on top of that recent things have been put on top of that to simplify some of those things, but it adds to the learning. GAS and CommonUI are two of those things.
Is there anyone who can help me with my problem.
Maybe #umg
I want to build a game about collecting / trading / buying / selling collectible items (stamps, action figures, cards, etc...) and I would like to know if first it's possible to have a lot of 3D items on the shelves without hitting performance ?
And second is there a tool to do that as I expect the answer to be that it would hit performance alot to display all the items on the shelves, so is there a tool to handle mass amount of 3D models spawned in a closed environement (here it's a a store) ?
Something like this for example
is the correct way to path a player character over a path to use navigation and manually set goals and add input to get to that point? or is there built in functionality for this
i tried using moveto and moveto ai but this doesnt seem to work for multiplayer dedicated server
Trying to do moba style movement
hi, i am using scene capture component 2d to load an object from scene onto a image inside widget. This is for android, I wanted to like zoom with two fingers so that this image zooms and resets when taken back.. is it best to do in widget itself based on touch location and gesture, zoom the image accordingly or any other ways ? thanks for answers
The short answer is yes, it's possible.
How please ? 🙂
Optimization
Just models, you can use instance static meshes.
You dynamically load/unload depending on player position and view
I know but the question is the how 😛
And yeah ISMC are better than SMC
But as the shop is really small, the models would be next to the player position and in view most of the time so it's like impossible to find places or angles for where those models won't be on sight 😄
that's it ? 🤔 Even if there are alot of different static meshes ?
Nanite maybe.
Tell me more 🙂
Can prove quite useful with multiple static meshes to increase perfomances. Just have to enable it.
Meh... Nanites usually results is lower frames so unless you actually have the poly count that warrants it, it's not always worth it. Plus nanite does have some limitations.
Otherwise, even if you have a lot of meshes, you'll have to make sure they're low enough with the polycount. You don't need them to have 10k polys each.
You can have multiple instance static mesh components, one for each mesh type and then add instances to them. If you have 300 items, you can have 300 ISMC's and when you need to add a specific mesh for one of them, you find the relevant component and add an instance.
The foliage tools does this by creating a sudo actor and then adds ISMC's for each foliage mesh you paint in the enviroment.
Interesting, thank you 👍
In the meantime @dark drum your pointer highlight works well, although if I stop the laser while it was highlighting something, said something stays highlighted until the laser is casted elsewhere. Any idea how to fix that ?
When you stop the laser, check if there's an active actor, if there is, unhighlight it. The logic would be similar to when you don't hit something when you do the trace when the laser is on.
So, considering this, you're talking about the lowest part of the code, and that's where it needs to check for object, right ?
Yea
Funny how I understand stuff better when I have them under the nose.
I'm using a slider to debug some points on value changed. Does anyone know why the points are rendered only after I release the slider all at the same time?
It's not even printing this but prints all when the mouse is released, I'm confused
are there ways to make blueprints require less mouse usage? For instance if you've just placed a node it'd be nice to just start typing and it automatically pulls a line out of that node and you start searching nodes that are compatible with that line.
probably to save performance
since it would update a lo
how do you get the value of the slider ?
Is there a way to check if a timeline is paused or not?
Oops, yes. There is one. I thought i'd be called something like "Get play state" or something. Thank you
yeah its not always get
the more you use UE the more you known the usually used keywords
I guess it's my fault for not assuming the obvious and expecting it to be named weirdly
np
Is there a way to get the play time of your app from steam?
I am there isn't anything on getting that global time played that is displayed on the steam app
I need help with the unreal engine serial comms plugin, I want to have multiple variables across unreal engine and my arduino, which UE changes and arduino does other things with (not that important).
How can I access these variables with UE and the arduino?
hello, how could I make a sphere slowly scale up? here's my code so far. also how to make the size exactly the size I want?
whats wrong with your code
Have you tried just adding that many objects to a scene and see what happens? From there you can see if you need to do something about it
how do i set this actor reference currently its null
this depends on your level design, you can make the level so that players cant see everything at the same time
Nope, I didn't start a project yet. My question was more like a theory question that I had in mind
Can't as the players would be the ones designing their own shop (how it's set up in terms of shelves, architecture, etc...
ism only works as long as the models are the same 😛
can have different coloring on the same mesh ofc
Well, is it possible questions always have the answer "Anything is possible, but it depends" 😂
Could still limit it in some ways
your imagination is the limitation
size of the store/ number of items / height of the shelves so players cant see whats behind it
if to much is visible at the same time you can separate it with more walls
if its just an E-store you dont need duplicaites of anything
Ok so tell me how to do a 20k players multiplayer game (of course on the same server instance), go ahead 👀
text based
😎
Whatever the question, its possible, but it depends on the limitations youd be ok with 
No, I want 16k assets for each element with hyper realistic models and textures, 96k hertz sound design, with all the animals in the world in the game, and you can do whatever you want and if it's not there you can script that directly in game 👀
And of course the server must run at 128 hertz
just hire a guy on fiver
theyll get it done
how long would it take him ? 🤔
10 mins tops
theyre that good
True I need to find a balance but the player will make alot of trades, buy stuff and sell stuff, and I want him to display the collection like in museum
I'd focus on making it work smallscale first
if this is "player stores" you'd need to have a solution for that first , with whatever that entails (customized shelf and store layout?)
yeah I don't like that game idea anymore
I need to find a new one
but I hate 99% of the games, any good ideas ?
Plague mobile game , where the task is to create worst spreading disease ever known to mankind
when I hit play, the sphere just disappears
is your timeline done right?
looks like this
yeah if timeline doesnt start but the other event executes, it goes invisible
e.g. last value from timeline
timeline is on begin play
idk you tell me
@drowsy anvil must share this info
the other white line is disabled node, it doesn't do anything
are you manipulating the timeline from elsewhere?
no, I just made it for this thing
start/stop ?
Im positive if i make this in my dumpster project, it just works
engine version?
ofc it works it goes from 0 to 1
component hierarchy ?
it cant be invisible unless you do hidden in game or change visibility
yeah I think it might of been just too small, but I did scale it up and zoom in and saw nothing, but it works now that I put the timeline to 0 to 10000
and pressed autoplay
can always be awkward with relative scales that way
It seems I'm always using interpolations wrong. I never get a good smooth result.
Could someone explain it to me like I'm a complete beginner? (which I pretty much am)
I have made what is shown in the Screenshot.
The bottom function "UpdateDpsGauge" is called externally once every second.
I simply have a progress bar (DPS meter) I would like to go up and down smoothly depending on the values.
this seems broken
the Oldfill logic also doesnt make to much sense
Haha, so a lot is wrong is what you are saying. 😄
"every .95 seconds, set OldFill to whatever the Percent input currently is "
so if DPSGaugeFill updated 8 times in that Delay period, your OldFill will just pick up the very last update value
Cause I only call it once every second. So figured that should become the old value
No I didn't 😄
oh shit, i just didnt read it
haha
my bad
No worries. But anyways. How SHOULD the Interp be used for it to work?
It is?
the lerping is on tick
the delay is in the way
just the target lerp value is updated at intervals
(altho, one usually dont need to track old fill, as oldfill is really just current fill percent)
But what could I input into "current" value then?
Felt like I had to store the value somehow
You mean you would just get the progress bar and get the fill percent directly from it like this?
ur like just storing random values
you need to add something to something
i think
not storing you just set them
Perfect. Thank you.
No problem,
And thank you Nibiz too, even though I didn't quite understand it. Appreciate the effort anyways. 🙂
i tried 😄
Thank you. hehe.
Is there any way to expose components categories to their owning actor is pure Blueprint? It's doable in C++ with the ExposeFunctionCategories meta specifier; but I'm not sure if it can be done in BP.
I'm making a 2D platformer-styled game but when I die & respawn once, It won't do it for the next time my health reaches 0
Welp, I tested a few things but it didn't work :/ I don't really know how to make my highlight stops when the pointer gets deactivated while on the highlighted mesh...
hey, im trying to make a sniper scope, but i cant figure out how to change the camera to the scope. i have the gun and the player in 2 different bps, i need to change from the players camera to the guns sight camera
any help would be rgeat
can some one help im trying to get rid of a text like a delete button on a keyboard but it will not work
you are modifying typed letters then setting text value from final string so it doesn't change anything because set final string happens out of order
Got myself ina pickle...I have a node that's crashing the editor because it's in a construction script. Any way to break as I can't open the asset in the editor?
how do i fix
swap order of last two nodes should be Set Final String > Settext (text)
so all of those incoming white lines go to set final string first, then you settext (text) using final string after
or have separate settext (text) nodes for the other events
the first SS detects a platform and changes my character's collision so it can be stood on, the second changes collision again so the character falls through the platform. However, if I'm standing on one platform I can't jump up through another. Is there a way to change collision against a specific platform instead of all platforms with that collision type? I had another platform that would change its own collision but it required it to be overlapping by default which won't work for enemy placement and such.
I have a large skeletal mesh with per poly collision - It significantly reduces performance as expected, however I only need it to collide perfectly only with the player - is there a way to enable per poly collision only on triangles that are close to the player?
btw that'll call the finterpto twice per frame
anyone at all implemented fps and having characters body rotate to match camera rotation like up and down ?
Start with printing pitch and making sure it matches between all clients and server
then it's trivial to use it in the anim BP for looking up and down
well for me it's getting the right order of things
as I have a base locomotion this then gets addition of the camera offset thing and then i layer blend on the holding weapon anim when player is holding a weapon
Start with looking at GetBaseAimRotation
my issue at moment is I can't seem to get the right values
Do you have a replicated pitch that everyone agrees on?
start there
this is single player
no network etc involded
i'll get you example of what I mean
so at the moment I'm doing this logic to rotate the spine upper bones so when player is holding a weapon it lines up with where their roughly shooting
and i was dividing at first by 4 as thats the amount of bones being modified, two spine, one neck and head
How do I make sure that my BPs are no longer using a [CoreRedirects] entry?
Use Refresh All Nodes and then remove the redirect?
- selected a folder and use "fix up redirectors"
oh wait
CoreRedirects is for c++ decalred types
So this is my issue, if I put the camera offset thing before layer blend 0 it gets messed up
so to keep it good in BPs and remove CoreRedirects entries in .ini files you need to manually rebind after clearing OR use a special tool/command that allows to "resave" with change
if I put it after so add a pin the holding weapon gets screwed up
im struggling to where there seems to be now way to win
Do you understand how the order would matter?
Also this is #animation
yeah seems hardly anyone replies in there so i was getting no where
I'm guessing your additive final cam blend should be the last thing
or one of the last, certainly after the layered blend per bone I think
are you sure WithAdditiveCam even works?
Show the whole thing
so you would say rather then me trying to put it in the layered blend do a bool blend after the layered with the additive camera
We don't even know what you're working with, show the whole anim bp
gotta know where all these cached poses are coming from
Why not put the blend before you cache BaseLoco
then everywhere you're using BaseLoco you will use the additive version if the bool is set
Would that work though ?
So I would layer blend prior to cache base locomotion and then do my slot stuff after it ??
But wouldn't I end up with same issue where the aim offset would not match up right as the weapon equip is being done after the camera aim offset rather then the offset being done after the weapon equip anim is being fed in ?
I think maybe my issue is I'm blending in a anim when maybe I do that within base locomotion
Yeah, specifically for cpp-defined classes.
Either blend right before caching base locomotion or do blending at the very end
I didn't design your animation system, you should just put it where it makes sense
If you put it at the end your cached poses are wrong for the blend
the blend should be between TheWholeAnimationSystem and TheWholeAnimationSystemWithCameraOffset
Whatever is your last node, just cache that, then blend between the cache and the cache with offset
or don't even cache
Is that what happens you you cache something it looks at it like that
What about how I'm doing the weapon equip anim as at moment I'm blending in a upper half anim for the weapon equip would you say maybe I'd be better doing that with base loco ?
no clue
just think about your graph and what poses are being used for the offset
if the offset is based on the pose before the weapon, then it won't take anything about the weapon stuff into account
So I did some reworking, I've changed to using anims for the offset
Anim offset thing with 3 anims a centre and down and up
I'll have to tinker with it some more tommorow but just don't seem to be wanting to work
How to enable view MS timings on each node?
anyway to find/regenerate 'defaultengine.ini' if its deleted?
how to get interp movement to move up a certain distance when triggering another event, but slowly falls down if not moved?
I tried this but it just stopped moving altogether
I'm trying to sort something by two different methods at the same time. For example first numerically from A, and then numerically from B. So for example it would be 1-1, 1-2, 1-3, 2-1, 3-1, etc. Where the first number is from the first sort, then the second number is from the second sort. Can anyone point me in the right direction on how to implement the second sort within the first?
C++ FArray::Sort probably
Unfortunately I'm looking for blueprints. 😅
I can't make much sense with "numerically from A and then numerically from B"
are you looking into writing your own sort function?
If you are , you can look at a few sorting methods on the internet. One of them called bubble sorts
otherwise just scour blueprint plugin that sort arrays of ints. From memory I think rama's victory plugin does that.
I basically want to sort it by two sorting systems. Sorry. It was difficult to explain.
So lets say I sort something by value, then I also want to sort it by the rarity. So if multiple things have the same value, then it then sorts by rarity.
Sure, so you just want to make a function for each of the sort function
Sort By Value
Sort By Rarity
So plugin your array to Sort By value, then you can plug the result to sort by rarity
You can get into the basic of sorting from bubble sort. It's not the fastest but the easiest one to understand afaik.
But if I plug the result of the first sort into the second, won't it just sort it by the scond?
It will sort the result
not the original array
Isn't that what you want? Grab a collection of something. Sort it by value first then sort it by rarity?
So yeah, so in my example I'd have 1 - Copper, 1 - Silver, 1 - Gold, 2-Copper, 3-Silver. Something like that.
Where it's still in numerical order from the first sort, but if there's matching those are sorted by rarity.
Yeah, that's easily doable
Grab your item list -> Sort by Value ->
Grab the result above and plug it to Sort by Rarity Function -> Profit
^ learned this nifty trick when manipulating excel tables
If I put the entire completed sorted array in, it'll just re-order it by the rarity I thought. I'll definitely give it a try though.
but you already have the result from Sort By value
original can be 1 , 2 ,1 , 1
Sort by value will be 1 , 1, 1, 2
Then sort by rarity will swap the 1s by rarirty for example
Yup
Oh I guess I need to do a specific kind of sort that swaps and checks the value.
From 1 Silver, 1 Gold, 1 Copper, 2 Copper
to
1 Gold, 1 Silver, 1 Copper, 2 Copper
depending on your rule.
yes, you will have to define the condition / rule.
If you just follow through with a sorting algorithm, it will be much easier to understand.
Yeah, definitely. But I understood the basis for it. Makes sense. Thanks for explaining it. 🙂
anybody knows if there's a way from bp to get the current editor viewport size in pixels? regular Get Viewport Size always returns 1,1 in editor
I doubt it.
damn
I'm in a scriptable tool, trying to compare the distance between the spot somebody last clicked on vs where the mouse currently is in screen space but if I just compare pixel distances it won't be consistent across screen resolutions
The editor viewport is always in pixels. No matter the resolution. Unless you have your dpi scaled. DPI scale is the enemy!
Though I get what you're saying now. You want some kind of fractional difference or something?
Cant find the tutorial again, but where & how can I set blueprint nodes to show the compute time MS above each node in the top corner?
This?
Thats not above each blueprint node, is it
And damn, i've never seen my game thread around 4-5ms lol. normally around 8 haha.
Where each individual node is notated with its compute time MS with a floating number above it in the corner.
I don't think there's anything built in for that. Normally you'd need to profile to get a ms break down of function calls. Of course I could be wrong, there's often lots of stuff that gets added that doesn't get talked about much haha.
There is, but I cannot remember exactly where it is contained. Maybe anim bp related. Scoured all my saved tutorials and cant find it.
If you dont know, feel free to not @ me
Wow, talk about rude.
https://www.youtube.com/watch?v=FNZt2i14ATA
How do i make something like this in unreal engine?
say i need the red area and the blue area
need the blue area to expand into the red area
how is this done?
i cant understand how this could be done
I would do it in a material and use some sort of mask that can blend between them. You probably want to ask in #materials for a better answer though.
Still stuck with my highlight issue, I'm not sure how I'm supposed to check on the actors :/
I'm having a really weird issue that I am now realizing is weirder than I originally had thought. I have a system in my game where a random party member is given a random item. The way the item is decided is via random int in range. A few RIIR hooked up to switch on int.
Now the system for the most part works fine. a random unit is given an item, I have something in the game that confirms which party unit recieved the item and when I look that is indeed the unit that recieved an item. BUT, the very first time this happens it also gives one of my party members (the same party member every time) an item (the same item every time). This only happens once. It will never repeat.
So at first I think, "oh well, I probably just have something hooked up weird somewhere, no big deal" Except, i just rebuilt the exact same system that is comepletely independent and does not run any code other than what I just wrote with BP. and the same bug occurs.
This is absolutely blowing my mind and i'm curious to know if anyone else has run into this problem?
where to find the player controller property?
You'd need to show how you're handling it. The issue is most likely unrelated to the random int in range node.
i can show, but its not the same approach for both
which is why i didnt bother
i actually do believe it is related to the random int in range or some other issue related to it and my reasoning for believing this is that the item is the very first option for one of the catagories but i'm open to help for sure so i will grab some code in a sec here
this is basically the code
the item in question is on the 0
the unit chosen is set here
but the approach is slightly different for both widgets i'm pulling from
Try something like this. You have a lot of repeative branches that pretty much do the same thing. Create a variable to define the available weapons that can be randomally given and then use the random node that will randomally return one from the array. You'd probally be able to remove you're entire switch on int node. If this doesn't fix it, it'll probally make it easier to spot the issue.
yea the way i'm doing it for now is not ideal for sure
and i fully plan on refactoring. I've already begun refactoring a lot of my code
the approach you are suggesting didnt work for me, probably due to how i set things up, but i did try your approach
but regardless this problem shouldnt be happening and i would jus tlike to know why it is
its firing correctly. so for example it will say "rogue recieved an item" and when i check rogue did indeed recieve an item. but every single time, the very first time i recieve an item, the priest will ALWAYS recieve the item i show in the screen
even if i put prints in between that item
To be honest, it's hard to say with what you've shown as it's just a fraction of the spaghetti.
there will be no prints
understandable which is why i didnt want to bother showing it at first
but i have very good reason to believe its not the code itself but the way its firing
as i've written this code twice and it plays out exactly the same with both code. the only code that is repeated in both these widgets is what I showed
i've had this problem for weeks and have walked through it multiple times with multiple debug approaches and the result is the same
Use the get random int in range, store in a local var, print and then use the local var to decide what item to give.
Store the random int. This will allow you to print it without it giving two different ints as you can print the local var.
oh interesting
this is an approach i would not have considered due to it not firing the prints
but i'll give that a try
thanks
@dark drum hi, how you doin?
You can set the player controller that is used inside the game mode or in the world settings. If you don't have a player controller you can create one by selecting the relevant option when creating a new blueprint.
I did create a player controller but it had some problems so I deleted it later
Yea i promote all random numbers to variables before using them to select and i still get the same bug. There are two radom ints that run back to back and the item aligns with "0" on both random number generations. its as if its firing all the way through on zero then firing again correctly.
Show what you'd doing.
the code is huge so its kinda hard to show
i'l try to line it up in one line
again sorry for not cleaning my room haha
that is the complete line from the item being set to the very end
again it runs fine. a random character is given a random item
but also another character that is the same one to get it every time, recieves an the item that runs straight through on the zeros
if i put a print on that line
i get nothing
Add a print string in the circles places connecting the relevant local var and show what it prints. Make each of them a different colour so you can distiguish each stage.
thanks will ask there
yea, still happening. when i put a print in front of the item given (like say i just put a simple "hello" inbetween the code where this random item is given every time, it will not fire. its as if a ghost is just giving this unit the item. as far as prints are concerned its simply not happening.
at first i assumed it was some seperate code that was doing it
which is why i made a seperate instance independent of all other code
i mean its not the end of the world, its not like a game breaking bug and for some super bizare reason it only happens the very first time a unit is given an item and never happens again. I could probably even just "remove" the item from the game and just write something that says "if unit gets this item, delete the item". I'm just genuinly curious because I've never seen a problem like this before.
I want you to print the random number from the var, not 'hello'.
oh i got you
i'll give that a try too
i would still think if i put a print in front of the item it would still fire
even if it was running like two numbers at once
what number does it print when it is first triggered?
okay, so this is interesting. So I have two back to back switch on INT.
the first one is to decide which item type to receive which i set to red for print to distinguish. then i have 4 different item types all with a blue print
the very first time it runs and ONLY the first time it runs
all i get is the first in red which is 0 every time. This is odd because it still goes through the full thing and gives me a random item. But its not firing the other prints. then every other time after the first, it will print two numbers as intended and both are random
so it is something with the random numbers. or seemingly. and the prints sort of reflect this. but the other prints are not firing despite the fact that they should because the code clearly ran. and it NEVER happens again.
Show what the message looks like when it's prints to the screen.
yea
i mean i would take a vid but my game is super alpha and have not been keen to show video yet
so much of my widgets and visuals are jank and place holder
lemme reset to a fresh save then i'll show some screens
okay so now im going to sound like a jackass, because now i have tested it twice and its showing both prints despite the same bug happening. i swear it didnt show it the first two times i tested it, I dont know if thats an indicator when it comes to the issue.
now its just printing normal but still getting the bug
now this last time i didnt get the bug
I'm still waiting to see the printed messages. 🙂 getting support often goes faster if you provide what's requested. 😉
i have no clue whats going on. could this be something like firing too fast?
i keep getting random results
so i dont know what to send
i was actually considering sending a video in private message
but then the bug didnt happen...
Just what gets printed in the top left like this. If you get a few different results then send 2 or 3.
yea i'm literally getting random results so i dont know what to send
sometimes it gives me 1 number
sometimes it gives me both
and the last two times i've checked the bug has not happened.
but i did do something in order to prove it in the video, and i wonder if that step is what is causing the bug to not happen
Just test 3 times and show what happens each time.
For context, it's been 40 minutes and I've still not seen a single print string. 🤷♂️
i'm sorry bud haha
fair
very fair
i dont mean to be a dick, i just dont want to look like a dumbass
i wouldnt blame you if you just said f this guy
i'll give you prints
it seems to be just working like every time now
i've had this happen before where the problem randomly went away for a few days then seemingly came back for no reason
So is it still giving the NPC the same item each time?
well i was scrambling to get you prints fast so i dont know 😂
thats why i was taking a while. i started getting different results randomly and wanted to make sure i was thorough
Print the item that's given as well then. It'll make it clearer as to whats going on.
But either way, it looks like the random int in range is working fine.
i swear on everything that after i changed it, the very first two times i tested it it ONLY printed a red 0
why that stopped i dont know
so I have these text variables in data assets and they're not being picked up by the localization dashboard. Even though they're clearly marked for localization and have a key assigned to them. I tried make the data assets refer to a string table but the problem persists... Anything I'm missing here?
Hi .. i got a problem with my game logic that i cant figure out.. so i have two modes in my game, a freeroam and an on rail state. On freeroam the player would be able to go around freely with wasd and mouse. On rail mode i got a spline that the first player BP got attached to and goes aront till any of the key got pressed it goes back to freeroam. the on rail logic works fine
as seen on the picture. i also got a widget where the player can select the rail butto this is the event on is
The problem is on the third picture where i got the any key event if it got triggered i check if the previous gamemode was the on rail and if so it set it back to freeroam, unhide the crossair widget set the actor location to the player start location set the input mode to game only and stop the timeline.. it runs down, but when the player got back to the player start position , it doesnt move anymore.. the mouse look fine just the movement imput gets ignored somehow.. i set the debug view on and the EnhancedInputAction IA_Move gets triggered, but the character itself doesnt move.. I wonder if anybody here have any suggestion what could be the problem ??
Anyone know how I get rid off this cause it's super annoying
Well I don't have much choice atm
Thanks to pattym I have this system to highlight an object with a laser pointer (the first branch is connected to a line trace channel return value node).
The problem now is that if I stop my pointer while highlighting an object, said object will stay highlighted until the laser gets activated and pointed elsewhere. I can only presume that bottom line is the one that needs a bit more to work, but I don't really know what to do to make it work.
Show the logic for where you stop your pointer.
That'd be this.
Is this in the same BP as the logic above?
The logic above is located in the Activate Laser node.
Copy and paste this bit after the 'Destroy Component' node where you disable the pointer.
Welp that was it. Thanks a lot 👍
Anyone know how to better this logic to have the arm not be screwed up like it is ?
Out of interest how do people do stuff like buttons etc? Do you make a designer choice if it should be actuslly button interacted with
visually or just one that does it stuff but visuall player doesn't do any animation to tit
it
What Im trying to do here is to add a new mapping context to player when they active this ability (Input for Confirm/Cancel Target actor part of Gameplay Ability System). But it only works on Host like when I hosting and press the ablitity I can point where I want to put down the turret and press left mouse to confirm it. But on the client side it doesnt work the ability do get triggered but the input doesnt get registered (Confirm/Cancel target actor). I checked the debug note and it show 2 differents controller and enhanced input local subsystem. One for server and 1 for Client. What can the bug be that Client cant confirm the target actor does anyone know?
Thank you for your help!
Hey, I'm trying to get UI showing an object location when it's off screen in first person view using the "Project World to Screen" node, but as soon as the object is slightly behind the player, it stops working, is there a way for me to circumvent that?
What stops working?
I generally get the positions properly on screen as long as it's in front of the player, but as soon as it's behind it, the values turn to (0, 0)
When I turn the player so the object gets closer and closer to the side, the values get really high
Turning towards infinity
You'll need to show how you're actual setup.
Hi i am using anykey event to trigger an event, how can i make an exclusion for example to this if any key got pressed, but if i press tab bring up a widget instead of doing what the other heys doing?
And then this
restart editor? sometimes ue5 has weird visual bugs
i meant like have it so it doesn't appear haha
does it only appear when you hover over it
Guys, you know the google maps marker scales as you zoom. I'm trying to maintain my billboard component a constant size while zooming in and out.
How can I achieve that using blueprint? thx
I did some testing. The only option seems to be resize the billboard based on the camera distance (every tick). However, this can get expensive if you have something like 1000 billboards. Not sure if stuff like sprites or ui work.
I tried doing that, but it didn’t work. Can you send a screenshot of your blueprint?
^
WidgetComponent, in screen space
@pale mica Maybe try this.
I'm still stuck on this, I want to achieve it using blueprint, it should be possible.
There's an example of this in the valley of the ancient demo. I needed the same thing and used their setup. it's in the dark world
There's 4 or 5 drop downs and check boxes that have to be filled out
Ok i figured out.. but it is quite funny noone knows how to do this.. or am i just being ignored?
You can't, any key as the name implies is triggered when any input key is press, something that is hard coded. As a potenial work around, you might be able to have what ever is on tab have a higher priority and set it to consume the input. I believe it should stop the any key from triggering.
dear god, why is this misalignment snap a thing? 🙈 https://gyazo.com/f876832513778b3bfef4c65001a3acba
Blueprint Runtime Error: "Accessed None trying to read property LockOn". Node: Start Lockon Graph:```
just wondering, this is a common error yes? what should i do with this?
You should fix it
It means that LockOn property is null at the time your code runs
So whatever ref owns it you probably didn’t set right
ohh okie thankss for the tip
Hey m trying to set - 75(Y) to the target relative location
since theyre multiple wity different roattions
how would i redove 75 in the world location based on the rotation :/?
Hello, I have a question. I have a structure of an item that contains a data asset and the reference to the index where it is stored in the hotbar. What I want to do is that each item saves its reference to load and unload the hotbar every time I change the item. The reference to the index of the hotbar returns to its default value (-1). Since I am modifying it with "set members in..." what am I missing or am I doing wrong? I need the references to the index to be saved in the items until I want to unload them by removing them from the inventory.
So bit confused on this one as I would think this code would be setting the camera rotation to 0,0,0 however it doesn't seem to do that when the set relative rotation is being fired
what I wanted was the camera locks to the head bone of the player character forcing them to look where the animated head movement is
obvs other times they can look around freely but don't seem to be working like that and I'm bit confused
so i've found online unticking Use Pawn Control Rotation works to have camera lock to movement of the bone it's attached to, however is there a smoother way to being that in cause at minute it seems very kery movement to get into the position and then back out ?
hey im trying to make it so i can set a flag to true in a levels blueprint to change from the normal character blueprint to this other one i made that is meant to be like super monkey ball, i have tried this but when i do it the player has no movement
wow the screenshots didnt send
I noticed that there is a (new?) Line Set Component in 5.5. Did anyone figure out how to use it? I'm adding lines to it but don't see anything on the screen.
i got it to spawn, and then thats it i have no control and my life and coin counters are broken
That means get player character is returning None
how do i fix that?
Not directly. Make a new event. Call that from FireWeapon. Call that from where ever else you want.
Is there any way to do it with the new system? Or is the pattern still the same, to have a layer of events
If someone wanted pawns to be 100% agnostic as to if driven by a player or AIController, for example
You don't really emulate AI like that though. Take an RTS for example. An AI doesn't have a cursor, doesn't aim abilities by moving a targeting indicator around around or click. It picks stuff based on target data very differently than a human.
For an RTS that's true, I'm more thinking of something like a twin stick or fighting game.
Like a fighter:
Raw input -> Input actions -> GameActions? Whatever you'd call it -> The actual logic
Gamepad A Button -> JumpAction -> ActualJumpAction? DoJump? it's awkward -> The jumping logic
IMO this is an issue that GAS like ability systems solve and in a much better way than bothering to emulate controls.
Rather than trying to emulate a button press, you just run an ability based on it's class or tag.
hi i'm trying to ref a button to get the on click and to acess it from another widget
but i can't get it ... any idea ? thanks !
i can't find the event here
So I am a bit at my wits end here
essentially I have these custom buttons I make that work once I fix them, then closing unreal and reopening, they suddenly do not work
I tried deleting intermediate, build, saved, etc... and doing it fresh to no avail
I also recreated the button widgets from scratch entirely, then I end up getting ref errors
Anybody have a potential solution?
It is replicateable
hey, is there a way to change Timer inside of Timer's function?
Time, is the delay between each funtion(BoxTimer) call, basically I want change the delay(Time) in the BoxTimer function.
You want to set the time left after it has already been executed and not finished?
nah, I just want to control the Time (delay), inside the function
I am not sure what you mean, it's already exposed for you there
you can promote it to a param and set that if you want to change it, or just call it in different ways
or make a wrapper function
I want to change it while it is running
I tried this, It doesn't seen to work
With what I mentioned and these various functions you can call on the return, you should be set to do what you want
try printing things out, making sure they fire, and that their values, are what you think they are
Sigh....
You can't change it while it's running. You need to clear and invalidate the active one, and start a new one with the new time.
Working on improving my footstep nodes handled in the characterBP, this is for first person so I'm not bothering with Animation Notifies, the logic for the bottom portion (checking if velocity is > 0 and stepped recently) seems sound to me but it always returns a false on that branch, The goal is to play a footstep sound after the player stops moving to simulate coming to a stop, am I over thinking this?
really the whole delay nodes idea is bad for when I re-add sprinting and slow walking but i'll cross that bridge when I get there
you can export and view them in excel
or google sheets. they export as a csv
got you. yeah building something yourself is probably the best option. a blueprint editor widget may be a good option
that may be something that a custom editor is a good use for.
but no, i don't think unreal comes with that functionality off the bat
is there a way to have a homing projectile follow the target up until a certain radius where it will stop moving?
I imagine one way would be to remove the homing target and set the projectile speed to 0 but was wondering any alternative and probably simpler way if any.
1.) can be worked around with some C++
2.) also C++
3.) also C++ with SQLite
4.) yea, also not a big fan of DA for everything
5.) never had the issue, so not sure what to do :>
but good tools help you keep your sanity and to be productive
and the gameplay tag to row name is kind of specific
even tho, i know that a lot of people do that
but how do you determine which tag to use in a struct with several GameplayTags?
they could add an additional flag like use as row name for anything that can be converted to string
go make it, make a PR, make people happy
maybe it's easier to make a more generic DT asset, which allows for different types as row name/key
Hello, I have an issue that's explained and answered here:
https://forums.unrealengine.com/t/sync-markers-issue/670140
But I don't understand Animation Blueprints. I'm using the Lyra project, so I'd like to know what specific action I need to take to arrive that this solution. I don't think I feel comfortable changing the lengths of the animations, so what does this person mean by "limit the time you can change the sequence to the shortest one"?
Hi, so I’m having this weird bug with the sync markers. 99% of the time it works perfectly fine, but after a few minutes the whole game freezes for a few seconds and then it resumes and then it doesn’t happen again until I restart. It’s hard to replicate the glitch, as it seems to happen at random, but every time I get this in the output log: L...
I'm thinking if I just set the sequence to loop that'll solve the breakpoint in the shipping build.
sorry I missed the reply, yes that's what I want pretty much, I want the distance between point A and point B on screen in a way that's consistent across screen resolutions
I guess normalized might be the word?
hi there any idea on this ?
Onclicked is an override, I don’t think you can access it that way but it doesn’t even make any sense to do so
The event will fire when the button is clicked. You can’t just pretend it was clicked by calling it directly
because i wanna make a list of buttons that i can scroll in and i saw that i need to create a widget inside a widget
but maybe i don't need that list.. Hmmm
That doesn’t explain why you’re trying to call the button’s onClicked event
Regardless, #umg can prly help further
thanks a lot 🙂 i'll see there 🙂
You can ease the duo typing by using a dt row callback in c++, thats how i maintain it
Super easy to make
That and a bpfl with a function you specify to your DT, and call something like GetDTRowFromTag
GetItemInfoFromTag
You'd need c++ for that because of the editor viewport.
my setup got a tag as a column, so whenever a row changes, It just checks for a valid tag and updates the row name if it doesnt match
void FSocketInfo::OnDataTableChanged(const UDataTable* InDataTable, const FName InRowName)
{
FSocketInfo* SocketRow = InDataTable->FindRow<FSocketInfo>(InRowName, "");
// If our row name and tag dont match
if (InRowName.ToString() != SocketRow->SocketID.ToString() && SocketRow->SocketID.IsValid())
{
// if our tag is valid, change the row name to match our tag
UDataTable* DT = const_cast<UDataTable*>(InDataTable);
FDataTableEditorUtils::RenameRow(DT,InRowName,SocketRow->SocketID.GetTagName());
}
Super::OnDataTableChanged(InDataTable, InRowName);
}
is there any documentation about animbp property access
Anyone know a voxel plugin that support non-full block like stairs, slabs, etc... ? Like i wanted to use the Voxel Plugin but it doesn't support those kind of blocks 😬
For slabs, just double the resolution?
what do you mean ?
lemme draw a picture
do you mean like for a full block use a 2x2x2 blocks ? So to get a slab use a 2x2x1 blocks ?
yes
How would you solve the breaking and the placing of blocks by the player ?
Remove 2x2x2?
Are you trying to make something like minecraft?
how precise does your terrain sculpting need to be
No and Yes,
No, like I'm not doing a game with procedural generation or stuff like that.
Yes, I'm making a prison game where the world is built using blocks, so the space is limited.
Do you know the Escapists 2 ?
So every block has different properties?
what do you mean ?
Not sure if this fits your case: https://www.unrealengine.com/marketplace/en-US/product/voxel-sandbox-toolkit
I'm taking a look at the documentation
Does it apply all the optimization stuff to those special blocks too ?
Not sure, maybe you can ask in their discord or something.
I think their discord isn't in the description
Oh thanks, I will ask there 🙏
hey, my camera when i aim only looks left and right, but not up and down. any idea how to fix it only going left and right?
the camera for the sniper has the same settings as the main player bp afaik
Can you show your code/blueprint?
Hello everyone
I have a tiny bit of a problem
I'm trying to setup a "jump" that increase the distance depending of the player velocity (like in titanfall 2)
But it's very random so far, sometime it will increase my jump distance and sometime not
i'm very confused to what i should do
Every tiny bit of help would be very much appreciated, thank you in advance ^^
isnt it normal to not see it ? Since you are in your character BP but it didnt spawn yet
even in runtime
It spawned but it won't show in your BP
are you sure it's attached to the player tho ?
Like it spawns on the player character but idk if it's attached
Maybe you would want to take the abs or length of "velocity"?
For example, your code doesn't work well with the following case:
Facing towards negative, and velocity is negative. But, the calculated impulse is positive.
More like this ?
yes
i'll test it out 🙂 thx
You sure "Get player character" is returning the correct character?
It's working great ! Thank you so much men ! ^^
have u tried to set it as parent
Does casting to thirdpersoncharacter work? If it doesn't, I have a theory.
Did you setup input correctly in your class settings or whatever it's called.
Wait so you solved your original problem, or your original problem didn't exist.
Please elaborate on visual it's position exactly
editor or character hierarchy
You have hidden it? as noted by the eye on the left of "PointLightComponent_0"
Just for a reference image, this is what i got after
not sure if anyone has worked with IK stuff and knows what might help me in the animation channel
Hi! I am new to UE, I am following this tutorial (https://www.youtube.com/watch?v=ZrM_CfOy1sU&list=PLFYGCCDpMHmHJwhIRY6qNumAts--W8bTy&index=4&ab_channel=TheGameDevChannel) minute 21:36, but trying to make it all for Mobile instead! I am although having an issue I am not being able to solve, in the video, they use a ConvertMouseLocationToWorldSpace to keep track of where the object is when grabbing it (I believe). I am struggling on how to do this with touch controls. My attempt is on the screenshot, any suggestions? Thank you.
In this video I show you how to place objects in the world at run time using the mouse cursor and a ray trace into the game world. Sorry this one ran a little long, there was a lot to explain and get through!
00:00 - Building Test Asset
02:00 - Setting Line Trace and Collision
05:00 - Ploppable component
11:00 - Character Controller Updates
21:...
Hi i have a problem in my game.. i got a widget attached in to a dest in world space ..(so not on the players viewport).. i want the ui to react if the player looks on it.. for example if the player look at the dest theres two button apear abowe it, so the player could clikck both of it.. My question is how could i achieve such thing.. so far i have a line trace from my firstPersonBP, i ask for the component if has widget tag, i cast to the widget and set the visibility, it works fine so the two button apears if i look at it, but i dont konow how could i make the buttons clickable ? how could i separate which button the player look at?
there is a widget interaction component
this acts like a interactable widget in world
Thank You i will look into that
if you spawn the actor and attach it on server, and the actor is replicated, it will be the sme on clients
Hello everyone,
I'm wondering if theirs a way to keep the velocity i gain on the wall while jumping out of it
Right now it does what it looks like in situation 1
and i'd like to have the situation 2
This is because i use Add Impulse, which only sends an impulse but then comes back to the original velocity
Anyone know any fix to that or any node that could help me ? thx in advance ^^ much love
Hello All - I am relatively new here. I have been on the serve lurking; but never really contributing.
I was wondering if anyone may have a hint on how I can make a BP (or animBlueprint) that will allow me to save a static mesh for every frame of an animated character. I know I can do this manually; but I am hoping to author something to help automate the process. I have tried a number of option; even setting something up in Sequencer in hope of getting the pose from there. Sadly, my blueprint skills are still in the early stages of growing.
Any hints would be deeply appreciated.
Chances are you need to change some of your falling settings to allow less dampening or gravity maybe.
Yep that's what i did
i put it to zero
and clamp some values
is there a way to add a post process volume inside a blueprint and make it bounded? whenever i try and make sure unbounded isnt checked nothing changes
I'm not entirely sure if its possible in BP, but it may be possible with Geometry Script module, using the Copy Mesh from Component node (but I'm not 100% certain if that uses the current state (animation) or just the base mesh.) But it may be worth looking into 🤷♂️ Otherwise you will need to do it in C++.
Thank you so much. I truly appreciate the insight and taking the time to reply.
is there a way to have this socket remain on that side of the lever even when the lever is in down position?
at the momet the socket ends op other side of the thing so
I have an input that the player holds when they're under a certain condition, if that condition changes I want it to cancel. How would I handle that?
So imagine you have a gun you're charging, but you change weapons or get hit mid charge, it should cancel that action.
have a boolean which says like ischarging, and add that condition to whatever, so say someone attacks you, on the attack, run a check for is charging, and if true, cancel it
hey, im trying to make the switch blueprint i made, (even tho i want it to be customizeable) trying to make it control other actors when pressed, doing it like this works once, it opens the door and when the delay is over the door closes and the switch pops up again. but when i hit the trigger again the door dosnt respond anymore
Despaghettify that
that reference node being used after a bunch of latent actions is super sus
?
It can be this simple, give each switch a ref to a thing it controls
you want generic switches right?
same switch can tell many different things to do something?
yea
ok there's a few ways to do it.
This is a textbook example of where an interface can work
or, you can make a component. I'd make a component
i was confused on which direction to go w it
I'd do a component since you want a little bit of state (reset time, should auto reset, etc)
I'm trying to get an actor to "jump", but if I try to interpolate the movement, it just stands still. It works perfectly fine if I teleport right away, but adding the interpolate just causes it to stand still
mainly the thing ig im trying to recreate is the cap switches from mario 64 while also giving them the ability of the ! and P switches in more recent mario games
but i want them to be able to be able to be used w many of the level objects ive made in other blueprints
@trim matrixYou familiar with dispatchers?
How many different things will need to be triggered by switches?
thats the thing i dont have a set number id just like it to have the posibility to do that and hook the code up for it later
rn im mainly working on mechanics and this switch is just one ive been trying to figure out
like for example i have a blueprint thats a rotating platform, id wanna maybe place a switch to activate the spinning or deactivate the spinning etc
OK a simple method might be like this:
Switch:
MySwitchableComponentRef
BeginPlay -> bind event to MySwitchableComponentRef.StateChangedDispatcher
Event Triggered -> call SetNewState on MySwitchableComponentRef passing over a bool
SwitchableComponent:
SetNewState -> logic -> fire StateChangedDispatcher with a bool representing state
Any Actor
MySwitchableComponent
OnStateChanged -> do whatever in response to state changing and current bool
THere's a million ways to do it but the point is that you just make a component that contains the state (a bool or whatever), and the logic to do resetting etc, and use a dispatcher so the owning actor and the relevent switch can do stuff in reponse to the state changing
so im gna sound stupid, but im confused on the myswitchablecomponent
quick question, so I'm trying to get the total size of the world and then move this blueprint actor to the center of that location, but this doesn't seem right.
Is there anything I need to do to fix this?
oh wow i love this theme
what can be other causes other than root lock when it comes to character snapping back to its initial position after animation has finished playing
An ActorComponent you'd make
then you can put it on any actor you want to be controlled by a switch, and be able to implement OnStateChanged
just like how you can implement OnHit for components
I'm using this, although I had to do some tweaks because it was missing some files.
https://forums.unrealengine.com/t/tokyo-night-editor-theme-for-unreal-engine-5/737151
So with theming of the editor becoming more of an option in Unreal 5, I’ve developed a version of Tokyo Night for my personal use that I’d like to share with the community. This theme is far from complete but it serves my purposes and I’ll continue updating it as time goes on. You can download it here: Tokyo Night for UE5.zip (710.2 KB)
so in the switch blueprint?
There are 3 things going on here.
Switch BP
SwitchableComponent BP
Any old actor BP (the things to be controlled by a switch)
the switch only directly talks to the switchablecomponent
which talks to its owning actor (can be anything)
so make a new blueprint for switchablecomponent?
yes
it needs to be an actorcomponent base
not an actor
not a scene component
I'd back up though, do you want to have interaction in your game? Like press E to do thing?
Do that with an InteractionComponent first, it's simpler than this switch based system.
?
Character:
Press E -> get overlapping actors or whatever -> if one has an InteractionComponent, call event on it
Same idea with the dispatcher and stuff but without the switch
put that in the character blueprint?
Make an InteractionComponent just like this, then add a custom event called Interact and an event dispatcher called OnInteract
ok now have Interact trigger the dispatcher when its called
just drag the dispatcher into the graph
K now add that component to some actor like a door
something you'd press E to interact with
Select the component and in the details all the way to the bottom is there a red button for the dispatcher?
One sec, doing it on my end. I've only done this in C++ never in BP yet but I'm poking around.
Works for me, did you compile?
im confused
compile the component bp
K now go make sure On Interact is visible in the component properties in the door actor
Like this
k so click that plus
that event that it makes will fire when the interactioncomponent gets Interact called on it
now all your character has to do is:
E button -> get whatever actors you want to consider -> choose one that has an InteractionComponent on it -> call Interact on that InteractionComponent
Or whatever you want
Assuming OnDoorOpen is what opens your door then yeah
but the main thing to consider is that your character no longer cares if its a door or whatever, it interacts with INTERACTIONCOMPONENTS which tell their owning actor to do whatever
?
It's more generic
thats fine
so the same idea applies to your buttons
except instead of character pressing E and calling an event on some InteractionComponent
the switch calls an event on its assigned SwitchableComponent
the rest is the same
how do i setup the event for it?
This is what it'd look like in the things the switch is meant to control
so remove that one
or well ig all of that shit up there
id still like to keep the matching id thing bc thats how i have the doors and keys setup already and has been working fine im just not sure if it would stay here or in the interaction component?
instead of ID you can just have a SwitchableComponent ref in the switch and set it in the editor
you can basically just place a switch and tell it what SwitchableComponent it cares about
the SwitchableComponent ref will BE the ID
sry im still sorta confused lol
If you set it up like:
Switch:
Event Triggered -> tell MySwitchableCOmponent to do its thing
then you just set MySwitchableComponent in the editor, when you place the switch and the thing it cares about. You can directly set that ref
so instead of searching based on tags, it just knows who to talk to