#blueprint
1 messages Β· Page 341 of 1
Hello, Is someone able to help me real quick I made a basic setup to trigger some dialogue when you walk through the trigger box and it works just fine. But what I want to know is hoe to make it trigger only once. Because right now it just triggers every time I walkthrough it
A do once node could solve that mostly.
so got an odd one here so when I run my game in packaged build I get this as the roughly common usage, I've noticed though say I have chrome open as well on something a video or something I find the video is like 5 fps a second roughly
my packaged runs lovely though from what I can see
and my GPU sits nicely roughly as you see there about 40% usage
Thanks man I'm still very new to unreal so any help is appreciated. and It now works as intended thank you
Not fully clear on the issue. A video in game runs at 5fps when you have chrome open?
other way around
so if I run my packaged game and i have chrome open and I'm watching something what i'm watching runs lower frames
Is Chrome focused or the game?
only happens when game is focused
And the video is in chrome?
which from other games I've played I've never seen chrome say chugg when playing videos in chrome
whilst the game is running and in focus
Full screen or borderless window?
Seen the other issue, focus on chrome making the game go into low fps mode. I'm unsure if Chrome has anything like that that unreal might be triggering. Do you have any unreal games to compare test with?
so game appears to be running at 60 fps regardless of whats focused
just seems to be chrome that shows affects when game is focused
Curious if swapping to borderless window helps?
let me try
just gonna load into another game not one of mine see what chrome does
pls help, I got a problem and I can't solve it, I'm trying to fix it for 1.5 days, I even changed engine versions. I'm getting Is Not Valid from inventory system. I tried to cast the bp first person character and i got cast failed. i promote the player char to variable, and that even made diffrence. im still getting is not valid. I'm pretty sure its giving me error because im getting None when i print it.
Im sorry if i cut yalls conv π
like how i can chance the variable
Show the interface call
this? im still learning
Your first screen has interactwith. You are calling that from somewhere
it does so not running fullscreen seems to resolve the issue for the chrome thing, issue is if I put the game in windowed I don't get the bar you get at top with the minimax, exit etc
For science, what if your in full screen and not fps limited or vsync?
is this maybe
There should be a third setting for this also. There is fullscreen, borderless windowed, and windowed.
difficult to see if chrome is having issue all the time but might be here and there
at the moment it seems the issue mainly shows if I have game in Vsync on, capped FPS, fullscreen
where as doing windowed for example the chrome issue goes away
This is where it is implemented, somewhere you have a blue node calling the same interact function
You see the prints right?
yes
i got, is not valid output and it printed "bp inventory system is not valid"
Blueprint Runtime Error: "Accessed None trying to read property K2Node_Event_Player_Character". Node: Branch Graph: IsValid Function: Execute Ubergraph Item Data Component Blueprint: ItemDataComponent
Find the blueprint debugger window, can't help with that on phone. Right click the branch and put a breakpoint on it. Play until it pauses, then look at the blueprint debuggers call stack tab.
okay letme try
It should tell you a list of functions that led to this, like from an overlap or button press
Yeah.now you need the BP debugger window
Yep, open the callstack tab
Double click the server interact in the middle, does that open the BP?
Yeah. π
This will be your issue
No, the argument
Yeah
i changed 5.2.1 to 5.5.4 for this
Good upgrade though, nicer rendering
You don't have to run nanite and lumen, you can run ue4 settings and not use ray tracing features
but it gave me errors on that to, when i disable nanite
but lets do not talk about that in here
hmm now, it gives me the same error, so weird
Sorry for sudden jump in the middle of the conversation
But my project keep crashing on 5.5 as long as I enable nanite/Ray tracing (Which didn't happen in 5.3)
Is this engine issue or there are a quick workaround for this?
Thanks in advance!
can it be a problem about the variables, the bp first person char variable is not instance editable
no its not
You have to get the character somehow. Is this inventory on the character?
Uncertain, what gpu do you have? Do you have a crash log?
yes, inventory system actor component is on the first person char
GetOwner and pass that as the character
where im putting it, there?
or the bp_inventory system
lemme try both
Here
Pass it as the player character parameter
okay, get owner right
Unfortunately the PC are in the office and I cant access the log atm
But I'm using 4080 super, other PC were already tested with 5090 and still crash tho
If I remember it right The crash log related to NaniteAuxiliaryBuffer
Hard to say then, but yeah hardware should be more that fine. You shouldn't crash even with older gpus, but overheating is a common issue there so with the question.
this param
If you get the crash log later, tag me with it and I can maybe help better.
Awesome! thanks in advance
which one tho
Yeah, pass GetOwner to that. You may need to cast it.
Component
okay
am i casting it before is valid or after the is valid
https://youtu.be/-cdzw9YE-MM?si=3yiO0uWqGz3VCM4q&t=1158
i was looking it from there
We are revisiting one of my first series on the channel; the inventory system series, this time with different implementations, improvements, and now in Unreal Engine 5.
In Part 5 we setup our Add to Inventory function.
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ry...
wait a minute
You can replace the is valid, cast is also an it's valid.
Technically you should change the parameter type to actor, instead of casting
wait it says Get Inventory System
it does not work again and again
ok im gonna do what you said
Hey guys i have 2 function i have made that do the same thing and i would like to know which one is better for performance, chat gpt already answered but id like your opinion
its about one function that go throught a lot of data table row check and other one that build map to make this data table check once and then just do some map look up
chat gpt said it was far more optimised to use the second function because get data row table can be relatively more expensiv than map look up
your opinion ?
im asking cause obviously the brute first function is simplier to make and understand fast
Consider these tutorials as a learning experience (either on what to do or what not to do) but don't expect fully working robust systems out of them. While he's not one of the bad creators you have to understand a lot is simplified in most videos to get a point across due to time constraints.
a hash lookup is certainly going to be faster given less iterations overall... but you could benchmark otherwise if you are pressed for speed. If going through nodes is also going to prove inefficient you'll have to move this to c++
Consider a simple test scenario with the same data set and the same amount of iterations.
yeah i know, it should not maybe work, cause of my beginnerless, and i did not expect it to work properly. I'm trying to learn
it should work in theory he doesn't upload bad content per se.
But always retrace your steps and double-check everything. Also consider learning simpler concepts first
First iterations won't work but you'll get a better understanding overall.
yes. I have a question, he directly added the nodes and it worked, i controlled everything. I changed versions, plus clean projects but none of that worked. My question is, he does and it work, why mine does not.
I think fundamentally the issue is that once you get the same outcome they have in the video you'll probably realize the system isn't what you wanted and you'd be back on square one.
You could have a tiny mistake somewhere that could break everything
its about the variables i think, he adds it without a reference
I see data tables, interfaces.. nothing fundamentally wrong but rather "advanced" if you are just starting out though
what kind of error ?
no, no. I'm not directly beginner(i think), i can make basic blueprint codes, i understand them.
disable nanite i got lik 10-20 fps right off the bat
it think it was like "Nanite disabled, r.nanite = 0" like this
i really dont remember
yes i had the same problem i got the fix though
i disabled everything that had nanite
and set a setting in the ini
now the message is gone
oh you get 200 fps ?
then it doesn't matter
i thought you were having performance issues
i mean it is unlit
not that much
im still getting 160fps with overclocked gpu
if your gettin 150 fps or so in game then your fine lol
what about it ? you probably want to plug the player in ? is this single or multi player ?
its multiplayer, im getting none from there
wait letme the screenshot
so you have an interface function that takes a player character
but in the image you have nothing plugged in
so are you trying to find the correct node ?
no i was changing it
it doesnot work with a char variable too π
so whats the error ?
im trying to fix it since yesterday 12pm
i get is not valid from the bp_inventory system
when is the player character variable set ?
its not, and i dont know how to
Does anyone know if it's possible to edit a class reference's variables from the editor before creating them? like here
right so thats the problem
so did you try get owner ?
you'll probably have to cast like mentioned
get owner, cast to bp third
i mean i tried but im pretty sure that i connected it to somewhere that is not belongs to
first*
ok so first
hmmm letme try it
just replace the variable that you plug into the function
with the get owner and the cast
the get owner alone probably won't work because it's not an actor its a specific bp
he must set the value at some point
maybe later in the video, or you missed it
or it could just be an error that they left out in the cuts, this stuff does happen
i watch the same video and the same part over over and over again π and still
yeah im thinking about that too
It must be set otherwise watch the entire video in case he mentions any mistakes (and the first comments typically)
i check that too
your "is valid" is empty also in that screenshot
ya thats a big problem lol
You are introducing errors on top of errors. Maybe take a coffee break
i mean it was not, it was connected to a variable
did the fix work ?
Right now it will always fail. But that's a secondary issue to the playey character not being set :p
if you are talking about the empty is valid, than nope, but that you said im still trying
can we vc tho, i could stream
i got no mic
π
seems like you missed something in the videos
or just misunderstood
i'm sure they plugged something in to that
they probably meant to check if Target was valid
this is the item data actor component
not this
this is the actor comp
It's a complex system for a beginner (multiplayer replicated inventory?) take it easy don't panic. You'll get there.
i have 25 days to publish
And we all miss tiny details sometimes.
Maybe start a video or two on basic debugging techniques
no i mean i was talking about the item data component
watching variables, breakpoints, etc.
i was talking about the problem with the cast failing
Hey y'all this is probably pretty simple but I'm sleep deprived and just want this to work before I go to sleep. Google has failed me.
Basically I just want this function to trigger when these enemies are detected as dead. When I use On Tick for the branch it works but throws errors the whole time because the Enemies aren't spawned on Begin Play, they are spawned after another trigger so the On Tick can't find the reference until they are spawned and it doesn't like that. I feel like there's gotta be a simple answer but I'm stuck...
Seems you are flying blind so to speak right now
my native language is not english, its difficult to explain
hmm
your branch isn't connected at all
nothing will ever execute.
I feel the basics are being misunderstood here :p
I get that
iswhat is this, you are checking if isdead right after spawn ?
so the bp_inventory system, is valid is the problem
it was the problem back when its connected
spawn them on a FOR loop
right because you checking right after spawn
on completed do whatever you want. and check the spawn options
and don't cross lines like that
there's an option to always spawn as well.
seems a loop would work fine.. with an array. but I've no context here.
also but why is he repeating three times the same code? different locations or?
yes different NPC's in different locations
well they said they are spawning three things
maybe step back a bit and figure out if this requires a known pattern solution
you can do it a couple ways, the way i mentioned on tick, or use an event when one dies, check them all
based on this I would have an array and loop through them. meaning I could have more than 3 or less than 3 and nothing is hard-coded
their locations are a product of a spawn point or a preset variable
yes an array would be best, so you can have more then three and add/remove them easily
im gonna watch the video and come back
as engage said you could otherwise store the return values from the spawn functions and check anywhere / anytime
also perhaps introduce event dispatchers or another communication method
maybe a manager actor, that you can use to control this stuff
there is the uassets
so your spawn manager (or whatever this is) can have a grasp of everything
dang it!
lol
yes typically you can have a manager (and also consider how many of these will spawn at any given point in time to perhaps consider an object pool as well)
this stuff is irrelevant, you have an empty is valid
3 of the same class is meh.
it's already loaded and you have a finite amount. wouldn't worry about it
does this stuff make sense ?
Sort of
its kind of working now, but some reason one my NPC's is spawning and immediately dying now and I don't know why lol
what does irrelevant mean tho
show what your doing
that's irrelevant in this case
"not connected with or relevant to something"
ohhh, okay
it means it's pointless, not needed
because the problem is pretty obvious
once you see it lol, these things happen all the time
place despair gif here.
The "is valid" nodes are required to avoid unhandled cases. Say you are given a bad reference you have to handle it or at least try not to use it.
OHHHHH
Any code that assumes or works on an "open loop" principle will tend to fail eventually.
So if i set event tick on the branch node, everything does work. But before the enemies are spawned it cant find them and throws these errors
But. If you don't have an input object. Common sense mandates it should return this isn't a valid reference. Null and all.
Same issue here except you are trying to access it.
perfect for an: is valid node
I was trying to find a way to enable the event tick only after they are spawned
You have no sense of state and each code assumes too much.
check the references are valid before you try to access them, if they are not created they won't error, once created it will check the values
consider after each one spawns storing their reference onto a variable. Then check against these variables if they're valid.
you can do this with a boolean tbh, but the isvalid is best bet
I'll make a coffee I think engage is set to the same frequency.
why it has success, and mine does not
expose on spawn i think
right right right
uuu im reliefed
this feeling
if the cast is failed it should also "asdasfafga"
ok sorry, but what do I link to the is valid?
it's a different node
don't worry about it
your success is the path at the top
hmm okay
I LOVE ITTTT
like this?
the references, check if they are isvalid before using them
now letme add destroy actor
kind of, but like i mentioned already promote to variable and use the variable on tick, instead of dragging from the actual spawn, but basically yes thats what i mean, just not that way
this is terrible code store the Return Value onto a variable. this won't work for more than one frame.
Understand that "Return Value" won't be there for Tick to see it.
we are all learning something new every day.
it's often the simple things that get people caught up
You'll trip a couple times before you consider avoiding the stone.
this does happen more often then i would like in videos
Meaning from experience you'll learn what to check and you'll most likely just see the mistakes.
but they have cuts where it's like, this is an error, this is the fix, or they fix it at the end
they are human! but thing is some videos appear to be improvised and others are well thought out
When you spawn the actor, store it as a variable. Then use that variable to check isvalid on event tick. The way you have this setup currently is funky.
clearly they're often just following what they've done and going back and forth on a second screen
π
you get used to it, and notice the errors
Yep because the reference won't be available you'll just try to access an invalid object at this point -- it'll be null for everything but one frame most likely...
Are you having trouble with the casting?
I think sethithy fell asleep.
Does anyone need help who is here right now?
Yep I would like help with my coffee.
Pours coffee okay, next...
Double espresso though.
sethithy has a logic issue but hasn't replied since.
This works, I'm not sure if its "proper" but it does work.
unconventional but it should because the set is just returning the handle at this point and it does indeed exist
consider grabbing the variable as a "get" to separate the nodes though
so your "tick block" isn't directly tied to your spawn code
then of course know that this is running on every frame for no good reason :p
in fact more than once.
(tick rate defaulting to 0.0)
yeah, that's the concern now. But now that it works at all I can iterate on it
right, decoupled:
lol fixed
Is it possible to create a folder in the level using an editor blueprint?
curious, how did you fix it ?
like this, still not idea though
because the function works and doesn't throw errors, but having it on tick isn't idea
i think; you should use C++, and create a cmd.exe proccess and mkdir on the directory
ya you could when you set isdead, check then instead like i mentioned
but this is on tick shouldn't be bad
i would run a do once after the true
so it doesn't keep setting the value
but it's not too bad
but that would still be checking on tick no?
just checking a different variable
yes it would, a boolean at the beginning would stop that
but the do once stops the setting of the variable over and over
but you could also just flip a boolean to true
like isAllDead
and then check at the beginning of tick
this will basically shut it off
but you'll always be checking the variable
well the idea is to check if every reference is valid not just the first because you are trying to access a member of the class
and when I saw the pattern (repetition of 3) that's when I suggested the loop and the array it keeps things much simpler
at the moment you have to do everything 3 times
your other issue (design wise) is checking for state on tick. where you could have a manager that knows how many enemies were spawned and will get informed every time one dies - then if the total amount have died it can proceed to respawn them or whatever.
if you divide the problem into smaller sections you'll get it working in no time
the "get informed" portion could be through an event dispatcher or an interface -- just two common methods
Consider the code reusability of modularity and how hard-coding limits your productivity in general :p
see I've done those things before but I don't code much and I forget how to use them every time I need to use them. Like I understand the logic of it all I think but it's the specifics of how to make everything communicate together that's tough for me to keep track of. Hence why I'm brute forcing it like this right now.
If nothing else this is a functioning proof of concept for myself and I'll refine it another day
I know. Perhaps an event dispatcher would work just fine but you'll have to practice using them
I guess at some point I need to get to C++, blueprints are so limiting
How about something like this? keep in mind these folders are available in dev builds only. Also haven't tested this it's pseudo code.
They are meant to complement each other though.
I got another problem i dont really know why this error exists
why i got this error*
not exist*
i got L(ocal) Has Failed
i checked the Any Empty Slots Available
but it does not go through the branch
wait letme ss
hi im new to game engines! does anybody know how to allow the character to turn or rotate while being restricted from moving, im trying to replicate the system in Valkyria Chronicles
That's the problem I only know one ha, I'll try that
I'm beginner too, I'm pretty sure that you could add clamp angle, and disable the walking input
but I dont know how to make that π
Amaaazing, it worked thanks!
How can I adjust the parameters of a MI when it's applied to the brush of an image component in a widget? Most everything I've tried is causeing the healthbar to appear distorted in the HUD
the turnd rotate are seperate from moving
Could it be related to how the texture is handled? the texture group should be set to UI
If you double click on the texture itself it probably defaulted to something else although I'm not certain that's the primary issue but that aliasing seems to be related.
Ryan is about to receive an invoice!
Yeah, the parent Material Domain is set to User Interface π€
But the texture group itself I mean.
It could still fall victim of different filtering
Ah - the material is 100% procedural, no external textures used
wdym?
i mean that turning and movement are not linked unless you link them together
usually
are you using the camera to turn ?
or what are you trying to do rotate the chracter ?
nope just the keys, still learning what the functions do
so the boolean shuts it off right ? drag from fase in to the execution on the right
it will run when you can't move
engage how did you disabled the nanite
drag from fase? sorry aint getting it, and yeah the boolean shuts it off
ohh false, but what should i connect it with? just to only make it rotate
so did you disable it in the project settings ?
plug it into the rotate stuff on the rights execution
this was the error i was getting
save a backup of your project just in case
but search NaniteEnabled == ture
in the content browser
i was wrong, the character does follow the camera while pressing W
so there is only
not mesh
one ?
yes
one thing with nanite enabled ?
yup
right click and disable it
i did
have you ever got into your DefaultEngine.ini ?
i need apply changes
and i applied it
now im gonna check it
now it doesnt show up
is the message still up ?
I know that file
do i need to restart
np, that message bugged me for awhile
wait a minute
when i said 2
it was for inventory, i changed 2 projects for inventory
but the whole game is 12
thats a lot of versions you have already
yes, but alot of them are not working properly
the previus one was beautiful
got dialogues etc
now starting clean again π
i found out that Get Control Rotation turns the character towards where's the camera facing, but i cant seem to find a node that connects it on false in the branch node
just connect this white line
i have lot of part of my Ui that are pixelated in Unreal engine, i don't know where it's come from ?
- i have the Texture in 256*256
- the texture group is on Ui , compression setting on UserInterface2D
Can someone have a idea Why it's still pixelated ? maybe the problem come from my Original Texture but i don't know how to identifie the problem
so the texture is 256x256 ? and what is the image component size ?
make it 256x256 as well
and then does it look pixelated ?
connected it but does nothing tho, its just connected on the Movement Point system
yep
ah never mind i have a size box on top
the size box is 100*100
ok disconnect that, show your rotation code
so i have to export the exact size of my image ? so if my ui in UE need to be 120x120 i need to export it to 120x120 ?
as far as if you scale it up then it will be pixelated, down not so bad but still yes
if you stretch an image from it's original pixels it will not look good
except for something like svg
scalable vector graphics
you can scale the shit out of that np
im just using the default 3rd person template
but pngs your pretty much stuck with close to the original or it looks weird
it shouldn't be too bad tho
whats the original image look like ?
ok so you don't have any custom rotate stuff anyway
well the template has two ways of rotating tho, from forcing the character to follow the camera and following keyboard input
if you want to scale something like this use the plugin: svg importer
and make this an svg
that should let you have a nice circle at any scale
personally i would have ai generate the file
if i have other stuff that are not circle but Heart or Square or Icon, all made in illustrator does the plugin work too ?
as far as does the plugin work, can you export as svg ?
if you can export, it should be able to import
idk much about it, but i know thats how you get scalable graphics
it's literally in the name
because this is a common problem with images
you can smooth it out like how these things upgrade the resolution of stuff with formulas
but thats a bit too much, if you can use svg just go with it
i will try this with the person who make Ui in the project tomorrow ! thanks for the response and the help !
Not sure what's causing this. Not familiiar with this play-in-editor error not how to resolve it. I am able to play test in the editor but the feature I am trying to add doesn't work.
Trying to add a actor component highlight when the player looks at an object.
How always wondering how do you achieve to have this angle on the node link ?
You can edit some of the blueprint graph settings in the Engine Settings. But this specifically looks like the electic nodes plugin.
Oh gotcha. Yeah, it's electric nodes. A paid plugin
Can you show the internals of GetStaticMeshComponents?
anyone know what blueprints should i use after the false in the branch, where i can turn my character to any direction using WASD but without moving? (Turn in place)
whats the best to unlock options depending on choices?
I want to have a list related to a database. there will be multiple comboboxes menues and depending on the choices in each the choices change for the next.
If the first is A then the next will have A1 A2 A3 A4
But if the first option is B it would have B1 B2 B3 etc.
What nodes are best to make something like this?
i think you'll need to make this from scratch because you don't have any turn logic, so what you can do is just on the false branch do your custom turn logic based on the inputs
you want it so it turns, but doesn't move is the point right ?
yeah, but i cant seem to make the character turn in place using stop movement immediately as it creeps bit by bit
i just need velocity to be zero
since the character turn via keyboard (WASD) already suffices
ya get rid of all that stuff
you just need x
so you can rotate left and right
10 * x axis
the white comming off false
imma try
yeahh that exactly
10 is pretty fast change that number for different speed
although my bp looks different (im on 5.6)
right click the return value, and new rotation, and split the structs
so you get x, y, and z
omg i can do that? bruhhh
finally done it!!, got that dopamine from that eureka moment, after being frustrated the whole day lmao
thanks a lot!
Ok figured it out, Incase anyone else has this issue. I just put the collision onto the enemies instead of the player and that seems to work fine, I just have to destroy it when they die so it doesn't interfere with the ragdolls.
new problem, im trying to set the rotation based of WASD, but so far ive only managed to make the character face where the camera is pointed at by using W
Usually you don't set the character's rotation directly. You set it's controller's control rotation. And in this case Characters have a setting to follow their velocity instead of control rotation.
ohh, so how do i make it follow it's control rotation?
It should do that by default I think. There's some settings in the character class, one sec.
im trying to make it turn in place tho
These settings here. Control Rotation will usually be your camera's direction. Try making sure UseControllerDesiredRotation is false and OrientRotationToMovement is true, assuming your WASD moves the character in the direction you want.
so you want w to go forward ?
and s back, a and d point left and right ?
yeah that exactly
but still follows camera whenever W is pressed
so far it only responds to W following where the camera is looking at
already is, its just I want it to work with no displacement
If you dont account for delta time, the rotation will not be frame dependent.
More fps = faster turn
so i put the x axis in the compare
and add to the control rotation of
z
to point left and right
you can do the same with y
and you would point straight,left,right,backward
from control rotation
right yes delta time
you'll have do some math to get the in between angles
How do i launch unit "Away from self" ?
Normalize(Self.Location, Other.Location) is the direction pointing from self to other
that x HowStrongYouWantToYeetThem
wdym "away" in what direction ?
You probably want to add some Z so it's a knock back + up instead of just back, so they actually leave the ground a bit and carry some speed
when possessing a character after character gets in the vehicle I can't control my character I can only look pitch and yaw axises
inputs are not working
and what are you possessing here the vehicle ?
Offroad_Pawn
Is there a better way to get references from the player blueprint in the animation blueprint than doing this?
This is what I've always done to reference bools and vectors that I want to use for animations.
I possess the character in the car, but he can only look around, but he cannot walk.
because he in the car right ? he's sitting ?
yes?
why would he be walking
he should be driving
you need to possess the character again ?
the original one
if you want to move around again
If its just simple variable gets, should be able to just use the property accessor or some shit in the anim graph directly.
you don't possess anything, theres nothing plugged in where it says Exec
use the return value from the get actor of class
this is old code
I'm already possessing it
I used to use return value of get actor of class
ghost nodes. its the new trend!
Are you certian that this is passing back a valid component here?
It wasn't being mentioned in the error log, so I didn't think it was a problem
Hmm, odd. It's not valid.
Any idea why?
@maiden wadi Hello again, its me the guy from yesterday who ask about 5.5 Crash, here is the log
you got a lot going on in that log... but your main problem seems gpu device lost.
did the project work before? did you update video card drivers?
Hey Ben. thanks for checking it out, for more info:
- Disabling Nanite/Ray tracing won't cause this crash anymore
- It works fine in 5.3, after upgrading to 5.5 this crash happen
- Disabling Ray tracing Nanite mode through console command also prevent the crash "r.RayTracing.Nanite.Mode 0"
this could be an driver issue, but the error you get is so generic that it's impossible to pinpoint the exact issue
Is there are some pattern that could solve this kind of problem before?
Like downgrading to specific driver version?
I need to find the best way to do cool C++ stuff in Blueprints. Suppose in C++ I wrote UClass ClassA
-
Then in another C++ class a public uproperty
TSubclassOf<ClassA>is declared, which can be filled in Blueprints with any subclass of ClassA. -
Back in code, when I wanted to use the Blueprint Class, I would just grab TSubclassOfClassA, use
GetDefaultObject()to get the UObject, then cast the returned UObject into ClassA. Easy peasy.
There is no TSubclassOf variable type in Blueprints. Closest I can find for now is Soft Class Path. How can I accept a BP class and turn it into an object in a Blueprint's Event Graph (i.e. paragraphs 1 and 2)?
Thanks in advance, and let me know if you need clarification on the question.
Given the SoftClassPath, I have tried using it to Async Load the Class or Object Asset, but Casting it to ClassA fails. No TSubclassOf<A> variable exists in Blueprints either.
you just pick an object type and make a class variable
that will also accept child classes
So I'll choose the ClassA type, and then for the ref type I choose "Soft Class Reference"?
either works
I thought I already did that? But now I need to find an equivalent BP node to 'GetDefaultObject()'?
The CDO is fine because I'm not changing any values in these BP classes at runtime.
The original problem is... if I add a public ClassA Soft Object Reference to a Blueprint class, I can't assign any BP child-of-ClassA to that Soft Object Reference. Β―_(γ)_/Β―
Anyway, what I should do is get rest. Sorry, I picked the wrong time to ask this question in the discord server.
someone has made one https://blueprintue.com/blueprint/ekzd2_78/
putting it in a function library should work
That looks very interesting! Thank you, I will have to try that tomorrow morning.
Anyone? #blueprint message
With zero context. (that i've read so far)
Values can be valid, but the actual object ref is invalid.
AKA, able to get display name, but not being valid.
Since, is valid checks for null, and marked for garbage
yeah exactly
anybody know how to make a character stay in one place, but can move into directions using WASD and Camera + W (basically turning in place), like there is an invisible cylinder wall preventing character displacement
i tried set actor velocity to 0, but i doesnt work as the characters creeps forward bit by bit ( i think i need the speed to overide and be a constant of 0)
hmm isent there a minimum speed value thats set to like 25 on the CMC by default ?
try setting that to 0 also
where is that tho? im new to unreal and just used the 3rd person template, havent delve much into that since im not adding sprint in the game
OHHH, nvm found it in character details in viewport
thanks
hmm it still moves tho despite these
Just got a chance to glance over this. Yeah your primary issue is here.
- Device 0 Removed: DXGI_ERROR_DEVICE_HUNG```
Could be a lot of things. It's not as easy to diagnose as the DXGI_ERROR_DEVICE_REMOVED error, which is essentially... Try different drivers, lower your card's clock speeds, fix thermal paste, don't use a laptop without keeping it plugged in.
Hung usually means application derped. Infinite loops in shaders, etc. Since it's two different cards. I would start by making a blank level to see if it can be reproduced. If it can I would start with stuff in the project's graphic settings. Turn off some advanced features. If it cannot be, then it could still be project graphic settings, but it could also be something not cooking well from the level maybe.
It might help narrow your search in that it seems this card at least was stuck on LumenReflections and TranslucencyLightingVolume code.
Got it!
I've tried lots of stuff in the past some just like your suggestion
Looks like easier fix for me is just turning off ray tracing nanite mode then manually fix the mesh with broken nanite shadow to keep triangle percent instead off nanite fallback, thanks for helping!
you probably need to, like i already mentioned do a custom rotation code
made my own i think, and i dont know anything of what im doing
Feed value to the delta time and interp speed.
Trying to do a tank movement (classic resident evil / dino crisis)?
Can just add rotation, why do you care where the character is looking at if you are trying to do resident evil classic movement.
in valkyria chronicles, where the character is looking at is important, since they cant counter attack or intercept fire if theyre not looking at enemies
does it work ?
not yet kekw, double checking stuff
FINALLY IT WORKS, ahem
ima fine tune delta and interp
you have no delta time in your interp
yoou don't tune delta
you usually plug in the delta time
you can use: game delta seconds
you fine tune the speed
So being marked as garbage collection would explain why the editor still play tests but the BP throws errors. However I don't quite follow the rest of what you are talking about.
Also what info are you missing that would help you help me?
this?
I want an inventory system showing as a list in the UI. I made something but its not good and im sure there are better ways to do it. most my items will be in a datatable where it will have a name and information about the item. i might also add damage to weapons etc there but not entirely sure if it will be added there or elsewhere yet.
I would like the inventory to be a bit like skyrims kinda.
Im currently looking for guides on youtube, tho the one issue is that I also need to be able to add items manually through text. I did make this but before spending more time on an inventory system that is pretty bad long term. what are better options and how should I tackle this?
yes and 100 is way too long lol
You can use that unless you want to support slow motion.
You can get the actor delta instead. Cache the value from tick and use that.
What I don't get is why does the get node for the array output the object name that it supposed to but it's stiill saying it's not valid.
I.e. Why is it always going the Not Valid route when it's getting the correct actor component?
I assume you believe its valid, because the display name is correct/ a value.
But, you can get the value of something that is marked as garbage (aka, "invalid")
Before its 100% gone.
Hence that might be where the confusion is.
- Says invalid
- Says it has a value, so how can it be invalid, if it has a value.
Huh odd. How and why is it being marked as being garbage collected? How do I prevent this?
UE5 be like
This convo is making me think of this. lol
BP wise, garbage only really comes from the destroy function calls.
(destroy actor, destroy component)
Have you tried implementing the destroy function on either this component, or on the actor that has this?
To see if its firing, to verify this is the cause of your issue?
(If this project involved custom C++, you can directly mark something as garbage)
actor delta? max - current speed?
i think they mean, on event tick, set the delta to a variable, and use that
this sort of thing is usually run on tick as well, are you running this on triggered ?
I have not added the destroy function on this BP nor the component that it's trying to reference.
Just to make sure I am on the same page, are you suggesting I do that?
yeah its on triggered, i just connected it on "False"
ok but idk how smooth that is compared to tick
i would probably use that boolean on tick
and run off the false of that
this would really smooth out the rotation imo
tick->allowMovement(branch)->false->do rotation
Iβm saying implement it in the override, to see if itβs being fired/ used for some reason, to verify
Gotcha. So put it in the BP where the component itself exists? Or within the BP that is trying to reference said actor component?
like this?
Itβs an override.
So, inside of itself
Does anyone know if sync SaveGameToSlot's return value (for whether we save succesfully) is separate from writing that save file to disk?
When we quit our game after it's done saving (after it returns true), the save file actually gets corrupted (we detect it by loading save slot then casting fails) when it's either on an old device or when the device is having low computational power.
For example SaveGameToSlot returns true -> quitting on a quest 3 never corrupts it. Doing so on very old quest 2 will corrupt it if you quit quickly, even after the success. Doing so on a very old quest 2 while it's recording or on call with someone, corrupts it if you quit a bit after the success. If you wait a long time after success though, it won't corrupt.
That's making me think that the success boolean is seperate from writing to disk or something, just wanted to confirm if anyone knows that true?
If so, is there any way to detect when it's truly done saving on a sync save game to slot? I don't want to be loading game from slot while it's still writing to disk to check - and DoesSaveGameExist doesn't check whether the save is corrupted or not (since we don't know if it's corrupt until we cast it).
No, delta here means the time it takes from last frame to current frame.
Which you can get on the actor's tick function.
So inside of the actor, correct?
although regardless of value in the Interp Speed, the character snaps quickly to the cardinal directions of WASD
no i wouldn't use the same thing, create a new branch
I am working with two BPs here. That's why I am needing clarification.
i tried 10, 100, 1000, to a million but it looks the same
still looks like this, does it need animations or something?
try like 0.1 in speed
and show the tick, hopefully with a new branch
You can't override the destroyed function for this in BP. It's a C++ class that you haven't overridden. It's a StaticMeshComponent.
Can you show the full code for that debugging your're doing with the prints and checking validity?
uhhh
tried this instead but still looks like this
i dont get it at this point, kept brute forcing everything the whole day
well your doing a lot wrong here
ya it seems like your randomly trying stuff
i'll see what i can come up with for a smooth rotation about the point where you press the keys
i'll try this, it's interesting
well im new to the engine, and being a game dev in general
ya your understanding of the flow of things is a bit off
you don'tt need twoo branches
Get Function
And the Set Function
https://youtu.be/EtUlqupLfRI?si=YAKnuRWw7KXJY32o
This is the tut I've been following
Explored how to create a powerful and customizable Highlight Component in Unreal Engine. From attaching it to actors and working with tags to adding parameters and events, you now have the tools to enhance your projects with stunning highlight effects.
If you found this video helpful, donβt forget to like, subscribe, and hit the notification ...
Only about half way through though
If there is a more streamlined way of doing object highlighting when hovered over I am open to it.
if it's failing i'm guessing the tag is incorrect ?
or perhaps the component class is not static mesh component ?
I've tried removing the tag from the component and it failed anyways. So even without a tagged component is throws errors.
so check if get owner fails
And it is a static mesh.
but did you add this component ?
in the video he adds the component dynamically
It's added prior to runtime.
Where in the video does he add the component on the fly?
I haven't seen him do that yet, only about halfway through the video atm
Also the tagged Component isn't what fails
You can see the errors that are created at that link
The ActorComponent BP is what's returning errors, not the actor that I tag its component.
well when you say it fails, and you show an isvalid i assume you meant that
maybe i'm not understanding
what is failing ?
It's failing to work. lol
The Isvalid is also failing to...well be Valid.
Because of that I don't know how to make it valid.
hello, I need some refresher on some BP basics.
basically this problem.
let's say i have BP_Parent and BP_Child , BP_Parent has a function here, we're renaming some function parameter name.
while some was okay, but there are few that had this problem. normally this is kinda easy to fix, im checking whether there are preventive measures, better practices, and cleaner approach in renaming things so that we can try to avoid this problem in the future
Image
well no shit its not working lol but i only know what i can see from this side, and theres a way to debug things, which is what i'm trying to do, and i'm confused right now lol, if the isvalid is failing thats a problem, and should be the first thing to check, as far as making it valid you debug it's easy process
so you renamed it, and created a new pin and the other pin is invalid ? if you hover over the error it probably says that pin is no longer valid, i'm guessing you deleted one ?
renaming shouldn't be an issue, it's deleting that usually makes this error
simply renaming them
although we observed that these errors are coming from opening an unopened blueprint that references BP_Child, the one is currently opened in editor doesn't seem to have this issue
i might be wrong in this and might be exactly the points you mentioned too
It's not easy for me to figure out why it's returning as IsNotValid when it shouldn't be. I have no clue why it's doing that because all of the nodes are setup correctly.
ok so you want to check if the get owner is valid first
which it should be
Okay. How would I go about doing that?
ok so you don't know much about unreal yet ?
as far as what even is valid does ?
maybe you should watch a tut on blueprints
so you can better understand what i'm saying
you want to check the output of the get owner node is valid
Doubtful. I was under the impression that it checks if a object being fed into it is a valid object.
yes, it does
and your isn't so
you need to figure out why
Okay. So maybe I know more then I realized. lol
this is debugging 101 you'll be doing this a lot lol
And gotcha.
Yeah debugging is...not my specialty. I am an artist first, and a programmer loosely second. lol
I appreciate the help tho
np, i can help so much though from this side of things
and ifi you don't know how to check if something isvalid then idk what to say
except watch a blueprint tut
because it's one node that you plug into execution
Using a print string node to check what's coming in from Get Owner node
yes thats another option
That and breakpoints is about all I really know when it comes to debugging
but isvalid is a very usefull thing you should know
and just using it is pretty simple
just put in the execution
i think you should watch basic tuts, i'll say it twice lol
like some blueprints tutorial
about execution, and functions, input output
but the point is you have a node plugged into isvalid, and a node plugged into that
the question is which one is a problem
so you know that the last one is invalid
but what about the owner
is this valid ?
Well that was fucking easier. Would help if I put the ActorComponent on the child class I want rather then the parent. I feel silly now...
lol
This is clearly what I get for trying to do BP programming when tired....
Thanks for the help Engage, and the others involved.
programming is funny like that, you work all day and its something so stupid lol
like, wtf really ?
sadly yes. but sometimes we're just tired.
so it helps if someone else can take a look at the problem.
yes after awhile i tend to try to come on to discord and try to get someone else to look at it
for sure a second pair of eyes is essential
"isvalid" is indeed very useful and an important aspect. code shouldn't assume.
even if your entire process is highly deterministic just don't risk any assumptions.
also writing things out helps and often when you try to describe the problem with details you will find what you are actually missing
Also something not being valid can be 100% perfectly ok
MyCurrentWeapon is not valid when I don't have a weapon
Anyone familiar with how GASP is built able to answer a question? Wondering where GASP takes measure of the X & Y velocity values for interpreting the animation, when you properly normalize diagonals so that you don't move at hypotenuse speed, GASP starts moving you in unusual ways, either slowing the animation or stuttering the movement speed, wondering if anyone knows where you'd normalize GASP diagonals.
Why references in DataAsset keep reseting between editor sessions? For example when i use this DataAsset in blueprints code, icon reference is valid, but when i close and open editor again, it's no longer valid until i reopen this DataAsset
Are you changing the asset in code?
no, just reading from it, i also tried to run packaged build, references are broken there too
Primary Asset id is fine, but references in it like mesh or icon aren't
also, they don't really get lost from DataAsset, they are just like "hidden" until i reopen asset
if i open DataAsset i don't need to reference something again, it's already there, but for some reason at runtime is not valid in packaged build and after editor restart
Hi, For my interaction system I am using a component that lives on my character pawn class which also handles displaying the interaction widget by creating a widget component and just displaying the widget at the location of the interactable actor once the player meets the conditions required for interaction, however I also have a widget that displays when the player is overlapping an interactable actors sphere radius which displays a widget that indicates the actor can be interacted with but I have this 'indicator' widget being handled on my BP_Interactable_Base class instead of my BPC_PlayerInteraction component where my 'interaction' widget is handled.. so I want to move this logic from the base class over to the component because that's probably where it should be really.
Right now I have a widget component that displays the 'indicator' widget when the player overlaps and stops overlapping the actors sphere radius (handled on BP_Interactable_Base), I think what I need to do instead is have the BPC_PlayerInteraction component create a widget component for every interactable actor the player is overlapping with and display the widget at the location of those actors and then destroy the correct widget component when leaving an actors sphere overlap whilst also keeping it displayed on any other actors the player is overlapping, does that sound about right or is there a simpler or better way of handling this?
I love importing FAB assets. π
What in the actual fluffsticks?
Did someone have a siezure with the copypaste and just roll with it?
I guess? lmao
I'd put it all in one spot myself
What makes a thing interactable?
I am using the pawns capsule component's overlap events to check if the actor they're overlapping implements the BPI_OnInteract interface and has a 'Interaction Overlap' tag so I can make sure the actor they're overlapping is the right overlap for interaction.. as for the conditions required for interaction that is that the player must be within the Interaction Overlap and must be facing the object via dot product checks that happen in the 'Choose Interactable Actor' function which sets a 'Current Interactable actor, this all happens on the BPC_PlayerInteraction component which handles the interaction widget being displayed/removed.
My BP_Interactable_Base on the other hand currently has a box overlap as the 'Interaction Overlap' and then a sphere overlap for the 'Indicator Overlap' and then just a widget component for displaying the indictor widget which i'd rather the BPC_PlayerInteraction component was doing instead so this base class wouldn't have any overlap or widget code
The player can only interact with one actor at a time so the interaction widget is only ever displayed on the 'Current Interactable Actor' and removed when its invalid (by no longer meeting interaction conditions), however the indicator widget can be displayed on multiple actors as it depends on how many actors the player is overlapping
I'm thinking I can just check for an 'Indicator Overlap' tag and use the same Handle Overlap events to detect when the player is inside the sphere overlap of an interactable
Just not sure what the best way would be to create and destroy widget components as and when needed when overlapping or stopping overlapping each actor
I'd just put it all in InteractionComponent and have it be the thing that handles it all
InteractionComponent:
Begin Play -> add overlap collider to owner:
Begin Overlap? -> Update
End Overlap? -> Update
Update -> Choose which item to select and show the widget (or hide it) using data from selecteditem
Interact -> selected item? -> interact with it
Ive already got the interaction logic and widget itself being displayed correctly on the Interaction Component, but how would it work for displaying an indicator widget on all other interactable actors that the player is overlapping that aren't the 'Current Interactable Actor'?
The sphere overlap on BP_Interactable_Base (the Indicator Overlap) will be triggered before the box overlap (Interaction Overlap) but you can overlap multiple Indicator Overlap's of multiple interactable actors at one time so the indicator widget should be displayed on all of them
This is how i set Current Interactable Actor just in case
That's 4 states a thing could be in:
Not In Range
In Range
Selected
InteractedWith
If you want to show a little thing on all in range and the big thing on the one being targetted, then select the one being targetted, set it to show the targetted status thing, and the others to show the InRangeButNotSelected
I'd still do it all from the single component on the pawn though, then you can just nuke all widgets and recreate on update instead of having to tell actors to stop showing stuff
The InteractableActor doesn't need to know or care if it's in range or selected, it should just sit there until InteractedWith is called on it
Yeah thats what i'm wanting to do, the interaction stuff is already happening on the component as it should be I just need to whack in the indicator logic stuff on to it as well rather than letting BP_Interactable_Base handle it
So how should I go about actually setting or detecting these states? My HandleInteractionOverlapBegin/End events are hooked up to the pawn's capsule component so I can detect when I've hit anything but ideally without casting to the actual BP_Interactable_Base class, wanna avoid coupling them if I can.
Do I just need to check if OtherActor implements the interaction interface and add them into an array like I'm doing now which would determine the ones that are 'In Range', then use that array to determine when one becomes 'Selected' by the player meeting interaction requirements? (the Choose Interactable Actor function), but how should I set up the logic on my interaction component to create widget components on the pawn for every interactable actor that's 'In Range' that just displays at the location of the actor (not creating a widget component on the interactable actor directly), but then removing that widget component that is displaying at the location of the actor when the player has stopped overlapping that specific actor while keeping any other actors their overlapping still displaying? I'm not entirely sure how to set that up properly while having the interaction component do it all
I hope that makes sense π
Anyone have any ideas as to why my niagara systems aren't showing up? says they are spawned and set when I print to log. works in begin play. but not construct. suppose you can't add components in construct
If this is all handled in a component on the pawn it's easy.
Update -> everything you're overlapping that's interactable is at least highlighted -> choose the best one -> that's the one "selected" -> do whatever that means
You don't really need to keep track of any state besides the one selected
@near bloom sry for the ping, is there an example project for the loco tips tutorial? Would be cool to explore a made project
Nah. I don't know if I want to make something like that, esp. with having to keep it up to date
Its more about teaching at a high level overview than anything overly specific, but ofc I recognize the value with an example project
Will keep it in mind for the future but unlikely
The closest thing is this: https://github.com/Vaei/SimpleLocomotion

I use this plugin as a base for all of my locomotion plugins/systems then extend from there
There is no data asset impl there but it does do most of the other stuff including anim states
Guess I should link that repo on the wiki somewhere
Not sure if you got anserw but are these structs made in bp? if yes then it's probably the cause.
how do I hide this big obtrusive icon from my BP?
there it is
Anyone ever have an issue where you Widget stops working after a few inputs? Like all the options work but it completely freeze the buttons a few inputs. the game isn't freezing just the widget
For Animation Blueprint, where should I post my question?
Should it be here or somewhere else?
Thanks!
I can't see that somehow, Until I clicked
you have to go to channels and roles at the top and set some channels visible
Oh right, I forgot about that hahaha
I've posted my question, thanks once again π
need probably more details about that, any video? do you mean the button stops working? like cannot be clicked? or can be clicked but doesn't do what it's supposed to do?
So I've isolated the issue to clicking this button. after 2 toggles of it the whole widget stops working.
It's toggeling another widget as visible and not visible so I dont know why its affecting this widget.
Can you try to set the one Set Visibility to Collapsed instead of Hidden and try again?
So it works one time and then it doesn't? Or it works 3 times and then it doesn't?
it works two times, like toggle on, toggle off, broken.
So it's hidden at the start?
It can be either
this is a pause menu, so you can open the menu then toggle the main UI visibility
So when the menu is up the game is paused?
yes
In your PlayerController do you have a node that Set Input Mode UI Only or Set input mode Game and UI somewhere/
I do not
Ok so try to Get Player Controller -> Set Input Mode UI Only after you set Hidden, and Set input mode Game and UI after you set it to Visible.
where are you pausing game?
also try to print boolean of IsVisible and click if maybe it returns true but it's not visible
Im pausing the game from the player controller
I tried to put it there too and it didnt help
I put a break point on both set visibility nodes, they both work but after the second it still breaks
I would use a bool instead of flip flop. It can cause issues
wait i think i found the problem
i think the gameplay ui is taking priority or is being set above the options menu when its made visible, therefore blocking the options buttons
Is there a way to set "layers" for widgets so the gameplay ui is always below the options menu?
Can you show a screenshot what you mean
you can set z-index of all widgets so they are above/below each other
^
where would I find the z-index? I googled it but can't find it
Sorry it's Z-Order
but I think you can only set it when your main base is Canva Panel
i think this is your problem, i would change the way you add the Resume/Option menu, instead of adding it to viewport, get GameUI and add it as a child to some panel/border.
or you have to remove the gameplay ui before adding option menu
Often this get messy quickly.
And kinda hard to trace.
yeah its not solution in this case for sure
How would I go about doing that?
Im not seeing GameUI anywhere
I would start that your GameUI or GAMEHUD widget (or whatever you call it) should be created in HUD class and not in PlayerController.
Then inside that widget I would add Panel/Border or some place and call it ResumeMenuPanel for example.
Then when you want to add/remove the ResumMenuPanel you get PlayerController->GetHud-> and here you can cast or have interface ToogleResumeMenu -> Add/Remove widget (which is just Add Child to ResumeMenuPanel on GameUI).
With Blueprint, I want to create a market place that opens when you click the e button on the computer. I want players to buy items from there and have those items spawn at a certain point. Can someone knowledgeable on this subject help me?
Hello, I was following some tutorials trying to get the result I want. basically what I'm after is once you hit the trigger box you get some narration with subtitles and it works great by itself But after that's done playing I want a door to open up in the wall. So I was told to use timelines and after watching another video on that I made an actor for my door added the timeline to it and placed it in the level whare it needs to be but now I don't know how to connect the two. and make then play out as intended.
One way you can do it is to pull off the blue Return Value and look for "Asign Audio Finnished". the Event that it makes will fire when the audio ends
Say, is it okay to have multiple save game objects in the same game instance?
Nothing against it so much. Can be cleaner to use a subsystem for it, but can't use them in BP. :/
hello there, i seem to be having an issue with collision whist using a spefic skeletal mesh asset, and im unsure how to fix it honestly
theres also a issue where the player slightly moves left on going forward, which i think is related
it prints valid in the event construct but not when i am calling the function
help i am losing it
show more blueprints
how do you create UI_Weapon? how does it get reference to these variables that you check if they are valid?
do you pass them when you create that UI_Weapon widget?
wait these are variables of text blocks and you cannot access them?
It's the collision on Skeletal Mesh and CamModel, they are blocking each other. The second skeletal mesh you tried also has collision it's just smaller but if you look closely it still getting blocked. make the cam model have no collision at all or you need to make it specific so it ignores the collision settings of the skeletal mesh.
When you are in input mode game and ui for a widget, if you hold a mouse button, you can drag around and move the camera, as well as the mouse disappearing. How do you turn this feature off?
Well where you call the event
The mouse disappearing is hiding the mouse when captured. For looking around you should set the... Controller I think to now allow look inputs.
Hey guys!
I'm new to UE5 and I'm building a main menu for my game. I've noticed people use two different methods for handling menu screens like Settings, Credits, etc.:
1.Everything in one widget.
Using something like a WidgetSwitcher to show and hide different panels.
2.Multiple widgets.
Creating a separate widget for each screen and adding/removing them from the viewport.
I'm wondering if there's any significant difference in performance between these two methods, or if it's just a matter of organization and personal preference?
i think you can try game mode ui only node
and also show mouse cursor in the controller
Hey guys, I am in a bit of trouble
I have a GUID for each that helps identify the said actor
The GUID is stored in a structure inside an actor component and I have an object pooling system and each time I want to hide/show the actor, I use GUIDs to identify which ones are in the active pool vs the inactive pool
The problem is that the GUIDs keep changing by themselves e.g. a pool via a pool manager actor and then for each actor in the pool, I assign a GUID to their actor component and then whenever that actor says, I have hit a specific threshold, the actor component hides the actor and sends the GUID to the pool manager so it knows that the actor is now inactive and not active.
But the problem is that the GUIDs for the same actor change with each call and I cannot identify the correct actors.
Can anyone help me please?
what GUID are you using ? a custom one, or the one built in ?
as far as are you making your own variable ?
Anyone knows why I cannot get Action Value when using Started and only when using Triggerd? Do I really have to block it with bool and unlocking on Completed?
The build in one, I am using the built in variable in a structure for that component and using the New Guid node to store a new GUID for that component
And thank you for the fast reply
The pool manager is storing the data inside the object pool component this way
ok so when do you run this and create a new GUID ?
Switching widgets are not some heavy logic really, it's mostly personal and organizational preference. You will worry about performance when you see something is wrong. Just don't use Canvas Panel (use one per game basically).
don't you want to use the same UID from the break in this image ?
or it's not there, i don't see it atleast
I think, because started only runs one time and tells that the action has started and triggered runs as long as the input is held so the input needs time to reach from 0 -> 1?
If you want the input only once you can use a do once and and reset it on completed from triggered and that should work π€·
A boolean input would be better at that point
Because axis inputs are better for movement, especially with the controller where the player could have any value between 0 and 1 depending on the position of the thumbstick
You you wnat triggered with axis input, otherwise, use boolean input
Ok,thanks for the answer!
When I am warming up the pool at the start of the level
So when the level loads, it spawns all the actors and gives them a GUID and then later using that GUID, I can hide/show these actors
ok but your saying the id is changing ?
how is that possible ?
are you running another create ? or running this code again at some point ?
I want a unique ID associated with each actor so I can identify them later in the game and use that ID to show/hide actors from the pool
yes makes sense
I am not, I have breakpointed each node
That's why I am confused coz the GUIDs keep changing
I'll send a debug printscreen, wait
So these are all the GUID created from the code
The GUIDs aren't being created or changed from anywhere else
The stored GUID is printed when it hits the threshold
And then the GUID is returned to the pool manager so it can hide that actor
But the stored and returned GUIDs are present nowhere in the created list
And when I print the GUID on tick, it changes after a random amount of seconds
i'm not following all this stuff, wdym is printed after a threshold ? and why is it creating so many but assigning one ?
It is creating so many coz each one is for a different platform but the one returned was never created and is not present in the "created" print strings
To explain, I am trying to create an endless runner and I need everything stored in a pool rather than spawning 100s of meshes at runtime.
When I have a loading screen, I spawn 15 actors from my object pool manager and assign their pool manager components a unique GUID and then I hide these actors, disable their collisions and add them to an array of unused actors for later use.
Then my game starts, I call an actor e.g. a platform to be shown on the screen.
The pool manager gets a platform actor from the unused actors array and then shows it on the screen.
But when a certain threshold is hit, (in my case when that platform is out of the camera frustum), I get that platform's GUID, search it in the active actor's array and then hide it again.
The problem is, the GUID that was assigned to that platform's pool component at creation is not the same when that platform returns it's GUID to the pool manager when it wants to be hidden again.
I have print strings at 3 different places in the top image, When a GUID is created (white for each platform, 15 total), when the platform returns its GUID (yellow) and when the pool manager searches the GUID to disable that actor (white at the top)
The yellow and the top white GUIDs should be the same since they are from the same actor's pool component and they are not being changed form somewhere else. But they are not the same and they are also not present in the original 15 GUIS that are being created.
so the white is supposed to be the yellow, or vice versa ?
is the one it returns wrong, or the guid the pool searches wrong ?
oh i see they are all different
the top two are both different
show when you get the guid on both of those
- The original GUID created for each platform. These should be all the GUID present in the project and no other GUID should exist.
- The GUID that the platform returned when it wanted to be hidden
- The GUID that the pool manager got from the platform
2 and 3 should be the same coz they are the same exact things and come from the same variable that I created! But they are somehow not
And 2 and 3 should be present in the white ones coz those are the only GUIDs I created
IDK how 2 and 3 changed but they shouldn't coz I never changed them
^
the same variable on the same bp on the same instance ?
you only create in the manager ?
i would hope the variable would be on the manager actor that is your pool manager
and you have one
- Creating the GUIDs. This will run 15 times coz I am spawning 15 platforms at the start
- When it hit's the player, it prints its GUID and says to the pool manager to despawn itself
- The pool manager getting that GUID and trying to despawn
The second and third GUIDs should be the same and should be present in the first GUID list but they're not
(sorry for the spaghetti, I am just so frustrated with this)
Second and third are the same variable on the pool component.
And that variable is being set from the list of GUIDs I create at the start
Yes, I only create GUIDs in the pool manager itself and no where else
And I have breakpointed the code so the GUIDs are being stored only the form manager itself and not being changed in the code after the fact
Each platform actor gets its own pooling component and the GUIDs being created by the manager are being stored in that component to distinguish th different actors
Later I wanted to get the component for each actor, get it's GUID and know which actor is which
The component is also useful to have different despawn delays and for each actor and not repeat the boilerplate for each actor
But this is now becoming a headache
what is this metadata variable in #2 ?
That's the structure in which different settings for the component or that actor are being stored
in image #1, I store that metadata, including the GUIDs
in image #2, when a certain threshold is met, in this case getting hit by the player, the GUID is sent to the pool manager to despawn or hide this actor
in image #3, the pool manager tries to hide that actor based on it's GUID, but it currently cannot find that actor since it's GUID changed somewhere along the way
well i can tell you one problem right off the bat
the guid created is not what you see in the print string
because it's a pure node
so it runs twice, one off each line
so fix that first
It just stores data for that actor in its pool component, like the GUID
It's just to store and get data
^
cache the guid
and then use that in the input and print string
so it's the same
then check what the guids say
every line connected new uid will create a new one
this is how pure nodes work
but after that you will see which one is wrong if there is two different ones at the top
and go from there
hopefully atleast one matches lol
Shoot, that was just for this
Otherwise, the New GUID node is just connected once
Just quickly changed it and got the print strings after storing the values from the stored structure itself but same results
so still neither one matches ?
are you using the cache value to store in metadata as well ?
cache the value, and use that in your prints and storing
you have two connections
this will draw the new uid twice
not just on the print string
Yes, using the New GUID to store the GUID inside the pool component's structure and then using that stored structure everywhere.