#blueprint
1 messages ยท Page 193 of 1
so events are just.. stupid
it needs to be a function for it to be actually passed by ref
that'll be even more complicated for you, dont bother ๐
oh alr
walk before you run
just right clicjk your shooting event and click convert to function
test it again and hopefully it works
Why would it?
i checked task manager it seems its only running one instance
it just feels like it, when they are struggling with stuff like >= and branches
they had half of this already done so just stick to learning and understanding structs before moving on to other stuff
i do have a problem with differentiating between the signs
a childhood thing
I find working with large structures a pain and often buggy. The moment you have an array in a structure it gets worse and the nested structures just make me want to die.
Little fish eats the big fish. That's how I remember lol.
i rememebered it as a crocodile eating a human or smth
when i found out serialization, struct based inventory feels like a century back
saving and loading objects couldnt be easier
Can you do serialisation with uobjects in blueprints?
you just need some c++ made function library
No but it's not difficult to serialize the data yourself and store it in a string.
copying/saving/loading data couldnt be easier
Oh interesting
this tick is not for show
for every variables, you can tick those, when you do serialize the object it will save it
I've literally just started work in my second game and I was trying to decide on the best way to do inventors and saving/loading. Which I think we talked about before, pattym
Maybe I should consider paying for some more advanced training ๐
those 2 blueprint node is just these
is this like a problem with structs or a skill issue in my side
problem with blueprint event not passing by ref as intended
Did you try what we said about turning it into a function?
yes
And it's still "by-ref" in the input?
I did recently upload an inventory tutorial. I do need to pull my finger out and do more episodes though haha.
That's handy, I might have a look into that
please send
This is pretty much how I handle most of my inventories. Not a fleshed out series yet but might still be worth a watch.
Welcome to this tutorial on how to create an inventory system in Unreal Engine 5! In this video, we'll go over the concepts of setting up an inventory system using Unreal Engine's powerful Blueprint visual scripting language.
In part one, we go over setting you an item object that will house our item data. So whether you're a beginner to Unreal...
Wow this is you? I really like your tutorials lol ๐
Yes. ๐ and thank you.
is it possible to extend the little guys in timeline editor?
Extend? Wdym
like make the tengent longer
like this
?
I didnโt even know you could use tangents like this ๐
you know unreal it's an amazing software but then you get stuff like this and I just don't get it
why is it not in there, idk ๐คทโโ๏ธ
you can use an external curve in timeline
I've seen that but not really looked at it. You can dynamically set the external curve?
Nice, I've been using Float Curve objects a lot recently so it's nice to know of another use for them.
technically you could also just spawn the pls dontUTimelineComponent, set the curve and bind the respective events to use it anywhere else.
So you can use this node if its a static mesh, but not if its a skeletal mesh (from character class), so how can i adjust the scalar parameter of a material on a skeletal mesh? ๐ค
Mesh Component is the parent class for both Static Mesh and Skeletal Mesh
should be fine?
A skeletal mesh is a child of 'Mesh Component' so should still work.
i thought so too but its giving me loads of
that just mean somehow mesh is nullptr
That's an issue with you're ref not the node.
Where are you calling the above?
its just the reference from the character mesh from the character class
Really odd thing is happening
this function is being called
on a timeline atm~~, but thats irrelevant~~ maybe cus its not animation bp?
yet within the function this breakpoint seems to not be breaking to let me step through
i wonder if i have to get something else from the "Mesh" ?
i tried this as well but not compatible
is it only available to get from the animation blueprint, i wonder?
sure its getting the error from there? breakpoint the set scalar param and see if you still have mesh reference?
you can breakpoint on this instead if you are sure of it and see, else printing also helps
This works fine for me. Just starting the timeline on begin play and setting the tint parament on the manny material.
so weird.. ๐ค
i'll close and reopen
had a stupid issue yesterday too that wasnt my fault
Do you ever destroy the mesh at any point?
i dont :/
didnt fix it :(
okay i also just confirmed it works on manny in his blueprint too
something weird going on
if you recreated another bp and it doesnt happen, and you sure you did not destroy the mesh component at some point, might be something to do with bp corruption i suppose
yeah weird right? haha
oh wait
the issue is with a child of that actor, the original one works, but not the child
but the child doesnt have any changes
Running into a bit of an issue with my project. I have four enemies spawn at runtime. When they're spawned, they're assigned a waypoint group, which is an instanced Blueprint with four child actors acting as waypoints. The enemies then patrol between the four waypoints until a player approaches them. This works fine in the editor, but when I try it in a build, it fails and I get this in the log:
[2024.07.02-16.40.08:612][218]LogScript: Warning: Script Msg: Attempted to access index 0 from array 'CallFunc_GetChildrenComponents_Children' of length 0 in '/Game/Blueprints/BP_Enemy.BP_Enemy_C:ExecuteUbergraph_BP_Enemy'!
In my Enemy Blueprint, I'm calling GetChildrenComponents, which is what the error seems to be pointing to. This error doesn't appear in the editor. I'm still new to Unreal, so maybe Unreal handles children components differently. Let me know if more info is needed.
so it must be corrupted
yup, reparented to something else and back to that class and it works ๐
those components are placed or spawned?
Placed
It's always fun when doing some binding gymnastics lol. And yes, I ended up with an infinite loop. ๐คฃ
Slider update > set ratio on generator > calls ratio updated > updates slider > eternal we go ๐
that message can only mean the root component doesnt have child components. doublecheck i suppose, not too sure with less information here
I was hoping only calling the 'OnSliderUpdated' if it has focus but it does nothing lol. I think i need to take a step back and reassess. :S Trying to have one slider affect other sliders.
add a "gate check", if you edited the ratio from code, updates the slider, but dont call OnSliderUpdated
or have an enum added to OnSliderUpdated, to know where this change source is
dont react if its from code or something
sounds fine tho ๐ค
Basically Iโm trying to get the actual actor objects that are under a parent actor (the instanced Blueprint), not the components on the Blueprint.
Ahh, it turns out grabbing the slider handle doesn't actually give it focus. o.O
that depends if the slider set isfocusable or not
How do you add "folders" like these for functions?
Category, you also can do sub-category like Main|Sub
It's focusable. Thankfully I do stuff based on it being in the focus path so I just have an bool update based on if it gets added or removed. It seems to do the trick.
Ah gotcha, thanks!
hey i need help
i create a ball
and i create some walls around him
and i add physics material and i have a problem
i dont want the ball to change is velocity
and if the ball hit the wall so all good but if i hit the wall from a little angle so the velocity change
if the ball hit where the blue arrow so all good
but if the ball hit where the red arrow so the velocity change
Anyone know how to make a custom keypad with a 4 digit code? This is what i have so far, but im not really sure how to do the logic for it
most tutorial's ive found show people using widgets, but Im trying not to have any widgets for this and just have it as a 3d mesh in world space
Time to break out of tutorial hell.
watch those videos, understand, and then try to adapt it to your case
the ui portion may not be too relevant, but the code behind it all will be
ok thanks, ill see if i can figure it out
if you can learn to do that, you can learn to code almost any mechanic.
use what you know, and adapt it to your use case. just got to break things up into smaller chunks.
im also trying to make a timeline animation with a lerp for each button, is there an easier way to do this than copy pasting it a bunch for each button?
you can even use tutorials from other game engines. again the game engine specifics may not matter too much, but the logic implementation behind them will.
nice thanks
learn inheritance
if each button is instead a component, and passes off a delegate to the parent actor, then you don't even need all those events. just need a reference to which button index (or numerical value the button refers to) was pressed.
yea each button is a static mesh component
ok ty ill check that out
instead make a custom component that derives from staticmeshcomponent
This is the inheritance that neo is talking about
then the movement / animation logic can all be handled within the component itself
so in short
Learn Inheritance and Event Dispatchers (also known as delegates)
ok thanks!
?????
I'm looking to add "spawn actof from class" node in my BP, but it's not there. Is the name different in UE5?
What's the parent object?
How usually is situation like this handled?
Click Button > ? Activate ''mode'' after which where we will click something will happen > We click somewhere > Stuff Happen
For example:
I want to click button, which will enable mode after which I click it will set new location of point.
Not sure what to use here? Just bolleans and mode?
okay I must be sleepy. it was in construction script rather than event graph. my bad
Yes, it cannot be called in ConstructionScript. Sometimes you need to rest ๐
A "code" is not much more than an array of numbers. To set a code, you'd just need to create an array and put the 4 digits you want the code to be in it.
When inputting a code via your buttons, you'd add the value of the button pressed to a second array and check if that array size is == to the length of the code you want to check, and if so, you then do the logic to check whether or not the input code is == to the set code. If so, you unlock whatever it is you want to unlock, if not, they failed to input the correct code and you'd need to clear the input array to try again.
What I would probably do different from what you have currently is have each component manage its own animation so you don't have to do it a whole bunch of times in the main actor. Then I'd also add a number variable that is set to "Expose on Spawn/Instance Editable" that you can then set in your main blueprint for each button and return that value through your event dispatcher so you can know which button was pressed. Finally, instead of having all the dispatchers being bound like you've done, I'd make an array of the buttons, loop through them, and bind to their dispatchers so that you can now use their value to do the same action, namely, adding their value to an "Input" array like I mentioned above.
Dumb question: is there a blueprint script that lets me know whether the session is Play In Editor or not?
Don't think there is by default. Very easy to make one if you have ability to make a C++ BP library.
Yeah sure. I can. How can I do that?
Or what is the CPP function that lets me know?
I suppose I can find that online
@worn quarry
.h
UFUNCTION(BlueprintPure, meta=(WorldContext=WorldContextObject))
static bool IsPlayInEditor(const UObject* WorldContextObject);
.cpp
bool UAuthaerUtilityLibrary::IsPlayInEditor(const UObject* WorldContextObject)
{
UWorld* World = IsValid(WorldContextObject) ? WorldContextObject->GetWorld() : nullptr;
return IsValid(World) ? World->IsPlayInEditor() : false;
}```
Awsome! Thanks
Whoops. Misnamed the header one.
All good ๐
Would end up looking like this...
alr thx, ill see if i can get that working
hey i need help
i create a ball
and i create some walls around him
and i add physics material and i have a problem
i dont want the ball to change is velocity
and if the ball hit the wall so all good but if i hit the wall from a little angle so the velocity change
if the ball hit where the blue arrow so all good
but if the ball hit where the red arrow so the velocity change
You want it to change its velocity, you don't want it to change its speed
changing direction is changing velocity
what are the restitution and friction parameters for the ball, the floor, and the wall?
I wanted some help with making an image slide with the cursor movement but couldnt find a tutorial for it could any one help me with it saw the sliding image in a game and found it quiet interesting and wanted to use it in my own game
There is an easier one:
UFUNCTION (BlueprintPure)
static bool RunningInPIE() { return WITH_EDITOR; }
how do you fix the " file name too long " error if the path itself has too many characters ?
please someone help
I'm building a system that will allow me to spawn BP_StreetLight along the spline. It kinda works, but as I'm spawning a blueprint actor and not a mesh I can't see the street lights in the editor until I launch the game. Is there a way around it so they are visible?
right screenshot is the game running.
Did you try to put it inside Construction Script?
I'm spawning them on beginplay, my construction script is empty
I'm not doing it in construction script because you can't spawn an actor in the construction script
Try to spawn them on construction script, you might need to use (not sure), some function to clear / clean / delete them at the start of the function.
I think you could try to hack it, and just put Spawn Actor of Class in the Event Graph, but call event from Construction Script that will trigger this spawn?
Just I think you will need to delete all spawned units at the start of construction script, because it might spawn them each time you move the bp.
this is an nice way to brick your BP/Project
So I reparented an actor, and now whenver I change the parent or the child's blueprints it's making changes in both. They're now identical and I can't customize the child. Is this an engine bug? Should I delete the child and make a new one?
Seems like good idea
Here is a very simple example:
thank you i'll try it right away
i just create that
a physic material
and i apply that for the walls and all the necessary objects
If I have a string lets say Command_UnlockDoor_Door1A
is there a way to isolated parts of it without using the chop left and right ?
Find substring?
hmm, thats one option
Parse into Array
Yep. That was my next suggestion. Couldn't remember the name.
if Delimiter is "_", will break into 3 parts
ohh that will be perfect
Why can't I add a call to the parent function for an event like this?
It's an event dispatched by an actor component
Whats the best way to bind a interaction widget to actors (I have differnt actors but mostly the same widgets)
Should I put the widget within the actor?
I want to interact with the actor -> widget will open then I can put items on it
or are there other ways to do this?
Hah hm, well Unreal does some strange things with that method of binding events, so I got very uncertain. I usually don't do it that way, I generally create a custom event that is triggered by the base class, and override that instead.
does anyone know a fix for when you dodge roll on a hill to keep the player on the ground. when im at the top of a hill and i roll it doesn't follow the slope, same goes for when going up the hill but he doesn't roll as far. i dont have an animation for it im just applying root motion atm
Hello, does anyone knows if it is possible, during an unreal engine game to create a blueprint, again, during game, that I can create a camera and export an animation? I know that a screenshot is possible, but to animate a camera and export an mp4...
You want to create a brand new blueprint actor during runtime? That's not possible.
But if you want to build the actor in editor, then have it export video taken from a camera component, that's almost definitely possible. It might require a plugin though.
^ Durng runtime.
i was thinking like a game mode where the player could throw a camera in the map, create sort of a sequence for it and export it as an mp4 movie..
Yeah. Players could modify a spline or something that a camera would travel across. Or control a camera themselves and store waypoints for the camera to lerp between, etc. All that is easy and definitely doable in-game.
Where you're going to run into issues is exporting an mp4. Pretty sure you need a plugin for that.
Or some C++ knowledge.
hmmm I will look into the export parts, if I find anything I will share here!! Thanks Kindred!
https://marketplace-website-node-launcher-prod.ol.epicgames.com/ue/marketplace/en-US/product/msc-screen-recorder - This looks like it might do what you need. Not endorsing it as I've never used it.
It records the screen, so you'd have to make the player sit through the sequence they created while it's being recorded and exported.
It'll probably record all UI elements too, so you'd have to hide any on-screen controls during playback, unfortunately. Which would probably be the biggest downside.
Oh but that's easy to work around! Im impressed with this plugin actually
There seem to be other options. Search for MP4 in the marketplace before you buy that one.
Just in case there's something that works better.
Sure! But thanks a lot, you pushed me into the right direction!
wondering if anyone could help me get my camera to be controlled by right mouse button, and not stuck to the character in third person
I'm having a hell of a time getting spawned timelines to play/update in another blueprint.
I think I need to spawn a timeline whenever one (of many) buttons are pressed to update a float and then destroy the spawned timeline, but I'm struggling to actually get the spawned timeline to play and update in the BP I'm spawning it in.
Also look for camera manager to add behavior you desire
Why are you spawning an actor?
What's the purpose of this
@frosty heron Basically I'm insane and am using MIDI input to animate a material when any of the 88 keys are pressed, it's very easy to just set scalar material parameter to 1 and 0 when a key is pressed and released but I've wanted to animate it up from 0 to 1 on pressed and down 1 to 0 on released, the only way I can think currently is to use timelines, and I don't really want to make 88 timelines in a BP manually and I'm sure there's a better way
Key 12 animates material parameter 12 etc,
I'm absolutely ready for someone to say it's not the right direction, any guidance would be moist welcome.
it's not the right direction
little prod in the right direction?
hey i need help
i create a ball
and i create some walls around him
and i add physics material and i have a problem
i dont want the ball to change is velocity
and if the ball hit the wall so all good but if i hit the wall from a little angle so the velocity change
if the ball hit where the blue arrow so all good
but if the ball hit where the red arrow so the velocity change
velocity or SPEED changes?
the velocity will change any time you hit something
show what happens when you hit like the red arrow
make sure the only things it interacts with have that physical material
or just override the restitution combine mode and set it to maximum
that way it doesn't matter what it hits, it'll be bouncy AF all the time
this is the problem
if the ball hit on the side of the paddle so the speed change or the velocity i dont know what is the differnece
speed is the length of the velocity vector
velocity is speed x direction
does the speed change or just the direction?
I think this is his problem that he is trying to describe.
Do you want to ball to go only up basically?
and not change direction
if the ball hit on the middle so all good
the ball keep going up and down up and down
but if the ball hit on the red arrow so the direction change and that good
because if the ball hot there i dont want him to go straight up.
The problem is the speed
the speed change
much slower
and without physics material everything works as you want?
try to set this to 1
maybe it's less dense or something on edge and it bounces it slower
no
i did that
that not fix the problem
Anyone have a tip on how one interpolate a vector on tick with an ease-out of any sort (custom curve preferably?). I've got a camera follow system that is using VinterpTo on tick to seek a constantly moving target. This works fine until the camera makes a big move and the lack of ease-out becomes visibly distracting. VinterpToConstant is too rigid, but I thought it might be able to drive another easing method? Breaking my noggin a bit - is this actually even possible?
@dusky cobalt @faint pasture
if you use a spring arm, you can add Lag
Lyra dynamic camera saved my project
Spring arm is pretty bad and not a solution when you hit corners.
Oh thanks, I never thought to check that out!
Right, I might give that a swing first as corners are not an issue for me.
Is there a way to delay the player spawning? (PlayerStart)
Override the function that spawn in game mode and manually spawning your self is probably one option
Hard agree with this method. Much more control. (manual spawn)
Thanks, I'll look into it.
Can anyone make sure I'm not going insane with this idea?
I'm experimenting with the Input Actions and Mapping Context. Imagine that I Left Mouse Button click to Select Resource. If I click on the Ground I want to Deselect Resource, but right now it's set that it will call event Deselect All which will call Deselect Units, Deselect Building, Deselect Resource, even if they are not selected (it check isValid of course).
What I'm thinking of doing is make a Mapping Context and switch it depending on what is selected, but because I still want to Select Resource even if I have Selected Unit, I will have to copy and paste some parts of code so it works. This would make it more clear when we switch to other interactable object, we would deselect only what we had selected.
I feel 50/50 about this idea, even if it makes me copy things, it kind of let me be very specific what can happen in different situations. I guess I could also collapse some things to functions so it will look even cleaner and easier to call. Can someone judge?
@dusky cobalt instead deselect all why don't you check the object that is currently being selected?
Also it feel like deselecting is a generic action regardless of what you have selected
Shouldn't it just clear the selected object and attempt to see what's being clicked on at the present time?
Springarm FTW. Thanks a million - so obvious yet so outside my blinders!
Hmm, you are right. I think I made mistake instead putting seleted thing as generic actor into array I created 3 different variables for Units (array), building (single) and resource(single). These are also references of class which makes it even worse. Definitely needs a change?
Do they share the same base class? If not maybe you can use interface or component
Have a variable called selected actor
It can just be an actor type
Yeah I have these Select and Deselect as interfaces.
When deselect -> get selected actor -> get component -> deselect
Or when deselect -> get selected actor -> deselect (interface)
awesome, it came to mind because I was just playing with it
Yea my problem was instead of using 1 array for any selected thing I separated it into 3 variables.
Deselecting can just clear the selected actor and update the UI. Unless you want to do something special
I think I'm not specifically using these hard references anywhere in this bp so changing it into 1 generic array will fix it.
Good I asked because in this context my idea wasn't good. Thank you for help.
furthering on my timelines being a bad idea, I've had more results with this using a TMap to keep the piano key names (to be used to set the scalar parameter values) and a float for each
Only issue I'm having with this is that multiple keys pressed too fast together like a chord do not update all the relevant material scalar parameters
Because u are only updating 1 material in the graph you showed
ah my material has many parameters, one for each key (only 44...)
Assuming each key have their own material, you want to get the reference on the materials
Doesn't matter tho if each key have their own dynamic material
It would be DCM_1 for key 1 DCM_2 for key 2 and so on
this is less of "animate key emissive 0 to 1" and more big stupid shader that uses all the keys as inputs to drive a shader effect.
If you need to update key 1 and key 2 materials when they both pressed you will need to get a reference to each of their material
sadly it's not multiple materials, more multiple scalar values in 1 material.
What I meant by multiple materials are one instance for each key
Seeing that you are using dynamic material here
Show how you set the dynamic material
It's just one plane currently with a material with many parameters to input to create the effect
You won't be able to do what you want if you only have a single blueprint or variable managing all the keys. "Note Hit" I imagine changes every time you press a key.
Each one of these spikes being 1 key parameter in the material instance
yeah it does, and evidently the animating float up and down does not happen fast enough before being cut off by a new note hit.
Do each key have an instance of dynamic material?
Play Ur game, eject from your controller and show the key materials
Screen shoot that
@frosty heron no each key is just a name in the TMap, I might be misunderstanding but there is no physical keys with their own materials, just the one large plane with a material with multiple parameters, each one has the same name as the "Note Hit" name variable
so I press Note 12, it gets the float from note 12 in the TMap, animates it up and down if key is pressed or not and shoots that through to the material parameter with the same name "12" etc.
So you have 88 parameters in your material?
I have 44 just to make it "less" complex
performance really isn't a thought here, it's more about driving fancy effect with MIDI.
Anyway there looks to be design issue
I think so
If you need to edit a collection of something
You will need to go through every single one
So not seeing an array or any of the sort makes me question the limit that you seems to impose
Looking at your event tick I can't tell how that can accommodate multiple key press
yeah I doubt it can, it will and does cut them off if I change key too fast
but I feel the way that would work would be to have 44 of these MIDI listeners spawned in the world and assign each one to the corresponding key material scalar parameter, that'd work but feels crazy?
Honestly I can't visualise what you are trying to do
Not even a piano or instrument
Gl tho
lol thanks, it's very esoteric for sure.
and also a big thanks for the feedback and talking this through with me.
With your current set up it seems like what you'd end up having to do is keep track of which keys are currently pressed in a separate array. Loop through them and make sure they're doing your "hit" logic.
Then you'd have to loop through all the keys that aren't pressed (basically get the keys array from your Map and remove all the currently pressed keys) and do the not hit logic.
@dawn gazelle that sounds terribly involved but I thuroughly believe you know more than me.
worst thing is each key has a "velocity" I'd like to visualise so that'd add a while 3rd float into this, but that can wait for all I care.
Yeah, def solves a specific use case but upon more testing isn't ideal more broadly. I went down a road of attempting to use VinterpToConstant > measure distance > > Ease but it is not winning the day. Lyra camera doesn't appear to fit the bill either. I guess there's no other method for achieving an ease-out running on tick?
Lyra camera has curve you can use for the transition
Ease in, ease out , ease in ease out constant, w.e curve you need
It will probably take you a while to actually see how they handle camera. All of the action is in cpp
Pressed a key > Add it to "Hit Notes" array.
Lift up from a key > Remove it from "Hit Notes" array.
Then your tick would start to look like the attached.
Ah that looks lovely Datura
@autumn hawk https://m.youtube.com/watch?v=eE983Wlst_M&t=30s&pp=ygUWQWRkaW5nIGNhbWVyYSBsYWcgbHlyYQ%3D%3D
Smooth your camera movement with position and rotation camera lag just like for the spring arm component.
Lyra doesn't use a arm spring component (which supports camera lag), but uses camera modes that can switch to and from each other. It allows better fine tuning for where we want our camera to be based on camera mode data.
In this video: w...
Oh thank you, that looks good!
What do i need to use to get what player mouse is pointing at is 3d game? Is there an event or something for that?
https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Game/Player/GetHitResultUnderCursorforObject-/
Get Hit Result Under Cursor for Objects
Thx
@dawn gazelle you sir are a genius! fuckin' fantastic work there and an absolute BAMF for the guidance, I've got it working exactly how I needed now and learnt a lot more. Thank you @frosty heron also for the help too.
hey guys i created an animation thats basically a hand coming up and holding a flashlight, in my flashlight function i call play montage and it all works fine. issue im having is when i move camera to look up the arm is in the same position set in montage, whats a easy fix for this?
How can I create objects from a Data Asset blueprint at runtime?
I have a Data Asset derived from PrimaryDataAsset, called DA_TankGameplayData, and I would like to create a runtime 4 objects from this base class and start assigning data and using the Functions inside said data assets.
How could I achieve this?
how to freeze/stop/lock, mouse from changing position/ in ue5
Is your hand mesh attached to the camera? If this is a first person experience I would suggest that. Otherwise, how would the hand know the camera is moving?
no because im using a socket on the hand for a flashlight so when i attach it to the camera i cannot set a socket
Okay, so your character blueprint has a mesh for the hand and a camera correct?
with a clamp?
disable it?
Is there a way to add physically simulated chains to a character? I know you can partially simulate bodies on a mesh, but wasn't sure how to go about with a chain as it has attachments on 2 parts of a body
yes
is there any way to detach this object when the player pressed a key? Currently i just have a interaction interface and component that will let me pickup and item with a linetrace by attaching it to an arrow i have on my player. Is there a specific way i should be going about detaching this so it's easier to drop/detach all other future bp's/grabable objects i want to make?
couldnt you just use a detach from component node on another function?
Yeah that's what im trying to do, but im just not sure how to activate it, and also make it easily expandable for any new objects i want to add
Use a blueprint interface?
im trying that, but how do i make it so it works in my player?
could i just make a variable on my player and on the item that i pickup once it attaches to the component have the variable be assigned to the thing i just grabbed?
Depends how you want it to work ig. On your interact trace you could if there's no hit or hit actor isn't valid drop instead of pickup
Typically you have a variable called interactable that you set
wouldn't it not drop it if my linetrace hits some other object while im holding something?
Probably want a variable stored on your character of the object currently holding
So on the pickup function add a input of your character and in the event from the input set a variable on character called picked up item or something and set that as self
you can probably just use a tag also, no?
Then on the input action to drop get that picked up item variable and just detach it there
would this work?
I believe so but I can't see the whole picture
Don't think you really need a interface function for the drop. And I'd do a is valid for the hold item at the beginning of the inputaction
Is this a good place to ask a question about blueprints?
Well, given the name of the channel is #blueprint , probably
okay this seems to be the place. So I have a mechanic that allows me to swap characters on the fly (think Genshin i guess). To do so, I spawn the character actor, possess it, then destroy the old one.
However, when the new character spawns, any movement button im pressing isn't registered and needs to be repressed. Is there a way to "reset" the enhanced input actions so the movement is a bit smoother on swap?
is there a better way to do the swap?
Like you want buttons that are already held down to keep firing or what
"triggered" only happens when the button is pressed. it doesnt check to see if the button is down. so spawning the charcter while the button is down bypasses that initial check?
Probably would have the change the trigger type in the IA itself but not sure it would work when possessing a new pawn
Anyone know how to make a smooth transition when picking up an item instead of the insta snap that attach component to component does? I tried using a lerp before attach component to component but the main problem is if i dont stand still and i pick something up and then keep moving my camera around while the lerp is happening it wont be able to make it to the correct spot in time and will snap at the end anyways.
Well it probably flushes input, especially if your input is in the character and not somewhere like the player controller
Show how you're lerping?
how would i...not flush that input?
its a bit messy, but this is how it is right now
my main goal is to just make the item pickup a smooth transition between the current position of where the item was when i grabbed it to the current position that my item pickup point is on my player which is parented to my camera
and then i attach it to the item pickup point so it follow that point around when im looking around with my camera and moving
Might need to set the location point as a variable where you're lerping to on update
wdym?
like set the item pickup point's location and rotation to a variable?
Do these quality settings influence anything out of the box, or am I expected to get them & pump them into places as variables? Also if they do influence things is there a way to find out what they influence by default?
Or I'd just make your timeline shorter
hmm it still does it when i tried that
my timeline is also only .2 seconds long
there has to be a way to do it, cause tons of other games have a feature like that, but im just not sure how to do it
uh im not sure how to describe it exactly, but if i pick it up and stand still it goes to the location correctly and then attaches to the location
but if i move my camera or my player around, its like the location is running away while the object is trying to lerp to it, so it doesn't fully make it to the exact spot that it is going to attach to, which makes it look like it snaps a bit
Time line are for fixed things. If you plan to change the location on the fly , eg pick up then rotate your character then you don't want to use time line.
The value must be fixed otherwise you will not get the desired result
Is it normal that Parent's BeginPlay always gets called when a Child is spawned?
So for your case, forget about timeline all together and just interp on tick
If you don't override it then sure
Hm thats kinda weird
Its Parent -> Child -> Parent with this setup
thats kinda counter intuitive for me
You seems to have multiple instance
The one in the middle is the child bp
It first print child
Then it print parent (the top bit)
Quick question. I'm creating a class-system for my game where characters can pick up and remove classes almost at will, at runtime. I was thinking of doing this via actor components that could be attached to a base character BP when they pick up classes. Is there a better, easier, or more efficient way to do this?
I am using the Gameplay Ability System and it needs to be replicated for multiplayer. Mostly working with BP with basic C++ knowledge. Enough to implement GAS...
Any input would be helpful.
The one at the very bottom probably got printed by some actor that is derived by the parent class in the world
Test with empty level and drop child to the scene
hm I'll try to print names
I'm a dumdum
and for Dummy I don't call Parent:BeginPlay so its not overriden and therefor is called, right?
Use append string
Anyway Ur hero chiller us the child
It print child first then the parent
Ok so no confusion is here
but there is a problem still
Custom Events for some reason are not getting called if they are called from Parent:BeginPlay
they were Private so I figured that might be an issue, but still no call with Public
Debug, break point
Make sure u drop the right actor
Only have the instance that you are testing to the world
Hi, I have a rotating platform with chaos using a timeline but every time I step on it it's glitching does anyone know what could be the cause of this and how to fix it?
I have the same thing on non-chaos platform and it doesn't do this glitch
I set it to Kinematic and it did fix the glitching but it will not break at all even if I put it back to Dynamic on runtime
It is super weird behavior. For Dummy unit it works as intended, both functions are getting called. But for Chiller the custom event is completely ignored
nvm, fixed
turns out if you create a Custom Event in Child with identical name, it overwrites Parent's custom event
makes perfect sense, but won't know until you know I guess
guess gotta add Prefixes to custom events if I want to use them for OOP stuff
If youโre adding the mapping context to the new char, thereโs an Options struct pin you can break to get options like force immediately, you can try those. Otherwise ask in #enhanced-input-system
I have been looking at layer blend per bone but I don't understand what is blend weight and blend depth? Also how does it know that it needs to blend the part above the bone and not below the bone?
Part of Animation blueprint
Hi!
Is there a way to get the polar coordinates where the player clicked?
Thanks!
I've read that I can do it using a line trace by object setting a distance and I will get the location on the hit, but I won't hit any object.
Get hit result under cursor works in most scenarios
I'm building a spline based spawner for street lights. I'm handling the mesh spawning inside a constructor for streetLamps, and I need to attach BP_streetLight to a socket (socket: streetLight) in event graph via a custom event. I'm storing all of my streetLamps (Static mesh) inside an LampsArray array. I'm having difficulties with figuring out how to get this to work when I'm working with multiple elements from an array and not a single component (because they are not a component of my bp_streetlights). This took me like 5 minutes to write but I feel like I'm not explaining it right.
I don't understand how I can reference a socket from each static mesh in the array, and then connect an actor to it.
Which one? I think if I don't click on anything it won't get any hit result.
The one you want to use. Whether youโre tracing by channel or looking for objects, itโs pretty self-explanatory
Could you help me too?
Idk enough about #animation
.
Ok
Yeah I donโt rly understand what you mean either but based on the error in your screenshot, it looks like youโre trying to attach an actor to a static mesh
yeah.
I'm using this to spawn static meshes along the spline: https://blueprintue.com/blueprint/isfviebb/
it is done in the constructor, but in the event graph I want to attach an actor to each of the meshes from an array
I tried that, had issues with them appearing in the editor (only appeared at runtime) which was problematic
Ah youโre doing this stuff on construct?
yeah :/
BPUE is very difficult to view on mobile
Does it have to be on construct rather than like begin play ?
yeah because it will not appear in the editor if it's not in construct
I'm spawning them along the spline
Oh right you want editor time
So, are you trying to procedurally attach lights to the poles ?
I don't know what procedurally means in this context, but I want to iterate over array of streetLamps and attach BP_StreetLight to StreetLight socket
Programmatically
I'm tempted to just drop it and place the lamps by hand in the level ๐
Or dynamically, that is. As opposed to manual placing
yeah, that's what I'm trying to do
So I get that youโre spawning meshes along the spline
But afaik anything you place in the world whether by hand or dynamically gets wrapped into a container actor
So those lamps youโre generating are not components per se
In outliner it should show them as Static Mesh Actor or such
Point being try using attach actor to actor
they aren't actors either I think
They should be once they exist in the world
I mean they are not visible in the outliner at runtime, just the spline BP that spawns them
Oh
yeah..
no worries, thanks for tyring to help
I need to figure out how to do it differently
unless i just sacrifice being able to see the lamps in the editor
and spawn the entire streetlamp BP
which seems to be the only available option
Maybe you could use #pcg-framework for this stuff
Those methods doesn't work for me because I'm not hitting anything. Thanks.
Hello! I was wondering, is using an interface by definition better than doing a cast? ๐ค
yes
No
Different tool for different job
You don't use interface to replace casting
That's mostly perpetuated by blueprint youtubers that doesn't know what they are talking about.
Hi all.
I am not sure what is happening. I have been trying to solve this for 2 hours now.
I am creating a BP "ball" pawn.
The problem is not about movement speed i.e. IA_Move (it works fine, no issues) but the visual rotation.
It visually rotates very fast.
I set up a "Set Physics Angular Velocity in Radians" and attached a Float Variable "Max Angular Velocity" and set it to 10.
But it did not have the desired effect. Um, help? lol I am doing something wrong but I am not sure what I am doing wrong.
So I'm thinking between using Generic interface for situation like this.
Depending on what actor I have selected I want to do different things with the same key. Doing it like above would work, but doesn't it kill the idea of Enhanced Input Action like there should be different IA_SetMoveLocation (for unit) and IA_SetRallyPoint(for building)?
I guess I should use context switching here because then if I let user change the hotkey bindings, then he will change RightMouseClick and suddenly it will change for 6 things.
**So the problem is because I'm using generic interfaces for selection, I don't really know what was selected. Should I then call from the Selected Actor back to Player Controller so it sets mapping context from there? Is this viable solution? **
Or should I just send back maybe Enum of type that was selected, and based on that inside Player Controller switch / add / remove context mappings?
Like in the Resource there is event Select This and at the end it calls Get Player Controller, input mapping, add input mapping, and on deselect it would remove that mapping. Makes sense?
Adding to what Cold said, casting is an important part of OOP so if you're not using it you're going to make your life a lot harder. Interfaces are for when you have multiple classes that don't have a common parent but need to have/share the same functions. If you're using good hierarchy, you won't actually run into many instances where you need to use interfaces.
The thing you are calling the interaction on can handle adding and removing input mappings if needed. The issue you'll have is when you have multiple actors fighting for what ICM should be applied. Some of which might not be compatible.
Some devs don't actually use interface all together. Just make use of inheritance or components.
I would personally use interface for some specific task but anything bigger than a few lines I would probably use component
Fortunately it's made so you can either select only 1 building or 1 resource or multiple units, but you cannot add them.
^This is inside Actor that can be selected. Do you think it's viable for this actor to handle that job, or the actor should just send info to Player Controller and Player Controller should to the job of switching. Or this is just creating not needed additional steps?
Additionally if you click anything else than what you have selected, I call Deselect on that thing, and inside Deselect there is Remove Mapping Context.
You could probably handle it on the 'Add Selected Actor' function and pass a 'Desired ICM' to it as well. Then it can decide the appropriate ICM it should be using based on what is selected.
The only problem I have is with removing these ICM, because if I have 3 IMC like: IMC_SelectedUnit, IMC_SelectedBuilding, IMC_SelectedResource then it get's ''problematic'', because each time I want to use 1 of them, I have to either remove 2 of them (or just make sure they are not working), either change priority of one to 1 and the rest to 0. Since I already use even more IMC, I cannot just easily ''clear all mappings''. I wish there was Return after Adding Mapping Context so you can promote it t variable. Or maybe this is just the way of handling these.
Hey guys, somebody may explain me what is the difference between "Radius" and "Acceptance radius"?๐
Thanks
First one is the radius where you want this node to look for random location. It basically looks for random vector inside circle with radius you specify.
The other one, is when you send unit to some location, this is basically a margin that you set for unit so it can say, ''okay I think I arrived'' so it doesn't need to click the location with a 0.01 precision. As soon as it get's in radius of location it will call I arrived. If you set it to 0, then it will try to get exactly into set location.
Hey Guys I need a help in an issue I am facing.
I am spawning the niagara system that is of smoke and then destroying the same niagara system but its not destroying. I have used destroy component node.
PING ME WHEN REPLY
THANKS
Thank youโจ
Did you try deactivate node instead of destroy component?
Yes its also not deactivating the component
and did you set inside the template that it can be destroyed / deactivated in the settings?
try setting Auto Destroy on Spawn System Attched
Okay
let me check it
Its not working
I think I need to create a component and inside that component I will self destroy it.
Yeah try to add like invisible sphere, attach system to it and destroy the sphere
I think I'm doing it like this
Is cm the unit of measurement of the radius?
It's the same scale that you have in like any vector etc.
Is Destroying an Actor, then Spawning it From Class and setting its variables from a save slot later a good way of Loading/Unloading actors?
Or is this a very dumb way?
If it's just 1 actor every time it may not be problem, but if there is a lot of actors you may thinkg about Object Pooling https://www.youtube.com/watch?v=f797l7YTcgc&ab_channel=AliElzoheiry
The Object PoolPattern:
Software Design Patterns are like a guide on how to write good code, whether you're using Blueprints or C++, knowing good software practices is a MUST!
This video goes over the Object Pool Pattern which is used to optimize performance and memory by reusing objects in your game.
Download the project files and support my ...
I'm need a system for loading/unloading a world generated at runtime
And from what I read World Partition doesn't work with that
I'm not sure if this is the right place to ask this, but when using a physics constraint that limits something to move on just a single axis, is it possible to absolutely lock all other axis, even if they receive some kind of force?
For example, as these suspension/wheel components fall downwards and the wheels collide, they easily roll along each other and the suspension shafts tilt to accommodate for the lateral force, even though the x/y axis are locked on the physics constraint.
(The physics constraint only allows movement on the suspensions Z axis, and I have the actor locked for Z axis movement just so they don't fall over)
When you say world generated at runtime, is this procedural generation? Or just spawning items/objects scattered about?
I seem to have a bit of problem with add mapping context, the thing is on the first playthrough after I open Unreal 5 Engine it always hangs for few bit of frames but after that it runs smoothly even after I rerun the whole playthrough can anyone help me with this, I have a bit of guess why is this happening but I am not sure this is the reason I maybe wrong but I think it has to got be with how Unreal 5 creates cache for the play through
Both
Procedural mesh generated once
And buildings built by player
I wouldn't recommend doing fully procedural generation with BP. You'll struggle just to keep the game running above 30fps without multi-threading.
Is there a way to do async code on blueprint?
I already have that part finished
It runs fine
But having said that, you first need to chunk up your world (you can use uobjects for this) that manage the actors/meshes for that specific chunk. You can then have this spawn all the relevant actors where it needs to when requested. You can look at reusing actors if possible (and update values and move) if other chunks are being unloaded.
The biggest issue is that the forloop (and for each loop) are pretty slow in BP so when you're looping through 10,000s of data entries it'll tank you're game thread especially when you're spawning actors as well.
Other things you can look at is spreading it across ticks so instead of handling all the data in one go, you do x amount each tick until complete.
Asking because when using async load [whatever asset] there is 2 different execute pins, and I was wondering if the one at the end of the "completed" pin would somehow act as a separate thread
I don't believe so. Other than specific functions that epic has setup to be async, there isn't anyway out of the box to async with just BP.
Alright, thanks for the answer, gotta start grinding the C++ tutorials
I feel pretty dumb now lmao
Pooling is the way for me
Many thanks
I wouldn't feel dumb, procedural generation isn't an easy thing to do. There's so many moving parts its far too easy to overlook something. ๐
is there an easy way of getting names of the days of the week?
Does anyone know how I can turn the player and change their velocity to the direction I turned them? I currently do this when I jump to the side. I take the rotation of the camera to get what direction the player is looking when they intend to jump. Then I can take that rotation to set the players rotation when the jump is over. The issue is that when the player lands they keep their velocity they had when they initially jumped. So if your going north and jump west, then your velocity will still be north. But I want it to be that if the player goes north and jumps west then the direction should be west.
Calling an interface function to do an identical task is also slower than a cast.
I still need help overriding variables set in a blueprint actors construction script in sequencer, so I can render it out using MRQ....
If you have any idea, pleas let me know.
Iยดve been trying to figure this out for weeks and I keep going back and forth because nothing consistently works...
https://discord.com/channels/187217643009212416/1243693045925412875
Hey
I know it is not ideal, but do you guys foresee me running into issues if I use a Map like this?
"This" meaning using a BP as the Key, and a Struct as the Value?
I can't include the BP when I define the Struct in CPP (guessing it is not created at that point), so thought I can maybe get around it like this?
just create array with text/names and add it manually
hey i need help
i create a ball
and i create some walls around him
and i add physics material and i have a problem
i dont want the ball to change is velocity
and if the ball hit the wall so all good but if i hit the wall from a little angle so the velocity change
if the ball hit where the blue arrow so all good
but if the ball hit where the red arrow so the velocity change
The problem isnt the directiob
the problem is the speed, if the ball hit on the Red arrow in the angle with the paddle so the speed change and its miuch slower then the original one
I need help to make a simple gathering and inventory system for a 2D game (it needed to make a crafting system), I tried some from Youtube but the closest I got to want i wanted was for a first person view system and it wouldn't pick or even destroy the item, any help, or a different video would help, thank you in advance
Anyone happen to know if there is anything that functions similar to a SplineMeshComponent? EG the ability to bend a plane along a spline. Running into an issue where I need to create a lot of them, and they're incredibly bad for performance. Trying to consider alternatives that don't make me create a dynamic mesh. But I might need to resort to that. ๐ฆ
Has anyone had issues where Unreal randomly corrupts function calls / structs? I wrote this a month ago, and now every time I restart the editor it corrupts these two nodes & I have to recreate them manually to get it to compile
Is that a BP struct?
beat me to it :P
If yes, your issue is 99% likely to be circular dependency issues.
If it's C++ defined, you have a module loading out of order somehow.
I think it's a C++ struct -- it's from Epic's merge mesh plugin. Both it and the Merge Meshes node are
I would throw a wager that the load order of the plugin is off somehow. IE something is causing this BP to load before that plugin has a chance to. Thus no function/struct is defined and it errors out. But by the time you open the BP and go to add the function again, it's available and ready.
Hello, maybe simple question: Is there a way to get a player index (integer) from a player controller?
Why?
Not really and you never should.
You can just get the controlled pawn
The player index is highly dependent on context
maybe u can tell us what exactly u need it for?
Hey guys! Can someone give a hint, is there any possibility to unlock mouse from game window in packaged game? I'm running windowed VR preview, but on every startup, mouse locks inside the window and will not go anywhere, window border blocks mouse cursor
I asked this in the general chat but, how do I reference a variable in my character blueprint, to my widget blueprint. I know its basic stuff lol but im new.
So I'm trying to set a stamina bar to disappear when stamina is full, and reappear when it's under max. I just don't know how to get the stamina value over to my widget blueprint.
Also I was told I should be using playerstate and gamestate for this, but I'm not sure what that means or why it's more effective than just regular variables.
Are you familiar with pass by ref?
Unfortunately I'm not familiar with anything blueprint related. I just started on ue about a week ago, and have just been copy/pasting tutorials so far lol.
So when you make a function, you can click the down arrow on the inputs/outputs to have that variable "pass by reference"
that means that if you modify that variable inside the function, it will affect the outside variable, which I think is what you want?
Oh I see, you're asking about something else
if this widget is supposed to be the player of the screen
Owning Player is a thing in widget
you can get pawn straight away, or if pawn changes, you can use on pawn changed delegate
I just need to read the value of a variable in my character bp, I imagine just "get stamina" or something. But I just didn't know how to get that value onto my widget bp.
lAsaka provided you with a good answer, I feel
If you'd like something more in depth, this tutorial seemed fine: https://www.youtube.com/watch?v=vO1i9Wcx4Xc
In this Unreal Engine 5 Health and Damage System tutorial, we'll learn how to create a health and damage system for our game. We'll use the Health bar and damage system to show the effects of injuries and damage on our character.
If you're interested in learning how to create a health and damage system for your game, then watch this tutorial! W...
hey folks, has anyone ever seen this minimap problem? If I load a level via another level, the minimap wont send the character arrow to the right place nor move the hotspots (made them with targetpoints), but if I open the level individually, it works fine, whats up with that?
I'm not familiar with whatever system you're using
i guess ure just nor updating the location properly?
hey do i need to do something special to use a Gamepad controller while using UE ??
hey, is there a way to have the drag and drop operation blueprint not consume all other events on the level? Currently trying to get the user to be able to drag a card onto a object in the world but the event "On begin cursor over" doesn't fire if the user is dragging a card
weird, why it updates fine if the level is opened individually and not via another level? I tried adding a couple delays but nope
that depends on where you run your code i guess
Hi peoples!
I can not understand, on 5.3 version of UnrealEngine everything was fine, went to 5.4.2 causes [2024.07.03-16.36.35:288][ 12]LogNet: Server connection received: ActorChannelFailure 23 [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 192.168.100. 133:57918, Name: IpConnection_2147482439, Driver: Name:GameNetDriver Def:GameNetDriver IpNetDriver_2147482518, IsServer: YES, PC: PC_x_C_2147482433, Owner: PC_x_C_2147482433, UniqueId: NULL: DESKTOP-8GKNTV9-78C48C504D3E1014EED61E98A983F4F5 and does not allow to connect to the server, if in spawn actor by class I specify spectator everything loads fine, but if I specify BP_playerCharacter everything is bad.
hey all! - i'm trying to switch my player character's sword's material once it gets hit by a niagara effect during an anim montage, but how can i reference the sword when it's a separate BP that gets called by my player?
Hello Guys, i m making a little Multiplayer game, is Race car game, i would like how i can make that matches are made on server and not hosted by player, i ve tested it by hosting with players lobby, but i would like how to make marches on servers, so all players can join, how can i achieve it? Thank you, do u have some tutorials or docs?*
Promote the sword to a variable when you spawn it out of the return node. U can now reference the sword with that variable
If a player hosts a server they become the host/server. This is p2p and the most common hosting setup for small games.
@narrow igloo
Any player who hosts a server should be able to be joined by other players.
aaaaa so simple but so effective!! thank you
Hi all, this code only destroys every second fence (all of them are children of fence root object). Any ideas why that could be?
Txh a lot! i have achieved this but i would like to get "custom servers" like "big games", how can i get it?
Reverse loop.
Thx
The next level of hosting would be a dedicated server. This would enable games to be hosted more efficiently around the world. There's a lot of solutions for this. They pretty much all cost money, but if you want to test this you can run a dedicated server on your own pc. The real test would be to get a hosting subscription and clone your repository on the remote server.
Theres some good long tutorials on this on YouTube. Ide recomend finding a good 2 hour video that goes into all the details.
Oh yes No problem to watch 2 hours video, i have also experience with AWS etc... can u link me some videos? if u know them?
Hello, if you are familiar with Robloxโs camera system where you are only able to move the camera around when you hold down RMB, additionally when you hold down RMB the cursor stays in the place while you are holding down RMB. I am trying to replicate this in unreal, and Iโm running into problems with the mouse staying still while the players holds RMB.
Don't have any off the top of my head, but there's a lot to pick from. You can also talk to chat gpt to get a rough overview of the details for free.
And it can talk in any language
Oh okok Thank a lot! my friend, i know LOL, i ll do it!
I must be missing something, haven't done this in a while...
Trying to add a mesh to my splines, nothing coming up in asset browser, even though everything checked...
Assets come up in other bps ๐ค
Do I have to create a spline mesh for it to show up?
I don't remember doing that before, but memory can't be trusted
Thanks in advance!!
Splines don't display meshes. SplineMeshComponent does.
How do i manually set an end location for a randomized spline like this? idk why i'm drawing a blank. but instead of just having a general direction, i want the points to be linked between two specific points
Some advice. Don't.
You'll need C++, a source built version of the engine, and a lot of money
It is not. Listen servers are still client-server model, not p2p
Cheers, I literally just now added a Spline Mesh Component to test!
The mesh browser should be eliminated then for splines, it's confusing and misleading ๐ค
Oh, my bad.
I think of them similarly since any client can creat a server.
I know p2p is the least secure
Listen servers are also quite insecure. Though a dedicated server on the player's machine is equally insecure :P
Yeah, anyone that really wants to dedos can probably do it.
I Donโt Know depending on what your doing p2p is most secure haha. For games no donโt do it ๐
People make it a game to get into the back door of hosted software and see what they can tinkor with. Actually some hackers feel like it's their duty to "test" security when it comes to public user data.
Hence why in some cases P2P is most secure
But yeah hacker have all kinds of
Motives
Thank also to u, yeah i know about C++, i am enough experienced programmer out of videogames, i am improving my Unreal Skills by doing some projects, i ' ve found little things about Custom server, i also now that running servers on player's machine is not secure i know about authority validation etc...
You find little things because its generally a bad idea. The games involving them are hard and expensive, and often times you'll be burning money without a team and funding
Realistically though. It's not hard.
You set a server map in the config. You cook a dedicated server. You launch said server how you need.
Oh no, setting it up is not hard. Just generally speaking the game attached is. Those official game servers often spell things like competitive multiplayer which is expensive and hard, as that's the most common use.
Shipping community servers is a great thing more games could do though
Could someone explain to me the use cases of soft references and loading them. When and what do I need to soft reference, and when do I need to load them? What are the conditions that cause them to stay loaded in memory?
So. You have an inventory widget.
You have 3,721 items in your game. You don't really want to keep 3,721 textures loaded at all times.
So when you show items you async load the softref. It returns immediate if it's loaded, else it returns when it's done loading from disk.
When it's done loading, you set it as the texture in the Image widget which places it in a hard pointer within the Image widget. Once you remove the widget and the widget is collected, it is no longer around to hard ref the texture and thus leaves it free to be collected as well.
You can apply the same thought to like an avatar customizer. EG something like Fortnite or similar games. The player character is identical and generic, but skins are used. You don't want to load every single skin in the game if there are thousands and only 100 players.
Ahhhh, It makes sense to a point.. so is it mostly just a widget thing? Or are soft references recommended as often as possible?
I've only ever seen it referenced when talking about data assets and loading data, which is all recent info for me, so I'm confused.
Hey everyone!
How can I create objects from a Data Asset blueprint at runtime?
I have a Data Asset derived from PrimaryDataAsset, called DA_TankGameplayData, and I would like to create at runtime 4 objects from this base Data Asset and start assigning data and using the Functions inside said data assets.
How could I achieve this?
Use a construction script to pull the information from the data asset, and set the variables on your actor blueprint.
"Get Timer Elapsed Time by Handle" Always give me 0 as result what am I doing wrong?
But, I want to create them at runtime first.
Just as you use the node SpawnActorFromClass, I want to create more data assets from this one (image). Is there a node for that?
Then have an event on play that pulls the information from data assets, and have it set the information on the actor blueprint.. data assets shouldn't be edited at runtime..
if you need information to change, then have a structure with the data asset reference and the modifiable variable, and load both as a component to the blueprint in need of this feature. Base your logic around this knowledge, using what you need from the data asset, and what you need from the variable in question to get your result. You can edit data tables, but it's recommended you don't.
errr data assets
you cant edit data tables.
question about box trace:
how in the world is the hit registering below the box shape? shouldn't it be limited to the shape of the box?
this only happens when the character is close to the box. the trace is set to ignore self
It's not a widget thing. It's an asset thing. Static Meshes, Particles, Textures, etc. These are all heavy assets that require time to load from disk and take up memory to keep resident for immediate access. Sounds are too, but most sound systems handle it internally already.
Does anyone know what the hell is wrong with 5.4 and post process components acting all batshit crazy? I add a post process material, remove it and the post process material is still applied even though it's gone from my post process volume component. Refreshing, compiling, reloading doesn't work....
I found a good tutorial on it, watching now. All makes sense now. Memory management seems to be sorely overlooked in online tutorials. After four years of unreal Iโm finally learning about it. Thanks for the insight
I don't know about run time but you can editor time. Not that you should tho
You canโt, Iโm pretty sure. It could cause catastrophic failures.. even changing data tables at an editor level sounds risky, if youโre adding or subtracting from the structures.
At least thatโs what Iโve gathered over the last few days. Could be wrong.
can anyone help me? i'm trying to make a card game like heartstone, here i wanna click on an actor and if its in your team, you will select it, if you than click on an enemy actor i want them to deal damage to each other.
i am having issues with replications i believe. sometimes the damage doesnt come trough.
this will trigger when a user clicks on the hitbox with his mouse on the spawned actor
this is in the player controller, i'm not sure if thats the best spot for it.. but its there now, happy to move it
double checking if anyone has a solution for this or if just no one noticed it
is the new gravity system in unreal 5.4 replicated???https://dev.epicgames.com/community/learning/tutorials/w6l7/unreal-engine-custom-gravity-in-ue-5-4
anyone know?
You can in editor time, just need to get the struct handle by reference. Kinda useful to initialise data that is based on the world or to bulk update the DT
Not sure, but i'm guessing a clamp
sorry, i meant you cant edit datatables at runtime. some tutorial made it sound like editing dt's at an editor level could brick your project. Thought that was kind of weird and concerning.
In 3 years of Unreal Engine I havent used a single datatable
it's got it's uses, but data assets seem to be the way to go.
I've been coding RPGs since the late 90s, in various formats, and DT's have always been kind of a weird concept for OOP.
You either use data assets or data table. If you don't use either, you probably are not making a very scalable game.
Most games I see are data driven
To this point, I never needed them
All projects that I see made use of DT or DA.
Wanna change the A.I name? Hp? Damage?
Want to create new A.I?
DT or DA it is.
If you hardcode them then you are just beta coder.
If your game is simple enough to not need data driven programming, then yeah, but if you ever plan on making games of any real complexity, you might want to consider it for your workflow.
Anyone?
๐
I'm not sure Greamos. I looked, but I assume it has something to do with the replication.
Read the pinned source if you can't do basic replication or rpcs #multiplayer
Atleast cheaters need more time to find out what the hell I even wrote
Because sometimes I am perplexed by my own code
I don't think so, but not that I know anything about hacking
Ppl can just use the cheat engine and look at some memory
"In order to confuse others, you must first confuse yourself"
That is a very very bad way of looking at programming. lol
Defending against cheater for single player game is useless
And if your multiplayer game runs on listen server, you are wasting your time as well
Making code you can't understand later down the road is the killer of so many projects.
can't hack a game that isn't released
It actually works as intended
thats not how that works hehe ๐
they use injection its not like reading code
It won't even matter if you scramble with spaghetti somehow.
With cheat engine, just do a memory look up. Find the hp memory address and change it to 999999
"The" hp memory address. Are you talking about just one?
The game instance run in your machine
You can do what ever you want with it
Change any memory you like
That's why defending in single player game is useless
They won't find the right "Health" variable . Just changing one could break the game, but it would damage the instance more than the server
yeah they would lol
When testing netmode is there any possible way to delay the startup of the 2nd client instead of both clients starting on the same time?
Among the 40?
Yep because they can watch what values are changing and how
for multiplayer the server instance is authority, idk how you care about health manipulation on the client at all
In multiplayer game client value doesn't mean much if it's server authoritated.
But then the listen server can still cheat as it hold the truth
then add whatever they want
only multiplayer cheats that you may want to detect are aimbots and exploits of server bugs
I use dedicated servers
Of course this one has an Anti cheat
K but my statement was single player and listen server
Good for you
Honestly, I find dedicated servers for PvP just better
because they are
But they cost money
and?
Games like DRG can use listen servers because it's people vs machines
Nothing, if I have money I do love to use dedicated server
And even make my own backend
don't make MP if you can't afford dedicated servers...
But as a solo dev with no certainty that the game will sell. I will go with the safer route
P2P games are the worst in every regard
I think it highly depends what kinda game you are playing
I'm doing PVe casual game with no regards to cheaters
if your making a party game
who cares if its a listen server
If you want a competitive shooter then yeah listen servers are....problematic XD
anything with public lobbys is problematic
With a PvP shooter I really have to worry about the server type. Depends on how casual or competitive it gets
I think multiplayer is kinda important skill to have, im just learning because most of the job boards require networking knowledge
with p2p you also expose your players to the risk of getting hacked because you remove one layer of security
i think even GTA had several remote code execution bugs
Yea if the game is not connected to backend or authorised dedicated server, I wouldn't bother dealing with cheaters
Well yeah if your players control the server then of course
I find that especially dangerous because I have no idea how much malicious stuff you can send by exploiting UE5
I dont want a GMod-type disaster
ofc you can
where
Deep Rock Galactic : Exists
listen server and steam
listen server IS p2p
no it is not
it is
The model is server to client still
Unreal is Client-Auithoritative
no it isnt
I think we are talking about different p2p
yes
unreal is ALWAYS client to server
Both are the same rank?
and?
not they are different
the server runs on someones machine
Right
so it's P2P concept
Isn't that like a Lan party?
no lol
they are just seperate tasks
Yea in terms of hosting
When testing netmode is there any possible way to delay the startup of the 2nd client instead of both clients starting on the same time?
A listen server has a client AND server
on the same machine
a p2p
would be client only
and you connect to the client
P2p networks is peer to peer. Client talking to other client. That's not supported out of the box
p2p would be a splitscreen, technically. Or a Lan-Party
Unreal is server to client model out of the box
again no
unreal does not do p2p out of the box
dude
split screen is local multiplayer
if your server code runs on the client
and has exploits
then it will be executed on the client who runs the server
so the P2P problems apply
it is
yes if you use a listen server
from a network point of view
How can two clients interact. Atleast one needs to serve as the host
no its not
because one client has a seperate server instance
your not talking to the client
your talking to the server that happens to be on the same machine as the client
but you are talking to that machine
You are talking to server
not the client instance
That sound like a listen server but with personality issues
Client can't directly communicate with other client
that's totally irrelevant
no it isnt
it is
its exactly the point
and the key difference that seperates this from not being p2p
Hello, if you are familiar with Robloxโs camera system where you are only able to move the camera around when you hold down RMB, additionally when you hold down RMB the cursor stays in the place while you are holding down RMB. I am trying to replicate this in unreal, and Iโm running into problems with the mouse staying still while the players holds RMB.
Roblox has soo many games
name me one game with a true P2P implementation where each client talks to another without a server instance
in context of games P2P, is one client running a server instance
you need to read docs
show me where you can do p2p in unreal
im not gonna continue to clutter this channel with this XD
I only play mainstream game so dunnoe
Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the network, forming a peer-to-peer network of nodes.
Peers make a portion of their resources, such as processing power, disk storage, or network bandwidth...
do you see the 2 images on the top right?
both DONT apply to games
doesnt look like an unreal doc t o me
That's why we said p2p is not supported out of the box in unreal
which unreal does not do
But there are people making gamed out there p2p without central authority
while bottom left is the server AND client
That looks like server client model to me
it's not
K maybe I'm wrong
where's the server?
Bottom left comp?
what happens if it has an exploit with RCE?
then the client who runs it might be fu**ed
If a client can talk to another client without central figures, that's already p2p
oh, so now it's P2P
We not talking about securities or exploits tho
And that's what p2p lack. A central authority
Hello, I got a question about BPs that I cant figure out
I got this interaction set up as usual, but i have this large delay between interactions when that comes from the branch. How can i reduce that delay? - removing it ruins the rotation animation
I have an actor that should produce items if a item is in his "inventar" is this only possible with a check on event tick?
no
whatever handles your item inserts could check for that specific item
and either register the tick event for that actor, or start a timer
and when that item get's extracted you do the opposite and unregister tick/timer
Is this type of camera system possible to recreate within ue5
If so how?
my actual plan is to make a widget which I create on Interaction, set the interacting actor ref as variable and then display Input and "output" of this actor
so I trigger the production event if I add the item, set timer and after timer is over I can recheck is there another item an so on, if no more item is there the timer loop ends?
that would be one way to handle it, yea
I need some help ๐
I have 10 actions on the building. 1-5 produce unit 6-10 do something.
The first ones 1-5 can change to Upgrade something (like technology).
I was thinking about making it like this:
Event for Action1:
Get selected actor (0) because it's building it's gonna be always 1.
Interface: Handle Commander Action.
Now inside Building Iwould first switch between type of building with tag, and then handle these 10 events indyvidually with functions. Any feedback?
would you mind helping me create it?
YouTube can explain it better than me
I literally canโt find help or a tutorial anywhere
You can set your input mode to UI and Game
When you left click you can drag to rotate your camera. That's already the default at least for tps
Only issue is your cursor will be consumed eg invisible.
It serves my purpose tho so ๐คทโโ๏ธ
donโt want that
What do you mean? I thought it's controlled by a boolean if it's visible or not
When using UI and Game, when clicking with the mouse and you are not clicking on any UI. It will try to switch to game mode which hide the cursor
Hey, can someone please explain why this happens? I'm setting a variable inside the construction script, which works. But when I make a child blueprint, the variable is not set
Open 3rd person template project
Are you calling to parent inside that construction script?
yea, all the logic runs but the variables are not set
Can you show how it looks like and what you exactly mean? Like when you spawn child it has no default values from parent or ?
So I'm just setting a variable inside the construction script of the parent, and then the child calls the parents constructor
all the logic runs like it should but the parent has a changed variable when I make an instance of it but the child instances dont
You can show a bit more, it's easier do judge (name of bp, what variable you connect to Wheel Amount)
oh wrong image but yea it's 0 on the rigth
What value do you pass from for the wheel?
Show larger picture..
It's soo inconveniently cropped
It's a guess game
yea sure, here's the parent constructor and the function SplineConstr which it calls
mbmb
well you are setting it here to 0
This is incorrect. P2P in games still refers to the underlying network in which each player establishes a connection to all other players and there is no central authority of the state of the game. Instead, the state of the game is shared among all computers, each running their own instance and communicating what they're doing to the game world so others can duplicate it on their end. In this kind of system, you can have players join and drop out randomly from the game and the game can still keep on running so long as any single player keeps that particular game "alive".
An example of this is Diablo 1. You did use Battle.Net to make connections to find games and connect with other players but the games themselves were peer to peer. So if I started up a game, and you joined me, and then I left, the game would still be active because you're playing in it still and when others would join, you'd send them the game state - if you left after someone else joined, the game would still be active. There is no "central authority" of the game running at all, just each copy of the game running as it thinks it should and stating what they've done to the state. You could very easily cheat in Diablo 1 and there were no repercussions as your player data was stored locally anyway. This is why P2P is not used much any more, it's easy to cheat and ruin games.
The Client-Server model is where you have a single authority of the game state. Clients only communicate to the server and cannot communicate directly with eachother as a connection is only established to the server. Unreal only utilizes clinet-server for its networking model, whether it is running as a dedicated server or as a listen server, the server is the single authority of the game state, regardless if there is player playing on the instance (listen server) or not (dedicated server). If the host or server is shut down, the game is "finished" and players cannot continue playing.
if the for loop only runs once, but the spline it creates has multiple spline points which means it runs more than once
I tried the same thing with just setting a bool to true instead of the wheel amount and the same thing happend
I'm trying to throw the item in the inventory to the chest with the shortcut, but I'm stuck in this part.I can send items from the inventory to the chest, but I can't send items from the chest to the inventory.How can I solve it.The function called Add Item allows me to spawn items to the empty slot.
This bool is false in the child and true in the parent
It creates multiple points but on completed it's called once.
if you create new child it's the with the boolean?
yea the bool proves that it really isn't about how many times the loop runs or that it is set to 0
is this even construction script or what? if you create fresh child what happens?
can you show screen of wheel amount inside variables on the left after you create new one?
It's inside a function inside the parents constructor script. A fresh child will still not get it updated
sorry I dont get really get that
yea but did you set the default value? I want to set the value inside the constructor, I dont know the amount of wheels beforehand
are you not able to edit the variable in the child then?
thanks for providing an example, wasn't aware of any TRUE p2p games, as you said most games use client<>server model these days, heck some games even run their single player mode based on that ๐
or well, it's supposed to be set automatically, not manually
automatically based on?
based on the amount of wheel bones in the skeletal mesh
It has to work for many diferent meshes
where are you getting number of wheel bones ?
and if you put the child into the game it doesn't work? did you try that?
they are named things like 01_wheel_jnt, 02_wheel_jnt
so I have to do some string fkery
ok, where is the part of this in the code?
haha sry I'll do the full zoom out
and where it is coming from? some mesh?
also it doesn't work if you put it into the game?
I'm having a weird issue, I have it set up so that the player can pick up objects with a physics handle, but if you turn the camera and release the object, it gets launched into the next universe. I've tried a couple of ways to stop it from getting launched so far, but nothing's worked.
the mesh has bones like this and I have to search through them all by name and see how many there are. Then I set the int based on the amount of wheels
I'm following this tutorial about a procedural animation and I can't get it to work well:
https://youtu.be/vKiqs_h1WXM?t=564
in my case, the forward vector of bones are Y, the top vector is Z, the side one is X, I have no clue what is wrong here... Any help would be higly appreciated
Full length course on procedural animation for human characters: https://www.udemy.com/course/procedural-animation/?referralCode=F8D7BF87E66A29B4942D
Discord server centred around procedural animation: https://discord.gg/YaEQ8DZWuv
Free download of the spider model: https://twitter.com/LincolnMargison
More coming soon, subscribe, follow, all ...
it's not gonna update inside editor i think
what is not gonna update?
the values of the variable
but if you put it into the game then it will update
but it will execute code every time you move it 1cm
so you have to set it to 0 before for example
so then if you move it it will always display what supposed to be
Alright, thanks for the help! I'll look more into it tomorrow
Does not work like that
I've tried turning up the object's mass and turning down its max angular velocity, but neither worked.
well, angular velocity is how fast it can spin
if its being launched into the next universe, clamp its max speed
linear velocity*
im not seeing any options for that
i dont even use the normal physics component in my project, but im certain that setting exists somewhere
you could always hack it in the blueprint tick
anyone know why my default map removes all the lighting and floors when I open my project file? it's just the basic thirdperson template map
maybe its a different level? you can specify which level to load by default when you startup the editor, in your project settings
also, check the console output for any warnings or errors
I figured it out, i just turned up the linear damping
it's nothing to do with load order, I don't think. I haven't touched the project settings for anything to do with map loading yet.
All my folders in the world outliner have nothing in them and they have the closed eye symbol next to them, but clicking it doesn't do anything
The errors are only in gameplay related classes, doesn't seem to be anything to do with the map itself
I'm not even sure if this is even related to this channel, this was just the last one I had open in this server
well it looks to me like you somehow saved the level with a bunch of stuff deleted. either that or you have some partitian/level-streaming setup that is crapping things up (but i dont know anything about that topic)
so, an orbit camera? select something in the editor, press f, then hold alt down and drag left mouse -- like that?
tbf it's not too much of an issue seeing as it's only the default template map, I'm just curious as to what could be causing it. Just checked world partition and that doesn't seem to do much, and I know I didn't delete the rest of the other stuff so I'm just gonna create another blank map instead
yea not sure what happened, but it just looks gone to me '-/ good time to enable source control ;D
Yeah I just have my project saved on a USB stick but I should probably get around to setting up a GitHub repo as well
dont bother, just create a local repository, could even be on your usb
I don't know how to do that lmao
begins emailing
should have registered you to the unity newsletter ๐
If you use a local repository can you still see history on your blueprints? And revert/roll back changes?
yes
Huh. Why have I been paying for Plastic SCM for so long?
oh that seems pretty simple tbf. Honestly I don't know why but repos scare me. Messed up a merge 2 hours from the deadline on a game jam and so I've stuck with a USB stick whenever I can. Then again, I don't wanna have to set up a repo after I actually need previous versions.
no idea ;D if its a one man project you dont need someone to host it, asside from you know, protecting against total hard drive failure
not really sure what you mean but yes a orbit camera
yeah that's the main reason I was considering setting up a GitHub repo instead
well if you plan on not sharing your entire project to the world (ie. a public github repo) you do actually have to pay for that
still its not a bad idea
wait you have to pay for private GitHub repo?
yes
i could be out of date, as i havent even had payment info on my github profile in forever
but also dont have any private repos either
anyway there 'could' be a certain amount of private repo that is still free-ish but i wouldnt expect it
yeah I can probably find that out if I'm dead set on private repos when I come to setting one up
I think I'll just go with a local repo for now though
and then I need to figure out how to get physical animations working :/
dangit back to making an actual game ... lammme ;D
well I wouldn't call it a game, moreso a remake of a single game mode because I couldn't be arsed to come up with something of my own when I started it lmao
but yeah I've kinda hit that point where all the fun stuff is done and it's mostly tweaking little things and adding more of what already exists
nice. im at the stage of "theoretically, this math is possible .. stares longer"
I'm dreading the point where I have to do advanced math. Right now I think the most advanced math I have is my health regeneration macro
I think this project I might not need to do much with math, but I know I will if I want something that's a lot more presentable than what I already have
im writing C++ code to simulate a passing-as-realistic aircraft, and the controller steering it to engage a target or fly/circle a point -.-
I'm not sure BP is the thing to be using for "realistic".