#blueprint
1 messages · Page 147 of 1
delay on tick?
we*
which one is more likely? 😄
is ok now?
the former
ya
is default value of test number 0 ?
and also you can rename that to w/e you want
you should always test, not ask if you should 😄
it won't explode, hopefully
you should stop your fortnite match and use your brain
@spark steppe I hope you're keeping track of our current time
yea, 3h
this one's for the record books lol
lmg it worked
ITS WORKING!
:))))))
let me record
you're bugged!
he probably is a video editor and just reverses the video in the middle
advanced trolling 101
Looks like works
good, now I can delete this from my bp for the nth time
ok it looks really like it's working
how you are going to make a whole game?
for resolution, pay someone $499 for a masterclass, learn nothing, give up
basically for resolution is the same think but i have to change it to resolution or :)
we are not gonna do, but you can do by understanding what I gave you and adapting it
yea
he did understand as much as me
if you don't understand, don't feel bad cause Ben was just as confused lol
i turned my brain off when Datura and Baffled posted solutions
tbh, I understand it partly because of all the print string testing I had in there
it helps climb the steps
because you dedicated 3h of your life to this
worth (?)
i dedicated 24h to find the solution of this
i cant imagine at resolution
what i have to do Ș(
:(
make it xbox/playstation exclusive
so you only have one resolution
problem solved
For actor is there a way to get the center of mass? Get actor location targets the pivot point of a static Item which is often the ground...
doesn't sound right
now the great question i have to transform it into the Neo solution
but why not add a component to it and pinpoint that?
well you can get the actor bounds, the origin is the "center" (of the bounds)
but there's also a physics center of mass, which is by default afaik that ^^ but can be adjusted
well pic shows what I am saying the chain lighting hits the base of the actor
it also shows a MASSIVE capsule for some reason
where the center is on the floor
cause half of it is underground
ok I'll try that
but that could be something else idk
Is it guys simple to transform that to Neo Idea?
the capsual is the sphere trace searching for target
I've learned not to argue what Ben says, so even tho it doesn't seem to do that on my end, I say go for the bounds thing
that's the wrong conclussion tho
i'm often enough wrong, too
but wrap int is broken
Thank you that worked
I knew it was broken, just didn't realize it has a DamageOverTime included in that as well lol
what is warp int?
the forbidden node
0o
wrap(int) not warp, Scotty.
So, I am having some trouble with getting skills to work in my project.
What I am wanting to do, is have different child classes of a base class and be able to call methods on the class, without spawning anything in.
I don't want to put them in a function library because that will be messy and they only need to be called once, so I don't need the available globally.
Is there anyway to do this with blueprints or would I need to make something in c++
What defines a skill in this case? Because skills can get really messy, really fast.
It's simply going to be an object of some sort that you can call a function on.
That function will take the player as an input so that you can make the skill take effect.
For example, healing the player, launching them in the air, changing their gravity, maybe spawning in projectiles, that sort of thing
sounds like you have a skill issue 🙃
You can use GAS or make your own GAS system if you want to stay strictly BP. I have A rather expansive GAS system in my free github project https://github.com/LordMaddog/DarkSouls-Like_CombatSystem-UE5
The reason I am wanting to have different obejcts to hold the functions is to keep from having to handle it all in a single location and making the code a mess
there's a plugin for implementing GAS using bp if you're afraid of cpp, though you prly shouldn't be
Ah, alright. I will take a look at it
Yea I Have a base GA that handles all the basics of my skills and I just made children of it.
I'm fine with c++, so it shouldn't be a problem
enjoy. It seems once someone goes GAS, they never go back
Gameplay Ability system. You don't need C++ exact to use the attribute side. But if you know C++ then that's all the better.
The TLDR is that it's just a component that sits on whatever you need to have abilities. Then you make GameplayAbility classes and GiveAbility to the components. And then try to activate them through the component via the class or tags.
Rate my Settings menu guys :(
It's very blue.
sorry if this is the wrong spot, but im having a couple of difficulties i think due to capsule component on character blueprint. For one, it's able to use the curvature of the capsule to step onto surfaces it shouldn't be able to, despite step height set to 0. and second, when jumping and hitting the corner of an object, the character is launched to the side despite no physics set on the character
that's really goood, better than most of us!
do i need to create my own class replacing the capsule component for a box collision or whatever to solve these two things? Ive been reading to change the collision, i'd have to recreate the movement component
i started it 1 week ago
AWWW THANK YOU!
soon i starting with keybinds section
hope it turns out really cool
now i gtg. i cant imagine tommorow
Keep at it. 😄
how it gona turn out
i will anonunce you guys when i finish keybinds section
to rate it 1/10
:D
10/10
:3
awwww
:3
See ya guys
I think for the step up thing, you have to remove the ability for the character to step up on that thing. There's a checkbox for it in most primitives. The launching I'm not sure. Sounds like semi normal air controls. May have to mess with the jumping/falling settings a bit.
Thanks for the input! it's a tile, so im not sure if im able to access those properties on it
will take a look at the air control options and see what i see, thank you!
To answer the other question though. Yes you would have to redo a new movement system to replace the capsule. The Character Movement Component is very assumptive that it has a capsule and a lot of it's code functions as such. Which leads to either a maybe subclass of it in C++ to overrride those functions if they're all virtual. Or a completely new Pawn subclass with it's own hierarchy and movement component code.
yeah i have zero clue about c++ and im new to unreal in general.. im guessing recreating movement component (and somewhat understanding what im doing) may be a bit too much atm
bummer.. hopefully not the only solution, im sure this would be a common concern on 2d games
thanks for confirming btw
So I'm experimenting a bit with UObjects, and I've implemented a "Begin Play" in C++ that currently triggers in PostInitProperties() after checking that GetWorld() returns a value which I have set up to pull from its outer.
void UTestObject::PostInitProperties()
{
Super::PostInitProperties();
//Called in game, when World exist. BeginPlay will not be called in editor.
if (GetWorld())
BeginPlay();
}
I'm creating a blueprint subclass of this object with a single property that I've marked as expose on spawn so I can feed a value into the blueprint. The Begin Play fires correctly, even calls the Begin Play logic defined in blueprints, but the value fed in during construction isn't set into the variable by the time PostInitProperties() fires. I'm expecting to see a random value between 0 and 100 being printed, but it always prints 0. The value definitely does get fed in later, but not by the time PostInitProperties() is called and triggering BeginPlay().
Is there some other function I should be using to call my "Begin Play" from rather than PostInitProperties() to ensure the values fed in blueprints are captured? Or does anyone have any reference to the order in which functions are called within UObjects on their creation?
heyo
I am trying to give random shake to a static mesh, this is the BP that I have so far.
my problem is that it starts at 0,0,0 and then slowly moves into world position
Any idea why my notification isn't changable with a text variable?
everything works apart from set text
there are two SetText nodes, you are using the wrong one
If you're wanting to change what part of your widget is displaying, you need to update the widget component (Like a Text component) holding that text, not just a variable, unless you have something else that is constantly taking that variable and feeding it into the widget component with your text.
or wait, is that variable bound to the Text field?
Doesn't look like it based on the screenshot.
Sorry what do you mean?
is the variable Notification bound to your text field?
with the bind functionality that some widgets have for attributes...
Yeah
Drag and drop this on to your graph. This is a reference to the widget that contains the text.
Drag off from it, and type SetText. That should give you a node that lets you update the text being displayed.
since this is outside of the widget (where you update) you have to drag from the create widget node and search for NotificationName
Close, but not quite.
Simplify it.... Drag the "in Text" to the event, making the event take an input.
Then referesh the "Get Notification Name" node here. It should then have a text input.
Feed in the text that you want displayed, and it should work.
This then would not be required at all.
In case anyone's wondering: to stop the "step up" issue due to curvature of capsule component "Use Flat Base for Floor Checks" solved it for me
I've added a box collision to my character and set it to block all, yet somehow it doesnt seem to block anything.. any idea why a collision like this wouldnt stop movement?
Anyone have any info on per-object clip planes as mentioned in this video (timestamped):
https://youtu.be/w-Z1Fx0LvDc?si=OPMMs39yatugaENk&t=1126
I'm very close to finishing my portals system and this is the last thing I need to figure out.
I've been experimenting with a material that does a similar thing but I've only gotten it to work on a certain axis so far (in the attached video) but materials aren't my thing so I'm pretty stuck in that regard.
When Double Fine began Psychonauts 2, they set out to create an exciting sequel and chose to create portals to separate the mental worlds and provide fun moments for players. Join Double Fine to learn how they built portals in Unreal, the hurdles they faced, and the solutions that led them to success.
#Microsoft #MicrosoftGameDev
Here's the material blueprint I ended up with purely from experimenting, in case it's useful
-sigh- ... is there ANY way to have a common blueprint utility class so I don't have to keep rewriting code? I keep hitting walls on google saying "you can only create a class that's a child of one of the existing classes" and then only that freaking class can use it. I need to have utility functions I can call from my gamemode class and widget classes like getting steam player names. Why does the engine try to fight this in blueprint? In c++ I include my utility code all over the place.
rightclick content browser => blueprint => blueprint function library
I thought that was editor only?
no
and I can call that from anywhere?
yesn't
i think you can't call it from "pure" Object classes
but anything that derives from actor (or any of it's child classes) can call it
also i think for widget's there's a specific type of function library
it wont let you click what?
did you create a blueprint?
so it works now?
yes, this is nifty
no variables kinda sucks but it makes sense, it's static
stateless i could say
and that makes sense, in other code i rarely if ever make utility functions that have variables
also thank you, i've been pushing hard and got frustrated XD
IMO I think you'll have a lot easier time if you wrap this in a system. Even Actors are done in a way that they are created and then an initialize is called on them to start stuff. Unfortunately to make that easily extensible in BP you'd need a custom creation node for the expose on spawns same as spawn actor has.
But like in SpawnActor code, you have the NewObject creation and then after a bit it calls this PostSpawnInitialize that actually sets everything up.
Like if you check out UK2Node_SpawnActor::ExpandNode. The node basically hooks up two major nodes. A BeginSpawn and FinishSpawn. And inbetween it adds a setter for every expose on spawn property. FinishSpawn is what triggers the post spawning code so properties are set at this point.
Hi, is there a way to get the Actors of a Level Streaming Dynamic Instance, the one you get after using „Load Level Instance“.
Why might my angular velocity be super random on a gamepad? I am trying to use angular velocity to feed into another function that slows the player while turning, and it's fine on mouse and keyboard (facing ahead = 0), but even just walking straight using gamepad spits out a crazy bunch of random numbers for angular velocity
Would need to see code to speculate.
Have you checked, if your Gamepad is „reset“. Often Gamepads tend to drift in a specific direction, so most games cut every input below 0.2
That's the part in question
I'm not finished tying it to anything, the value going off screen is just hooked to my printout node
Why Physics Velocity?
And this gives wildly different things when just pressing up on a thumbstick vs pressing W?
Would that be in deadzones? They are set to default as is but yeah I thought of that
Yes, like going forward with W not turning (hand off mouse) yields 0 all the time, as expected
But on the controller it goes like 1-50, sometimes into 100
I know because of how analog is read it's going to vary a small bit of course, decimals or under 10 or so
I'm not super sure haha... I tried a number of other nodes and solutions to display what is essentially "turning speed" without much luck
If you Capsule Component collides with the floor, it might rotate/interact with physic. Due keyboard being 1 and 0, you might not have noticed, .
It's very new to me
Shouldn't be angular velocity though unless you're using the turning thumbstick.
Yeah it's weird I just set deadzones higher but still same issue
That's the readout from just walking forward, not touching right stick
Deadzones won't affect that kind of change. That or your controller is fucked. One of those is 50 degrees.
I would try a small example just with the controller and no physic. Just a simple GetActorLocation++ in Joystick direction
Personally my money is on you messed up something with the Physic
Random curiosity. Do you get the same returns on the Mesh instead of the capsule?
Thats what I said to myself aswell
Modulo upward and == 0 check downward.. thats it
Probably, I'm just working off of the default first-person setup and modifying it to add certain features
Mesh just returns all 0 no matter what I do!
Even if you actually turn?
Just asking because I know that the capsule is thrown around like a ragdoll when moving, specially on clients. Had this issue with UI where I had to make the mesh the ui's component anchor instead of the capsule due to the capsule spazzing around.
Tbh, that one was a bit of a lost cause 😅
Wait... solved this. My own idiocy of toying with settings and not defaulting after
Within the movement component the rotation rate and orient to movement were changed
💣
So after any turns the player continued to slowly rotate and reorient
But not the camera
Gah
Anyway thanks @maiden wadi and @sturdy verge for the suggestions!
Your welcome
But... its straight as it gets? 😂
Yep
Guess i didnt do much explaining of UE modulo™️ tho
how to change material rotator speed in runtime?
You need a parameter.
Either a global one from an MPC or a dynamic one on a dynamic material instance.
Took 3h to get my solution integrated so…
Or CPD if you're going that route.
Time
oh so time is now same thing as speed?
Kind of.
The node by default takes in Time if you don't plug anything in. Speed is the multiplier of that. If you do plug something in, it's the active time you want to use.
You can make your own speed by getting time, multiplying it by a scalar and passing that.
I really wonder why there could not just be a speed plug there
Because it's more confusing. Time is the correct input. But due to convenience of needing to set different speeds, they made the node able to set that as a parameter directly. More complex things should multiply their own time as they need before passing it in.
Annoying to learn, nice to have. 🤷♂️
4.26
Guess someone agreed that it needed to be there. 😄 5.3
Ah, fair
Panner has a plug for speed.
I dunno. 🤷♂️
Figured out a work-around: https://youtu.be/HLSLRjUrfiY
Hey, so I changed the Scene root component (in CPP) of one of the actors I've placed in a map. But if a map that had that actor was loaded in the background the editor would crash.
After loading as different map I could compile the blueprint but the actors that were already placed in the world don't have the correct scene root component.
Image 1 - If I drag and drop the blueprint now, this is what it shows
Image 2 - the actor I placed before making the change to the scene component
Does anyone know how to fix this?
hello everyone, is there any way to toggle the lights on/off from blueprints ? "lights are imported as a datasmith file and is as datasmitharelight blueprint" actually i want to on and off the lights but these are in datasmith lights and i dont know how to do so?
so if anyone knows please help!!!!
Sounds kind of like you need to replace the instances on the maps.
Can I make changes to the blueprint if I have its class reference? Like removing an attached component before spawning etc?
Yep, but I have around 50 instances of it on the map, is there a better way to do this?
That would be altering the asset or the CDO fwiw. You don't want that. Spawn a new instance and alter that or make a new BP or a Child Class and alter the defaults in the Asset like usual
Yes, but no. Can you? With C++ sure. Should you? Not really.
The issue is that Unreal uses what is a CDO. While it's not exactly the same thing, for most cases you can kind of think of the bluerint's Class like it's CDO. CDO stands for Class Default Object. This is an instance of the blueprint that Unreal uses to instantiate copies quickly and pull defaults from to some degree. If you edit this, you edit it for every future version and anything using the default data from it. It's usually a seriously bad idea to edit CDO data at runtime.
How can I alter an instance before its spawned?
Do they have any instanced edited properties? Or are they just placed differently?
I have item that shows text to pickup and some underlying logic. If I spawn it, it becomes a part of the logic, If the item is already picked I don't want it to become a part of the logic that is used to pick it up. But how can I alter anything about it before spawning it? So it don't automatically becomes a part of it. Or else I'll have to remove it everytime its spawned.
Just placed
You can probably use an editor utility. Something like this maybe.
Alright, thank you! 
Don't forget to add like a destroy for the old ones too.
You can use an exposed variable (click the "Expose on Spawn" checkbox in the details panel when you select the variable). If you use a bool, then it can be a simple "Pickable" bool, and you can use that bool to then change how your logic flows.
When you go to spawn it, you should then have the option to choose whether or not Pickable is set.
Will this happen before it enters the world?
Hi!
I've read the description of the node Is Over Hit Test Visible Widget:
Returns true if a widget under the hit result is has a visibility that makes it hit test. What is the hit result? And also, what does makes it hit test mean?
Thank you.
it's checking if the Widget Interaction Component is currently over a hit-testable widget. Your widgets have a visibilty setting that can be any of these options, but the only one that is actually hit testable is "Visible", but if "Not Hit-Testable (Self Only)" is selected, it can check widgets that are behind it in the layout if they are set to "Visible" but happened to be covered by a Not Hit-Testable (Self Only) widget.
guys how I can "meassure" game how fast it is on one pc and another and compare if my updates were right and now even 20 30or 15 fps everything is same?
Thanks, but what is the hit result? Is it a laser? A trace channel? Is a collision? I have this questions because this code is part of the VR template project and I'm not sure if the player is "physicaly" touching the widget or there is some distance between the VR controller and the widget.
t.maxFPS <fps value>
I usually just do t.MinFPS 144
It's a trace. You define some of its properties in the component itself:
Thanks a lot!
Que? What’s that do for testing frame dependencies
Hey, is there any provision to get all the properties of the object instance so that I can set them on the newly spawned object?
Initially I want to say no. But I'm not sure if there's a helper for that in editor stuff. In C++ you'd just iterate the property fields of the original and the new and copy the values. If there isn't a generic version of that, it's a bit odd.
Making jokes mostly
Hmm, alright. Thank you !
Also, this is what I ended up doing. Instead of having to select each asset I got all assets of that class and looped through those.
I see fps value but its saying nothing about if my turn is same fast as turn at 60 fps or if I go from point A to B same long time heh
Any idea why this box collision does not block anything? collision preset seems to be the same as the parent. BlockAll did not yield any results either
Turn?
Rotation ?
As long as you multiply by deltatime, speed is equal across framerates
300 per tick wouls go faster the higher fps you got
But if you do 300* deltatime itll linearly decrease at fps increase,
Keeping the speed/s the same
It does. But not if you're expecting it to stop it's owner. Only the root component is considered on movement. Anything else scales to be really expensive.
sadness. so any collisions on a character actor aside from the capsule component cannot block movement?
Thanks again Authaer, good to know
was hoping a thin box on top of the character could prevent being launched by corners due to curvature of capsule. I also tried adding a plane but it didnt seem to block the character's movement either
Launching by corners?
yeah if i hit a corner of a square while jumping it gives the character sideways movement
rather than just stopping the jump and falling straight
What do I need to do to make sure that I can fill these variables from default instead of like this on blueprint begin play?
I need camera object reference to get the camera that specific player instance is using and collision shape to bind overlap events
I made those object references.
I need camera's transforms and collision box's overlap events
Hey guys! I am trying to not use Event Tick, and instead using a Set Timer by Event, though it is not firing
This is part of my widget, and the game is paused at this time. Is the game being paused cause the SetTimer by Event not to fire?
@granite frost Hold Windows + Shift + S to take a screenshot
I am doing add actor rotation but not multiplying it should I ?
If you want it to be the same speed unaffected by framerate, yes
k
Instead of filling these like this
I want to fill these
I want to use transforms of camera and overlap events of the collision box
Is it possible?
Class reference may allow it but I can't directly access transform from class
Is this possible?
@granite frost I think setting it the way you are doing is filling the default values when played. Best way to check is to use a print string
Yes this is working perfectly fine. But I want to do it the second way
There is no problem with logic
I just want to fill defaults instead of filling it with blueprint like the first ss
but I am unable to
My problem is simple. I just want to do it the other way. There is not problem with logic at all.
clicking on none and it showing nothing meaning there is nothing to assign it
no blueprints or classes to do so
So how do I do it?
create them as separate blueprints would be my first guess
No, collision shape and camera are just components attached to the player
I want its reference
you dont need to add it there to get their reference
are you trying to get their reference to?
Hi there people. Wondered if someone might have a second to help me out with this.
Im trying to make Snake, but im having problems. Im saving all my previous positions in an array, same for each segment added to the snake.
What i want is to go through the x last positions the snake have been, where x is the nr of segments, and put the segments in those positions.
Atm i manage to move all segments to the correct position for the last segment of the snake, but every position between the head and the "tail" is empty.
I feel like im close to a solution, but having spent way too long im turning to you for help
Its simple
I get there references like this
Instead I wanna do it here
How do I make variable not visible on default but able to be set using reference?
I mean you don't need to think my problem is complex. I just lack knowledge. So it might look like I am asking something hard but its probably simple
As simple as changing a property in settings or something
Like
This is picked should not be visible here
But I could do this
You cant set instance references in a class template
So runtime is your best option
So how do I make them also not visible in default?
C++ 😄
If I can't set them, I don't want them to be visible either
Can't do it in blueprint?
?
Which atleast hides them in a dropdown / advanced section
So I can't even hide the variables I don't want visible in default 🥲
Add them to a category and then hide the category in the class settings. 🙂
How do you hide a category?
Ohhhh thank you very much
Hi, can someone explain to me how the "On Component Hit" event works? I created an axe BP and attached it to my character's hand socket. I have created a BP of the object I want to trigger this event for and added the component "Cube" to it. When I run into it with my character the event actually triggers for my character's "Capsule Component", but it won't trigger for my BP Axe, which is held in the character's hand. Why is this happening?
Neat! Hidden hidden? Gone?
The axe and the cube probably don’t have the right collision settings to block each other, or the capsule is too fat and gets hit first
One thing to be aware of though, if it's hidden they won't show up in the right click menu so you might have to setup its uses first before you hide it.
whats the difference between game mode and game mode base?i follow a tutorial and there he creates a game mode ,i checked what i have and i have game mode base
!?
Say what
But also if you’re manually attaching the bp axe to your actor and it’s a regular actor and not an actor component, that might never fire @hybrid frost
nope, this is not that case
i already have functionality in game mode base so it will be hard to remove it
OnComponentHit is for components. Not actors
the author make a checkpoint mechanic in that video
So if you have a var in a cat and you hide the cat, the var won't show up in the right click menu. It gets excluded from the search. You can still use it it places though but you'd have to setup your logic using the var first or copy/paste an existing var in the event graph.
oh ok
That is so strange to me...
Oh well glad i dont have to contend with it
Well it's hidden lol.
I attached a widget to an item. Its visible in editor but when I play its not visible.
So does it show in the CDO?
Hidden in game is another checkbox, but idk if widgets have it
CDO?
He means class defaults
Hidden in game is false
Widgets have jt
No, it doesn't show in the class defaults.
Not sure then, maybe #umg would know
I sometimes use it to hide stuff like, 'Component Tick', 'Activation', 'Cooking' etc... so I can't see the cats for things I know won't ever need to be changed on a BP.
Is there anyone thats good with arrays that have a min to help me out with a problem?
Ask the question and we'll see
Im making Snake, and i have 2 arrays. One for each added segment, and one for all previous 2d vector positions the snake has been at. Every move i want to go through the segment array and put the segments in the corresponding positions
I manage to get the segemnts into the correct last position, but they all end up there
Isnt eaten counter and previous location array.length equal?
The last segment follows the snake correctly, but how do i get the reminding psaces filled
So basically youd want to add 1 to array when apple is eaten
Otherwise shift entire array and replace the first index with new location (so remove last index, insert first index)
Id probably use a circular array but can be a bit troublesome when using add
atm it just puts eveything in the last location. So i probably need some shifting, but i cant change the loc array, as i need it for the next movement tick
Could always use a 3rd array
Thats probably not a bad idea
Thats exactly why you should shift it
Move tick is the one that shifts the array
Then the visuals are updated
hmmm, im not sure i get this. What you said makes sense. Im just having somee trouble visualing it
MoveTick()
{
LocArray.Insert(NewLocation,0);
LocArray.RemoveLast();
UpdateVisuals();
}
If you wanted to make it circular, youd track the HeadIndex
Thats starting to make sense for me
So it would look more like;
MoveTick()
{
If (ApplesEaten > 0)
{
ApplesEaten--;
LocArray.Insert(NewLoc, HeadIndex);
}
else
{
If (HeadIndex==0)
{
// Set to last idnex if we're at 0
HeadIndex = LocArray.Num()-1;
}
else
{
HeadIndex = HeadIndex-1;
}
LocArray[HeadIndex] = newLoc;
UpdateVisuals();
}
}
Thank you so much. im gonna play around with that
Does anyone know if there is a way to stop the editor from automatically inserting a new node into the execution when pulling out from the Array Element?
Updated circular example
Not sure if its 100% but.. it might be
Huh
Not really. It's two pin drags to connect.
If you were here now i would give you a big sloppy kiss. It worked, 2 days of pulling out my hair, and you fixed it. Thank you so very very much!
Luckily im atleast a few (hundred) km away, not much for kisses 😂
Hehe. Very grateful at least. Thank you so much'
how are you guys?
Ofcourse im just guessing thinking you atleast origin from a nordic country , likely norway ?
Is there an easy enough way to do a simple 'driven key'
Eg
If object 1 is at location x then object 2 is roared to Y
If object 1 moves to location U then object 2 rotates to rotation V
This wouldn't be used by the most blueprint savvy people so looking for just a way to basically change transforms an object based on another object (NOT parenting)
Spot on
The Ø gave me away eh?
Hehe yepp
You want it to be another object or just something draggable ?
You can get 3d widgets for instance editable vectors
Don't mind what I move, but would like the 'child' to be moved
Then the vector might be something you can use
Onconstruct just set rotation towards that vector by using FindLookAtRotation
If you wanna null out axis you can ofc do that
'the vector'?
A vector variable
I know what a vector is but what would the vector be in that instance?
Mark it instance editable and "show 3d widget"
What i interperted as the drive key
Perhaps i got it wrong 🙂↕️
I don't really understand what you're saying. I want to move object 1 and have object 2 do transform based on that first objects transformation. Ideally rotating but its a specific transform eg go from 15 degrees to 30
You can manipulate the final rot if you want less precision
I asked if you wanted an object specifically, ansnas I first read it, it doesnt mattee what you move
Hence my vector suggestion 🤷♂️
Right but it needs to be something someone can translate. A vector is just a value, right? You don't move it.
Thats the show 3d widget part
It gives you a diamond you can move
In editor
Try it out
And see if it works for you
Also works for vector arrays, or multiple vectors in general. With their name displayed
Very handy
Yep, I don't understand at all where any of this is happening, construction, event or what or where the diamond is coming from. I will do more research. Thank you for you time.
Create a variable - vector
In its detail settings mark it instance editable
And then show 3d widger
Now drag actor outnin scene
Select it, and see the diamond appear
Is it possible to use a specific game mode when loading a level during runtime?
Right that's creating a movable object, but I can have any movable object, how would that drive the transformations of another object between two different values that might not be 1:1
In editor thats a tad troublesome
Youd need to use a third object for this, which can make sense ofc
You can then setup a bunch of properties for the transform relation
Yep I would, but I don't know what
Editor utility bp
Two actor reference variables
ActorA and ActorB
Hmm im not sure it would be as smooth as one would hope
Unless we can bind to their OnConstruct or something
OK don't worry
You can pass it as an OpenLevel argument.
In Options? What argument is it?
Quick sidetrack: it says this node is server only, but if I'm making a singleplayer game, any reason I should avoid using this due to it's being a server-only event?
In the options, yeah. The parameter is "game". But you either need to create an ini alias for the game mode. Or specify it by path.
EG ?Game=/Game/SomeFolder/SomeOtherFolder/B_DeathMatchGameMode.B_DeathMatchGameMode_C
In singleplayer you are the "server".
So no, no reason to avoid it.
Just wanna make sure XD ty
What's an ini alias? It sounds easier than using full paths lol
but is not in the category of blueprint
so
do you know guys an app
an online app
for edit photos?
with no background?
i try my logos for the widget
If you edit your DefaltGame.ini
+GameModeClassAliases=(ShortName=“DeathMatchGameMode”,GameClassName="/Game/SomeFolder/SomeOtherFolder/B_DeathMatchGameMode.B_DeathMatchGameMode_C")```
Oh, class aliases? I saw that in Project settings, do I use that in place of the path? e.g. ?Game=DeathMatchGameMode?
I haven't personally done it. But I assume you can just do ?game=DeathMatchGameMode as an argument after that.
Oh yep, that works! Ty 
Good to know. 😄 Tucking that away in the random knowledge vault.
Doubt I'll ever use it. I do composition based stuff. So I just end up with different components on the same game mode based on game type.
one other question, how do you do multiple arguments in the options string?
? separators
?Thing=Something?SomeOtherThing=SomeOtherThing?SomeThirdThing=Blahblah?
Much appreciated 
Hey everyone, I am a beginner and I think I have a beginner issue. 🥲 In my main menu, I have a widget blueprint that tries to cast to a blueprint that is a game instance. However the cast always fails. Any direction to fix the issue?
What's the class of the blueprint you're trying to cast? If it's not a GameInstance or a child blueprint of GameInstance, it can't cast
parentclass is GameInstance
What's the blueprint look like?
Ahh, you're doing the same thing I did lol
Classes like Game Instance can't be casted down to classes that use it as a parent
Huh?
They're a child of Game Instance so it can be casted up, but Game Instance has no connection itself to your custom class
They can, if its the actual class
por que?
If you've set the GameInstance to MyGameInstance in project settings
You can surely cast to MyGameInstance
Ah, yeah
They're no different from the rest of the classes
That's how it shows
Yeah, it's at the bottom of that category
You can change the "default" Game Instance class for your project
The Get Game Instance node will always return a GameInstance (I think), but that can include child classes, so it'll return your custom one and allow it to be casted
It returns the correct one, but doesnt cast for you
People tend to make bpfl for this
With a simple name like "GetMyGameInstance"
Where they just getGameInstance -> CastToMyGameInstance
In a pure function
Oh my god I never even thought of that
I feel like an idiot now lol
On that note though. Don't abuse GameInstance. Don't store a ton of things on it.


hey
I heard this tip before. I personally planned to use it only for settings
Settings like what?
like graphics and sounds
Game User Settings does that already
There's already settings for that. And you should never use the GameInstance for that.
It is
o
GameUserSettings should house anything specific to the machine. And you should create a Savegame for any user based settings that need to travel with the user to different machines.
Machine based settings are like graphics, resolution, sound values.
User based settings are things like accessibility settings like color blind options, keybinding controls, personal game preferences to avoid annoying popup hints, etc.
It used to be used for user settings too. 😄 Everything used to be written to an ini file. But it's much easier to port USaveGame serialized files through cloud and whatnot that it kind of got ditched for anything but machine only settings.
Hmm interesting
I had my Game Instance as a bridge inbetween the widget and "BP_SavedSettings" which is under 'Save Game' -parent class
Yeah, pretty much.
talking about saving, is there any built in stuff for helping serialize and unserialize data to and from a string? It's mainly for child class where addition vars might be added but need to be saved.
I know there's the 'Parse Into Array' for strings which is useful but wondering if there's anything else.
never been a big fan of stringdata 😅
I try to avoid it lol. Not always possible when you're setting up a save system to handle additional data that might vary. Open to alternatives though lol.
As an example, I have a quest listener that handles listening for various actions and keeps track of whether the quest has actually completed. Not all listeners need data to be saved, whilst others might.
Not really following what you mean here? What is the usecase?
Oh, I should probably read further.
You should grab my quest plugin 😂
Further example, I currently have two functions that you override in the child class to define the additional data that needs to be saved.
Sounds like the data saved is not what should be saved tbh
I already have a quest system. 😛 Just trying to see how I can streamline it.
Figured as much
I'm happy I can just store whatever data on an actor or UObject and save that object directly. It makes my life so much easier.
What additional data can this be tho
Anything quest related boils down to 1's and 0's?
Did or did not do X
To be fair, it would probably only be floats, ints and names. (Possibly gameplay tags)
Active quests are UObject with a data asset pointer in it with progress tracking. Finished quests are a list of data assets in an array.
On save, save all the ubjects, and the quest manager with the array of completed ones. On load just reinstantiate the ubjects and write the data back to them, then get the quest manager and write the data back to it.
Then it doesn't matter what you put on either of them to track anything you want.
Mine boils down to tags and values. Done
Anything is a tag and value
Escort. Track, use ability, interact with, gather item, has item, equip this
Havnt been able to come up with anything that requires anything else
I do expect a tag for identification tho, so its definetly easier if related systems use tags
Just remember that you can save pointers. 🙂 And it's fucking awesome.
😆 life is good heh
Guess thats one of the 'cons' of my setup
As it makes no assumptions about whay its implemented for, it currently doesnt provide any tools for it either
Nor any examples
So the escort mission needs to be implemented by whoever uses it, and pass tags to my system when appropriate
Partial or full goals etc
That's not far off how I have it at the moment. I have a quest object and a task object, the task then has a task listener object that actually holds the logic for keeping track of the task.
I currently save the class type for the quest, all the current tasks (might be optional ones) along with any specific data that might need to be saved in the task listener.
On loading, I just recreate the uobjects from the classes and pass any of the relevant data back to them. (if there is any)
I know you can save pointers but how does it work? normally they just break for me haha. (usually because the thing doesn't exist)
It's not possible in BP only unfortunately. But it's an awesome trick. So.. Pointers actually save as a name path. EG if you have a UObject in an actor component in an actor. You get something similar to like...
SomeActor23/InventoryComponent0/InventoryItem17
The trick is that you save all outers before you save their subobjects. So save the Actor, then the Component, then the Item.
When you load. You simply check if SomeActor23 exists in the world. If it does. Set it's transform to where you saved it, create any missing subobjects that the save data has. Then move on to each subobject the component had and newobject them with the component outer etc. Same as it was when you saved all with the same names.
Once you have done this for every single object in the savegame. Then you make another pass over each one of them in the same order, and write all of the data back to them. And because everything is instantiated with the same names, subobjects, etc, all of the pointers align back up.
Hey folks
Any easy way to increment an Enum value? Meaning I just want to select the next or previous option in the dropdown (screenshot 2) and set the Enum to that?
ToByte, +1, to Enum
Ahh ok. Yea, it was the putting stuff back in its place that's was the issue when I tried it lol. It would be nice if they add a bit more stuff to better facility this type of stuff in BP but meh. It's easy enough to work around I guess.
So like this right?
Yep
My thanks
Make sure to clamp size. 😄
Hi there!
I'm trying to make drag to open doors, smth like in Phasmophobia. I found only one tutorial how to do that, but the tutorial has it's downsides. From one side the doors opens according to players camera rotation and from another side in opposite direction. I have no idea how to fix that, any ideas?
Here's tutrial I'm using and some screens from the code
https://www.youtube.com/watch?v=bMEE7RKSddc
Hey guys, in today's video, I'm going to be showing you how to open and close doors by using your mouse and holding left click and dragging the door.
#Ue4 #UnrealEngine4 #Ue4Tutorial
00:00 - Intro
00:15 - Overview
00:40 - Tutorial
14:51 - Final Overview
15:18 - Outro
__...
You can also use a Select node
Prettier almost
Does anyone know how in like EldenRing/DarkSouls lots of third person games they have a light attached to the player that allows the player to be seen in dark spaces?
Anyone know the setup of this?
For the most part its just a point light
but what makes it tricky is that is effects the mesh
I'm pretty sure the light is attached to the player's chest
why wouldn't it affect the mesh?
and that's def what is effecting the walls/enviroment. Though how it illuminates the mesh without having bright access somehwere I'm not sure
Its more that it effects the mesh in unsightly ways in UE by default
You can set it to ignore the mesh
there are light channels too
yesss but in UE the mesh is effected
read >_>
Or the mesh not to recieve light from that channel or someeething like that
in EldenRing the mesh is effected
ok so what's the issue
sticking a point light in the mesh doesn't accurately reproduce the effect
I'm wondering if anyone has any idea on what other things would be added to it
do you want the light to affect the character or not?
I want it to effect the character
well that's the default behavior already
but you can tell in ER for the most part the mesh is illuminated entirely and not just a bit extra bright in the center/where the light is parented
expose settings on the cam, you can use it to brighten up dark areas. I would imagine they have a soft light on the player character just to make sure there is some light and then use exposure to get it to the brightness they want.
hi guys why is this overlap event dont fire i set the sphere on playerstart
Change point light settings
Theres a bunch of them
This is what happens when you just stick a point light in the character^^
you get a bunch of ugly light-bleeds
With inner radius stuff that gets full exposure
and it doesn't illuminate the character
This is before and after exposure for something I'm currently working on.
Hey guys, Sorry for jumping in. I have an easy question, Just me being dumb.
I've been on the deep end trying to understand Casting, Interface and Event Dispatchers. I've somehow understood how Event Dispatcher work and implemented some by telling myself they're "Installed Phone Lines" but I really struggle to get my head around Casting (If that's even relevant to my problem lol).
All I want to do is get the reference of a static mesh within a blueprint("BP_Scene") so that I can from my "BP_Pawn" change the materials of that specific mesh.
I got a Macro that works as intended with key inputs and I got it to work with some modifications with an Event Dispatcher but yeah. I want to understand Casting and get the impression that it's overkill to use an event dispatcher for this.
Still gives an odd light-bleed effect
Casting is checking if some abstract pointer is some less abstract pointer
You cast downwards to more specific classes
Correct
the breakpoint still says it is not firing : (
don't cast shadow
Or is it a hierarchy of Actor, Character, pawn etc
And if the pointer is null, the cast fails
Ah, That's why it keeps failing
You cast down the hieriarchy, yes
it already doesn't cast a shadow
But it doesnt magically create a valid one
"Try to treat this reference as a", usually helps the casting frame of mind better.
I see, So in my case, Even if I have a variable with a direct reference it would be better to build a scene in a blueprint that is of a lesser class than a pawn?
Not sure i got that right
I have "???" going on too. 😄
But if you end up with hard refs anyways, its not gonna matter
This might help. This is the hierarchy of some of the classes used in UE. As you make you're own classes you add to the tree. If you have a variable of type actor, you can store any object in it that is of type actor or it's children.
Casting just checks the type of the object stored in the variable so you can call class specific functions on it.
Now we have 3 ways explaining casts 😂
You can see the entire hieriarchy whiøe making a new classs
Yeah I have so much information online that have given all sorts of explanations haha
Casting is to do with hierarchy which not many places actually explain.
Ignore the part that says casting is bad and interfaces are good.
Think we all stand behind that part by now lol
Atleast for 'staticly loaded' classes
On the subject, Is casting to pure virtual classes more or less expensive than to normal classes?
Yeah I got the impression from online that Casting is bad only because it keeps other Blueprints loaded
Players char, players controller, state etc etc
What is pure virtual
Stuff that is always loaded is fine casting to
casting to native class is free
Casting has no real cost.
yea it's the hard ref
Like, the act of casting literally has no cost.
Casting can be horrific
Which it does do, but good hierarchy eliminates this issue anyway as you'd only be casting to classes that (for the most part) would already be loaded anyway.
Only if you're not managing your project correctly.
@Beginners
yeah I think casting to something like player charcter is always if i'm not mistaken since there is already a pointer to it in the game thread anyways
weird way of thingking about it
I mean player will always be there anyway
so cast away
stuff that is inevitably gonna be loaded, just cast away
Unless you have a game where the player can play as different characters but then in theory they should have a base class that you would be casting to instead.
it's like tick() all over again 🤣
Yup, always cast to base class when possible
You still should omly cast to it if you need to
I think I figured it out (or at least something that gives a close result)
They have 1 point light that only effects the enviroment thats parented to the chest of the player-character, and another spotlight emitted from the camera that only effects the player-mesh
Sticking to casting as high up in the hieriarchy as you get away with is a good strategy
If i need the controller from something, I just cast to pawn haha. No need to cast to any of it's children just to get it.
Exactly
I always hate this conversation, because it's horribly simple and yet complex. 😂 Like Casting has no CPU cost. It's basically free. BP casts however also include a validity check which is the same as an IsValid cost, this costs a minor amount but much less than accessing a null reference.
Everything else people are afraid of about "casting" has nothing to do with casting and is a whole different discussion entirely on the topic of linkers.
but casting to BP class create hard ref. This can be memory problem if not managed well
my old game is beyond rescued
Sorry, didn't see this. Thank you though.
Does accessing a null-ref in BP actually cost more then adding an IsValid check before?
Which is the linker discussion. You get the same issue if you have a never used pointer in the properties. Or a function returning a value of the type. It's not casting that is the issue though.
The actual runtime always checks for a valid pointer anyway~~
Much more.
At least in editor. I've never tested it in a cooked game.
I assume part of the editor cost is warning logging.
So much to digest. I see I opened a huge floodgate lmao and my brain is burning even more haha
But now I kinda get why my widget blueprint didn't complain with a cast towards a pawn.
In the end maybe I should just do an event dispatcher between the two Pawns to save myself the trouble lol.
Class specific object refs in interfaces implemented on the majority of classes but only used in 1 place. 😱
I mean under the hood it has to check for a valid pointer otherwise it would crash
i will personally cook you if you have a wall of red text in the output log
If you stick around, we'll have the same conversation tomorrow if you need a refresher haha
Pattym is confident. I was expecting it to pop back up again in six hours. 😂
Hahaha
I feel like there needs to be a bot that tracks how often it's discussed.
I think I'm just about to use my first interface on my current project. 🤔 Still mulling it over though haha
Okay I gotta ask, Is interfaces that bad?
All videos I've watched have praised it.
@shut cape
Casting is trying to access different levels of a reference's hierarchy.
Interfaces are like adding a specialized second class to something that is meant to do something specific. It's mostly used to patch holes in places where you can't easily use composition or inheritance based solutions. The main issue with these is that they require boilerplate code. Two different classes using the same function means two sets of code to upkeep.
Event Dispatchers are a subscriber list. Something has that list and when something happens it can broadcast that it happened to everything that has subscribed to it. It's worth noting that this has nothing to do with the previous two things because you need a reference to the thing with the event dispatcher already to bind it which requires a correctly casted valid reference to the instance.
They're implementation traps
And no. Interfaces aren't bad. They're great. So is composition and inheritance. 😄 But people abuse the hell out of them in really bad ways. Specially the videos that usually praise them.
That's why i'm still mulling it over. Its for a saving generic states for all the actors in the level. So open/closed, on/off, that type of thing.
Thank you! This helps a lot. My own curse of adhd makes me read into it a lot but I can't firmly grasp any information at all haha
So this helps a ton man
Oooh I see, So basically don't over engineer Interfaces or develop a dependency for all your blueprints on interfaces right?
Not far off, interfaces are for when you have multiple classes that don't share a common parent but need to have the same functions.
Or when you want to ensure asset decoupling.
You can stuff that to a component if you want
Cpp one and it can pick up all the Savegame marked props of the owner
Or just make some global system that does this, ofc
subsystem is also an option
I have an actor manager I'll stick the actual saving in, just need to find a nice way for it to get the data for the relevant actors.
Are there any good reasons to use game state for single player games beyond abstraction practice?
I put a lot of my managers (actor components) on the game state. It's easy to get from most places and is specific to the level.
I use a lot of empty actors as different managers in levels and was thinking if game state is better approach or not
GameState is what runs Beginplay, technically. So you know that if something has begunplay, the gamestate and it's default components at least exist. This is useful even for singleplayer cases sometimes.
Yea, very useful when you have actors that need to register with the various managers. Saves you having to delay when it tries to do it.
It can be, but you also don't wanna bloat a single class with shitton of different functionality, I think composition is the best approach. I'd make those managers into their own components and stick them onto one of these engine classes.
Thx.
Hi everyone, I was wondering if anyone could help. I need to call an existing widget blueprint after the last line of one of my data tables runs. It should hide the existing widget HUD that i've got and bring up a new one in it's place. Does anyone have an idea on how I could do this?
Anyone know how to fix it?
Dot product
Gives you the direction the player is facing relative to the door
Or the direvtional "equalness"
Hello guys how to fix that?
Is 'For Each Loop with Break" expensive?
or just "For Each Loop" (I'm not entirely sure what 'with break' does )
They're the same. One just allows earlier stopping than the full array.
I see
So are they expensive?
depends on the array and how often you wanna call it
It depends™️
There wont be more than 10 items in the array and I'm calling it on begin play and every time the player reaches a checkpoint
like if you have hundreds of actors that you want to update them with tick or 0.01 timer it could be expensive
^^ Also never use a 0.01 timer. Ever. For any reason.
No worries
Perfect! thanks
Isn't that like event tick?
Yes and no.
0.01 is 100 times a second. If you have a game running at 50fps. You tick 50 times per second. That timer runs twice every frame.
Why would they stop you?
Why not?
It's not up to them to stop you from putting a nail in your foot. You should just learn that nails in your foot fucking hurt. 🙂
true 😅
I think the ideal would be to advise min range of some nodes in tooltip like how they recommand to not use "get all actors " nodes by tick
That node is fine on tick. I use it. As long as you use the class filter you're perfectly fine.
Technically not that node, I do it in C++ with the same iterator that node uses, so less array allocation.
But either way. GetAllActorsOfClass is just fine in most cases you need it.
I hardly use that node anyway since it's always better to fill the array by self ref logic of each actor you want
You mean in some global manager?
Let's say I have some animals that I want to keep an array of them. in animal class I tell the actor to add itself to the array in a class I need them after beginplay or some function
You're just repeating logic that the engine has already done for you.
Not always, since getting all actors goes through every actor in the level. no?
It does not.
I think registering instance to global manager is okay incase you want to expand on it. Eg exclude some actor that has specific tag
Sometime you want to get enemies in one area and not caring about the rest.
You prob want to use get all actor of class when you intend to iterate all target actor in the level
When an actor is spawned. Lets say a Character class. A character is a Character, a Pawn and an Actor. This is three separate classes. Lets say no other actor is spawned. So the World creates three separate maps. One for Actor. One for Pawn, one for Character and places your one actor in all three.
Then you spawn a Pawn. This instance is placed in the Actor and Pawn map.
So now you have three maps. Actor with two entries. Pawn with two entries, and Character with one entry.
When you GetAllActorsOfClass for Character. You will get a list of one character. It will not iterate over the Pawn instance because it was not in the list of Characters.
Hmm you are right. so why epic is recommending to use it with caution?
The same reason they also say the avoid casting on their livestreams. The people making those recommendations target designers as well and they are not going to understand most of it. They'll abuse it, and then someone has to clean up the mess.
Note, the above point about that only applies to those with class arguments. Versions like the GetAllActorsWithTag or whatever are actually going to iterate over every single actor in the level.
But in most cases people dont really need it
But do the same as with interfaces 😄 abuse it
you can always do it in the opposite way of "submitting yourself to a manager" that exists in gamestate/mode/subsystem
Because when you have a fully populated level (not a test level) the number of actors it could actually return could be large. Having to loop through and handle that many could cause performance dips in BP. Especially if you're using it a lot. You could easily reach the loop limit.
Depends. It's rather useful in some cases. Like keeping a niagara emitter updated with world locations of every actor of a type. Doesn't cost much of anything to pull the vector of several hundreds of instances to throw it on the GPU.
The point was more that if you're just doing that to have a list of a class, that is a waste of time and pointless because the engine is already doing this for you.
Not an issue with the GetAllActorsOfClass node though. Same can happen if you follow the other points of keeping a list in a manager to do the same thing on.
True just a comment on why it says to use with caution. I guess it's down to how its being used. In most cases people don't actually need to get all the actors of a specific class and instead just need 1 or 2 in a pool of a thousand.
There are valid usecases, but more often than not what we see in here
Almost any array iteration in bp have relatively significant impact
thats just saying there isnt a point to cache any reference to any object since you always can get from GetActorOfClass
say if you have spawnpoints, and a spawnpoint manager, those spawn points submits themselves to the spawnpoint manager so the manager doesnt have to keep calling that accursed function
Lol, fun random note on that. GameMode collects spawn points via get all actors of class.
To make a list that the UWorld already has. 😂
Right
Managers are great for some reasons. But sometimes if you just need a list of a class of actor. It's already right there a single node away.
that requires to loop though all actor
it's prefiltered
this is good to know, so your saying it doesn't need to check all actors for the specified class ?
correct
thats interesting
Still more often than not I'd argue it's not a node you'd need to use
or want to use,, in blueprints
Guys why is not working the keybind? Like i made that for jump and when i select other keybind its still the same
like the same Space Button
did i do something wrong?
If you read C++. Check out FActorIteratorState. Bit more clear there. It's a state within the iterator itself in TActorIteratorBase
This implies that classes with longer a longer inheritance chain will cause a higher memory usage since a single instance fills up more maps, is that correct?
Trying to make a Re7 kind of door but when i try to open it the door does not work
In regards to save game objects. In most cases they're just a copy of data that already exists would I be right in assuming that if an SGO holds a lot of data it might be worth clearing all references to the SGO after it's been saved to disc so GC can clear the data and reload the data when you need to save again?
😱 fml lol
FActorIteratorState is create on construction of TActorIterator
during FActorIteratorState constructor, it populates the array from FUObjectHashTables::ClassToObjectListMap, which is populated from AddObject which is called during the constructor of UObject
however TActorIterator, which GetActorOfClass is using, is not created until it's used. (and yes, a new one is created each time GetActorOfClass is called)
hence it still needs to do checks for multiple maps and copies the object address to the array that GetActorOfClass returns.
so yes, it doesnt loop through all actors (unless you literally ask for TActorIterator<AActor>), but minimum still loop through 3 things,
- All the subclass type you ask for
- Obtaining all the objects from the
ClassToObjectListMap - Populating all the objects to the output of
GetActorOfClass
so yeah, ill prefer people with lesser knowledge to practice proper reference gathering without relying on this function
guys just one quick thing, i have a float that is either 1, 0 or -1 based on the direction i am going, is there a switch i can use?
compare float
nice
It often also is just used as a hacky way to get a reference to something without knowing much about bp communication or how to actually get the reference etc
"Why does X happen on all my Y Actors?!"
that being said, i only knew now that it doesnt loop though all actors 🫠
same, i assumed it had to loop through all to find what your looking for
unless i missed it, you sort of want to cache the TActorIterator so that the delegate to record new actor is alive, then it doesnt have be recreated everytime you call the getallactor function
dint see the FActorIteratorState is being preserved through multiple calls
Unsure if I missed smth or I didn’t do smth right
I'm not understanding how this helps. So we still have the memory from the audio and particle components, but not the logic? But wasn't the particle and audio components taking up the most memory? Maybe I'm wrong, not sure.
i kept my SGO since i only read from disk during loading phase, saving them to disk will use the same SGO created from loading. in a way reducing disk I/O...? but i dont think it really matters...
Yea I normally keep them loaded. Not sure if I should start unloading some of the bigger ones. More research is needed lol.
personally i look at it in the way where there is 3 types of resources, cpu, memory, disk i/o
in modern system, i believe memory has the most headroom of all.
I have this head bob function that I want to call after my movement, but they are on a different class and i dont know enough to know how to do that
so the function is in your player character, and you want to run this from your controller ?
yeah
are you just going to be having one character ?
i made a parent for my character, then i cast to that so i can use multiple
but you can get player character, cast to your bp, call the function
wait.... in Editor, it does loop through all the actor in the selected World LMAO nvm its just for AActor class in editor it fallsback to different method
guys how i can make keybinds settings? with an apply button to apply them and change like for example the movement
like if normally is W to go forward if you change it to P and press apply to work go with P but if is not applyed it sould not work and sould pop up and widget [message] to save or to unsave
Enhanced input or legacy input?
Me who previously was registering every instance manually in the class because of this in my project :/
I think I need to do some reading and cant figure it out until then, thanks for the help tho
hey if anyone has a minute, could they please explain this to me. Thanks in advance.
PlayerController possesses a Character
from a PlayerController you can call GetPossessedPawn, casts to your character class, then call function respectively
"GetPossessedPawn" thats a good one, in my controller i just did get player character
Can anyone help me with this
is the cast to your door succeeding ?
looks like you trace and your looking to hit the door
hello
you are not tracing anywhere though
The Find (from an array) doesn't work if i only put one value?
i need to provide all those value?
Thank you and @remote meteor thank you
the BP array find need to match all the values in all members
you have to loop the array manually in bp
it was to be sure 😄
thats some german window right there 😆
The shorter answer is that you can't use them without them taking up more memory. You're using them so they have to be in memory.
What Datura is trying to explain to you is that you have a core programming class with the stuff used, but that is empty. You can cast to this and use it etc.
EG you have VehicleBase that has the components for audio etc in it.
Then you have VehicleA and VehicleB that inherit from VehicleBase. You don't use these at the same time in the game, but you're going to use VehicleA at the moment so there's no point in having VehicleB in memory with it's specific sounds, particles, etc.
If you have a datatable where you pick vehicles, you can specify the class by a soft reference. That way when you want to use A, you just get that soft ref and load the class, then spawn an instance. B remains unloaded and does not take up memory until something in the game loads it's class.
If you do not use soft references and you hard reference the class to spawn A and B, then both and their specified assets like sounds and particles will remain loaded at all times while that datatable is referenced by anything you have current loaded as well.
In the cases above, all of your game code would cast to and interact with both VehicleA and VehicleB as a VehicleBase. Nothing would reference or cast to either of these classes directly.
If you want to learn more about this. Consider taking a tour through the Sizemap, it shows everything that is required for a class to remain loaded. Everything displayed in a sizemap is considered a linker. That class references those things and thus they are linked to it and they need to be loaded before this class can be and will therefor me loaded into memory when that class is.
im just so good that i try code smth but i make smth else
I see
But if I were to only have one vehicle in the game, would I need a create classes that inherit from a VehicleBase?
Not really.
i got a problen with the "get actor bouns" so i want to get X and Y size but for some reason t doesnt work. the thing plugged the get actor of class is a solid mesh, anyone have any idea what shuld i fix?
Anyone know why the object still starts at 0,0,0 and then does the random motion inside the bounding box?
Its all in one BP
But at one vehicle, I'd have to ask why you have 324 8k textures with heavy audio and some particles running multiple dozens of 8k textures to be concerned with memory.
So you're saying I shouldn't be concerned?
You told it to. You didn't tell it to pick a random location until after 0.1 seconds.
Concern happens based on your target hardware and game requirements. It doesn't matter if you're releasing on Switch if you're making Sudoku.
Is your landscape centered in the level? If so it's a bit easier just to get it's location which is usually a -x, -y value. And then Abs both of those, and multiply by two.
ye i might try that thnaks
I'm doing that in our new project. 😄 Also {Insert obligatory insane hatred towards Landscape class here}.
Is there a way to delay something once ?
Maybe. But I think in this case since you want to wait for tick, you should just make the BP start with tick disabled, and enable it when your timer runs and you pick a position.
Yeah I might do just that right now, see how it goes
Could I do this in my actual BP_Checkpoint instead of in my BP_Vehicle (where it is now). Basically, can I reference multiple instances of an actor inside of that actor's script?
yeah that works
damn
hey guys! i have a giant merged static mesh component that has a lot of objects in it. for pipeline reasons, i cant manually separate everything into smaller mesh files (we have many levels that use a giant mesh from an import that is out of my hands).
is there a way i can select a portion of a static mesh component within blueprint? preferably using a specific material element as a selection?
(for context, the giant mesh has some lamps in it and i want to place some fake sprites of "lights" near all of these lamps, so i wanted to preferably get all parts of the static mesh component that have the lamp's material to approximate where the lamps are in the merged mesh)
Is it the same mesh used in multiple levels, or?
nope, just the one per level
just need to get the portions of the mesh inside an editor utility blueprint. the idea is i wanna place these new light cards all over the mesh based on my selection instead of painstakingly putting them down at over 100 per level with over 50 levels to do
Yeah. 😄 Hmm. Never done anything like that without sockets. :/
So I'm working on an onscreen keyboard asset and I can't figure out how to get these keys to stretch to fill in the space. Everything is added programmatically, through blueprints.
guys how i can make keybinds settings? with an apply button to apply them and change like for example the movement
like if normally is W to go forward if you change it to P and press apply to work go with P but if is not applyed it sould not work and sould pop up and widget [message] to save or to unsave
maybe a video or something on google similar to my message?
Hey guys, hope you all doing well.
I´ve been working on a Top Down Project and since the beginning I´ve been faced with some problems, which were minor but now it is adding up and have to be solved.
When facing North (as in the image) everything works well, the WASD inputs and movement works as intended, as soon as I rotate to face any other direction, it inverts all directions.
This would not be a big deal, as I can simply start the character facing North, problem solved right? Well yes, but actually no!
It solves the movement problem, but as I developed new stuff, I´ve come to realise that everything in the world gets affected by the different rotation.
I got an Actor that spawns some pieces at BeginPlay, if they´re not in a specific rotation, it will get messed up and before you tell me to change the attachment options the ones in the image are the ones that make it work as is, the rotation is the problem.
The final straw was when I got an AI character to follow my movements with its head, if he faces North, all good, if not, he turns in the opposite direction of where I am.
Can anyone can offer advice, it seems related to World / Relative location, i´m just not sure where and what to change
can I have a working example of detecting chaos particles in a field? I must be doing something wrong, but can't find what
Something is working oddly.
I have the code seen in screenshot.
The Enum have 6 options.
I can change the Enum all the way to the last option, but when I try to go back I can only go to the 2 first option. I can never make it go to the very first/original option again.
(I used Branches because I could not find a clamp option for these "byte" outputs)
This sounds like some odd math expectation somewhere you keep repeating. But it isn't really easily diagnosed. How is your character movement done? We can start there.
when i use a breakpoint and try to play the game the screen is black, what does that mean?
Is the ordering of BP Tick calls stable? Like if A went before B this tick, is it guaranteed that A will go before B next tick?
It is done in C++, it´s the TopDown Template, but instead of cursor, I created Input Actions, an Input Mapping Context and assign the WASD instead of the mouse cursor
Is there a way to have an actor component do something when its first added to an actor? Similiar to the construction script.
I have in the past used child actor components when they were otherwise a bad fit, just because I NEEDED a construction script.
huh?
I'm saying, I dont think they do have anything like what you're looking for, because I ran into the same limitation and was forced to use child actor components to sidestep it
anybody familiar with breakpoints that can help? would appreciate it
Yea that wouldnt be an option.
Just ask the question. 😉
most of us are familiar with breakpoints, it's a pretty essential part of programming 😄
Don't get me wrong, it's a shitty option, and I'd love to hear I'm wrong and there is a way to have a construction script with actor components
Where's the breakpoint?
Was gonna ask that
lol i did i cant get this stamina bar to actually fill up. its been about 3 days. sometimes when i put the breakpoint it will play and then stop and take me straight to the breakpoint event. others it wont play and will be a black screen
I wonder if widgets somehow default to a black screen if they aren't allowed to finish rendering
BDC Patrick said it never happened to him, and the guy uses CommonUI and all
No but like, show us the code with the breakpoint
if it doesn't stop, the breakpoint is not being hit. The black screen usually happens for me when I breakpoint UI anyways, until I resume
If I had a nickel for every unreal issue I ran into that no other human has apparently faced, I'd have, like, 5 nickels. Which is too dang many!
Neo do you know anything about that?
hmm this isn't in UI tho
see pins in #enhanced-input-system
i feel like it is something to do with refresh stamina but idk where
alr..
Is it possible that the macro there is calling some UI code? I wouldn't be surprised if breakpoints on macros aren't where they look like they are.
I might be talking out my ass here but I think the node that calls a macro is "transparent" somehow, like it doesn't really exist at runtime it's just calling the code inside?
when i put the breakpoint here it allowed me to play in editor until stamina was depleted and then stopped me and took me to the breakpoint
What kind of breakpoint?
im so lost
i press f9
And then continue playing and you have a black screen?
Show your code
that reply was not for you
i have the breakpoint on handlestaminaregen and it will let me play then it will just abruptly stop and take me to the handlestaminaregen node
no i was telling you im so lost lol i dont know what to do smh
Which one and which part?
If you want the movement it´s in C++
The part that determines the movement directions
guys im trying to make some procedural movement or something like that so im trying to make the character mesh rotate 5 degrees to the right when im going right and 5 degrees left while going to the left
i am trying with a timeline but it's now working well, any other ideas?
That looks fine, you're saying that if the character is not spawned at 0 yaw that player-driven movement doesn't work?
It works, the character moves, just not as intended, that is, the W turns Right instead of Forward for example
Can you try this?
Can someone please explain what this error means?
I think I managed to fix it by checking against an actual Enum instead of just a number. I did not quite understand how the Enum to byte stuff worked, so that might be the reason why I had trouble.
Now I do this and it works.
Thank you.
help i accidently made a ESP when measuring distance from a client 😂
When I disconnect the exec to the Break I get 2 of those errors
no worries, i appreciate the sentiment!! if i find something, ill post it here for others in the future!
Would I be right in saying if this timer gets called again when it's been started it'll still only happen once?
how do i move exposed properties higher up in the details tab? for some reason whenever i add a function, they drop to nearly the bottom of the tab. without the function, theyre up at the top
Id like to keep them at the top, if possible
When I am transitioning from level to level. How can I take stuff from one level to another? Like player and other stuff? Do I have to spawn them in the new level or can I take them as it is?
Debug print the rotations and such to see where the problem is
You need to spawn them, not sure what you mean with other stuff.
But it also sounds like you should start doing some basic unreal tutorials.
If you have a hard reference to an asset in a blueprint, then that asset must be loaded too when you load that blueprint. That's what makes it heavy on memory.
When you reference a blueprint in another blueprint, then the second blueprint must load the first, and if the first is bloated because it has lots of assets defined, then it also bloats any other blueprints that reference it.
If you have a base class that contains all the logic and is only using "Audio Cue" or "Niagara" variables without defining their values, then no assets are going to be loaded when referencing that class, making it lighter weight to edit and use around the engine as now you are only going to be referencing "Audio Cue" vs. "Sfx1", "Sfx2", "Sfx3" etc.. Any other blueprints that use this class reference are no longer going to require the assets being loaded just because they're using a reference to this particular class.
The child class would then have the definitions for what those variables contain and that class is what you would actually spawn to use, but not logically pass around. As this class is not referenced anywhere else in the engine, it would only load the assets If it gets spawned, at which time you may need to actually use those assets. If you wanted to further reduce memory footprints, you could use soft references to "Audio Cue" or "Visual FX" to prevent these assets from loading before they're actually needed and manually load them when you want to use them, though the size map doesn't really show this, but it could alleviate additional data from being loaded that doesn't necessarily need to be loaded just because you're spawning the class.
Pretty much everything is destroyed when changing levels. Very very few things survive a level transition.
How about travel?
Does the character stay intact or do you still have to save it and rebuild ?
Ded
When facing North everything is at 0
When facing South it gives me Y = -180
By North and South, I mean the PlayerStart
Which is why it´s inverting the inputs I would imagine
That's the be expected, check that the forward and right vectors you're calculating make sense
Hell all, anyone know how I can get around this problem.
This works:
This doesn't. The variable contains the same table.
Again, when Facing North, the W = 1 and S = -1 in the X axis
Same for Right / Left in the Y axis.
As soon as I face South, it inverts the values
I see, so an empty base class is useful when it’s being referenced by multiple scripts in a level
And a child class will carry out the functions of the base class without having to burden other scripts with its components
right?
it inverts your inputs ? the actual axis values change ?
i imagine this is an issue so simple to fix, however whatever i do it just isnt working. PROBLEM: Character sprints at full speed(600) while crouched, im trying to make it so that if if character sprints while crouched movement speed will only be 250. Default walk speed is 300, crouch speed is 200, sprint speed is 600, and im trying to get crouch/sprint speed to 250, however when i implement solution it seems to be overridden by the max speed 600 loop (loop is for stamina drain). here is my blueprints for sprint input, crouch input, and then also a template to my solution however i just cant implement it correctly. any help id appreciate so much, its my first time here and dont mind constructive criticism
Yes, when facing South the W is now -1 and so on
Why does it limit itself to only float between -1 to 1 , If I go above 1 the speed does not increase
what does your input look like, it shouldn't be affecting the axis like that
Correct 🙂
are you hitting the max ?
max speed
yes, I think
the fuck
you're saying the raw input values change based on control rotation?
probably turn up your max might make a difference
how