#blueprint
1 messages Β· Page 234 of 1
I don't think a doonce will help you here. Watch your video at 0.25x speed.
Oh it does?
Oh. I was watching the video wrong. Yeah
try OBS for screen recordings
I would do a != on your bool before checking.
You're effectively doing this right now.
the do once needs to be reset
If you add a != here. You can avoid any triggering code after unless it really needs affected.
Then you don't even need the doonce.
hmmm, what do I put in the bool below?
Below?
can u explain the != node?
it checks if the bool is not equal to a given value
its the opposite of a check for if something is equal
you can use async load asset and out of completed you set a variable isLoaded? to true, then if isLoaded? is true, you allow the timer, if else you do not
Workin on it
Basically you don't want to have to check through complex stuff. You have a single boolean driving which way these animations should be playing.
If something comes along and says true. You play it forward. If it says false you play it backwards.
Right now you have it so that if you call true it plays forward and then call true again, it'll restart the animation and play it again.
So you want it so that the code does not run at all unless the driving state, that boolean, actually changes.
Condition should be set right after the != check, before it's branched on.
Would that break things though if the asset is already loaded ?
Set it from ShouldBlackOut
If ShouldBlackOut does not equal Condition. Then set Condition to ShouldBlackOut and then branch.
dont think so, no, but that would return an object which is what you need, also when object is destroyed, I think the asset unloads
could you rephrase that?
Like this
nothing happens
literally
let me print string
it prints, but the animations dont play
...I hate this engine
wait so we still can't do this in blueprints? I made a custom menu direction system to choose buttons and it works fine except now i'm at the stage where i need to "press buttons"
oh it works lol
for widgets
I know we can't click on stuff with a controller but we also can't use a button in any way trough blueprints?
it's only clicking with a mouse where you can use a button for?
@maiden wadi thank you very much bro
lord forgive me for what im about to do if I can't find a alternative
why strings and not enums
Of course. π Happy it worked.
Because this menu interface is kinda like modular
I know which button i have selected
and i need to convert that to actually pressing it
I don't know how i'd do that with enum's. Unless I make some generic enum's like option 1,2,3 and assign buttons to that but idk
I may aswell use integers then
What do you mean by modular? Cause this is going in a bit of a hard coded direction.
oh yeah don't get me wrong im going to have to do this for each menu
but it's only going to be like 3 menu's maybe
i guess i should make it more modular
hmm yeah
Can I ask what you are trying to do though? Because this is a bit irregular.
this is a bit too hacky
Switch on gameplay tag.
Yeah so basically I got a interface that is used to scroll trough buttons with a controller's d pad
i can select them
get the generic button reference
and now i have to "press them"
but yeah strings are bad i'll try something modular
that's easier in the long run too lol
I was just hoping i could find a way to press buttons
in blueprint
What is that button list? Does it show up over your items when you use them? Like an older Final Fantasy menu?
why not use an input action for the clicking with the controller?
I am doing that but that input action still has to activate the widget button is my issue
hence the interface
pretty much yeah
click on item
menu pops up
but like in 3d haha
but controller support has thrown me for quite a loop
hence my making custom ways to support it
CommonUI would have make your life so much easier. After the initial hatred of having to learn it. π
CommonUI actually gave me a bug when I enabled it π
I could no longer move my mouse with my joystick
but yeah i'll have to write down to check out commonUI in the future some more
Cause it defaults to menu mode. Which is the same as UIOnly.
You have to place an ActivatableWidget on screen as like your primary game HUD. And override the GetInputConfig to return differently.
ah okay
I'll keep that in mind incase i ever check it out again
thanks
I think for now i'll do a switch on integer kind of setup I know it isn't pretty but it works
For future projects I will have to look into better solutions
yeah
It basically solves a problem of: "What input mode do you have when you close a widget?" If you have many menus and they can be opened different ways. A common one is like an Options menu, Inventory and FPS gameplay. You usually want three different control modes with these.
FPS is GameOnly
Inventory is All
Options is Menu
In a normal project you might just set input mode to GameOnly when leaving a menu. Which works if all of your menus back out to the FPS game. But what if you open the inventory and then open the options menu? How do you figure out what to go to when you back out of options?
ahh right I can definitely see the intention there yeah
ngl it still all feels needlessly headache inducing but commonui definitely sounds like it has better things going for it
and im not really a coder anyway
haha
hence full on blueprint
I felt the same way when I started using it. With a lot more swear words involved. π I won't make a game without it anymore.
π
Having trouble with my switch logic. I'm trying to prevent some annoying behavior where the switch deactivates when something overlaps with the box collision while there is already something on it. i'm checking if "Get Overlapping Actors" is empty or not and using that to determine if there is something already on the switch, but it improperly keeps the switch pressed in the event that two actors are on top of it and then are both removed.
I think the problem is the end overlap event not quite registering the last object being removed?
Make Overlap and EndOverlap call the same function. In that function simply check if anything is overlapping.
That's what I'm doing. I have a check function for overlapping objects
Can you share code?
It shouldn't need to be checked on begin overlap because thats not what the problem is. its only when the objects are removed will the switch state change to off
Basically I'm not sure what else to do here. It's like there is a lag where when the last object is removed, the overlapping objects array is still registered as not empty
you have to "refresh" the button by doing another end overlap
I'm considering doing a tick boxcast or something but that seems excessive
You should be able to do this
Replacing the classes in those GetOverlapping checks with the ones you're casting.
Bit of fun DoOnce code if you want to avoid multiple triggers on either side.
π Where are you at right now?
It still stays pressed
I made it into a new event that both overlaps call but it don't werk
yeah I really have no idea what to do with this, it doesn't seem to register the last object being removed
ah
yeah you have to put it BEFORE the cast
bruh
oh but now I have another problem
the struggle never ends
If I check before the cast then it works but then I can't check the color of the overlapping objects to make sure it matches the switch
Guess the bug is staying in then, the alternative is not being able to make puzzles at all.
You just have to expand the check then. Start with what was there before, but collapse it to a function for easier management.
Then you can do something like this inside to check if there is a valid overlap or not.
thanks I'll try this later.
best practices is to avoid calling pure functions constantly yea?
pure functions run for every pin connected to them
Depends. The ones with array outputs definitely if you're using them in ForEach loops. Every loop will call the function again.
ok
you can have simple stuff in pure functions
They run once for every execution node they're directly or indirectly hooked to.
Not necessarily for every connected pin.
yea i knew they ran for every something π
It's a neat thing to learn when dealing with randomization nodes. π
Ok yeah I'll try and store those locally from now on then
But yeah. IMO every function that outputs an array should have been impure. But Epic disagrees. π€·ββοΈ So if you want to avoid a ton of array allocation you have to cache it.
Is this a thread to ask about a inventory question?
If it is done in blueprint, probably. π
what determines if an interface function is inherited as an event or a function I am so confuse
I have two events in this interface, both are the same settings and one is an event and the other is a function when I try to inherit it to BP
???
Events are simply functions with no return values, which can also contain latent nodes due to their non immediate return nature.
You can convert events to functions, but not the other way around unless it has no return value
Yes it is kind of
I trying to make a inventory system but just now got a hit by understanding I can't replicate map variable. I am using map variable to store all my inventory data
Is there any definitive solution to this? I've seen people complain about it but not seen anything but 'make a different interface function and replace it everywhere and hope it doesn't happen again'
Yea for some reason epic hasn't made maps and sets replicatable in BP. :/ apparently you can have them in a structure and replicate the structure without issues though. I've not tried myself but it might be worth exploring.
Don't use an interface. π
Using an actor component for things like an inventory will change your life. Especially when you learn about the get component by class node. π
I've got an character blueprint with Tick Before Begin Play disabled. For some reason, though, Tick is still being run before BeginPlay, causing all sorts of issues. Anyone have any ideas what might be going on? This is on a project I just migrated from 4.24 to 5.4, in case that might be causing issues.
I can't say I've experienced it. Have you used print strings/logs to check its definitely firing before begin play?
I've got breakpoints on nodes in both events and I'm hitting the Tick one first
Realized this because I've got a bunch of functions in Tick complaining about variables being null which are definitely being set in BeginPlay
So I'm pretty sure it really is doing that
Oohhhkay it's all my own fault there's a cheeky delay hiding in my BeginPlay for some reason ???
The joys of coming back to ancient projects
Yeah, if you need it to replicate, use an Array. If you have access to C++, you use a FastArray.
Similar weird issue (which again I'm sure is my own fault but ???)
That underlined node is getting a null-ref (on first frame) according to my log
Which feels somewhat impossible considering it's just a regular 'ole actor component
And in fact it's the component this animBP is running on
Soooo ???
Wellp just replaced that with a GetOwningComponent and we're fine now
Β―_(γ)_/Β―
I tried the array but the reason I use the map is because the map have a key value that it always have a unique name and I can find it easy when finding for one in the inventory data without for looping the full array and opening each struct and checking it with the target name, but doing with map I can just use the find key option to just give the name and it will give the struct data of that target item.
Also another reason I used the map because I split the struct data into consumables, weapon, Armor etc and stored separately because if I use one strut to save in the array I should be having a single struct with all these data nested in it for example a axe will have a struct data of unique name, name, ID then a nested struct of weapons, a nested struct of consumable etc in a single struct and mostly all of those be not used as I only going to use the weapon nested only.
In my current setup I have inventory data base for each section like weapon, consumables these map will have the same unique name as the original and only have the details of the weapon structure , another for consumables.I have all those struct in a seperate data so if needed I can just get the unique name from the main inventory data and use that to either add or remove or find them and get the target datas of these items using the key name in map.
I may be over complicated it π but at that time I thought having a struct with many nested strut that I am not even going to use so thought that will make a issue later in the development
Is it ok to have a nested struct with all types like weapons, consumables, Armor in a single struct to save in the inventory as array even if I am not going to use the specific nested struct for specific items?
You could use two arrays, one that you would put the Key in and another for the value. It's just a case of making sure you add and remove them accordingly.
This way you can find the index of the corresponding key value from the key array and use it to get the value from the second array.
As for nested structures, they can be a pain to work with. Personally, I prefer to use uObjects for items instead but these don't replicate by default so unless you use a plugin or you're own C++ you would be limited.
I am ok with nested struct but I am just afraid that the nested struct which are not given any values may cause issues later when replicated or even when transferring from player to storage box. If sending a nested strut which some of the nested doesn't even have a value assigned will not affect them I am super ok with that because I have no experience with replication just started. Also thank you so much for the info it's nice to know about the uobjects also not replicate because I was planning to use it after when found the map not be replicated
You could look at instanced structs. There's a few extra steps to get the data in and out but it can allow you to store different structures in an array for example.
Thank you, I will give it a look βΊοΈ
A combination of Array and FInstancedStruct or better UObjects might be better. But that needs C++ to replicate the UObjects fwiw
Looping the array should not be a problem. The hash function for finding the map entry is probably more expensive
The array with instanced struct looks promising, I will try it.
Wow I never know that!. I thought using find key in map is more efficient than looping array
Curious if there's ever going to be any intention to fix this. It wouldn't take much at all to make this easily script accessible with the new replicated object lists.
No clue. I don't see why they couldn't support it.
Not enough coffee question of the day - I can make a local variable called "Attribute to Increment" and set it on a switch and cut down on some of this code, yeah?
Instead of dragging out "Strength" "Dexterity" whatever 3 times, if I just set it off the switch
As long as that "Attribute to Increment" variable sets the Attribute variable's value at the end, I don't see why this is bad, I just assume it is because I haven't had my coffee
Oh, then I guess it only cuts down on dragging one thing
Every time I see attribute code, I just think GAS.
What's the best method to get a projectile to ignore it's owner?
It's not that kind of attribute
Depends on when you want that.
I have a turret with a box collision for player detection, so I used "ignore while moving" but it ignores all box collisions
I need the projectile to only ignore the owner basically
If it's just an overlap, you can simply compare the overlapping actor with the owner and early exit
Ok
GAS does what I want, but it does way more than I need - I am not making an action RPG, it's a ton of extra work for little benefit, I've been down that road and it is stinky
So does Unreal, but you're still using it. π Just because it has features doesn't mean you're forced to use them all.
If you want to get away from the Integer that you gotta specify, you'd need to wrap what an Attribute is with a bit more fluff so you can pass it around easier
I just like blueprints D:
Is this Singleplayer?
TBF I do 95% of my GAS stuff in BP. I have a couple minor helper functions and attributes, but everything else is BP only.
Hopefully there will be local multiplayer
Oh, no - I guess when I said local I meant no like, servers
I would probably go the "easy" way of turning my Attributes into simple UObjects. Allows for simple function calling on them, passing them around, and maybe even a bit of inheritance in case you want some specific attributes.
Might be a bit over the top, but if it's just singleplayer, no one cares
Can give the Attribute Object a Unique GameplayTag
It's ttrpg rules, there are only 6 attributes, they only go up or down one at a time, it's very simple but I cannot exist if I am not complicating things
And then query them from some AttributeComponent or just an Array on the Character.
Yeah I get it, the best answer would be to just suck it up and make 6 versions of it.
And be done with it xD
In C++ you could skip the UObject stuff and just use a Struct fwiw
Even D&D has more than six "Attributes" though.
Not every TTRPG is D&D
it's pathfinder, I know what they're saying π
Skills are modified off the attributes though, they won't be nearly as complicated
If you are 100% sure you only need 6 Attributes, then maybe just live with it
If you want something that scales better, maybe think about the UObjects
If you want something less Object but still a bit more versatile, use a C++ Struct maybe
I'm pretty sure if I just make a struct with a name, value, and tag, I'll be okay
You can also go as simple as TMap<FGameplayTag, int32>
And just specify the Tag to do things
And that will ultimately modify the entry in the Map
If yo uwant to use identifiers, please use GameplayTags and not written Strings or so
If I spent half the time agonizing over design decisions I did making the damn game
ah what the heck is this
Click Show
it goes to the do once macro???
its pointing to this
Can you show where that's being used in Laserwall?
the intent is for the projectile to go thru the wall if the color matches
maybe I should do this on the projectile side instead and have it do the check there and activate ignore actor while moving?
What calls OpenSwitchDoor and CloseSwitchDoor?
An attached switch but there is no switch attached currently
Something has to call them though if it's looping here?
my method for controling objects with switches is just to have the switch be the child of whatever its controlling
LaserWall2 has no children
this is how I do switch contolled objects
The switch grabs the parent actor and then when activated it calls "switch Function" and executes based on what object it is attached to
but that isnt the case here since there are no switches attached to the wall
But something has to call that from somewhere or it would never enter this area to infinitely loop.
I dunno man
You said LaserWall2. But the log above just says LaserWall?
laser wall 1 is attached to a switch but there is no way that switch would get activated from the projectile overlapping the other wall
LaserWall refering to the blueprint here not the instance
in the error i mean
it only happens when the colors match
I have another turret there that is the wrong color for testing, it collides with the wall as intended
only when the orange turret fires a bullet is there a crash
Do any of those hyperlinks on the error give you the list of called functions?
Clicking on Show should give you this.
at no point is activate or deactivate called though this shouldnt be happening
just this
Never once is it called I have no idea why this is happening
I dunno. π€·ββοΈ Could breakpoint it. If it triggers, then you can try using the blueprint debugger to see the callstack better.
I figured it out...
I was using the wrong profile name
yeah it's getting destroyed anyways so I need to control the logic in the projectile anyway fug
yeah I did it
Go me
Wasn't sure wether to post this under animations or not but did they remove the "Delay" node? I was looking a video relating to montages and couldn't find it, I'm trying this right now
There's probably a better way to setup directional attack anims
nah bro he's right here
I can't find it when I search even with context off π
just realized the set delay length is for audio, well there goes that plan
I found the problem, I'm doing this in a function instead of the main event graph
now I need to figure out how I'm gonna actually do this
guess a variable will work
I'm having a weird bug with GameMode - I set a custom game mode, which has a custom player controller using a IMC with the 1 key set to a bool. The game does not register the 1 key. I made a second custom game mode, set the custom player controller, only when I run a PIE session using that, it doesn't even register the dang playercontroller (I can still move everything around with wasd or whatever)
I've never seen it before
If in BP I want to get this so the name of the component which one would I use, Display name or object name ?
What are you using it for?
What did you implement the IA in?
What do you mean? I put it in a character to do a printstring
Dragged character out
me ?
Correct
so I need to be able to look through all the object action components and find one that matches name wise so I can check something on it
Character is possessed?
just can't remeber if object name is going to pass the name of the component through
Why by name though? Why not make tags or an enum on the component and compare it?
Generally speaking comparing things by name is going to end up in sadness. Even if you get it working, it makes the code fragile.
just thought the name of the component would be okay to compare against
oh I won't be altering anything base, i don't have the source for that
also it means another loop within another loop
to use tags like
And then someone renames the component on the actor out of boredom to reorganize better.
How so?
cause unless I use find, the component tags is an array
and there multiple objective actions that are looped through to find a matching one
I don't mean FNames. I meant to put an actual GameplayTag on the component itself. Then it's the same as you're doing now.
If SomeName == Component->GetName
if SomeTag == Component->GetTag
i'm locked to 4.26
Contains also works
4.26 doesn't have GameplayTags?
Spent the last few years in 4.27 π So unsure.
oh, probably not
man I thought this would work
can't believe I've spent an hour trying to get the montages to work now
I don't do possess character normally on account of it being top down and stuff, I didn't even think about that, it works
get the mesh component of the object you're animating maybe?
Yeah. Still needs input enabled. π
The attribute boost code I think I'm going with, after 2 weeks of jerking around:
lmao
Must have it set up completely wrong, I don't think I would need one
It's probably something to do with my actual statemachine because the logic in the first person blueprint seems completely sound
im starting to think montages aren't worth the hassle but everyone praises them, probably not good to use in my specific case
I'm wondering how to pass along which ones to boost through the character creation process? I assumed I was going to pipe the info from creation into a struct and then spawn an actor based on that, but the logic for the boosts is on an actor component for the character
Oh maybe if I spawn the actor during the character creation process, oh lord i'm gonna give myself a nosebleed
Very new to BP. I am trying to create a Pickup system, where I can pick up any instance of the same actor from my level. This logic is not working, it only picks up the last index. Could you please help me on this one? I want them all to be ready for pickup at the same time.
Could you not trace and use the results of those traces to obtain the actor in question? why are you iterating through every actor during begin play? what if new objects are created or some are destroyed, who is keeping tabs of this pool?
ideally if you want to keep tabs just use an object / pool manager, otherwise if you don't perhaps try using overlaps or traces to get an immediate reference of the pickup.
Conceptually if you don't require a list of every pickup, don't have one. It depends on your game design whether you'll have many or not, whether they'll be destroyed or not and whether you want to perform actions on them or not (among other reasons)
Ideally yes, always have a list of your actors... Realistically if you'll have 5-10 pickups and you don't need to track them in any way, don't.
Just keep in mind all of these "get all" nodes are going to be slow.
So I don't think there's a point in trying to fix your current system... But to answer the question, obviously you are iterating through the array and always overwriting the "Pickup Obj" variable with the current item, that means once the loop is over you'll always have the last reference assigned to your variable.
I actually did not know how to use tracing for this type of things, I will look into that. In my gameplay I will have set number of said objects in the level. So there's no question of creating or destroying them. I will have like 4-5 of pickups and same number of socket for them in a level. Will have to collect the pickups and place them in the sockets to unlock something.
You could also use overlap events, but I can't suggest the best solution for your use case you might have to test yourself
A sphere overlap in front of your character could just work
But let's say it's VR, then you'd want a precise trace π
I am using overlap events. But its not getting all of them
Check your overlap settings, make sure they are being generated.
I am using the default BP_ThirdPersonCharacter
In collision preset settings if they're not set to overlap, they won't
Just take it one step at a time, divide and conquer.
I did check they are overlapping. But I am not able to make the character pickup any one of the item
If that's about the entire scope of requirements I wouldn't worry about having an array keeping track of them unless I wanted to maybe hide them all, or perform any other bulk action -- In which case I'd just have a separate "manager" take care of this, if it's not a big amount of items it can all be done on BP
Perhaps add a sphere collision component to your third person character
make it always visible so you can debug easily.
you can place it near the ground so it's almost always generating overlaps (could be a box, also) that's one simple solution.
otherwise a sphere trace could work, for what you said though I'd try overlapping with a sphere or a box first.
on overlap check that the actor is indeed valid and can be picked up (perhaps if you implemented an interface, you could check that it does indeed implement one) then if its a valid reference, you can now attach it to your socket and store this reference as a variable.
of course you'll need a function or two to handle the physics setup, since you'll have to disable physics simulation.
so upon drop, simulate physics, and once it's sleeping / at rest, disable (unless you require it to always simulate) or simply disable upon pickup.
that's all 100% up to your design though
the animbp is simply an idle with the directions using transitions
I've got a problem and was wondering if I could get some help. In my game I have two game modes. one game mode the player controls a single actor with a first person camera and in the other game mode he controls pawns which are the players "party" I have a pretty robust save system that pulls from the "Party units" class and saves all the info. The problem is i want to save some info for the first person actor as well. whats the best way to go about this.
could i just add it here, then after the forloop for each party unit drag off complete, cast to the other actor and put the appropriate information into this break.
Out of interest if I have a event that fires, play sound at location and play animation all on the same execution line would that all be done same frame ?
And then in further curious would adding a then sequence in so then 0 is play at location and then 1 is play animation,m
Anything that is not a latent node will run on the same frame.
So regardless weather I use then sequence or not it'll be single frame
So let's say I wanted the sequence to happen by each then execute to be on the next frame I could add a delay of 0 ?
Hello everyone! I'm trying to use linked animation layers and interfaces like Lyra does. When I equip a weapon, I link an animation blueprint and I try to use some of the "main" animation blueprint to drive some of the weapon animation logic. I tried to mimic how lyra fetches variables from the parent anim blueprint, but for some reason, during the first few frames after linking, I get some exceptions (see screenshot) because apparently GetOwningComponent.GetAnimInstance is returning null I think. Does anyone know what can cause that and how does it not happen on Lyra?
hey, is there a node which gives me the centre of a camera? im trying to draw a line trace to where the player is looking, which naturally, is the centre of the screen, but i dont know which node to use
Replace my LocalPlayerController and LocalPlayerPawn with GetPlayerController and GetPlayerPawn. Set the 600 to whatever length you like.
I created a item actor and I am printing on the begin play. When I start the project it prints. Is it possible to not have this actor "start" until I tell it to?
Beginplay runs the moment an actor is ready, and the GameState is ready.
If you want a different event for your thing to run, then you need a different event. How are you planning on telling it that it should start? What is the usecase for it?
Actually I got something mixed up. You can ignore my question.
thank you very much
Does anyone know if it is possible to use python with blueprint?, what i want is to use a function i have created in a python file and get the returned variable to use in blueprints.
Why don't you assign the struct to a struct? you setting each individual member like that. Looks painful
Use cpp?
For reference what i want to do is use python for is to recognize made up words by utilizing template/pattern matching. I have no idea how i would do this in cpp but i could do it in python.
well i mean we're in blueprints section of the discord, I dont know c++ and unfortunately i based the system off a tutorial as I was extremely new when I started. Save systems are still by far my weakest area so I'm just not in a place where I'm comfortable reworking the entire system. I'm sure it is the way it is for a good reason as the person I got it from is very skilled. Its okay though, i figured it out.
@stark patio https://dev.epicgames.com/community/learning/tutorials/K8Pe/getting-started-with-python-in-unreal-engine
Epic has one example but it's mostly for editor tool, if you are doing run time. I am not sure.
Wasn't directed to you, I just feel you can encapsulate those attributes into categories which is it's own struct.
Your save file will only get more bloated as time goes by and setting the pin one by one is a labourous task.
ye i found that one to, but it doesnt seem to mention anything about doing it at runtime :(
its cool., and yea it is.
Hp , level , exp can be a hero info
Agi, str, hp can be hero attribute.
Then for your party info it can be an array of a struct that hold those other structs.
working with the save system is easily the most labour task in my project for this reason
With how you do it, I would say it is kinda self imposed ππ
It doesn't have to be labour extensive
I'd recommend re-doing that system; using a structure like that is bound to become a problem in the future.
You also don't need to since you are already using a save game object; there are other better ways of handling stuff like that.
If you don't move from that system to a better one your project will just become big enough to where it genuinely will be too taxing to ever make the change and you might end up giving up due to that.
I'd strongly recommend, now that you have a better understanding of the engine; taking a step back and like re-organizing your project and all that.
cuz it shouldn't be
Noted. I'm pretty far into my project so its just not the biggest priority. At this point i'm close enough to having finished all core systems that I'm just going to push forward since whats there works. I have some notes to optimize my project a bit further down the road and will add it as high priority.. I certainly will not be starting a project this way again. As far as me giving up, thats not going to happen, I have like 600 hours into my project at this point.
I love my save system. Get all objects. Subsystems, Actors, Components, SubUobjects of all of those. Save them. Load them. No extra code, just some checkboxes.
Tom Looman has an amazing guide too for getting your feet wet with a C++ save system
Is he using the method of saving objects as well, or?
He adds a couple of extra steps iirc, but yeah, in general.
Where's the guides for allowing people to code Lua scripts directly into your game
hey this spawned system is getting destroyed, but i m also getting a warning saying that the destroy component function cannot find the reference.
Just use activate and deactivate thereβs no reason to destroy NS
And it prly doesnβt work cause youβre using spawn at location rather than spawn system attached. I would imagine the former spawns an actual placeholder actor that contains it
So youβre trying to destroy an actor with a component ref
still not working with deactivate
Probably because of what I said above
I usually have my NS as components in actual actor bps
So I can spawn the actor
yea but this is an effect, so i didnt think about making a component in the main actor
character i meant
oh tht cud work
At which point you can just destroy the actor if you want
Or activate and deactivate the NS component
yea man, thanks, trying this
why the pose not on 0 as it is in Aim Offset. What am I missing
Perhaps the sfx already destroy it self before you call destroy component.
noo, the sfx is actually very long so i had to cut it short
Iβm thinking calling regular destroy on that ref might work if it indeed creates a placeholder actor but I havenβt tried it
I haven't work with NS much, not sure about its life time.
Thereβs an auto-destroy checkbox iirc
ur solution works. actor is getting destroyed properly without errors
Sorry for the spaghetti code but I'm trying to do something and for some reason, no matter what I do, my custom event is not triggering. The bind event is triggering but the Custom Event is not. Does anyone know why? Thanks in advance
Where are you calling that dispatcher
The first event, right? It comes from whenever a different blueprint calls for music which can change. Right now, it comes from the level blueprint
The onAudioPlaybackPercent
A bind is useless if you donβt actually call the dispatcher at any point
See video on bp comms pinned in this channel to understand dispatchers
Ah I see. It's apart of the Audio Synesthesia plugin. Sorry, I'm still mostly new to all this. Thank you!!
How do I make First Person Camera not go through the mesh without increasing or moving capsule collision or editing the animations?
With great difficulty. The camera itself doesn't have collision so doesn't detect if it's colliding with anything. A spring arm used in 3rd person template has collision detection on it which shrinks the arm length.
The AudioPlaybackPercent is apart of the engine and is called each tick as the sound is playing. I use it myself to keep track of in game music so I can reload at the same point.
How do you know it's not being called? I assume the sound is playing.
dam π
Clamp the camera's rotational ability
I'm assuming practicality here, you don't want to look so far down that you can see through your character. You use clamping for that
It's also on you to make sure you don't have bad animations that will directly overlap the camera
and finally you could set the head bone to be hidden from the owner, And that's a pretty basic startup
oh my bad lemme explain
overlapping THROUGH the wall
like seeing through the wall
im using GASP
Increase the capsule size just slightly enough so that it won't ever touch the wall o.O
was unsuccessful doing so π cuz the mesh itself is in the capsule
hmm
Don't change the scale of the capsule
Change the other thing
You can increase the width of the capsule without changing the scale and fucking everything in the process :p
Can't remember the variable
I think it's capsule radius
and the other one is capsule half height
so ive made a radio which when interacted with turns on an is supposed to turn off once interacted with again. the problem is its turning on but not off what did i do wrong (im new an am trying to learn)
You just didn't toggle your boolean. π So it's always false, trying to turn on. Set that to true and false on your bottom function when you turn it on and off.
if i toggle the boolean to be on it wouldnt start the audio
That doesn't make sense. Can you show what you changed?
sorry if im just being stupid right now. But ive set the boolean to true as seen and its firing the turn off function only now. and if set to false it will only fire the on function without being able to turn off
not the default value. you have to set it when the interaction happens
right now it always remains at its default value, since you never set it otherwise
so the code will always flow accrodingly to that value
either always trying to turn on or always trying to turn off
@jaunty tiger
Hi guysπ€ I have some question!
I found someone has Exactly Same problem as me (URL Down below)
What I know is 'Additve Anim' is basically add Anim to another Anim, right? like a fusion of Animsπ― running +punching.. But I didn't Add any Anim to 'MM_Land'. I just retargeted it! I don't know why 'Additive Error' happens.
(And it Also happens when I retargeting basic Asset from ue5 project 'ABP_Manny' to my Custom Character)
None of that Reddit users were not able to figured it out π€
https://www.reddit.com/r/UnrealEngine5/comments/1dwtla6/error_trying_to_play_a_nonadditive_animation_mm/
I tried Changed 'Additive Anim' to Local but Animation is still weird
got it working thanks and thanks to @visual ember also appreciate it alot!
tidy it up, move the set to the right
is this eye pleasing to you? π
not 100% but better. Re-route nodes are your friend here
oh so this
perfect
trying to optimize my space here
Hello!
How would you handle a recoil system for FPS games ? I am currently using a timeline, but I dont think this is ideal. Is there any other tools that would be worth looking at ?
Depends on the kind of recoil you want.
In general though I'm inclined to say that timeline wouldn't be the answer. It's usually just a bit of interpolation on a tick function.
I wanted to go for a pattern like recoil
I am really not familiar with interpolation, is it done with the Curves on unreal ?
It can be if you like. EG you could interpolate along an alpha of 0-1 and use that to find a location on a custom curve.
Guessing he's talking about a spray pattern similar to valorant
Which I also have no clear implementation ideas on how they achieved it π€
I'm looking at creating a mirror maze, any ideas the cheapest way going about on performance? I need mirrors reflecting mirrors pretty much infinitely. I thought about doing this with a camera material but I also think that will be expensive on the performance
yes kind of
but i am really interested in all recoil systems of different games to understand how it is implemented
Hello, does anyone have a tutorial for adding physics to a bag attached to the character ?
Breakpoint
Hello,
Is there a way to call these asset actions inside a blueprint?
I am trying to create an Asset Action Utility and need to export some static meshes to fbx?
i made a pickup system i have a scene component at firstpersoncamera which i use to parent and attach items when i pickup it works well drop works well too but the problem is when dropping im setting simulate physics to true and adding an impulse but when i do that im not able to pick it up again, when i try to pick it it parents correctly but its not welding neither coming to expected position stays in the floor
Try to add a box collision overlap and make it a child to the item(static mesh) you're trying to pick it up
I have a actor component named "X". I created a macro library and it is based on X component. But i cant call any macro. I can call only if i change library's parent to ActorComponent. But then i cant use my variables which are in X component in library. Any help?
This is good to know. I havenβt dabbled in #audio yet
hey there, im still stuck π
This is a button i drop into other widgets to "close" them by hiding them.
If i use get parent I can hide everything but I am unable to set the widgets back to visible.
If i leave it to be self then only the button hides.
How can I make a reference to the parent widget in which the button is inside?
Hey guys
Has anyone made **online leaderboard **blueprint + steam?
I will publish on Steam, I want to add "Trial" which you made you get a time, on leaderboard, you can get the placement with your time for 72 hours ( Each 72 hours trial will change and reset leaderboard.)
Is there a specific reason Quaternions inside blueprint structs always displays the name "Rotation" rather than the name you give it? (Currently in 5.2)
Did you fix it?
unfortunately not yet
Is this a settings widget? I need context as to what is this for
its a simple widget i can click on different buttons, i just want to have a universal button to hide the widgets its inside.
the screenshot is from the logic of said button
I see, so with the button you want to hide whatever widget
for example this is my widget
i want to toggle it with 2 and close it with the button
its inside two widgets once is the one i posted in the screenshots above and another one is called stargate selector. let me take a screen for you
thats the code of the button
Okay so here you said "If i use get parent I can hide everything but I am unable to set the widgets back to visible." So when you press 2, the widget doesn't show itself?
Like it partially works
yep, i can hide everything once, but if i try to press 2 again, the widget doesnt show up again, however the input mode changes to ui only and the mouse cursor shows up again.
i also get a debug print, so it seems somehow to work and not at the same time.
also when i use a hard reference in the button for this widget everything works
but my goal is to have an universal button i can just drop into any widget.
have you tried creating a reference to the widget during the OnInitialization override?
so you don't have to hard reference each specific widget every time like you said
hmm i dont know exactly what the OnInitialization override is
can you guide me through?
ah i thought the construct is the begin for widgets D:
Nope, but I think it could work on the construct too, though I'm not sure if it will know in which widget it lives during the construct phase
try on the init function
yes
i tried this before but i didnt know what i would put into the asset input
and now get parent or smth like that
chnge the type of the variable you made
it should be UserWidget obj ref
you apparently set it to panel widget
unless you want to do the opposite?
same issue as if i would put the get parent directly into it, it hides the widget but cant make it visible again
it was set to user widget but the get parent wants a panel widget
i promoted the target to a var and i could set it via the parent node
however if i make a var as user widget object the parent wont connect
I see I see
appreciate the help ^^
well how about doing the opposite?
didnt wanna make you start unreal for that π
don't worry : )
having the parent widget create the button, and hold a ref to it
so id add the button via the event graph to the widget?
or without creating it, I mean you can get a ref to the close button because you already created it in bp (I forget we're not on c++)
no need for the event graph to create the button
ok im confused π
yeah but like that defeats what you want
i see π
haha sorry I'm not thinking right
i thought it would be smart to have it "modular" without hard references
but seems its more difficult than i imagined π
I'm pretty sure that's possible, it's just weird how it's not possible when you get parent and hide it inside the button widget
maybe the problem is my third person character where i use the 2 key as input to set it visible again? however the rest of the code works as intended
only the visibility is not working
are you sure the widget is not gone when you press 2 the second time?
like, it's still in the viewport
where does this run
i used to remove it before but i deleted that code and replaced it with the visibility, maybe i forgot something. let me double check
both of these are in my third person character, the first image is just collapsed nodes. they are created on begin
have you tried having the button set visibility to hidden instead of collapsed? (I'm aware hidden takes space while collapsed doesn't)
yes, tried this, but no help unfortunately
for my fps counter i dont use the button but a flipflop and the collapsed works
have you tried debugging the variable here Debug Menu Ref during runtime when 2 doesn't work anymore?
See if it's valid or not
let me check
to debug it easily just run IsValid node on the branch, print a string on false and another on true, see what happens
better check with valid node
ah you said it already ^^
just in case
do a get visibility as well
and see if it returns hidden/collapsed
even when the SetVisibility to Visible runs
xd
thnk you so much tho, i already learned a few things especially the debugging now is much better. before i used to print myself
Np! there are a lot of other tricks to debug, but you'll learn them as you go ^^
the bottom true is valid
ah okay so the widget is both in viewport and visible
this is in your character bp right?
have you tried having the functionality of pressing 2 inside the widget itself
hmm no, i thought it might be better inside the character because of the input mode
not only it may work, but it's better practice to encapsulate stuff like this, especially when it doesn't have to do anything with the character
no no
i will try
you can get the input mode inside the widget easily
use get owning player
have a public function that the player calls when 2 is pressed
no change unfortunately
hmm
it worked right out of the box
the input mode i mean
because i was already using the get player controller
you sure you don't have anything else that happens with the widget that could interfere with the visibility right?
also, have the Get visibility running on tick just in case, like maybe when you're pressing 2 it is visible only for that one tick, maybe something happens after that, I don't know much of your code
I see
maybe the elements inside the widget that should appear have 0 in alpha or something?
hmm
not sure what you mean by that, i searched all the elements for an alpha setting
nothing there
also no animation on any element
all alphas set to 1
you have to check the A at runtime
has alpha?
ah okay
yeah I'm confused really xD
it must be me
im sure i have done something weird thing now
its probably right in front of me
and im not able to find the problem
try creating a normal widget with nothing in it, just a white text or something
and add the button
yep
maybe when you set the visibility to collapsed inside the button widget, the visibility stays overriden, so like you should set visibility of the parent widget in the button to visible inside the button widget?
hmm makes sense
so the idea of setting the visibility to collapsed inside the button widget is probably a bad idea but
let me try
let me check how I did it, I have coded a settings ui before
maybe instead i can make an event dispatcher?
and call it when the button is pressed?
you can have an event dispatcher, have the widget that should be hidden and visible bind to that event, and the button call it everytime it's pressed
but
if i make an event dispatcher and a call
how do the widgets know which one is supposed to close?
the function that the event dispatcher calls should have a parameter of bool that will be either false (set to collapsed) or true (set to visible)
the widget binds to the event dispatcher
I have never used event dispatchers in bp, I use delegates in c++, I'm sure they're the same
ooh i think thats not a good one, now i have to cast from the widget to the button widget to listen to the call right? I dont know how to correctly make a cast from widgets to other widgets, also seems like im making a hard ref now again
yes i think they are the same but its a bit confusing to me inside widgets
the way I have it is using my own custom hud class, I have the character owning delegates related to the ui, that the hud class binds to, and when the character calls a delegate, the hud will tell the specific widget to do its thing
i think someone explained to me casting is a type check, before i thought it was a way of communication between different blueprints, so yea π
casts are fine, but there is a case when they could be a problem, and that only happens in bps, I'm not sure when exactly
that's when having widgets living in a hud class comes to play
the hud keeps a reference to the created widgets, and tell them what to do based on the character's wants
the widgets don't know about each other
i see
anyways, the gist of this, is that the widget that needs to have its visibility changed, should be the one who does so, not another object setting it for it
you change the visibility inside the widget, and nowhere outside
that makes sense
without dispatchers, maybe the button calls a public function that lives in the widget you want to hide, and tell it to set itself to visible, but also make sure to not hide or show this widget anywhere else in the code, only this specific function that lives in the widget should do that
if that doesn't work, then make a reddit post and you'll hopefully find a good answer, maybe I missed something
reda thank you so much for all the help, i will see if i can somehow figure it out with the tips you gave me. i will report back hopefully when i solved this. appreciate that you spend your time to help me! really!
I think you don't wanna do this because you'll have to call it on every widget that needs it?
you're welcome! I tried to help but hey, if you find an answer, let me know in the dms, I would love knowing what the culprit was
if that's your problem, then create a base widget class that every widget needing a close button should inherit from, this base widget class constructs this button so it lives in all children
that's another way of solving it
i think you were right that this isnt the way i wanted to do it. im looking now into the public function you talked about and researching about it.
okay, and don't forget this other way as well, of having a base widget, this could work too
i was just trying to see what is the name of the parent
it seems im not hiding the widget
but the element right?
so that might be the issue
im trying to set the widget visible again while im hiding the canvas element
@elder wharf
what's the canvas panel here? is it the widget you wanna set visible?
no no
well there you go
i think i figured it out
the canvas panel is collapsed so it'll hide its children
we were trying to set the widget back to visible and it worked, but the elements were set to be collapsed
by the button π
exactly!
i just figured it out cause i was looking at all the debugs we implemented
ah so everytime you set the widget to visible, the elements were set to collapsed? when did that happen?
and i just wanted to get a name for the ref from the parent node π
here
the parent doesnt give you the widget
but the elements
apparently
let me see if i can fix it
didnt make it work yet but i think im on the right path will report back
set parent twice should get the whole widget, didn't work?
nah it made it slightly funnier π
Hey everyone, I could use some help with my UE5 project! I just finished making an interaction system, but Iβm having trouble with the next part. When the player interacts with an object (in this case, a box), I want the camera to move closer to the box, and then lock the playerβs movement and camera control. After that, Iβd like to make the cursor appear so the player can interact with UI elements. Any advice or pointers on how to achieve this? Thanks in advance!
the target should also be taken with get parent twice
well here it says that the get parent returned something null
2 of the messages were from the disconnected prints
so it's probably the second get parent that is returning something not valid
where is the button in the hierarchy of the widget?
oh by the way, in the get parent, what is "self", is it the button widget or the widget you're trying to hide?
yep
no idea, the node always looks like this
self is whatever this node is running on
ah then it makes sense it'll return a null
the target should be the close button
but didn't you want a universal close button? which in that case the code should be inside the close button widget
and then get parent twice should return the debug widget
ah sorry
my mistake
you are right
its inside the button
its not inside the debug menu
i had them both opened and got confused
aah okay
if you do a get name on the get parent
and another get name on get parent twice
what does it return?
somehow i dont get a name returned anymore
aah okay
im gonna fiddle around a bit i think im on the right way dont wanna take more of your time im gonna tag you when i get it hopefully fixed π but you helped me a lot, i figured out the problem because we were debugging so many things!
yep you're on the right track, hoping to hear from you! good luck ^^
How do you make brakes?
I'm trying to figure out how to make the speed very quickly approach 0 when brakes are active using net forces (not physics forces, but a collection of equations I've made to simulate everything)
So basically what I'm having trouble with is when there's active power applied to go forwards when the brakes are active, the brakes should exactly equal and oppose that force... that part is easy enough, keeps it stationary, but when my vehicle is already moving and I'm not applying any power, there's no force at all, it's moving purely on momentum, so the braking force is 0, and thus... just keeps coasting to a stop as if it didn't have any brakes
so basically I want my brakes to work at full effectiveness, unless it doesn't have to in order to keep the vehicle stationary..... if that makes sense
Any ideas why the ball is not bouncing off the target?
Hey im a noob here. can anyone tell me what this means, im trying to have my character switch weapons, when he switches the other weapon does not spawn into the world or is not visible
on beginplay get actor of class > third person v3 > right click the return value and promote to variable
pretty sure it needs to explicitly told to bounce
that and the collision isn't thick enough to stop anything
so what I'd probably do is use the target's actual collision, get "on hit" check if it's the ball, if it is: create an impulse force that directly opposes it's current motion
Thank you, i forgot to call the function
no wait that would just stop it... you wanna oppose and double it
if I'm not mistaken that is
or actually even simpler: just have the detection on the ball rather than the target
so when the ball touches anything, create an opposing impulse force twice as great as it's current motion
... that is if my brain wasn't fried rn... 1.5x not double, cause it won't bounce with the same magnitude as when it hit, it has to depart some energy..... hmmm
so yeah if it doesn't seem right I'd just play around with the magnitude value, so just set it somewhere between 1 and 2, whatever feels right
Yeah I think I figured it out
Thanks
mhm π
does OnBeginCursorOver have a trace distance?
i noticed that once i scaled up a plane im using as a placeholder asset, the mouseover stopped triggering
ah yes, appears so. moving the camera closer gradually reveals a distance where it does stop working
nvm fixed it - change the 'trace distance' in your 'playercontroller'
I am trying to send a message to the parent of a child actor component I have in a main blueprint. The Child Actor component has this logic in it. A simple interface message
I can't get that blueprint to fire that message to the parent. Anybody got any ideas what the correct way would be to target it
Nvm
Got it working I believe
it was an issue of the first message call not pulling through to the last one
Yeah my bad
Should have tried breakpoint.
using only blueprint, is it possible to make a function that has wildcard variable as a input?
no
but macros
and there are some "wildcard" types depending on what kind of wildcard you are on about
e.g. InstancedStruct is pretty much a wildcard wrapper for structs
I'm trying to get a widget inside a widget switcher to use as a variable in a blueprint, but it does not seem to want to participate
I'm fairly sure I'm digging myself a spaghetti hole, but I'm not sure how else to do this
Inside the "core" widget blueprint there are 3 main widgets - the top 3 buttons which control the widget switcher, the bit underneath the buttons is the widget switcher itself with 3 sub-widgets, and the bit on the right is a character sheet
I'm trying to get the name entry on committed to flow to the character sheet, but I believe since the widget with the text box is inside the widget switcher and the character sheet is outside of it, they are having a tough time
I've tried BPI and an event dispatcher, and maybe it's just time to go to bed, but I'm thumped
@copper chasm You should have a common place to store the name.
The committing text box should get that common place and set the name.
The character sheet should get the common place and bind to some event dispatcher that you call when the name changes
If it's the character name then such a common place can be the PlayerState, or if you have multiple characters per player, the Character itself maybe.
I'm thinking that my question should be here.
If not, I can move it
I am trying to make it so my car NPCs don't run into each other. So what I did was changed the parent of the controller class I had made to the Detour Crowd AIController.
The car had been floating instead of walking, and after changing the parent the car no longer moves. The Behavior Tree is constantly trying to get the AI to move to the set location, but it never completes.
I'm not too sure if this is important, but the car is using the DefaultPawn class as it's parent.
hi ! I'm trying to create a system where you need to cook something while keeping pressed on a button
And it needs to be cooked to perfection like not more than 5 sec
but i already have an interaction button that i just click to activate, not keep pressed
what's the best way to get a second button to work
Thanks !!
Should i do a new line trace ?
You probably want to change your interaction system to call StartInteract on Press and StopInteract on Release on your HitActor (via an Interface).
Then you can start counting up on that specific actor when StartInteract is called and check the time when StopInteract is called.
And for the actors that should do an instant interact you can just call that stuff on StartInteract
Can get more complex depending on your requirements
Oh ok thanks a lot so i don't need another Enhanced Input action node actually i can do everything with my line trace that i use for interact i guess
because what i did for now is create a new E I A node + new line trace and check if the the object i'm hitting has this specific "cooking station"
But for now i'm getting a accessed none
maybe i don't know how to use tags properly but i just set up a tag on the object i want the player to interact with (the "cook" button on the machine
The return value on the line trace will be false if it doesn't hit anything. You probally just need to add a branch so it only does the other checks if it hit something it can check.
thanks yeah that's the issue i'm facing now π
but how can i specify that i want only the button on the cooking station to trigger the interaction
As in, only when the player is looking at the specific button of which is a mesh inside the actor?
yes looking and line tracing to that particular mesh π
i tried with tags but it didn't work i always got access none
The hit component is the specific component that was hit inside the actor. You can do a check against this, such as seeing if it has a tag.
Alternatively, you could use a custom trace channel thats only set to block on the button. (Might be best to do a more general interact type channel though)
thanks π
I tried running this but i always had accessed none error
the error actually fires when i reach another part of the world not the button.. very weird
there is some obvious stuff i'm not seing
it's crazy because it's working like this
but not with another branch
so what i understand is that the trajectory is doing this otherwise it wouldn't work
sorry for the spam
You're accessing the hit actor, and checking it's tag before you know its valid. Hence the accessed none
ahhhhhhhhhhhhhhhhhh damn i don't understand the order then
Just wondering if you've found a solution to this issue? I'm looking at some quirks regarding WP and soft refs right now.
I ended up with a map and an array. The array just stored a list of the string versions of the soft ref. When I want to check if an actor is in the list, I convert to a soft ref, convert to string and then remove the PIE section of the string with this.
Hey all,
I'm working on putting together a packaged build of our character creation system which will be used by our team to create characters as and when needed. I wanted to package it mostly so that parts of the team who are not even in Unreal/Source Control can design and export character designs without the need for all of that setup.
Anyway, the immediate issue is how I can output that data into a way that Unreal could then read. Right now, each NPC/character in the game is assembled from a custom data asset which contains all of the morphs, clothing, hair, and other details that should be assigned to the character, which makes for a really nice Unreal workflow when setting up a cinematic or populating a town.
I wondered if perhaps there is a way to export data in a packaged build into a file, or to the clipboard, which would then be able to be used in Unreal to replicate that design.
One idea I did have was simply to make a long string of numbers/letters which contains all of the choices in a known order, and then the user of the packaged tool could copy that to clipboard, paste it into a box in the data asset in Unreal, and then I can write an opposite bit of code to read that string and turn that back into variable values, but perhaps there is a less convoluted and awkward way to go about something like this?
So firstly, I think you can probably just use the string split node on the first "." because everything after that fist dot seems to be the same. But another quirk I've found is that if you have a soft reference that is picked in the world, if that soft reference resolves & is valid, if you turn it back into a soft reference then it becomes that memory ref string and not the picked-in-world ref string.
But I have no clean solution
This is what it did in terms of the actual check once converted.
So, I don't know if this goes in here; but I'm making a cave explorer game and I want a simple mechanic where you look back and you can see your body, the way i have it setup is i have the body in the character scene, however when i look back the body rotates with the camera, i want it to basically always point in the same direction and when you look back you can actually see your body
I have it setup like this
in game it looks like this
if i rotate the player the body follows along, but i want to be able to look back on your body
I think I'm going with something like this, with a similar function for querying the list against a soft ref. Still need to test it properly.
Also look at this nonsense. Pure function returns 3 outputs but each one you connect causes the (potentially expensive) string comparison to run all over again.
hello! i have some question. i search in google that this code set optimal setting for my project. if i understand correctly, then until i change the graphics settings in any of the levels, these graphics settings will be applied?
Yes, it'll attempt to detect the best scalability settings and apply them.
thank you. and it does mean that you change the settings on the any level to these settings.
You can change the individual settings yes. Just be aware though, with you having it on begin play, it will run and reapply the benchmark settings each time. You probally want to include a check to see if it's the first time launching the game, if it is, run and apply the benchmark. If not, then load and apply the saved settings.
so. if i can run benchmark settings first time when player start game and after this i use save node, and when person will run game second time, just load setting?
i mean. do i need some extra object for saving graphic setting...?
or i just can use "load settings" and "save settings".
sorry for stupied questions.
You can do this
There are some graphical settings that get game user settings doesn't really deal with
It's helpful if you are able to use c++ to set and create cvars yourself. But if you don't have access to that then I've seen people use unreal engine save object as a way to store and load additional settings
Thanks
how can I expose the static mesh here as a variable
or how can I make it spawn actors instead of static meshes
this is very confusing to me, how can it be the the streaming pool capactiy I've set to 2500 yet it's only showing 8% when the required pool shows more is needed
and at the moment I have a wierd artifact happening where the textures are switching between blurred and not blurred and back
hi ! i'm tryuing to make a cooking system where you have to hold the button just the right time
but i don't think i'm approaching it the right way
Hey I am currently trying to merge my inventory system with my equipment system. is there a way to add the item i just equipped and all it stored information back to a child in the uniform grid again like shown in the "Event Construct" logic when pressing the "Body" button after i "used" it
ah cool idea
I'm not sure about exposing it on that node specifically, but you can just use the set static mesh node afterwards to set it to whatever you want
IMO, turn it into a struct, and export it as a json string. Then they can send that or whatever. You can import that in editor as a string, which can be parsed into a struct, which you can then simply use to fill out a data asset.
Thanks! Yeah that seems about right to me too. I was hoping maybe to be able to output a certain file directly from the packaged build which could then be imported as a DataAsset, but I think that's probably more hassle than it's worth.
Hmm. You maybe could actually. Do you have C++ ability here?
I haven't tried it. But in theory your Character Editor could create a runtime instance of a data asset. If you call Serialize on that with a non savegame archive, it'll save the entire object. You could write that byte array to a savegame file. Or any other file you like.
Then in Unrea Editor you can simply load said file to get the byte array, create a new DataAsset in a package in the content browser, and just serialize that byte array to it which effectively copies all of the properties they saved.
hi there sorry but this is still not working any idea what i'm doing wrong ?
it's not registering the tag, i can use the line trace on anyobject.. :/
Hello, I'd like to have an outliner on some objects when they get a vfx overalpping them, how do I do that ? I made the outliner working, it does on overlap actor. I just need t make that it also works when casting a laser on the mesh.
Hmmm, good idea! I'll look into this. Thank you π
I have a few functions that might help you if you want them? Just some helpers to create a new data asset in the content browser, and the serialization calls to read/write from/to the assets.
Thank you! I may get back to you on that as I need to head out at the moment, but I appreciate the offer!
Of course. π I'm testing it atm anyhow. Cause I'm curious for my own stuff now.
I'm not 100% sure how I got it, but following these instructions, I got it LOL
I have a BP_CharacterCreation that spawns the widget that the CC happens in, I'm gonna store everything in there I reckon and then spawn the character off those variables
@indigo bough It seems to have worked okay. In the test I made a runtime data asset, set it's name in it's description struct, and then write it's data to a byte array. Then created a new asset in the content browser in a Test folder. Wrote the serialized data to it. And it has the correct name. You could basically add the saving the array to whatever file and reading from it. Seems like a pretty painless way to transfer the data without much effort.
struct FTarrionFullObjectArchive : public FObjectAndNameAsStringProxyArchive
{
FTarrionFullObjectArchive(FArchive& InInnerArchive) : FObjectAndNameAsStringProxyArchive(InInnerArchive, true)
{
ArIsSaveGame = false;
ArNoDelta = true;
}
};
UFUNCTION(BlueprintCallable, meta=(DeterminesOutputType="ObjectType"))
static UObject* CreateAndSaveNewObjectWithPackage(TSubclassOf<UObject> ObjectType, FString PackageSavePath, FString NewObjectName);
UFUNCTION(BlueprintCallable)
static bool WriteSerializedDataToObject(UObject* Object, const TArray<uint8>& InData);
UFUNCTION(BlueprintCallable)
static bool ReadSerializedDataFromObject(UObject* Object, TArray<uint8>& OutData);
UObject* UTarrionEditorExtensionsLibrary::CreateAndSaveNewObjectWithPackage(TSubclassOf<UObject> ObjectType, FString PackageSavePath, FString NewObjectName)
{
if (!IsValid(ObjectType))
{
return nullptr;
}
UPackage* NewPackage = CreatePackage(*(PackageSavePath+NewObjectName));
UObject* NewCreatedObject = NewObject<UObject>(NewPackage, ObjectType, FName(NewObjectName), EObjectFlags::RF_Public | EObjectFlags::RF_Standalone);
if (GEditor->GetEditorSubsystem<UEditorAssetSubsystem>()->SaveAsset((PackageSavePath+NewObjectName), false))
{
return NewCreatedObject;
}
return nullptr;
}
bool UTarrionEditorExtensionsLibrary::WriteSerializedDataToObject(UObject* Object, const TArray<uint8>& InData)
{
if (!IsValid(Object))
{
return false;
}
FMemoryReader MemoryReader(InData, true);
FTarrionFullObjectArchive SavingArchive(MemoryReader);
Object->Serialize(SavingArchive);
return true;
}
bool UTarrionEditorExtensionsLibrary::ReadSerializedDataFromObject(UObject* Object, TArray<uint8>& OutData)
{
if (!IsValid(Object))
{
return false;
}
FMemoryWriter MemoryWriter = FMemoryWriter(OutData, true);
FTarrionFullObjectArchive ReadingArchive(MemoryWriter);
Object->Serialize(ReadingArchive);
return true;
}```
Hey, i am using save and load on the client side for a map system, but since the steam cloud is active, it's also saving to the cloud. What can I do to prevent this part from being saved to the cloud? (I cant save this part on server)
hi any idea why this is not wokring
it seems it can't find the "push power button" in blue but i have no idea why... it has a collider and is set to block all
any ways to start editting a editable text in blurprint? (after pressing enter in game that disables cursor for a moment before entering)
Collision BUG Ladder in 2D platformer
Hi!
When it's false, am I returning a null reference or what?
Thanks!
Maybe it is an invalid object reference.
Do output parameters exist on Blueprint's functions?
Yes, if false, the output would be null. If the output object is used with an isvalid node, it'll be invalid.
Struggling to find the best channel to put this in so I'll pop it here haha. I'm working on a Character that uses a Control Rig to put their hand at the position of a held object. The Character moves using the Character Movement Component. My issue is that the Character Movement Component seems to handle Character rotation in a black-box sort of way, and it always seems to process rotation AFTER the Control Rig places the Character's hand at the desired position, which leads to jitter and inaccuracy. Is there a way to make sure my Control Rig processes AFTER the Character rotates? Is there an event or callback I can add to the character controller to tell me when it's done rotating? I've tried setting the tick group of the Control Rig component, but that didn't seem to do it.
The character Movement component only controls the actor itself not the skeletal mesh. (other than the fact it's attached) So when you're talking about rotation, the rotation of what? The hand? Another bone? or the mesh as a whole?
guys, I want to convert the game animation sample to top down camera and everything. but I want to convert the turn animations to turn-in-place, like have the character turn its head to follow the mouse and then turn in place. any tips for this? im thinking construct controller yaw from difference in player orientation and mouse position?
As it's set up, the skeletal mesh is attached as a child to a Capsule Component, which is the default scene root component of the blueprint. That skeletal mesh has an ABP on it, which runs it through a Control Rig to set the hand at the proper location. So what I'm imagining is happening is that this ABP/Control Rig is running, setting the hand at the proper location, and THEN the character controller is rotating the entire actor for the frame, which moves the hand off of the desired position for that frame, just very slightly, causing jitter.
Are you able to show whats happening?
what would be good ways to tag static mesh actors either in the editor or runtime and quickly?
I want to give SMs tags and when I interact with them, check the tag and do whatever
instead of millions of actors, I want the logic to be held in the player character
I have such a weird bug. I have a Event Dispatcher on a platform that gets triggered when I overlap it. As Input I give the platform himself as object parameter. Then on the Level Blueprint I use the transform of the platform when the Event gets triggered to spawn a Particle Effect right where the platform is. However, the particle gets spawned z=560 units above the platform, but the debug print says its on z=0. So somehow the position gets to 560 right after the BP_ParticleEffect is spawned. But there is no code on the BP_ParticleEffect. So why does this happen?
i feel like i'm tackling an impossible task. How do I get the world location and direction of this cursor that's inside of a 3D widget component (in cylinder mode)? Note: Not a VR game, and no, widget interactions didn't help me as they can't follow the curvature of the widget
If I make the dispatcher just call a custom event inside this BP so that my code is a little more clean, am I breaking anything?
so instead of "update character name", the UpdateName event just calls a different custom event I can have way off on its own in the blueprint
and I can put "update character name" there
hello,
Can someone help me ? I dont understand why my FInterp To is not working here. I Also don't understand what the print string function is showing.
I reposted the message to update it because I made some changes
Interpolation requires being called each frame.
yeah or at least in a timeline
so I should call my update pitch and yaw function each frame ?
Hi, can anyone help me with trying to get my main character do an animation when he collides with a trigger sphere? All I see on youtube is how to make other actors do the animations and not the main character. :/
I'm having some trouble figuring out how to get a widget component of my actor to display properly in world. The goal is for it to display when the player is near a weapon and it will display the stats for that weapon. The only thing that seems to display is the border that's being used for the background color of the canvas. Some text (i.e. headers) are fixed, others should dynamically change based on the generated stats (not sure I set this part up correctly either), but no text is showing at all. These text boxes are set to visible in the widget. Any help would be appreciated!
can somebody help me fix this, I believe I broke it without realising and now my characters animations aren't working
I have two text fields I need to update from an array, and I'm still bad at arrays - I can get the first one to update, but how would I tell it to update the second? Would I need an array of the text fields (2)?
In case anyone does like I do and searches the discord for stuff in the future, I just made the fields into an array, feels like overwork but it does what it should
Hi there. The image shown here is an example of when the cursor/mouse is near the boarder of the viewport. Please ignore the incomplete Y-axis part. I have another part that tell the character to move.
Currently, I tried to swap out my double branch statement for my X axis with those 2 floats within the "Somehow not the same" comment. When I did swap them out, the result was moving me in a false direction when it should have not. I wasn't able to figure out why the improper outcome was happening, like I normally would. Now, I am confused. Why is this the case?
Tried debugging this for awhile now and can't get it to work, the "Is Valid" never returns a true so I'm assuming there is a more logical way to do this
the second blueprint screen is the BaseWeaponClass
You are using it unnecessarily for starters
A cast already does the valid check for you
With a cast failed I guess that makes sense, I'm just a bit simple lol
As for the second image, if you set it to always spawn and ignore collisions, it should also be a valid ref, but maybe you have a use case where you donβt want it to spawn
As for your actual issue
A sphere with a radius of 0, at 0,0,0 will probably not give you any results ever
oh my god I forgot to set those
and I've been sitting here for 3 hours wondering wtf I was doing wrong lol It should work now
I'll take a look into this right after I make coffee, thank you
left select node has inverted values
Thank you.
Such an easy mistake. Why did I do that... -.-
Alright it's now able to detect the Sphere overlap properly, unfortunately the Cast always fails π€ but it looks to me it's able to detect the fact it's an instance of what I'm trying to spawn? so I'm not quite sure whats going on here, I should probably look into a more idiot-proof method
Well Estoc seems different than βSpawnWeaponById
The SpawnWeaponByID is a collision box that creates a weapon from the data table I have set, and the struct takes an Actor class reference of that Estoc_BP, Is this the incorrect way to do it?
Yes. A cast checks if the ref you provided is of the specific class you gave it
Youβre looking for the wrong class
This is because of the Get Class node taking the Get SpawnByWeaponID node being put into the actor class filter? I'm butchering the blueprints trying to fix it
hii everyone, good night!! one small questionI have a Player Start and I added a Third Person, I tell the TPC that it auto-possess player 0, and it works when I play the game the camera is in the Third person but I canΒ΄t make it move. and If I disable the posses it goes back to the player start. you know how can I make the Third person to work?
Hey could someone help me out with a physics issue ive been having?
What would be a good way to communicate which level is loaded to the character BP?
I've got 2 levels that can be loaded. But each require their own set of rules, for example the UI that is loaded is different.
Is there a way to check within the character blueprint when loaded in the game, which level is ''active''?
How exactly will you load the levels? Loaded mean Stream Loading or just level loading?
Currently my levels are loaded through direct loading within the UI, so level loading
Yep I found in the meanwhile the Get Current Level Name. But.. how do I turn that into a boolean? So the player knows which level is loaded?
== with your level name for checking. Or switch.
Or soft ref to your level in c++ node as input + get level name() and equal it with current name, if you dont want depend on the string data.
Aha! Oke I'm starting to get it. I can indeed check if the name gotten is the same as inputted. This is something I can work with. Thank you!
Can anyone help me with the control rig? Gold Target is the position of the ball in the game world and when I move this ball, the character points this hand almost towards the ball, following the ball only his hand is a little away from it and I don't know why
directly in Control Rig is ok
I use From World Node
so should be fine
but it isn't
Hello, I have a starting level (map) with a couple of actors that handle global stuff and level management and stuff. In there I also have a variables actor, which is just an empty actor with simple variables (integers, strings, etc) with data that needs to be called upon in different levels and by different actors. Is there an advantage on using a GameInstance for that instead? I'm asking because Im now at a point I can easily change it to a GI π Was just wondering if there are advantages on using a GameInstance for those kinds of things or if an empty actor is also fine
GameInstance for persistent game data would make more sense
Then you don't have to worry about that actor getting destroyed between level transitions etc.
Let's say they won't ever be destroyed, is there any other advantage for it? Performance wise? or accessability? or?
Accessibility could be one since you can get access to the game instance easier. But besides that, it's not necessarily a bad approach. What I would do is make a game manager component assigned to my game state and have all the game related logic in there for different states etc.
But no, both are technically fine with minor difference and almost zero performance difference
Aight, cheers
I want to get the world location of a widget element from a 3d widget component that is set to world space (and cylindrical mode), how do I accomplish this? Widget interaction hasn't helped me