#blueprint
402296 messages · Page 757 of 403
What is the difference between Hierarchical instance and instance mesh component? Tried googling it but it got too complicated
Makes me wonder how you're adding it
I added a cube and that only rotates slightly too
Doest the skeletal mesh rotate?
the same rotation as the sprite
if the google description sounds too complicated, then what makes you think we can do it better?
Do you have any tick stuff going on with sprite rotation
no tick at all in my character
@feral ice HISM has LODs, normal ISM does not.
I think the rotation not working might be because my character is a paper character, because when I used the top down character template and added a sprite to that it rotated fine
no idea why though
paper 2d was meant for sidescrolling action afaik
but I'm not sure how it works
it got deprecated long ago
ah welp, I'll just redo it in a normal character
Dude no need to get cocky with such an unnecessary comment. If one teacher fails to make you understand the explanation doesn't mean the other ones will. 🤦♂️
it's the opposite of cocky
I'm saying we don't know, or we can't tell
whatever... Thank you @maiden wadi
That means that it is more expensive than normal instancing right?
Vaguely. Depends on your definition of expensive. Slightly more processing at runtime, but it can save you tons of performance on your rendering.
it's still going to be cheaper than a SM due to being 1 drawcall instead of multiple
alright!
Now that im reading it seems to be better in my case. Works better with foliage cuz of the LODs
@feral ice Consider this. You have two separate ideas. Trees and walls. Walls are simple shapes, and you don't really want to deform them much if at all in some cases, so a normal ISM is perfectly fine here. Cause most likely whatever you're using this for will be completely hidden when parts of it aren't visible. Making more versions of this to LOD it is probably going to be a waste. Where as trees, you want multiple scaling versions because having 10,000 trees all at 40k poly's and full textures is a little too much when you can easily reduce 9800 of those trees down to 10k-6(yes 6, not 6k) polys.
Pluralis maiestatis
Ok I understnad! Thank you for the explination
A communist rabbit?
ah it's a meme
The realistic thing is that you can feel free to use HISMs for pretty much everything until you need to optimize(if you do).
That should theoretically work provided that the Ai's anim BP doesn't have root motion from everything enabled and the animation that plays while the character is "stunned" doesn't have root motion. Keep in mind the launch character node puts the AI in a falling state, so your jump animations (start, loop, stop) should not have root motion either. What is your use case? Why is the AI being launched? Is it being hit by a projectile?
getting hit by a sword and then knocked back
Also. Since the topic is here. I'm still really sour that OnRep_StaticMesh in those classes isn't Virtual. :/
Any one knows what happened to this plugin? https://forums.unrealengine.com/t/inside-unreal-getting-started-with-procedural-mesh-generation/153764
WHAT On this episode of Inside Unreal our Technical Artist and UK Evangelist Arran Langmead will explore the procedural mesh component and how it can be used to build art tools in the engine. He’ll demonstrate an example of this with a stylized tree generator that use a mixture of splines and random mesh generation to create foliage elements. T...
The download link no longer works
Organize anything, together. Trello is a collaboration tool that organizes your projects into boards. In one glance, know what's being worked on, who's working on what, and where something is in a process.
you'd be better off asking in #plugin-dev or #ue4-general
@past prawn Presuming from the name that you are in UE5? I'm not sure about there, but Procedural mesh is default in 4.27.1 at least.
Thanks for answering. So it has the tree tool plugin natively in 4.27.1?
Hmm. That I don't actually see anywhere. There doesn't even seem to be mentions of it outside of that Trello board.
@past prawn This might be of interest to you though? Unsure. https://www.artstation.com/artwork/mqa86y
I'm fairly sure that's the same thing, and the description to it has a download link.
Thank you. I think the plugin is discontinued. There hasn't been any updates since last year. Just getting into blueprints of recent.
Btw is there an advantage to using procedural mesh generation over imported static mesh?
Faster iteration I would assume. I don't think you'd want to use procedural meshes a ton in normal gameplay. Have never personally tested, but just generally I would assume that the performance for procedural trees versus imported HISM component based ones would be pretty drastic.
If you could generate in editor and convert that to a StaticMesh asset though, I assume that would save a ton of time to create dozens of types of foliage much quicker than in like Blender or 3DSMAX.
Very True. So the advantage of procedural mesh generation is that its has a lot of flexibility and saves time but there isn't the best for performance compared to using a static mesh from Blender/3dsmax and using HISM? Generating static mesh from procedural meshes would be a nice feature.
can't tell, but maybe disconnect everything first?
that didn't work
I guess you'll have to break it
oh right, i get those mixed up too, couldn't see until i squint, but yeah, that's an array output
Does anyone have an idea of where, if left blank, the location this will write to is by default? Or if I do give it a path, at which directory do I 'start'? "Content/whatever"?
You can use Get Project Directory
There are other variations of it too
If you want it exported there, lol
Default is a mystery... I have a few textures written somewhere on my hard drive because I only specified a filename (no path). They shall forever stand as the ghosts of my project.
I ended up sending everything to C:/Temp, because laziness. GetProjectDirectory node is a good thing to know about!
Awesome, thanks guys! Well then, I too now have mystery textures hidden somewhere haha
There are now at least 2 haunted computers
There's stuff like
Get Project Saved Directory too
And you can Append a string to create a folder for it
GetProjectSavedDirectory + Textures/
Will be saved in ProjectFolder/Saved/Textures
How do you name your file? Do you append ".png/jpg" to the name, such as in my example above, "biomes.png"? Trying both of these creates a file that when opened, Windows tells me that "we don't support this file format" .-.
Awesome, thank ya!
Yes, you gotta give the format
Hmmm, strange that it's not working then 🤔
It was over a month ago I was working on this
Let me post the BP I ended up using
I can't guarantee this is the best way to do it
It's in functional test code that never gets shipped with the game, so I didn't care if it is the "right" way to do it
In my case, I'm creating a dynamic texture that I pass to Niagara and I needed a way to save the dynamic texture to file
Looks like I ended up detaching the ExportTexture2D node. I don't remember the reason though.
Thanks! Likewise, this is for debugging purposes as well. It's failing to write, however this at least gives me a direction to go!
I'll check how I wrote the path and filename in a minute. I'm making some C++ changes and can't open my project right now.
I really appreciate all your help
My pleasure. I remember this was more difficult to figure out than it should have been.
InputTexture is of type Texture2D
SavePath defaults to C:/Temp/export.png
Not sure why I have a filename there
Filename is export.png
This BP lives on a plane with a dynamic material instance that I can set the Texture2D to make it easy to visualize the texture in game
That should be doable, but you'll have to do some extra legwork. If it's absolutely necessary to keep the root motion AI, then the knocked back or hit animations will need to have root motion as well. This is the only way I can think of to move the root motion AI in XY plane during a hit reaction. I'm not sure what kind of animation style your using, but you can add motion to the root of an in-place animation in editor. Here's an example: https://youtu.be/rSMqX7LLIuM I'd experiment with creating your own root motion animations or finding them via Marketplace, Mixamo, ect to see what works. The Launch Character node will give you the vertical velocity you need, and the root motion animations you create or find will give you the XY velocity you want. As an alternative, you could have the AI perform hit animations on damage that don't require Z velocity, and save the Z velocity for when the enemy dies. In that case, it'd be easier to simulate physics on the mesh and apply impulse. All of this assumes it's really worth keeping the root motion of course.
How to add root motion to an animation? How to make a charge attack? How to use root motion for a dash?
Welcome to How to... a snack-size video for a snack-size question in Unreal Engine 4.
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley
PRIVATE 1-2-1 SESSIONS...
what is the vector 2D of the center of the screen?
Okay awesome. Is there anything here that happens to look off to you, @zealous orbit ? The texture I'm using there is a default one that comes with UE. Figured I'd try that before my own. It's still unsuccessful for some reason.
Depends on your viewport size and dpi scaling.
I need to check what’s actually using root motion in my setup. I made all my animations from scratch so I could definitely remake or re-export if I had them set up incorrect. I’m not sure what benefits including the root motion at this point has to be honest
That looks basically the same as what I have. Are you getting your message printed?
I am. It's printing false, meaning the exporting failed
Would root motion be required to have the enemies follow a “move to” command? Aka they currently find random locations and wander until they see the player and then run at them to attack
@sterile garnet No, root motion would not be required for that command
That's good, at least you know the BP is executing all the way through. Try a lazy temp path and / or print the filename. Also make sure your texture "Bad" is set.
Don't think you need to split it like that.. You can directly / vector2d by float
That could work depending on your use case. What is this for? Crosshair or something?
I tried just throwing it in C and that failed as well, unfortunately. The texture should be okay, at least I imagine so, since it's from UE itself
I'm doing a lock on system. @maiden wadi
@dawn gazelle good catch!
Basically I want what is rendered currently, what is closest to my character in terms of distance and what is closest to the screen center
I doubt I'd use viewport space for that. It's much easier and programmatically quicker to dotproduct from your camera's forward vector.
Does anyone know how to make a child of an existing data asset?
Probs texture format is not supported
Texture format is a good point
dot product? I'm not sure why that would be relevant... I mean we could do a difference to find distance and compare.
You get the direction that things are from the camera. You dotproduct that against the camera's forward vector. The one with the closest to 1.0 is the closest to the center of the screen.
Just looked at the debug output. Says that an invalid texture was supplied, so you were right. Just not sure how that can be since it's showing up in the dropdown list for that BP node
Since I'm writing a data texture for Niagara, I'm using a texture of format EPixelFormat::PF_B8G8R8A8. Probably won't matter but I'm also using TF_Nearest for filtering and TC_VectorDisplacementmap for the compression settings.
I mean, let's say I use the forward vector and dot product. Then I get a number based on how much of it is similar....
ooooooooooooooooooh
nice catch indeed
I did want to limit the loop to only those on screen though
Hmmm, I have to be honest, I have no idea what any of that means. haha. Guess I should start researching more into textures and formatting and such. A lot of work just for 1 picture for testing .-.
but I can add that as a first pass layer
@sterile garnet In general, I'd say if it's a multiplayer game, avoid root motion. If it's a single player game, only use root motion if you are using parkour animations, turn-in-place animations, or animations that have starts and stops. Root motion often looks beautiful and realistic in my opinion. But, I wouldn't use it unless you either have to or it makes a big difference in your project.
@maiden wadi
So are those contained in some sort of struct that you're passing to potentially this export fuction?
Thanks so much for the advice here. Gonna give it a shot
@sterile garnet No prob. Good luck 👍
Could work. To be fair, if it's dotproduct isn't > 0, it's likely not on screen The rendered should work as well though in cases where it's set to not be visible.
No. Those are the settings on the Texture. In my case I set them in C++, but you can also set those parameters in the import settings for a texture.
Those settings are always determined at the time the texture is created
If using an existing texture, you can see what the import settings were when importing and reimport with new settings
I'm not sure the settings matter
Yeah, but since it's a loop, I don't want it to needlessly do the operation if several targets are on screen at once
easier to just jump ship
Ah okay. I'm creating mine via c++ as well. Are you setting those in your FCreateTexture2DParameters?
I'll DM how I create the texture because it's more #cpp
Much appreciated!
To be fair. In blueprint I can see that. I just randomly got curious. Ran the same logic from tick. One in a BP function, the other in C++.
AActor* APortalVillagePlayerController::TestFunction(const TArray<AActor*>& ActorsArray, FVector CameraDirection, FVector CameraLocation)
{
AActor* ClosestActor = nullptr;
float ClosestDotProduct = -1.f;
for (AActor* LoopActor : ActorsArray)
{
const FVector DirectionToActor = (LoopActor->GetActorLocation() - CameraLocation).GetSafeNormal();
const float LoopDotProduct = FVector::DotProduct(CameraDirection, DirectionToActor);
if (LoopDotProduct > ClosestDotProduct)
{
ClosestDotProduct = LoopDotProduct;
ClosestActor = LoopActor;
}
}
return ClosestActor;
}```
Note that the array length of actors in both of those tests was 4,000
well in my case it's just a 1 time deal on input. find a target.
the test function up is cpp and the bottom is BP, is that it? @maiden wadi
Yeah.
yeah loops are the worst
lol
that's why I made that extra check.
I'll probably construct it back into cpp later
It's also the function overhead. C++ function overhead is nearly nothing. BP function calling is stupid expensive. So running even just the getters in that BP function is probably more expensive than that entire C++ function.
noted. I know all about expensive and loops in bp 😉 hence why i made all my stats and loops in cpp
for this case in particular, it was just a proof of concept.
and I wouldn't be too worried at the moment since it's on a single human input to toggle lock on
the tick will be to follow that target now
Yeah. And I doubt you're going to be polling 4k actors. 😄
indeed. I'm assigning a BPI to potential targets also. but good job on the test! validates the performance check 🙂
Sometimes my pawn will take a random deviation from their forced path that I feed point to point. As you can see in the gif, the last green dot is missed. Use pathfinding is off
any ideas?
ewwwwww spiders
that's the spirit
looking at the behaviour it looks like it wanted to get it but skipped. is your acceptance radius high?
what's the full logic? AI Behavior tree or just patterned?
no it's a bit big though 😦
neat I always forget
this is the bit that's troubling me @zealous moth
I know it's a bit much don't waste too much time on it but let me know if you see some nonsense
why don't you draw the path?
like the path that you want it to take
you'll be able to see the deviation then
we can also continue this in #gameplay-ai
It's not a behavior tree though.
what's that?
Technically this could get thrown out of the AI channel. Doesn't have anything to do with BTs or EQS. 🤷♂️
doubt
plus people post navigation issues in #gameplay-ai all the itme
it's almost like it's all connected
and is it really that much worse than solving plugin related issues in this channel?
Ok well I actually think this has nothing to do with the path itself but the way that I set and read my variables. There must be something I don't understand
suit yourself
because if I don't update my path mid motion everything is fine
not gonna lie @fallen glade , the logic is overly complex using the structs.
I'd do 2 things:
- on tick, make it print what its target is
- once target is reached or aborted, print it
chances are you'd have an easier time with BTs as well
they're quite easy to debug once you get to know them
No, I need to do some novel things without C++
sadly
Oh that makes sense.... what's the difference then?
it's just a neat structure to avoid stateful AI
Is it possible to add scene components (object reference) to an array variable (in the same blueprint) before runtime? When setting the "Default value" for the variable, I'm only able to select from content browser for some reason, and not from the list of components in the blueprint. Or is it disallowed because the scene components doesn't pre construct?
you can do some pretty powerful things because of how the AI is structured
you can make an array and set it that way?
like what?
@sterile igloo that is not possible
enact different behaviors seamlessly
never mind I'll shut up haha sorry @sterile igloo
I have this issue where I created custom actor BP, added field Boxref and set its type BoxColliderReference. How I imagined this would work is it would ask me for a particular boxcollider within the world. It turned out to dont work this way. Instead it asks me for a class type or something? Is there way around this?
only chance you have to do that is via ConstructionScript @sterile igloo
is there a known bug where you can make a copy of a working blueprint class that shows up in a set but the exact copy (different name) doesn't ?
you can grab a box collider in the world
but you need to expose the variable
and the actor also needs to be placed in world, as an instance
sets don't accept duplicates
by design
Thanks! In that case, is it better to GET my array variable and ADD x objects to it, or to MAKE array and essentially replace my empty variable-array with this new array?
I see. However i simplified my case a little bit. Because the actor with boxciloder reference is actually a child component of another actor that is being spawned dynamically.
I mean you can just reference the actor type instead
@peak wedge even still does it on newly minted ones
and grab the box collider off the actor when you pass in the reference
Cool didnt think about that, thanks
something like this @sterile igloo http://thegames.dev/snaps/UE4Editor-Win64-DebugGame_D7rHbeC9j8.png
I'm wondering why you even need a set
most likely you're running into this case:
but again, is there any reason you need a set?
the blueprint class should show up in that list but doesn't
is the class marked as abstract?
i haven't found that checkbox yet
it's in the class defaults for all actors/objects in BP
where do i find it, can't see it in class defaults
might be in the other one, but it should be up top
let me boot up the editor
class settings
it's called generate abstract class
untick it if it's ticked
already unticked
ok, have you double checked that the parent classes are the same between the class types?
Hi All. May be a simple answer but I'm a bit new. Is there a way to set a text variable in one blueprint, then cast it to an HUD class or would that all have to be done within the HUD class?
My main issue is there being no compatible nodes when I pull the "As Widget Class" node out of the "Cast to Widget Class" node. I have tried both the "Set Text Variable" node and executing a function and had no success so far. I think it is partly from not having the correct target?
yes
the only difference between the two is name and one has a cube mesh and the other has a cylinder
have all the classes been compiled and saved? could you reboot the editor and check if it's there?
yes, , done it a few times,
have you used cpp at any time?
welp I'm out of ideas then
same, i'm looking at it like its a bug
sounds like there's probably a tickbox somewhere
or that
try deleting the class, restarting, and recreating it
i', going to start a fresh project and see if it does it again
well try deleting it and recreating it first
it might save you some headache if it works
For reference on my above question. I'm thinking I am missing a step or completely missing the mark on what would go into those "Target"s in the first Blueprint
The "Target" on sets is the target instance of an object you're wanting to set the value on. Standard nodes will even tell you the class of what the "Target" should be just underneath the node name.
Gotcha. Theoretically, would I be pulling the "As Asteroid Chaos HUD" into the target then? It seems to not be compatible
Probably not. That's not what casts are for.
Casting lets you take a less specific reference and get a more specific reference. Ie. a "Character" is a subclass of "Actor". "Character" has certain variables and functions within it that cannot be accessed if you're using an "Actor" reference.
I'm trying to make something that saves the transforms of My Actors for later recall. I have My Actors in a BP that spawns them, and another Actors variable in a Saver Blueprint class that I want to store them in. This snippet should set all information about My Actors into Planes, correct?
@dawn gazelle Ohhhkay, I think I got it. Thank you so much for the help!
try it?
(Or at least enough to experiment until I do haha)
You can't store object references in the save game.
I think I said to you before that BP saves aren't really functional
so it might be that
You'd have to create a GUID or something for each actor and store the information about it that you want to save.
it's another half assed system epic did 😔
I tried using them once and I couldn't get results, so I opted to create a save subsystem instead
if I know I'm going to have a few, say less than 5 actors, and I'm only interested in storing position and rotation
can I just make 10 variables in the save game that stores those?
thanks, very helpful lol
it doesn't matter how many variables you have
that's kind of the nature of using a half assed system
Sure it'd work, but you'll probably have trouble loading the right variables for the right actor.
You need to have some kind of ID system otherwise you're going to end up with spaghetti.
I don't think that's necessary generally. but I am in doubt whether or not the built in save system will actually save them
if location and rotation work, you might as well store transforms
yea
That's not what casting is. Casting is not "send something somewhere"
UE4 for the most part functions on name strings as UID
Casting is "Is thing A an instance of class B?"
there's some true GUIDs deep down in the engine
but I'm pretty sure they're not exposed to BP
@trim pollen you want a map
why would a map work but not actor array
I hope you've done this @trim pollen
An actor or a just says hey, here's a bunch of actor references I want to hold on to. It doesn't associate it to your stored transforms.
generally if you save an actor, you save their transforms as well
@trim pollen you are trying to store a bunch of transforms for actors right?
yes
if I play and save them, then try to reload them, it prints the right values
only after exiting and replaying it loses them
Actor references won't survive a reload I don't think
If they're dynamically spawned.
they should get serialized if you tick the SaveGame box
what does that mean exactly? @ ce
but yeah it's a fickle system so it might not work
that means it gets converted to binary "save data"
When are these cubes spawned?
on a keypress
I mean how do i "tick the SaveGame box"? I assume you don't mean every game tick?
Spawn cubes, retrieve references. New cubes don't match the old references.
there is a checkbox on every variable called SaveGame
just tick it
Do you need to save references to specific cubes or just the fact that cubes exist there?
OK, done, didn't work tho
the latter
Ok that's easy. Save struct can either contain an array of transforms, 2 arrays (classes and transforms)
sorry, can you explain a bit more?
I agree that this should definitely be easy lol
Will try this now, whatever it is lmao
did you restart the editor and get it to work?
I see you're not using the OnCompleted exec
One correction... Make sure you have the Async load connected to the cast on the "Completed" exec.
I just used Name.
Map<FName, FTransform> it would seem
^
i create save game, i check if it does exist, on true, it set value, it save it, it print it ( it print the correct value ), when i restart level it reset to 0 ( default value )
any help would apprecaite 🙏
MySaveData is an object with those fields
Those are variables I created in the character and the save object respectively.
i have no such
ok so I have two blueprints here. The cube controller and the save game object
Actor ID and Actor Data should be in the save game obj?
Only actor data needs to be in the save game object.
Actor ID should be in the actor you're wanting to save.
the save data is saving and working correctly 100%, but on level restart it restore all stuff to default
I think you can just use GetDisplayName and convert that to Name
Sure you could do that too 😛
but yeah, the lack of true GUID in BP is annoying
does not work
using names for identifying objects is bad
tell Epic
@worthy frost my save level object name is level slot, do u suggest other names?
@worthy frostwhere i ask about my save game issue?
Help
Show some code.
is there a way to do this without running it every tick? i feel like the tick is gonna cause performance issues
I still don't understand how to make the target->ActorID node
one tick isn't the end of the world, but you're right, it's not elegant
Why you doing that in the first place
If you've created the variable in your actor, then drag off from the cast node and type in get actorID
using event dispatchers that you bind inside your widget is much more elegant, and will only fire whenever ammo updates
thats false
then you can start telling other people your project contains fancy things like indirection
Anything but doing that on tick 👀
Just move it to a 0,0000000000001 seconds looping timer
that's going to update a lot more often than tick lmao
Naah, it's gonna improve performance to extreme levels, real life simulator
:| sorry i'm being dense here... what is the cast node?
Sorry, I'm being dense... From your object reference, wherever that may be... So if it's off the save game object, or off the reference to the actor in the loop... That's where you drag off of.
I have a prefab representing my actor, a blueprint for spawning and executing the save code, and a save blueprint.
I know you can drag stuff in. It gives you options for "get" and "set". Neither of which make the target node that you have.
I think I hit a wall and think I might be going about this the wrong way. Is there any way to take a Text variable from one blueprint and send it to a widget blueprint? The project I'm working on is 2d so I am trying to send it from a basic blueprint class
So where's your loading code that you see the value? The save here looks mostly ok.
there are ways, but perhaps you can elaborate concretely on what you want to do in non technical terms
You have to create the variables in the actor you're using and in the save game object. Then you should be able to see the options when you drag off and start typing get...
yes!
so u want to see where i load?
get gives me this.
Is that in the SaveGame Class?
Or Character?
why is the type not compatible with the type
Save games are just saved structs really.
Lay out the struct to contain enough information to remake what you want saved. Class of actor and Transform should be enough for what you're doing.
are you casting this inside the HUD itself?
I have a text variable in a Menu Blueprint. I am trying to update a Text variable in another blueprint. Everything is set up in both blueprints already except for the communication between them
I don't think so
My guess is you made another blueprint named "HUD" which is already the name of another class.
I did say non technical terms
yeah that's what I did
Sorry. I have a username that I want to put on screen
bindings
where is the username stored
In this blueprint I am using for the Menu
right that doesn't tell me much
I guess I'm confused by the question
I have a username that I put into a text variable
in what kind of class are you storing the text in? are you just storing it as a variable that you've written into a BP? do you have a string table?
ok
so this is user driven and you want to check it again the username
is that correct?
It is stored as a variable in a blueprint. That variable updates when the user starts.
So when the user hits start, the variable changes to their username.
I think it says "Blueprint Class"
what is the name and type of the class
One sec. Ill investigate
this
Username lives on PlayerState and should already be a property
so what do i do now?
So, technically what I am doing is pulling a username from a twitch chat, and it stores it as a text variable
Which is set up already. It's not the official username in my game
It's really vague what your intentions are
yep
that's what we're trying to get to
Help
Ok, so you're always printing out 1 when you reach there?
thanks for ur help sir
Sorry, I must be explaining poorly. I have a text variable in the HUD, that will display a username on screen (my intention is to put the username on screen, in the HUD)
is the username ever used for access?
but in the level
or is it purely cosmetic
where i set my int
No. Purely cosmetic
it print 1
ok that's fine then
OK, and where does it get the username from?
what username 😮
u mean the level slot string?
responded to wrong guy but I'm out anyway, this is a spaghet clusterfuck in here lmao
And what's the problem?
Help
he wants to set a name that the user can type in, in a menu to show up on the HUD
no
ok
Yeah, but if he's getting the Username and he wants to display it, and it's already being received, then what's the problem in showing it?
what username?
My problem is that I am having trouble casting I guess. The way that I have it set up, is in one blueprint(that is already set up), I have a text variable. I would like to take that text variable, and send it to another text variable, within a widget blueprint,
binding
maybe i have cast issue too?
you have to send it through a controller
bind the username to a variable then make a function that sets it
I suggested using GameInstance
Awesome. I think I'm off on the right track with that. Thanks for all the help, its really really appreciated
lmao what
(responded to the wrong one, sorry)
ok
I was gonna say
Hahaha
getting "prefab plane object is not compatible with actor Object reference" when i try to hook up the target to array element
Are you trying to Connect Prefab Plane with Target of Actor Name?
i'm not sure if Actor Name is supposed to go in the prefab or the save file... I tried both and getting the same error
this is in the spawner blueprint
and I'm trying to connect array element-> target->actor name
@trim pollenhelp
Then it would need to be in the class that gets looped
Aka Prefab Plane for you I imagine
I tried that as well
You would need to call the one from Prefab Plane, not just try to connect again after creating the variable to the same one
You should have a variable named "Actor Name" in your Plane Prefab.
Hover over the "Target" pin on the below... It'll tell you what class that particular node is looking for.
Once you have "Actor Name" in your Plane Prefab, drag off from this and do "get Actor Name"
Should this node also be in Plane Prefab?
Which node?
The whole thing you drew up for me.
It should be wherever you want to do your loading from. End of the day, you probably want it to be in your gamestate or game mode or something like that... Not necessarily in a character.
Or some other actor for that matter.
Alright well, I have "Actor Name" in my plane prefab
Could even be controlled in UI if you really wanted to.
and another blueprint where I'm doing saving/loading. and a third bp of the saving class, I guess.
in the save/load blueprint, I can't connect the Actor Name node to the Array element outlet
As I've said... Hover over the "target" - it's probably looking for a different object.
If it is, delete it.
Drag off from the Array element on the loop and do "Get Actor Name".
Sorry, I think I'm following exactly what you're saying... I hover over "target", this is what I get?
when I drag off from array element (as in, click, hold drag, press enter to make new object), and then type get actor name, it creates the node without the connection
sry wrong variable
So when you're hovering on that target, it's telling you the class it's looking for. If the object you're feeding into it doesn't match the class or is a child of that class, you can't feed it in... Just like this.
right
So if you drag off from the array itself you're getting a direct reference to the object.
You're not doing what I'm saying. Drag off from the array element pin and start typing "Get Name Actor".
oh wait
I see
You have an "Actor" object reference
what is the array you're feeding into the loop?
Disconnect the array and the getactor transform from the loop
Once disconnected, connect the array from the "Get All Actors of Class" node and then connect the get transform and you should be able to plug the array element into your target now.
ie. make sure these two pins are disconnected.
then reconnect them.
but reconnect the array first.
lol ok, that seemed to work
It's one of the caveats of working with references and wildcards that you find on some nodes.... If you connect up the "GetActorTransform" first it'll end up making the array type and elements of "Actor" class.
so after all that work... did the save system actually work out the saving?
Anyone know how to find which montage is played when I use a Slot node?
I have a value of type ALS_Overlay, how can I compare the overlay state the function returns and the one it should be?
is there a way to make it a string or smtn
oh toString
drag from the overlay state and type == or !=
don't do toString. Enums don't convert to friendly strings in packaged builds.
oh
Looking for the best way to implement multiple events for a single actor. I’m trying to create a actor which is a generator. It has two box collisions for the fuel on top and the on/off switch. Right now I have a line trace that looks for a interaction interface actor. But from there I’m lost.
thank you
Could do something like this (pass through the interacting character into an interface, don't use an event like I did)
Ok I will try thanks
getting close lol
how do I get this "MyActorID" inlet?
On the Plane actor, set the variable to "Exposed on Spawn" and "Instance Editable".
After you compile, you may also need to refresh the spawn node if you already have it in the graph
The loop on the top should be connected to the Add node, and the completed of the loop connected to the async save.
oops, soryr
trying now
IT WORKED
IT WORKED!!!!!!!!!!!!!!!!
🥳 YEAAAAHHHHH
thank you @dawn gazelle @odd ember @faint pasture 😛 thank you sooo much
hmm ok something is wrong though
they're all saved with the same transform
Well, that was anti climactic...
close enough, can probably take it from here :)
It isn't a full solution... Just the basics of trying to save data from multiple actors and spawning them. Eg. Is there something spawning the actors with an ID to begin with?
yup
anyone else unable to add tooltips to variables?
oh it's only that variable
I can add tooltips to other variables in the same blueprint
oh it's a function variable that's why
forgot
why does it even have a tooltip text box then
Prob some default details panel for the variable type or smth
yeah it's boilerplate
Having a hard time setting the right rotation. I am using the fps template and i want to lock onto a target.
I managed to get a target and eztract the world location but i am not sure how to make the player aim and look at it.
I tried using the lookat and get the rotator and force both relative and world location of my camera component but it just wont do it.... am i missing something?
can you show your code?
@odd ember
looks correct enough. have you tried with breakpoints? does your bool ever trigger? you don't need both the bool and the validated get, one would be enough
all the variables are good, it's just the rotation that doesn't happen... now that i think about it I wonder if I have to get the player controller involved as well
probably you need to take a look at how you capture you lock actor
and again, that boolean is unnecessary
it has other functions as well
for all of them you can just check if your locked on target is valid
that's the same as the bool
and why you can cut it
what is off about it?
This is what I do... Smooths out the transition to the lock on as well.
I just got done building my camera system... and while I was wrapping it up I found out there might be a simpler solution that works better
so RIP
is there a way to recompile all blueprints?
still need a bit of help regarding cine cameras and zooming in
no matter what i do the camera just does not seem to zoom in. i confirmed that the focal length is setting correctly and it appears to be according to print screen, but the actual view is unfortunately not that
probably better to ask in #cinematics but have you tried adjusting the field of view?
i have not, i can try that, but i thought it was supposed to be done with tthe focal length
thanks
I don't know how real cameras do it
but generally zoom in virtual games is usually done by field of view adjustment
try with a regular camera first and see if that works?
maybe it's just the cine cam not behaving
same behavior with a normal camera
theres probably code somewhere int his project that is doing something to cameras 😦
going to try that now and let you know
worst part about working and nobody being online on a friday night is i have nobody to actually ask to see if they messed with any code related to the cameras lol
okay it works with a fresh project so it has to be something with the other project im working on. thanks @odd ember
So I'm trying to disable the CanDash boolean here whenever my character is in midair but it's not working
Any suggestions?
It seems that IsFalling is in the AI, so I don't know what conditions to put
Looks like it should work as long as you check it often, I have this sort of check happening but it's done in the anim blueprint. If it's just not working for whatever reason, you can try out the EventOnLanded to see if you can set the bool
It's not working. My dash function is still runnign on the default value
So is it ever being set false?
Nope
It's help if you called that node. What you have there does absolutely nothing.
Called the node?
hey i got an issue
What do you mean called that node?
basically I'm using a flying template for my game.
but when I replace the default mesh with my own static mesh, it's facing the wrong direction.
I fixed this by adding a scene and making it the root node
but if i do this, the collision stops working
any help?
Chris, I assumed this was plugged in somewhere and you were just showing this as a sort of snippet, is this not connected to anywhere else?
I have a function in cpp that is supposed to be calling on that boolean
You should look at the settings of the mesh, did you make collision for your own model? As for facing direction, you can change this in the import settings of the static mesh directly in engine
When does that set get called?
that's got me more confused. there's a blueprint snippet with nothing connected to it and now you say that you're doing it in cpp, but there's snippet for that
For starters, I have no idea what I'm doing in blueprint in the first place
it's not code, it's all in the static mesh editor - locator your static mesh asset and double click it, all the settings are in there
I used the built in collision
ah well, you need to hook the node up to something - if there is a white arrow, something needs to feed into it, such as an event
lol, sorry Adriel, had you confused with Husaria
these are the collision settings for my mesh
if you swap the mesh for your own, the collision is being replaced. the collision is part of your mesh
can i also see the model with collision turned on? there's an option for it at the top, use simple collision
hmm, okay, now take a loot at the mesh where it used in blueprint, the settings of the mesh can be changed there too
k i see them what about it?
well it might have a different collision setting in bp than in the static mesh viewer
and you said using a scen component fixes rotation but makes it so it doesn't collide?
yep
does that mean it will collide but be backwards otherwise?
it will be sideways and offset
but collision works?
with the scene component, no collision
without the scene componenet, has collision
if its just the transform we can fix that in the static mesh viewer, you won't need the scene component
can't change it tho
its this section in your static mesh viewer
awesome!
Managed to get my dash to work, now I need to work on my jetpack function
Hey guys! I was wondering if someone would be able to give me some help with a project I'm working on. I'm making a game that requires a wall running mechanic. I've set it up following a tutorial, but I need some further help. I'm trying to make it so the player can only wall-run on certain walls. I was told that I would have to use gameplay tags to set something like this up, but they're a new concept to me. Would someone be able to help me out? Thanks in advance!
Not gonna lie man I didn't understand most of that
In Unreal you can assign tags to actors and components so you can distinguish them from others and make them have special properties/bahaviors. Step 1 is to click on your runnable walls in the level, then go under details and set an Actor tag like “runnable”. Step 2 in code is to use Actor Has Tag(“runnable”) whenever you meet a wall to check if it is runnable, then activate the run on wall part of the code.
Thanks for the response! Is it possible to apply these to brushes? or do I have to use a specific type of object to apply a tag to it?
You mean BSP’s? You should be able to assign a tag to them too. Just check in the editor.
awesome! I’m gonna try it out just now, thanks so much!
Keep in mind that BSP’s are good for testing/blocking out a level but for the final game is better to use real meshes.
I'll keep that in mind, thank you!
How do I get this to be a "Message" like the node below it
is this what I'm looking for?
Yes
When your character gets near that actor and hits it you can take the hit actor from the Hit Results and check if it has that Tag
That’s one way to do it
The message icon is just for interface message nodes.
I think I may have done this wrong. See I was following a tutorial that had me set up my characters movement in a component class. I can't seem to make a reference to another actor inside of it to check if the wall I'm hitting has the tag or not
sorry if that doesn't make sense, I'm super new to this 😅
You can use an extra overlap volume attached to your character and check what it is overlapping
But a hit event on the character’s capsule should work as well
so would I do that in the playercharacter blueprint?
Yes
Because that’s where you switch from normal walking to wall running
I assume
Or show some of your code so we can check
So I was tryna make it so when a "Teru" was collected, a light and particle system appeared, however now my widget wont show up at all and Idk what I broke
The collection system still works and goes up by 1, it's just the widget wont show up
This doesn't get called at all and I'm not sure how to fix that
so this is the first part
and this is the vector it is checking for
When I put a breakpoint here, and press play, it stops immediately
That shouldn't happen since the widget isn't inside the sphere, right?
and do I want to attach that to this AND statement here?
And do a Boolean And of its output with Out Hit Blocking Hit into the Branch node
I would AND into the branch node
So you can only run in the walls tagged as Runnable
onto this one?
Yes
Awesome!
Can I have some help pelase
Your sphere may be overlapping with anything
How do I figure that out
You can use a second branch after the first one to check the tag but only if blocking hit is true
That logic checks if the sphere is overlapping anything but then calls the interface only if that overlapping actor implements one
It is like saying I’m seeing an overlapping actor let me check if it implements this interface
So I added the second branch, but now I don't seem to be wall running even if I'm touching a wall with the Runnable tag
Show code pls
Im trying to get my widget to show up when overlapping with the sphere again
Second false should also go into the return node
is there a way to have a construction script be more "real-time"? As in, I wanted to have my lights react within the editor when I changed a value in the daytime. But I can only seem to get it to work if I compile the lights blueprint, otherwise it doesn't react to changes. But the SunBP for example, instantly reacts whenever you change any of the values.
like this right?
And use a print string after the second branch to show when you have hit a Runnable actor
Yes. You can also just route both false to the same return node
If the print string never shows it means the tag is not being recognized
okay so it doesn't seem to detect that I've hit a runnable actor. I put a print string and it doesn't print when I ran into a tagged wall
And you tagged a BSP?
yeah
Can you try tagging a cube mesh instead
going to try with a mesh
And then hitting it with your character
Works fine on a mesh, not on a BSP
That was my doubt
It should work in principle
But I had never tried it on BSP’s
so it seems to work on meshes, but not BSPs. It will work for what I have planned! Thanks a million, you've been a huge huge help 😁
You are welcome!
@bright frigate check how the SunBP does it
It’s very likely in its own construction script
How do I make it so when the widget overlaps the sphere it becomes visible?
How does the logic look like? Right now your sphere overlap is calling an interface.
You have to ensure that the overlapping actor (I guess your widget) implements that interface
The sphere calls an interface which has the following functions
And this is the logic for the desk of which is opened using the widget
And this is the macro
Looks ok to me
But if the widget is already open it will never become visible
So make sure it is not open to start with
That Open?
Yes
If that is true the Closed macro goes to false and Set Visibility is never executed
So do I flip true and false?
Because it's not open in the beginning
This just stopped working randomly
Learn to use Print String to mark certain parts of your code to see whether they are being executed
Maybe you changed something in the overlap settings and it doesn’t overlap anymore
I know that this isn't being called at all
Whats the difference between using components or just coding straight in the actors blueprint?
Ok then the problem is before that @trim matrix
Modularity
You can reuse the same component in multiple actors
Gotcha. Its not more or less taxing, is it?
A tiny bit but you shouldn’t be concerned with that if it makes sense to use them
Okay I found the issue, I set it to "On interact begin" instead of "On overlap begin"
Except now when I try to put it back to the way it was, I can't plug in the target?
And that's how it was previously
yeah I've been looking at it but in the construction script it's the same as what I was doing, where I just put in the logic for when to set the lights visible and when not. But for me I need to compile. So I don't know where the SunBP is doing things real-time because that's the dead end for me.
There's also this but I'm confused because this is the parent construction script in the first place
You are calling that event on the third person character. Is that what you need?
Is it from one of the standard templates?
I needed it in the desk interface, but I figured it out, in order to connect the target I just needed to drag out from the target and search for it
It's the exact same as the bottom one but just "end" instead of "begin"
Thankyou for the help!
You are welcome
You also in blueprints channel nowadays, marco? 😅
LOL. When nothing happens in #legacy-physics 😜
Haha fair
the standard SunBP.
I have my own essentially duplicate class which inherits from SunBP.
ok I figured it out 😄 Thanks! It was straightforward just needed to reorganise my thoughts
Ok! A case of rubber duck bug fixing.
👍
what does rubber duck bug fixing mean? 😅 Actually I thought I knew it upon a mention of this several weeks back but seems I forgot
btw, I have this logic where I can select a point light or a spotlight. Now this works, but regardless of choice, the editor always shows the associated properties of both lights.
In software engineering, rubber duck debugging is a method of debugging code. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line-by-line, to the duck. Many other terms exist for this technique, often involvin...
For example, here you can see the attenuation radii of both lights even though one is enabled and the other is disabled. Is there a way to change this? Should I do something like set actor hidden in game or something?
Haha yea thankfully it wasn't required to do even that but I've realised that my standard practise is to do this where I have always been the duck myself 😄
I see what you mean but I don’t think it is possible without writing a specific editor module.
Which means C++
ah okay, can do but I guess not that important. I'll try some things in the bps just for curiosity's sake
Look also in BP Utilties and editor automation with BP’s
You can create your own editor widgets and use them to do settings etc.
Hello, I was watching Ryan Brucks Water stream on the Unreal channel, and he mentioned there was a blueprint function for querying wave height, normal etc. In a location or on overlap but I can't seem to find any more info on that.. he said it was in fortnite... anyone has some idea if it's out there somewhere or how I could go about doing it myself?
@atomic salmon is there a way I can convert this to a regular BP? This was once a point light to which I added logic using the add script blue button. So it was kinda unplanned but so much went into this that it would be useful if I can convert this to the usual format of "default scene root" and all that. Because in this case, I can only add things under Point Light Component and not outside/side by side of it
You mean to have a scene component as root?
And the point light parented to it?
ja like a regular BP for example
If I try to add a scene component here it can only come as a child
You can take any component and drag it onto the root
It will ask you if you want to make it the new root
Voilà
Ah ok because the parent class is a light
that doesn't work because you inherited it from a parent class
yea
You can change the parent class under Class Settings
for your streetlight you may want to make an empty actor, add a static mesh component which has a point light component and the audio component as childs
Make a copy of your actor first
yup that's what I wanna do
Just in case it goes bad
It means your Interact Actor doesn’t implement that interface or something is wrong with its implementation
ok so I made a copy and changed the parent of the copy. It lost the point light.
How do I go about fixing this?
so just a matter of adding the component back?
Because it was the inherited root, but you can copy it over from the original actor
Delete the interface events in your target actor and recreate them. See if that fixes it.
Or just add one point light with the same name and remap the references
This is one of the cases where BP’s fall short of C++
true
Target actor being the thing that opens? or the widget?
I managed to do the replacement method, but is there a way to copy that exact point light component over with its settings? I could copy it but 'paste' was greyed out
Target actor is whatever you call your interface on
thank you btw so far
Did you copy the point light from the previous BP to the new one?
I tried to but I couldn't paste it
or I misunderstand how to
I'm still working with a copy so I have the OG BP as is
you could try drag'n'drop from one blueprint to the other
but i wouldn't expect it to work at all
It may be because that was the root. Ok at least you should be able to copy the settings over from the old one. Open them side by side and copy directly on the settings.
haha dang oh well
yup 😄
Yeah that’s the thing with inherited
For the new light component, do I just use the constructor like regular to expose all the light settings?
since the OG BP was inherited, these were all exposed by default
you can select the component in the hierarchy and apply your custom settings
theres no way to expose them to the blueprint root
I figured out the issue, not how to fix it
@trim matrixwhat is the issue then?
I mean, can I do something like this
"Progress has begun" is set to false by default, which is good
But I need it to convert to "true" when I press the "E" key
and I think I do that with this
player character should have an on pressed E event that you can then flip flop between true and false with the progress begun variable
But that doesn't get called so the issue lies here
yes you can do it, but that's just a wrapper variable then
and prone to add multiple further issues
I'd never expect that, what kind?
just don't do it if theres no good reason for it
if you change that later on, you'll need to update the light, and such nonsense
if the light gets updated from somewhere else, the values don't match
It doesn't stop when I put a breakpoint so Im kinda stuck
just work directly on the light component
@trim matrixI still think the interface doesn't get called for some reasons
so let's go back to the interface calling
Interface
You should open Class Settings for your target actor
Make sure it implements the interface you are calling
Wait target actor as in the player or the desk
Desk holds the desk interface as well
So the interact actor you are calling the interface on implements that interface as well?
Yes
well it broke my constructor for some reason. Now it doesn't react to changes in daytime set in the editor (it works fine in-game)
doesn't make sense, logic is the same, all that changed was the reference
Alright I did it
So the actor was the reason it wasn't working, cuz it had the interface implemented as well
nevermind, it was a dumb reason ... for some reason the editor has overridden the value of intensity even though it shouldn't have. I dunno why. But 0.4 meant I couldn't see it. Weird.
I've got this item here that you can "collect"
When you pick it up, I want there to be a particle effect that pops up
I've got a particle system set up but I'm not sure how this essentially works
Is it because the collectible actor is destroyed that the particles aren't showing up?
Spawned at locationz so wouldnt thinknso
So what am I doing wrong
Not sure. Is the sound playing?
I thought it'd spawn at 0,0,0 of the actor location
How do I get it to the actor location
Do I need to make a particle system in the viewport and have it "auto play" in the blueprint?
Just get actor location
Also keep in mind that you shouldnt destroy an actor you're still running code in
Is that the reason the lights not showing up, cuz the actor is being destroyed?
It could be contributing to it, but for now the location is the main prob
Yes ofc
We litteraly just manipulated its location..
But if you hide the teru its sorta safer imo
Otherwise you have to do some extra steps to make sure it doesnt spawn in yet another blocked area
I know but how do I build off this into offsetting it?
how.
With regular math
You're not being specific
No.
Do you want me to use variables to manipulate the location?
On purpose 😅
huh
Up to you how you wanba do the offset
google time.
@trim matrixyou should really take to time to go through a basic Blueprint/Unreal Engine course. There are great ones (for free) on learn.unrealengine.com
I have no time
xD
dude, I assure you actually learning would be faster than asking for help every step of the way
^
I know
Ask your teacher or classmates for some help as well, I mean if we do the work, you get the grade.. yeah that seems totally fair
i want the good grade tho
fo sho
Earn it
me?
Whoever wants it 😅
I'm not really able to go back to that class and my teacher knows fuck all as well
I'm going to sit down and learn myself properly when I get this out of the way
does your teacher sell the games you guys have to make as "homework"?
dang that sounds like a business plan
No
who wants to be my pupil?
there was a "gamejam" on here where the dude was going to sell all of the games wasn't there? lol
always on that grindset
i bet that happened before
any ideas on how to call the "socketed" mesh on an other mesh? i don't want to spawn it, because i have different meshes on different sockets (or if i spawn it, i want to spawn the socket specific one :3)
you ask for naming suggestions?
make a ref to it a public value or make a getter function?
call it MyAwesomesocket3Final
why not MyAwesomesocket3FinalLatestAndReallyFinal?
I guess we should ask what "socketed" really means
sad node spawns pebbles. thats fine most of the time, but sometimes i want it to spawn something else, dependend on the static mesh the sockets are on
== branches seem not to work with static meshes
wait, are you the guy with the 1.000.000 line traces from yesterday? 😄
nope
ok
two options, either you iterate over all child components and look at which socket they are attached
just 3 sockets on a few hundret meshes, so just ~300 times this gets called lol
option 2 is to store references
if each socket is only holding one mesh you could use a map which has FName, StaticMeshComponent reference
so the lookup is easy
option c.) add a scene component for each socket you attach to, and attach the mesh components to the corresponding scene
and there are probably 10 other ways of doing it
I would recommend option 2
Performance wise the best you can do
looks clean aswell
yea, but 2. only works if you attach only one mesh at each socket
hmm the map sounds good
but the "add static mesh" component spawns only 'one' type of mesh, i can't even use the value output to set it to another mesh
wait nevermind
wtf
sure you can change the mesh on it
'set mesh'
thats the whole purpose of it
i swear to the blueprint god, it did not work like 2m inutes ago
belive me smepais
thanks btw too 🙂
i totally misunderstood your question before 😄
but glad that it worked out
i thought you wanted to store a reference of the component, not of the mesh to assign
but whatever, as long as it works out
and i would rather iterate over the keys of the map instead of the sockets on the mesh, but the performance difference is negliable
would just make more sense imho
mean, using the index?
you can get the keys as array (which are your socket names)
you may then have to check if the socket exists on the target mesh tho
just keep it as it is for now, it's probably faster than checking each time if a socket exists
right now it just gets all sockets on a static mesh, if there is nothing thn its already complete. or am i misstaken?
the "static mesh" gets spawned into the world, sometimes it has sockets, sometimes not
keep it as it is if it works
sure, but im interested in the mechanics! 😄