#blueprint
1 messages · Page 258 of 1
It does/will have a physical mesh.
And I'd probably go with John's suggestion using a certain Z-Depth to destroy it.
Unless it's stopped of course XD
but look at this: exploring those hit result nodes
Yeah that's the flaw with that. Because the map may have land.
The projectile will destroy itself after using up all it's penetration ability.
So when hitting another ship, it will either Pen, or will be stopped given the other ships amount of armor.
That's the long term plan.
OnOverlap(...)
{
RemainingPen -= HullPenCost;
if (RemainingPen <= 0.f)
{
SpawnNiagaraSystem()
DestroyActor()
}
}```
Understood, but that still doesn't help me with my original issue. 😅
I am sorry if I am not keeping up with you all, but getting multiple different answers is sorta confusing me.
as collision volumes, even with CCD, doesn't always catch it
These are fast projectiles, so traces seemed like the correct way to go about it.
There you go
Plus I can see if the shells hit something inside the ship.
That's not my original issue tho.
😄 sorry i didnt read up
One sec. Typing it out
I am trying to have the shell be destroyed a few seconds or miliseconds after hitting the waters surface.
Which allows for underwater damage to other ship actors.
But if the shell doesn't hit anything then it'll prevent it going on underwater for infinity.
there's a big gap between few ms and few thousand ms
to test your hypothesis about the actor result, just print the display name of the Hit Actor directly on the ForEachLoop
that will confirm wether or not that is true
For some reason even though the water is derived from the OceanologyInfinityOcean class the cast is never triggered.
If you ignore the water, then trace won't know about it in order for "hit actor" to return an ocean object.
Hmm? Not sure I follow. Ignore what water?
the ignore part seem strange yes
before the trace you seem to add some oceaology thing to ignore
Your trace results will not return a hit actor of an ocean if it is ignored.
No. It ignores the water volume. Not the InfinityOcean actor.
and inifnity ocean got collision aswell i assume
Ohhh
just making sure we get it right 😄
WaterVolume and InfiniteOcean are separate objects/actors in the level.
wanna screenshare that?
can you get a reference to infinity ocean actors surface material?
oor atleast do the print string of the hit actors display name
#blueprint message
Unknown at this time.
you checked all the blueprints in Engine Content?
Welp. That might be way. It has none based on what I can see.
You can seee the ships here have collision but the water has none.
yupp
and the underwater post process actor?
what you can do
is use the bullets Z location
to determine wether we're above or below
can refine that further to weigh up the z height of the player pawn/ship and the projectile and when this or that is greater/less/equal, this and this happens
could use an invisible marker buoy in your ship blueprint as the constant, agreeable distance below the water surface
you can also prediict location, using traces and velocity etc
and actually know a frame or two ahead of time, to start deaccelerating etc
The Oceanology plugin uses buoyancy and buoy's to tell ships how to behave in the water.
sounds liek delta seconds might be involved
heh, ignore the wordage. bouy/marker/socket
Oceanology Legacy- Realistic Ocean Simulation for Open WorldsMathematical Wave | Network Replicated | Open World CompatibleExperience a cutting-edge ocean simulation with realistic visuals, real-time waves, and seamless support for open-world, massive multiplayer environments. Enjoy smooth performance, with estimated frame rates around 60 FPS on...
"between this and next frame we entered water. We need to predict our new velocity based on the delta from impact with water"
That's the plugin
okay so youre busy with the projectile blueprint.
say, here is the series of blueprints:
Ship_BP calls event spawn projectile bp > https://blueprintue.com/blueprint/f4gknlrc/
https://blueprintue.com/blueprint/-n2yurue/
then the grenade spawns its static mesh and saves it as a variable
then here is their destroy part: https://blueprintue.com/blueprint/b0ieeydl/
so now, have you used timelines before?
here is the whoel sequence for more context
do you have any effects/sequences set up for the exploding part of the shell when it ideally hits the water? or does it just sink? you mentioned some udnerwater 'splash damage'?
what's the best way to get an int64 with a value of negative zero? If I type -0 into the literal field it just resolves to positive 0 :/
Doing some bitwise math and I need that 64th bit
oh actually i just realized negative int64 counts from the lower bound upward. so i can just use the lower bound to represent the last bit 🙂
Negative zero? O.o
What does -0 + +0 equal?
-0++0 looks like shishkebab.
generally resolves to positive zero. but im not doing integer math with these numbers. just using them to store bits for bitwise ops
-0 is a different bit than +0? O.o
for a signed number you have a sign bit
and that bit can indicate negative even if the numeric bits indicate zero
which is negative zero
If you're doing bit math, then -0 + +0 should equal either -0 or +0, depending on whehter that sign bit indicates its negative or positive
XD
Bits are fun
This is a "bit" too much for me right now. 👀
I have the problem that my pause menu opens twice. When I press "R" in the settings (the key to open the menu), the player returns to the game, but the menu doesn't close. When I press "R" again, it looks like in the screenshot. Does anyone know how to fix this?
Learn CommonUI, and don't use player controller inputs to show and hide widgets.
To learn that right know its a bit late because I need to deliver the game on saturday. Its a university project.
there's a whole 48 hour gap 😄
only takes ~4 to learn CommonUI
well, to get around with it *
I have this little BP for placing Hierarchical instanced static meshes, but in this case, it's only placing some of them, and skipping most.
Realistically, the general concept is simply that the player controller's R shouldn't be running when the pause menu is up. You can kind of hack it by making the widget handle R itself, but that'll require some focus hacks to make sure you don't lose focus for the key down to work correctly.
The other alternative is to run checks on the R key, and make it track if the settings menu is open and not do anything if it is. Which requires some dirty ref chaining.
Alternative is probably safer. But after this is over I strongly encourage you to learn CommonUI if you're at all serious about keeping UI handling easier.
The imported CSV looks fine. I did this from a tutorial, I don't know how to troubleshoot this.
Why are your datatables different?
oh, you mean there?
that's because I forgot it was a thing...
Ah, i do believe that can cost a lot of performance, i recall reading today...
As opposed to converting an integer to a string, and then to a name and then getting it? O.o Who wrote that?
There's only two semi costly things here and neither of which change between yours or mine. The populating of the FName array, memory allocation costs basically. And the copying of the data from the original row data into a copy for the return on OutRow, also memory allocation. Neither of which are going to matter until we're talking about many thousands of iterations.
Also a moot point since this is probably an editor only issue. And if it's not editor only, you shouldn't be saving stuff like this in datatables, but make a packed level actor or something.
I was thinking about converting to packed level actors, but thought that since these are placed across an area half a kilometer across, it would be better to do it this way.
I wouldn't know how to rewrite this correctly, so if it isn't an issue, I'd rather leave it.
It's more that this has runtime costs of setup. The user has to extract the values from the table, and apply them. In a level, it's already done and saved. They just have to load the data and not also set it all up.
But if it's a packed level actor, then it all loads as soon as any part of it loads, doesn't it? Even if the player can only see 2 of the 140 instances in the packed level actor?
That doesn't really matter. And if that is the reasoning it can just go in the main level. If performance is an issue you can use HISMs. Which I think you were already doing above.
Doesnt packed actors auto instance anyways
Unsure it may. But I definitely would just place these on the main level unless you need copies moved elsewhere. There's no way that these specific things are causing any performance issues. Consider a forest of trees, you can see them for a vast distance because they fake a lot of it with LODs, and segmented HISM components.
It's an open world setup right now. Yeah, that BP is using an HISM - but you said it has a runtime cost of setup I should maybe consider. I guess I don't understand what you mean by 'it can just go in the main level'.
Like, there's one of those packed level actors, with a mannequin for scale. That is the same mesh that's being set up in the BP above as an HISM.
HISM, because most pillars are really far away - packed actor, because less runtime setup - or not a big deal either way?
Hey guys, could really use a hand. I am trying to set the actor location with the location of the Instancedstaticmesh component of my BP_Grid. I just need a way to get the location of the particular instance mesh that the line trace hits. please help i would really appreciate it 🙂
I think because i am dealing with an instance static mesh i have to use a forloop to find the Index of the Instance. I'm not sure exactly how to do this.
Hey guys. Found a way to do interactive shallow water with niagara so I don't want to use a water plane but I want buoancy. Is there a method for creating custom buoancy that any of you know of?
You only need the packed level actor if you plan on copying this somewhere else. The HISM is for performance.
HitItem I believe is the Index you can use in the static mesh component to access the data you need.
does any one know why static mesh actors work with physics... but when i try with a regular actor with a mesh + collision object .. it fails to work ?
Fails to work, how?
Oh - I read / looked at that again and realized the difference this time. Now fixed the BP.
😄 Just a bit simpler than the conversion.
it doesnt react to collisions and is imbobile ...and also dosnt fall (gravity overriden to 980)
Which part of the actor did you set to simulate physics?
The Collision capsule
And the mesh is a child in the attachment hierarchy to it?
Cause that should work if it is. 🤔 The only thing that stops physics without actually calling it to stop would be an attachment call to something else.
It's all good i figured it out, i just had to use Hit Item.
thanks for the assistance.
pow that was it the hierarchy was wrong 😅 had the capsule off the mesh ... thanks your a life saver.. i was starting to loose my mind for a second there
Where is that function that is printing even called? Is the widget creation and add ever called? If not, why not?
theres a guide to make a simple inventory on the forum
In the event graph
What about the update call?
Hey Everyone, first post and I hope I'm in the right place for someone to help me out. I created a day/night cycle using a blueprint and it works quite nicely:
However I'm trying to setup a trigger to set a specific time of day but not having success, any advice?
what update call? there's none
If that Update call is not called, then no widgets get created. If it is, you need to see where it stops and why.
oh I see it's not even getting called anywhere
I'm assuming that these values in the Details panel are updated from the Construction Script? If so, setting the value at runtime won't trigger that. The usual fix is to put your Construction script in a function, and then call that function both in the construction script, and then after you affect a value like in your overlap.
That'll be a quick and dirty way, but you can also pick and choose things to update if it's a complicated system, so that you don't have to run a lot of stuff if all you're trying to do is update a sun direction for example.
ah I see, thanks that helps alot. I'll put it in a function and try again.
@maiden wadi I created a new input on this thing which so now I have this Filter which contains both axe and hammer, should I connect a filter variable into that?
and now it works but I have a weird little blue icon like this instead of displaying the name of the tools
and every time I press the crafting button it creates more and more of these items, so it will add 2 every time I press, axe & hammer, axe & hammer, axe & hammer, till it will be filled completely
Cause you need to remove all of them before adding more.
For the filter, I'm unsure what you're using it for. I see armor, food, log things and weapons on your buttons above, so I'm unsure how Axe and Hammer fit into that unless they're sub filters of weapons that you don't have showing atm.
On a side note to the removal/addition. If you're feeling adventurous, I'd recommend replacing your container with a dynamic entry box. Cause it'll cache the widgets and reuse them when you add them back. So that you have a bit less widget creation cost. But you have to make sure your sub widgets update completely on their construct.
that will get fixed later
dynamic entry box? how would i do that?
What is your current container? A Wrapbox?
From memory... It's basically:
Replace that with a DynamicEntryBox, set your item widget as the default widget class in the DynamicEntryBox's settings.
Where you're removing all widgets, call Reset on the dynamic entry box.
Where you're manually creating and adding widgets you instead call CreateEntry.
The other thing is that you don't rely on Construct anymore. You'd make an init function on your item widget that takes in the struct you're passing as an expose on spawn. That init function sets the struct property, and then does the visual update calls of setting stuff.
That would make things really complicated going on though because im following a tutorial series and im on part 4 of this one, and there's 11 videos in total
https://www.youtube.com/playlist?list=PLrudBLqLfaTQHKmoVmSDqq0__GMYlJpxP
I can implement this technique you're talking about once im on part 11 and im pretty much done with the tutorial though since im early on, making really big changes might make it hard to follow onwards and I already have some things different from his
Yeah, probably not worth it if you're following a tutorial. 😄 But might be something to come back to. I strongly recommend DynamicEntryBox and Listview/Tileview widgets as well over any sort of manual subwidget creation stuff. both do caching, and Tileview/Listview also does virtualization so that it only creates as many as you actually see on screen
what's caching?
Creating a widget only once and reusing it.
EG if you have to show five items. You create five and show them. If you change filters and have to show seven items now, it'd only create two new widgets since it would reuse the first five.
It's not a massive issue on small projects. But it does help with garbage collection costs a bit, and in bigger projects or games where you can end up displaying a lot of items, it can help widget performance when updating too due to only needing to set new state instead of fully creating whole new widgets.
Is there a way I can set a phys constraint to move mesh to a specified Value? I have a door system and I want it to be locked I have the lock and unlock code working I just need to know how to move the door mesh via phys constraint in blueprint
My guess is that for now I can just stick adding and removing them, but he does not show that part in the tutorial and im really afraid of changing something up so much that will cause problems with this course
Don't stress it right now. Keep up with the tutorial. Mess with it after if you're feeling like tackling something new.
hi, tricky staff. I was doing some prototyping and I made very simple spawner that worked perfectly - it spawned mushrooms on over the map but now it place it only in small radius of the placed actor.
Well yeah, you're selecting a spawn point in a 1m radius around the object
how so?
there is 100 value, and before there was 10000 and i was trying different values to look if it makes a different
100 units is 100cm = 1m
ill just try
same for value of 1000 and 10000 (on type of mushroom is on 1000 and oneon 10000)
and it getting me same result
then it's not a reachable point. Time to step through with some debugging and find out why
okey, is there any "measure" way to debug it? i did nothing with the actor it self so there should be a reachable point but if now the log window is not getting me any errors
why can I not compare this enum to the other enum with that enum "==" node?
@maiden wadi do you know anything about this?
What do you mean? Print values, make sure points are reachable. Step over the code with breakpoints
so @thin panther i placed the BP on different level (strict on the ground) and it got placed few meters away but once and then back to the circuls
its printing same location over and over
Maybe check collision setting and see if it does anything. What happens if u change from default to adjust and always spawn?
colisian on an actor to spawn or "spawner"??
nothing changes and i dont get one thing the most - its spawning mushroom in same exact spot every time
I honestly dont like the sequence going to the spawn actor twice it may not have anything to do with the problem but if you want to spawn multiple I would use a for loop and just go to 1 spawn actor node. Just spawn 1 and see if it goes to the same place every time.
Oh I see they are different
@errant storm yep, i tried already to spawn only one object but i do same one more time
yep, just confirmed
Is it always spawning on the same spot in the world? Or is it a new spot ever time but always together
same spot
same xyz when i print them
it's bit like random location not so random
for some reason
Its like they spawning perfectly around a circle tho.
around the spawner i guess
But u had it at 1,000 try 10,000 and see
okey, i'kll check
well i did, i changed 10,000 to 1,000 - SAME SPOT
and i even tryed to sign location to player and it worked (kinda) it spawned exactly on the player so it is usless because its consumable
1,000 is still small but 10,000 should be big enough. Disconnect the spawn actor and replace it with a draw debug sphere. See where it puts them. Make sure to adjust the duration and thickness of the sphere
Is this a spawner BP you made and placed in the level to spawn the mushrooms?
yes
well... i did that now, same result
it spawningit at the same location
And your at 10,000? And all the spheres are still right next to the BP? Damn did u try moving the BP and make sure it's not under the ground or something?
I put it on the ground by clicking END to make sure - And when i moved to the different level to make sure is not "point in reach" problem it started to spawn not on BP location but but few meters from it.
Whenever i change the radius on "getrandomreachablepointinradius" node it not affect the sphere
How far from the BP do u want them to spawn also how many do you want to spawn just curious
full BP is to spawn it infinitly to get player possibility to full progress bar. And of the BP is to destroy actor after 10sec
I gave up on using the random reachable point in radius it kept giving me close locations. I made a function to spawn in a radius with a min max
You don't have any variables exposed that you set in your instance stopping the distance from changing right?
could you send me the part of bp to check if it will work?
@errant storm i dont have anything like that in my instance AND i think i will call it a day, i'm should get up in 2,5h to get for work :D. I reeeeeally apriciate your help. if you ever will willing to help i will text you.
Sorry I could help not sure what's going on. I've had nodes break and have to be deleted and put back. I'll dm u what I made just make a function from it and set the min max
thanks man! i dont know as well, it has been working perfect from time i made it but today i find out it's not working any more
Thanks @errant storm again!
have a good day!
You too I'm sending that over now if you try it let me know
i will definitly try it
Print out the movement result
You print it after success and failed pin
The one on the very top run right after the node, it gives no insight to the actual movement value
what do you mean?
Hrm can fractured cubes actually be damaged by a projectile?... in the vids i've seen on line if i am not mistaken the cube is hitting the wall and then breaking.. and now that i got my impulse values working with my mass /damage thresholds .. i think i am seeing the same thing ...
it printed aborted
I dont have walls in my game but the cube gets smashed up from landing on the ground
You should be able to find out why using the visual logger
I figured it out
hey people, sorry for such a beginner question, but can anyone tell me how to stop the timer from counting down while the game is paused? 😭 sorry im new to blueprints 😭
here are the blueprints i have used
There you go
You can just add a branch before the setters. Check if the game is paused, if not paused continue with decrementing.
i did this (not sure if this is correct sorry) but the timer still counts down while paused
Its not going to work with that logic your not stopping it when paused. Use a get is game paused on the branch, if true do nothing if false run code
This logic is soo flawed... just go node by node and actually see what it does.
You are basically saying if true then set the game to not pause
It will always be true since you didn't pass in condition
If game is paused, do nothing
Else decrement
Why can't I clear children here when Im changing to another category (aka "page")?
I got only 2 items here so far and both of them are of category "Equipment"
THANK YOU SO MUCH!!
sorry i'm very new to UE5 😭
Welcome, don't be sorry
if i was to get it so when the timer hits zero and makes the character die, would i have to create a new variable for that? or is there a bit of blueprint i can implement
Where is this current logic at
Do you already have a death function or something made already?
sorta i just have it resets the level as thats what i need
not the countdown
i got my fractured cube destroying better now .. with these settings.
Mass of projectile 1
Velocity of projectile 5000 - 10000.
Mass of cube 100
Damage threshold 1 - 900
Damage threshold 2 - 33
Damage threshold 2 - 10
Impulse damage 5000
so to rephrase it, when the countdown timer hits 0, how could i make it reset the level
Well them I'm assuming the player has to do something or be somewhere before the timer. When the player does whatever make a variable and set it true. Then when timer hits 0 check the variable and if true do nothing if false restart level
okay, thank you!
Who made that crafting system? I'm guessing that's a yt tutorial?
My ocd is driving me nuts right now with all the same code repeating.. If it is a yt tutorial if it works for whoever made it why not re watch and see what's wrong
Is your crafting items container the category window?
i'm slow, how do i actually connect this to the code 😭 i started ue5 like 3 days ago pls forgive me
for reference this is the code
and what type of variable should it be? a bool? float?
or do i make a seperate string of code for it
Well a down and dirty way here would be after your set text. Run a branch and check if your player has reach the goal or has done whatever they need to do. When your player had done whatever, you need to update this BP with the value of the variable for if the player reached the goal. Then do a check at 0 for that variable or have the timer stop or reset when that variable is true. There's lots of different ways. I don't know what BP you are in either.
Make a bool on the player for if they do what they need to do. And then check it at timer 0 if they didn't get there, restart level.
I feel you lol. It hurts
Also does the timer need to be ran from tick? Just wondering, cuz that tick is firing that code like 60-90 times a sec.
Lol
Timers should never run on tick
Unless you're ticking your own custom timer
Which is what this seem to do
But for no good reason
Timer just has to run as often as you need it to be accurate like once per second
Or every frame for the best accuracy
As often as you want the value to be updated, and intervalls go up in the total accuracy
For a spell cd that would prob be .1 sec but might need to be even faster
Well just for a countdown timer unless you need 5 decimal places that things firing a lot of code that's all.
Substraction ? Wouldnt think about it 😆
But it is a point
One should always consider the necessity of using tick
Some cases tick is fine but I don't like running them if I don't have to
Yeah i only use tick when i need per frame updates
I feel like this question is something that is extremely basic, but I am having an issue with finding the node to subtract and set the reference integer by a certain amount.
I know there is a decrement node that takes the ref int. But it only takes one away each time, and I am needing to subtract a variable amount
Hit subtract twice for a decrement is that what your thinking of?
No, I know about that one already. I am wanting to say subtract like 5 or something from the ref int
So like a 'decrement by amount' kind of node
If it doesn't exist then I would either have to do a loop and decrement it each time, or just use the Set Array Elem node to replace the existing int with the decreased value
If u want to subtract 5 can you just subtract 5? Lol I'm missing something. Idk I haven't used a decrement by X amount maybe it's in there somewhere?
I don't think there's such node, just decrement by 5.
MyInt = MyInt - 5
No need to use reference
indeed there's no such node
Alright, well at least I am not missing the node
Seems a bit odd that it doesn't exist but I can work around that lol
nothing like
MyInt -= 5 in bp
Well, wouldn't be too hard to make the node myself then, but I don't think it's something I would use that often
you can use SetbyRef if that feels better
but its the same thing really
(this requires custom foreachloop which passes a reference, and not a copy)
Yeah, that isn't too much different from the Set Array Elem
Many thanks
Unsure if you figured this out, but from the warning I would make an assumption that Category in that class is a Byte instead of Enum? If it's not then I dunno.
yes I changed that but now i have this problem
Your Clear Children needs to go at the start of this I think.
but children widget haven't been created yet
Try it and see.
yeah but im really confused as to what content should be
it will just be not valid
Personally
should i make a promote to variable for that return value?
I prefer to just collapse filtered slots
What do you mean content?
ClearChildren call, not add.
I guess target will be WB Crafting Slot Widget
Should be the container. Same thing you're adding to.
You did it once on Construct already. Need that again, just without the cast and set around it.
Now im only getting one item
Oh. My derp. Too early. I thought the loop was in here. 😄 Move it a bit back into..
Here, before the ForEach loop.
Now it's only seen once in the Default home-page category but if you change categories they are permamently deleted. And if you go back to the default page they are still vanished. And I could brign them back by closing the crafting menu and opening it back up again, and that resets the process again where those items are again visible in the home page but changing categories makes them invisible again until you reset the menu again
They should be visible in the first default "Unlocked" category and in the "Equipment" category
Can you show your current logic atm?
Oh and I forgot to show you this
@lost hemlock What calls the Update function when you first open the widget?
Having a hard time following why it would only work there when the values you're passing in the default button should work just fine to show them again.
This
The pressing of the button creates the widget and then doesn the update
everytime you press it
If anyone is familiar with reading JSON data, I could use some tips how to deserialize nested array (example: [[{}, {}, {}], [{}, {}, {}]] )
I narrowed it down to last foreach loop, which may or may not output an array
@lost hemlock In this, can you double check that there are entries in this array of names? I don't see anything setting it. Your original call uses the Unlocked array.
guys, is it possible to iterate through child gameplaytags in gameplaytag containter?
like I have tags:
Socket.Finger
Socket.Neck
Socket.Body
Can I somehow iterate through them in GameplayTagContainer?
you mean this? or show you what it displays when I debug the blueprint?
Yeah that. Cause if that's empty, you won't get any rows from the DT, so no widgets.
remember you need to have For Each Loop by Ref for this to be valid!
ops you just said it, i dint read
yeah but he doesnt change anything and somehow it works on the tutorial
Can you link me the tutorial?
it's early, I forgive easily at this time of day
You skipped a part. https://youtu.be/1a65XJH1v4M?list=PLrudBLqLfaTQHKmoVmSDqq0__GMYlJpxP&t=64
Specifically 1:13
Is there a way to freeze the mouse cursor movement?
I'd like to stop it from being able to move at certain points, but still process click events
also, what do I need to do to specifically set a widget as "hovered" manually?
liquid nitrogen on the hand moving the mouse
disconnecting it might be less harmfull to the player
xD
but in all seriousness. Say you wanted to pause the movement input to show the player something, but they needed to click for a prompt
or if you wanted a keyboard/gamepad only input UI, etc.
how do you stop the mouse axis movement being responded to
change the input mapping context would be my guess
auth might have better suggestions
except in this case, like everything else, it's hardcoded into the engine
movement itself can be set to be ignored
how?
well I kind of need something more flexible. Primarily at a widget level in this case, but still useful to know, I'm going to remember that (I hope)
Hey there!
I silly question, but who knows... I believe that 0 is the lowest priority, isn't it?
Thanks!
Personally, don't mess with people's mouse just to show them something. It's better if you simply make it so that it is the only thing that can be interacted with, and make it flashy. Stopping their mouse to force them to click on something is disconcerting and doesn't teach.
I'm trying to make a keyboard only option for my UI
so I don't want the mouse movement to be possible. Alternatively, it should tie directly it and be like a keyboard input, it shouldn't consider the position of the cursor on the screen
You mean you want to turn the mouse click into an enter key?
Not something I'd do from BP IMO. If you have C++ access, I would strong recommend an input preprocessor that can catch mouse inputs before it hits widgets and make it simply trigger the same code as enter and escape(or whatever key)
I am not confident enough with C++ for that
you sure there is nothing bps can do? There's got to be some way to work around the engine & make this work
The primary issue is that widgets handle stuff like mouse clicks and key input presses. Can you do it in BP? Probably. Is it going to be pretty or wieldy? Absolutely not. You're basically looking at making some form of global widget that could catch and handle mouse clicks before anything else, and would broadcast the click. And whatever is listening could handle it with the right conditions. But that also means you need to tie that in with existing handlers already there for like Enter. Which means you're creating two separate lines of code for Enter, and LeftMouse and you'll have to maintain that through the project for anything this works with.
On the other hand, the input preprocessor would make your left click do the same thing as the enter key.
Having an odd issue with UE5
I had added a variable to a component and changed all references from the old one to use the new one instead (manually)
Everything compiles, the old variable has no references
However, after I delete the old variable and then hit the compile button, UE5 freezes completely. I can't click anything, but it also doesn't show up on task manager as not responding
@surreal bridge assuming you restarted your project, is there still a problem?
Yeah, I restarted it multiple times. Each time I hit the compile button after removing that variable, the editor freezes.
This time I left it up and it just crashed. It was frozen from before I sent my initial message, so it was frozen for about 10 minutes or so
no idea but maybe it's corrupted
what variable are you trying to delete anyway
show some picture
I can rename the variable just fine
Its a map that uses a class for the key and a structure for the value
I was changing it to use a string for the key instead
This time I just deleted it and then saved
Then I hit compile and it almost instantly crashed
almost?
It took like 3 seconds or so after hitting compile for it to crash
But it seems like it is fixed now.
After restarting, the variable is gone and it compiles fine
I have no idea why
Out of curiosity why a string?
people love them strings
Anyone knows if it's possible to make a component visible in editor/PIE/Standalone/Packaging(Debug or Development) but hidden in Packaging(Shipping)
Not with BP. You'd need C++ for that, and some careful handling code.
I must be brain damaged after not sleeping for so long lol, I can’t for the life of me remember how to disable an overlapped collision for one actor on the lap without affecting the collision of other identical actors?
select the instance in the editor viewport
go in the details panel of that instance actor
and change the settings
i thiiink that'll work
if not , you'll need to make property setting that is instance editable
ive got a problem ive been trying to fix for a while now
basically ive made a 2 player same keyboard top down shooter and the players spawn in and the movement and shooting works however ive had issues getting the bullet to register hits for the correct player so the player thats shooting if they move and shoot they die to the bullet overlapping
i got this for my code for my character at the minute
i tried comparing the controller (outputs the right controller the one that fires the bullet) sees if its equal to the instigator im mainly trying to get it to output true but even if it hits the other player it does nothing
i found it does detect the differance in player characters (using the first print statement it outputs the right name for the player)
heres a less messy version
yeah the main issue is it doesnt return true i made a change but it still doesnt detect when it hits the other player
i just changed the instigator so it was actually coming from the bullet instead of other actor (didnt seem right) but still only returns false
I don't believe the instigator would be a controller. Have the bullet store a ref to the controller for the pawn that created it and use that instead.
ok il try this
i tried something similar with the character index's but gave up
how would i do this? im kinda new to referances in unreal engine
cause i have a issue when i try making it store a referance to the controller being the index
who spawns the projectile? or i should ask, who are the owner and instigator of the projectile?
the player characters
target arrow is where the bullet spawns (code is from the character controller)
theres 1 for each player
who is this? the player characters?
if you are okay with the projectiles never interact with the firing character, you can use Ignore Actor When Moving node. You will need to ignore both ways, Projectile's Collision ignores Character Actor(which is the instigator in this case) and Character's Capsule ignores Projectile Actor
will the other player that fires the bullet be able to hit the other player?
projectiles fired are ignoring the firing actor in this case, not the other actor.
i see so i run this in the character controller where the bullet spawning code is?
ideally spawning shouldnt be in the controllers but in the characters, i think you have not reach the point of having multiple player controllers for a local coop game yet. Separating stuff would be easier.
Owner is controller, instigator is usually the physical responsible actor. Typically a pawn
Out of topic but
I usually follow this pattern
Owner = Who spawns you
Instigator = The Pawn
Instigator Controller = Pawn's controller (we can get this through Instigator)
so in a situation where Pawn > Gun > Projectile
Projectile's Owner is Gun, Instigator is Pawn
So for the ignore actor partz you add GetInstigator, and make sure you provide the proper instigator on spawn
Owner is used for determining replication stuff, relevancy and whatnot
how would i change this code to fix the collisions
cause it still returns false while shooting and moving
cause i implimented the code snippet you sent
Hi, been trying to get this work for ages, i want to attach the gun to specific sockes, so when the sprite plays a shoot animation the weapon pops up, no gun spawns when i shoot? i think its the code.
Wolfdogpawz I’m still new in unreal but I believe you need to set the parent in the attach actor to component which to me looks to be the sprite. Someone can definitely correct me if I’m wrong.
Thanks, i tried that ut get an error: AttachTo: '/Game/Levels/UEDPIE_0_DebugMap.DebugMap:PersistentLevel.BP_Player_C_0.CollisionCylinder' root component cannot be attached to other components in the same actor. Aborting.
Im getting to te point where i thinking doing 2d i should just switch to another engine
ok i think i got it working it now doesnt show say it hits the player while moving and shooting
but that might be because i did changed the event from a box collision to the capsule component
also here the spheres hitbox on the bullet is inside target
plug this + not boolean into component visibility on beginplay or construction script
I'm assuming it has to be, but is it possible/easy to place multiple camera splines in a level and have it switch depending on which path the player takes?
Hey all. Can we do buoancy without the need for a water surface? I'm asking because I'm using an interactive water surface done with Niagara and it doesn't register water collisions the same way a water surface does. Or is there some way to make unreal think that a plane is a water surface? Is that just a matter of collision settings?
Got a quick question for the pros. If I async load a asset to spawn a actor, does that async load stay in memory till I manually unload it or does it get GC? I heard that its better to async load, promote and store, then spawn and then set the stored ref to null after the spawn so GC gets it. Just wondering how that works. Thanks
It can. I think I figured it out. Thanks for pointing me there. Right in the sim I'm using it has a collision tag
I know some games do this with some basic noise like perlin and others. Basically a buoyant point's distance to the water, offset by a noise multiplier. So that if the boat is in the air, no floating offsets, but if it's in water, the waves that are also dictated by the same thing in shaders. So it ends up being two separate systems that just work with each other. IIRC Valheim did it similarly.
You don't need to save it unless you want to use it later. If you async load and then spawn from that callback, it's all same frame, no worries about it being collected. And the fact that the thing is now spawned, means that it cannot be unloaded until all spawned instances are destroyed.
To clarify the first question, if you Async Load anything, it will not stay loaded unless you hard ref it afterwards somewhere. This means creating an instance, or simply setting the class/asset in a hard pointer property on something else that is GC stable.
There is one exception to this, which is PrimaryDataAssets loaded through the asset manager. Any primary data asset loaded, and anything loaded through the bundles you load it with, will remain loaded until explicitly unloaded.
Thank you very much
Thanks. I'll do some research and see if I can come up with a good solution
Indeed I missed that, I fixed it just now, but now no items will show up anywhere
i'm relatively new to blueprinting.... and i'm kinda stuck... i need to apply these two different orientation warping nodes to the character depending on their direction. The problem is, my enumeration has 4 enums where two need the top node and the other 2 need the bottom node.... how do i make this connection? e_o....
This is more #animation than it is #blueprint. That said, I believe you'd use a blend by int and then you should be able to connect the appropriate output based on your enum.
okay, moving to animation
@maiden wadi Right now I have "Enum Crafting Menu" comparing VS to "Enum Crafting Menu" again.
Inside of that there are all out categories like "Unlocked", "Armor", "Consumables", "Equipment", and "Resources" etc
Previously I had an Enum which contained only "Hammer" and "Axe" and I realized that that was wrong
also caused some incompatibilities issues, one of the reasons was also because the "Category" of Get Class Defaults was of type "Byte" instead of Enum
I haven't changed anything about this so far
Except for this, local crafting item is gone
Looking for a bit of guidance on how to accomplish something.
In my game, I am using the default BP_ThirdPersonCharacter as the initial player. He can do a line trace and "enter" a cannon (to shoot himself). I "Possess" the BP_Cannon" and give new mapping context for controls.
I want to be able to exit the cannon, but I can't get a cast to BP_ThirdPersonCharacter to work.
This is the current exit cannon event:
the "Character Ref" is a variable with typ of Character. I believe this is causing the cast to fail, but I don't know what else I'm supposed to put into the object.
Is there a way to turn the player mesh invisible to the player but still cast a shadow?
OwnerNoSee + HiddenShadow
Wow. Had no idea about the hidden shadow function
Glancing through this, I'm unsure. You'd have to debug inside of UpdateAllCraftingSlots to see why it's not pulling any.
You likely have not set your CharacterRef anywhere. I strongly recommend watching the pinned Blueprint Communication video. But the TLDR is that you've created a pointer of a TYPE, but have not told it which THING of said TYPE to point at. Probably somewhere before possession of the cannon your CharacterRef should be populated with GetPlayerCharacter.
Do you mean debug inside of StartSlotCreation?
Not sure this is strictly blueprint related, but I have a button in my pause menu that I do not want to be focusable. Turning off bIsFocusable works fine but throws this warning every time I mouse over it. Any way I can get it to shut up and leave me alone?
What exactly is an int -> boolean cast doing? Obviously 0 => false and 1 => true, but what about values lower than zero? Or higher than 1?
There as well. But generally just make sure all of the data going in is what you'd expect.
Mousing over it won't set focus unless you've done something that sets focus on mouse over. Where ever you're doing that should check if it's focusable.
Technically this is not a cast. The internal code is literally
bool UKismetMathLibrary::Conv_IntToBool(int32 InInt)
{
return InInt == 0 ? false : true;
}```
So basically any value that is not zero, including negatives, will be true.
Ah that makes sense thankyou, I'd forgotten that was custom
Hello, why does this 'spawnActor' node causes my game to crash and say there's a infinite loop detected from it?
What class is this code in?
it's an actor
What does EnemyKilled2X thing do on beginplay?
this is all the code in that actor
I'm... not sure how I feel about that logic. But thanks!
it crashes regardless of what I spawn, if I disable spawn node, the code works as should except it doesnt spawn a thing
Pretty sure you're triggering the overlap constantly. Overlap Health == 0. Spawn which triggers overlap and health is still == 0. So spawn again, which triggers overlap, etc etc.
TLDR you need a dead boolean, or to entirely disable the actor collision before spawning anything.
thanks, I just had to change the collision channels to not overlap each other and now it works as should
@maiden wadi I noticed that this data wasn't connected
But then again that takes me to an older but more coherent problem which is that the more I change category the more copies of the basic 2 items are being created into my container widget
Plug the ClearChildren back in to see if that fixes that and it continues to work.
I just realized I had this filter output which I wasn't doing anything with it, and it was giving me data
Now I plug it here and it works
instead of filter variable. I was also confused about that when following the tutorial
At least it's working though. 🥳
I'll leave a comment on that video so that maybe someone sees that when follows that part, but thanks
So was the tutorial wrong too? Who's crafting system was it again?
Yes
Or, maybe he's not wrong because he's on StartSlotCreation
But anyway it works now.
Nice
But why is the text not displayed here? Instead what I get is this little blue vertical line? I would like to fix this as well before I go on, it just doesn't look very good
Unsure. The CraftingItem class has a value of a class, and that class has that property set for the FText?
What happens when you disconnect the "Name" from the return value and then just type in some text like "Test"? Do your widgets display "Test"?
Anyone know why i get a crash due to an infinite loop?
What does OpenShutter do?
They crossposted in #ue5-general and already solved it apparently
@empty hare no Crossposting in the future please. Re-read the rules.
Yeah my bad, i went back to delete the message in general but some had replied. I do apologise
Yes
Alright one of two things:
Either the class isn't loaded since you're using a soft reference, or the class you've got stored there doesn't hvae a value set.
oh wait i know why, it's because I haven't given names to these items through this box in the details, even tho i've given them names in the Data Table, but Data Table is not where this is getting the item names from
Default data in actor classes. 🤮
is there a way i can edit an animation to stop it from pivotign a certain bone?
for reference the head pivots left and right
default ue idle animation
You could do a Star Citizen derp and make ultra realistic mo cap movements, and then IK everything into a rigid animation just so you can attach the camera to the head bone.
atm i got the cam attached to the spin as the head turns alot with the anims, would adding keyframes into the anim work?
🤷♂️ Maybe. But from experience, attaching the camera to any bone is going to be a bad day. Star Citizen did it. Unsure if they ever realized it was dumb and undid it but for a while they nauseated people with the realistic movement. Then they IKed the head bone to stay more still, which made the animation super derpy rigid. It's just one of those implementations that just aren't worth it at the end of the day unless you find a rare player base that doesn't mind puking all day or has amazing tolerance to digital swaying. Cause even if you fix this animation, you still can't control the others like montages and everything without a heavy IK overriding it all.
And not having it attached to a bone will it still behave the same other than having the sway of the bone
Is there a way to separate CharacterMovementComponent's Input Velocity, from regular actor velocity [without rebuilding the CMC]?
I'm trying to have sharp decay for inputed movement [for bullet hell], but slower decay for knockback and boosts [External Velocity].
edit: realized I can just subtract the external velocity, but its not ideal
Hi, so in the default Third Person Template project, I need to set this branch check before doing the move inputs. Clearly my character is using the default move input action as seen on the right, but there is no Event with the functionality in my character blueprint. I think the third person character that comes with the project is long gone. Where is the functionality for the default move Input action? I need to edit it without having to redo all the moment functionality myself. I just need to append a simply branch on it.
Right click on the IA_Move, select "Find References" the results tab at the bottom will have a button with a pair of binoculars on it near the top right of it, click on that and you should then get a list of all the places that node exists.
why does the first person shooter template come with a player controller blueprint but the third person template doesnt?
i'm usin' Delta Seconds from the Set node coming outta my event tick, however my game stilll operates at different speeds pending the PC hardware.... What'm i doing wrong?
My player keeps moving even though I disconnected the Input Event. I am using the correct input action and IMC. Anyone know why?
Could be becaue you have something binding it using this variable.
What happens if you remove that definition
The character stops moving
how on earth would I find where. I dont see anywhere in the character blueprint where it's binded.
It's not necessarily binded in the blueprints. It could be bound in C++, you just have the variable exposed there to allow the C++ binding to take place.
I haven't done any C++ in this project.
You might not have, but if you're using a plugin of some kind, they may have. Or you have other blueprints that this blueprint is inheriting from that uses that "Move Action" variable, as that's not something that comes with the default Character class.
I found a Parent class in the class options. It's been so long I don't remember when I made it. How do I open it? I don't see anything in the content browser search.
Found it in Visual Studio. I have no ideo where this came from. Guess some investigating is in order. Thanks for catching that.
is there a better way at handling state tree tasks when using anim montages? im trying to finish task after the montage has completed.
Why is this one not working? I changed it from Enhanced Input to IMC default so that I can check the trigger when paused option
The remove it not working
so the top part is really not working
not sure but the parent node for... set input mode.. isnt present on the quick select event
this is how i do similar thing for inventory access ... in both cases they refer to either... self or get player controller when entering or exiting..
which parent node?
yes i realized it doesnt matter but i kept the "get controller" nodes anyways because i might cut and paste it into some other blueprint to do some test or whatever, a tutorial i was following wants me to use it in a way that was not convenient
can anyone tell me what the issue is with this blueprint? I followed DevEnables local multiplayer shared camera tutorials, node for node (everything worked because I followed the local MP functionality and all that works too even though it was for UE4 and I'm on 5.4) but whenever player 1 gets destroyed, whether via damage from another player, or kill volume for example, the camera absolutely breaks, but if player 2 were to get destroyed instead, the camera would focus on player 1.
When P1 dies, the message log floods with runtimes errors for the Add item to array node at the very end of the function I've attached as a screenshot. The issue is because P1 is gone, but it should use the other characters via the index/active player array, so I don't understand why its breaking. I've attached a video showing what is happening too.
I'm pretty amateur when it comes to UE blueprints. I can manage fairly advanced things, but when it comes to having to program the majority of a game because no one in my University group can, that's where all the issues just come into play...
I'd really appreciate some advice
But wait what
Youre checking distance to self ?
Array Element should be equal to
Get(ElementIndex)
I assume You want to check distance between all possible combinations in that array
If the length of the array.length is <= 1, you can instantly return spring arm minlength
It's checking the distance between 2 players (it should go up to 4 but I don't have enough controllers) but between 2 separate players it does work, it's just when player 1 is destroyed, it breaks completely
What index should I be using? Is there any way you could show me how it should be set up?
And first index for second loop isnt element index, but element index +1
You want the index from the second loop
To compare with the element in the first loop
Also, pro tip: local variables doesnt need to be cleared
Assuming its local..
The guy in the tutorial for his crafting system that works with his inventory system has one of these odd looking dictionaries where he saves up everything where's I got an array im using called " F Slot Struct ", should i now use a dictionary and transfer everything from my "content" F Slot Struct and update all the information every time to the other dictionary so that my dictionary can be compatible with his tutorial?
Why not just follow it to get it working then change what you want? Are you having more problems with it?
read again
Thats your decision to make, no one elses
Can you follow the tutorial while sticking to ypur changes ?
If so, stick with what you got
Maintaining dictionary + array is just wasted work
Yes exactly, so this is why I posted it here
I mean should I just change the entire inventory to dictionary content instead of struct?
Thats what Im saying is YOUR call
Its up to you
What results do you want
How do you want your final inventory to look like
Arrays are easier to work with in many cases when it comes to bp
And also supports replication
I find it to be a better exercise with my own modifications along the way
yes, well the the inventory had many problems so i removed a few functions and now it's only for display, like it literally is only for display at this point and nothing else, I removed even the transfer slots cause it wasnt working properly
As it forces me to think and solve the problems that the tutorial does, but in a slightly different way
I like this and I agree with this a lot
Thanks
And an Inventory is in essense just a glorified container manager, being an array, a map or whatever else fitting container there could be
so at the moment I have three widgets for displaying what you carry on you.
- "q" key for quick selection menu ( not yet finished but this will rotate around the static meshes where you will be able to see on your player's hand )
- "tab" key inventory, only shows you the resources you collect from the world
- "c" key for crafting, which will hold all the new items you can create
hello guys, i have a quick question. i want to create a simple storage system. Where the player is holding an item and goes to the storage press E and system add the number of objects the player have in hand. The problem is i dont know where to storage the infos, i have an Enum with all the objects but idk how to make to have quantities. Do i need to use data tables or?
Structs. Define them in cpp tho
i am only using blueprints tho, it is really necessary to use cpp?
or do i need to make a custom struct?
Live editing bp structs tends to break them
mm, i understand, do you have some references or something?
You just need to define them in cpp then you can use bp only
i think you can also create them in editor and use the Unreal Header tool to generate the cpp defintion for you nvm, doesn't work for structs
until you are familiar with the syntax
Hi I'm noob, im trying to create a map generation scirpt which generate tiles where player goes its like a endless runner with omnidirection my problem is OnComponentBeginOverLap seems does'nt work properly on new generated tiles first tiles generates perfectly then it doesn't trigger overlap properly i need to turn back to work for center of new tile on second generated tile then on third tile it doesn't even work i had to turn back to second tile's center and also my currentChunk variable turns to original tile like (currentChunk = Tile if in the middle of Tile (CurrentChunk = Tile1,Tile2 etc.)
i dont know if i can explain correctly but i appreciate for any help.
I made something, i created a structure who contains another structure which has a name and a quantity inside it (i dont think is very good like that 🙂 ) but when i want to add a quantity to the structure i can't get it to work. i dont think this is the very best idea tho :))
Hi, I started using Casc v 2024.3.1 for game animations and I dont understand one thing. How can I attach ik_foot_l to foot_l and ik_foot_r to foot_r? I need the correct postions of IK bones for foot placement & legIK UE nodes. On screen one is example animation, in screen 2 - my own. I used to constraint ik_foot_l to foot_l in Casc rig tool and same for r foot but its not working or I did it wrong. Plz help
Did you mean to plug the Quantity int into the array GET instead of the ID?
Uups, i didnt see that, thank you :))
So i have a collision box
and I have an actor which is the doors for floor
when I need to I have the floor doors get triggered by an interface which sends over a command to either open or close them
my issue is I've trying to do it with a box collision so that I don't have to do any hard linking between but as the box collision isn't overlapping with it but already is overlapped it's not picking up that there present
any ideas at all ?
Just picked up blueprint assist. Do you guys have a preference between a more helix style setup or side to side for parameters? Any other recommened settings?
Is there a wat to use Gameplay Tags via Blueprint only to find all Actors with a specific tag? I don't want to use the Actor Tags as typing the name is too error-prone.
The "Get All Actors with Tag" node under the hood basically does "Get All Actors of Class (Actor)" > ForEach Loop -> Does Actor have Tag > Add to Arrray > ForEachCompleted > Return Array
You can do the same with checking for Gameplay Tags, but you'd probably want to make something in C++ for it just so the iteration time is a bit better.
You can convert them via stringn
On any actors beginplay or construct you just add some gameplaytag to the actors tag array
Ah, I thought I was just missing something built-in already since "Get All Actors With Tag Matching Tag Query" doesn't work with Blueprint only created Actors as the IGameplayTagAssetInterface cannot be implemented. That's unfortunate. Guess I just use Actor Tags. 😦 Any good advice for storing tag FName instances via editor created assets/Blueprint (need to avoid C++ for now due to audience) so they can be referenced to be pass to "Get All Actors With Tag" rather than typed in? I suppose just a UObject Blueprint with a bunch of variables exposed would be enough.
What's the end goal?
In this case, it is retrieving all Actors with a specific tag on level start and using that array for various things.
Such as? If you're able to provide some more information, I might be able to offer an alternative solution.
Wait, what?
IGameplayTagInterface is C++ only?
Yea, it's not exposed to BP.
I thought the same thing to be honest haha. I didn't believe it until I checked source.
As many other things it baffels me that this still happens
New things with obvious bp benefits, simply not exposed to bp
well when you start doing complex stuff you should go to c++ land
BP should only be for designers, prototyping or beginners
thats my opinion
(and i think thats epic opinion to since there is little exposed to BP land)
That doesnt need to be advanced at all
i could do a list of more useful stuff to expose than that x)
Define complex. 😃 I do lots of stuff that a lot of people would say should be done in C++ lol.
i mean anything that could be annoying to maintain in BP, low level multiplayer stuff, or anything expensive to run
Multiplayer in c++ gives you granularity unknown to bp
High loops or multiplayer does get a lot of beneifts in C++ land.
when i work on a project alone i like to put most stuff in c++ because its easier to maintain, read and debug and profile
Same
Doesnt mean i dont sympathize with bp users 😅
And how the engine puts up walls for certain things
i was a BP only user for 2 years only a year ago x)
c++ was a bit hard at the beginning but way more convenient
Im a BP guy. I recreated an interaction system in C++ and it took me like 2 hours. The same thing in BP takes me about 10-15 mins lol.
I work far faster in bp
yeah but how many hours will you waste in the future when you will extend it ? thats usually the breaking question
but a interaction system is not a complexe system, atleast not one that you can do in 15mins
indeed
for example doing a inventory system in multiplayer in BP would be suicide
because that interface has default implemented functions, and i imagine that isnt supported in blueprint
True, it was a simplied version. If I tried to recreate my main one I use it would probably take me far to long in C++. Extending any system does come down to the design though like Squize said.
You could have just as much trouble in a C++ version if the overal design/structure is poor.
you got a point
Why?
Thats a choise they made 😅
Multiplayer inventory aint the worst imo
Realistically the only singular part about BP Only inventory that would bother me would be that I'd have to do it with structs.
Lyra's inventory is overengineered af, but i kinda like it
It's just data assets, data items, and a component.
You can do it with uobjects but it's a little finicky. Creating a uobjects base that can be replicated would make things significantly easier though lol.
replicate subobject list is made for that purpose i think
You still have to replicate it with structs.
BPOnly though. Or did they finally expose that?
If not, I don't know why not. They really should.
still C++ only i think. There is a free plugin that exposes it though.
you can just make one yourself at that point 🤣
It's literally a fucking UFUNCTION(BlueprintCallable), and UFUNCTION(BlueprintNativeEvent). :/
Maybe we should start a list of things that should be exposed to BP and send it off to Epic. 😅 They might just not know or forgotten. 🙃
The add to replicated list, and the override in the object itself to allow replication. Which could be a checkbox at that point too.
They won't do anything about it. You'd have to make an engine PR.
cant really blame them, their first priority is always fortnite anyway
first person rendering? oh because fortnite new feature has that
lmao
Should be simple to make in this case
Maybe. Speaking of which I still need to learn how to do that. Have a widget bug I'd like to PR.
Im sure it'd be ours too
Us making billions of €€€ > others make thousands of €€€
I've a Move Component To to control my left and right movement - Over Time is set up to recieve Delta Variable set from Tick multiplied by value.
However, on my laptop the player moves slower than on the desktop
Same for my montage, initially its animation lines up with my percentage bars refill - then it will randomly become slower or faster, falling out of sync. It too Fair, fair.
I've a Move Component To to control my left and right movement - Over Time is set up to recieve Delta Variable set from Tick multiplied by value.
However, on my laptop the player moves slower than on the desktop
Same for my montage, initially its animation lines up with my percentage bars refill - then it will randomly become slower or faster, falling out of sync. It too is using my delta x value though...
Help?
I'm making a custscene system and one of the things I need it being able to save and load mid-playing. The problem is that if I set the playback position to the last frame of the sequence, it will loop back around and start playing from the beggining again
Not familiar with the sequencer stuff. But if you can get the last frame count you could always clamp it at LastFrame-1 ?
I did something like that, where the saved frame will have 0,001 always subtracted from it and it seems to work, but it's very hacky
I guess I could use a select to see if the last frame is finished and if so subtract from it
The other choice would be to simply not play it if the saved frame == last frame.
But tbh it looping at the last frame is just weird behaviour in the first place
I still need the actors to be in their last frame positions though
Ah. Fair yeah.
It's an anticlimatic solution, buty I guess it works so 🤷♂️
Save load mid sounds very uncommon
I guess it is
But it's what I need for the project nonetheless
It is nice to be able to save during dialogue/cutscenes.
I don't understand what you mean. If I connect the index to the get copy, the camera still breaks when player 1 dies. I don't know how to compare arrays without it just being a boolean.
The whole screenshot I sent is taking how many active players are spawning in, which is the array variable shown, finding the distance between the 2 actors furthest away from each other, adding that distance to an array, and when the first for each loop is completed, it uses the last distance in the array, uses the value to determine the spring arm length and then clears the array for performance,
The code works regardless if I plug the index from the for each loop or the for loop into the get copy that connects to the other actor in the get distance to function, but it's when player 1 gets destroyed... I'll be adding ragdolls so the player won't be getting completely deleted from the scene, so that may fix the issue, but if player 1 dies any other way that wont leave a ragdoll, it will still break
Right but do you as a player expect to leave and re-enter at the exact time? Dont you want to just start from the start of the cutscene to get the full thing together ?
For dialogue, I expect for it to start from where I left off, like in Baldur's Gate.
I cant even imagine how that'd be if i continue the next day... do i even remember where i left off and what the convo is about ?
Guess i should check how baldur does it.
Usually you only save in dialogue if you're concerned the next dialogue option will start combat, or stuff like that.
It's pretty rare that you save and exit in those circumstances.
Hello. If anyone has the Advanced Locomotion Component
https://www.fab.com/listings/8f58eb7e-a4b1-4557-bb61-35f7ff0439ad
Could you give some advice on whether it would be betetr practice to keep all the variables like health and such in one component instead of creating like 5 different components to add to your player blueprint?
Disclaimer:Some content in showcase is not included in asset, but will provide free sampleWeaponMaster Animsets is not included in assetNot suitable for beginnersNote: Latest version only supports 5.2 and aboveNote: Art assets not includedVideo Preview: YoutubePlayable Demo : GoogleDrive ( Bow + Protector + TwinSword )Playable ESRPG Integration ...
I'm not following the correlation of health and such being special or combined attributes to locomotion?
why not put all of this in one component
Because they're different systems.
I mean the idea of components is to cut things apart into different systems and make them reusable
Combining them all into one would thus be simply wrong
alright yes that makes sense. So that right there is not considered a 'bulky' blueprint?
messy, even?
Not really. Imagine all of that code going in a single BP. Now that is messy.
true. on the one hand i'd argue everything is then 'local' and easily referenced between each other
but being in the same blueprint in the end facilitates that anyway
It's worth a mention that you should be careful putting too many SCENE components on an actor. But that is for a different reason. Normal Actor Components are a good way to keep systems logic separate.
please elaborate?
I usually use scene components as 'sockets' and transform references, but keen to hear what could be wrong
They're just costly as project scales. It doesn't matter if the actor is immobile. But if your actor is mobile, every time it moves, all scene components move. Every time a skeletal mesh animation updates even if the actor is standing still and the scene component is attached to the skeletal mesh, it'll move. And their movement code can get costly. If you're making something with <30 characters, it probably might not matter, but as stuff scales all of those add up really quick.
alright i am making a note about that thanks. makes sense.
so if and when i do use them, they should preferrably actually be in use constantly or at least doing something instead of just being 'loaded'
i try keep them at 0,0,0,
which might be why im having trouble moving another actor...
can move it just fine, but the spawn logic still happens at world x0y0z0
There are often better ways to do stuff like target points and the like if you need them. There are vector visualizers you can use. Or sockets on a Static or Skeletal mesh are better than a random scene component if you're just using it to pull relative location data.
i am looking into vector visualizers now, thanks 🙂
how do I make those spaces out of the image unclickable?
sorry, what?
there is a lot being indicated by red man
understand what you mean i think. you dont want the 'background' of that widget to be 'clickable'?
I just want the circular thing clickable
yes I dont want the background
and when I click on middle top right button for example
I dont want to click on a neighbouring button that is overlapping
so we got square buttons overlapping
it will still count as a click to the button above
which is very frustrating
So say Im trynna click on button 2
but I unexpectedly accidentally hit on the box of the number 1 button without my knowledge, because it's not supposed to be there, it's not supposed to be a square button thing
I'm sorry man, I am learning to use widgets still, but you have explained it perfectly thanks and someone will respond soon.
have you tried your luck with chatgpt?
I would route thr click based on the angle from straight up
I don't have any examples. But the best way to handle this is usually to make your own on clicked handling in the parent that places these based on the mouse location from the center of the widget. It's mostly just some filtering. Start with the distance from center, if too close do nothing, if too far, do nothing. If in between those then do a radial conversion to integer to determine which item was picked.
^ exacrly this
Very simple math gets you a long way
(MouseLocation - center location).Normalize()
MakeRotFromX
Wild. Mouse scrolling handler function OnMouseWheel... doesn't actually have a pressed key.
It was designed in the 80's ok!?
Remember grey physical ball mouses with first scroll wheels?
They had no press
Effecting Button is none. 😄 No axis or mouse wheel button.
Lol. I remember cleaning those. I'd pay to see professional shooter players to compete using those these days. 😂
That should be its own league 🤣
👀 Gesture type also isn't set to Scroll, it's none. Wtf.
I mean I guess it's not technically a gesture being a mouse input.
I'm just going to make an assumption that nothing else enters here given it's literally named OnMouseWheel
if you ever played osu! this mouse actually came in clutch for spinners
the ball actually makes it a lot easier to spin your mouse in a circular motion
Really?
[AssetLog] D:\UEProjects\DeathTide\Content\Military_Soldier_Bundle\Mesh\Soldier_UE5_Skeleton\Night_Skin_UE5\SK_Soldier_Mask_UE5_Night.uasset: This skeletal mesh asset has NAN (invalid float number) value in the pose matrix. Asset is corrupted and must be re-create
What is this, how can i fix it? I deleted the asset pack, the DDC and reimported it, made sockets for my weapons and get the error again.
It wouldn't happen to be the Military Soldiers Bundle pack would it?
I'm unsure if it will get merged, and if it will, when. But I did make a PR for this finally. I made it for the multiple modifier keys, but I put in mouse scroll handling to return MouseScrollUp and MouseScrollDown. https://github.com/EpicGames/UnrealEngine/pull/12657
Hi, i want to have my character to move automatically on the X axis.
For that i have written that.
But the movement is not smooth...
Is it the wrong approach to do that?
So I am currently switching characters in game by possesing. The issue is the camera just snaps to the new character, it is abrupt. Is there a way to smooth this transition to the new pawn the player is controlling?
Maket the camera movement before to attach to the player
Yes it is.
Is this a known issue with that pack specifically?
Unsure. Never heard of it until I searched your issue. Google has some cached text with the same issue though for that pack. You may need to have the owner fix it.
Literally the only result.
Any idea on the nodes to use? how it would actually be implemented? I just want the camera to smoothly go towards the newly posses player.
or change smoothly to the camera attached to the posses pawn
Use a Timeline and Lerp from the position of player 1 to the position of Player 2, when position is reach, possess the camera
The link goes right to FAB, where they removed the Questions and answers tab. This info is lost to the void
if you want to directly posses the player, then you need to possess and teleport the camera on it's original position, and then smooth the transition
Don't know if there is an option for the smooth transition automatically
Yep. :/
Have you try the lag?
Try the lag first from a Spring Arm
If it works, you can enable the lag just before to switch and disable it after switching?
I'll try and test the timeline. Not using lag at the moment since both pawns have a separate camera for now. Guess I'll have to remove one and attach the same camera to the posses pawn. I'll give it some thought tonight.
why both have a camera?
Different movesets so I test each character separately.
If I have a door that opens, then after it opens it doesn't do anything, is it good practice to disable the tick event for the object?
Additionally, can actors with no tick still cause overlap events?
Yes and yes. The overlap is an event from the physics updates, it doesn't check every tick in the actor for that.
Cool
So my only solution right now is to hide player 1 because its being deleted and removed from the index, but I need to be able to update the index to change the current player from Player 1, to the next one in the index whether it be P2, 3, or 4. Destroying the actor is what breaks the camera. So does anyone know how I could do something like that? The intent is to not destroy the player, but at this point in time I don't have a functional physics asset, the mesh just crumples, distorts and flies off rather than laying on the floor
When it's out of the prototype stage, any player that would die would have their ragdoll left on the floor, but the camera would need to be told to focus on the remaining alive players, and i'm not sure how to work that logic out
Your error above indicates you didn't remove Player1's thing from the array of considered targets.
how do i remove it from the array? I tried casting to the gamemode where its created and each character is added when spawned in, but when its at 0 HP it doesnt seem to fix it the way ive tried
Which class is this code in?
the active player array is inside the game mode i created, but the last screenshot was inside of the character blueprint which deals with the HP, death, attacking, etc
ActivePlayers is an array of the characters?
If they are characters, I would, instead of removing index zero, I would just call Remove, and pass Self to it.
let me try that just one second.
The characters are added to the array via the gamemode, the game can support up to 4 player inputs (4 controllers) so it detects when the spawn button input has been pressed and a colour has been selected, and adds the character to that array, so it could only be 2, 3 or 4 players active at a time
that didnt work unfortunately. I was going to ask if I'd need to update the camera BP somehow to update the array, but its ran through an event tick to move the camera around the players and zoom in and out based on distance
Are you still getting the same error?
yeah
well no, it depends if the character gets destroyed or not. if I set it as hidden in game rather than destroying the actor, i dont get the error but the camera still has it in its focus. but if i destroy it, the camera breaks completely and doesnt focus on anything
Does the Character Movement compontent have any sort of edge detection so I can check if my character walked off a ledge?
There seems to be some functionality for pawns around the edge, but I specifically want to override that and do my own logic
Can you show the new version of this function? Your old one doesn't have this CurrentPlayer.
the last screenshot i sent of this, I left the variable CurrentPlayer out and plugged it directly from array element to get distance to's target
but the error is that add array node and i dont understand why
Are you looking for like an event that runs when the character walks off an edge?
yeah, basically if a player gets too close to an edge I want to shove them off so I can go into a ledge grab animation
I'm unsure about that specifically. But there is an event in the Character that will run as you're already walking off of a ledge. OnWalkingOffLedge. It's BlueprintNativeEvent, so should be overridable.
anyone know the best way in blueprints to make floating pawn movement for ai? all t he stuff im finding is for character pawn?
One thing to try is that right after the first loop, do an IsValid check on the array element. That'll filter out anything pending kill too. But for some reason you're not removing that pawn from the list.
Does it need to be multiplayer?
no
that's it thanks
it single player
Then it should work by just giving the AI's pawn a floating movement component and telling it to go to a location same as an AI that is a Character.
is that not what i am doing there? cause it just stays in place or go backwards
right now it just fly backward while fliping in circles
You don't really add input vector for an AI manually.
I mean usually you'd use a BT and the go to location task,
i threw it together like that and when P1 dies it throws out not valid, so its definitely not taking P1 out the list... it should be removing it though as the camera is constantly updating so it should see its removed when the player hits 0 HP
Does this fix your camera issue when P1 dies?
that wouldnt work it wouldnt move to the location
no it still breaks
It functions the same as a character movement component except that it flies. If it doesn't move then you don't have a navmesh, or it isn't controlled by an AI controller.
I want the Add Item Function to add all Derivatives of My Item not just BP_MyItem any ideas how?
how do you have a force that constnatly pulls in actors?
prefer not setting location because I want the player can somehow DI against the force
physics based? cuz there's one on youtube, otherwise, just call the location with an event dispatcher, and interp on the affected actor
yeah i have an aicontroller and behavior tree hook up to it, didnt think floating pawn use navmesh?
it's something like a gravity that pulls in players for a brief seconds
my major issue with it though is it moving backwords and not forward..
Do a "Get Class" from the "Array Element" and plug it into the "Item Class"?
you could have been a life saver but their not compatible I'm afraid
Screenshot?
Might need to do a class cast... Assuming you're trying to add the "class" of the actor object you're overlapping to the inventory.
nah I'm trying to add the Derivatives of the class
I just changed the get overlapping actors to the BP for now but I might have another go at it later
"get class" returns the "type" of the object. Your "Get Overlapping Actors" node returns "Actor" type objects.
If you're trying to add the "Class" of those objects to your inventory, whatever they may be, including children of the "My Item" class, then you need to change the reference of an "Actor Object" to an "Actor Class" but you also must ensure that you're feeding in the correct class, which means you need to cast the "Get Class" to the base class that the node is expecting.
If it's the right type, the cast would succeed, and I imagine it will feed in the correct class to the node, not the casted class, but its actual class.
Thank you very much I couldn't understand what you were saying since it's 5AM for me and I'm delirious but the images helped man I hope you have a really nice christmas
Is there a node for if I have a float value like 15.4563, it cuts it to leave only 1 decimal after the . to return me 15.4 and I don't want it to be rounded or floored or whatever ?
I tried to do that using To Text(Float) node to trim it then convert it back to float, but the RoundingMode option has no option to do nothing to the number and leave it as is instead of all the options being "rounding" options.
And I want to avoid to do math, I want to know if there's a node for that already made by Epic as it seems simple enough for Epic to think about it
There's no node for it because it's simple math. Multiply by 10. Floor to int, divide by 10.
are you sure ?
15.4563 x 10 = 154.563
154.563 floored is 154
154 / 10 = 15.4
alright, thanks 👍
tbh that's such a common operation it SHOULD have a node
Now go 10!
Hi, How can I find if player is moving in the +X or -X direction of an actor?
+X?
As in world x relative to another actor?
Or are you asking towards or away from another actor?
+X of the actor
player is teleported in the middle of an actor. Now I want to find which direction is it moving.
Ill have to ask for a drawing that helps to understand the question
wait
If you want to know the movement direction of OtherActor in thisActors local space, then you can dot product the OtherActors normalized velocity, and compare it to thisActors forward vector
Alternatively you can infer this information simply based on frame distance delta
Between OtherActor and thisActor
but wouldn't the vector of the static actor equal to 0?
helpful?
I was doing this. Then wondered if this'd work. Since Static actor's vector would be 0
ok
You didnt mention it being a static actor btw
But it only means youd swap otherActor and ThisActor
Altho. I think you dont want that
You want to check players direction relatibe to static actors X direction, correct ?
yyes I meant local space
But will ofcourse depend on the actors transform for the world space directiom
this one?
This is where I'm at in terms of this issue.
Using Is Valid that Authaer suggested, I can view that regardless of what player dies, the controller is broken for that player. But if Player 2 dies like in this video, its deleting it's item in the active players array, then destroying the actor and focuses on player 1. The camera still breaks if Player 1 were to be destroyed first. I think the whole issue is coming from the arrays/index im using, but I don't understand arrays enough to be sure. In my mind, I'm removing player 1 from the array, which is 0, player 2 is 1, when I remove player 1 or 0 from the array, player 2 is taking its place, but because 0 is associated with a different player controller? Ahhh idk man. I thought I found something on UEBlueprint that would be the solution, but that broken even more... It's 8am now, I haven't slept and I'm in work in 9 hours. I just wanna get this to work...
Yepp
When you click on the error
It takes you to this function?
It takes me to that node specifically
"Attempted to access BreadLoafNew_P1_C_0 via property CurrentPlayer, but BreadLoafNew_P1_C_0 is not valid (pending kill or garbage)".
"Node: Add Graph: UpdateSpringArmLength" "Function: Update Spring Arm Length" "Blueprint: BP_Camera"
I still don't know how to work around that one problem tbh. I just focused on different things in the meanwhile but sooner or later imma gonna have to deal with that elephant in the room
You need to validate the reference on the array get aswell
because I can see many bugs coming in all directions, no matter which direction I choose
what would you recommend?
So basically. Your problem is not having a solution for an array length of <=1
Which is the first thing i told you to add
So the initial thing you chevk in the function is length >1
For targeting system, how to best find the best actor to target? I don't suppose finding the closest one is the way?
Maybe I need to consider the dot product? prioritize the target infront of the character?
Thats a common way of doing it yes
Dot and distance
🤔 and how should I grab the nearby actors to evaluate?
just pop a sphere collision?
😄
Yepp 😆
I feel like a caveman but can't really think of any other way
So I'd do this at the start?
Hahha tell me about it
How do you do to have that style of blueprint?
Yes. If false, return the min arm lengrh value
It's Darker Nodes and Electronic Nodes, both paid plugins on the I guess Fab store now
Pop a collision, grab the actors, filter the actors by doing a ray trace if there are walls in between
Closest actor + dot product 🤔
Do I just set the arm length to the minimum?
At some point dot beats distance
Yes
Personally i isolate things , so this function can be used for several things
So my function would simply return a range based on an actor array input, min range, max range
And simply map the range based on the distance between the actors
Ooor just return the max distance between the selection of actors
But thats not important atm
So I've followed what you said with checking the length is >1, as well as validating the array get, I'll just test it now
I'm not getting any floods of errors which I guess is a good sign, but the camera still breaks when Player 1 gets destroyed. But I've noticed depending on where the player is facing when it gets destroyed, that's where the camera points to. So if it's facing behind the camera where you wouldn't be able to see, the camera will face that direction when P1 is destroyed
That's the logic for setting it to the camera BP. It's set in the game mode
Where is this spring arm logic then?
that's in the camera bp
The game mode references it so the camera only focuses on the players once a minimum active player count has been hit and the start button has been pressed
I think some of the flaw is there
Each player should get spawned in a local camera manager
And that should handle the focusing
On a local level
Unless this is local multiplayer
In which case i got no clue
I mean the locla camera manager would still work i suppose
It's local MP. https://youtu.be/numxlpyL1E8?si=fcucEpymprBRFUe_ I followed this tutorial after following DevEnabled's Local MP stuff but the only issues I've had are with the camera, and I followed it exactly. Tried asking for help in his discord but no response
This Video:
In this video, we finish implementing our shared follow camera.
Chapters:
00:00
00:13 - Camera Follow
05:50 - Camera Zoom
11:05 - Final Tweak
12:11 - Result Test
16:30 - IMPORTANT!
Multiplayer:
In this playlist, we'll look at anything and everything multiplayer related inside of UE4.
Consider supporting the channel on Patreon...
Hello My character move like that
and my BP for that is that
did i made a mistakes with the character movement?
hi, maybe stupid question but i was looing for an answer for last hour, what is the name of this node:
Vector + Vector, but the result's pin has been split
Still feel like its related to the owning character
You destroy it, right ?
How can i make them gather inside one blueprint? I have a lot of modular pieces, and i need them in one blueprint.
I have the logic destroy actor with target left on self, but I have just been making the character fall into a kill volume which I'd hope is the same thing
... i was looking at split option and now its there 😄 thanks @leaden raven !
Yepp seem fine
Im wondering about the relationship of the actor/controller and camera tho
Is the controller destroyed aswell?
Since that controls the viewtarget...
select the actors in the editor, then right click and select create blueprint
How would I check this?
I'm guessing the tutorial wasn't put out there for a fighting game that destroys actors...
I found "Convert selection to blueprints" and harvest components.
When you play in editor, you can inspect the actor list in the level
Press F8 to eject from the 'pie', allowing free mode and editor stuff
Also just play in editor, not new window
Unsure if it matters but
I know it works without it 😁
@frosty heron no crete blueprint
No the controller isn't being deleted, its also making it for 2 other players that don't yet exist
the camera does still exist, it's just following player 1
so the issue is it's being tied specifically to player 1 and not being reassigned
Theres some logic we're not seeing here
Show me where you create that camera
Spawn it
@flat jetty nvm, I can't reproduce it. Could have sworn there was a merge button for static meshes
Think you need to be in the mesh editor for that
Arm length is just just one component
How does it update its location?
@frosty heron Thats how it worked for me!
Havnt seen logic for average location etc
