#blueprint
1 messages · Page 220 of 1
Look into Blueprint Interfaces or an Event Dispatcher for the act of destroying the ball maybe?
does unrotate vector assume the vector is a normalized direction?
seems like it does
Can I make a montage continually play until I tell it to stop?
How come when this tutorial sets hud variable it actually works but in mine it doesn't. it cant get any widgets from inside it
Is there a joyful way of moving a set of events from one graph to another in my blueprints?
I'm asked what I want to do about those events I'm porting and I either say "do nothing", in which case the bp doesn't compile, or I say create functions, in which case I now have to delete those empty functions and then it compiles.
What am I doing wrong?
what's your issue
wait it wasnt working before but now it is
you are copying function calls, you either do nothing and work out what to do with them yourself, or you have the engine create functions with the same name
if you want to move the functions then copy them first
I set the widget I was trying to get inside it to is variable and now it pops up, why does his have a symbol?
maybe its a different version of ue5 or something. weird
that is probably it
there were several changes to icons over the versions, it's pretty confusing
in the turorials version widgets are checked on "Is Variable" as default too. But now they arent. Strange...
You do that explicitly
Encapsulation is something you should consider tho. Tutorials rarely handle that well, if even at all
what do you mean by encapsulation
I.e. classes being responsible for their own shit
just tick the loop checkbox?
Not manipulated by a third class (atleast not without intentz through a public function/event)
I needed to find it in the montage, it was hidden
i need help with bp key to open the door, so my bp_door its fine open and close, my problem is when i take the key goes to inventory now when i want to open the door still closed how to tell him check the inventory to open the door with the key,
I can do it easly without inventory but i need to do that on inventory, my question is how can specifly tell him about that item?
What is a reason why Reset Level might not return some of the actors to their original position? I have an Actor with a sphere mesh inside of it on my map which is located in a certain position of the map, and when I call Reset Level on the server for some reason everything but that actor returns back to its place.
I'm reading the documentation for the node and it seems like everything should be in theory going back to its original location on the map. What am I missing?
i dont know if i already clarified... but literally...... i had to unplug save replug save my opening sequence player..... ??? not sure why that fixed it but it did.
Is there a way i can stream something like a uasset into a map? Im trying to mod a game that has poles you can slide down as well as ziplines, I have managed to replicate the ziplines with help but i cant work the poles out. If theres not a way to stream it into my map so i can use the poles is there a way i can see the data of the file so i can replicate them for myself?
👋 Hey I'm experiencing an issue with updating my character's position at the end of an animation montage. The setup involves using a socket's location to update the character's position in the Character Blueprint when an AnimNotify is triggered. However, after the animation montage finishes playing, the character snaps back to its previous location, undoing the position update. Here’s a breakdown of the issue and what I've done so far:
Current Setup:
Animation Blueprint:
AnimNotify called AnimNotify_UpdatePosition is placed at the end of the montage.
This triggers a custom event in the Character Blueprint that updates the character’s location.
Character Blueprint:
The custom event triggered by AnimNotify_UpdatePosition retrieves the socket location (CameraSocket) and uses it to set the character's position using Set Actor Location.
Steps Taken:
Root Motion Handling:
I ensured that root motion is disabled for the relevant animations in the montage.
I also set the root motion mode to "Ignore Root Motion" in the Animation Blueprint's settings.
Despite these changes, the character still reverts to its original location after the montage finishes playing.
Montage Timing:
I moved the AnimNotify_UpdatePosition to different points in the montage timeline.
When placed in the middle of the montage, the character's position updated correctly for a few frames but still reverted back once the montage finished.
Possible Remaining Issues:
Animation Blueprint Overrides:
There might be something in the Animation Blueprint, such as a state machine transition, that is resetting the character's position after the montage ends.
Manual Reset in Blueprint Logic:
There could be some logic elsewhere in the Character Blueprint that is resetting the character's location after the montage finishes playing. I've tried searching for any Set Actor Location nodes or similar logic, but haven’t identified anything definitive yet.
crystal nodes
thanks g
https://drive.google.com/file/d/1Velds1mBp5PULI5nTgX6Frcb9-4Np2sX/view?usp=sharing
guys i really need some help on this
Hello! I have a problem. My animation montages are not playing
The idle animation just continues on.
I like to create a material and have four transparent PNG images. I would like to layer them on top of each other and arrange them in the correct order.
Hi everyone I have a problem with the UI I would like to take "Throbber" to activate the Visibility but when it starts I don't see it how can I solve it?
idk what kind of UI it is but if the whole thing is not showing you need to add it to viewport after you create it
As Blonker has said, you need to add it to the viewport or add it to a widget (as a child) that's already on the viewport. Widgets aren't automatically added.
I'm going to say you haven't added a 'Slot' to you're anim graph. Montages play on slots and without any, they won't play.
I put it in my Open Level Blueprint
I put it in my Open Level Blueprint
I unplugged it but before when it was plugged in it didn't work
There's a node called 'Add to Viewport' alternatively, if you have a widget that has already been added to the viewport, you can get the relevant panel (canvas, verticle box, overlay etc.) you wish to place the newly created widget inside using the 'Add Child' node.
Also, handling UI on the level BP isn't a good idea as level BP is one way meaning nothing will ever be able to get the widget that was created. Normally, this would be done from either the player character or player controller.
Oh I will investigate that! Thank you 😄
loop through your inventory and look for your key, you even have an array there
or simply set a boolean once the player obtains that key and check for that boolean instead
Sounds like you changed up references along the way and that requires to refresh those referenced nodes as well
you can do that by right clicking -> refresh node
Quick fix for this? Location returns as 0,0,0 for the socket bone start and end...
it sometimes does the correct location sometimes doesnt
on hit result, it will go to 0,0,0 if it doesnt hit anything. and it goes to the correct hit result if it does hit.
you are using the wrong node.
Its "Montage Play", Target is AnimInstance
there are different ones for different cases, read up on them
i've got a physics problem where i got a character, a car and say a destructible wall. i want it so that if the car drives with enough force, it destroys the wall but the character can't.
is there a way to generate collisions so that
if A -> B: nothing happens
C -> B: B brakes
if car drive with enough force i don't want there to be any resistence etc...
now that i am thinking about it, maybe it's possible to wrap wall in a collider that only blocks human players
Use the observer pattern,
You coud create an event dispatcher in your player/projectile/etc... (whatever your enemies get hit with) and add inputs being the hit type and wether its strong or not.
You call that event when it hits an enemy in your player/projectile/etc.. class/bp
You bind your enemies to that event
Thats one solution
the character "cant" what?
if its the character not being able to break the wall than simply check if the wall was hit by your car instance with force > breakThreshold and thats it
when human character interacts with wall, it's a solid impenetrable object
when car interacts with wall, it gets destroyed
but would that not generate a force?
i.e. wall would get destroyed but car would bounce
Thats something that requires you to tweak around with the physics settings of the car
how much mass it has and stuff
and how "strong" the wall is
👍
Okay, thanks man
Class defaults wouldnt have the data you look for
Hi all
Anyone knows why my collisions are not blocking each other ?
I added a "Box Collision" into 2 "Characters" and they not blocking
you need to set their collision properties too
I set both to "Block All" with all checked
But still not colliding
Maybe only the root can collide ? (Capsule Component is my root)
Yes. For standard collision only the root is checked.
So I need to create another Actor and attach it to my Character?
Another Actor with my Box Collision I mean
You'd need to "weld" them I think. I'm not sure on how that all works honestly.
I'll try. Thanks !
how can I acces widget variables inside this child blueprint?
when i create a class in CPP and then make a blueprint of it, is there any way to mark a property as required, so that the blueprint won't compile if that variable hasn't been given a nondefault value?
Can I detect if my camera is still rotating or is static ? (no movement)
No, you shouldn't need a whole new actor to add another bit of collision.
Try posting SS of your set up to get more accurate answers
So I need to call an Event in the "Event Tick" and compare 2 rotations one before delay and one after ?
no need for delays
The problem is that I have a "Camera Lag" enabled and even if my camera still rotating/moving, the number is "0"
at begin play, save the current info in a "old transform" variable. in tick, compare the current transform to the saved oldTransform and just make sure to save the new transform to the ofldTransform variable after you've done your check
get its world transform instead of local/relative
That's what I did. I tried with my "Camera Boom" and my "FollowCamera" and it's the same
the camera's world location stays the same?
The Camera Lag is not taken into account
can you show me your code? i have hard time believing that 😅
Here it is
use the comera world location instead of the boom's
the camera is the thing that's moving
the boom stays static
When I'm moving the location is changing but when I stop moving the camera Location becomes "0" even if the Camera Lag is still making my Camera moving
is the camera component's reference instead of the camera's boom reference
you are getting the boom's location which of course will stay static when the camera lags
I just tried with the Follow camera and it's the same
I tried Location and Rotation
I have "Camera Lag" and "Camera Rotation Lag" enabled
hmmm alright let me open unreal on my end real quick
Maybe it's because I'm doing a "Delay" in a "Tick" event so it makes bugging everything ?
oh wait im dumb i didnt notice the delay! 🤦♂️
i was dead set on the implementation i mentioned to you here
try to implement that and see if the issue persist
which hopefully it wont
de rien
No, there is no way to enforce a required property. That would require you to create custom validation function which checks if they have any values or not
CheckForErrors?
Triggered by map check
Returns Valid if this object has data validation rules set up for it and the data for this object is valid.
oh hey thats a cool feature
Along with EditCondition, for properties if that can help at all
does anyone have any tips on how to approach designing a swimming system like the one in BOTW in the sense that you are locked to the surface, but with the feature of buoyancy? So for example if the player jumps into the water from a height, the character goes underwater and then floats back to surface, and only then movement is enabled? Of course I'm not looking for a full explanation just some tips from experience if anyone has any
While (Underwater) -> swim up with disabled imputs
but can you like use the buoyancy system of ue5 for that kind of thing or is it just better to just add some kind of force?
Then probably lock the Z axis and Bob’s your uncle
But in case of waves?
Maybe. You’ll have to try it
Hello, any ideas how would I make my point system here to transfer points to another HUD text element, by removing 10% of those points every second and moving that 10% to the final score points bar?
Timer by event, and simple maths
do you know what I could use for transferring the removed points from one hud text element to the other?
Store them in a float and plug them into the other text box, UE should do the conversion for you automatically
#umg for widget questions
#animation or #multiplayer may be better places to ask.
Whatever you're doing isn't being replicated properly.
i'll see , thank you
sorry if bothering, I tried to do what you described, is this close to anything that I was looking to do? EDIT: thanks I got everything working
Dunno what you're going for but off the bat I noticed you have an event from your timer not running anything
ah yeah, hud stuff is working now, just need to figure the math stuff out. EDIT fixed math, very happy now
ooo ty ill keep in mind
Is it possible after selecting an item from an Enum, expose different parameters/variables associated with that item?
can anyone remind me how I can loop through an enum each time a button is clicked, Im trying to chenge to the next selection each time i click
Only in C++, sadly.
That's EditCondition.
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (EditCondition = "Alignment == EAlignments::ChaoticEvil", EditConditionHides))
float Badness = 0.f;
Something like that is how you set it up in C++, but it's not possible through pure BP unfortunately.
But the best day to get started with C++ in Unreal is yesterday, the second best is today :)
How can I run my dev build using custom launch options? We have them and use them on Steam, I just don't know how to use them straight for an .exe from cmd or something like that.
Hello, Im trying to do some basic interaction between 2 actors and an actor component using event dispatcher. But my event dispatcher seems to not been called. Anyone have an idea why?
Do you see the print?
the print after the branch is working, but the print with the red comment is not working. The first print says the variable is true, so its working properly but seems the event dispatcher is not being called
Then you're either calling it on the wrong component or somehow that binding is not bound.
Which. Looking at your BPs again. You're not calling it on the correct thing.
@coarse grove
its the same actor component, why its not calling the correct one?
It's not the same.
It's the same component TYPE on two DIFFERENT actors. The component is not the same instance.
I may be misunderstanding but
Have you tried dragging the "target" for the interface to the input on the function
Then depending on where that interface is run connect the input of the function to the overlapped actor or component from the begin overlap?
im not using interface, maybe thats the problem. I just created an actor component and added it to 2 different actors (so i avoid using references), and i tried to create an event dispatcher inside the actor component so i was thinking both could interact with the actor component without the need of references
hmmm i thought they were the same and i could add them to different actors and use them without reference
I just realized that said "call can teleport "
Sorry 😅
No. What you need to do is get the OtherActor from the overlap. GetComponentByClass, with the TeleportComponent as the type. Then call your function using that output.
is it a bad idea to try and implement a dialogue system that uses a for each w/ break to progress the dialogue, breaking when the user needs to input a response, then continuing from where the break occured? feel like im missing a more obvious architecture here
probably easier to reason about something where the state is represented entirely in variables, and not in deferrede xecution flow
That isn't how a for each loop works. They don't wait between frames.
You should really check out the FlowGraph plugin.
thank you! that worked! Now i got it, they are different instances.
Nice! 😄 Happy it worked out
yeah i think this is not the best method - though it is only for a quick prototype. I have a custom for each macro that i added a delay / break to that i'd use for this
ill try and make it state-based first
hey would anyone know how to describe blue prints for dummies by chance? 😂 like i just dont quite understand some of the terminologies and what it does, like the description of what location and condition mean in game terms? (sorry to even ask i know its fairly simple in a grand scheme of things)
Hey, I'm trying to do some high speed collisions using the 3rd Person pawn and the open world terrain. Around 1200cm/s landing.
My flying pawn falls through the terrain about 40% of the time.
If I make the capsule huge and enable CCD, I get to 95% landings, but the capsule collides stopping forward movement, then the mesh falls to the terrain. Not great.
This seems like a solved problem, what am I missing?
Your question is too general to answer here. You should try the documentation, watch some vids, or take a class on Udemy. You're going to spend alot of time not succeeding with this approach. You need to study this like 4 college courses. Modeling, materials, effects, animation, programming - it's more than one parson can learn in chat.
oh i gotcha, thank you i appreciate you. I'll see what all i can find 🙏
https://www.udemy.com/ and gamedev.tv sell some courses that can take you forward. I'd recommend the "Game Math" for programming or a Blueprints course. Udemy has sales for $20 courses all the time. You shouldn't have to pay full price.
I'd suggest youtube first to see if you even want to preoceed further. then either stick with yt or find a good paid course if you really need one
UE's documentation is hard to search and browse, but you might find this a good free start.
I still recommend the "game dev math" course if you're planning to make gameplay code.
: https://dev.epicgames.com/community/learning/courses/OP/unreal-engine-blueprints-and-gameplay-for-game-designers/8bB/introduction-to-the-course
https://youtube.com/@mathewwadsteintutorials?si=P-BG2djzaxghZViU
Here's an extremely solid place to start as well.
thank you guys i really appreciate you. I'm shooting for a survival game i'm not too sure what to do for an enemy yet but i'll figure that out way later, but something kinda related to the genre of ark but not ark 😂
There are some survival game templates (and other game templates) in the UE marketplace. Whether you're making games for fun or profit, you'll learn more by customizing them vs starting from scratch. This one is deluxe: https://www.unrealengine.com/marketplace/en-US/product/easy-survival-rpg
This one is basic: https://www.youtube.com/watch?v=FVvs-M-ucus
Both will get you started and be more fun 🙂 There are some YT vids that walk through building survuval games. It's a long distance run, not a sprint. 60 mins a day and you'll have it for sure.
Easy Survival RPG is a highly advanced and modular product designed from the ground up for multiplayer with a ton of different game-ready features for Unreal Engine.
A multiplayer survival game kit which features Jigsaw style inventory, equipment, main menu, crafting, weapons and much more!
Click▼
► Buy on Unreal Marketplace
https://www.unrealengine.com/marketplace/en-US/product/survival-game-kit-v2
► Discord
https://discord.gg/KNCmQb6
► Twitter
https://twitter.com/DefuseStudios
► Website
https://defusestud...
whats the proper way to do a loop if you want a sound to play every 30 to 60 seconds?
right now i got a tick > While loop > Completed goes to play sound > delay (30 to 60 seconds) and back to loop
which i'm pretty sure will just create an infinite loop
Rather than using tick, you can use a "Set Timer By Event" node that you can set up on an event and have its delegate call back to that same event to start another timer up.
Thanks, never really looked into loops much until today.
You might try a course if you want to learn faster....
Good idea.
Here's an example of what I mean - this timer would continually fire randomly after 30-60 seconds once the PlaySoundAfterRandomDelay is called once.
This one's fun: I have a BP with multiple skeletal meshes for modularity. Each is assigned to the same animBP, which I'm starting to think means one instance of the animBP each. The grenade throw animation in the animBP has notifies for grabGrenade and releaseGrenade, which because each mesh is executing the animation means that the grab grenade and release grenade functions are each being called multiple times per grenade throw.
How can I get a mesh to ignore animation notifies? Or how can I get each mesh of my BP to follow the main mesh without their own animBP instances?
I've verified this by checking the number of spawned grenades. Pre-notifies it's 1. Post-notifies it's 8, cooresponding to the numebr of meshes in my BP.
reducing the number of meshes to 1 reduces the number of grenades to 1. But then I lose the mesh modularity.
Can the animBP be made a singleton so it can only ever have one instance?
BP meshes
animation notifies for throwGrenade
{
if(!Reloading && !Meleeing &&!Shooting && !Throwing && !Healing && !GetCharacterMovement()->IsFalling() && GetGrenadesCarried() > 0)
{
Throwing = true;
if(ThrowableClass == nullptr)
{
UE_LOG(LogTemp, Error, TEXT("There is no GrenadeClass!"));
}
else
{
GetCharacterMovement()->Deactivate();
SetGrenadesCarried(GetGrenadesCarried() - 1);
UE_LOG(LogTemp, Warning, TEXT("Grenade Spawned."));
}
}
}
bool ACharacter::GrabGrenade()
{
if(!GrenadeGrabbed)
{
GrenadeGrabbed = true;
UE_LOG(LogTemp, Warning, TEXT("Grenade Grabbed."));
FActorSpawnParameters SpawnParams;
SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
Throwable = GetWorld()->SpawnActor<AThrowable>(ThrowableClass, SpawnParams);
if(Throwable != nullptr)
{
Throwable->AttachToComponent(GetMesh(), FAttachmentTransformRules::KeepRelativeTransform, TEXT("hand_l"));
Throwable->SetOwner(this);
Weapons.Add(Throwable);
}
}
GrenadeGrabbed = false;
return true;
}
bool ACharacter::ReleaseGrenade()
{
if(!GrenadeReleased)
{
GrenadeReleased = true;
UE_LOG(LogTemp, Warning, TEXT("Grenade Released."));
Throwable->Throw(UKismetMathLibrary::GetForwardVector(GetControlRotation()));
GetCharacterMovement()->Activate();
Throwing = false;
}
GrenadeReleased = false;
return true;
}```
animBP event graph for the anim notifies
if(!GrenadeGrabbed) and if(!GrenadeReleased) also don't appear to prevent multiple instances of that code from running
is there a way to check multiple gameplay tags at once ? key.blue and key.red is in the container.
Something like this (with your appropriate tags of course)
Exact match only if you don't have further tags, like key.red.square and key.red.circle
Set leader pose component in construction script
For first person I have a separated head (to hide but still cast shadows), hands (to render with a different FOV) and body
And I got it set up with that
Body runs the animbp and the other skeletal meshes just copy it
whats an easy way to make a single switch function for this refrence without just stacking a bunch of branches?
would switch on string be what I'm looking for?
Switch on string would work, but it is a bit fragile - if a classname changes, logic will break
huh... well that's no good : E
I would prefer having an enum or a tag or something to use as the value for switching.
That said, switching on name really shouldn't be crashing like that, sounds odd
so i tried enum but its not working
but that was my first idea
maybe its because the enum is assigned in the spell actor?
best walk through the logic with breakpoints to check what values you are getting
well i checked the text thats coming through with a print string and that was fine
so i then took that same text and tried with switch on text
nevermind I figured it out. I did need switch on name.
😅
hello everyone. in a game im working on i need to be able to spawn the player pawn at a given transform. what function do i need to override to do this?
note that this is not using a player start, but a transform which is changing during runtime.
Hello, I'd suggest looking into 2 overridable functions in Game Mode:
They let you customize Player Start logic.
Thanks! I'll look into that
thank you. the issue is that both of these expect an actor to return. but im thinking ill just have a player start which is like 'dynamic' and ill set its transform to what i want and just use that
hi ! i have this throwing ladder mechanic
But how could i have more control over where it's thrown
ill send a vid
i wanna be able to cross over cliffs and stuff
and have also feeback on wher is going to be thrwon.. Maybe with a UI ? *
also the collisions with the cliffs are making no sense.. maybe i should do this in a city instead
and i would also like to create a system where you can choose the size of the ladder before you throw it but maybe it would break the flow of the game so not sure
Hello, it could be handled with a Trace (not necessarily a Line Trace, as it should probably more adjusted to ladder's shape). You could do a frontal trace from player's camera, and draw a fake ladder (with translucent material, for example) in the trace collision location. And spawn ladder in that exact position when proper input is pressed.
It still doesn't fully solve collision issues though, such traces usually need to be quite complex to fully handle various enviro shapes.
oh nice that's a good idea
how could i draw the fake ladder?
im already using a line trace for the spawining mechnicn
just spawn a fake BP, without collision and with some translucent material, for example
oh ok nice just the same ladder but with diff mat
destroy it when not required
Or don't spawn and destroy but re-use existing one, just hide and show. : )
ah yeah maybe dynamic material is even bettetr
could work as well
Thanks ill try those
im just wondering because like pressing E would show the translucent ladder
and then pressing E again would throw it
how would this work
It's usually handled in a way that fake object is displayed whenever we're in some kind of "building" mode, and then it's removed and replaced by proper object when we press Build button
oh ok and triggered ect wont be of use here on the enhanced action node?
it really depends on actual design
you might for example display fake ladder and do trace when you're HOLDING the button, and then place the ladder when you RELEASE it
but I don't know if that suits you
you can have a toggleable "Building" mode/state, and display fake mesh when in that state, and then build when input is pressed
np : )
It depends how actual Input Action is configured
how can i attached the spawned item to the firstperson character
this should be working but isnt
In your particular scenario I'd rather just set its transform to the location of Trace hit, continuously
as AFAIR you want to show it exactly in the position it will be placed
Also - now when I think about it you can actually consider a completely different approach and try moving your ladder with the Physics Handle component (https://www.youtube.com/watch?v=GS0YkKK8o_w).
This one is a little more casual but I go into more depth regarding physics handles and also how to do the same thing with objects that aren't simulating physics meaning just about everything in the world can be draggable and movable with very little in terms of programming and cpu usage i also show how to solve the snap problem
any suggestions...
oh interesting
yes exactly
maybe that's a bit advanced but i'll tyr
The reason it's not working is because you haven't specified the parent actor you want the target to attach to.
i tried with self but it's not working either 🙂 but thanks
What is self? The player character?
What do you think self returns?
first person character ?
oh damn maybe not 🙂
whats this logic on?
self returns the blueprint it's in
are you with me there?
yes
so if you write self on bp player controller it will return that instance of the bp player controller
ok i get it
What should i do then
Hello everyone, a question I would like to ask in the UI a carousel that inside there are buttons that activate certain functions within the UI. Advice on how I can implement it? or even a Tutorial that explains the steps to me?
is there a way to pass in a wildcard for a map into a function?
What are you trying to do? As in where would the map data be coming from?
Print wildcard value
I doubt that can work
Aa stuff need conversions based on their type ?
It might, the format text node allows you to plug all sorts into it. Never actually tried though.
Don't macros let you create wildcard pins?
The alternative otherwise is probably non-trivial C++.
Macros do indeed
But an object pointer dont have a direct conversion to a text input afaik
I'm trying to print values from any arbitrary map. I'm doing live link stuff and have a bunch of curve<>value maps that I want to make a generic debug function for
I'll try with a macro
oh ok got it needed a ref to my player charaacter not to self
ok i got it but the ladder is far away from me how can i specify the location
I think I'm having a moment here regarding references and dependencies.. and won't be able to research til later..
Adding an input to a BP interface creates a hard reference to whatever that input type is, right?
I'm assuming that hard reference is only relevant on the actor the interface is implemented on..
Is that correct?
Along with that, this part I thought I knew but can't get out of my own head right now...
Are dependencies from actors in the world referenced by the the players clients memory?
Probably a bad one but..
Example
Player comes across a door...
Door needs a password.
Door has hard reference to the thing holding the password.
Player does not have a hard reference to the password.
Is that actor holding the password still loaded into memory as if the players character had that reference or is it still just that the door and it's local assets are loaded?
I'm assuming everything in the current level that is actively relevant to the player character is loaded but I'm still kind of fresh into learning this.
Apologies, if this is worded atrociously.
Afaik a hard reference doesn't need to be inside your player for it to be loaded in
you can look into soft references too
Hard references loads the thing they're referencing when they themself are loaded
Yeah so I imagine your doors would still be loading it all in
Casting to player character is usually fine as its an always loaded class
Casting the other way around is more troublesome for this exact reason
Having a hard ref to a door that may or may not be loaded , forces it to load regardless
Same with its dependency (the key)
Also does anyone have experience with github because I may have just completely fucked up my project lol I feel ill
I switched branches foolishly before backing up because I didn't expect a ton of issues like this
now I have a ton of merge issues with my code and I don't even remember what these stashed changes are supposed to do
What is the best solution for not losing the progress I tried to upload
I should have updated the branch I took this from first..
I've never seen merge issues like this
I wanted to overwrite everything that was old
but I guess with merge it has issues partially overwriting things?
have local branches. local commits. never leave dangling files when doing operations. then if anything effs up, you just revert any pending changes
using github desktop btw
Yeah I should have uploaded it my branch first
before bringing this back to main
But i'm not sure how to save my progress now
Did github merge my current stuff with the old main stuff?
is it some weird broken mix?
I'm trying to see if I can salvage it somehow
I haven't like actually uploaded anything yet I think i'm in a weird limbo
what's your git ignore like? you shouldn't include intermediate folder
So I was on a branch, changed the branch with a lot of stuff. Instead of uploading to that branch with my changes I switched back to main which is now causing the issues
oh my git ignore I added like ptb files because it was big
and apparently pdb files aren't vital
Thank you all. I to a degree thought that's how it worked but wasn't 100% sure..
Recently started getting into interfaces deeper and learning about the hard reference on input got me thinking on how things not referenced directly by the player works when loaded.
you shouldn't even include intermediate and binaries to begin with
Yeah that sounds about right actually, my setup isn't ideal
I looked into it but that was a while back so im rusty
declare your class in c++ and load heavy assets from soft reference
you don't work around hard references with interface, that's not even gonna work
I'm just hoping I can salvage my progress now and try to have a less shitty github setup after that
once I have like my proper project folder I can try and make the github repository better
and focus it just on the relevant folder
since it does seem to include some unneccesary things
totally forgot about focusing it vs just using github for the whole folder
I don't understand why I have stashed changes
do I try to commit
I mean the conflicts should be problematic on their own lol
add intermediate, saved and binaries to your git ignore
also #source-control probably can help
oh right i'll go do that once/if I can salvage my project files
thanks ill check there too
I know interfaces are generally utilized to avoid hard references
But when you add an input on an interface to my understanding that acts the same as casting and then creates a hard reference to that input type
I know that needs to be controlled and limited the same as casting.
The question I had with that was more specific on whether that dependency/reference is only created on the implementing actor or
If it's created on the caller as well.
NOOO!
interface is not UTILIZED to avoid hard ref
ignore youtube noobs
Phrasing could be better but
I know it has deeper uses and functionality but I'm just not sure how else to phrase it rn per my question
You dont want to include hard refs to interfaces in general
You don't use interface to avoid casting or hard ref, period
different tool for different job
totally unrelated
Interfaces bring known functionality to unknown classes
I'm familiar with that
My terminology is not the greatest
So I apologize for any misunderstandings by my phrasing
"don't use tick" "don't cast" "don't watch my video" are synonyms
It's not about terminology, I get where you coming from. It's just unfortunately one of the most common bad practices prepetuated by youtubers
all started from the blind leading the blind
Wouldn't you be able to use generic actor references with said interfaces
I thought that was the focus of discourse surrounding it
No
They never do lol
The point is, if you need to access different blueprint, you will need hard ref anyway. Cast is harmless, it's the misuse of hard ref that gets thing loaded to memory.
So these people that says avoid cast use interface, they end up having hard ref anyway. And now inheritance is thrown out of the window and you will also end up with debugging nightmare.
Use interface if you need to communicate between different classes, there's no really avoid casting. The proper workflow is to make native class in cpp and use soft references to load heavy assets.
Interfaces easily bridge functionality between unrelated classes which cant easily share a common parent
Pawn vs regular actor is one example
I might do a video tutorial titled 'Stop Using Interfaces... Cast Instead!!'
Stop using interfaces... use componemts instead
Ah right by focusing on casting people forget the actual issue then aka hard refs
Haha, to be fair, components are the way to go.
I need to learn to verbalize things like this.
All stuff I am familiar with but just couldn't get out lol
Yes, i wasnt joking
There's almost no interface in lyra afaik, just 1 - 2 very minimum stuff for a getter for ability comp and team interface?
I'll check, I've still go the project on my comp but you're probally right.
I don't deep inside too much cuz I can't read codes but the interface they had are like a few lines of codes
rest are components
hero component, ability component, targeting, etc
Also any good resources on components?
If none readily available I can dig in later to start lewrning.
it's just an object you can attach to actors
Some examples
Rotating component, Character movement component, Projectile component, etc
something you can grant to an actor, also useful to give actors that doesn't share the same base class the same or simmiliar functionality
picture Exploding Component which just explode the owner after X seconds
you can add that component to your player or a barrel
if you are doing inventory system, you probably should use component
Yeah they're very useful for being modular reusable things but also for avoiding "god classes" or whatever aka putting all your code inside one actor like your player
which is not great
^ also reduce repetition
I prefer slapping InteracteeComponent/PickableComponent instead of making class implement interface
Yepp
why write the same functionality again when a lot of things can benefit from the entity?
Holds state aswell
Keeps code clean and segmented also
And if you dont know them
Learn about and use event delegates
Life changing
So there's 1 blueprint BPI which is for getting the audio component for emote sounds and what I believe are 6 C++ interfaces in the Lyra project. Most of which are for getting data from an actor.
I went 4 years without checking them out because youtube said ignore it .. silly me
Does anyone know how the buoyancy in the water system plugin detects the waves not as a purely visual effect? I want the player swim following the surface of the water, and not just on a plane
Guess youd somehow read out the pixel offset ?
Do you have any idea on how i could do that?
I think you need to drag off of the event delegate handle (like one on a timer node)
I probably should have specified its for a binding
weird when I do it its just blank
fair enough so maybe the question is why when I drag out from the event the dispatcher bind isnt on the list?
just trying to work out what I'm doing wrong here
pls can someone help me how to use emmiter particles constantly
like this, but much faster and not refreshing them just spawn another
instead of spawn burst instantaneous, use a spawn rate module
for more specific niagara questions --> #niagara
Hiya was wandering if there is a way to change these in blueprint
I can only seem to change the attach end to not if it is attached or not.
I'm almost certain you can, because I remember doing it.
Either there's a node like "Set Attached Start/End...", or the bool is exposed and can be modified directly.
I don't really recall the exact method.
The pinned message in #profiling might be helpful.
Also see #rules on crossposting since that channel was probably hiding from you for the past 3 years 😀
How can I sort an array by an associated float value? For example, I am making a Blueprint Editor Utility Widget that takes Selected Actors, loops through them, gets the Z value of their Box Extent, and then I want to position them in the Editor based on that Z value, but I can't figure out how to sort that array by that Z value. Can anyone point me in the right direction?
Hey everyone, I have strange problem . My mesh isn't showing the player character, and the details panel is completely empty. Has anyone encountered this before or know a solution? thx for helping (or just looking 🥴 )
😄 thx
Ever had a blueprint suddenly have a component that was unable to show the details panel of a component?If you've used Unreal long enough, chances are high that you'll run into blueprint corruption even without the usual cases like hot reloading. Source control issues, and bad hard drives can be a nightmare too.The thing is, there are cases wher...
You can think of a component as an interface + state
I love using components like that
Event Dispatcher is making no sense at all. When I interact with my Circuit Breaker it prints the string. But it doesn't print string on the blueprints it is in. But sometimes it does if a different instance (the door for example) is placed in the world. And when it does work it works perfectly. Every time it does end up working or not working it consistently follows that behavior and wont flip between working and not working until resetting and trying to play again. I dont understand
Why would you get actor of class to just bind the event? Not like you’re unbinding it dynamically
And where is your event call?
my fault, first image is the breaker
Why not just bind it in the actual begin play of that actor?
Oh i kinda see what you’re doing nvm
But also your first image shows an interface event too, are you mixing both?
its separate blueprints, getting the event from BP_circuitbreaker to trigger locks on 2 other blueprints, BP_EntranceDoubleDoor and BP_GateMain.
lemme see what you are talking about 1s
First image
Looks to me as if you’re using an interface event to call a dispatcher
Which is kinda like using your left arm to hold your right hand to scratch your head 😀
the interface is for if the object is an interactible then allow it to be toggled
this is BP_PlayerCharacter
so the circuit breaker and double door and gate are interactibles so I can hit E on them
An interface and a dispatcher are 2 different methods of inter-bp comms, best to just pick one
There’s a pinned video on bp comms training here, have you watched it yet?
no I have not, I was following a guide and it worked perfectly for him
so now I am very confused and thats how I ended up here
should I send you the videos and let you scan through them to show you what I mean?
No, you should watch that video in its entirety. It’s kinda long but you’ll understand bp comms when you’re done
Right now you have at least 2 potential reasons why you’re getting this weird flip flop behaviour
One being using 2 diff comms
Like it all made perfect sense to me but it just isnt working. ok ill watch it then
oh.... its 2 hours oof
But let me get this straight, what you are getting at is that the BPI and Event Dispatcher are affecting eachother?
It’s worth it, trust
Well one reason could be your interface event is not being called properly
You also have a branch in there
I have a branch in my interface? no I dont
theres nothing in it, its just a name
how do i give a default value to a function input in blueprint?
i want this bool to be false if called without input
go to class defaults at the top and on the right side it should be in the default section, there you can set the default value of it
idk if I fully understood the question but I hope that helped
oh wait sorry I think I didnt understand, idk what to do about that so dont mind me
no it isnt a variable of the class, its a parameter (input) to a function, that doesn't work
click the arrow next to it?
idk if thats the sollution either just throwing out stuff
Really #blueprint message
none of those images is my interface blueprint, am I missinterpreting something
The interface event
Again, you should really watch that video, interfaces can be confusing to begin with and you mixing them up with dispatchers is contributing to your issues
my interface event is connected to a branch. There is no branch in my interface
besides its working now idk exactly why
I had a duplicate of the breaker in the world so that might be apart of the reason
I was just reading through the past bit of questions/talks to see if there's anything I can learn but I genuinely can't help but respond to this to admire it. Best comment I've seen today.
I see what he was getting at but I dont think it applies to this situation.
Hey there, has anyone worked with high speed collisions and CCD? I'm working on a jetpack, and with CCD and physics sub-stepping, my character is still passing through my terrain unless I make it's capsule huge.
I'm working with a test "Open World" level. Is there something incompatible between CCD and open world maps (world partition?) in 5.4? Thnx!
With projectile movement component I found that extremely high speeds would almost be teleporting the actor
It didn't really, but it was still a golden comment
Probably the same with character movement component
Collision doesn't necessarily break, but you're moving so fast you're basically teleporting as you're moving faster then the tickrate can update you. And it starts becoming more like a teleport
i'm trying to use enhanced system with mouse wheel but i dont know how to make it go up and down
thanks
Same effect happens when you tab out and your framerate drops to like 2 fps. You'll start glitching through walls
Collision isn't broken, you're going too fast
I'm trying to recreate the jetpack in Just Cause 3, but I'm not sure the speeds. I think it's around 1200cm/s now or 12m/s. When I slow it down, it's more reliable, but I'm on fast hardware so I'm wondering if there is a more reliable solution of if I"m missing something.
You could try and fix this problem by line tracing in the direction you're moving in, if you start getting close to an object then start reducing the speed
The other option is to downscale the size of the game
I mean everything
That's a brilliant idea to slow down.
Because if everything's really small then the calculations and speed will be smaller too
If it's the ground could you stop movement immediately on overlap?
I'm trying ot understand your second suggestion. Can I pull that off by scaling everything by .1 ?
I wouldn't even recommend it. It was good idea to reimportant everything to be way smaller in our case because it was a space game and everything was massive
It would fix your problem, but it's not a solution I'd recommend you
But it would solve the problem, for a tiny object 100/ms would feel as fast as a big object going 1000/ms
That's super interesting Seeker, both suggestions THANK YOU!
Cant you just trace the delta ?
Every frame
You can assume the player will keepngoing in the exact same direction as last frame
So you predict and trace
Not relying on just the collider
Tick -> Velocity.Normalize x speed x Delta = Tracelength
Then trace from Actorlocation to actorlocation + TraceLength
Sweep capsule if you must
Is there a way of automating in the editor (maybe a scripted asset action) of creating an enumeration list from an array of strings - I have a lot I want to convert to a list of enums but I don't want to have to create and type each one?
Create c++ enums using regex.
beat me to it...
I was gunna say use C++ and use excel with some clever formulas to just copy and paste the definition of each enumerator value.
That sounds far too complex.
However
Refer to this chart: https://xkcd.com/1205/
Thanks - was just reading in to a c++ option, is there a way of doing this via blueprints?
You would spend longer writing a script to do it than doing it by hand.
Also don't use BP enums and structs if you can avoid it.
i got this tutorial that uses inputaction primaryaction but i cant find this in my first person character
Can you explain a little on why for a noob called me or refer me to something that does?
They are broken tool, struct especially famous for breaking your project and stops you from packaging (unknown struct error / all values defaulted).
They are also not reachable in cpp land so if you want to cross later, you will end up doing a lot of work
ty for the info!
hey does anyone know of a way to make an item only have physics, ie fall, when it isnt a child of a character, thanks
Because you're using "ADD Relative Rotation" and have the current relative Z attached to it
So it's adding the current relative Z rotation to the relative Z rotation when it's called
You'd probably only want that connected if you were to be using "SET relative rotation"
when i reach ^90 z is rotating
on the top over the character the camera rotating on z value
gimbal lock probably
what is gable lock?
Prob best to google it
But you will want to use quaternions to get around the issue of gimbal lock
how can i do that?
@round elk I wouldn't say to avoid anything because almost everything have its uses but in the case of child actor component, just avoid that.
#game-math and reading some material on gimbals lock is prob what I would do
I don't know the actual calculation my self
Gimbals lock is common issue, go look it up
okay then
ill redo to use attach actor to component?
ive heard of that but does it well, work
Have the item represented by some data type, perhaps if it lives in inventory component that will be a huge plus.
Then for the representation of the mesh, I would use attach to component, it will work.
okay thank
@spare sentinel why are you rotating the camera boom to begin with?
If you want to manipulate the view, normally just set the control rotation
control rotation? o.O what is this?
Go download third person template and see how the character adjust its view
You will see it's just mouse input with direction, added to the control rotation
Basically where the player is looking at
that not what i need
i need top down template on press key move camrea up and down
from -90 to 90
complete up and copelte down
You still use control rotation for that
Just affect one of the axis
Before you brush it off probably try to understand important bit... look up control rotation then you can apply that to solve your problem
I don't see why the camera boom ever need to be rotated, it should be dictated by the control rotation
now you're older. and (maybe) wiser
yeah probably not the second one
well now im just confused
before attaching to actor it has physics
but when I detach it just hovers midair
@graceful sage still got error?
You just need to follow their instruction for the include. The file is located at subsystem/
no, it was really a stupid mistake on my part. But thanks.
Would this be the place to go to for any blueprinting issues?
pretty much yah
I will try to limit my issues to more specific issues. I would say I am a beginner when it comes to blueprints. I look forward to working with and hearing from everyone.
Hi folks - is there a way to find all the references and events bind to a dispatcher?
Ctrl shift f, type the event then hit the binoculars is probably the only way
Gotcha, Right, thanks!
Another question about event dispatcher:
From my understanding, event dispatcher is like a listener who is waiting to send message to their group chat, you can't implement logic in it in the class... but -- I also see that if a component has a event dispatcher, you can Override it?? What does this do?
Does any logic put in it gets executed when the event dispatcher is called, like you bind an event to it? What is the purpose of this compare to binding a event?
You dont override it
You bind to it
So theres no inherited logic
They are functionally equal - binding manually or through the componemt details panel
And its kinda more like a mewa feed. Information only goes one way (from broadcaster (the caller) to the listeners (the bound events))
Man you saved the day with that one. Thank you! Subscribed to your channels as thanks 😄
Hey Im having trouble with my collider capsule for my cat game
Any ideas thats not too costly? The stairs collisions look accurate
IK as in make animations for stairs? Sorry if bad question. I notice the capsule does not rotate if walking up stairs.. it seems problematic. Wish there was a way to have 4 capsules, one per foot or something lol
Ik - inverse kinematic
Very commonly used for feet to touch uneven ground/steps
Basically a trace per foot, similar to your capsule wish, and then manipulation of the bones so it stretches to the hit location
Hello everyone!
I have a slight question here:
i have added in project settings default game mode and pawn etc.
Now, i have a main menu map with a different game mode, that kind of breaks it, because it overwrites the individual map settings, so either my main menu is broken or my map instance. What should i do?
@mild galleon you can override in your main menu map world setting to a game mode of your liking
in the world setting? okay, i thought it should be in the level blueprint, thank you for the pointer
thank you very much, it worked splendidly 🙂
oh that actually answered a lot of question I had about dispatcher. That was the missing piece! Thanks!
is it possible to have a blueprint event fire from within an actor component?
I have implemented a BPI on an actor that i place in the world. When I overlap it, I want it to send me some variables. But i need all that data to be sent via blueprint interface event within the actor component. I have tried a few setups but not seeing anything firing within the component. Only works when i have the event fire within the character (but i dont want that).
nvm i figured it out!
just had to take the overlapped actor then get the component by class and THEN send the message to the BPI
hey guys, i've got a blueprint idea in mind but don't quite know how to go about it. The concept is to make a boombox (or any asset), that emits particle effects to the beat of a song, where you can procedurally change what song and particle effects are on each track etc. I'd like to take a MIDI file, assign a niagara particle system to each track on the MIDI, which then plays according to the data on said MIDI file. These niagara systems' position is then centered around a mesh (i.e. the boombox).
Hello everyone, if I took a course on the basics of programming (blueprints), then how can I continue to teach them to develop a knowledge base. Does it make sense to do some mechanics according to tutorials, If I don't understand the whole code. Or are there any tasks for beginners in blueprits? I only need knowledge in the field of blueprints, in the future I will not study C++
teach what?
not a single video in youtube is for production
majority of them infact pretty bad
blueprints, so that I can better understand how to implement mechanics with their help
you need to learn OOP
functions, events, event dispatcher, components, variables, inheritance, polymorphism
data types, including structs, data assets, data table
those are just the bare minimum
This is what I mean. I took a course on OOP and now I began to better understand what was happening, only no course will provide an opportunity to understand all the nodes. I'm wondering how best to create a knowledge base in blueprits . I watch how others do it according to tutorials (although i don’t understand half the code) or do something of own, albeit very primitive, but what I will fully understand?
you can look at matthew;s wadsten video to understand nodes
rest is you figure out the logic on your own
Cheers
Is there a way to filter on a datatables rows using a combination of the primary asset ID and other keys?
Like in SQL you can do SELECT * FROM X TABLE WHERE NAME == BLAH BLAH AND OTHER PROPERTY == BLAHBLAH?
no
Hey guys, I'm trying to implement a Dragable widget and now I have the issue, when i set the DefaultDragVisual to be the widget itself the drop callback is not fired anymore 😦
Hey, I think I'm missing something very simple somewhere.
Regardless of what value I set to my initial seed (big red square), the sub sequent blueprints will always generate the same number.
Googling it a little bit, found people saying that one needs to make sure it is being passed as a reference, otherwise it will reset the stream to the start position. But as far as I can tell, there is only Structure for stream, no reference :(, also even if it resets to the start of the stream, the initial seed is different, I'm manually change it, so the initial position should also have a different value.
What am I missing?
Do I really need to generate a number from the stream, pass the number instead of the stream, then make a new random stream from that number and finally use this new stream?
you can't pass variables by reference when spawning a new actor
you should most likely implement your random seed in some global thing, e.g. gameinstance and provide a getter for others to use it
What would be the best practice to create a multi-language system? I was thinking of some sort of data table setup but is there any default or better ways to achieve it?
Can you send the integer instead of the stream?
EDIT: Yes, that's what you proposed, as I read now :)
Oh crap, so it is the object reference problem after all. Crap.
Ok thanks for clarifying it. Yah I'll try a global thing instead, regenerating a new stream from a new seed every time is painful
yah, that is how I was doing but its a pain, I guess I need a global generator instead, or just accept the fact that you have to make a new stream on each BP construction from the integer seed generated before
Perhaps a dumb question, but: how bad is it really to have widgets tick? It is infinitely easier to do some things on a tick basis instead of with events (which will get called once every few ticks at best anyway) but everyone is warning me against ticking widgets. Is it a problem when I only have 10 instances of the widget at most?
if you have a lot, it actually matters
for the most part you don't really need widget to tick?
just update values with event dispatcher
If the event dispatcher will invoke on tick (roughly), I'd just tick the widget.
The caveat is that the event dispatcher will get called at tick rates anyway. 🤔
And see if it shows up on the profiler.
The bar regenerates.
well, that's disappointing.
The difference here is how often the bar will regenerate?
Does it represent a player value?
It does not regenerate all the time, but it regenerates after you pick up health, yes.
In that case I would just subscribe to an event somewhere to update the bar, which would prevent it from ticking when the player's health is full, for instance.
That is one half of what the widget tick does; the other half is to show/hide a target marker when you are targetting the character. This can be event driven but doing so requires each NPC to subscribe to the player's targetting component and that seems suboptimal as well.
hi i wanna use mouse wheel down for - 10 rotation and wheel up for +10 rotation how can i do that with Enhanced ? tahnks
this is my setup
Your Add Actor Local Rotation won't have a target if it gets called from the IA event
it's already turning but like only in one direction
as if it didn't recognize mouse wheel up or down
Do you mean scroll the mouse wheel up/down, or click/unclick the mouse wheel?
scroll the mouse
If it's scroll, you'll need the ongoing exec pin and use the value to determine by how much
oh ok !
You're listening to the start of the scrolling but aren't doing anything with the direction you're scrolling in
yeah that's what i thought
i would need to divide it between 1 or 0 or something
i should have something like this
but don't know how to get it
Bleh I want to make a minimalistic UI now for totally artistic reasons and not because subscribing to everything is so annoying and has more race conditions than a OneD&D streamer.
i dont understand how this should work
- before the real plank was spawning where the transparent one was but not anymore :/
Hi all
Anyone know how to iterate through a structure members ?
I have a Structure with multiple Arrays in it "Array_1" ; "Array_2" etc... and I want to iterate through them
you just have to pull Array_1 and do a for loop,
then array_2 and so on
So I need to "break" the structure and do a "For each loop" manually for each array ?
sure
I can't do it automatically ? Like if I have 50 arrays..
couldnt you just make a map and put the array struct in the values
then you loop through the values and then loop through arrays
or just an array of array struct
can't do automatic, you probably should wrap in another array if they are the same element
They all are Array of Integers
just make an array of arrays then?
So no need of Structure ?
youll need a struct to be able to put an array within an array
I don't think that's accurate
how else would you do it?
But I need them to be "separate" by a different name
If I wrap them into one array it will be a problem right ?
well I guess in blueprint you need a struct
then use a map i guess?
So in my Struct_01 I create another Struct ?
if each name is unique
But in a Map I can set an array ?
you can but do you need a key value pair?
Yes I need an identifier for each array
make array struct like this
Because I will load these arrays and put them into each object which contains the correct name
Ok then ?
And I can add multiple Arrays in my Struct ?
you need multiple arrays for each key or just multiple keyed values?
you can do this with maps...
I need multiple arrays of integers and each array of integers has to have unique identifier
just keep adding elements to the map
So I add my multiple arrays in the Blueprint variable itself and not the Structure ?
yes, just make the structure a single array so you can use that as a value in the map
Ok I'll try that. Thanks !
hi im trying to make a clamp of a rotation what's the right way to do it
thanks
like i dont want it to go higher than 45
or 90 here
get the current rotation, add your offset, clamp the result, and set the rotation to whatever actor/component that is
I'm doing that thing where I make something more complicated than it needs to be again - I have a top down game where I want to be able to left click to select a character or an object. I am currently doing get hit result under cursor by channel, and then from there I am casting the hit actor to character, and if is valid, storing that as a "selected character", if it is not valid, checking if it is an object, and if it is valid, storing that as a "selected object" - is there a more streamlined way to do this?
ok thanks i'll try taht
depends entirely on what you do with those selected things, 2 separate variables isn't that bad
if they are stored to serve similar logic you could use an interface (but that could also be over engineered in some cases...)
so after all it's up to you
I'm trying to keep it simple simple for right now to make sure I get the processes
if you are a beginner keep it that way
Characters can be selected and moved around, objects can be selected and then "interacted with" (interactions pending)
I'm trying to make the controller agnostic to the individual actors, I don't want to have to set up onclicked/hovered logic in each parent
but what if i want like the player to scroll back and forth between + 90 and -90 as a value with incrementations of 10 and - 10? thanaks
Hello, I'm having a problem when I want to make a transition between two cameras, between the player's camera and the cine-camera actor in Level Sequence. I've ticked CanBlend and I want to make the transition between the two cameras. I'm using the Level Sequence editor to do this, but the problem, as you can see in the video, is that when I do this I get a sort of pop when I make the transition between the Level Sequence camera and the player camera at the moment of the blend.
The two camera have exactly the same settings.
How can I remove this pop?
Thanks a lot.
Hey guys I'm curious... say I've got BP actor. I'd like to reference some sort of asset UMyAsset, that would have its own settings (like a data asset) + it would have its own event graph and implement some sort of event. The BP actor would then call this event, passing itself to it.
Is there some way to do this? Point is I'd like to have both the data + the BP scripting, in one asset, and reference it from another BP actor.
Well a component has to be attached to an actor. I really just want custom function/logic + independent parameters, all in a single asset.
Oh so you don't want to attach them? Ok then that'd just be two seperate actors that communitcate via an interface or casting, no?
Well that's also an option, but again, I don't really need to spawn it. It's more like... in the BP actor, I want to have a parameter, and in that parameter I'll choose the "function" that I want to use.
Sort of like how you can choose you know, say a curve asset. But instead, I want to choose an asset that will have some data like a curve etc., but it will also contain a specific function that I'll define myself in blueprints.
hmmm... Function Library?
Yeah function library is very close, but it only has local variables.
Are you able to output the results of those variables and make them variables in the other bp?
(I've never actually used a function library, I just know they exist XD)
Anyone knows how to save my struct ?
I have a "Struct_01" and a "Struct_02". My "Struct_01" contains a Map (Name + Struct_02) but I can't succeed to save the "Struct_02"
My variables are not updated
Here is a screenshot. The "Array" Output is printing correctly but my "Print String" after the "Set S Test Structure (by ref)" is not printing the correct number.
I guess there is something I did not understand
I tried with "Set Member" node too but it's same
You mean the second "Find" node attached to the "Print String" ?
I don't know if I don't "Set" correctly or if the issue is with the "Find"
The "Set S Test Structure (by ref)" node should save the values into my "S_Test_02" struct, right ?
Or am I missing something to save my "S_Test_02" struct ?
I had to do this, you were right Map::Find returns a copy, and you’re changing that copy, not the struct that’s inside the map. After setting the members, you can do an Add on the map with the Key and StructOut (so overriding the stored value with your new copy).
Thank you very much!
Hey guys need some input from yall. Im making an elevator BP and it has mutiple floors. It works by 2 Bps the Elevator Bp and BP elevator floor. I have the call button working and it going to select floors. But now i need help in figuring out a way to do the buttons on the inside. I want to generate them based on the amount of floors that the elevator has modularly Ive tried a few solutions including spawning static mesh as component and hiding and unhiding based on which floors are in the index. Neither worked for me. Does anyone have any input or solution that they would be able to share with me?
Ideally i want to spawn a button with interactivity that has an assigned floor value
the floors are integers
Is there a better way to control where my actor would be on a spline based on a certain speed than this? cause it gets jumpy when I want to switch the Spline it's on...
someone know the gimbal lock?
I'm guessing there isn't going to be an infinite amount of floors, so what's your cap?
For the sakes of modularity probably about 100
can you fit 100 buttons on your panel?
I can scale the panel
doesn't make much sense from a design perspective but who am I to judge
anyways, you can probably have 100x arrow components or w/e and just attach static mesh components (buttons) to them as needed dynamically
put said arrow components in an array so you can iterate over them.
I dont think that is a good way to do it but thanks for the input
Possibly something like static mesh instancing based on offsets
Also trying to decide whether to have the panel in the elevator bp or have it as a seperate bp
I tried the seperate method with adding static mesh components but the arrays didnt line up and was inconsistent when adding the indexs in a for loop
So i might try to do it via the elevator bp and get the array of the linked floors and connect the indexs
That way floor 1 is floor 1 in both indexs
Instead of weird inconsistencies
does anyone know what's up with my rotators? Every time I try to edit one of the default axis it randomly changes one of the other axis???
That'll be because it's normalising them.
Or conveting them to quats and back again.
I swear its never done this before
sounds like you were already well on your way to a solution so idk why you asked for input to begin with just to say "nah, that's the wrong way"
my fault for not going with my initial instinct to just let you rubberduck yourself out of it tho.
Literally always has.
maybe they mean the normal rotation settings in a mesh details panel or w/e 😄
No need for hostility. And i did not say thats the wrong way to do it. Theres tons of different ways to do things in games dev. I didnt think that was a good modular way of doing it. I dont know what i did for you to react negatively to me in such a way. What was saying i can scale the panel an offence?
It's still going to do it?
we might be looking at different things here
if I use those exact values in a SKM component's xform settings, they won't automatically normalize
He's editing a raw transform, though.
😛
For making an actor damage collision system, would you reccomend using component tags, or using custom collision channels?
hello,
could you help me improve this logic for firing a weapon ? I feel that doing the enum each time a fire input is triggered is bad but I dont have other idea
Wouldn't it be better to make the smg / pistol switch once before input is read?
I don't know exactly how your firing system works so I can't fully judge this... But enums are basically a form of branch
I dont really know how I could do that
most cursed thing i've ever done)
it wasn't needed in the end, but it looks super cursed)
2 spooky 4 me
Is there a function or event that is called after all EnhancedInputComponent inputs but before AActor::Tick?
What about it?
Pitch and roll beyond 90 are meaningless
or rather, there are infinite euler angles that corrospond to the same rotation in space
Don't directly work with euler angles if you're doing something outside their scope.
Cant you scale and fix the elevator based on a defined floor amount? It doesnt really need to know about the floors, only a generic floor offset for the locations. As for the buttons thats mostly just a forloop with offsets based on regular grid setup x/y coordinates
Its not working off of a generic floor offset as it gets the location of the Elevator floor actor
so it practically could be used effectively to load level streams
I have the movement and everything perfect i just need to set up the buttons which im in the middle of doing right now
So the only thing remaining is the interactive buttons for the different floors?
mhmm
I have the call buttons sorted in the elevator floor bp
So a for loop then
the forloop method was what i origionally had
but for some reason it was inconsitent with setting the right indexs
i have it in the right range
Sounds like code issue
Practically it will work
So just gotta allign the code output with the world data , so to speak
In theory that was my conclusion aswell
Floors should be designated an id sorted by their Z
So the only thing left is the code
Index % MaxPerRow = row
Index / MaxPerRow = column
Rowoffset = rownumber * offsetPerRow
Columnoffset = columnnumber x offsetPerColumm
Should be fairly straight
Verify code øogic by printing the given index to the buttons
If they all match up but the id somehow goes to the wrong floor, then your floor ids are messed up
Floor Ints are pretty simple
0 is ground floor
and goes up for next floor and so on
and the assigned floor is set in construction script
Cheers for help man im gonna try that in practice tomorrow morning
Id be more comfy with finalmfloors evaluated at beginplay / runtime personally
Can I get only the first 3 items of an array which contains 10 elements?
So For Loop ?
ForLoop (start index = 0, end index = 2)
Hey peeps,
Can someone please explain to me when its best to use a Macro in a blueprint? Some peeps say not to use them but what's their general purpose?
They are useful if you have duplicated code that also needs to be latent, or if you want to use wildcards of variable types in some way. If they don't need to be latent in any way and you don't need to use wildcards, then you're generally better off with a function.
Thank you all!
Hello
Could someone help me with spawning actors?
I was trying to spawn one actor
If an enemy go into sphere collision range and move the actor to the enemy but i dont know how spawn the actor and move the actor like that
Thank you.
Hey there! I just wanna check that this is the right space for help with blueprints? Essentially I've been following a tutorial by CodeThings to create a door similar to Resident Evil where it opens partially then opens fully and should then close behind you. I've rewatched it many times and can't find the issue.
Essentially the door will occasionally open towards the player (should be away) and when behind the door it will partially open towards the player (wrong) and then open properly. I believe it has something to do with the mathematics involved, but its quite simple and I can't figure out what the issue is. I have a blueprint I can send of the door, the tutorial and a video showing the issue, I just wanted to make sure this is the right place and I could really use some support with this. Thank you!
(and the door doesn't close behind the player which is also not helpful lol)
This is the tutorial I followed: https://www.youtube.com/watch?v=ARtaj0dAE20
This is my blueprint: https://blueprintue.com/blueprint/-eeyxqmf/
This is the issue:
Support Me & Get These Files Here: https://www.patreon.com/codethings
CodeThings Community Discord: https://discord.gg/ngVv7JQJMT
Ready to make your game even more realistic? In this tutorial, we remake a Resident Evil 7 staple in its door system. If you missed the previous tutorial, don't worry, I've got you covered with a card link to catch u...
Not sure if this is the right tab to ask this in, but why is it that waterbodylake does not change my character movement component mode to swimming? If i set water volume to true, then I can swim, but shouldnt being in the water change this? I saw some tutorials that choose flying mode instead of swimming for swimming. So they are flying in the water and doing a swim animation, but I am not sure what is best.
Things don’t happen automatically. Change your movement type as needed
Whether that’s swimming or flying depends on what works best for your use case, so try both
Additionally, the engine assumes almost nothing about your game. As far as the engine is concerned a pool of water means absolutely nothing. You have to write your own logic
speaking of, i might need a little bit of an assistance
i've encountered a problem, i made a custom pawn with similar capsule basis, but, for some reason, it doesn't register any direct damage, like Pain causing volume and such, since capsule is just a component it can't directly bind events on "on damaged" and pawn actor itself outputs 0
i set movement mode to swimming on event begin play, but it instantly changes to falling or walking upon touching ground. cant seem to get it to stay swimming
Hi, I am trying a basic scenario with UI widget Bowl button, when clicked the ball will attach to character mesh and detach with physics and impulse like regular throw but I am facing issue when I try to reattach the ball, yes I disabled physics and collision but in outliner it's showing it's attaching but in gameplay it's stay at first time thrown location. I tried and verified everything. Please help. This is my last option.🙂
If i have a character that I am trying to manually lerp the position of, it will keep trying to stick to the ground or the navmesh. I am trying to lerp it on top of a table for x amount of seconds, and then back to the ground. I assume I have to disable something on the character, controller or whatever but I cannot figure out what.
when interacting you can check which direction the player is at relative to the door with a dot product. Based on the dot product, you can inverse the problematic rotation
Anybody have an idea why this Bind Event is working inside of a HUD Blueprint:
But this one isn't working inside the Game Instance:
Here is the call from the button on a separate widget:
Start Hud doesn't yet exist on the Game Instance's Init , add a delay before the cast
That doesn't seem to work either
ofc, your reference is never set to begin with im 100% sure
and that is also a redudant casting
read the warning
casting is just a type check
I followed the docs for casting. The note says Drive HUD Reference is already a Drive HUD, but if you disconnect it, it get's an error. Regardless, the others function with the same note.
Should I be getting the reference variables from the BP_HUD and using them in Game Instance?
@heady lantern 100% you misunderstood what casting is for
also regardless you need to set the reference
Running code as the target object, no?
you are assigning a pointer to null
please look into what casting is about
ain't no way you get these idea from anywhere
Ok bud.
You are casting an empty variable, then assigning that empty variable to it self
Way to make someone new feel stupid and put them off from asking questions.
where do that even come from
Your attitude. It's not pleasant, lol
some people don't like being told they are doing the wrong thing I guess
That's not what I'm talking about at all.
even tho that's just a fact and the info they need to fix their problem
It's the way you belittle while you do it.
Okay pal. I don't care to argue.
but no, I guess just be lazy
seems like you want a spoon feeding at this point
Not at all.
Uses cast wrongly, told to look what cast does -> gets offended
Not what happened. Offended by the attitude and the belittling, not by the "advice" lol
rather than fighting help, go fix your problem by reading the part where you are struggling with
saying you don't understand what you are doing is not belittling
You're an asshole, lmao.
Yes, that cast is pointless.
Casting is a type check, seeing if a general reference can be more specific (I.e. Is this Actor a DriveHUD), if yes, let me treat it like one.
Disconnecting the casts is the right move, however you still want to check validity of the object. The error you'll be getting is because the references you are casting are null, i.e. you're not setting them anywhere.
I'm sure you can deduce that this means you need to set them somewhere :P, either by grabbing the reference when it's spawned and saving it somewhere easy, or a couple of other methods. (If this DriveHUD is a widget reference, you may want to consider having the HUD class own all of these, as it's a nice easy globally accessible, per player, non replicated container for widgets)
why can't I set the members?
In a packaged build, my spawned AI is somehow not at the same height as my PIE levels and off by quite a lot
This is packaged
Z is positive 40
in PIE, it's -50 as it should be
the problem becomes that the unit is not touching the ground and cannot run the AI move script
anyone has any ideas? :/
Not sure why its offset but
Force it to the ground on beginplay? 😆
Wouldnt they fall down tho? Gravity and all?
so i did more tests in PIE and I'm confused
the ground is at -50
the values you see up there are the AI target locations
but the AI is actually set to 40.149
and I replicated this while having its location shown on tick in PIE and in the packaged build
so for some reason, in build, the Z location is set to something other than the ground
Tried to just force them ?
this is another instance of the packaged project AI just doing weird stuff
Beginplay -> trace downn-> set new location
packaging it now to test 😄
I am wondering if it's the target location Z that is the issue
trying to force the AI's Z on it
Try without the z overriden
which part?
I tried:
- force on tick the location to -50, the slime is under the floor
- leave the slime as it is: slime is at 40 and tries to find something at 40 but the nav mesh is at -50
I'm trying not to force the nav point to always - 50
also didn't work
yes
recast
it's a maze that is proc gen and I recast the nav at runtime
invokers never worked for me, even in PIE
@gentle urchin
did i tick something wrong? it was always dynamic
Sorry, had to fix a dirty job. My A.I hasnt gotten the potty training set yet
Settings look fine to me
Does anything nav related work?
Wont work with proc gen tho
it wont?
