#blueprint
402296 messages · Page 884 of 403
@quiet canyon Not sure exactly what you want, but couldn't you lerp to the look at rotation then clamp the final value?
How do I assign a dynamic material instance to all actors of a particular class in the level?
I guess this is hard lol
how do i stop my Pick-upable item from just floating mid air? i have gravity enabled but the skeletal mesh wont move its butt down to ground lol
Not really. EventHit only runs when a mesh collides with it that has collision primitives and correct collision settings. If your weapon is a line trace, you need a different event.
🤔 maybe i should ragdoll it
@flat scarab I would keep track of these actors on spawn via an array, then when the event occurs where you want the dynamic material instance changed do a for each loop with your material change.
If you are not simulating physics, objects will not move on their own without a movement component. If it's floating in the air it's because you left it there. Try something as simple as a sweep movement to actor location + -500z
hmm.. so adding a movement componment could make it fall down?
It can. But I don't recommend it. Movement component's are semi cheap, but they tick. For something like a pickup, that sounds like it could easily spiral out of control.
Thanks, it seems to be working now but I wanted this random color to be the same across all actors within that array, only changing when going into runtime.
when exiting one hit box call a function on your character that queries all of it's current overlaps and do what you need there
https://gyazo.com/60e1b2561d65ea92f052526d65ee8ef1 as i cant enable simulate physics for some reason
Imagine you have cube and camera..
- Camera is using "look at rotation" towards the cube..
- The cube is moving fast -> I do not want to get headach by nomerous small rotations by the camera....when he cube is zig-zaging
- I want to set some kind of a deadzone for the camera so that only when the cube is making more drastic (bigger) movemenst then the camera to rotate ?
So you say it can be done by first learping to the look at ortation and then Clamping that roatation ? Thanks in advance !
Likely reason is that the component has a mesh in it that doesn't have a correlated physics asset.
i c
@quiet canyon And for the deadzone do a check to make sure that the look at rotation is greater than an initial rotation value. If it's NOT greater then do nothing. If it IS greater then start your lerp to the new rotation then clamp.
hello everyone im making some adjustments in my ai and i need to know how to do 1 thing
anyone know how to do a strafe
action
for behavior tree?
Yes but I can't figure where/how and when to do this .. to store the rotation value of the camera ?... OR do I use the cube location ..? I'm talking this: initial rotation value ? how to get the correct value each time ? for me to compare it later ?
It's like I need some get deviation from the center of the camera/screen ... ? but again I don't know how to do this ? I can write it in CPP btw I'm trying to figure out thew logic
@quiet canyon Like a lot of things, the answer is it depends. If the cube is the player, it might be good to put it on Event Tick. If not, make an event with a timer that can be cleared. Write out your code diagram on a chalkboard/whiteboard -> blueprint (for rapid prototyping) -> CPP
Ok, Thank you, I'\ll try to sum up and test what you suggested
yeah thats what I thought but how? only thing I can think of is some kinda variable that counts up each time you enter one and subtracts when you leave, and detects when it hits 0
Event end overlap -> get overlapping actors -> check if any are water
ah thanks, I guess I didnt know that was a thing
so would anyone know why this would happen? I fixed up redirectors in my project and now some of my main classes lost the parent class breaking tons of references. is there an easy fix to this or am i screwed? lol I do have source control but reverting didnt seem to fix it
the parent class wasnt deleted, but its no longer referenced in my child classes
it reverted some of my character classes to just actor classes
I have both health and armor variables. I'm able to get a) armor to regen immediately after taking damage, and b) have damage apply to armor before health. How should I clean up my code to allow for a 3 second delay before armor regens at 5% per second?
If source control didn't fix it. It sounds like some odd corruption. There isn't really an easy way to fix that besides just redoing it as far as I'm aware.
thats unfortunate. guess I get to make it better this time lol
Projectiles impact on enemies
But anyway I can't use event hit for reasons explained above
Anyone have a good naming convention for "abstract" functions so you don't forget to override them in child BPs?
You'll forget them anyhow. Would rather have the original parent function broadcast a warning if it runs and just not run super in the override.
That's a great idea actually, though it doesn't solve the naming issue
It's not uncommon I have a set of methods like this, where at first glance you'd think "what's the difference between OnDeath and HandleDeath?". And the answer is HandleDeath contains all the base logic for the parent class that HAS to run when it dies, while OnDeath is an abstract method so that children can add functionality
And sure, I can and will make HandleDeath private but it's still confusing in this ui
It's not really confusing though if you stick to that convention. I name things similarly. If something is named Handle, I assume something else is supposed to run it like a binding or such. I usually do stuff like PostDeath, or PreDeath for inheriting functionality change.
Wouldnt it be cleaner with just one OnDeath fn not private, and override + call parent function for it in a child who's extending the functionality?
If thats whats ment to be overriden, ofcourse.
This is also one reason I love the C++ barrier though. BIEs are great for inheriting functionality for designers. You know the heavy or important code is done once C++ code calls a BIE.
True, I prefer that aswell. Giving bp an opportunity to react
Wait what's a BIE? I don't really mess with C++ at all
BlueprintImplementableEvent. It's basically an event that you can make in C++ that runs blueprint code in the bp classes inheritting from your C++ class. There is no C++ implementation for BIES.
Oh neat
I use them a lot for allowing C++ code to do simple stuff like show widgets. I very much detest messing with widget creation in C++. So I make BIE events in my AHUD class and call them from C++ that way. If you mark them BlueprintCallable, you can also call them in BP.
I'll probably have to sort out C++ sooner or later... I'm putting it off as long as I can though. Hate that language, even before Unreal piled all their shit on it too
UE made workin' with C++ pretty nice imo.
Hmmmm what IDE do yall use with it?
You can't make me
I haven't seen an IDE war in there yet today.
Are you using UE5? Cause honestly. UE5 has made using C++ so amazing.
The new Livecoding is just phenomenal.
It really is.
Not yet though I'm considering switching over
I mean to UE5
I'm really trying to get a prototype level playable, I've got a bad habit of going off into the lab to build some Cool Shit™️ instead of just you know sticking with it. So I keep telling myself I'm not doing ANYTHING that isn't critical path, and that includes the UE5 upgrade
But that said I also know sooner or later I'll run into something that'll make my life way easier that's in UE5 and not UE4
So far - I haven't had any issues with upgrading to UE5 personally. I only have a side scroller and a top down game though. If anything UE5 has actually improved my team's work. They mentioned it runs smoother for them.
The new UI is a little jarring at first. Took a little getting used to. I don't think I've had any bugs yet in UE5. Nothing like 4.27's fuckup with missing non native C++ interfaces in dropdown lists.
Way I see it, when a new version of anything gets introduced, there's very few ways being on the current version fucks you, and probably a bunch of ways being on the new version might fuck you. But as time goes on, there are more ways staying on the current version fuck you, and ways the new version fucks you get resolved, and sooner or later the graph lines cross over. That's when I upgrade.
I feel like the new UI is too slimmed down. UI designer got stuck on one of those shitty youtube videos about minimalist UI.
I miss my giant "Play" button 😭
Oh man that's everything nowdays... I remember conversations with designers like "well what if we displayed that info in this huge whitespace here?" and they're like "NO WE NEED THE WHITESPACE"
Serves me right I guess. I say I haven't found bugs in UE5. And now I can't get basic ForEach loop macros in any UserWidget classes.
Agreed. I had a bit of a problem getting in to it, until i understood it from an Unreal direction
Is it a bug tho, or a feature 🤔
If the point is to be annoying, definitely a feature.
Basically I have a widget. Left. Just opened Editor. Cannot see ForEach Loop.
Right, is after opening a Character Blueprint, and then going back to the widget and doing For Each again on the same pin.
Yeah - that's what you get! 🤣
I feel like this is some odd attempt at optimization. And UUserWidget's BPs for some reason don't load up the macro libraries .
can somone help me attach my pistol model to my player and have it be able to shoot?
I am sure myriad existing tutorials can, yes. As far as someone personally walking you through it here, doubtful
And i mean that in an informative fashion, not a rude one
i cant find any that work as they all have full player models and i dont have one just the base colider and it isnt useful to just say no one is going to help even if it want meant to be rude it was pretty rude
Timelines as well. Dear lord timelines 😅
Can't help you there. good luck
why would you say something if you cant help and on top of that say no one will help
Sorry, i do not have time for this.
There are still a myriad of tutorials that will walk you through this. It is one of the early things most people do in UE. If you don't have a model, you can just attach the weapon to any regular ol' scene component with AttachToComponent. Or you could just have a basic mesh component and just use the guns mesh as the mesh property.
To fire, you can just pull off your input event and then do a line trace.
I used this the first time I went in to make a shooter great tutorial series, Just find out what you need https://www.youtube.com/watch?v=DywBqQtTHMo&list=PLL0cLF8gjBprG6487lxqSq-aEo6ZXLDLg
If you've ever wanted to create a first person shooter game but weren't sure where to start, this is the tutorial series for you. You'll learn everything you need to create an FPS from scratch using Unreal Engine 4.
You'll learn everything ranging from creating characters to setting up weapon systems.
Head over to the next video to get started...
All of this is covered in the hundreds of tutorials out there about this specific functionality.
Is it possible for a subclass of a BP with an attached Actor Component to replace the Actor Component with a subclass?
I realize that's the most confusing question ever. It's like this
ParentObject
ActorComponentA
ChildObject(child of ParentObject)
ActorComponentB (child of ActorComponentA)
Is that legal and I just cant figure out how? or is that not possible in this language?
Also Virtus tuts isn't exactly good
If I'm trying to change one value, especially for a large struct, is there a better way of doing this?
In C++ you have to set all 4 floats (or with either FVector or FVector4) for FLinearColor.
So if that's the best way of doing it in C++, well...
generally structs are meant to be read only. in your case, it doesn't make a difference. you can't change the SetBrushColor node. but if you needed to set members in a struct, you can try SetStructMembers
So uh. I don't want to be the guy that keeps telling you to try UE5. But you can do that in UE5. 😄
May be possible in 4. Unsure. But I know that the UE5 Character class can replace it's CMC with child versions.
Maybe. Though you'll probably see 5.0.3 for bug fixing first.
I think the source version is at 5.1 already no? or just at 5.0.1
Maybe.
Im having an issue with sockets and physics, how would I disable physics when something is socketed?
im currently trying to assign a variable in a widget but I don't see the float
this is inside the gun bp
and this is inside the widget
ok how do I actually check that now? Im using the -1 thing and its just being really inconsistent
and I dont even now if thats right in the first place, how do I even check if it exists in the array
Well, count 1 so far of actual reasons to migrate then. Thanks for letting me know!
Are you attempting to create a binding on a widget element? Trying to make this binding use the float value?
yeah i figured it out ty
Get overlapping actors
yeah
But you might be just remaking a crappy version of something that already exists
Get the length of the returned array
If the length is greater then 0
Or iterate over array casting to WaterBody
You are overlapping with a water volume
Depends on how you set it up. If you have a custom channel for water stuff then just check array length
Yes but get overlapping actors has a class filter
Ooh ya cool there you go
so I was kinda doing the same thing with my counter method but just a stupid way
It sounds like you're remaking physics volumes or water bodies tho
from what I can see physics volume has very few options but idk if Im just not finding it
uh

Is the GetOverlappingActors node located on your player character?
or is this node located inside the water volume
player
still at 1 when I end overlap
but going between water volumes keeps it at 2, so maybe I can just check if its 1 lol
that should not be the solution
true didnt work
yeah did and then suddenly it didnt
ok well maybe your water volume has more collision boxes then you imagine it would.
I specified the component to overlap
yes but each componet in the Water Volume has the possinility to overlap with the player
IF there is a plane or something that has a water texture over it, that also could be overlaping with the player
I did a check at the start if overlapping component = hitbox
So even though there is only one componet that can call OnEndOverlap, when OnEndOverlap gets called and you check to see if the player is overlaping with the water volune still, maybe you arnt overlaping with another componet in the water volume
That wont help sadly
I would check your water volume and go over each componets collision settings
Turn off GenerateOverlapEvents for every compoinet other then the hitbox
also make sure the collision preset is set to NoCollision
kinda necessary to make splash effects and stuff
Do these splash effects need collision?
dynamic 2d waves using bone collision
maybe the counter solution is best, seems to work fine
not sure anything about that, but if you need other componets in the hitbox to collide with the player, a different solution is needed
The counter solution still would not be the best
It could very eailisy get out of sync
yeah thats what I was thinking
each point needs to receive overlaps from the player to make a wave/ripple https://gyazo.com/cebd80c659f7f4379bc9b43e4df11b64
although
I could probably just make another collision channel? although its still overlapping both parts so idk
Yea so thats why GetOverlapingActors would not work
I would iterate over the array of overlaping actors
CastToWaterVolume
and get the hitbox componet
then check if the player is overlaping with that componet directly.
I like@this 😄
thanks lol, took a while and a lot of help to get working
For the gui is u use image?
wdym? just a normal widget setup
the icons are images yeah
another solution would be to use a componet tags and GetOverlapingComponets
K
that might be easier on you
Ima make a new project I think
What should I make?
Wait
I have idea
nice
some advice from a guy whos been using ue4 for about 5 years and not finished a single thing: definitely set limits for yourself. and try to think of the simplest possible way to do something because it will make everything so much easier
oh thanks
didnt know isoverlappingcomponent was a thing
Using the IsOverlapingComponets method you would have to make sure to set a tag on the water volume
The GetOverlapingActors method would probably be best
directly checks if you are overlaping with the water hitbox
Instead of checking to see if you are overlaping with any part of the actor like before, with that code we are directly checkingif you are overlaping with any water hitboxes
yeah I can kinda see what it does but
but?
well its just constantly stopping the swimming
oh yea ....
actualy wait
I thought something was off but im not sure
You put this code inside a function?
nah, not even sure where that would go
it must be inside a function
what actually calls it
oh thought so
my function name is kind of bad
Maybe TryStopSwiming
is better?
something like that
Since the function doesnt just check if you are overlaping with water, but instead actualy will stop swiming if you arnt.
oohh thanks I think this works
nice
but now Im curious, why does it only work in a function? what does that change
If you want me to explain it then id rather do it over call.
Not trying to in text
want to call real quick?
its ok lol
for some reason I prefer using custom events so for most things I default to that even if it should be a function
so if the function detects that you are overlaping with water, the function will end before StopSwimming is called
I guess that was not that hard to explain xD
oohh ok
They can contain variables inside them
amazing
and you can do fancy logic with returns
Also the way it works in blueprint is that a function will stop litterely everything else your game is doing until it finishes
Which may sound bad but is really amazing as well
oh thats weird, wdym?
custom events run asynchronously
although this kinda sells it to me I have like a million variables in this huge list I might just convert everything to functions now just for the sake of that
which means they are executing at the same time as all the rest of your code in the game.
This means that in some cases, important information could change in the middle of your custom event
Imagine if you confirm a value is X at the beggining of your custom event, since the code should not work if the value is not X, then somewhere in the middle of your custom event, some outside source changes X
This can happen in some cases depending on the code of the custom event.
When you call a function, you are just garuenteed to know that nothing will change during that function.
and yes that is one of the biggest reasons
Yeah, using custom events can lead to some uncertainty in certain exotic situations about which one is executing in which order
But custom events have all sorts of Time nodes that you can’t use in functions
well also, a lot of my events have like more than 5 variable checks to see if they should run but Im not sure how that would work with functions
you would just check each variable exactly the same as before
but inside a function
Lets say one of those varialbe checks came back as false
you can just call ReturnNode inside that function
which will imedielty stop the funciton
are they more performant then?
cus its kinda worrying how long my bp takes to compile already
Its not a big deal, if your blueprint takes along time to complile there are most likely other factors to that.
Also yes
damn
the one big drawback to functions is that you cannot run any nodes that require time in them
such as
Delay
yeah I noticed that before
This doesnt work becuase the function needs to pause all execution till its completed. If you put a delay in the function, is the game supposed to just freeze?
So that is why its important to understand the difrerences
Sometimes functions arnt the best answer
sometimes you need a custom event
you see
or even a macro 
oh yea and also......
functions can have outputs
custom events only inputs
very helpful to be able to output values.
oh I see what you mean now, so functions have to be instant
yes
be careful because if you make a super advanced function that takes forever to execute
it could make your game hitch
BRUH I completely forgot about outputs, theres been a lot of occasions Ive wanted outputs from custom events somehow and I just didnt think of that
If you need outputs and asynchronous logic, you can use a macro
if you need outputs and the logic could be run instantly, you can use a function
Hey, I have question about attach component to component node. Is there any hidden event that will make items that attach/switch position with attached item give some blue particles?? I can't figure out why it is happening.
Most cases use function, since will solve your super long variable list issues
and because return nodes are very helpful
and because more consistant
and alot more
but yea
Can also organise your functions like this
Just saying that cause when I was new it took me like a year to figure that out 
Are you talking about a actual blue particle effect?
cause no there is not anything built into unreal like that
Could someone possibly help me in the Unreal Hangout channel real fast? I feel like its something small Im missing but Ive tried googling and everything and cant seem to find someone that points to what Im trying to figure out with my mannequin
I mean, there is like a little blue particles pointing towards socket where component was attached. It only happens when I "switch" components with each other. To be more precise: I have one component on "toolbelt" and one in hand. I switch them, and then particles appear. They slowly vanish after 1-2 seconds.
Ok I feel stupid. Just went through the blueprint tutorial and started to try branching out. I created a small elevator script and wanted to use the flip flop flow control. I wanted the elevator to toggle between two positions on the 3rd person controller's overlap. After some googling I cant seem to get this node to work in the way I wish. Can someone explain what I'm doing wrong here. If I read correctly the flip flop node should swap each time it's triggered but after the first time it appears to trigger both a and b rather than one or the other. The elevator doesn't go down I think because it's technically playing both the up and down animation at the same time
sorry gave a better overview of the bp in the new photo
This might be a far fetch but I see that the trigger volume is attached to the mesh, so while the mesh is moving it moves the trigger as well and calls the begin overlap event again.
Hey all im trying to make a currency conversion system in my game does anyone have a bit of guidance for me on the best way to do that? thanks
Try attaching the trigger to the root. If that doesn't work please share the timeline and the start and end points
it was the size of the trigger
Got a quick question about referencing level actors when trying to access them in UI
If you mean the Level Blueprint, you should not ever be referencing the level from anything else. It's meant to be a self contained class and not have anything else reference it.
@maiden wadi Basically in the character selection, when I select the character I want them to be highlighted in the main menu level
hello, is there a way do disable overlap events of all foliage actors placed in the world?
Just change their collision settinfs
I have a noob question - if I have an empty array, will this function return nothing? If so, how do I check if it returned nothing?
you could get the item name and check if its equal to ""
or just add an output to the funcction
that is called Success?
a boolean
It probably won't return and will shit it's pants unless BP automatically adds a return if it doesn't hit one
I tried to change collision to no collision, overlap event is still ticked. I guess it wont trigger?
ah I see. I am fairly new to blueprints so for me it's a bit of a paradigm shift, I am expecting null returns and requiring null checks
it does
Show collision settings
Then it'll prolly return nada
yea, it will return nothing
I wouldn't rely on that tho. Add a return for every possible code path.
so just a boolean?
well exactly, it will return a blank defualt struct
and yes just use a boolean
its more simple
is it the "right" way to do things in blueprint?
A find should return a bool as well as the item probably
I come from years of Unity so for me UE is flipping a ton of things upside down
yes this is standerd
yeah I've read this multiple times and watched a few vids
You guys are just not adding return statements in Unity?
the way I did things in Unity, I never returned a boolean for whether I found an item or not
just did a null check
but when I tried to do one I couldn't find a null in blueprints
You can do that too, if your return is returning a pointer. You're returning a struct though.
Like if that function returned an actor reference, you can just check if it's valid. But structures in blueprint are pretty much for data only, they don't really have a concept of being not valid as far as I know unless you do something weird
yeah I'm also not sure if I'm doing the right thing with using structs in this case tbh but I'm not sure where to ask
exactly, I've noticed that. I tried using IsValid but it only applies to Actor
Describe your inventory system in plain english. An item is a what and it is stored inside of what?
It applies to any u object but you're probably returning a structure
I like items as structures anyway, just return a Boolean as well or have some sort of invalid default structure or whatever.
In my projects items are all structures first and foremost and only become instantiated into actors when dropped in the world or equipped
An Item is a thing that is stored in an Inventory. The Inventory is an array of a certain size.
My current architecture has an ItemActor (the physical item in the game world you can pick up), an ItemDataStruct (details about items like their name, description, additional "global" info about a specific item), and an InventoryItemStruct, which contains an ItemName and Stack value, to allow for items to stack on each other (e.g. you have 3 Inventory slots, and two of them have the same item, one with 10/10 stack and another with 3/10 stack)
I'm working on a pretty unique system, where it's pretty much that but every item also has a guid
To enable some really weird stuff like being able to talk about a specific poisoned apple or a specific stolen car or a specific fingerprint of a specific player that is on a specific window
phew, thank goodness I'm not totally misunderstanding everything
that sounds fun]
so your items are completely unique?
but anyway, thank you for your help. I am really enjoying UE5 so far
happy to hear 
Not so much that they're unique, but they pretty much all have a unique fingerprint or serial number. Enabling certain things like tracking an item or other stuff like that.
do you play a detective?
its multiplayer as well?
murder mystery???
Btw i love your name
hello i got a small issue , am trying to make some name plate for my prototype but the name won't show up
i only have the progress bar and no text
Sounds like the Text variable you bound it to is empty.
but it's not
Not sure. I 100% avoid bindings.
also have thing like this sometime
Honestly. Just set a text property on the widget from the actor's Beginplay. And set it from the widget's tick. UMG bindings are fickle. The only decent UMG binding is the TooltipWidget one.
Hey I am trying to create a FPS aim trainer level in UE4, where sound comes from a target and you get points for hitting the target which made the sound. I’m pretty new to this and not really sure about how to set this up in the blueprints. Any help would be greatly appreciated 😊
Sounds like you're mostly just looking to spawn an actor, or a set of actors, and mark one as the correct target. That actor should play a sound through a sound component. The rest should not.
Thank you sm that definetely put it in context for me
IS there a way to disable the double click event on UMG elements? It is preventing me on having fast clicking on elements, it keels getting the double click. Very annoying
There is not. If I need to do that, I create a function that takes in both parameters and outputs the return value and call it from both MouseDown and Doubleclick.
so if I accidentally generate a double click it will call the same function as single click?
Basically this. Then you put your click functionality in that InternalMouseDown function just like you would have OnMouseButtonDown.
Oh
I'll see cause one of the issues is the brush style updating. Some times it does not go back to Hover style :\
lemme try. In the meanwhile, Thanks for the suggestion 😉
IS there anything you have to return in the return pin?
OR can I just put unhandled?
Depends. That is for input blocking. Handled will keep anything UI related under this from running, and also not allow the click to reach the player controller which means if you had a weapon in hand and fire on left click, clicking would fire it if you return unhandled. Returning handled stop the input from going past this widget.
oh, it's the Editor Widget so I don't think it's an issue, right?
I'm making an Editing Tool 🙂
Possibly not. Usually you'd just return Handled unless you really need that input to travel further.
IT WORKS 😄
I can click like a maniac and the Brush of the UMG updates properly
xD
Thank you so much, @maiden wadi 😄
I'm making one of those buttons that change text on it, cause I think it's a cool UI element 🙂
Heya all, I'm looking for a Fast Travel tutorial that uses a user interface to allow players to choose where they want to travel too. Any suggestions?
wouldnt a simple widget to select destination and teleport node to travel work?
Yea, I might be over complicating things. That's not a bad idea. Ultimately I'd like the widget to be dynamic, so it will pick up on all the locations in a level, and populate the widget with their names.
you should be able to do that with like a few empty capsule collisions with a tag or a bp thats reused to just mark fast travel locations, and inside you widget i think you could do the get all actors of class and put your fast travel loc bp in the drop down and the hook that to a for each loop to show on the UI
hey yall ive been learning blueprint on unreal engine 5 lately and been having a lot of fun. anyone have some tutorials that they recommend?
Unreal's learning portal is prob the most accurate tutorials
awesome thanks
np
Ok, that makes sense, I'll see if that works.
what is the typical way to throw exceptions in blueprints?
or handling unexpected behavior
Question for ya, and you can hit me up in a DM to answer. You mention a drop down, do you mean a widget component that is a drop down?
Suggestion: unless it is sensitive or private, any instructional conversation posted to the main room helps everyone learn
True, I'm not always around. and it could get buried if I leave for to long. 🙂
Ugg. I know what you mean. I generally request that people send an @ if i am not online when they get around to responding (which they can easily check by clicking on my name) THen, when i get back, i can just do a quick search for mentions.. But, yeah, having it all in DMs is much easier 🙂
I really think discord needs a substantial redesign
Discord question, does anyone know if 'Threads' are public?
I think so
Just search in YouTube teleporter unreal engine. There's a few tutorials for blueprints that have a specific teleporter location for every instance of the blueprint
I might be missing something here, but my struct is not changed in any way.
Find Empty Inventory Slot returns an ItemStackStruct
I have set the Added Item at the start of the function, although I cannot see any values in the debug when I put a breakpoint (not sure why)
The branch returns True
I feel like I'm fundamentally misunderstanding something about structs, or not passing by reference for some reason, but the idea is that I find an empty Inventory slot (first empty/default struct), then assign values to it
Wish i knew enough to help you. All i can say is unrealgaimedev has a great inventory tutorial from scratch to finish, that i seem to recall covering this
yeah I've seen a few inventory tutorials before, but I wanted a somewhat custom solution
indeed
yea
is it true that I can't return a reference to a struct from a function?
this doesnt woek
I need to return the index and then access it again?
its complicated to explain D:
you are not returning a reference to a struct yes,
it returns a copy
yes
and there is no way in blueprints to return it by reference?
you can, but it wont work in your situation
Just think of it like all returned structs are copys
RIP. In what cases would I be able to return struct references?
I see that setting members of a struct takes in and returns a reference
but this is obstructed by CPP
would it be wiser to write these systems in CPP?
Yes, for core systems like inventory, better to write them in CPP
what is a general guideline I should use for deciding whether to use CPP or BP?
I mean its really up to you
But BP is really good for gameplay scripting
Made so game designers can easiliy script things without having to do CPP
Just also happens to be very powerfull
to the point where you can create the whole game in it if you wanted
just surprising that return by reference is not a thing in custom BP 😦
yeah I'm debating whether to rewrite the system in CPP or just do the index
whatever you feel like xD
not a huge fan of cpp though so gotta think about it a bit
probably will be faster to do BP
definitly for sure
so easy to use and throw stuff together
its not a big deal anyways
esspecialy if you are making a simple game
I don't really mind much in terms of which one to use, I'd rather choose simplicity but I also don't want to be stuck having to refactor a bunch of stuff down the line because some 1 crucial element is impossible
lol well if its a system you are making, such as an inventory, anything is possible
BP falls apart when you need alot of control over engine things, or when you need to edit or use existing UE things in more advanced ways.
I have a gameplay loop in mind that's extremely simple and in theory could be done in BP but now I'm a bit afraid that 80% of the way through I'll see that "welp, turns out I can't do X in blueprints, which means I have to rewrite it all in cpp"
just wildcards like not being able to return refs
Yea
that's not a thing that would be an obvious limitation, there seems to be no reason for it
You just have to get more creative
its not nessicarly a limitation in most cases
just more annoying
either way if you are willing to start over and are good with CPP
just do that
I might just bite the bullet and try the same thing but in CPP. I'm well versed in C# and Unity so it might take a bit of getting used to it
Good plan
There is 0 reason to start over if you hit a limitation in BP. You can simply do the things you need in c++ and leave the rest in bp
that is true as well
that makes sense, but if it's 1 function that really needs it, I can't just write 1 function in cpp and use the rest in blueprints, I'd have to write the entire system with it too
BP is best for prototyping as iterating is much faster then c++ and you can easily transfer logic over to c++ once you have nailed it down
Yes you can
Infact you should
Its only the case of, do you want to have the logic split up or just do everything in one way
But there are blueprint callable, implementable, and native events you can use to communicate between BP and C++ as well
my preference is to clearly define a line where CPP is and where BP is
I don't want to have some parts of the same code in one and some in other without any clear distinction
if the architecture is designated ahead of time, it's fine, but if I write one function in CPP and another in BP in the same class it just adds complexity I don't need
its not a big deal, just a silly thing that triggers me
can I call BP functions in CPP classes? Probably not, right?
Not directly but yes it's possible
aren't BP classes children of CPP ones?
all of this comes down to what way do you feel like you want todo it 
yes
you can do it anyway
100% bp, mixed 100% cpp
doesnt really matter
yeah so if I have the Inventory system split in half cpp half bp I can't use bp-defined functions in cpp
just whatever way you want for each situation
fair enough
No professional project will ever have 100% one or the other. Its designed to be a mix
Its really not that serious unless you are making a professianl project yes
Or multi-player, or anything thats loop heavy, or uses a lot of structs, or a ton of other reasons
They both have strengths
being new my biggest struggle at the moment is trying to see where I should draw the line between CPP and BP
Initially do everything in BP and once you have it working as you want, then move functions to c++. As well as anything you want to hide from designers
that's an interesting approach
If the whole class gets moved, fine. If you want to just call the c++ functions from BP and leave the implementation in BP you can do that too
I've been looking and found a few. I find it's a good idea to see how the community feels about specific ones. Getting a lead on some and doing my own research helps narrow down the good ones from the, well, the others.... 😉
thank you for your help @trim matrix @tawdry surge 👍
No problem. Epic actually has a pretty decent blueprint to c++ course on the learning portal that will cover how to go about moving functionality from one to the other
@daring vapor Good job on the hour of code series btw.
I start alot of my students out on it as initial homework to reinforce the basics of getting around the editor
I just finished a blueprint and I'm having an issue. Whenever I enter the collision for my doors to open the blueprint functions as intended except my door seem to teleport. Any reason why this would be?
probably some code in the 'on overlap' event
a world position instead of relative, perhaps
Both moves are relative locations and I cast the on collision to a 3rd person controller
You are very welcome. That's super cool to hear that you are using it. BTW we are planning to update the videos, as the project is changing soon. 😛
Nice! Looking forward to it
More visible node setup photo
Where are you getting your starting/ending location vectors?
Hey yo. So i am trying to make a master button blueprint, to then have different buttons that raise different variables. how do i tell the children which variables to go up with?
Ok thats probably a major part of the problem. Is there a way I can pull the position of a static mesh in the bp?
Get relative location of the door components
got it ty!
@round moth what is your end goal? Because the easiest way would be to just have a public variable that you set per instance of the button
like a clicker idle game but you walk around to the different buttons, clicking up the variables
so each buttons bring their respective variable up
so the only thing that would change between them would be the variable
this is what i have so far for the master bp with money as an example
better pic lol
get relative transorm right?
You can make an enum, make a matching variable in the blueprint, mark it instance editable, and use it to drive a switch or select node
@plucky plank that works but its all three. Location, rotation, and scale
ah so whats the one for location?
Relative location
Drag off the static mesh component reference
It should pop right up
ok so i made the enumeration, could you please remind me how to get that into my master bp?
wait ima try first then ill look to see what you say
You make a variable and set its type to the enum you just made
Check the instance editable check box
i did
Ok now either a select or a switch node. Either works
ok so
So you'll have to string it up so that your choice leads to the right variable being updated
Then place a button in the level and in the details panel of the main viewport (with the button selected) you can set the enum to be what you want
Glad to help
Are they grayed out? Or whats the issue?
Are you playing
no
Hmm.. try restarting the engine. It might just be a glitch, cause the variable isn't inherited and it isn't read only, so it should be editable
oki doki
i kinda goofed with the variables i think, not related to them graying out, but i had the variables in the button instead of the player so i had no clue how to send the info from the button to the widget
that fixed it
You could use the casts on the overlap events and get the reference to the widget from the player that way
just finished this sick organized blueprint with no issues whatsoever
So... arrays and loops are a thing btw
Hi, when my character jumps, it stops on land losing all momentum, how do I have it keep momentum and not stopping completely?
I also remember I can make a struct, making it so i could change things like the mesh of a child blueprint i think
anyone know how to make a sign in unreal?
Check under the 'Character Movement Component'. Try braking friction
Does not fix it, but it comes from the root motion mode node, but if i remove those then root motion doesnt work as well as it does with those nodes
Hello, I can't seem to find (vector - vector) in UE5
Is there a new way get it or am i missing something?
Depends on what kind of "sign"
Right there, Subtract
UE5's math nodes are more universal
Ohh sweet! thanks haha
Im using a physics handle to grab items. But for some reason I can't actually "grab" the items until I use the character to push the object first
like if I press E on it to run all the code to grab it and what not the object doesnt follow where I look
but when I push the item and it begins to roll and I press E
I can now grab it and it follows where I look
is there a setting I have to toggle somewhere that I am missing?
Is there a way for BP to not show the event dispatchers in the details panel?
You can use decals for that
https://docs.unrealengine.com/4.27/en-US/WorkingWithContent/MeshDecals/
ooh cool
what is this node and why would I ever use it
It's a local variable holder mostly for macro's, because macro's don't have classic local variables
Thanks! I see, there's this node that's being used to set it too, never knew that!
When adding the Vehicle content to any other project, Why does the parent class not follow with? or gets loaded at all and how does one fix that.
heh.. would prob help to enable the plugin bonks myself
So can u , say what are u doing here? looks like u should use an Loop, or Array, or idk i never saw something like this before. and i Work with Ue4 since 2014 
I'm creating and adding a child widget inside other widgets PreConstruct. Then Im trying to modify the slot properties returned by the AddChild but this does not seem to take any effect, is it impossible to modify slot properties in editor, or is it something on my end?
edit fixed, my cast to slot was failing, because I chose wrong type
I’m making custom levels for ready or not, there are multiple possible spawns for AI represented by an actor. It sets the base ai spawn’s location at the actor position based on a random number linked up to a int to number thing.
I was gonna make it broken down into 6 groups, but I decided to have a 129 pin long sequencer for some reason
Post it in here
hi ! I've completed BP on learn.unreal do you have recommandations on where to head next for good tuutorials ?
thanks
xD .. omg never saw this..
@sweet silo converting BP to c++ is a good course after you're comfortable with blueprint
The one from "the division" is absolutely absurd
Can someone post it on there for me, I gtg to school and gain more brain capacity to hopefully not make another disgusting blueprint
What's a good way to move the character during an animation while movement input is blocked? E.g. if your character has a special animation like a roll, and you don't want to allow free movement, but need the character to move to a specific direction. "Launch Character" action isn't the best for constant movement unfortunately
Root motion
I'll look into it, thanks
hey all - i have a pawn that can have force applied in any direction but I want to basically implement a speed limit at which no more force will be added. the problem is that I can get the speed that the pawn is moving from its velocity but I dont want that to limit force in a different direction that would ultimately reduce its velocity... if that makes sense - any tips on how to approach this?
i guess the question is how to I get the speed of the object in a specific direction?
just do that with minus?
well idk how to get the speed because if I just gets its speed it could be over the limit?
although I think you could just get an abs of the velocity and if thats too high then dont apply any more speed
well it could be moving forward at X speed but I dont want that to disable backwards thrust for instance
not sure how to check if the force i want to apply would increase velocity beyond the limit in any direction
Im thinking it wont matter because youll only be moving one direction at once, so all it does is just stop adding more speed, doesnt directly slow you down though
Thanks a lot but i don't feel really ready yet to switch to c++
hi folks, I have a blueprint that sends out some raycasts, is there a way to preview the rays in edit mode? debugdrawline seems to only trigger in play mode, and raycasts already have a debug option there...
@sweet silo it's not really about switching so much as learning more about how blueprints work under the hood and how it translates
If you wanna stick with 100% BP at the moment tho, then I'd suggest trying to make a small project yourself and Google stuff as you hit walls
No
I think im gonna cry
@gilded dragon you can run the trace in the construction script to see them in editor. Depends on your needs if that'll help
ok thanks a lot !
am I going crazy or Event Dispatchers used to have input pins?
WTF? IT has input but for some reason it went all up on top 😐
well, I did do that, and it only shows up for a moment.. I'd like it to stay visible, like, say, the springarm component has a red line that shows you its length
Change the debug time to persistent
Anyone know how to put an actor into a subscene from BP (specifically editor util widget)? I can get master tracks, which has the subscene listed in it's array, but stuck on where to go from there.
it won't let me. I can set a duration in seconds, but if I set it to anything above 0 it just leaves garbage lines in the scene when I change values
You must call it on tick with duration of 0
He wants it to show in editor too
Ah hmm
Not sure how one would achieve that
But
Cant you like just expose a string variable for it showing its current value ?
I want to preview where the raycast (and also a spherecast, later) is going to be, in the world
the springarm component is the perfect example - it shows you a red line previewing the "arm"
Hey, any way to get crisper navmesh data around my cube walls? Is there a reason the navmesh curves like this around editor cube collisions?
You can open the source file of the spring arm component and see how they're drawing the line..
huh. did not think about that. let's see..
Expecting that to be a persistent debug draw,
Think you can do those in bp aswell
Seem to recall doing it on my dialog manager
in C++ it looks like you need to write a custom FComponentVisualizer class, override the DrawVisualization virtual method, and then register your custom component visualizer externally
Thats way more than i did thats for sure 😂
in blueprints.. I found a "flush persistent debug lines" action but no way to draw them D:
Me neither, was testing now to no avail
Do you need them persistent or could they just last a while 😅
you draw them as part of a line trace
Draw debug works in editor, so just having a fixed duration should get you far
I want to visualize in edit mode, not in play mode. that's the problem
there really doesn't seem to be any way at all to do this from blueprints
you can draw debug lines with editor
but not line trace lines
I've done this before and it works
in editor
yes, while the scene is running
I'm talking about edit mode, so I can edit values and see where my raycast and spherecast will go without having to simulate the scene
yeah you can do that with draw debug lines
that's what I am telling you
not while simulating
how? it doesn't look like there's a way to make them persist
yes, and it only lets me pick a duration
if I pick 0, then the lines only show up for 1 frame when I change the value. if I pick greater than 0 duration, then when I change values I'm left with a lot of "garbage" lines on screen and it's hard to tell which one is the real one
(and then the lines vanish once I finish changing values which isn't great)
how would persistent lines help you in this case? you'll just have the same problem with "garbage" lines
I want one persistent line showing me where the raycast is going to be. I keep saying - like the springarm component. it draws a red line to show you it's there
right you have to remember most of those components are written in cpp
where this is indeed possible
but if you want a BP only setup, you can only use draw debug
that's what it looks like sadly
I wish there was some "On Debug Draw" BP event
seems like a really weird limitation
you have the construction script
if you can flush debug lines (not sure that's possible) I don't see what the problem is
Write your own debug lines but use splines and a sphere mesh
I used splines to visualise certain lines for my level building
I can, in the construction script, flush persistent lines and then draw a debug line for like.. 9999 seconds. but that means if I open the scene the next day those lines aren't there until I make a change
yep. they wouldn't be there until you make a change either for anything else
I did consider juggling a spline component from the construction script but I thought - nah, there HAD to be something better
And can change when you edit a value
even the springarm requires you to select it to show the debug line
It's not too much effort tbh
They can be a bit glitchy though in my experience
in editor, no play, no sim
nice! what'd you do?
oh.
alsi with trace result
yeah.
https://gyazo.com/78b01ddcf7bca5f52b6347091d851ac0
im trying to use eye bone coordinates to map a eye texture, problem is there is like some sort of EXTREME delay.
i assumed it might be bcs the bp ticks befor the anim bp, worked around it with a interface but the same delay stays.
using a custom even it get better but still clearly has a delay.
anyone got a idea wth is going on?
yeah like I said, flush, then draw with a duration of 9999 or something. but it's gone the next time you come back to the scene
in that gif i use time dilation to slow things down, if i do so you can see how its more accurat as its far slower
this is coming close to what I want to do but still not the actual thing and it's somehow worse than if it wasn't even close
if you leave your values in you can have them reappear on selection
really you don't have to reinvent the wheel here
I am using a BPI to Affect Health. I want to make a healing pad, but I am not sure how to call the BPI function on a timer. I have an input for the amount the health is effected. If I cast to the subject and find they implement the BPI I am able to call the function and it has the input for amount of health adjusted. When I try set "timer by function" I do not get the input for the health amount.
timers can't take functions with parameters
(at least not in BP)
what you can do is call a helper function to set those values as refs then call the BPI with the reffed parameters
if anyone has ideas on my question that would be appreciated. I think I got lost in the shuffle. Sorry for the repost. Anyone know how to put an actor into a subscene from BP (specifically editor util widget)? I can get master tracks, which has the subscene listed in it's array, but stuck on where to go from there.
Do you want it to smoothly heal over time or heal in pulses?
Hi, how to do disable jump when the player is attacking? I tried disable input and enable input but that also removes the camera, any ideas how to only disable jump?
Have a branch before the jump executes
Check if player is attacking. If not - let jump code execute, if yes - block this code. You can do it by using branch.
Just make a bool is_attacking then check for the bool before jump.
How do i block it?
Easiest way is as GreyGhoztt said. Use branch with bool is_jumping.
What do I do if i need multiple Event BeginPlay nodes
I cant branch multiple flow things off of one
You can use sequencer as workaround if you need multiple branches from one.
i need multiple loops to run at the same time though
Sequence will do that. It doesn't wait for the script coming off its output pins to complete before it fires the next output
ah ok thx
also for some reason my custom variables I added to the FirstPersonCharacter BP arent showing when I try to bind a HUD progress bar to them
but they are there
What is the class for that MyCharacter type?
@faint pasture@odd ember thanks! Yes I created a custom event that gets called by the timer and does the rest as the pickup did
@warm summit that's a little fragile. One guys leaves and it stops healing for everybody
Just have the timer get overlapping actors and heal them.
@neat sphinx No, the variable in the widget. What type is it?
@faint pasture well its a very basic tutorial, there is only one player. I do need to cap it so I can't "over heal"
ah yeah this worked thanks, and thanks GreyGhoztt and Dean
what do you mean tutorial
Personally. I hate direct logic on overlap functions. I tend to code them so that end and begin both call the same function and that function determines if the necessary actor like the player character is standing in the overlap field. If no, run stop logic, if yes, do start logic. Cleans up a ton of requirements for keeping state correct.
hm i tried re-reading the tutorial two more times to make sure i did it right and I still dont see anything that would cause my variables to not show up
like in the tutorial they just added the variables and they showed up there
but for me they dont
You'd handle that in the heal application (if it's a gamewide rule)
The healer should just go "Heal this thing by 100 hp"
on the recieving side it'd be capped and clamped etc.
its a very simple top down shooter tutorial made by Epic, enemy swarm wave type thing, I am just adding simple BP stuff to customize
i needed to convert it from an integer to a float
its fixed now
someone that I don't remember who it was got me started on a object related inventory system and screwed me on the last part of it. On Drop. The old BP i'm using doesn't seem to work. Has anyone here ever done a object related inventory system that can help me with the On Drop.
Hey folks. I'm having a hard time forming this question well enough to google, but I basically want to create data to be accessed later. For instance, the "car" actor and I want to save a whole bunch of configurations where name = civic for one, name = camry for another, etc etc.
I could save them in an array but I don't know where to store that, and I have too many to just create a million copies of the blueprint. I'll need to randomly pull from a list of them, and to instantiate multiple copies of them at a time.
Serializing them is essentially what I'm talking about (I believe).
I read some stuff about structs and data_tables, and am investigating that avenue but I wanted to know if people have tried that and/or if they have other recommendations
Struct, data asset, or datatable are your best options @verbal girder
@fathom gull its probably an inplace animation and you're turning the player capsule while it's playing or it's something wrong with the animation itself
Ah yeah its inplace thanks, a delay node fixed it
My enemy is on a patrol path but seems to get stuck at target points for some reason. Not sure why though, usually it works.
Would the map size be the problem perhaps?
He seems to turn around to go to the next point but stops as he's turning, as though he's stuck, though there's plenty of room for him.
Okay yeah I fixed him, just moved the Target Points EVER so slightly to be more centred. XD Like an inch.
Hi, I've got this NavMeshBoundsVolume and would like to resize it in my construction script. Specifically, the X, Y, Z values for the volume brush. I can't find any relevant nodes in any of the components.
I could just set the scale, but that requires an assumption that every NavMeshBoundsVolume has the same default values for that brush.
This is probably a stupid question, but does anyone know why the "BuildingTrace" option could be gone (and how to get it back)?
It was a custom trace channel. You have to make it in project settings
I still haven't found a way to access/change the volume's brush settings, so I grabbed the volume's Box Bounding Extent and applied some math to set the scale appropriately for anyone who's curious.
Hi, everyone, very fresh-spawn here. I have a question about an AnimationBP. While trying to connect "Try Get Pawn Owner" return value to "Calculate Direction" target, I get an error "pawn object reference is not compatible with anim instance" What could be the issue? Thanks ahead.
how would I get a child actor of a spawned actor from a random array?
nvm i got it
hey guys question for a newbie, what dose the "launch" option do ?
Anyone know why in Viewport Instances I can adjust the relative location, but in Blueprint I only have Scale? The issue this is causing is that I can't fix the relative location so now my asset is offsetted by random amounts.
If i try to move the asset i can change what this offset will be, but overall that would require so much effort to line it up to 0,0,0
The weirdness is that it doesn't move in viewport of blueprint it just stays in the center of screen as i move it.
Anyone else has buggy datetime + timespan add node?
Whenever I connect timespan, it changes both the connections to timespan structure breaking date time
Regarding structs, should I break structs and put them into my actor as direct variables, or is it okay to make my own copy of the struct and modify values there?
For instance, a character that has HP that I'll need to update frequently contained inside a struct.
structs in BP are generally meant to be read only
Setting struct members is fine if you use the node for it.
you can use the SetStructMember node to somewhat bypass this
although whether it always takes is anyone's guess
Gotcha so best practices is on construction pulling everything out of that struct and assigning to variables on my actor if it needs to be modified?
yeah or use data assets if you really need stuff to be mutable
Using DataAssets to store health? O.o
I mean if they're using a struct already for it
hey everyone I followed this tutorial:https://www.youtube.com/watch?v=94HpeqlgKAs&list=PL4G2bSPE_8um-3MIHOTwFwjWZdWO24S9O&index=12
It shows how to switch guns but it uses only 2 guns
We continue on in our FPS tutorial series. In this episode we cover one way of how to switch weapons; from a main primary weapon, to a sidearm.
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my projects and much more over at https://www.patreon.com/ryanlal...
how do i make it so when i press 1 it switches to the first gun etc
then just map inputactions to pick guns from the array
but it doesn't work
in fact, you could probably do a map instead and make use of "categories" that way, if that's what you're after
whenever i do it, it doesn't save the amount of ammo i had in the gun
while in the tutorial it saved the ammo count
okay well that sounds like an issue with the weapon, not with the weapon switching
it's an issue with the weapon switching
how can you tell?
maybe i can show you the orignal code
because it's in the original code
what's the original code?
idk how to take a good screenshot of blueprints
after the cast to fpscontroller it's not important
child actor components and setting struct variables, spicy
sorry didnt mean to hit send, ill wait for your guys discussion to be done 😛
no please go on
Most likely reason is because you're consuming the input somewhere else.
can anyone think of why "enabled" would print by "pressed" would not? I have this exact same setup in another BP which still works based off my interact key (doors still open) but for some reason this one wont work
would it be consumed in my other BP?
there is an input stack
Click on InputAction Interact and look at the details panel.
I got the array of guns
if any of the inputs along the way consume the input
Uncheck Consume Input
it's removed
so if I have branchs in each of my handling (theres 4 others, 1 for each door) I should make sure they all have "consume input" de-selected right?
that way it doesnt go into one of those, consume it and do nothing?
I mean this explains nothing really. just from looking at your code though, you're setting variables through structs, which is probably why it's having issues remembering values
I just followed the tutorial
whatever you're doing, having to copy code 4 times doesn't sound right
I don't know the tutorial
but I can tell you it's not smart to just follow a tutorial blindly
in the comment some guy said that he got it working with multiple weapon
so it has to be possible
it is possible, but I don't know the tutorial
I have 4 separate doors that open based on different booleans, Im 100% aware the coding practice is horrible lmao. but first project and all
This is literally the one place I would actually advise someone to use interfaces, is interaction. Interaction should usually be something like a line trace from camera to call an interact function on something. The door can use that function to open or close, a light switch can use that to turn it's corresponding light on. Container can use that to open or show UI, etc. All from a single input in the Pawn class.
Ive tried getting interfaces to work a couple times already, have not been able to do that lol
thanks for the tip though. ill try to figure something out
so would there be a better way to make a weapon switching system?
bc i can't find out how
de-selecting the consume option in all the others worked (for now, I should probably rewrite the whole thing)
Can you create a macro library for animation blueprints?
Does anyone know if there is a way to toggle visibility on Blueprints in Editor ? For example I want to add a dummy to decals so they can be easily located but I want to be able to hide it by pressing the g key.
hey guys, any idea how to fix this issue in UE5?
Timespan + date time add node turns into timespan + timespan when timespan node is added. It breaks the date time connection and converts it to timespan
That's for in game though no ? I'd like to toggle them in editor.
Thank you!
Doubt you can. Pretty sure it's just bugged. Advise just doing whatever you're doing in C++ with a library function for now.
Oh awesome I didnt know that. Thanks!
Really not so much of a fan of the new math nodes. Happy I started using the math expression and doing most of that in C++.
One of my levels is making me regen the navmesh every time I open it.
I generate navmesh -> Save -> open another level -> open previous level -> get "navmesh needs regen" message
It doesn't happen with any of my other levels (which are all pretty similar)
anyone know why
happens in editor, not while playing
thanks will try!
Does anyone know how to rotate the capsule component towards an object? I have this sphere actor that acts as a reference for the capsule component to point to when the character turns and is standing still. Unfortunately, the capsule component does not turn in the direction of the sphere.
Here is the blueprint I attempted to make to rotate the capsule component towards the sphere
The animation for the character works but the capsule component does not turn with the character.
Here's the character turning
as you can see the capsule component does nothing
I mean you'd have to specify what you want exactly. weapon switching can be done in many ways that are all "correct". it just depends on how exactly you want it to be
how would I change the terrain paint using a blueprint? so say you had this thing that moved across the map how would you paint the terrain so that it looked like there was a tail it left behind.
or just under it not a trail
it would kind of be obnoxious to do, but: dynamic material instance of your landscape material, then change those parameters on certain events
the reason it would be obnoxious is because you'd have to call all the functions by name, and you'd likely have a bunch of edge cases that could not be solved elegantly
Hello, I want to be able to have a character attach itself to a physics constraint on another character when entering a collision and pressing a button, how would I go about doing this? (I'm still kind of new)
yes, but how would I change the paint layer?
I mean that's really depending on how the landscape material is setup
what if I did a Blueprint brush type thing?
I don't know what that is
if you want to change the "terrain paint", that's the material
Hey folks, is there a node used with player controller to check which key was last pressed? I know there is one, but it needs a key input, I was hoping to find a node that was already listening and would relay what was pressed
Purpose is to switch a widget switcher based on if the player was using a mouse, controller, vr inputs, nintendo switch, playstation or xbox
Characters aren't moved by physics. If memory serves, you cannot constrain two kinematic actors with a physics constraint. To do what you're after would likely require some form of custom implementation unless you just want to ragdoll a skeletal Mesh.
Not as far as memory serves. You'd be looking at something like implementing an AnyKey event, and saving the last pressed key yourself.
Well, I kind of want two actors to be able to connect at a point, when they get close and if a button is pressed
Good call
Is doesn't have to be physics technically
Just create a boolean in your game instance called "Was(key)pressed? when you press the key and then everytime you press it set it to true or false.
There is a way to detect if a user is using a gamepad or mouse keyboard with C++ scripting
Aye, I think @maiden wadi 's solution works. Thanks folks!
If this is a question, then partially, though it's a little hacky and depends on requirements. Older games literally had a timer on PCs for gamepads where if any gamepad button was pressed or axis moved to non zero, they would assume gamepad in use and set the timer. If timer ever finished, it assumed gamepad was no longer in use. That is about as far as you'd get in BP alone without a plugin.
not a question
I already implmented it
help me with this instead 😂
If capsule doesn't rotate, it's likely being affected by the CMC. Chances are you have Controller Yaw in use.
If you don't want to disable it, change the controller's Yaw value instead.
Controller's ControlRotation Yaw Value ^
I tried that, but it disable the player from turning during walking
unless I did something wrong
Hey does anyone know what might be causing an issue with an infinite loop with a data table in a blueprint?
On loading a level, there's a blueprint that reads a table of star coordinates to plot them and that's apparently having an infinite loop issue
Not without seeing what logic you have set up.
Hai hai all ^_^ . Anyone know much about blueprint or python and importing FBX cameras in ?
Nope its started erroring again, heres the logic
You have a data table with 119000 entries!?!?!?
Yeah, its stars, their coordinates, brightness, size etc
The project is a virtual reality planetarium
What a test level with the stars looks like
(ignore the sun on a pedestal)
Fair, the levels load, its just trying to move between them with the menu that causes issues
What goes wrong
Infinite loop detected
And then it crashes
Could the size of the data table be doing that?
Yes definitely
Is there a way I can just attach and deattach to actors at a point?
Put a delay in, so you only process the loop in chunks of let’s say 5000
Side note* you really should have this in c++
BP loop performance is not great
Process 5000, wait point1 seconds, process 5000, wait point1 seconds
Awesome thank you guys so much
It’s just too much work to do all at once, the infinite loop checker just Detects that the same process has been running for too long
Ohhh that makes a lot of sense
(im a modeler/visuals person, the coding aspect of Unreal is a bit over my head so thank you for the explanation)
Sure. You should be able to call AttachToActor or something similar. Set SnapToTarget.
I'll try that! Thanks! I'll let you know how it goes
Im trying to add a custom shape collision to a form at run time. My form will change shapes. So i need to adapt the shape to it. And since the shape is a bit unpredictable, i need to draw it by points.
But it seems there are only these three options and they are very uniform?
Isnt there an option like, make collision from static mesh?
hello. does anyone know how this would look like in code
im wanting to break out all these components, pass them into a material, then reconstruct the matrix
though im not sure the how i would reconstruct it
i know matrices in hlsl would go something like this float4x4 matrix = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
how would those values from bp fit into that code i just sent?
Woohoo more questions.
I have a blueporint where an enemy gets hit by a spell. Currently everything is working and the actor gets destroyed.
WHY is it that when I put a 2 second delay before "Destroy Actor" The actor wont die at all
Is this is something basic I am missing or a problem with my blueprint
your loop count is bigger than the max allowed. you can set that in the project settings. but really you shouldn't loop over something that big, especially not on construction script
bruh
@dense nexusHow are you drawing all the stuff? Do you have some sort of material that can use your star data or is it a texture?
Its a material
Literally just a white base color and emmission
And we inherited this project and its uh interesting coding from the previous seniors who were working on it. We know the structure is Not Great
How is it drawing the stars? Like how does the huge amount of data get into that material?
What do I need to enable when paused in order to get SetCameraFade to work when the game is paused?
Enabling SetTickablewhenPaused on the PlayerCameraManager does not seen to get StartCameraFade working.
seniors
this code
??????
Bruh I can show you their version of the final product
who is this company
We're students
This was their thesis
I thought you meant seniors as in seniors in the industry
anyway, my suggestion is to not use a data table for this unless you really need to know precise star movement
and even so, break it up into smaller datatables
Ah so it's making an ISM per star or something. I thought you had a material to render pointlike stars on a sphere. I've been trying to figure out how to do that for a while.
have you considered niagara exists?
For use as the stars?
Using “spawn actor from class” to spawn enemy projectiles. It works fine if the enemy is on screen.
But if the enemy is off screen, the projectile is invisible (but still collides normally)
Wat
well yeah.... what else?
I know you people liked my blueprint a lot. So I decided to use it for each of my AI in my level, very efficient.
hi again
can someone please look into this
why don't you ask in #cpp ?
im not using cpp
well if thats the case i shouldve posted in graphics since its half material related
ill ask there
Hi, how would i disable sprint in a triggerbox? ( For example a swamp )
couldn't you add a branch and a line trace or something like that. So like, before you start to sprint you see if your character is in or over something that would inhibit sprinting?
sorry i'm new to this too but I think that would work, right?
Do you understand what i'm getting at?
Yeah i tried that but i cant get it to work
Same though but I figured it was because I was missing something obvious. Mine always comes back as default
Default?
yeah when it traces to the floor if it doesn't detect whatever physmat I have under it, it just shows up as default
even though it intersects with the floor properly in the debug
I gave up on trying to make it work properly for now and just used the default for my event but that wouldn't work for you because then everything would disable sprint
sorry I couldn't be more help 
Thanks for trying tho
If you're allowed to use plugins made by someone else, then this might worth checking out.
https://github.com/jonimake/CelestialSphere
If not, you can still peek through the code and see how it works
is it possible to have a custom compile error? for example if i have a blueprint with an class variable that i dont want to be null can i make it error when i compile?
Not in BP I don't think. C++ 100%
do you know how to do this in C++?
I can't get any linetracebychannel to work for physmats at all
I've tried implementing it different ways and it always returns default
You should be able to get it off the actor
Hey, there doesn't seem to be a built-in way to get how long a timer handle has been unpaused. We have the get elapsed time node, but if I want to get how long it's been looping it seems that I will have to use another timer to track this.
@tawdry surge This is what I got so far what would you recommend I change
You sure you set the materials/surfaces up correctly?
That trace should work if you did
I swear I did. Everything returns default
Try restarting the engine. Maybe it's a bug

