#blueprint
1 messages · Page 179 of 1
So... I always heard there's no way to make a horizontal character capsule or use a custom shape without rewriting the character class, BUT this clip shows someone extending the collision of their capsule component just with this random trick. Why does this work? Is this intended behavior? https://www.youtube.com/watch?v=H3U6D8XAFRE
Make sure the new sphere collisions (or any collision shapes) overlaps with the original capsule collision.
so, how do i make it work..
so now it's spawning back, but the system isn't showing at all ?
the first time, or the second time it runs it's not showing
in your collision turning on and off
well you want the event to spawn them
after you make them disappear
but if you just shut off the box collision
and turn it back on
it should just be the same code running and be fine
im confused what difference does that make if its the same code?
it's different code for the collision enabled
i'm saying your not changing any of the other code so it should spawn
but by turning off the box collision, that event won't fire untill you turn it back on
so you can't get the coin while its invisible
i cant get it while its invisible w how it is rn
interesting, well everything works but the system ?
idk much about niagara maybe #niagara might know this specific thing
or someone else can see the problem because it looks legit and you didn't change any of that code
anyone know how to convert transform data between houdini and unreal engine? I tried to export out a csv from houdini for my points that has the full transform data of the points. I then read this as a data table in blueprint and try to use the data to spawn static meshes with the correct location, rotation, and scale to match houdini. Really struggling on the rotations though.
whats the struggle ? if you store the data you shoul be able to retrieve it
yea, everything is working other than the system im not that annoyed ab it not showing rn, im still getting things just made for the game in general
how do I get back to a minal blueprint view rather then a full blueprint editor view
well the rotation isn't matching, I can get it very close but still off. fairly confident location/scale is right. I assume the struggle is the difference in coordinate space between the two programs.
currently following a tutorial where they have this
however I have this
and as such theres values they have but I don't it seems so struggling to get thing working
did you make the same kind of class ?
or did you click open full blueprint editor ?
clicked the open full BP editor
i've found anyway the right way to do what I need
so it's all good
UE4.27
So in C++ I can make blue BP functions and green BP functions, to keep explanations simple.
Can I make "green" BP functions in the BP Editor? Ie., I want to avoid the execution line.
make it pure
yes when you have the function selected the details should have a "pure" bool
Thank you. I didn't even think to look at the options 😄
Me: Sweet, I can move a million pieces of grass with individual transforms via shader, updated via texture data, using HISMs, on the render thread.
Also me: How do I make a green function plz?
im trying to make a block that falls after a few sec, but is activated by the player, like doughnut blocks in mario 3dworld. but when the player colides with the block nothing happens
i use two timers
one fires off when collision
and the other fire offs after the time has passed to start dropping it
What's stopping it from falling in the first place?
nothing theyr meant to just be floating platforms that fall once the player walks on them, but with a little delay to give them time to move before it falls
in a recursive function, if i do a break, will it jump to the previous called function or is it gonna hit my "complete" pin?
Nah I mean, before the player walks on it, why isn't the block already falling? What's keeping it in place?
nothing..
Just a heads up, pure nodes should only be used for returning values and never for modifying any state. Your "Update 3Motion Vectors" for example would not be a candidate to convert to a pure function as it doesn't appear to return something and by the name of it sounds like you're changing the state of something.
So what are you changing to tell it to fall? It might be obvious but I'm not sure.
begin overlap, with the player
Are you sure tick is enabled?
Sorry, I mean, what's actually saying "Ok move downwards"
i sent screenshots of all is in the blueprint
also what is resetdelay set to ?
Ah yeah fair, I think the low res threw me heh
The other thing I can see is maybe "Fall Speed" doesn't have a value or is extremely small?
Yeah that was just the first one I grabbed a screenshot of. Ty for the tip though.
This is what I'm making pure:
fall speed * delta will make it small it would have to be pretty big actually
maybe it's moving but you can't see it it's so small
I'm aware of that issue where Pure BP functions get fired off for every output line, while non-pure don't.
bp first i heard of pure function, still gets me mixed sometimes i forget i'm just not used to them
It gets messier in C++. I believe it turns const BP functions (that you wrote in C++) into Pure without you asking, and you have to explicitly say "No... I want non-pure thanks". And it's this way because by the time they realised it would be good to support const non-pure functions, it would have broken too much behaviour to stop const functions becoming pure by default.
what is a const function ?
Heheh. Just a function in C++ that you demand must not change anything.
Sometimes you want a function const, sometimes you don't, but if you're writing BP functions in C++, that const difference irritatingly flips the function between Pure and non-Pure.
makes sense, i'm new to c++ i done a lot of c but never heard of const there
you can use BlueprintPure=False to turn it into a "normal" function
i use a blueprint function library and to change to pure i think its a uproperty setting
Yeah. So if you put a const on the function it makes it Pure also, even if you didn't use that setting.
interesting it kind of make sense, thats probably how they implemented pure function ?
Yeah there's logic in the thinking
I have a tombstone blueprint with a simple tombstone static mesh that I want to add numbers to...up to three digits. I have the digits as decal material instances and three decal actors in my blueprint...My initial plan was to have an int variable with the number to appear on the stone and then do some math to determine what digits to show on each decal actor....is this sound? or should I go a different way?
But it still annoys me heh... since Pure functions need a bit of extra concern for performance.
they are real usefull for one offs of data
How do I find the "On component begin overlap" node?
click on your component in the components at the top left, then scroll down in details to the bottom
I thought about this method but isn't string manipulation slow?
maybe maths is faster idk
i just figure it's built in and i don't know how slow your talking
it's not noticeable to do that on a small number
well I could have a LOT of these on screen at a time, so I want to be super efficient if I can.
it's an insane asylum cemetery
i c
i would make it a function in c either way
it's your best bet if you need to make a lot of calculations
if it's always a year then the maths shouldn't be too bad
oooh I've not done C yet....I really need to....I'm scared of figuring out how to add C to UE in linux because that's what I'm on...I know C/C++ but I've not toyed with it in UE
nah, it's not years it's grave numbers...asylum graves just had sequential numbers on them
i c
simple numbered paupers graves
is there a max, are you doing a bunch on the screen at once ?
so like you kill a bunch and there graves show up right ?
no just a prepopulated grave site and there will probably be some kind of puzzle using the numbers...it's a mystery/puzzle game
oh i c, so you load these on begin play or something ?
yeah I was putting this in a construction script
i would probably pass it the number, and run it on begin play
so it's not trying to do in one tick like a loop or something
oh your using construction script nvm
so they are pre built in the level already ? performance doesn't really matter then
I'm trying to modify data table in-editor and add row node still isn't working unless you use c++ I guess. Would it be possible to feed modified array data of this method back into the data table in the end?
Does anyone have experience with combining different layers of post process settings additively on a single camera? Seems to be quite a bit of work and wanted to know if anyone has done this or can point to some resources about it.
I do not love refactoring Blueprints. Even just removing 7 occurrences of a variable across it... I get scared I'll mess up and have a hard time knowing where
the fall speed is set at 200
why would you combine different post processing layers rather than alter the post process at run time
or just set the single post process
i would also just move the actor in the world instead of adding offset to it
wdym?
your using add actor world offset, when you could get the current location, and add to that, then set it
i'm guessing the offset will stay even when you reset location
this really is small set it a LOT higher
That's what we're trying to do. Alter the post process on a single camera at runtime.
what node is current location, that dosnt show for me even with context sensitive unchecked
?
there is "get actor location" and "set actor location"
get actor location, split the struct, subtract from z, set location
but first thing i would do put a print string on the true of the branch
it will really hurt performance on tick, but just to make sure it's triggering
its not printing
Yup. So now imagine there are a couple different status effects in a game, each associated with it's own post process settings and materials. How do you go about blending them together, and not just overriding one another.
The materials are pretty easy, cause they're in a stack and each layer has a weight.
on the begin overlap event, check if the cast succeeds and it's running
i put a print on cast failed and it didnt print so i assume its working
nothing printed
Other people probably know this better than me, i'd ask in #materials. My niave approach would be to just combine the materials into one material with parameters to have more control and alter the material instance on runtime
put a print on success see if something prints
nope nothing printed
so the collision isn't happening
how do i fix that
i had that at first but then i figured the model wouldve been easier on its own
it's easier with the box
put a box collision in
and try that event with a print see if it fires
how to connect object reference to static mesh
that made it print
so use that, your mesh probably doesn't have collision but it's probably more performant to just use the box
and my player mesh fell through propperly but the block mesh itself didnt move
you put a print string on the tick and nothing prints ?
try off true and false
see if anything prints
or just off the tick itself
it prints off the tick itself
but not on true for the bool ?
nope
is bisfalling in this function start falling local ?
are you setting a local variable, or the public one ?
the one here has a capital B
looks like a local variable to the function
do i need a cast then?
If it was a local it'd be under "Local Variables"
bc the other variable dosnt show
thats the only bisfalling
is the function in the same blueprint ?
yea
then know, just remove the set with the capital
and drag in the one with the lowercase b
make sure you use that on your functions
it capitalized it
for some reason you have another variable
Yeah it's just Unreal trying to be smart, capitalising in the graph but not in the name.
give it another name then?
just make sure you use that variable in each set and get
i do
and that your not using local variables
hmm
thats really odd, that your setting the variable but it's not registering as true on tick
idk why that is if your using the same variable and tick is firing
how to connect object reference to static mesh ?
the actual collision respawning is working just not the mesh moving
should i just rename the variable?
i mean it wouldn't hurt rename it see if it changes all of them
but it doesn't print on true ? thats what is confusing me
if that doesn't work then something is f'd
ok it's printing
did you change it to get location, set location ?
on tick when it's going down ?
instead of offset
i started to,
Er... aren't you setting the hit block to Ignore, but then telling the hitter, not the hittee, to move?
what?
Like, that graph you just posted now isn't the block's graph, is it?
it is why
Oh, my bad, thought it wasn't
ok so all your doing now is printing
so now you just got to make it drop
get rid of the print ontick print sucks
is your movement speed my fall speed variable?
ya your result after multiplying with delta
but you want a fairly high number
because delta is small
thats why i was saying 3.0 is real small, * delta it's tiny
so go from the multiply node into the subtract node?
i think so
whatever you want it to move by
your subtracting a number from z
and setting it
so whatever speed you want i would mess with it a bit
my fall speed is 200
give a try, it just takes some tweaking of the numbers to get right to your game
can i keep the block collision so the player could ride the block to their death if its over a pit, but have it despawn and respawn at its original location still?
bc its falling at an ok speed, but the player falls quicker bc the collision
oh
but the way you have it you may find some weird stuff if you jump and land back on it
because of the way your doing your collision
am i able to make it so only touching it from the top makes it fall, maybe add a 2nd box collision that isnt a trigger on the bottom so u can only make it fall from the top?
i mean you can just change the shape and put the box at the top
does the mesh have collision ?
yea just box collision
so you can go through the mesh ?
because think about it, if you can't go through the mesh and you put the collision just at the top
you should be all set
because it won't go through the bottom and hit it
you may want to make the sides a little in so you can't bump the top side also
yea the player keeps falling through the mesh
so just don't turn off collision in the code
you know what the nodes are doing ?, read there names they are fairly descriptive
Any tips on how to make blueprint faster than it is?
what do i set it as so the collision isnt disabled
oh i got it
now im gna test n see if thers any other bugs
jump up while it's falling
and land back on it if you can
might f it up a bit
because the collision will make it run again, you'll nee that boolean that was mentioned earlier but it may still work just the code is weird
-
Rewrite the code in a more performant way.
-
Rewrite the code as a function in c++ and then call it in blueprints
😐
Not very helpful I know but those are your options
alright will look into that, im still very new to blueprint though. But thanks for the advice.
There's almost always a more performant way to code something in blueprints. I've gone through like 5 iterations of code yesterday to make a scoring system cost less
You just have to be creative, knowing what costs more helps
it works fine other than when the block respawns it warps the player to the block respawn instead of on the ground
and that is loops and heavy calculations?
stuff like that
you could briefly turn collision off, move it back, then turn it back on might go through the player i'm guessing for some reason it's colliding
As someone point out loops and pure nodes can kill, array nodes that go past 500 seem to slow down performance, heavy calculations is a big one. Using math expressions will reduce that cost significantly
how would i do that?
Re use actors, spawning is an extremely costly process
Overlap and collision checks will cook your project
funny thing i spawn a bunch of stuff on the fly
it works great
as long as you keep at a decent number of stuff it works
But dont i need to do that all the time, i plan on having bows and sword in my multiplayer game?
Spawning actors is usually not a problem unless you're spawning them by the thousands. Since we don't know what game he's making we can't rule any optimizations ojt
Sometimes it can't be helped, and in those cases it's totally fine
I plan on once im good on making a survival multiplayer game, lol.
😄
You just need to make sure things that don't need collision overlap checks, aren't checking for that sort of stuff
ah okay
and what exactly is meant by "pure nodes"
with the set collision node, when you put the thing back, right before shut off collision, then right after turn it back on, i'm not sure if it will work but it's worth a shot
Make sure your actors have "tick enabled" checked off if you dont plan to use the tick node on them. Just because you aren't using the tick event doesn't mean they aren't ticking it in c++, when you have thousands of actors and particles ticking it does cost a few extra ms 😉
A function that you selected as "pure" there's no longer any execution pins
Blueprints handles that by reading every single pure function in your code that connected to something else, even if it doesn't end up getting used
If you use a select node and connect 10 pure functions to it, even though you're only gonna select one, all 10 still got their code ran for no reason
pures are green
ah okay, thanks.
I can go on all day about unreal engine optimizations... if you can be more specific I can probably give a more helpful answer haha
In this image, the GetPlanetUpNormalised function gets run twice.
But the GetInputHorizontalAcceleration function only gets run once.
The green one is Pure, the others aren't.
you dont have to spend all your time helping me, lol. Hopefully i will learn it on my journey. But thanks for the many advice i reaplly apreciate it. 😄
Im not experienced with this, but is what your trying to say, i shouldt have the green part of the script, and only the blue below?
They're both fine. The greens ones don't need you to run an execution line through them, so when it's something simple like "GetSomeValue" they're good.
The thing to avoid that the image shows is pulling 2 lines out of 1 output with the green ones.
With the blue functions, that doesn't cost extra. With the greens, it does cost an extra run for each line. Plus it's easy to forget that the green ones are indeed getting fired an extra time for every line coming out of the one output.
im doing a recursive function and return doesnt seem to break out of it? am i missing something here?
How can I connect a static mesh reference to a object reference ?
okay, so for best peformance i should use the green one, but only one yellow line should be used?
Well, you use the blues and greens for different reasons, but yes, typically only drag one line out of each output pin with the greens.
pure functions are very useful
but you just want to watch how many times it runs to get a simple value you can cache
everything plugged into it runs
show the code
okay thank you for the explanation 🙂
it is doing the proper steps, at least as far as i checked, but it always goes ot that last return on the complete pin
i am sure there are gaps in my knowledge in this area
For a game jam game,
Anyone know what method I’d use to be able to play a 2d game on a screen in my FPS game?
(Not that it’d load you into a new 2d level, but that you’d still be able to look around in the FPS while the 2d game is on the screen)
Would I try’n run 2 levels at once, and render target the 2d game onto the screen texture? Or would that even work?
I’m not sure how best to describe it, somewhat of a beginner still, so I don’t know what I’d look up
@lofty rapids is it possible to get a static mesh reference from a object reference ?
Quick dirty example of the above re: pure vs non-pure
@dark skiff did you think about widget blueprints ?
its like a user interface that can pop out in the screen
the widget could maybe stream it
I’ve really only messed missed with widgets for UI,
The “2d-game” would need to be displayed on a 3d object that is modeled to look like a “screen”, as opposed to the actual screen (sort of like the pic i attached)
then you need a blueprint actor with a plane, and the plane you need to assign a texture
there is something called canvas render target
its rendering a texture from a blueprint
Right, I think using a render target would take care of the texture, I’m more so just wondering if I need to make the 2d-game a separate level or something, and if I could even render-target a separate level to a texture (can u run 2 levels at once? Can I do the same thing with 1 level?)
That sorta thing
need to be streaming the second level somewhere far from the current level
You heard of an indie game called screenbound?
and the blueprint will be a camera with render target, to render the texture
because if not streaming the level, that means its not on thread
Just looked it up, looks sick btw,
But YES that’s what I’m thinking of (minus linking the gps movement to 2d movement, I just wanna be able to play the game at all while in fps)
Ok ok, looks like I’ll have to look into level-streaming then?
then you need some interaction with the user, when he clicks some button you change the player controller
and inherit the pawn from the different level
kinda needs deeper look because if you inherit different pawn you might get teleported to the different level, and thats not what you want
yes
maybe you can use the same player controller, but with a function to control different pawn as well
Cool cool, for sure
Thank you 🙏
May ask general chat for their take as well, ‘n see if they got any experience with that😎
is it possible to get a static mesh reference from a object reference ?
so thats an array of objects ?
I'm trying to spawn an actor within an UObject but the node is not appearing in the context menu. Does anyone know a workaround for that?
Are you trying to add the uboject in the construction script?
No, I have a normal UObject BP, I have a regular function that I want to spawn an actor in
Oh. It's a UObject BP?
Yes
You may need to override GetWorld or it won't let you use world-context-related objects, like spawn actor.
Yeah, makes sense, thank you
You may simply need to override it and do "Get Outer -> Get World"
Depends on your setup, of course.
Yeah, I just realised that I don't even need UObject BP.
I actually was thinking on how I can create an easy way of determining where pickups for a quest should spawn. I thought about creating a UObject BP with a function SpawnItems that takes the quest, the NPC, and the player as arguments, and spawns items using that information. The object would be then assigned to the relative quest objective to act as a "callback" to actually do the logic.
Do you have any idea how I could achieve that in a good way?
Use an actor?
Yeah, it's a solution, I think I will go with that unless something else comes to mind
I'm implementing a simple drag and drop. My problems is when i reopen inventory, items are not in the last position
I'd fix that before you try drag + drop then.
Hi not sure if what im searching for is named what i think it is but if i create a primary data asset PDA_Object is there a way from blueprints toget an array all DataAssets that use this PDA_Object as it's parent?
Or if theres is an altrernative for getting an array of children from a specific primary data asset
You can make an array of DAs with object type PDA
Eek! I packaged my game and it broke the behavior trees. Enemy AI works fine in PIE but they just stand around playing the .exe. How could I troubleshoot something like that?
in my multiplayer card game, i have ability cards and I encode them using integer values. Like value 0 represents the ability card that gives the player body armor etc. I want to create an actor that is global where every component can ask it information regarding the ability cards. For example when I spawn the ability card on the table, the card actor can ask that global actor which image should it have on the card if its integer value is '2' etc.
What is the best or industry standard way to do this?
So far i thought of adding a component to the game state as this information holder since every actor can call get game state but not sure if thats the best way
So I get the "has to have Simulate Physics enabled if you'd like to addForce" error, which is correct because I disable Simulate Physics during my initial cutscene in order to make the player not move. Can I check if simulate physics is enabled and if it is, then apply force so it doesn't error out?
representing them with number sounds unthinkable
use Uobject instead imo
Im following a tutorial, and i was wondering if how he set it up was the best solution. Beacause wouldt you save performance, if you instead of one green function that gives input to two other nodes just had two seperate green fuctions for both two nodes. Beacause if i run the green fuction wont it be ran twice? even though i dont need to send info to the endoverlap part when im beginoverlapping? (dont know if i was clear or not)
Instead shouldt it be like this:
this is the same thing as above
just a matter of readibility
Pure function will get executed either way, when the node it connects to get executed.
yes but the first one has two lines from one, so it will execture both enable input and disable input, even though i for example just began overlapping?
wouldt it be better keep them seperate beacause then green fuction wont be called twice?
no
it will not execute both
this is what happend when overlap
and on endoverlap
Okay, thanks for clearing that up 🙂
Hey guys I was wondering when playing in editor gpu usage 30% but when playing packaged game gpu usage is 100%
Good, means it’s using all available resources 🙃
You can attach insights to a packaged game and do some #profiling to find out why
You can even run certain console commands like stat unit and probably profilegpu as well (I didn’t try the latter)
On begin play of game mode for instance
Anything out of the ordinary you are noticing?
Also this is on a RTX 4090, game uses 80%+ GPU and it's a lowpoly game
so any other gpu is getting 100% usage
Not off the bat, but #profiling might be better at this. Also maybe restart your pc for sanity check
For sure, thank you
Im following a tutorial, and here he uses a timeline to smooth the door rotation as it opens and closes? (The timeline has a curve to make it smooth).
But i was wondering wouldt it be very peformance heavy if i had a bunch of doors with this timeline, like if i had survival multiplayer game like Rust, would it be better to lerp the value, or are there other solutions. I heard you could bake the cuved animation, but idk how to do that.
not really a problem unless you have a ton of doors opening and closing all the time lol
Hey, doing a system for stamina to be weaker as it runs out. I just wanted to have something based in ranges. (if above 40%, full power, if above 25% halved power, and below minimum power)
Thing is I feel the current way I'm doing it is way too convoluted
I just used some In Range nodes to check for the value to calculate tiers of power, and perform related actions accordingly
Though I guess it's still better than a couple branch nodes, I bet there's some better trick
@past token blueprint is slow to begin with. If optimisation is such a concern, you will use cpp to do the heavy task
It really isn't helping trying to optimise in bp
Multiplayer on top of that
You won’t make a Rust kind of game in bp only
But also @frosty heron timelines in cpp? 😃
I don't know 🤷♂️
I would probably use bp if I need a curve assets
Imo optimising in bp is futile
I mean it depends on what the issue is, if you’re calling get all actors Actor on tick, you can optimize that in bp by trashing that code 😀
So if i ever want to consider making a big multiplayer survival game, it should most defintly be in c++?
For sure, I doubt you can do network seriliazation in bp
you can
Have you got any samples I can look at?
Aim for smaller scope, even a basic mp game will require years of experience and blueprint multiplayer is very limited.
You certainly can't make a competitive shooter with bp, let alone mmo
Its just very confusing to people like me who are new what the capabilities of BP and Multiplayer are when there are youtubes selling courses where they "make an online survival game".
https://smartpoly.teachable.com/p/ue5-multiplayer-steam-survival-game-course-remastered
in it?
Literary trying to use interface to replace casting
Those courses... I don't wanna say anything bad but like. Usually tutorials that give step to step aren't very good. They only make something that -works- but that works really bad
who is stephen? I was actually following a multiplayer c++ course by Tom Looman. And a c++ beginner course by Dev Enabled.
I heard good words from Tom Looman, imma actually gonna get that before trying to escape tutorial hell
he is industry vet working in many game companies
but it cost like $300 or something
his course also seems very imformative atleast the part i have done.
yea, but i think theres in one of his blogs there is a link to get like 20 precent off i think.
i atleast got that
Is there a way to count pixels of a certain colour given a texture?
Open console `
Stat fps
Hi everyone, I have a question that's stumped me hard. Add to the fact I'm primarily an artist and you see why I'm having trouble. I making a small radio station to play mid program and want the song information to display like this. I have my own music code working and it's consistent, so all I'm missing is this. Can I get some help please?!!
Like to just come up on the screen for 5 seconds then go away
Is this unreal related?
Yep all in bp
So widget?
I have made one and a mini ui that at least has the spots where I want the information displayed. I also understand casting to the playlist I made will be necessary. It's just after it idk
Just play animation that drives the text opacity?
Create widget animation in your widget blueprint
Call it fade in
Then when you want to fade in, you play the anim
I get that too (i made a splash screen for the program already!) My main question is how to get it to see what song I'm playing and display the information about the song in the spaces designated on the ui (maybe attaching text being casted from the playlist into a text box?)
I made an array assigned to each file that has the information plugged into it through variables
But it will run on all at once if I just connect them
You just get the element in the array that you want to play
Then pass that info to the widget, where the widget will update text, play animation,etc based on the data you send
Got you
So sounds like I need to fix the issue of the songs all playing at once while retaining their info
And that I'm on a right path
If I post how I have my code setup could you maybe help? Again my radio code works, just not the string of code with the songs and their info
Sure, it's not like you want to play all the song at once
Post it for the rest to see. Someone may able to help
I can lend an eye but if it's something that may take a while, we'll I got my own problem 😅
I understand I just really appreciate you responding
Plus I'm running off 25+ hours of sleep idk how much longer I'll stand
🛌
Guys, please help 😄 I need some idea how to better handle it. I have different actors in my game and I think I need better setup. Currently I have component on each actor which has ENUM and there I select if something is something. Does anyone see any way I could improve it? I tried to use tags, because they seem easier, but there is no way to switch on tags? Would I even use switch for that? I can provide more screenshots if needed.
1st pic is the code that works
2nd pic is the songs with the info in arrays attached to a custom function
Gameplay Tags, I think you can do switch on it? not sure don't have editor on me atm
each one is this just different song info
Hmm, that maybe could be cleaner. I will check.
This doesn't do anything?
That's the code that just runs on
this code is saying, make an array, set the array index 0 to null
so index 0 will be null
and you are not storing the result in a variable or anything
You should make a struct that defines your music
create an array of the struct and add to the array for each song
#blueprint message
Im looking at this and it has nothing to do with MusicPlaylist or TempPlaylist
Then what am I using in the pics of they aren't variable?
So array with the info, then plug that into the song file and do that?
You are making a tempory array out of 3 texts and you changed the temporary array value in index 0
this practically doesn't do anything
Correct, temp playlist is what I'm currently running the music playlist through to put music in from the editor viewport and test the code and sound at the moment
Make a blueprint struct , call it FMusicInfo
There, declare all the info you need.
- Title
- Comment
- Audio Component reference
- etc
I got you, that sounds much simpler
good morning guys
i need a little help here
my character can't sprint after he crouched
https://blueprintue.com/render/44-bafgk/
https://blueprintue.com/render/sujzuocw/
here is the project to download if you want:
https://drive.google.com/drive/folders/1THFKA2hs50Gk1KjxxJPGRelbGvQenRRU?usp=drive_link
thanks all for your help.
I cant see you unset is crouching ?
Ur setting it to true in both scenarios according to your links
hey, where you say i must unset "is crouching?"
Hello. How can I get information to blueprint 1 that a collision has hit in blueprint 2? I can't figure it out
Use Blueprint Interfaces
oh thx! I will google it
Hey I want to ask how do I convert the Camera Component object reference to Camera Actor object reference any ideas
Hi, i wanted to ask if there is a method of using physical in game buttons such as a button model to call an elevator, when i search online all i can find is widget tutorials, i have tried using on clicked events but they're very hit and miss and require the player to practically press their nose up to the model to click it.
heya, i'm working on a dash system and trying to increase the camera fov when the player dashes. This is how i've set it up and for some reason the FOV lerps properly sometimes and then sometimes just nothing happens. any ideas on how to fix this?
Sounds like your click is hitting something else
Had good success with mine when i set it up
I think i figured out the mouse cursor wasn't centralised being an FPS style, so i had to lock the cursor to the center of the screen, only issue is i dont know how heavy this will be on performance as it is running on the tick
it works through that method
you don't?
hello i need some help for some reason my event dispatcher call didnt activated the binded event
pic one is my call for my allready binded event
second image is my binded event
does anyone knows why ?
what's the execution flow? Have you make sure to bind the event before Call?
do a print string after call and after binding
Hello guys i have a problem i can't resolve, i want to disable the capsule collision and all collision between my player and any NPC what would be the way to do that ?
what is your collision settings on the player ?
Yes the bind come way before the call
show screen shoot of the print string
you're binding the event even if its not valid, are you sure the same actor you bound it to is still valid?
on the capsule the collision preset is pawn collision enable
so the collision presets is pawn ?
yes
you may want to go custom, and ignore pawn
can i set this real time ?
im trying rn thx sir
How can I disable a bunch of nodes without deleting them? I had put the player perception directly ont the NPC blueprint, but while loading the game, I saw an advice that it's cleaner to put it in the AI Controller. I have move id to said AI controller, and I would like ot check if it worked, but I'd like to just disable everything while trying so I can fall back on it if I effed up.
Well its supposed to be but how can I check it?
if you don't want it to run just disconnect the execution pin from the event
you can connect it back up if you want to use it
Correct... I am dumb. Thank you.
Hey everyone, does anyone know if theres a good way of seeing what portion of an actor is rendered? like in percentage or something... The only thing i found online was to like line trace to different points on the actor and see how many dont collide
Every time I load my project, this struct changes to a Fallback Struct and then I get a compile error. 🤔
How can I get the actor from the AI controller? Moving this node to the controller means that "Self" is no longer the actor.
well its still valid
test it?
you are still executing the bind from the Is not Valid exec pin
so it is entirely possible that you are binding to invalid object
Probably get controlled pawn or something like that
AI controller should have a reference to the pawn it's controlling.
It does. Can I directly cast it to an actor?
why do you want to cast it to an actor?
cast it to your blueprint character/pawn class if you must.
Cause it wasn't connecting. But yeah, I casted it as the blueprint character.
read the error, be aware of object types
if you want to use function in the Character (Target is Character), then you can cast the source (controlled pawn) provided that the controlled pawn is a character type
It is. I'm going to have to figure out a way to use the right cast once I have multiple character blueprint, but I'll figure it out.... Or I'll come back to ask here ^^
try putting the delay node somewhere else like in the other part of the sequence, and only firing reverse if its not already playing. Or if you just need it to reverse when its done you can do it off finished ofc
casting is just a type check
Is there an easy way to syncronise a variable between an AIController and a BP? Since the widget is in the blueprint but the variable is modified in the aicontroller, I was wondering what is the right solution to tie the two variables.
what bp and what BP?
the general rule is to never store any gameplay data in widget
widget job is simply to read.
your Character data should live in the character or some other entity if the data needs to be available when the character is destroyed
Get a reference to the object where the data live and pass it to widget
then widget just read straight from the object.
Why have them separate. The widget should just be reading straight from what it displays.
If you have a widget tied to an ie, give it a reference to the AI, that it can then pull all needed info from
Sorry, I got distracted on another conversation. The widget is on my character BP and it reads a variable that is on the character BP.
But since I moved part of my logic into the AIController (notably the detection logic) it modify a variable in the AI Controller and not on the character.
The widget shows above the character. So I tied it to the mesh of the NPC. While I can attach a widget to the AIController (something I just learned) I can't attach it to the character's mesh can I?
This is an unusual setup. the character should have their detection value, which the widget reads. Why would something else have that?
If an AI detects something, it should be modifying the detection value of whatever it detects
Preferably with an interface if it applies for more than just characters
Sorry if I'm not properly following with what the issue here is 😄
Asked this in the general channel but no luck, trying my luck here as well.
In Lyra we have the IdleStance State maching outputing a pose. This is fed as input to the Output Animation Pose. Which should call function UpdateIdleState every update? But if I add breakpoint to a node in that function it never gets hit. Is there a way to have the ability to add breakpoints in these functions?
What I'm trying to do is get "Coin Number" from the BP Thrid Person, how do I accomplish this?
i have an issue with the toggle movement node. when using the keyboard keys and USB controller, it works as should. it stops actor movement when needed then allows it once certain parameters are met. it however doesn't stop the onscreen buttons from moving the actor.
i need to block or disable the buttons for a single event, then resume once event has started
You need to actually cast something to the character. A cast is a type check, not a way of getting objects from something
Hi guys!
I'm looking for a keyboard key pack to put on the UI, but I can't find it, do you have anything?
I also couldn't find a channel to publish this message, I don't know where to put it...
It's saying "is this ref i have of a more specific type"
This is how i have the buttons setup in the HUD
I.e., "is this vegetable a carrot"
No worries and thank for trying to help ^^
Basically, I followed a basic guide on setting up perception for my character. Everything in that guide happened in the BP_Base_NPC.
But as I have seen in the advice when starting my game, it said something that could be summarized as "Detection should be done in the AIController". Which is fine by me. Trying ot keep things clean, I moved all the detection logic from the BP_Base_NPC to the AIC_NPC_Base. It works fine. The only issue remaining is that since I moved the functions to the AIController, the variable actually being changed is in the AIC_NPC_Base while the widget is in the BP_Base_NPC.
Would the clean solution be:
- Make a function to sync the Detection percent of both
- Put a reference to the actor's variable rather than the AIC having its own?
- Something else entirely?
Detection should be handled in the ai controller, but the thing being detected should track how detected it is.
When the ai controller attempts to detect something, it should tell the thing it's being detected, which can respond by tracking it's detection value.
Thanks 😉
These two BP functions. I made them both in the BP Editor. Why does one have that little white arrow, and the other not?
Is there a way to change the visuals on the EQUAL ENUM and NOT EQUAL ENUM nodes so I can actually see if it's an equals or not equals? This is borderline illegible.
I know it's because my value names are long, but shouldn't it just extend the length of the node
are they both functions or is one an event ?
Yeah I hate that
Both just functions. If there's a difference in something I did making them, I don't know what it is
I don't even know how to make an event
Does anyone know why you can't call Play Montage on a skeletal mesh reference within an actor component?
double click on the one that looks like an event where does it take ? show that
They're both functions I made
I was making a guess that maybe it's showing functions that are changing member variables. But nope, not that.
Across my BP, I'd say the majority of its functions have that little arrow
Mmm... But not all.
i think it has to do with return values
because if you make a blank function it shows like an event
but if you add a return value
if shows like a function
ah yeah?
Ah yes that's it. Nice
ty
Odd, since it's already obvious if a node is returning something
Sorry for interrupting. Could someone please help me? The array value is not setting :c
Uhm, so I have a small issue. I have a made a construction script that makes a road follow a spline, I can move the spline, but the road doesnt appear at first. I have to find a small road part, move it and undo it so the new changes appear on the spline. How do I make it do it in realtime?
your getting the values and modifying that @trim matrix
i don't think your actually altering the data
for one thing is the get a copy ?
that one I have is get by ref
i would try to alter the struct somehow i haven't used struct much so idk but i believe the problem is you got the values and changing that array does nothing to the actual data
even tho I used get by ref? 😭
That just means you’re getting the original value not just a copy of it
But that means I am editing the original and not the copy, right?
This can give exp but cant do from enemy
From what I can tell you’re just trying to get inside that and copying it into Values
Probably easier if you see what’s happening if you set a breakpoint and step through the code, hovering over the pins as you go along
Ok, i'll try it on another way
Wonder how fast that bp struct will break 😀
Oh wait, it works now
i think if you make a struct and don't mess with the actual structure and just keep it like it is or maybe add one but i can see where removing and if it's in use would break stuff
It all works fine with cpp structs but dynamically changing bp structs goes very wrong most of the time
what should i use instead of pawn sensing so that when the enemy sees the character he chases him. As both the characters belongs to same class
perception
On target perception updated
#gameplay-ai pinned video on Behaviour Trees covers it
cannot perception be used without behaviour tree?
you need stimuli source
and then that on update whould trigger, i would put it in the ai controller
thats what i used
It can
but ya like mentioned #gameplay-ai is best for that stuff
I’m just telling you where to learn about it
can't it run directly from here?
okay
but for now i just want basic chase
actor with target actor didn't did anything
https://youtu.be/iY1jnFvHgbE Try the official tutorial from unreal engine
In this presentation, Epic's Paulo Souza uses Unreal Engine's built-in AI features to build smart enemy behaviors for a game with stealth-like mechanics.
By relying on the Gameplay Framework in Unreal, we're able to quickly create convincing AI using Behavior Trees. Behavior Trees are great for creating complex AI that can be presented in a way...
do you have a stimuli ?
no
so you need that on the player
and make sure its using sight
both should use sight sense
on enemy?
the way it works is the stimuli hits the perception
Okay
so you are telling me that you set the AI's position to 0,0,0 on tick? lol
heres something i got some help here with awhile ago
lol it looks f'd but it works to clear the actor
You know it might be easier to make it loop and on false clear and invalidate the timer
But that may require some testing, I can’t really compute it in my head rn
ig i could make it looping and clear and invalidate afterward
-1 means it didn't find anything
so if the find comes back -1, the character isn't in the array
mhm
its a way for the blackboard to forget the character
basically when the sight lifetime runs out then null the player in the blackboard
so he no longer chases and goes back to wondering
You can also use on target forgotten, just gotta enable it from project settings
where is this setting ?
how could i make a depth render in game so u can see the players shadow through a mesh like this?
Can’t recall off the top of my head. Somewhere in project settings afaik
I just started using the Common UI plugin, and I'm getting an error where every time I launch Unreal that one of the blueprint functions in Common UI fails to be found. If I delete and re-add the function it works just fine.
I have a hunch that this isn't specifically an issue with the Common UI plugin, but an order of operations when initializing the editor. Maybe this widget is initializing before the Common UI plugin loads? Has anybody encountered an issue like this and found a solution?
I just installed the plugin and started working with it without trying to find any documentation, so it's also possible I'm just using it wrong 🙂
It's an order of initialization issue. Are you using a C++ project?
That sounds right. Yeah, it's a C++ project
You should be able to add CommonUI as a prereq to you primary module to fix it.
Ah that makes sense! Thanks 🙂
How can I find the affected BP? It doesn't say which one
Hm, so this is my first C++ project, I've been working in BP up til now.
Is adding it as a prereq just adding it in Build.cs, or should I be doing it somewhere else? Adding it in Build.cs doesn't seem to have solved the issue
You can try the nuclear option of adding it to your UProject and setting it's load order to an earlier tier.
Hey guys! Im trying to build difficulty changing logic for my game. Its a platformer game. And the idea is the higher player gets the less platforms will spawn. For difficulty change i have a variable "height". So when its 10 the difficulty changes. Just as an example. The thing is that using branch every tick may be too expensive. How can i optimize it?
check the height when spawning new platforms?!
but it checks it every tick
ofc it works, but why don't you just check the spawn height?!
you spawn anyways at some point, so might aswell check the height there
yeah i have height variable and it checks it. I just dont want it to do it every tick
siempre apareces en algún momento, así que también podrías verificar la altura allí
what am i looking at right now
the same message as before but in spanish
where are you changing the variable height??
in another blueprint
so change the other variables here too?
show me
also height * 10 = difficulty something limit
and (height * 10) + 150 = difficulty upper limit
if it keeps going the same
@hollow cove @spark steppe
why don't you run this when you change the variable instead ?
i dont know how. Create custom event?
so you think its better to move it to the blueprint where height variable is beeing changed?
yes
i would fire it off when height changes, since thats all the code is checking
ya a custom event, then just call it when you change the height
this way if it's 10 it will just run when you hit 10
it's fairly simple
Got it. Makes sense guys. Thank you!
you could also hook it up to a sequence to make it a little shorter
instead of scrolling over for everything you get some up and down
is there a way to only keep specific pins
i thought i have seen that before
so for instance if i only want 1, 4
but i don't want any others
it seems like i can only remove the last pin
Im trying to create custom event and i dont quite understand what will trigger it. I mean i do understand thgat it has to shoot every time when "height" is 10 but what will check it? Will it be then the same logic where machine check for height=10 every tick?
when do you increase the height variable ?
when you increase it, check if it's the numbers you want
you can keep it on the same bp as i'm guessing the variable for height is on there
is height specific to each floor ? or height is where your character is ?
@lofty rapids
i only got switch on int
Yes, you need to download the plugin I made to use the extra nodes I added 🙂
I mean, it's free, in the link I just posted, I'm not selling anything.
okay, so I have a wheel, you spin it and based on where it lands, it takes you to a place (new level). how do I get it to spawn me at the choice it lands on and not a random selection?
Do you have a player start actor ?
what is choicearrow ?
yes I do
th long tiny box at the top
Hold on, are you asking about a place in the level or are you saying the wrong level gets picked?
so at what point does that run, when the balls collide with it ?
it looks they are rotating the thing, but then on some sort of collision picking a random number
and i think they want to link the two
Oh lol just noticed the random int in range
Why switch on int random if you don’t want it to be random?
wrong level gets picked.
when the wheel stops spinning, depending which box it stopped in, thats the level it should go to.
yeah I don't know what to put to link the two
because I don't know what else to put.
lol
Assuming the collision actually does work as you're expecting.
Yep
i would have a collision on the picker or somewhere at top, that set the current one it's on, then on timeline finished the one it's set to is the one to pick
like when the balls collide, set that as the current pick
I had tried that but it always lands on purple so I guess my collision is the issue?
More than likely. Check to make sure the collision shapes aren’t overlapping each other
How can I have physics actors not to collide with each other to avoid getting stuck? I have physics actor boats.
I want them to go through each other..
they were overlapping, but arent anymore but sitll doens't work.
not sure what you mean, a collision on the collision for the collision ?
well when does the long pin one fire off ? everytime a ball hits it ?
Ah, as always a better solution is right there to use lol
you want when the ball is at the top set that as the current one, you could just have integers mapped to the components
after the delay is when it fires.
no the overlap event
where you goto level, when does that fire ?
on the first hit i'm guessing
yeah first hit
if you put a collision box at the top, if have one use that, but you checked the balls that hit it and set the integer accordingly, then on finished you would have the last one that collided with top
right each time that a ball hits that thing set the integer based on which one it hits
hopefully only your balls are colliding with it
but it shouldn't matter ig
my balls dont actually collide, they are temporary so I can see which collision is what. the big collision squares collide with the long rectangle at the top
ok
so use those
you could on each one set the integer on collision with the pole
so that at the end of the timeling the last one colliding should be the one that is at the top and picked
so you wouldn't run that code on collide, but on finished of the timeline
and instead of picking random
use the variable that you set on the collisions
4 different variables for 4 different collision, what do I do about that? how do I plug that in?
one variable
that you set on each collision
so when one of those boxes collides with that pole then you have entered that section
set the integer to the correct one for that one
so on overlap of each one set the integer to it's corresponding value
and then use that integer to plug into your switch
4 events, one variable
omg I understood you! it works!! but now I broke the random and it lands on the same one each time... lol\
so the selector works but your not rotating a random amount ?
no its the same one each time but it does rotate
what does your rotation look like ?
it should still be random float in range, make sure you have the proper min, max plugged in
yeah its plugged in. it stays within about 1/8 of the place it lands on
timeline is only 1 second, min is 2 and max is 5.
thats a small gap for a variation
okay i put 1-50, its btter, a bit high but i'll adjust later. THANK YOU!!
I need to get a random element from a structe array that only has TRUE booleans in it. Anyone know? The ForEachLoop body doesn't loop randomly, it always start from 0, right?
arrays are usually zero indexed
so zero is the first index
wdym "struct array" ?
an array of structs
so you want a random vector with the boolean true ?
Yes please
do you need a reference to the thing, or just a vector where a true boolean matches ?
Second one
Whatever is easiest I guess
there's a shuffle but not quite sure how to target specific elements
Ok so u add if it's true, I can use that for a single vector instead of array
kind of "filtered" vector
Thank you i'll try this
just be careful on a big struct array
it will be slow and could infinite loop
but thats just bp
Oh yes, never had this many infinite loops hah
ya bp needs to do it in one tick or your f'd
if your doing a single vector, where there will only be one with true
use a foreach with break
and break when you find it
instead of looping through the whole thing when you don't need to
It's my first time going deep with arrays, it's giving me headaches lol
But im getting there
Is it possible to see what object has a reference to another during runtime? Trying to see why a widget isn't getting garbage collected.
I have a animation notify which is detecting collision on the foot from a kick animation. Once I have the collided object, I am storing the hit. I now want to apply some impulse to the object that was hit to have it move so it looks like the object was kicked however, when I apply impulse, it seems not get 'kicked' in the direction the leg is kicking it
This is what I am currently doing:
"the normal of an impact point is the direction of the trace." @mild rapids
you may be able to use the normal and multiply it by some amount
right now your adding an impulse that is the impact point which you probably don't want
Hi! @engage has it right. Your impulse vector is the hit location, which isn't right. If you want to apply the impulse at that location, use the AddImpusleAtLocation instead. You still need to send an impulse vector though, so a vector that points toward the direction to move to and which magnitude equals the impulse's strength. You likely can use the bone's velocity for that
so for some reason my default bp thirdperson became data only when I moved it to a different folder, now I can't make any modifications like deleting the camera boom
how can I fix this?
Show issue
i had to reparent
also i couldn't really show it without giving more information i already said lol
question how do i remove an element from an array in an editor?
like for example if i accidentally added an element to an array on the editor, how do I remove it without clearing out the entire array?
There should be a little drop-down arrow
ah ok thanks
This is a general kind of question. I'm trying to create an SRPG camera where the camera would pan to the direction of the mouse based on where its position is to the border of the screen. Would it make more sense to create a series of functions in blueprint or use the enchanced Input System?
in which ini file i can set these resolution?
DefaultEngine.ini
[ScreenResolution]
ResX=1920
ResY=1080
ok
so
i have this notify that is called on attack it does damge and i want this to knock the character it damages back
i want to add the launch character but i cant seem to get the character from the output of hit actors
what should i do to get around that
Cast
You already have the ref. You just need to check it’s a char
gotchu
cast after the apply damage right
itsworking lol
now i need to set roation to be opposite of the damage incoming which has been more tricky i tried setting a set relative rotation but everytine it just rotates it 180 degrees
Is Apply Damage deprecated? 🤔
deprecated?
yea..
i dont know what deprecated means in this instance so im assuming no
meaning that it's not recommended to be used, since they will not update it further on
dont think its deprecated no
and deprecated means its being removed in a future update
not just that it wont be updated
ahhh
guess it could mean both
um no? the input key system before is deprecated but still work in 5.3
where it say deprecated
and remvoed doesnt mean the next update
everywhere wut
it just means it CAN be removed
interesting
i mean enhanced input is the way to go anyway
unless your debugging
@thorny narwhal sorry for the ping but you are the one who told me it was deprecated, just making sure now...
lol all good
for my game im using 5.3 still so idk if it really makes a diff
I'm still using it for now, looking forward to create my own system
i mean enhanced input really makes it easy to let players rebind keys
so that alone is worth imo
both
good
but i still need to figure out how to set the rotation based on the damage event
is that even possible tho
probably from the normal hit if you have a line trace or smt like that
im using box trace
(I have no idea what's the context here)
character using this notify to apply damage and i need it to set the direction of the character based on which side the hit is dealt
top is if youre on the right and so the actor getting damaged should face left and vice versa
but with words, what's going on and what do you want to achieve? (is the bullet an actor)
okkk so you could just flip the character 180 on the z axis?
i tried but every hit it will flip it 180
so after two hits itll be facing the wrong way again
then check if it's already in the correct direction, if not then add 180, if yes then do damage but dont change rot
ok
copyright strikes everywhere 😅
wdym
look above, it's naruto characters
it doesn't work?
does it work the first time?
just a hit animation and the rotartion doesnt change
do GetActorRotation and then set it to the rotation + 180
also, maybe it's not the Z axis, I'm not sure but it should be
from the result pin blue, get rotation
Given you can probably attack from both sides, you will need to calculate the rotation
You can math out the direction from attacked to attacker.
Then use MakeRotFromX, split the rotator and check the yaw value. You might need to round it to the nearest multiple of 180.
You might want to do the rotation stuff in the character that got attacked instead. Cause if you ever have non characters like a box that you can attack, it would also flip
Hey is there anyone who can help me figure out what's going on with my animation blueprint? I'm using the enhanced input to change the crouching variable to true which should activate the crouching idle pose. It looks like it does but in-game the player only crouches when moving around
Hey, everyone, i tried asking on materials but im not sure thats the right place, does anyone know if there's a way of using a post process material only on a scene capture? With it not being visible to the player I mean
im getting an unsafe thread call when casting to my pawn from my anim BP
does anyone know how to fix this? it works as intended but id rather not have the warning.
Hello, what am i doing wrong here? want to reset the Do Once node every time the Update Date is called
Using the 'Get All Actors of Class' is probally contributing to you're issues. If you have multiple 'BP Weather Tower' (which I assume you will), it'll only ever reset the interaction on the first one it finds, of which isn't always going to be the one that was interacted with.
oh yeah, that's probs the problem i guess, is there a way so that it resets in every weather tower?
What dictates when the interaction has ended?
i just interact with the screen by clicking the left mouse button, the screen shows random numbers in a range and that's it, i want the players to be able to click the screen and get these numbers once a day bsically
Is there a way to determine if an input action has been activated while the character remains within a collision box using blueprint?
I attempted using the boolean node within the player controller function but something went wrong.
The collision is stored in different master blueprints where their child blueprints carries different gameplay tags.
I want to transfer the specific gameplay tag to the gameplay tag container stored in the game mode when the character collide with the child blueprints and player trigger the interaction action input
hello ive been stuc on it since yesterday and i still cant figure out why the binded event didnt get activated
the object is stil valid and the i first bind the event and the call it
the only thing that i changed is that ive created another objects of the same class but i never run the code that leads to the bind on them so im completly lost anyone got any idea ?
my idea is that you never bind the object or at least never bind the delegate to valid object
in your screen, even when actor is not valid you are still binding the object, for what?
I gave you tips earlier to print string and drop the is not valid node, until I see evidence that you bind before calling then it's not possible to help.
can someone explain to me why this doesnt actually update the health smoothly, and it doesnt update at the correct amount added either
it adds like around 48 points each time but current health is 2500 and the amount to add is 1000
make it less spaghetti
ok, wait
You shouldn't be changing the values either. Interp works from A to B
if you change either of them in the middle, you will not get the result you want.
For one, Interp should happend on Tick
So you should move this codes to be run on Tick
It is as simple as Interpolating Current Health to Target Health
Your increase Health function should be
Target Health = Current health + Amount
that's all there's to it.
Does anyone know the benefit of using instance structs?
Using structs and classes you can avoid this kind of situation
You can organise many information in a single place
I have used World delta seconds before without issues. I also tried using custom event with timer handle, it still doesnt work
Polymorphism for structs.
it either goes too high value(5000+ to currenthealth variable) or it just adds 40 each time
I have tried setting a check 'currenthealth >= finalvalue' but it somehow doesnt work
That's not the issue??
but if you are not taking advices then I don't know what else to say
I ll research about that topic, ty.
Show code
why are you still adding in the same function?
in tick nonetheless
please read above
your tick function only interpolate from Current To Target. That is IT!
Create a new variable called TargetHealth
The object is valid
won't know without evidence
many times people say something when it's not the case is usually the problem
Stop binding it when it is not valid, why do you have your exec pin on not valid to connect to the bind to begin with. The most it can do is print, Object is not Valid Please FIX
is that enough evidence that it is valid?
Print string when you call the delegate
then screen shoot the result from Play In Editor
print here too
if it does print then your event do get executed, if it doesn't, you want to check if the blueprint instance is not destroyed and exist in the game
it doesnt execute
wait it was destroyed for some reason
but why? like i didint override it and there isnt a code anywhere that it will delete it exept for after it execute the binded event
ctrl Shift F and type destroy actor, then click the binocular icon. Skim thru the project to see where you possibly destroy it.
the thing is i dont have a destroy actor for it
it is a c++ class of Action : public UObject, public FTickableGameObject, public IVisualLoggerDebugSnapshotInterface
an object will be garbage collected if it's not reachable
make a TArray of your object then every time you construct a new object and add it to the array
that should keep it alive
actually you probably just need a valid outer
If the actor that spawn the object is gone it will probably be gone with it. Keep the actor that spawn the object alive and it should stay alive imo.
it kinda what i do the object is allready inside an array in a struct that itself is in an array what im trying to do is when another struct is born compaire the struct with its array of obejct to the rest of the struct and only if it isnt identical add it to the struct array
so my array of object til now is in an array inside a struct but both dont get destroyed at all
