#blueprint
1 messages · Page 162 of 1
I made a few of my own so I'd assume so, they kinda sucked though
I've worked with Unreal for 9 years and I've never really messed with Character much, Might not have to ever mess with the CMC if it's all on Mover 2.0 by the time I do a character game.
anyone know what could be causing the zombie to not hit much? can give more screenshots if needed
any chance there is somewhere I could find someone else to do this stuff for me? I'm in game design not game development, this is starting to sound like it's not possible with my skillset to implement
Here's hoping!
Sure, how much money you got?
Yeah. Many dollars will solve lots of problems.
I have some money but idk how expensive code is
Getting a perfect movement system would run you anywhere from $10k to $1m I'd guess
depending on requirements and your definition of "good enough"
nobody is going to do any real work for free
Something weird is definitely happening. The 'PlayerIsInRange' boolean is on, but they're not doing the attack.
ideally I'd just have a macro I can apply at the end of a movement event that gets my velocity before landing, and applies it after
That's definitely doable, but I would expect a variety of edge cases from that.
in editor my character starts at 90 Y axis but in exe it starts at 0 0 0
Well that should be an easy fix then. Just set the rotation in the OnBeginPlay event for your character!
So it's always 90Y.
Interesting, then in the code that updates the character rotation relative to the mouse - why not set it there?
I'm collaborating with my friend on this project, he is better at math but only knows c++
tbh was watching this tutorial and adjusting it to work with my project but dont know what im doing much either, but this was how they did it
Maybe he can help!
If he actually knows C++ then BP is trivial
it's basically C++ in disguise
i have been looking at this today and yesterday and am not seeing the problem
does anyone know why when i possess a new pawn (a vehicle) it inherits the roll even after trying to run set control rotation after possession? if the car is on a hill sideways for example, the camera is now rotated to the cars axis
I hope so, he is just kind of a giant baby though
Do you know if it ever gets into the attack node?
yeah as in the video i can jump around a bit of it, and for some reason it will attack then so very occasionally it will
I assumed that you were doing a school project or something. I think probably the only way you're going to be able to make your game work is to build the game in iterations as you learn things. So right now... you have a character who can move, and walk, and look around - that's great! Leave it. You have 10 000 other jobs to do to make a game. Do some of those, then come back to the character and use your new knowledge to improve it, then do some more of those 10 000 tasks, and come back again, each time making it slightly better.
Do not get stuck on one thing.
If you stop because you get stuck - you're never going to finish it.
Does it work well enough? Move on to the next thing.
But have you confirmed that it's entering the node properly, and then exiting with the failure condition.
Or is it constantly re-entering the node incorrectly.
Or is it getting stopped?
If it's entering the node and failing - the problem is in the node.
If it's not entering the node properly, the problem is in the criteria.
kinda is for school kind of isn't, I'm meant to make a game on my own for my portfolio
You may want to dial down your ambition then.
(on my own as in without the school's instructions)
Make a game that is slightly harder than you think you can pull off.
Don't try to replicate a 100 million dollar game.
With you and your adult baby friend.
well a little more basic of a question then, I currently have a blink I made myself (think nurse from dbd)
I have a blink indicator that shows where you will blink to
the only way I could get it to work was to store the indicator under the map, then when holding the blink key it sets it's location to the end of the line trace
then after it sets back under the map
is that an acceptable way to do it?
I feel like it's kind of inefficient
Does somebody know why this timer continues looping even when "is sprinting"= false ?
think ive fixed it thanks, if not found a temporary solution, need to look a bit at it
I think 'Looping' only reads during the initial Set Timer moment.
So you're setting it to loop indefinitely.
And then later when the Is Sprinting value changes, it doesn't matter.
when does this code run ? the timer most likely won't update when you change the variable only when you create the timer will it be relevant
Also - this is almost certainly not the best way of handling a stamina system.
(yet another moment to use Tick)
it only checks the boolean when it is triggered not every loop?
Yeah.
i decrease the stamina based on time why would i want to do that every tick?
You want to decrease at a rate, right? A certain amount per second?
That's what Tick is for.
imagine not knowing you're supposed to use tick sometimes
tick+deltatime would decrease it over time the same way a timer does though, only every single tick based on tick length rather then once every * amount of time.
i don't need to run it every single tick.
that's crazy
check is sprinting in the decrease stamina use a branch put the logic there ?
so this is what I was talking about. is this an efficient way of doing it?
yeah thats what i'm doing now 😄 i thought timers checked every loop whether the boolean was still true though, my b.
So you specifically want the subtractions to be chunky? Odd choice, but it's your game.
the stamina is not visually exposed to the player, there is no point in making the number go up/down any smoother.
i use tick where i need to, and avoid it where i can.
only the timer, not the entire logic.
Right, but 'the entire logic' would be a single boolean value.
"Is sprinting?"
If that makes or breaks your game - you're in trouble.
timers are really good for something to perform at a set amount, i feel like doing that on tick is less easy
no it would be all the different multipliers and variables checking how much to decrease stamina, checking current and max stamina etc.
you'll be doing all kinds of math to figure out a second
Why?
You want to reduce stamina by a certain amount while sprinting.
So on tick, you'd check 'Are we sprinting?' and if you are, then you subtract from the stamina.
That's it.
No complexity. Considerably less math than the transform update for a single background object.
The math to 'figure out a second' is a single multiplication. Tick comes in with a 'delta seconds' value, multiply your rate-per-second by that value and you have your modification you need to apply per frame.
I don't think either is really a problem tbh
Tick or Timer are both fine fwiw
Timer probably needs you to calc how much of the timer progressed already depending on the timer loop time, when you stop sprinting
I would probably do it on tick
I think what you’re doing works just fine depending on your needs. Just my two cents; If you wanted something cleaner, you could use “spawn actor of class” and just make sure it’s destroyed when it’s no longer in use. The class itself could follow wherever your hit location is while it’s spawned. I think that would prevent it clipping unexpectedly, if it ever happens with your setup
I did try doing that before and what happened was it spawned a ton of my indicators instead of just one, looking back at my code I figured out why
I need to run the spawn logic on started, and the move logic on triggered
How often do you want the stamina updated?
currently about once every .25 seconds.
(timer set to 0.05 for testing purposes)
That's fine for a timer but I wouldn't go any faster than that. Once you start approaching "I want it to be smooth" then you're in tick territory
Using a timer with anything within an order of magnitude of tick hz is just tick with extra steps.
mhm, i do for instance my health regen tick based, as the player would have those values visualized. for stamina i'm not too concerned if a player can sprint for an additional percentage of a second after it would of run out.
If you've already got health regen on tick just put the stamina there. It's probably possibly actually slower to have a second function handling stamina. Just put it all in one shot
hmm, but then i would be checking if stamina should regen every single tick even when it is not relevant. IE if stamina has recently been used or while stamina is full.
i know in the grand scheme of things checking a few booleans every tick is negligible, but if it is not necessary, then why?
The overhead cost of allocating and deallocating a timer is probably more than that.
By a lot.
i would likely still be running a timer for regaining stamina though as that would be on a several second cooldown. so the tick would run in addition to the timer, not in place of. which is a timer rather then a delay because i need to be able to reset the stamina regen cooldown from various different places.
touché did not know that was a thing.
appreciate ya'll trying to help me and taking the time to teach me though!
👍
Sorry for being pushy! I have a thing with people trying to avoid using tick for optimization purposes.
Hi I'm trying to change camera from third person to a fixed one. I'm loading a new camera inside level BP, it works but I can't make the HUD move again, any help?
quite possibly a dumb question. I have an actor that has a few "sub" actors that register their information with them on BeginPlay. It seems like the interface calls all happen at once, and only one makes it through each time. Is that a thing, or am I misunderstanding what's going on here?
i.e
elevator floor registers itself with the elevator on beginPlay, which in turn registers the floor with the UI widget
actually nevermind i see what it is
the panel widget wasn't ready. delaying the floor registration by one tick solved the problem.
Is there a "good" way to make gps? I need to make in hand device, and when i press LMB, it shows certain place on my map.
I made SceneCaptureComp2D under player, and activate it's image when LMB pressed, but i think there are better ways, but i can't find any 😦
Does anyone know why my new Pawn, using the Mover component, falls directly through the world even though I added box collision to it?
hello guys why my "projectile movement comp" always goes trough walls even with collision on sphere and Sprite
pretty easy, in a float variable, do: var += DelatTime;
i have used var * delta
yea but that's not going to callculate the time on tick
why this projectile has no collision i want that they stay on ground they are "bombs"
Mabye with constrain to strain? dont know why i have that problem
Sprite and Sphere collision are on Collision "Block All"
Hi guys, can someone help me on this? I was following a tutorial for a store but the guy in the video uses an inventory system that i don't need because I already have one, any solution to connect the Quantity/Item ID Integer to my S Item data structure.
How to add CPF. By selecting a variable this property is not active, I need to add a new flag?
Hey there! I was curious to see if anyone had tried to achieve this effect using CMC: as players walk up a steep slope, a force down the slope is applied more and more and then eventually forces players to slide down the slope. Similar to this effect in valheim (ignore the Sprint functionality, that seems easy enough):
How can I put a box around live players in a players camera? Im making an advanced soldier class that can see boxes around players like ESP hacks in games.
It shouldnt see enemies through walls, only when they are visible
Hi! i'm working on a attack range for my character where after clicking on a target I'd like to constantly know if its in range as only when its in range it enables my attack button. (Ranged attacks) My questions is, is it better to use a sphere collision and change boolean "InRange" to true if its overlapping with the character collision of the target? or is it better to do a line trace and calculate a distance between my character and the target? (If its the latter I think i might have to use event tick to check if the clicked target is in range?) Its a multiplayer game. what would be the best approach to this?
Is anyone else having problems with super slow SpawnActor ?
it literally locks up PIE
Traces are more performance friendly and sphere collision can sometimes miss
If you have anything close to a reasonable number of possible targets, just loop through the targets and do a distance test.
It will be cheaper and more accurate than physics tests.
Thanks! 🙂
If your game is multiplayer, you probably want to do this on the server, and distribute 'can target' values to each player - otherwise people can make hacks to give themselves infinite range by messing with that function.
this returns a character class that custom characters inherit from? the current possessed character?
I dont know what its named but how can I make this?
If you are unsure what something return, just print it to check
i just glossed over the mouse over tooltip "Character Object Reference"
This is a non trivial effect to pull off, and it will require some effort on your part. Here are the broad strokes.
- Attach a component or tag to all objects you want to flag with this effect.
- At runtime, determine from a list of those objects whether these objects are visible.
- Use the 'Project World to Screen' function to acquire the screen position of those objects. You can probably use their bounding volumes to get their extents, then convert each one of those extents into points on the screen.
- Add a ui canvas overlay and generate a square widget per visual object positioned where the projected points say they should be.
Draw a box around the actor bounds.
I would rank this as pretty solidly in the middle of 'intermediate' in terms of development challenge.
Anyone know how to do widgets for dedicated servers. In my controller I have custom event, then I have a box I interact with calling the event. Not sure how to connect target though, when I use the controller is says reference not found.
I tried to do something like this but
isnt look like working...
Also Im trying to make it multiplayer compatible so every player should see a box around that enemy
im confused by ur premis, but i dont think controllers are replicated
Get a grasp on singleplayer before jumping into multiplayer, especially dedicated servers
I ended up creating a billboard material and put it on a cube
It shows its a cube If I jump, but working fine otherwise
Cool solution!
That's easier though as it doesn't matter as much where you put things. I was able to get it working with listen server but don't want to go further with that because of cheating. So dedicated servers is the way.
No but the point of getting to know multiplayer is getting to know how to do it properly
You can still follow the proper way of using unreal's framework and figuring out referencing.
You're just hurting yourself by jumping into the hardest branch of multiplayer
Especially as it requires C++
And a source build of the engine
the only problem it being affected by post proccess effects, annoying...
I imagine it will also be visible around corners.
Going to learn proper way doing dedicated servers as it's the best way overall. Trouble is it doesn't seem many know how to setup multi and there's not many tutorials.
What you mean
If an enemy is just around the corner, you will probably see the square peek out before they're visible.
oh yes
Would be amazing if I could find a proper tutorial about this
But looks like nobody shows how to do specific things like this
Well I hope you've got the space and specs to compile a build from github source. :P
You're making things harder on yourself for nothing and setting yourself up for likely failure though. It's better to not only have released something first, but also be well versed in proper single player etiquette, and be quite familiar with C++ and Unreal's API for it.
Proceed with caution :P
⚠️
Eh, it’s like we’re saying the same things every day here lol
Only to be met with “nah, I got this” 😀
just enable the unreal multiplayer plugin and ez
🤩
Just do what those YouTubers “making games” in one week do. 1. Buy an asset that looks cool. 2. Buy a plug-in that does things for you. 3. Don’t know how to use any of them or how they work underneath or how to connect them. 4. Stick them on a template in world grid material and say you made a game
im getting crazy.
my character does a linetrace on tick, it looks for a specific Object Type (a custom i made).
the linetrace hits the boxs with this object type.
but if i create new boxs with the same object type, or even duplicate existing ones in existing actors, the linetrace doesnt hit
any ideas ?
Is there any node or function in unreal that could help me do something like that:
When holding mouse, draw circle, increase radius when you move mouse.
After releasing button, get actors under the circle?
I know there is Draw Rect and Select actors from rectangle, but is there something like that for circle?
Or I just do some math and create circle from rect? 😄
show the code
you're probably looking for a specific instance
sounds like you want an interface for this anyway
Will save that thanks. Currently I'm using blueprints to prototype then will convert to C++. With what I was doing previously it didn't matter as much where I created widgets so now I'm not sure if the correct way is to create them in the actor, controller, or character. Do you know?
@teal yoke Not expertly, but i seem to remember something about widgets knowing who creates them. I create them in my character though, then i can pass the information from my character into my menus, like an inventory / loadout.
i dont think its a code related thing, because i dont see WHY it would hit some boxs and not others (with same settings)
but here
FHitResult HitResult;
FCollisionQueryParams QueryParams;
QueryParams.AddIgnoredActor(GetOwner());
GetWorld()->LineTraceSingleByObjectType(
HitResult,
FocusStartPoint->GetComponentLocation(),
FocusStartPoint->GetComponentLocation() + (FocusStartPoint->GetForwardVector() * LineTraceLength),
FCollisionObjectQueryParams(ObjectTypes),
QueryParams
);
if (HitResult.GetActor() != LastFocusedActor)
{
bIsNewFocus = true;
if (IsValid(LastFocusedActor))
{
if (IsValid(FocusSceneComponent))
{
if (FocusSceneComponent->Implements<UFocusInterface>())
{
Execute_StopFocus(FocusSceneComponent,GetOwner(),LastFocusedActor);
}
LastFocusedActor = nullptr;
}
}
}
if (HitResult.GetActor())
{
if (bIsNewFocus)
{
LastFocusedActor = HitResult.GetActor();
TArray<UFocusSceneComponent*> FocusSceneComponents;
LastFocusedActor->GetComponents<UFocusSceneComponent>(FocusSceneComponents);
if (!FocusSceneComponents.IsEmpty() && IsValid(FocusSceneComponents[0]))
{
FocusSceneComponent = FocusSceneComponents[0];
UE_LOG(LogTemp,Warning,TEXT("Called Start Focus 1 %s"), *FocusSceneComponent->GetName());
if (FocusSceneComponent->Implements<UFocusInterface>())
{
Execute_StartFocus(FocusSceneComponent,GetOwner());
UE_LOG(LogTemp,Warning,TEXT("Called Start Focus 2"));
}
bIsNewFocus = false;
}
else
{
LastFocusedActor = nullptr;
}
}
}
maybe i should move to #cpp
anyone knows why the Ambience Componente doesn't work?
it's not valid when the custom event is called
*i was just about to ask a question, but while writing it I figured it out 💀 *
Can someone please explain this to me? One of 2 variables returns True, However the AND node prioritizes the False for some reason?
or gate?
oh sick
It works perfectly now, thanks @tulip anvil and @stoic ledge . I don't completely understand the logic, but I'll try and re-read it another time 😅
basically AND will only output True, if BOTH inputs are True
OR will result True if ANY input is True
And OR is the opposite?
what happens if I don't check this, should I check it ? I don't see any change
I'd check. If its false, you'll just have nonsense in the two vectors.
If I wanted to make a directional dodge and like lock my characters rotation only when Im targeting how would I do that?
'NAnd' is the opposite of 'and'
mhm I see
Does 'NAnd' function like 'AND' but with instead of true outputs, with false outputs?
NOR is the opposite of AND it results True if all inputs are False
not is just like the opposite, and is both, or is either
XOR is a good one to know, it's like an or (hence why it's called exclusive or) but it's only true if 1 is true, 1 is false
is it just | | in c++?
as you can see, following this logic, you can have XNOR which is only true if both are true or both are false
no, that's OR
these are just weird names, and / or -> Booleans are easy to understand
😅 gotta love logic gates xD now imagine being an electrician and getting it wrong means you get electrocuted 😛
xor is (A && !B) || (!A && B)
things are broken once again. i cant end this logic when i use a delay, any idea why? if i dont use a delay, it doesnt have time to do what i need it to do (kill all AI in a radius), but it does work and kill some before it shuts off as i change a bool to false at the end, if i use a delay before it turns the bool to false, it doesnt turn it to false ever and will keep killing AI infinitely
they make perfect sense once you understand their defenitions.
and why is that important?
XOR doesn't exist in c++
Yes it does, I just showed you how to make it lol
XOR does it?
to make it
because often you might want to check 2 bools and make sure only 1 and never both are true.
yes, an XOR is an assembly of other logic gates.
you just do booleans stuff randomly, not using XOR particulary
that is possibly the most false thing you could have said
XOR's are one of the fundamental logic gates and used everywhere
byu randomly, I meant your logic
no?
that's quite clearly not random
given it's a clear definition with clear outputs and well defined meaning for decades
do what you do with your booleans, dont do XOR.
I'm not sure if you just don't understand it, but don't advise other people to throw fundamental boolean logic out the window because of that
XOR is used everywhere in computing
'fundamental boolean logic'
ew
these logic gates are what the entire digital and electrical world relies on, almost every computer, processor, light switch, electrical grid node you name it... in the entire world... is just a combination of these logic gates. (plus a few extra things)
I can ensure you that I can do even more than these simple gates thingy
just be able to understand boolean
hell your computer right now is using xors everywhere to reset a register ready for an input
your processor is literally 99% made out of those logic gates
they have the nifty ability that anything xor itself is 0
01010010 xor 01010010 = 00000000
the amount of boolean logic gates within a single computer is litterally mind blowing xD
truly is
thats cool
I remember building part of a 6502 on bread boards with just logic gates, and it was insanely large after only finishing the ALU and the registers
this is bitsets
it was huge
yeah, an they are just a few atoms in width, insane
no, that's boolean logic
what do you think a boolean is, it's a 1 or a 0
a boolean, = 1 bit
well, sure most compilers pad them, but the fact remains is it's 2 states, which is by definition a bit
this is why you see uint8 bMybool : 1; Because it's a single bit, and you use it like a boolean
not to interrupt this conversation, but anyone know why my BPI isn't being called in my receiving BP after being activated in my character sender BP?
can I ask you smt, master?
You've not given it a button to call it on. That target node, needs to be a reference to a class that implements the interface
fire away
Quick question, how to get a channel in C++? channels can only be created in the editor preferance I think
You mean trace channels?
ye
It's rather unintuitive
wdym
Do you want the user defined ones?
both
would this work?
by user defined, you mean the 18?
Most people end up typedef'ing them because the naming is ass
For the engine ones, it's your standard, ECC_WorldDynamic, etc,
No. An interface isn't a magic function. You still need to call it on an instance of that object. your player is never a button, so calling it on yourself is never going to be able to call it on a button
type def is wrong tho
Alias are better
typedef isn't wrong, it's just the older version
People will fight that camp until the cows come home, but it doesn't really matter tbh
using is often less typing
and that's pretty much it
and bettter
Right. I forget my blueprint communication training :/. I should rewatch the video. Anyway that should help, appreciate it
I'm calling Ai MoveTo every tick, is this bad for performance?
Why you are doing this?
Are you want AI to always follow the player without even seeing it
no? shouldnt u call the function for the ai to move only once?
hmm idk. cuz if it doesnt matter imma be lazy and keep it every tick
What you want
Whats your purpose I mean
imma have it doing checks, so imma need to start it again after I cancel it
idk if ai move to triggers once or not
If you want to check it regularly in small intervals and from everywhere
You can decrease sensing interval
and increase the sensing range/angle
Putting things in event tick should be last thing to do
no, im just wondering if its bad for performance. if it is, I'll set it up to a do once
cuz maybe it does a check
I dont know what exactly you want, but If its possible to not use event tick, dont use event tick
Putting things in event tick is not the best thing you can do for performance
I cant open it in vs, so I cant see if there is an "already running" check or something
whatever
is there a way to constantly check things from begin play, but a bit less often than event tick so its more performant?
I think delay is better, but ive heard Timer By Event is just as bad, or worse than event tick. but if ur checking branches, its prob not that bad [dont hold me to it]
oh okay, and yeah im using a delay on my ai move to, but i was more thinking about other things.
I was thinking about using an in game clock, but nevermind.
wait I forgor, I need event tick for location anyways. does anyone know if its more expensive than adding velocity tho?
Rather than check things constantly, call functions or use dispatchers to signal that the thing happened.
but im usually checking if something happened by checking a variable with a branch from event tick
isnt that crazy? or does a tick not happen very quickly
And that's the wrong way to go about it.
You can use the variable to indicate that something may have already happened in the past to know that it happened, but you can still signal when something started.
oh but wait, i think i could maybe check if the variable reaches threshold where ever it was changed or incremented
could that work?
and actually to make my previous statement even worse, i have like 20 custom events from event tick, all of which are checking stuff, and when conditions are met, firing other stuff as well
When you adjust the variable that is when you'd do that check, and if your check is good, signal that something needs to happen.
okay, yeah that makes sense. im still very new to this so im doing alot of stuff quite wrong. my main goal is that things work, but also slowly learning better ways to achieve things
just the other day my dumbass incremented a variable 100 times in a row with a delay between each node.... just for a reload timer bar thingy...
i did use alot of timers but didnt occur to me at 5am that day
If an actor is destroyed upon closing the game and respawned on load, do the respawned actors not remember what Blueprint Interfaces they had implemented? I'm using a blueprint interface to communicate a changing integer between two BP classes and it works fine except for when the game is closed and reloaded, then it no longer outputs the exec or integer
its forgetting refrences to those outputs i think
i think you need to save and load the variables before and after closing the game
The integer I'm using is basically a timer though so that shouldnt be the issue since the timer is reinitiated upon GameInit
I believe this can sometimes happen if the interface is part of a plugin and gets loaded after your blueprints are loaded.
Not using any plugins with these BPs
@rain wraith what do you mean by closing the game and reload?
If I put a loop on the Get, will the branch be true if all of the array is activated?
If the game is closed and reopened; in this case, playing the level in the editor, stopping, then playing again
put a print string on tick and check if it implements interface
I'd be curious of the result
No, sorry. It doesn't work that way.
The way to do what you want is to use a 'loop with break'. You loop through the pillars, and if any of them aren't activated, you pipe that into the 'break' statement which will stop the loop.
If the loop completes normally, then you activate the portal.
Something like that ?
Close!
But rather than going from 'True' on the branch to the portal, go from 'completed' on the loop.
completed instead of loop body right ?
The 'Completed' pin shouldn't fire until the whole loop is passed.
yeah x)
oh, straight from completed to the portal ?
and only false on the branch ?
Yep!
Yep!
got it, it loops from the array, if a false is detected, the loop breaks, if none is detetected, it means the loop is complete then I can enable !
Yus!
Thanks 😄
👍
I originally did these by testing a boolean for true/false. At first I read this and was like I've already done that. But I went ahead and did it anyway and boom your approach made it so much easier to diagnose.
The integer from the BPI is used to control four different component transforms using array data. I only implemented saving/loading for the first transform component just to test before doing them all. Apparently even though there were no errors, this made the code not work since the 3 remaining component transforms were receiving NULL array data. Unplugged the the three set world transforms and everything is working. Now I can add the save/load for the other 3 transforms.
THANK YOU! <33333
One other question: for the "Get Bone Transform" node, is there any way to get the transforms of all the bones in a skeletal mesh? Or do I have to gruesomely set up duplicated of "Get Bone Transform" for every bone in the skeletal mesh
There are... not a lot of scenarios where that would be necessary. What are you trying to do?
For VR Hands, I want to get all of the rotations of the fingers in the skeltal mesh, for both hands
The rotation data will get saved into an array, then the array data is used to playback the bone transforms - sort of like a recording but in 3D space
For what though? Like - you're describing a method, but not an intent. Why make this recording?
Because it's for my simulation, for a uni class
I don't see the relevancy of the intent for this
Well, many things that someone might believe they need to read all the bone information per frame probably don't. I've seen people do that to attach particle emitters for effects.
People do weird shit!
If you need to record it for playback, you could probably use the sequence recorder, but the results of that are not easily accessible live - it's to create a sequence to be played back later.
So, if you needed to record the data for a cinematic or playback - again, there are tools for that, and the approach would be different.
The why you are doing a thing is always essential to include.
Whoops missend, one sec
I suppose. The intent here is a simulation which can, at runtime, record the live movement of a player's hands and then, at runtime on their VR device, replay all of the recorded gestures of the VR hands through a duplicated pawn that is spawned in.
And have the hand data be able to be saved/loaded
Hmm - a non trivial challenge that. The sequence classes in unreal that normally serve to store and retrieve animation data are not easily accessible even in c++. Getting access to them to write curve data is a bit of a headache.
And they're very inaccessible to blueprint, especially for writing data, so you'll have to record your data to arrays. The other problem is that your data will not be of a consistent framerate, as your game's framerate is dynamic - so you'll have to record the timestamps with each key.
Already have the custom timestamps set up 😉
Then you'll have trouble with playback. Because you can't easily record actual animation or curve data, the playback is going to need to be lerped between keys - so you'll have to build your own animation player.
I've already made the recording and replay system for the whole body of the VR simulation - I just want to now added the skeletal mesh transforms of the hands for added realism
All right, good luck.
I suppose something like this might work
Is there a way to get the number of bones from a component?
Note that the values you get from "Get Bone Transform" are always from the previous frame if acquired from the blueprint VM.
Dope, thank you
Heya all, is there a way to get all the gameplay tags at a specific level in the hierarchy? Like if I have Items.Names[10 names in this category] would return a tag containter with just those 10 tags?
I feel like this is a tag query thing, but the pattern is escaping me...
Would a delay in a BP for loop would work as expected and wait the delay between each iteration?
How do I cancel or succeed an Ai MoveTo? Acceptance Radius was working an hour ago, but I changed something and now its not.
If the false condition is never hit, then the value of Acceptance Radius variable will be whatever the default value is.
oh wait ya, but its just locking up the world position. ok nvm I found it, Stop Logic and Stop Movement from Brain Component of AIController
Hi everyone, I was hoping I could get some help. I've created two interface bp for a male and female character customizer. I feel the event OnWidgetConstructed is keeping everything in sync. Any idea what adjustments I need to make to split the interfaces? Thanks
When you say 'interface', do you mean a Interface Class, like one of these:
Blueprints that declare functions to define an interface between Blueprints.
Or do you mean a widget / ui?
Of a particular type, or just any component? And how many of them are in the scene?
Weird choice. They're not actors - they're components?
anyone know about this thing?
My apologies, I meant widget/ui
You could test and find out. Should be pretty quick
Testing is always best, but I don't think so, no.
No, it wouldn't.
You could create your own looping macro that can accomodate a delay though.
All right, cool. I was very confused. I'm still a little confused. What do you mean by 'split the interfaces' and why is 'OnWidgetConstructed' keeping things in sync? Why do you want things to be 'in sync'?
Or you could use a timer!
(this is a place to use a timer)
mhm
maybe coroutines would work
That doesn’t have anything to do with a delay in a loop
And depending what you did would probably be the opposite of what you want XD
what message are you responding to lol
Are those all in the same blueprint?
Your co routines comment
there's no node LMAO
Would look like this.
coroutines are exactly what I want, just trying to find other ways to do it too
Uh huh. If you say so you could also do the example someone kindly presented
maccros...
I actually don't want each widget to be in sync. Here's a video showcasing my issue. The event OnWidgetConstructed is the same in both widget bp so I thought the issue may be coming from there
OK, well... is your character always going to be in the middle?
The standard blueprint loops in unreal are macros
aren't they? they do stuff whenever yo uwant and comeback whenever you want
You seem to know already but no
yea I know, I just don't like them cuz it always seems overcomplicated
I don't understand the issue. You're showing the different characters. Stuff seems to be working fine?
All right, well - if you want to get the distance between two objects (components or otherwise) you can subtract their world positions from each other and get the 'length' of the resulting vector.
Is it just me or you should load Async, because there's a lag
Do that with your six arrows, and choose the one with the shortest length.
did you create it yourself?
Yeah I just copied the existing ForEach macro and threw in the delay where it woudl need to go 😛
Did you notice how I selected female and then went back and selected male but the female mesh is still selected? That's the issue I'm having
I didn't, I did notice that there is a button you press to switch. So that's working, right?
did you make your entire game, or is it a model already made?
The problem is that when you use one of the main buttons, it doesn't switch.
There is a 'distance' node, but I think it's for actors.
You could look at that though.
No, it's a model already made
Loops!
Yes, but I'm trying to make it so that when you select male, it's default male mesh and vice versa, no need to switch
OK, so debug routine:
- Confirm that the female widget is actually in the main ui, and you don't have two of the male ones.
- Confirm that the female widget is actually designed to show the female character, and doesn't accidentally have the male characters meshes in there.
- Put a break point on the part where the main characters mesh is selected. Step through to see the values as it's assembled.
And there's a bug in it? ew
Thanks for all your help! I'll give these a try
How is one supposed to debug blueprint code for a packaged server running outside the editor?
I have a bug which only seems to happen on packaged server builds, not in PIE multiplayer mode.
It's not necessarily a bug, I think it has more to do with how the original bp is constructed
how much was the pack? but yea sometimes you might want to change things up
Hey guys, Is there any way to convert enum to display_name?
I need it 'cause I found the intersection between classname and enum name so if it possible, I don't have to use switch anymore
So My questions are below
- can I get class with name? (even using C++ that's okay)
- can I get enum display name?
I'm trying to trigger the function in BP_Portal from BP_SocketMaster by using an interface, but I don't know what to use as a target, and I could use some help...
how so?
coroutines are functions that can be paused and resumed, if I had
TCoroutine<> MyDelayedLoopFunc(float delayBetweenLoops)
{
for(int i = 0; i < 100; ++i)
{
SomeLogic();
co_await Seconds(delayBetweenLoops);
}
}
Then this would do a loop, wait x seconds, do another loop, wait x seconds and so on until I have done 100 loops.
I'd love for you to go in detail though of what your understanding of coroutines are
It will need to be a reference to whatever instance of BP_Portal you want it to run on
Does anyone know if there's a switch node that can compare object references?
No
RIP
Yeah I'm trying to get something modular
I want to be able to intake an actor to define which array to assign some data to
Actor components can give you modularity
Yeah I'm already doing actor components
In before Authaer hehe !
I just meant for the actual flowthrough of the code
Casts are too predefined for what I wanted
You can get these things. but generally you should not unless it's explicitly for debugging purposes. Enums should just be a named integer to make it easier on the developer to understand the use of each number and that is as far as the name should go. It's metadata not meant for any end use.
Well you don’t need a cast if you’re using an actor component @pallid gorge
Well like I said it's more about defining where it goes once it's in the component
I need it to build an array for each unique entry and then be able to switch back and forth for which one it puts any new info related to that entry in
I can piece it all together the long way but I was hoping a more sucinct switch option would exist
The same thing you'd use for the target as if you were casting. If you're not familiar with pointers/references and how to use them to call functions on things I would start with going through this. https://www.youtube.com/watch?v=EM_HYqQdToE
How do I get the normal rotation of a surface hit by a line trace? I'm scratching my head here. I have a line trace a bit in front of my camera pointing straight down. When I approach an object I want to make sure the surface I hit it is close to horizontal before doing the rest of my code, but I can't dont really understand how to get that information from either the normal or inpact normal from the line trace.
Perfectly horizontal will dotproduct with UpVector or 0,0,1 with an output of 1. As they're the same facing. So you dotproduct your line trace hit result with up vector and pick a number you want as the allowance like 0.95 or so. The closer they are the closer to one. The closer to perpendicular like a cliff wall it'll be closer to zero. And if you line traced a roof it would be closer to -1
Hmm I figured it out simply way I use 'map' key: enum name, value: Class reference can I make in this way?
Why not just use the enum as the key instead of it's name?
hmm... i'm probably doing something wrong because I get a dot product of 1 even if the surface is vertical
wdym it's name? enum's display name?
Good afternoon, in the first function I created a local variable in BluePrint how can I set it in another function?
You said that. key: enum name, value: Class reference
This looks fine. You should definitely be seeing like 0 here if you line traced a flat wall.
Yeah, I do this to get class reference by name (string) but is there other way?
ok i think my problem is that when i walk to close the line trace starts inside the wall and some funky stuff happens. if i add a line trace before that prevents the it if it's not free it seems to solve it for now. don't know if it's the smoothest way to do it though
It's fine if it gets you the results you want. 😄
Yeah definitely that's true haha
About class names. There's a way to get a class via names.. Aliasing might work better though.
Oh How can I do that? is there any functions?
This conversation kind highlights aliases. #blueprint message
All classes can be named via their relative path in the project. Some stuff like GameMode's arguments in the URL support aliases that you can specify for shorter class names, but I've never looked into how they work. May be automatic. But you can utilize SoftObjectPath stuff to convert a thing's string into a softobjectclass which can then be loaded or resolved to work as a class.
🙂 thanks for the help!
Ahhh wow I never saw that function So If i used that don't need the 'map' variable anymore?
Depends on what you want. I'm not personally a fan of using strings to do things unless it's necessary.
Yeah me too but it's necessary in this case 'cause it's prevent to use switch
I created a variable, but why can't I set another additional flag in its properties? Below is an example screenshot of what I need to add https://cdn.discordapp.com/attachments/807679433002975292/1238788812415565875/image.png?ex=66408f7c&is=663f3dfc&hm=772357a4f015987e7d16a86c6abad0c2d7baf5c15037d0ad65d789eff850aa63&
This is my screenshot
Hey ! I'm having a problem;
I'm retargeting animations; and everything works just fine, except for arms twists.
Arms twists, in the preview, work fine (screen 1), but once in game, it seems not to apply (screen 2); any ideas ?
Hi all, Having trouble using an assett and using it over the base unreal thirdperson BP as it has so many points instead of just body. ie, hand, upper arm etc. Please help
In my project idk why engine Scalability get automatically to epic when I open my project is there any way to permanently set Scalability so even when I package my game it remains same
Does anybody know what would be the best container to hold multiple types of data, namely an animation and several ints/floats that can be easily accessed by other blueprints? I was initially trying to use structs but I couldn't find any way to define them outside the scope of the blueprint that I want to reference them in
If it helps I'm ultimately trying to build a combo system where the player can choose which attacks they do and in which order which is why I don't want to just define it all as a default chain within the blueprint
DataAsset
Is there a class you'd recommend?
you use the normal DataAsset class as base
What is a Data Asset in Unreal Engine 4.
Followup video showing how use Blueprints Only for Data Assets using the Primary Data Asset type: https://youtu.be/hcwo5m8E_1o
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/CPP-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these exampl...
That's what I selected and it gave me this
Is there an easy way to check for multiple gameplay tags at once? Feels like you should be able to click multiple boxes here but thats not possible right?
maybe I stumbled upon it
THAT WAS EXACTLY WHAT I WANTED LOL
I knew that bro was wrong
Hey, trying to get the cheat manager working in my Dedicated Server Project. It won’t seem to work.
Steps:
- I have sub-classed from the standard Cheat Manager
- Created a custom function with test strings for successful fire
- Enabled Exec. so that the function can be called from console
- Added this custom cheat class to the cheat manager in the active PlayerController
- PIE and attempt to call function via console command
- Error, command not recognised (but it appears in the drop down)
Any idea why? Do I need to set something up on the server? Do I need to enable cheats anywhere? Just trying to get it working in Editor first.
Tick is frame based so it can give different results, you can use event on timer if you need exact timed checks. Also depends on how many checks you need to do. If your checks are not needed to be always instantly applied, just use event on timer with the interval you need. Event tick is not very performance effective on blueprint
You can use event tick for things like camera shake etc where you always need a check.
oh okay, thanks
Hey I'm not sure if it directly supports just plugging commands straight the editor console, see if this works. If it works we know what the problem is
Actually you did mention you enabled exec which should do that
What's the best way to make a beam weapon? Like a solid beam from barrel to target. Would I still use projectiles for the damage, or some other method?
Yeah tried that already, thanks for the reply, no luck, which makes me wonder if any other setup is required
hi, if i want to move instance 0 and instance 2 and instance 4 and instance 6... i have to call the last function each time?
is there a way to set the instances that i want to move? and do it in 1 call. if need them to all do the same movement at the same time
Hate to scare you but it is looking like you might need to configure it in c++ and project settings.
I have found online there are some dodgy ways to do it in blueprint but you'll need to prefix the command with ce than your command
That's no problem, have a lot of C++ code already
Do you have any more detailed guidance? Do I just type CE [MyCommandHere]?
Hate to refer you to YT but this looks decent, don't think it's best practice https://www.youtube.com/watch?v=TmzC5rE_cAQ
tried to prevent the thumbnail and it showed up anyway...
Watching the video, not exactly sure what timestamp would help? Doesn't look like this is using the cheat manager at all. Considering it doesn't work custom BP either, would this not be a mis-setup of the cheat manager?
Like I said it's probably a dodgy way of implementing it. Let me do a little research and see what I can find
i think if you wrap a link in <> it will get rid of the preview
Literally just the exec should work...
Doing some more debugging... I have made it work sending a RPC to the server from the Player Character!
So... How do you send RPCs using the console for the cheat manager...
This is giving me ptsd of the spaghetti for my RPCs
Is the console command triggering at all?
is there a way to make object move at the exact same time?
here we can see i have a delay
Yes, it works perfectly using the player to send the RPC and then call the cheat class. The Function is on the cheat manager itself
Yeah but as in when you type in the command on the console
Now that's interesting
an image typically doesn't show movement, but are you saying the blocks are not raising evenly ?
they don't move at the same time. but it's normal i use a lerp on each of them in a for each loop, so it's 1 after 1
Apart from restarting unreal, no idea.
you can see by the fact they are not at the same Z position
i'm moving them on the Z axis only
up and down movement
so it's "normal" you figured a different way ?
no 'im asking if there is a good way to achieve that?
because for me a loop is not a good way to achieve that
it's instances of an Hierachical Instanced Static Mesh
idk how performant it is or anything about instanced meshes, but could you have an interp on tick where you set a variable and it moves to it. You would then loop through and set the z, it would move to it. Just an idea could be way off
but that would mean that all my instance are able to listen to the variable. and it looks it's not the case (maybe an advance feature?)
i mean one variable for each, or perhaps one for all ig
but i was saying have a z that it interps to
so then you set the z and it moves to it
if you loop through and set the z's, they might go a bit closer together
that's what i'm doing now
right but like you said you lerp which is causing a problem ?
Might have found it... Just tried recreating the cheat manager in C++ using a replicated function and this is the error it gives me...
well if your looping and lerping, i'm saying on tick have it interp to the location, and setting the z will make it goto the z smoothly, so by the time the loop is over all z's are set, and they will move
it's an idea instead of how you are doing it, don't know how performant that is, a lot of ticks
Just make the exec call a replicated function
But then I will have to create two functions for every test... Or a one-to-many function with references and parse / pass the input string...
erughhh
Back to plan A I think... Gonna get some Tomato sauce and make some Spaghetti 🍝
Thanks for your help man 🙂
I have an event with a finished event which is 2 different functions with another trigger function for 1 thing, spaghetti 🍝
Hey can anyone help me figure out what I need to look into to make a system where players can choose an option from a dropdown menu a different pattern? Think of like picking a wallpaper for an in game wall like in sims. Google is giving me ntohing atm.
i think it should be easy as just set material ?
So like on clicked, set material on a ui button
Nevwr done anything like this before so idk
I imagine its simple but dk where to start
Is there like a set texture from an array of tectures kinda thing I can put in a dropdown menu
Like a switch in 1 master mat?
Is this a bug or am I missing something?
Uniform Grid Panel is not valid if i dont add it to screen before calling reference
Hi, can anyone tell me what this error means ? I'm pretty new to this so any help would be very appreciated.
accessed none usually means something is empty that your trying to access
for instance a variable not set, or a cast failed and your trying to access a value from the bp
I was trying to access a value from a Data Table that is used for stats in my game.
CombatComponent is empty, somethings wrong with the variable
Hello everyone, I have a question. I'm not sure if you can help me because it's related to Houdini and Houdini Engine. But mainly, I'm not very comfortable with Unreal Engine's blueprint.
I have an HDA that I imported into Unreal Engine. This HDA has a button (mapdownloadButton), and I would like, for now, with a blueprint, that when I press this button, a phrase appears in the Unreal logs. So I created a blueprint, added a HoudiniAssetComponent, selected my HDA in the details tab, and added an OnClicked event to attach my Print. However, for now, no matter which button I press, nothing prints. Additionally, I would like to specify that it's indeed the mapdownloadButton that triggers the message display.
Perhaps I'm searching incorrectly at the moment, but I can't find many resources on this topic.
Is it possible that the data table is not imported correctly?
I understand Material-Instances can be saved as assets and used, swapping some parameters. Is there a way to do that with Static-Meshes as well? In the foliage editor, I can override my material (different leaf colors), but I can't add multiple of the same static mesh into the foliage editor. Any ideas or better way to accomplish this? (I still want to keep the same static mesh, for performance reasons)
Looks like your CombatComponentReference is invalid, so do an IsValid check before accessing it (looks like you are). Or within the Component, the BattleBegin function has an invalid reference
Im attaching a weapon actor to a player hand bone with a relative transfrom so the weapon is grabbed in the correct place. same with picked up weapon attachments, But I want to do a method where Im directly attatching the player hand to the attachments on the weapon using the same relative transform , So I tried to just attatch the hand to an attachment using snap to and then setting the relative transfrom of the attatched hand . But this is where I keep failing . does anyone have any advice
I tried deleting it and readding it and for some reason now it works but it still wont load the data from the Data Table.
So it says "vaild" now with your print? If that's the case, is your struct "Unit Stat Modifier" being set properly before this function is called?
also you can set a breakpoint on MP Max, and look at the values while the game is running+paused
I didnt check that but now I can see that Row is not found because the debug string is visible
Thanks for helping by the way 😄 @signal bane
Npnp, Is your row named an integer? I see "UnitLevel" is being converted to a row name
also you aren't connecting Out Row--->Base Unit Stats lol
oh i deleted it
I'm really sorry but I don't get what you are saying here 😦
I was following a tutorial and I think that it was basically an integer for the unit, and I was supposed to convert it to a string?
Give me a screenshot of your table, and what is the value of "UnitLevel"
value of unit level is 1 (i think)
Ok, that looks fine then. You see how the integer is looking up the row name of "1".
If you put a breakpoint on the GetDataTableRow, can you see the values being pulled?
hehehehehe
Man, visual scripting is hard
it works 😄
nice
Hi, can someone help find a way to make my store buy quantity/ item id join/work with my player inventory?
I think next time I should just go with the usual C++ Scripting since I actually know how to do that..
Again, thanks for the help @signal bane
I think learning both is the way. You can't do everything with only C++. Sure np. Also I recommend this video if you like C++: https://www.youtube.com/watch?v=VMZftEVDuCE
It's not an either/or decision. Learn what makes C++ and Blueprints different, what they have in common, and how to use them together effectively. We'll also learn a thing or two about performance optimization and some basic software design concepts.
Read the article version: http://awforsythe.com/unreal/blueprints_vs_cpp/
00:00 - Introduction...
You can do most things in blueprint though imo
99%
What would be the best way to make a projectile (arrow), that will ignore everything (colision and other actors), but the target it goes to?
Currently I have projectile that is beeing targeted, it's flying to the target, and it doesn't collide if the unit is ally, but at the same time it does collide with other ''arrow/ball" when I throw it again. The question is, what. in the simpliest way to make it, so if there is set target on projectile/arrow, it will ignore EVERYTHING, but not the target and it will hit it no matter what? On the screen you can see, ball is blocked by ''ally'', but when next ball is coming, it will explode (doesn't deal dmg because it collides with itself. It works with the ''enemy'', as it will hit it and dmg and destroy itself, but I have hard time thinking of making it more simple which is basically, ignore all, but target. Or will it actually be more complicated than I think?
Is it possible to trigger an event when a player leaves or enters any trigger box ? not just one specific one ?
yes
and I see how an object with physics turned on overlapping another static object
how can i fix it?
how ?
i'd use interface to message all actors with interface/class
you still use collide
does it have collision box or just mesh?
sorry, I'm very new to programming so not sure what that means
could you explain in terms of nodes to use ?
it's not really about nodes, Your character need collision sphere or anything to dectect overlaps, then just get overlaped actor, check if it's proper class or have interface and use interface message to trigger event on all actors of class/with interface
or other way around, have box detect player and send message to all other boxes
hmm maybe I'm not approaching what I'm trying to do the right way
there aren't many nodes used, just get actors with interface/of class and message. From event side just implement event from interface
what do you want to do?
any help on this one?
basically I'm trying to tell the player when they're approaching the world border, it's easy enough with one trigger box, just show a widget saying "close to world border" when in the trigger box, and remove it when outside of it
the problem is when I have several overlapping trigger boxes
(since I need 5 to cover the shape of my map)
on the overlapping triggerboxes it's just getting confused
i.e creating multiple instances of that same widget
and not removing it when stepping out of the trigger box
sorry, I hope I'm explaining this well
you could have the player see if they're overlapping another "World border triggerbox" when leaving one of the overlaps.
Using GetOverlappingActors with those trigger boxes as a class filter.
just mesh
i don't know really, does duplicating it with new material cost that much performance?
I wanted to have 5 varations, so I would like to keep the same mesh for instance purposes
just do it as said, if its actor just implement interface in class setting with function "warn player end of the map" or sth and call if if he enter it and another one to remove. Or just simple make call for begin overlap/end overlap
and use the same box multiple times, even't will work for every instance
cheers, Ill give that a go :)
collision preset probably, try custom, block all for everything and check if mesh have collision at all
You can have actor with random material applied at creation. NVM, i found a way
5$ xD
in folliage painter, paint whatever you want. then Save instance
then you can add same mesh again and overide material
Guys, I need small tip! I almost made it work. Right now, the projectile (ball), is only exploding when it's colliding exactly with the target that was set. The problem is, that when it's other actor in the way, projectile will just stop on it (since it's not the target).
The code so far looks like this.
Before I check maybe if I used get overlapping actors would work better here, I wanted to ask you for hints.
are other object actors or meshes on map?
What do you mean? 😛
Awesome! that worked great, thanks~
np
this blueprint bool, why compare it to target?
I want the collision and the explosion to happen only if it's colliding with the target, like I don't want collision to happen with everything, but the target if that makes sense.
Ok, that confused me because you said it stops on others. So how should it behave with others?
It should ignore everything
and go straight to target
like auto aimed bullet let's say
Maybe create new collision preset and apply it to target
And set ball to ignore everything but that preset
I will try, good idea
Hello, We can't put a break point inside a Timer by Event ??
what does component activation do, and if i bind to its event when does it activate in relation to constructor and begin play?
while or for loop with break?
and make timer as variable, and invalidate it then you finish
the timer will never finish here, but the fact is that i would like to see what i have inside my calculted index
but i can't because the breakpoint are not reached
Alright time to disect another poorly documented node in BP. What does the Set Show Mouse Cursor node actually do in the player controller beside turning the mouse visible.
I notice that if I use this node, and click with left/right mouse button, I lose control over my pawn. Why is this?
You can use loop with break to break it when it reaches certain value
Then invalidate timer when it completes
Maybe I don't get what you want to achieve
Beginner to Blueprints in Unreal and Programming in general. I'm trying to set up a Reload timer that shows up on the Player Hud. I have a reference to the "reloadSpeed" float variable, and "reloadMaxSpeed" float variable. At the start of the game I set my reloadSpeed float to reloadMax float, and have a boolean "canReload" that looks if the Player's Current Ammo is "not equal" to their Max Ammo, and then lets them reload if that is true, it then sets their Current Ammo to their Max Ammo.
That's working well.
However, it's hard for the player to know how long they have until their next reload, and I want that to be a variable that changes if the player picks up a powerup that decreases the time it takes to reload their weapon. I'd like to have it where their reloadSpeed float needs to equal the reloadMaxSpeed value before the canReload boolean changes to true.
My thought was to use a Slider in the WBP_Hud that I created but I cannot for the life of me figure out how to use Delta Time with a Float properly, or if that is how you even do that. Any tips/suggestions for nodes to use?
Probably goes to click events. Either for specific mode like rats games or menu clicking
Do you have input set to game only or game and menu?
Neither, I just left it as default and have changed the class defaults to show mouse cursor by default. I find it perculiar that this bool changes so much in terms of functionality.
In a scenario where we have buttons for time control on the screen in the game UI, we would want players to be able to click those, without losing control of the camera pawn right?
You need some kind of time flow. Either event tick, I know it's bad but for something that small it's ok or timer by event. Or timeline node
I try to find situation when you want to control camera and UI at the same time
I'll look at the timeline node, thanks!
Right, I might just make it different then I suppose. Players will have to hold either right click or a different button for camera rotation to work, then if they do not, they can interact with the UI as normal.
Hello again ! Is it possible to edit a blueprint in the level itself ?
Edit level blueprint
why if I copied everything (ctrl+c-ctrl v) the second one doesn't work?
thankies !
i put a break point, but it doesn't stop. my question was is timer doesn't allow to reach the breakpoing?
where is that option ?
In main editor window, not blueprint, there's icon on top with blueprint, click and find it there..I'm on phone and can't make shot
You need to specify it when it's breaked. Must connect execution pin based on some comparison (branch)
mmm i don't understand
If anyone will need in the future: Solution: Set overlap all on preset, and then the code should look like this. It ignores everything, but not target, just as I wanted.
how to check which side of the door the AI is on?
for the player I do it this way
Add arrow to doors
Just to make this visual for you. Take a look at this screenshot.
When we run the for each loop with break macro, we check each loop if something is true about the array element we are inspecting. If it is, we can connect the execution line to the Break input to stop the for each loop from continuing its functionality.
What do you mean
Arrow component to door actor
ok, but how is this going to help me?
oh, sorry my question was moreso, if I have a blueprint with two cubes, could I drag the cubes around in the level itself instead of having to open the blueprint to edit the cube's location ?
cheers ! Ill do that
Not make,place..if it's the same.functionality
Just for technicalities; You could do this, but it would involve setting up exposed vector variables inside of the actor, enabling the 3D widget setting, and then in the construction script setting the location of each cube to the world location of each exposed vector variable.
There aren't many scenarios in which this approach would be justified though 🙂
If I position an actor in a character hand and get the relative tranform , How Could I also use that transfrom the other way around and attatch the hand the the actor with the same relative transfrom
everthing I have tried has failed to give proper results
Wouldn't it involve procedural animation?
Considering that #game-features-system is being archived I wanted to ask here:
What kinds of features/content should be made within the GFS vs the normal content folder? For example, let's say I wanted to have an open world game with progression based events (ie. only after X boss was defeated). It seems like GFS would be a great way to do this as you could simple enable an event after a specified progress point and have it spawn the event as needed and add the respective enemies to some world enemy spawner.
This makes sense, but I'm wondering if this logic would also apply to a player's combat system. Assuming you are using GAS as well, would it make sense to have the player's core combat (ie. melee attacks) be built around GFS and added to the player, even if they are never removed? For multiplayer games, it'd make sense to use GFS for combat as your player could have many states, but in an RPG it might not.
Hoping for some clarification here and confirmation that my thinking is correct.
interesting ! Way beyond my skillset but I appreciate it 😄
Or editing bones to attach points, I'm not really experienced in animations
only difference i see is its using a different interface.
How to make "Joins after seconds" go unhidden after I check the box? Is there some sort of "On checked" event I can use?
but it's not a foreach
Bool
when im talking about the breakpoint it's thata
Okay, so then do the same thing but then with the For Loop With Break?
Same methodology for for loop with break
Right, you are talking about a debugging breakpoint
XD
What do you mean by "reload timer"?
Select instance at top to monitor it
what would a reload timer of 0.5s mean?
so the normal node doesn't allow the breakpoint?
That happens during runtime, if your code flow runs into the ForLoop. It will pause runtime and navigate to the node that triggered the breakpoint. This happens automatically as far as I know.
And if it isn't triggering, then it means your code flow isn't reaching that node. Which means to enable breakpoints earlier in your flow until you find the problem
no
yeah I've changed it but its literally the same interface duplicated
ok, because i was sure i'm into the node beacause my actor move, but i was not stop
does it work if you change the interface back?
wait, are you expecting both to run at the same time?
they can't?
Why?
Does the thing you're hitting implement the 2nd interface?
they dont have the same name
you need to call both separately
Do 1 line trace and do 2 interface calls on the hit thing, if that's really what you're after
Hit the thing -> tell it Interact -> tell it Consume
Although 2 interfaces like this is really a code smell.
What is meant to be the difference between them?
What I want to do is make one for "interact" and another for "consume"
Does the same input do both?
ok then do that
have both inputs trigger the same code
add a 2nd input that calls the 2nd event
The object is attatched to the hand bone & I have a ( relative transfrom ) how can I get the opposite of this transfrom if I wanted to instead attatch the hand to the object?
Then get target from line trace and store it. If you input make it behave accordingly
What is the gameplay purpose here? What are you interacting with, and what are you consuming?
Why doesn't interaction with a consumable just consume it
could be a consumable in the world, like a location where you can attain a buff
and what does interaction with the thing do?
one button is for putting the item in the inventory and the other to consume it
ok
that makes sense
I'd make a single interface and probably just give it 2 functions, ShortInteract and LongInteract. Do a lot of things have this sort of mechanic?
like weapons, is it pick up / equip?
Hello guys, a question when I stop owning a character to own another, is the first character left without a controller or is it taken over by the AIController? I want to make it possible to control a PET but when it is not controlled it will follow me
You can attach ai controller to it
nope, only pick up battery for flashlight and eat to heal
When you line trace you can store actor in var. Then when pressed consume or interact with that stored var
And when you end trace make var empty
There are multiple ways to do it. One interface needed really
and how can I do that? I am new with UE 💀
Wait, I looked at screen. To be honest it should work as it is. Does it print?
Does target have event assigned for consume?
interact works fine but when I duplicated it to "consume" it just doesn't work
Show your current code
When you press button for consume, does it print? Do you have input mapped?
Do you have a 2nd input?
enhanced input? yes
Input action
yes
So it should print Hello when you press it, what about other side. Does it print when called by message?
And put debug breakpoint on consume message. See if it have proper values
the two print its just that the line trace just doesn't work in the consume part
need help. I write that.
Column and roaws both = 5
i expect to have 5 print betwen 0 and 35
but i have only 1 print, value between 36 ad 41
lol
Do you print I loop body?
yes
okay now the line trace pops up but it looks different I think that's why it doesn't work
the one with balls is the one that works (interact)
Did you lie? XD
no, it's just after a timeline
What else is on the loop body?
my timer = 3 seconds and my timeline = 3 sec as well
and i'm connected to the Play froms start
so i assume it's restart before finishing the timeline
but why the value will be between 36 and 41..
i give up
Hey is there a way in Common UI to Display Actions in Action Bar without define the Key on a Button? Because at the current state i have to move the button out of the viewport so that its displayed in the ActionBar without showing the Button
index 1 doesn't start to 0
yeah yeah
i'm tired
best things to do, take a break for today 😄
let's go play Solo Leveling
Take a nap
already 11PM.. it will not be a nap 😄
THE nap
and i had in mind that each loop will create it's own timeline lol 😄
with the dark side of the force it was possible
I've put that I can change the float variable of a blueprint via widget.. but when I start the game that variable is not changed.. why ?? print string works correctly
what's the idiomatic way to test out different versions of a blueprint? for example, if I want to try creating a version of my blueprint actor (placed in a level) where a single node is changed, but still be able to revert back to the original, is there a way to do that conveniently? I assume I can just undo and redo my changes back and forth, but that seems inefficient and potentially destructive if something goes wrong
default value will always be called on start unless you save it in game save file
not true... if you change the default value..bte im changing instance variableù
make a duplicate of the BP before you make changes as backup, also allows you to compare quick between old/new and you can copy over code from old/new
Why my variable value doesn't change?
does it goto true ?
yes
did you try to make sure what was comming out of get value is correct ?
Also is there only one of those actor in there ?
"that" exacly
even if its one it will go to void
use interface and pass float with message
Yes
I don't need to if there's only one
if you get all actors of class maybe
i would look at that get value, make sure it's what your looking for
what do you think is the best naming convention for blueprint interfaces? I considered using BPIF_ or IF?
there's none, most of people use BPI_ xxx I think, whatever suits you and you stay with it
i like bpi
Hello everyone! Trying my first ever project on UE5, can i ask here for help with blueprints that i can't find online?
you can ask for help but nobody here will freely help you put together any blueprint you want. there is an expectation for you to try and do things/make things/learn things yourself as well. if you run into roadblocks or struggle to figure out how something works or trying to resolve a problem or the likes people here will gladly help you in most cases.
Well i've been trying to follow this guide to create footsteps sound for my first person character with no mesh/animations https://dev.epicgames.com/community/learning/recommended-community-tutorial/WzJ/creating-first-person-footfalls-with-metasounds But i think it's outdated. I can make everything work except the footsteps sound immediatly start as soon as i start the game and only stop if i both jump and move forward at the same time. Can't find solutions online, i'll send some screenshots of my code, let me know anyone can help me figure out what's wrong.
hey, so im trying to make a buyable door using a blueprint, but i dont know how to do it basically
i have this, but the widget appears even outside of the box
You cast to bp_player, yet dont follow with it
Footsteps are usually something you'd build into notifies in your animation rather than having the game logic itself trigger whether a footstep sound should play.
Let's look at your logic though:
Your movement input's "Triggered" event fires every single frame, checks if the player has velocity and is not falling, and if so, enters your DoOnce node which then calls to play the audio.
So only if your player has 0 velocity or is falling will your branch ever go to false to stop it.
i fixed the widget part, but not the interact
i understand its door blueprint?
yep
it must be, change input action for event and call that event when interacting
Player Input is normally only routed through the player controller and its possessed pawn.
Any other actors in the game would not receive any input events.
To circumvent this, you can "Enable Input" on the actor which will then pass the input from the player controller to this particular actor.
A better way however, is to pass an input event manually from the player controller or its possessed pawn and call a function on the actor, just so you're not having to enable and disable input on a whole bunch of actors.
Yeah, but since i don't have animations i followed the guide linked, otherwise i know how to put the sounds into the animations.
About the logic, so shouldn't it not play if the player is completely still? Because it does play as soon as i start the game, when the player is staying completely still.
Likely because the player doesn't have 0 velocity or is considered falling (spawned slightly above the ground?)
It's also not great to use comparisons with floats to verify if it is 0 or not, as 0 in a float could be getting stored at 0.000000000004 which isn't 0.
A better check may be velocity -> legnth > 0.0 && movement mode == walking (or whatever the default ground movement is, I can't remember)
So, let me understand, i've started coding since just a few days ago so i might be slow... instead of get velocity -> vector is zero i should get velocity -> vector lenght...?
Yes, getting the vector length of the velocity gives you a total of how much motion there is between all axes, which is something you can check if it's greater than 0 to know if it is moving.
The other part of the problem is if your movement input isn't firing, then the audio won't know to stop as your current code only executes if the movement input is being pressed.
if i have some tick logic which manipulates some variables across a series of nodes, and some input action logic manipulating the same variables, can there be a race condition between the two? or will the input stuff wait until the current tick finishes and/or vice versa?
(i guess this question isn't really blueprint specific, unless i'm missing something)
Hm, i might have to redo most of the code then. Another small things first, most of the guides/tutorials to help me in these use a different movement input, the old version i'm guessing (first screenshot). I'm using the EnhancedInputAction one (second screenshot), will it create problems do you think?
so would i make a custom event in my player blueprint which calls a function in the door, or is it the other way round?
custom event or interface event
start with custom event and call it when character overlaps it
you will have to cast to bp_door or how you call it, and from cast pull event name
Yes, you're correct, the first is the old input system where the new way is using enhanced input. It shouldn't specifically cause a problem other than the "triggered" output pin on the enhanced input system will fire for both movement input on the forward and the right axis where with the old system they were seperate input events.
if you make it work try practice with interfaces, they work better in larger scale and are more flexible
never heard of interfaces
cast is like "send to one specific" and interface is "send to many/specific"
whenever i read up a guide they always connect both the movement inputs to the code to add footsteps, but i can only connect the last movement input, so i was worried that would cause problems, but it's good it shouldn't, might make it easier for me.
No. Interface is still sending to a specific instance
You just don't care about it's base class, you only care if it implements a behaviour
Sending to many would be a dispatcher
get all actors with interface>message
Casts are checking if the object fed in of a specific class and if so, allows you to access the speciifc functions or variables available to that class.
An interface is a generic means of communicating with a variety of objects that may not share any common base class. An interface must be implemented in any class that you want to utilize it, otherwise default return values are returned from the interface or no functionality executed by the object that you've passed as the target for the interface call.
Both require an valid object passed in for them to work.
An interface is when you want class agnostic behaviour or an abstraction layer to prevent things from relying on each other.
For instance, if it shares behaviour over a number of base classes, or you might use an interface for say, opening a web browser, because you don't care on the specific implementation, you just care if it can do the thing, and then you're not coupling yourself to such a specific thing.
A dispatcher is for communicating with many things. It's like broadcasting over radio that something happened, and anything that cares can tune in and listen for the message
PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property Door". Node: Buy Graph: EventGraph Function: Execute Ubergraph Player BP Blueprint: Player_BP
idk what id do here
Accessed None == Your variable is empty.
You've created a variable of type "Door" but haven't set an instance of a specific door in that variable.
Doors don't technically exist until run time.
fixed it, but i also have this new issue
did that at the end to fix it, but when i start the game, it shows the widget text as if i was in the collision box, which is weird
yes,. but there are usages. At last for me now. Maybe in the future I'll get more experience to use different method
see what i mean? no where near the door (white box in distance) yet text is on screen until i hit start
only thing that references the wbp is the door
That's not getting all actors with interface though
What can be good for things like that is something like a sphere trace
Or even a multi sphere trace if you're so inclined
what I meant was using array as target easily, my bad, sry
Ah no, that's a perfectly valid usecase :P
uff, saved xD
If a boolean is false, is there a way (or a node) to find the name of that boolean variable?
wdym
if you know the variable, you can use a branch node and do things based on if its true or false if thats what you mean, might be me misreading because im tired but
If I am checking hundreds of booleans, and if one is false, I want to display the name of the false variable
you want the bools variable name as an output to print screen?
There's no way that I'm aware of to read the name of a variable in blueprints alone. All you can really do without some C++ is create something that branches to all your bools and then print the name (manually)
i have a weapon wallbuy and a buyable door, both use the same interact wbp; how would i change the text depending on the blueprint its created by?
Your implementation can differ on different classes. If there is some form of heirarchy between these items, then your interface could say, print out a specific variable and then you just need to set that variable to a different value on each child.
Otherwise, you'd just have the implementation do whatever you want on each actor.
there wont be an overlap in them both being available at once
i just need to change the text depending on which blueprint created the widget
This is a solution, but when dealing with hundreds it’s very time consuming. Last resort I guess. Thanks as always!
Feed in the value when you're creating the widget.
where would i set the value though
In the widget
How come my static mesh components are returning None when I try to get their attachment?
Also their relative location returns world location
This return value is a reference to the widget that was created.
You can use that to set properties or call functions within that specific instance of the widget.
ahhh ok
If you wanna get really fancy, you can set properties as "Expose on Spawn" and then on the create node it'll actually give you an input where you can set the value to whatever you want.
Even this doesn't work >.>
wheres that
found it
I'm not sure whether this question has been asked in here, but is there a way to get the direction between two vectors in degrees? I want to compare a velocity from a previous tick with the current velocity and see if their directions are more than 90 degrees apart
I know about Get Unit Direction, but that just returns the difference between the vectors (assuming I'm understanding it correctly)
Or would there be a way I can use Get Unit Direction to do this?
Hi, I want to make a consume interaction(add more battery when picking X object) for my flashlight like the interact one I have but don't know how to make it, any help?
Is there no BP node to Set Bone Transform for a Skinned Mesh Component? There is a get node for the Skinned Mesh Component bones, but none for set; I can only find Set Bone Transform nodes in BP for Control Rig and for Poseable Mesh Component which arent compatible with Skinned Mesh Components
I believe dot product is what you want.
Dot product of 1 = vectors fully aligned.
Dot product of -1 = vectors fully opposite.
Dot product of 0 is perpendicular regardless of direction.
So if you wanted to see if a vector was more than 90 degrees apart, it would be a dot product between values less than or equal to 0.
Can you set location, rotation, scale separately?
Hm? Not sure what you are suggesting, there's literally no nodes to set any transforms for the bones
I was asking if only the xform node was missing or all of them
There are no nodes for setting the transform, or any individual components of the transform for the SkinnedMeshComponent bones. I only see nodes for getting that data
Yeah people online saying you need to use poseable mesh ig
Oof okay that's beyond me cause this is for VR hands so idk how to copy all the code functionality from a skinned mesh to a poseable mesh
Thank you though
Thanks! I didn't know dot product could be used that way
ok so im at the point where im trying my hand at ai again and am running into issues cus im using paper 2d
can you use blueprints in an AIcontroller bp to pass inputs into a character?
or do you have to use bp in the character itself to identify where the enemy is and how to move
for instance can you write in the ai controller if enemy is to right add action value of -1 for input to move left
found a really nice custom dungeon generator plugin, got it working. now just to implement it into the main game
Hey guys I was using the sun position calculator plugin and was using sunrise time, sunset time and solar noon time to differentiate between morning, afternoon, evening and night but the problem is the sunrise time is coming in negative any idea why is this happening and how do I solve this issue
If it’s just got a minus in front of it that’s an easy fix
If it’s not at all what you want it to be, might need to read the plugin’s docs or contact its creator
ok
Hi, I would like to move an array of actor with the same movement using the same timeline. is it possible?
A table of actor?
a array of instanced static mesh
Are you trying to say an array of actors ?
yes sorry, table is the word in french, forgot to say array
I'm pretty sure you can do that, right?
Don’t see why not
Just take the track or the value of the lerp, and for each loop on the array
how could i achieve that because that?
because the timeline will restart if i use the same inside the loop
The timeline wouldn’t be in the loop
for the moment it's like that
Read what I said initially
Why is the timeline in a loop
and i can't define the timeline to be specific to my instance
And bear in mind that a for loop needs to run in one tick, you cannot have latent actions in it
Your code is backwards
Timeline first, then the for loop
if i do timeline first. the forLoop will be fast enough to move all of them at the same time?
I guess you did actually mean table. Weird but 🤷♂️
ok, i will try