#blueprint
1 messages ยท Page 14 of 1
It IS an array of booleans, but it's exposed so I can just edit it in the level editor. It's not gonna be the same for each one.
Anyway what you can do is to create an array of integer to contain the index of positive boolean index
Discord cropping ate literally every useful part of those screenshots
Loop through your boolean array. For each element. If true, add index to the array
On completed you just shuffle the integer array then get the index 0
I'll give this a shot
That works perfectly, thank you!
Use the completed pin. Calling the return node during a loop body will break out of the loop on the first index and skip all the rest
Hey, not sure if this is tied to BP's or not. But whenever I try to spawn I spawn in this weird corner instead of the player spawn. Someone mind helping me if they can?
Is there a YT tutorial for loading assets and stuff??
Hi all,
I am using Soft Object Referencing to load furnitures into the scene.
However, after loading numerous objects, at a certain point, loading new objects will give me a "Waiting for static mesh to be ready" message on the Editor mode.
(Message does not show up on Build mode, but there is a visible lag and wait).
I am presuming that this is due to a memory issue.
Is there some way that I can check the memory status, and do some kind of unloading to manage the memory from time to time?
Assuming your furniture are static mesh
You can type
Obj list class=static mesh
In your output log
It will display all of the class you specified currently in memory
Do note that in editor once an object is loaded, they stay loaded. So you have to restart to do some test
@distant hollow show how you load the soft object references
Youtube demystifying soft object reference by epic games
Thank you
SpawnActor > Pump information to actor > Async load based on info pumped through
U want to be careful with async loading when trying to load multiple soft objects
Yeah but not using handle will never guarantee that
"Not using handle" meaning?>
If u load again before the object is loaded then rip
There is handle u can use but I think cpp only. I got a help from someone in this server
its a new actor anyway, its fine
I tried making sure one is loaded before going on to the next, so that should not be the issue.
are their materials heavy?
Ahh ok
Sry didn't look at the bp carefully
U spawn actor and have the load function inside the actor. That's fine yea
Materials may get heavy, but they are separate hard references
This is how the data is structured:
Only StaticMesh is soft reference
I have a separate code for loading the mateirals after StaticMesh is loaded
Would the material volume still affect the loading in this case?
when you say "after loading numerous objects" are they different static meshes or materials?
not exactly, since they are hard referenced, they will be loaded when the datatable/class is loaded
I'd say both? Each actor will async load the StaticMesh, and apply the hard-referenced materials
Yep I was thinking the same.
So the materials shouldn't have an impact in that sense in this case
just to double confirm, its this kind of message right?
those usually means its either the materials are compiling and such
Materials? Not StaticMesh?
i will guess its the set materials that is giving you the lag
Hmm should I then also soft-reference the materials?
usually yes
I soft ref everything
the heavy portion of a static mesh is usually the texture itself
The icons the material interface the anim bp
Let me try disconnecting Set Materials and see if I still get the same issue
I vaguely recalled trying that
Detected 68 objects loaded in PostLoad while streaming, this may cause hitches as we're blocking async loading to pre-load them.
I got this error when trying to async load a lot of object
Can't remember if it freze in shipping build
yep it blocks
๐ข
If Materials is the part causing the issue then rightfully disconnecting Set Materials should result in the error not showing up, correct?
yes
Ok let me try
hey cold summer
Lots of time I discover being wrong reading convo
So that benefit me as well
Well I'm chilling here atm because i don't have my computer with me atm. Currently out of town
do you work in a company or a freelancer?
i have taken a liking to you
@remote meteor
Anyway sorry but I don't think this discussion is allowed in bp
Lasted much longer without Materials before this happens though
Happy to talk in lounge sometime
So I'd say it's probably overloaded memory
It's a prob a shitty suggestion from me. But what happend if u add a delay after the load before setting the material
Skip a frame and see what happend
I'm trying now without the Set Materials, so it wouldn't already have anything to do with it
Ahh
yea lets talk there sometimes
I mean the Set Materials part probably contributed to the overall memory load
But primarily even without the Set Materials coming in to the picture, the issue would still occur
It doesn't seems to be related to soft ref loading tho? https://forums.unrealengine.com/t/waiting-for-static-meshes-to-be-ready-works-very-slowly/729050/2
I recently started experiencing this. I brought it some Megescans content and some of them (but not all) get stuck on this for a long time when trying to open them or drag them in to the level. I did find a way to make it happen all at once by selecting all the meshes that would have this issue and then right clicking them. Itโll then process a...
I don't have much clue
But if ppl get the promt when not loading then the issue could lies else where
I don't think the issue is with soft-loading per se
Which is why I felt it is about memory management
The said user in the thread also mentioned that he was loading thousands of objects
How many objects r u loading? I load like over 200 atm and haven't come across the error
Maybe about there, though my own GPU is only a 2060
Yeah perhaps it's nothing to do with the loading, afterall it's editor prompt screaming
And we wouldn't know what specs our clients are running on
Yeah which comes back to what I came for - memory management
Obj list class=staticmesh
if you restarted editor then it would be ok?
With editor tho, once u load something it stay loaded
It would, but at one point it will still happen after more and more objects were being used
We cannot expect our clients to keep having to restart once they start to lag
Shipping build have gc working
its not a good idea to gauge memory management from editor, you will atleast need to test them in standalone
So run GC from time to time randomly? Or is there some way that we can let the system monitor the memory?
Gc is automated
GC by default runs every 60 seconds, or during a hard level change
I see
I see, that's good to know
there is something to try, without the set material node
in a packaged build
does it still freeze?
If the error message appears under the Editor I suppose it should freeze up (temporarily) in the packaged build?
not necessarily
Memory management is more efficient in packaged?
Editor don't even flush loaded objects when you stop playing in editor
Have to do full restart
I see
if we dont want to guess whats the problem, we can use profiling to look for them
How do I do that
In packaged build I can actually see my objects being unloaded
but you would need to learn how to use Insight
How steep is the learning curve?
BTW for the Materials
If I am using Material Instances
Would it still help improve if I used soft referencing for the Material Instances?
No reason to load something to memory when they don't exist in the world yet imo
Then again my biggest MI is only 141kb
90% of them are under 20kb
Took 2 mins to load a level in my old project. 0 soft ref. Loading the player loads the entire game
Ah
then the texture is loaded
So still better to use soft refencing for the MI?
the whole point of using soft reference is to prevent loading the entire game/content into ram when you are not going to use every single one of them at once
there is 2 points where a static mesh is heavy
the static mesh itself, and its texture
I'll need to convert the data and references now then
i cannot help too much since i dont have the package. I'll suggest looking into profiling the package with Unreal Insight to see
in the packaged game, what caused the freeze that you have mentioned
Noted
I think I'll start with conversion of the MI referencing to soft referencing first, it's gonna take a while and I would also need to convert the DataTable data somehow
1000+ entries there lol
switching between hard and soft refrence doesnt loose the path in your data table, just dont change the name of the variable
but you cannot use a forloop to async load and set material though
I have multiple materials and different objects may have 1-3
Oh
What might you suggest in that case? Manual counter loop function?
yes
Alright
for starters that will work, waiting for the asynchronous load to finish first, before proceeding the next one
Hi, is there a guide that explains how I can get players to place items in certain specific spots?
How do I get some code to run when a UI button I've set up is clicked or otherwise activated? I thought I'd see events or something in the button details but I don't have anything obvious.
If you've added the button to your widget, you have to mark it as a variable at the top right of the widget designer window when you have it selected. Once you've done that, you'll have some events listed for you at the bottom of the details pane like On Clicked, On Hovered, etc. Click the + symbol beside them and that'll add the event to the widget's blueprint graph.
any clue why this error ?
@oak fable
-
The error means that the Character reference was null/empty during at least 2 occasions where it was being accessed.
-
You should not use the Character reference directly in the AnimBP graph. You are supposed to use it in its EventGraph and extract the info into new variables and then use those.
The warnings in your screenshot are not for decoration
You need to get the variables there too
You can't use the ref directly in the AnimGraph
can you please explain a bit
what variable should i use there
@oak fable in your AnimBP you are accessing the Character to get variables from it. E.g. the SwordOut one. You need to do that in the event graph and make a variable there to save it in. Then use that variable instead. Same with the state function.
Newb question. I'm spawning a projectile from a socket on the mesh (left hand). The projectile always seems to spawn a fair bit forward of the hand. If I slow it down using Slomo 0.1, it spawns just fine from the hand. If I speed it up to slomo 2.0, it seems to fire even further away. Is there something I can do to compensate for this?
I'm firing it on Event Tick using a bool to check if it should fire.
i still cant figure that out
Could be that it applies the first frame of Velocity already?
I set a timer for next tick on projectile EBP to enable movement. Velocity is not part of the movement component, it is part of the trace done on event tick on the projectile.
okay so i delete them
add them in a new function and have it as thread safe or what
One frame delay doesn't help.
With the left red node being the variable on the Character BP
And the right one being a new one in the AnimBP
And that new one you can then use where I crossed out the other one before
Same goes with your "IsStateEqualToAny" node
now i kinda got it
I returns a boolean, so make a new Boolean in the AnimBP, set it with that and use that
@Datura Thanks. I will try it. Not what I would have expected.
thanks a lot โค๏ธ
How can i attach an actor to another actor in a way that it actually snaps to the socket and not like way above or below that? See the provided images. I changed the z location of the socket by only 6 but the character moved like a LOT more. z= 113 to 117 didn't move the character at all. It is like at a specfic height it snaps to the next position which is far off
Could it be a physics problem?
I am disabling the actor collision beforehand so I don't think it's a collision problem
Center of the capsule gets snapped to the socket IIRC. Move the socket?
Nope, I did move the socket in the 2nd and 4th screenshot as you can see on the markes z axis value there
Right click the socket and add preview asset
Use your character as the preview asset and adjust from there
it's not that I am having problems with the socket placement
I think y'all didn't understand the problem
the character doesn't 100% snap to the sockets position. The placement on the z axis is either like the 1st or the 3rd screenshot. There is no in between position, no matter what I choose for the socket z axis value
Is there a way to change fall-speed without changing gravity scale? I have a wall-slide feature and when I wall-slide I would like the character to fall slower, but ideally not change the gravity.
Change movement mode when you walk slide and change the gravity when you are in the movement mode you selected
Ah, hmm, so you mean setting up an enum or such for different movement modes? Or is it someting already built in? (Sorry new to unreal)
Interesting! Just saw it in BP and in the docs. So I guess I need to setup a different movement mode and switch to this when wall-sliding and then going back to normal when not. ๐
Thanks! I did not know about this one, will look into it and see what I can figure out!
It could just be "Custom"
I see many use flying
With flying you're unaffected by gravity
And can apply your own
This looks too simple, is this what you mean? Again, sorry, trying to figure this out,. ๐
When setting a text widget's text via BP by converting a string to text, the wrapping gets messed up.
If I instead use a literal text and set that, the wrapping functions properly.
Anyone know how to fix the case when converting from a string?
Don't forget the onmovement changed
It should be an event on the cmc
Btw it was because of the foot ik rig lol
IT'S ALWAYS THE FOOT IK RIG
LAWD
anyways, when the next person comes around the corner with this problem tell em ^^
Does anyone have any idea how to fix this? I'm spawning a projectile from the location of a socket on the hand. At normal gameplay speed, the projectiles spawn very far away. In slomo, they appear to spawn directly from the hand. I'm using a projectile movement component with an initial speed of 5000.
The results are indentical in third person.
Not multiplayer, so its not a replication issue.
Is it individual actors or some niagara effect?
Tried 0 initial velocity, and setting velocity on beginplay?
Kinda unintuitive but
Same result.
Setting initial to 0, max to 5000, and this on EBP.
and you're ofcourse not using velocity during spawning
Pooling is a good tip , generally speaking
If I put a Delay Until Next Tick before the Set Velocity, it spawns them in the hand just fine, but they almost appear to warp away.
they'd move pretty far in a tick tho , depending on framerate
5000 *0.016 = 80uu(cm by default) at 60fps
I understand, I was just hoping for something a little more visually... smooth.
You could lerp up the speed
Lerp 0 to 5000 over .. .5 ticks?
eh, idunno
not sure that's nice either
constant acceleration up to max speed , from close to 0 would prob look ok
I'm assuming my math is correct here, but this seems to smooth it out quite a bit.
I d just do delta *(forward vector * 1000) as the added velicoty
That works, just might be a bit too slow. Looks really awkward when strafing now.
Adjust the acceleration to suit your needs
Maybe accel is 5000 ? Idk ๐
Maybe 10k
Maybe you also want an initial of > 0
Just took some tweaking, but I found a reasonable spot. Thanks.
I set a really high multipiler for the delta before feeding it in. They spawn close enough that I can see them, but get up to max speed very quickly.
Any way I can add multiple entries into an array at once? (just to avoid blueprint clutter)
Right, okay.
Making a stat display for each tower. Just want to collapse all stats that are 0 anyway. Player don't really need to see them.
Is this in a widget bp ?
yeah
Id create stat entries dynamically
So for each stat -> if value > 0 -> create stat entry
Thinking...
haha
I see your point "sorta". I'm using a widget inside this widget for each stat line.
I could make an array or map for each stat line, and loop through them in the end to create a widget (line) for each?
Is that what you are saying?
Nested widget is exactly what i ment aswell
So whenever its initialized, it loops over the stats it has, checks that they're above 0 (or whatever treshold fits) and if so. Create the stat entry widget and add to the vertical box for display purposes
So you dont have widgets that are collapsed for no reason (not that it matters but it does )
I have 2 small complications on top of that.
- If slow chance is 0 for example. I also want to exclude slow time and slow amount.
- I have an option to only show primary stats, and detailed stats too.
right
Feel like it is almost as complicated then. Probably just me being a noobie here.
Relying on other stats , youd need to check if they exist aswell before creating
Ugh
^^
Just ingore my suggestion then
Vb crit -> if critchance > 0 -> set visible, else collapsed
Vb?
But wait
It doesnt really rely does it
If critchance =0, so should critdamage, right ?
Verticalbox
So store crit values in its own VB, which is collapsed if CritChance ==0
Critdamage not relevant then.
Yeah but critdamage would also be 0 in those cases, right?
No, just not relevant. ๐
Honestly don't want to nest widget elements if I can avoid it.
Widgets are my biggest enemy at the moment. Can never make them scale/behave right.
Would rather complicate the code slightly and reduce widget complexity in my case.
having them in a VB doesnt change anything with scaling tho
I appreciate the suggestion though. I just really don't understand those widgets well. Always spend hours trying to figure out which element is acting up because of a size, padding, or third thing.
but alright
At this stage I often find out by collapsing elements one at a time. The more elements there are, the more hair I loose. ๐
I always nest mine as they're far easier to add/remove/disable by code ^^
can even remove entire 'sections' of a widget since its nested
I bet you are right. Need more reps under my belt with widgets before I do it.
why that big difference?
Is there?
stupid question: is game state purely a container or can it contain logic?
It's a class like any other
Quick question - I know casting should be avoided where possible due to the hard reference it creates, I assume this is the same for an example where when creating a Widget, you pass in an actor reference as a variable?
hello
quick question , there is many difference between ue 5.2 and 5.3 , can someone explain what did they changed about the tag section
Yeah. Bp problem
Casting is unavoidable when you can't cast to the base class.
U still have to do it. Just be mindful about chaining hard references
What's the difference? Ask in #gameplay-ability-system maybe
thx
I seem to be doing something wrong here and I don't know what
Use Floats
5/53 = 0(Int) , 0 * Enemy Points = 0
5/53 = 0.0943(Float), 0.0943 * Enemy Points = What you want
oooh
yeah makes sense
integers got no doubles
nice
enemy points got a value of 3000 by default btw
Yoo folks, Im struggling a little bit with Data Tables as arguments for functions. I want to have dropdown for selecting specific row from specific data table, but I cannot achieve that when using DataTableRowHandle type as input - it allows me to choose DataTable but I cannot choose row name from dropdown. Basically I want to achieve the same result as Get DataTableRow has
the calculation returns the correct result: int(5/54*3000)=277
Yup
yep
yip
Wdym? Show me your function
For now its empty. I just made it for example. As a final result I want to have function PlayVO that plays VO from DataTable with additionall info.
What is play vo?
Btw I'm just guessing what u want to do at this point
But what u can do is get all row names
So create a function that had data table and fname as the row name
Has*
For input*
Actually I get brain fart sorry
In the train rn but I will look into it when I get home
Need editor to actually see it
Basically I want to have DataTable that is populated with voiceovers and additional information about them. Then in bleuprint I want to choose from dropdown what I want to play in such situation. I want to avoid typing the rows name manually bcs everyone can make a typo etc. So basically I want to have the same logic as GetDataTableRow node has as an input, but I want to have my logic inside this function to handle data.
You should never write the row name manually. You can use get all row names node and just populate a drop down with it
Getdatatablerownames*
Hey can someone explain why the dot product is not working right? I'm using 5.3.1, the static mesh is perfectly aligned with the target.
If I use "Get Dot Product To" it correctly returns 1 as the output, but not if I use the dot math node like in the screenshot.
Thats why I want to have dropdown for row name in my inputs for function as well
I c what you mean. I don't think that's something that is built in though ๐ค
@teal dove forward vector is already normalized, and it wants two directions. You gave it a direction and a location
You can populate a drop down in widget at run time by using getdatatablerownames but I don't think that's a thing you can do in editor
@idle pelican but really u don't need to do that?
Oh I didn't know that, it worked before so I was wondering why it gave me different results now.
Then what should I input instead of the targets location?
Also if I instead of the forward vector use an actor location for self and the target, and normalize that, it also doesn't give me a result of 1. Why is that?
All u need is
1.Populate dropdown with data table row name (it can't be mistyped since we get the data straight from the dt)
2. Have a button that passdown fname argument from the widget drop down.
Your function will look through the data table, passing the fname from the drop down to the row name.
On row found break struct. Play sound from the corresponding data table
@idle pelican
@teal dove if you are trying to find out if it's directly in front of the player, then I'd get the unit direction between the player and the target location and then dot that against the forward
But I think you are thinking about run time solution. I'm talking about solution for devs, to help them with implementing VOs
Yeah I don't know exactly the end goal. I guess u are making a plugin or something
I want to make a turret that has a limited angle, so I need to see if the target is in the forward angle of the turret, hence why I want to use dot product.
Or marketplace asset
Just system for my game, to help developers with developing
I would try to ask #cpp because it's clearly not a thing bp can do afaik
can anyone help me with a packaging error (is this the right channel?)
Yeah then that will work. Then just check if the dot returns between like .7 and 1
Yea, Iโll try probably. Thank you for your effort โค๏ธ
thanks
Thanks for your help! I got it working now by using the vector between the static mesh and the target, instead of just the targets location for the second input. ๐
Hi, i have a question pls,
Whichever way I turn, it still throws the line in the same direction;
thats yaw, not pitch
Yes, this time there was a change, but I don't want it to work like this. I want to detect 45 degrees left and right of the character
and likewise for the back
then get the yaw and add or subtract 45
I'm a little closer to what I want to do, thanks :). I'll let you know when I can do exactly what I want
Hi can anyone help at all? Got my blueprint working but when i add an actor to a varibale it works at first, until i save or reload the project, it then displays the name of the actor but doesnt trigger anything as if it cant find the actor anymore until i reselect the actor in the variable again.. any ideas??
Add an actor to a variable? What are you working on there?
So that when a door is triggered open it will get the public variable actors to interact and will trigger the interaction for that actor
What type of variable is this, a struct?
So at the moment Pointlight 3 should explode when door is opened which it does, but when saved and closed and reopen project, Pointlight 3 will remain there but not work.
Give me 2 seconds to check
I believe an array in a struct
Bp structs have lots of issues but if youโre trying to save a ref to an instance post-runtime that wonโt work
Its defiantly before runtime isnt it a UE5 issue atm?
Well the instance doesnโt exist yet unless youโre using level bp (not recommended) hard refs
So just to understand you want a bunch of lights to explode when you open a door?
Correct
It works once or as many tiumes as you want. But after closing down UE and opening breaks it
Is it all lights in the level or specific ones?
All light references
Ok well just do on door open, get all actors of class, select the light BP and make them explode
If you end up needing to be more specific you can use tags to filter
So its basically structs are broken in UE atm or as in not saving data correctly when closing application?
Bp structs, not cpp ones
Maybe, tho afaik you canโt save an instance ref because itโs not persistent, instead you need to save its vars and recreate it/modify it at runtime
Ok that kinda makes sense, so it needs to select it as a variable but is not persistent and doesnt stay there when saved.
@supple dome thanks a lot โค๏ธ
is there any alternative to timelines that can be used in components? I have a component inheriting from SceneComponent that needs to rotate from its current rotation to a target over time when a function is called, but timelines seemingly can only be used directly in actors
and I don't wanna enable tick on all instances of the component for obvious reasons
You could use a set timer by event ?
isn't it just going to call a function/event once on a delay? I need the component to rotate from A to B over a period of time, if possible with a curve used in the lerp
Just enable tick then re-disable it
you can do that at runtime without problems?
Does anyone know how to get the forward vector of a component in it's relative / local space?
Yes.
thank you
If anyone have a few minutes I would love some help on a small problem I just can't figure out.
I'm changing my movement to a more "simple" version. Right now it is setup identically the video below. What I want to do is change the sprite to 2 directional but have up and down use the last direction as the sprite.
https://www.youtube.com/watch?v=z1RMDMKcROQ
Please PM me if you got a few minutes. Thanks ๐
Is there a way to rotate all selected objects but using the pivot of a my last selected one?
Isn't that just 1,0,0?
or do you mean relative to parent
Not sure how good this solution is, but what came to mind is temporarily attach all those selected objects to the pivot actor. Rotate it. Then detach them.
That would def. work, if be a bit clunky.
The only problem I can see is I have more actors than just static meshes so that might get weird
relative to parent
this is what I initially tried
I tried changing the pivot of everything to my last selected object
hey, i have this code that spawn skid marks when the vehicle is either slipping or skidding and the wheels are touching the ground. The problem that I have is that when I try to add audio to the code, the audio plays after the skid marks have spawned rather then playing as the skid marks are being spawned. Asking for help.
why would opening any related widgets cause a stack overflow crash
i had this yesterday and had to delete the hud or something to make it work before editing them and now its doing it again
Could check the .... racing sample
oh i think ive added a widget to a widget where its a child of that widget
now i just gotta figure out how to break the references so it opens 
cant even right click any of the widgets
well that doesnt help
how can i set a parent without opening it
i'm new to using unreal and haven't learned all the terms yet, could to please explain what you mean by the 'racing sample'
Yes relative to it's parent.
Although what I really need is a way to clamp a rotation relative to it's parent.
One of the sample projects that epic has provided is a racing game
It has skid marks and sounds
You could download that and check how its done there
thank you, i'll check it out
You'll want to use Transform / Inverse Transform Direction
if anyone searches this problem in the future: add this to default engine config
hi guys, I am planning to boost my character speed once i hold my spacebar (under IA_Boost) while im holding my D button (Under IA_Rotate), anyone know if this is possible?
Hey guys, creating a HUD effect for whenever i fall from heights. It's working, but the "Remove from Parent" node doesn't always Remove the HUD effect, and i cant figure out why. Here is an image of the code:
Once it's fixed we just remove it I suppose?
yeah you cant add a child to a parent that has their parent as that parent, i assume its making some sort of infinite loop
yeah circular dependencies
it didnt even occur to me for a day idk why
Use breakpoints to find out whatโs happening at runtime
Using print strings i havent found out anything strange happening sadly
Does that code look like it should work to you atleast? Just trying to get a 2nd opinion to make sure atleast the method im using is correct.
Should be alright, if only one widget is ever created
In theory. But for all we know you could be adding the effect somewhere else.
I would wildly guess its added twice
We canโt see your entire code plus doesnโt this stuff usually get handled with post processing effects ?
Thus first ref is gone
Id store it in a var on creation ..
And only create one..
@lunar mulch I think your montages doesn't complete. Put all pins in it
Cheers, gives me plenty of stuff to try out
Btw, your saying doing this stuff with Post processing effects might be a better Method?
Yeah I was gonna suggest checking the completion pin but he said he tested with print string so I assumed competence
Cause i don't like this workflow at all for doing overlay's lol
My argument stands ๐
Im not sure how to animate image transprancy etc in Post processing tho, is that a thing?
It is
I mean thatโs how I would think about it. Could try #visual-fx
You lerp a translucent or masked material
Or I guess materials
It won't work for mobile though
@ebon olive I don't get it. You want to only boost once if space is held while D is also held??
Other than complex boolean cases on the pressed down and let go I don't know of any other method
It's stored as a variable on Creation isn't it? (I might be mis-understanding you thats why im asking). Also, how would i make sure to create only one?
because i think your on the money with your comments
IsValid check
Promote return value to a var, and before the create node, if invalid, create it, otherwise bypass
Its only cached as an output. Youd want to promote that to a variable
Just to confirm i understand here's an image of what i've done
Is Valid is continueing to play the montage and skips the Widget creation, and Is not Valid does the same, but also creates the widget
does rinterpto need to be called every frame?
No, but setting the output value should be on a tick or timer
oh ok thanks
Or timeline maybe
Correct
My head hurts, doing this will only create the Overlay once, and it won't show up anymore if i fall a 2nd time. So that ain't a solution either sadly.
Also, even more annoyingly, i got the same code on another Landing animation, and that one is working without any issues.
That Animation is Root motion tho, so i guess because the character isn't controlled it's not interrupting the Widget, and as a result doesn't bug out. (i guess?)
Weird shit
Sure it is, just set it back to None when done
Same code as in youโre calling the same widget, montage, etc?
Yeah, and the Method is the same, its basically the same code, the difference is the animation that's being used is a Root Motion and as such i've disabled Input for that animation
On the one im having problem with, the player is supposed to still be able to move as the widget is being called, and i think that's what is causing the issue.
This the working one:
Donโt drag spaghetti behind nodes, you have a var, just get it again
Having nearly organized code makes it easier to debug
Also uh, youโre doing multicast on a widget creation, not sure thatโs right
Hmm, the Multicast plays The Landing animations
Oh nvm I misread that
No worries hehe the code is messy
Itโs not actually that bad just rmbr once youโve promoted something to a var you can just get it again as many times as you like
Is there a way to translate a local vector to where it is in the world?
can someone please tell me how to monitor varibles in runtime? i want to test and see how they change
print strings or whilst your game is running, look at the bp and hover over the relevant variables
You can use F8 to quickly go from controlling your game to controlling the editor
Inverse Transform Location
Ah yea, just found the transform location node. Do I understand correctly that the inverse version of the node goes from world space to local, and the non-inverse version goes from local to world?
Sry, yeah that one
All good, really appreciate the help!
Forums had it backwards but docs say it like you did
i dont understand, why its 0 0 0, nothing changes
its doesnt show me varibles
Gotta love the discrepancies ๐
Ah, it is because you are looking at the default value instead of the current value of the var
As far as I understand it, you have to navigate to a place where the var is in the graph, and then hover over it
oh.. thaats how its works in unreal.. i see.. ok.. thank you
whats the point of blueprint interfaces if you have to provide a reference to the blueprint youre sending something to
Havenโt played with those in a bit tbh, I canโt rmbr if you can just get the player controller to send an interface msg or if it has to be that bp
im messing around trying to make a master widget for the menu right now and its getting annoying
Why add it dynamically if I may ask? Rather than just changing collision settings dynamically
Because I need to add multiple based on dimensions given at start.
Box
Box01
etc.
At start?
on play
Who assigns them
Player controller
the box collision is half of the box size iirc, you should try to get box extent
or wait 
Do it on Construction Script ,too
doesn't work there either
it might be a set size for that one, like 1 scale is 100 units or something dumb like that
Thatโs not going to work if heโs setting the loc on begin play
I can't even get it to spawn
Add a 1s delay after begin play and test if it works
Hello! I have a question. I made a cound down timer (of 3 seconds) on the start of a game. But i need ai and the player to be paused or not able to move in these 3 seconds.
I can pause the game but than the timer for the countdown is also paused. And I can disable input for the player but I dont know if this works for AI aswell. Or is there a way to disable input for everyone (for only 3 seconds)?
Yes
It may be spawning, but not where you think it is.
On the return node, do an IsValid check... get it to print true or false.
I have a pawn with capsule collision component (its collision set to the pawn preset) on which I'm simulating gravity with AddActorLocalOffset.
Strangely though, when hitting start, the pawn doesn't detect any collision and just falls straight through the floor.
What could be causing this? ๐ค
Also use breakpoints or print to double check the transform
Can you show us the setup please?
Of course, what would you like to see?
The pawn you wish to collide with the floor and its collision preset please.
Auto-correct ๐
For some reason im getting an error here but i have no idea why. It is still there even if i remove my map from the blueprint. Anyone know why?
here is the only place i use the map (it is not done yet)
The is valid says it's working but I still don't see it being attached or being added to the level
In the world outliner, check for the box. If it is returning true, then it must be there somewhere (in an ideal world :D)
is it so small that you can't see it inside the mesh? 
Have you compared your setup to the default unreal setup?
Instead of feeding the location into the xform, break the pin and only feed in the location. Then right click and watch that value
Still nothing.
I'm spawning 4 just to make sure
You missed a step
I have. In the collision settings there's no difference. The only thing I could really see a difference in is the lack of a charactermovementcomponent (which is exactly what I wish to unshackle myself from)
And it just phases through the floor?
Does your rectangle have collision?
Yes. Just falls straight through.
My rectangle has no collision, just the capsule.
Do me a quick favor and add block all dynamic to the rectangle please
Done, but still falls through the floor
Does the floor have collision?
The floor is setup like this
Did it collide previously?
Nope, never.
I'm not quite sure what you mean
F9 the box collision node, and monitor it's value when you hit play.
๐. Right click the input pin named Relative Transform Location, click Watch Value. Run the game, select the debugging object if necessary, and literally watch it
Is the correct actor being spawned at runtime?
I'm running out of ideas, unless we hop in VC and figure it out together ๐
It is, this is a new actor I'm using specifically to test out any collision ideas
I'm in pivot point!
I'm having a hard time understanding the difference between interfaces and event dispatchers. They both seem to be simply an event that can have different functionality depending on the blueprint it is attached to.
The numbers don't move. I'm guessing they are supposed to?
Depends, if it shows 0,0,0 it prly wrong, if itโs what you expect itโs fine but I would test by manually positioning a box at that location to see where it should show
It doesn't show 0,0,0. But! adding in manual locations did give me a second box but it doesn't show up in the outliner. Which is weird....
Would anyone know why the first array everything works fine but after that each array get copied x6 when sent to the ui?
They do have a lot of overlap. Your main difference is interfaces are class agnostic, whereas dispatchers are not. To bind to a dispatcher you need a properly casted reference.
To call an interface function you don't
So if it needs to be class agnostic, like interaction, use an interface. If it's listening to something specific from a specific source, use a dispatcher
By manually adding I meant in your blueprint tab add box collision and paste that vector in its location
Because you are executing the rest of your code on loop body, instead of on completed ๐
Wow I'm dense haha
Haha no worries, happens to everyone ๐
Clean up that spaghetti!๐
So, why is it that the "suggest projectile velocity" node doesn't trace complex collisions?
Iโve never used it, what are you going for
The yellow lines are the debug path of the suggested velocity, and it is going straight through the mesh
Why not just a line trace
So, I've brought this up before, but I'm still kinda stuck. I'm trying to turn the player into different things like boxes, cans, even lawnmowers. I've managed to resize that capsule collider to match these shapes, but I've run into a snag. Like in the pic, when the collider fits a square, it can sneak through a triangle hole. It shouldn't, especially when the square's edges are clearly touching. Basically, I just want the mesh collision to work right, so the player can't walk through places they shouldn't. And I cannot just add colliders to the player, since if you have something like this, then the cube would push other objects. But the player could still move the box into the wall, until the capsule collider hit the wall, then it will stop. :/
Can you see the char through the box?
I hate to spam but why would break struct not show my custom Enum on the struct? the enum shows up in the editor window but not in bp
Bp structs are all sorts of f-ed up, add bp enums to them on top of that and itโs gg
Cpp is da wei
I thought I'd be safe since I made the structs and enums is C++
I'm breaking the struct in bp to use the values to populate UI text boxes and stuff
Here is a screen in the widget graph
I forgot to add a specifier in the enum class ๐
Nope
Play sound 2d is a fire and forget operation, you can't get a ref to it
Use audio comp instead
Read the docs for more info
Also look at the target for fade out. It takes an audio component
Sorry, I dont get how you mean?
Iโm wondering if you should just replace your char with a box pawn
Provided you canโt see through it
Ah, yes I intend to, currently, I have it set up so there is an empty static mesh that just line traces and changes to whatever static mesh I'm looking at. I don't believe this will work long term, so I will change to possession. But with possession, I cannot figure it out. They all have capsule colliders or If I add custom collision, for example, to fit let's say a PC monitor. Then only the capsule collider will block movement. The rest will just phase through objects. And it wont stop movement.
Only characters have capsules
But don't I have to use a character? Tried setting up a pawn, and it cannot accept movement components. So I have been using the third-person character as a base.
It accepts floating pawn movement comp
Take anything except character movement
Oh okay, I will look into that. And do you have an idea of how the collision could work? Will the image in my drawing be fixed? Does the pawn move based on whatever collision the pawn has? So I square cant fit into a triangle hole for example. If you know ๐
Collision usually works according to its shape. As for the hole it fits in, it depends on shape, angle, etc.. Canโt really tell whatโs going on on your end, you might need to do a screen cap
Hey is there where I can ask for some help?
Ask question in relevant channel, maybe someone can help
If so, I am trying to make a log (cylinder with a capsule collision to detect if player hits it) roll down a slope. Currently, the log just sits at the top of the slope but if i make it very vertical it rolls down and then stops before it hits the bottom.
The log is simulating physics
Is there a way to allow it to roll down naturally?
(I am very new to learning UE5. Well UE and game programming as a whole (I know python but that wont help other than logistical thinking ect), so I won't know any complex ways of doing this - or the any way clearly ๐)
I don't think physich is an easy subject to touch. Have you tried to play around with the setting? Like change the mass, damp, etc
How can I destroy items adding delay with blueprints?
You should be able to add force too to simulated objects
ive made the mass 1kg (used to be 100 which is default)
A log that weight 1 kg?
Seems legit
thought maybe its too heavy lol
Also #chaos-physics
U prob get better help in this channel
okay ty ๐
Ask the physich guys
Can you rephrase that?
I was following this tutorial:
https://www.youtube.com/watch?v=XaPECMAKbSI
But basically I would like to destroy an item for example after 5 seconds, in the video there is no blueprints. I want it gets destroyed after hitting the ground after 5 seconds
Ok, yeah so youโre looking for fracture not destroy. Not your fault tho, the UNF guys are just as bad as most tutorial makers out there
#chaos-physics is where you want to ask about the fracture system, thereโs also some stuff on the learning portal
You basically need to take a mesh, fracture it, and then add the newly created geometry collection dynamically at runtime after 5s
Might need to add some force to it if it needs to break while already on the ground but it depends
use delay bp and then destroy actor?
from what ive learned for now anyway haha
Lies... this just cost me a bunch of time >_> It's not radians but a specified period.
Thatโs not what theyโre looking for as far as I can tell, just bad terminology
Do do with my earlier issue, I have found out theres some weird collison box
anyone know why?
im not able to click on it at all either
honestly no idea, i just started my journey the other day
Did you by chance add an extra capsule collision in your blueprint?
I am using a plugin called the dialogue plugin. It allows you to make these charts with custom nodes.
What is this called in the engine? I want to build the same but for turn based combat
its not shown in the view port
It might be another object. Try to find it in your levelโs outliner tab
Click on each thing to see what it is
It should highlight it
nope, nothing :/
Iโm not sure what you mean, like a state tree?
BTs?
Guy, thereโs something obviously there, youโre not showing an extra capsule for no reason.
Show your my blueprint tab for the log
So we can see all its components
in the outliner tab ive clicked everything and it does not highlight. only shows when i show collisions
I will try, best case you dont hear from me again. _Worst case you will see a video here ๐
K now show show your outliner
Are you rotating or adding anything to it in bp?
i think i rotated and scaled it ye
I have placed a turret on a moving vehicle. To limit its downward movement (camera based off of mouse pitch and yaw), I added this to the turret blueprint.
Is this the right way? I noticed that when the vehicle goes up hill, the turret is still limited by its setting and I cant aim full range. Target is the camera
Dynamically? Like with code?
oh, no just in the view port
Delete the capsule component
Compile, save then show what it looks like in the level
figured out the issue, just dont know how to fix it lol
when i click the log, the random capsule is now orange
but the one i have made is not there anymore
it takes collison from the character with that capsule, but the collision im detecting for the player, where the log actually is @lunar sleet
I donโt understand. Did you delete the capsule component inside your Log bp ?
I have done actually, i didnt think it was needed but i added it back so it could colide with the level.
did i add it back on wrong?
Thank you. I am not sure how to add the newly created geometry collection dynamically. Can you explain a little bit? I follow everything in the video, so I have fractured the mesh
Idk whatโs happening anymore z is that your log?
yeah its the mesh
it's probably not a new capsule, it's most likely the same one you had and something is rotated without the capsule
how do i rotate the capsule to match the mesh?
You can't call that function after you release
Releasing will set the grabbed component to null
This is no easy topic but basically you can either add a geometry collection component and set its rest collection or you can just have it there by default set to invis and no collision and just make it visible and turn collision back on at runtime. Again #chaos-physics is better for this
If you want to call it after release. You need to cache the grabbed component before releasing
Did you add a capsule component instead of capsule collision somehow?
You might need to just delete that bp altogether and start fresh
@finite maple get rid of the absorb function entirely.
Before release component. Get physich handle, get grabbed component. Promote it as variable. Call it released comp.
Then AFTER the release function. Get released comp, set all physic velocity to 0,0,0 then set release component to none.
all physic linear or angular velocity tho?
Set the linear velocity of all bodies in this component.
Your on click only fade the sound, it did not play the sound
Play the sound first then fade
how do i set it to none?
Promote the return value so u can get the ref
That's it play and try it
How is it possible to select a custom blueprint base-class as LevelScriptActor? I created one from EnvironmentLevelScript (C++), but I cannot select it in the list.
The sound loops?
it WORKS
Spawn sound. Promote to variable call it mysound
Button click -> get mysound -> fadeout
So it's not possible to make a levelscriptactor-BP and use it for a level?
Don't think this has to do with C++. You can try it with BP only.
You are trying to reparent it with a cpp class?
Create a Blueprint from LevelScriptActor and try to use it as parent class for a map.
You can't select it.
No. I want to use a custom Blueprint-LevelScriptActor in multiple maps.
Your best bet is to ask the smart guys in cpp imo. I doubt most ppl here touch the subject
I'll try.
First time hearing it, I don't even know what that does
Should work
Try to be more tidy
Well I dunnoe have u actually spawn it in event construct
And have the fade out in your button click event
So sound keep playing?
It's 3 am I can't get up and try it in my editor.
Try to print string just to make sure that the event is fired. Other than that, I will try it tomorrow
Hi people, is there a way to get env variables directly from blueprints?
Well I dunnoe what you do in your end. You also talk about level load which may cause reference issue. I will check tomorrow if the node actually work or not
anyone know how to encode with base64 or does this require a plugin to work?
Question, I would like to send a OSC server signal from my level blueprint to my actor BP to trigger an action. How can I do this ?
See #rules and stop cross-posting
Maybe move your message to #audio after you delete duplicates
Anyone know how i might alter a material value from within a widget blueprint?
I don't see why that needs to be on event tick
That delay in event tick is certainly not great
You also have an issue there checking if a float is == 0
You should be using nearly equal
What no.
You should be using nearly equal
Lel, canโt wait for FPE to f up their values ๐
no matter which settings I call, it only gives 3
whereas the settings of the game are different
help
If not changing the float with any mathematical operations, == is okay.
If not affecting the float in any way, then checking if it reached 0 would be utterly pointless wouldnโt it?
@low venture I'm not sure what you mean. I have a material with a float value 0-1 lerp.
The material is referenced inside a widget blueprint and A dynamic material is set up there with the variable exposed and editable.
However, inside the widget blueprint. I cannot animate it using the animation tab.
You could use a timer instead of a timeline @heavy lion
Cant find a way of animating that variable here
ah
a timer in the widget or from another class?
In the widget @heavy lion
Can you use timelines in widgets? Genuinely donโt know
I don't know if it somehow works with this animation tool.
Doesnt look like it
This is setting the value of the parameter value only once on the pre-construct. Changing the "Value" variable later on won't automatically update the parameter value on the material.
Whatever event you use to trigger when you want the animation to happen can be used to open a gate that is connected to tick. The output from the gate then is updating every frame which would then allow you to use a lerp and set the scalar parameter value.
@lunar sleet No, because timelines are components and user widgets cannot have components.
Ok good thatโs what I thought
I am aware of that. I am trying to find a way of animating it after the fact
Whats the point in creating a variable for it if i cant alter it at runtime
wait, why are you not animating the material directly in the timeline?
So you have the current value stored in which you could then use an interp node to know what the current value is to then move towards your target value. You can't use the widget animation tool to do this.
If itโs just a matter of changing a material instance you can do that anywhere else
OK. So I would need to animate it from within another blueprint
How?
It works a little bit. It hides the static mesh to add the geometry collection component, but I think there is a better way to do it?
am i missing something, is it not an animation? why not use the animation timeline?
This could become a mess if using multiple animations @dawn gazelle
There is a Niagara plugin that enables using Niagara assets in the UI.
Thereโs several ways to work with fractures, read docs and look up videos on the learning portal
If using tick inside the widget, how would I stop and start the animation without timelines?
"Niagara UI Renderer"
why are you not animating the material in the timeline, instead of the variable? (not rhetorical, im wondering if there was a problem)
help
You can't use the animation timeline to manipulate a variable over time unless you're calling an event from the timeline which means you'd have to add in the call every single frame anyway.
I also don't find a way to add a track for the dynamic parameters of a material in the animations-tab @supple dome
I have tons of materials animated in my widgets, never been a problem
I cannot find how to access the variable within the material
Not if you design your event calls correctly and separate things into functions. It can be fairly straightforward to manipulate multiple variables over time without being messy.
Sod it. I'm just gonna add to viewport, play the animation from there.
That's specifically about a brush. That's not about a material parameter within a material instance.
Oh. Ok then, I stand corrected. That seems good ๐
Oh, yes. Then there's something wrong with your material @heavy lion
please help gives the wrong settings
I donโt understand what youโre looking for
no
does not give the correct value even though the settings are different bro
Ah, I c what you mean. Idk if the scalability settings are connected to your project per se. Those settings are more for what you see in editor I think, but maybe #visual-fx would know better
Are you testing this on a packaged project? Low-Cinematic is numerated from 0-4 and on a packaged build, default scalability is set to Epic, which is 3
no in unreal
the result is the same even if I change the settings :(
hmm
let me try reproducing it
yeah please
i cannot seem to reproduce the issue
maybe it is getting downscaled based on your system automatically
nope
Could be, if you have shit hardware, the engine automatically downscales some stuff, like Nanite for example
I'm well equipped
then maybe set it to max settings on begin play? see if that works
rtx 3070
Odd. Are you sure youโre not setting these manually somewhere else?
yes
Have you tried restarting the engine just for everyoneโs sanity?
yess
I can't find any rational reason :(
Iโm out of ideas. Maybe check with #visual-fx crew but idk
And also make sure your .inis are not overriding or w/e
hi guys. Im trying to move an object to a height of 0, by only moving the object in the direction its is already facing
anyone know how to solve this problem?
Line Plane intersection node
ooo, thanks, il try it :).
Hey guys, I need help with animation blueprint.
How can I get the time when my animation has fully blended to get into the transition?
Right now, all the methods to trigger a transition don't take into account when the animation has fully blended in the transferring between state machines
maybe this node can help
thank you. I will try it
It doesn't work; like the others.
All of those nodes take the animation time without any modification
This node takes my animations and slows it down, but the transition doesn't take that into account with this kind of elongation of the animation
also one thing that is perplexing, is I don't know why this blending behaves differently than this blending here
this one doesn't do the same effect; just cutting the animation
is there a good blogpost/article on getting familiar with blueprint? I'm coming from the C++ side but want to better understand how to leverage blueprint in conjunction with C++
I'll start with the posts, thanks!
There's an guide on converting BP to c++ but the name is a misnomer. It shows you both ways
https://dev.epicgames.com/community/learning/courses/KJ/unreal-engine-converting-blueprint-to-c is it this?
The general rule of thumb is use bp for subclassing cpp base classes, setting up asset references and small gameplay tasks that are suited to scripting
Yeah
awesome, thank you very much!
No problem!
Id also recommend to use bp for faster iteration and if necessary convert to C++
That's what the whole "small gameplay tasks" thing is
If bp is event focussed, the speed improvement from C++ is not relevant, as long as correct practices are used with it.
large gameplay tasks can be bp, as well, its just a matter of performance hits.
Well yes but if you're already comfortable in c++ land there is literally no point taking that hit
At that point you're not really getting the iteration speed bonus because spaghetti
If this was someone that knew nothing about c++ i would absolutely agree. But if you're comfortable in c++ there is 0 reason to use bp for complex things
Especially given the most expensive part of the bpvm is transitioning between nodes. Hence the "small gameplay tasks"
Oh also using bp for AI is another one
Several users can attest to how miserable c++ AIModule stuff is
By al means, use c++ if its something that makes since. I'm not saying to use bp over C++. Its just that certain things should be prototyped in bp first. Consider making a base class in C++, 100% makes since to make core functionality in C++. But when design is unclear, bp can be a tool to clarify requirements.
Blueprint can have insane iteration speeds, spaghetti is not the case when you use tools to remove that issue.
I spend no time in cleaning spaghetti because I have a shortcut to organize bp for me.
Even a readable bp can be spaghetti. It doesn't strictly mean wires crisscrossing all over. Its more to highlight large bps
Hey folks, this is a physical material, blueprint and material question so I'm putting it here and hoping for the best ๐คฃ
Is there any way to get a blended physical material result for landscapes?
For example knowing if there is 50% sand and 50% grass, or 20% sand, 40% dirt, 40% gravel, etc.
Or are landscape physical materials basically always binary/masked blends? You're only ever tracing for sand, dirt, gravel, etc (presumably whichever is the majority layer in that location?)
And again, it can be absolutely great for that, but if you're more comfortable in c++, there's a good chance you aren't gaining much of that benefit, so it's more useful to use it as intended.
(and that isn't a large bp anyway so the point is moot :P)
well, it seems smaller, but its just because I compartmentalize functionality into other functions and graphs. I try not to have so much into a single graph, which makes it easier and faster to iterate.
Most of knowing what to prototype in bp comes from experience and no good guide can really teach this
But again, if you are more comfortable in c++ than BP there is a good chance you're better at prototyping in c++.
Generally through use of both you will find what works for you, nothing is set in stone.
As mentioned, the only minimum you want to do is the aforementioned asset referencing, small gameplay tasks, AI, and subclassing c++ classes.
You can use as much as you want on top of that, but that's personal preference at that point, and comes down to comfort levels :P
I'm getting this weird cascading widget thing when i dont use a loop to generate this widget. any thoughts lol? im kinda stumped here
The only bad way to do it is 100% one way or the other imo
Yeah, whether or not base C++ classes are used and if there are many bp reference chains makes the difference of how big a project can be.
I worked on a project that based off of a bp only project. This was a mistake because the developer had no understanding of reference chains. I couldn't even add anything at all before I'd get lots of issues and slow editor speed.
All this usually becomes only relevant to larger projects though. There are so many ways to ensure larger projects remain manageable. Using everything to disposal is always in best interests.
Absolutely. Not enough resources teach proper referencing, and the pitfalls with bad referencing, and then someone gets halfway through their dream project before realising you need a terabyte of RAM to launch the thing :P
@fringe junco in your widget get parent and print it
Otherwise multiple things call it
@thin panther you got some of them resources I could read up on?
why this is not working ? , i m trying to make the sound adapt with speed (ball not rolling , no sound --> ball full speed , sound at normal speed ) , the valor of the pitch goes to 0-1 , but it does not change ( i m in event thick )
( the sound does not change over speed )
vector length
will give you the velocity
idk what you're doing with that array thing
just do Get Velocity -> Vector Length -> divide by max speed
Ty it make it shorter , as for the sound still not working ๐
there seems to be double the amount of widgets spawning? i want two when 4 are made and im not entirely sure why lol
Hey folks, brain fart question here, when I walk into overlap, it should subtract 1 out of my array (3), but instead it subtracts two. What gives?
Is it possible to get the amount of a specific actor in a sphere trace by channel?
multi sphere trace by channel. It returns an array, and the length of that array is the number of hits. If you want to check for a specific actor, then loop through the hits and check the hit actor's class and increment a counter.
that doesn't make sense you printed the value and it subtracts two instead of one ?
normally programs don't just do that
it's probably working correctly
it must be triggering twice for some reason ?
a print string at the beginning of the event would show that
yes, you load the plugin in a plugin folder in a c++ project in 5.1.
Once loaded, close editor, load the plugin in VS and in the .uplugin file, change the version from 5.1 to 5.2.
Compile.
Change the version of the project to 5.2.
Generate VS files.
Open
hmm so my widget is being spawned in 2 extra times, i dont really get why lol
i feel like im doing something wrong, local damage is = to 25, the enemy has 50 HP, but it takes 3 shots to kill the enemy???
Youโre not showing your float check
No one can prly tell why based on the youโve shown so far
The code
Show the code that does the actual hit and check
Also your print says enemy hp AFTER hit
the damage is just an input through the hit, the hit hits otherwise the code wouldn't work, and the damage being input is = to 25
Whatโs the default value of health
yes the enemy's HP after the hit should be 25, but its 50
50
and this is the check to see if the enemy is dead or not
Where are your print nodes
before and after reducing the HP
its just so weird cos the damage going in is definitely 25, but its not reducing it
Make sure your health is not being set anywhere else, maybe print initial health right before the subtract
Thanks you a lots for the help. It seem to work, but when I have 7 or less hit the counter is wrong by one. Did I do something wrong?
You probably want the counter after the branch, not before.
And also pls donโt do == class itโs very pedestrian
This here is adding 1, then after the branch adding another 1.
You should have it so just after the branch you do a ++ on Integer.
Oh yeah now it work perfectly! Thanks again!!!
Use a cast
Rather than 3 nodes, you can use 1
I don't know a lots about optimization since I am only a sound designer, but is cast us a lots of resource? In my system I am going to have a lots of object to find.
Itโs not that expensive usually
casts are cheap
they just come with the cost of having the object class loaded in memory all the time
I want to modify a property of a ISM, but all the variables are "get" only. I have no access to "set' anything.
Why is that?
What is it you are trying to change? There's several options available for changing ISM properties.
The Shadow Cache Invalidation Behaviour.
but I only seem to be able to access the "Get" , not the "Set"
I would like to understand why
Probably because it's not meant to be changed at run time.
It seems to me , that all the Variables that are in the "Variables" Category, only have the "Get" exposed.
For sth as basic as "Cast Shadow", it is the same. Only the "Get" is exposed.
But Cast Shadow is meant to be modified, there is even a separate function there.
U are suppose to use the function to modify. Not the variable for that particular object
Take FSkeletalMaterial for example
I tried to set the material directly from the mesh but I was told by ide that it's read only. The only way I could change the material was using the function SetMaterial()
Tldr when you see function for setter use that one instead. There might be behind the hood stuff that runs to update the parametre
Ye, I completely understand.
Since there is no function for this, I assume I am just out of luck and won't be able to modify this property.
Sometime the reason is that it's not suppose to be changed at runtime.
Sometime the function is not exposed to bp but exist in cpp (which if that's the case can be exposed by creating child of the class)
The variable is probably read only
If you don't see the set
It shouldn't be modified outside the class
made a child class and it's also only available as a read-only.
Meaning The engine currently only allows to set this manually in the editor.
So just gotta hope to get an update.
From what I can tell this variable is defined in PrimitiveComponent.h
/** Control shadow invalidation behavior, in particular with respect to Virtual Shadow Maps and material effects like World Position Offset. */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Lighting, AdvancedDisplay, meta=(EditCondition="CastShadow"))
EShadowCacheInvalidationBehavior ShadowCacheInvalidationBehavior;
Note the "BlueprintReadOnly" specifier, meaning you can only read it in blueprint graphs, but not set it. There doesn't appear to be any functionality exposed to set this variable either.
So the "Why" is either "They didn't bother" or "They don't want you to".
That being said, I don't think this'll work on instances within the ISM if that is what you were hoping.
Each instance gets its own Behavior based on their descriptor (again, based on what I'm seeing in the source code)
Thank you for checking. I understand. They probably didn't think it would be necessary and thus didn't expose it.
I was hoping for Players to choose whether they want static or dynamic shadows.
To give a quality vs performance choice
nested widget cannot trigger OnDrop function?
It can, it has to be marked as Visible I believe and "Above" anything that may be blocking it.
Shooould be possible somehow. A lot of games scale the anim speed based on character size. Have you checked if the node to play your anim has an option for scaling or playrate? Often you need to actively select there that it becomes a pin you can drive with a variable
Not sure how to debug this
shouldn't my spline point be way over here?
My spline is a perfect circle
This is what the tangent looks like when I click on it
What's the blue one?
I've tried GetTangentAtSplineInputKey(), GetTangentAtSplinePoint(), and GetTangentAtTime()
They all give me this location
That is what the blue is
What I want is the actual tangent location (what is circled in green)
The tangent location is local to the spline point itself
It gives you a world and local option
So you might just need to add the spline point location to it
Let me try that
Wow, ok
Much better
Except it's twice as long
But definitely in the right direction
Yeah, I think there's some scaling done to the tangent length in Unreal. I'm not 100% on the specifics of it though
Like it might be to make it easier to edit the splines with a shorter tangent handle maybe
Hmm
But the SetStartAndEnd() function for a spline, I assume the tangents it takes it assumes are relative
I don't remember where I heard about it and I can't find anything mentioning it when I search, so don't quote me on that
Hmm
Yeah it seems like the spline mesh "almost" matches the actual spline when the tangents have a 2.5 multipler on them
So weird
The mesh doesn't even come close with a 1x multiplier
Tangents do look right though (minus being twice as long)
There must be some scale or something to change