#blueprint
1 messages Ā· Page 363 of 1
Is the class ref a soft class ref? What about things like images for icons?
So a just a soft ref?
But yea, your overthinking it. Load what you need when you need it. The only time I would suggest trying to keep specific things loaded is if the process of loading/unloading them is affecting performance.
If you reference a datatable, the whole table would stay in memory anyway. Adding to that, fetching a row is handled in C++ which would be a lot faster than anything you'd be able to setup in BP.
Does anyone know of a cheaper way to load armor and weapons that i currently have ?
I have
A crafting station(smithy) with a datatable on it, in the datatable i have hard references to all craftable weapons and armors, when the player crafts one it gets spawned
Is there a cheaper way of handling things ?
Can you show the datatable?
So right now whenever the player opens the smithing screen this and the armor datatable gets loaded, right now i dont have a lot of entries and the items are rather light but i would assume if i have hundreds of items in there it would start draining performance atleast for older hardware
I just dont know another more performant way
how many would be shown to the player at once? And whats the minimum you think you'll have.
0 - 100+
They would be in subcategories like Bows, one hander, 2 hander,
Helmets, chest, gloves
Each of these categories has its own drop scrollbox, they only get shown when th player has the recipe unlocked
A little bit like in skyrim
I would probably lean more towards using data assets (primary data assets) then. You can then use the asset manager to get bulk assets as needed and only load those.
ive just read trought the docs for them
They allow me to load assets dynamically on runtime ?
This is an example of a function I have. The 'GetPrimaryAssetIdList' gets all the relevant data assets (as defined in the asset manager) and then I create an object for them to use in a list view. The widget entry then loads the data asset when it needs to be displayed.
So you could create groups in the asset manager for your different cats so you can just fetch the relevant ones when needed. You can also have a specific folder it checks as well.
Sounds too good to be true š
If you have access to C++ you can also define 'bundles' and preload load parts of the data asset. š (the soft refs)
Agree with what pattym said about using DA's, also how are you searching through in your DT? i noticed you have Name as 'Iron Shortsword' and RowName as 'IronShortsword', might consider opting for using GameplayTags instead of Name and RowName as it will make naming more consistent (and avoid typos).
The Name is just the Display name, the Data table doesnt allow whitespaces
But how are you searching? if you have the display name 'Iron Shortsword' you can't search the DT with that since it doesn't allow whitespaces
I remove the whitespace
Hi, could a kind soul help me out please? I'm trying to make a multiplayer racing game, but I'm struggling with setting up the player rankings.
Right now, I'm using a spline and checking which player is the furthest along it. Then I want to store that information in an array so I can sort it and display the rankings in real-time.
Here's the code I've made so far ā it doesn't really work yet, but I feel like I'm on the right track. This function runs in a loop after I've gathered all the players (array called Cars).
This sort of thing should be ran once on the server - so why is it an RPC? Who is calling it?
its in my spline BP, honestly i don't know if its correct, but every tuto that i find about this are diffĆ©rents and i don't understand them š
As to the code... it is too broken right now to give much constructive feedback. But you can't use the default sort like sort float array - since you lose association which car had which index.
Lets say I have a car, when it hits a wall... I need an opposite force to propel it backwards.
It can't be done with a physics material because changing those settings negatively impacts the steering and acceleration of the car itself.
Anyone know how I can do this? I need a blueprint based approach
So instead of editing the string every time you want to retrieve the data, it's ready out of the box - that's what i meant
I always have a Name and a DisplayName (that is a text actually) in my datatables. And the Name is exactly the same as the RowName. On occasions where I save the row as a variable on something it is nice to have the Name in the same structure. Especially if later I want for example to save or pass only the name and not the entire row.
Sure it is annoying to write the same name twice in the datatable but it is more convenient to use IMO.
Sounds valid, i just copy paste the GameplayTag to the RowName and search by the tag
Would it make more sense to keep each resource in a separate Data Table? For example;
Stone, wood, gold, iron should be in DT_Resource. However, when we add things like swords, shields, weapons, and guns, would it be more correct to have them all in one place, in other words, in DT_Items?
Is there a way to detect what force a physics object hits a wall?
I'm wondering if there's an easy node for this
I often do one general table for things that are related - for example, all things that can be inside the inventory, go to the DT Items.
If some group of items need more stats than other, I make a second DT. For example DT Equipment because swords need stats or DT Containers for data specific to containers (like what they can hold, how much etc)
I think there was some way to use inheritance in storing stuff in datatable structures... but I don't remember how it was called and maybe it was C++ based
One thing I would definitely avoid - adding fields to the datatable that are not used by most of the items in it. Because they will take memory space anyway. So putting ArmorValue inside a general item datatable would be not ideal since Bread doesn't have armor for example
So, if I understand correctly, you are suggesting a separate data table for each class, is that right?
A different one for sources,
a different one for consumables,
a different one for wearables, etc.
It depends how many different types you will have. If a lot - maybe it would not be an ideal solution and there is probably a better way. Managing tens of datatables would get annoying very fast
I think thats all there is to it.
I plan to use it under 3 diffrent headings. If there are more and they are compatible with the others, ı can probably add them in the same revelant DT
DT_Resources, DT_consumables, DT_wearables.. Should things like ācan be soldā or ācan be purchasedā be under a separate heading? in maybe DT_collectiebles?
Personally, I wouldn't use a DT if your wanting complex items. It sounds like you need hierarchy that could lend its self better to custom uobjects instead.
<@&213101288538374145>
I still don't know wtf a primary data asset is. I've messed with data assets a little bit but the asset managing shenanigans kinda turned me off of them
Say I wanted to enumerate all BP subclasses of SomeClass, can I do that?
Sure, anything thatās loaded.
Primary Data Assets are a construct that the engine provides so that the asset manager has something to hint at what classification an asset is before loading it.
If you know you always put your equipment items in a specific directory and ONLY your equipment items there, you might be able to load assets from those paths when you want all equipment loaded.
Hello, I've created a reference to a component as shown in the screenshot. Initially, when I run the game, the object is considered valid. However, if I modify the object's variables through the editor, the object becomes invalid and the event no longer fires. Why is that?
The yellow box in the picture is a box collision component attached to my character. For some reason, my OnComponentEndOverlap event is not firing when I jump, even though the box obviously stops overlapping the static mesh below it. The box collision component is set to Generate Overlap Events and is using the OverlapAll collision preset. Any ideas as to why the box collision might not be recognizing end overlap?
both colliders need generate overlap events on
show settings for teh capsule
Actually, It is the floor that I need to check. All the floors. And you are right that these are not set to generate overlap events. Nor do I probably want them to do so. š I may need to take a different approach.
I'm trying to address an issue where my landing animation seems to play too late. The capsule hits the ground and the downward momentum stops kind of mid-air for a brief moment with the character is still playing its falling animation (which is raised off the ground a bit). Then the landing animation will play. Instead of a smooth transition from the air to the ground, there is this little hitch that is annoying the heck out of me. I thought that if I could get the animation to play before hitting the ground this might solve things. Ideally, the animation would be timed for the feet to hit the ground the same moment the capsule does. That's what the box collision is about, but I don't think I want to switch to having every floor static mesh generate overlap events.
Maybe a visibility channel trace from the bottom of the capsule would be better? I was worried about it needing to run every tick, but that's probably no worse that what all my floors generating overlap events would be.
Or maybe I'm going about all of this the wrong way.
Thoughts?
this crashes my engine, so on the load of the game i wanna bring back and add all these things that i had in my inventory in the previous save... why does it crash my engine...
is there a way to add in a delay when debugging? In VS you can add in a hitcount that will only trigger the breakpoint after a certain amount of time has passed. I'd like to know if something similar exists for blueprints as well
I'm having to do this via other hacky ways, such as pressing a key to set a bool which then leads to a breakpoint. It seems like there's a better way I might not know about
Do you have a crash report? Like callstack or anything?
I fixed it
@maiden wadi sorry about the ping, but I think you are the person for this.
I've been getting different values, but never 0 - 1 for the X and Y.
How can I get the mouse position in 0 - 1 for the two axis where 0,0 is the top left and 1,0 is the top right.
The idea is just to give my widget a default position that respect ratio.
My first instinct is to divide the size instead of multiply. Does that help anything?
I know I've had issues with the playercontroller version of mouse position getter. I've always used the GetMousePositionOnViewport or Platform
š„³
Hi I have a question. How would I save multiple or unspecified amounts of arrays of content?
So my game is kinda like minecraft. All your progress is secured and saved inside of chests, so it's up to you how many chests you're gonna have in your game, how many, where they're gonna be placed, or what kind of things they're gonna have inside of them...
All my chests have an inventory system component similar to my Character... literally the same one
and now I need to save/load them... but the problem is I can't save an array inside of an array, because it's already an array.
so this is what it looks like inside of my character.
@lost hemlock you certainly can have nested arrays.
I can save only one chest easily... But what if I place too many chests ?
array inside of array?
What is InventorySystem? is it an actor component?
can't see the data structure clearly from the screen shoots alone, but you can have an Array of Content.
Each content representing a chest.
yes
so if you have 4 chest, you do have an array of 4 content.
You can wrap it inside another struct.
each chest gives me an inventory system component, and each of these arrays of content exist inside of a single inventory system
Create a new struct, the data type can be an array of Content.
based on that, wouldn't it be easier to just save/load those inventory system components inside of an array?
inventory system array
because everything needed should be inside of that
character has an inv_sys
chest has an inv_sys
I am not deep into saving yet, but I don't think you can save object reference in blueprint.
if I ever have an NPC that has his own items ... then I'd probably give him his own Inventory_System component too.
im not saving in blueprint
they have to be resolved upon load, I think there's easy trick in cpp but again, i'm not there yet.
im saving in an instance
I'm talking about using BP vs CPP
if you are coding solely with blueprint, then I reckon your only choice is to wrap the arrray in a struct.
good idea
and so, when I try to save I should add things to my struct?
should I put that struct in my save game instance bp?
probably...
Game instance is just an object that exist at the start of the application and get destroyed at the time you exit the application.
how to handle save, is unique to each project.
But at the end of the day, you just need to have the data readily available and store them in your save game object.
Game instance sometime can be a temporary place holder, e.g if you want to travel between maps which will destroy the instances from the old map, but you want to retain that value for the duration of the game without commiting to saving.
Example.
Player click Save.
Get all actor of Chest.
For each chest -> Make the struct data -> Add it to the struct.
Save the struct.
Exit the game.
Play again
Get save game file -> Load -> Get the array of the struct.
For each struct -> Spawn chest at X location, Get the struct, -> Fill the Chest inventory comp data with the data from the struct.
Context: The player selects 3 point after selecting the 3 points the player moves from A to B, B to C by pressing "Enter".
Problem: And I don't want the player to move unless it reach from A to B. However, it moves from B to C instead of A to B if i press Enter basically the location target changes.
I figure it's due to "simple move to location" but I tried using AI move to or move to location/actor but it didn't work. (Maybe it's suppose to work only in AIController not player controller.)
if you want he reach the first target point before moving to the next point, increment the Current Index only if the Distance btw pawn location and current target point location is equal or under for example 100
you can make this logic in the tick function
Hello fellow unreal programmers, and time sweeney followers.....
Do you guys know is there is a blueprint " module " or whtvr to translate the numbers of nowadays to roman numbers ?
Ex.
10 -> X
1 -> I
5 -> V
111 CXI ? well idk if good
Is there ?
But again that will affect my location selection function
I want to first select 3 points then trigger the movement in sequence.
But i might try and see. Can't really say anything u know
Not by default
ok thanks to ensure
The problem seems to be that you are following the added location.
You need to detach these two things.
One event adds a location.
Another event chooses a location to follow from the array and moves to it.
It would most likely include a timer of some sort or some additional code based on the result of AIMove.
For example, after adding the location, call Follow without any inputs. The Follow event itself will have some bool or do once to not retrigger when it is still running. Then When the follow is triggered, it takes the first location from the array and tries to AiMove to it. When it is completed, you do a check if the location was reached (something else could block it before). If not, retry movement. If yes, remove the first locaiton from the array - then open the block and go back to the beginning to check again if there is another point to move to in the array
Drag And Drop Widget UI to Open Door
if anybody would wanna give me hand Iād love it!
what does it mean if a latent node hits the same BP breakpoint twice on that node, like Wait Gameplay Event, it doesn't mean the code path is run second time, all it means is the node event received, right?
Its a bit unclear what you exactly want
Basically, I want to have it so the character picks up some items, they go into their inventory, then they go over to a door and a menu shows up. They drag the items from their inventory into slots on a menu, and if they put the items in the correct slots the door opens.
and with what you are struggling ?
With the way my systems are currently set up, I can pick up the items but I am having a hard time representing them in the menu, and I am also unaware of how I can make the door open from having the items in the correct slots.
hey, quick question. I got alot of different actors with the same interface. All of them have a Bool with the same name that i need to check. How can i do this ?
You need a array in your player, when you pick up a item you add it to the array.
When you reach the door you read out the array and for each item you have you display it in the widget
You make slots in the door, when you drop a item in one of the slots you check what item it is eg key
If the dropped item == the required item you set a bool to true
If all bools are true you open te door
you make a getter function in the interface e.g. GetIsOpen() which returns a bool
then you implement that in the blueprints and return the value from their variable
do you have an example? dont know if i understand that correctly :S
nvm i think i got it
I am still trying the steps u suggested but I feel that AI Move don't work in player controller.
Ok nvm, i dont get it. Im missing something. Can you help me further please :S?
i added another function into my interface "GetCompleted", this function has and input and an output, just to be sure im missing nothing. Now inside the actors with that interface, i build a function "new function" > "getcompleted" put my bool into it > return node. After my bool is set ingame, it calls the "new function". But something doesnt add up, what im missing here :/?
show what you implemented so far
sec
It depends on the implementation of the blueprint node. The async action node hides some things so what youāre probably seeing is the breakpoint hitting for the āallocateā step and then the āactivateā step. Because itās one node but making two function calls to do its work.
There you go
ok, that's not your interface function
in the function list, there's a dropdown, where you should already see IsCompleted, pick that one to implement the actual interface function
the interface part is correct, your implementation in the blueprint is just wrong
Hum, I don't remember which movement node was used for the player, I said Ai Move To just to illustrate
But since it looked like you had the movement logic already working (but to the wrong point) you should be able to use that and only fix the choosing a point part
Your talking about that "override" dropdown?
ooooh damn, never knew about this. lets see if this works, thanks man!
yeah kinda misleading when debugging as i verified there is only one "activate" call, so to have it clear i need to set a breakpoint on the thing that it calls after activation
Right, but thereās also the allocate call. And you may want to add a code breakpoint to that after hitting the blueprint breakpoint once. But itās not super helpful for pure blueprint dev.
I have a data asset with an array of soft references inside. Why are they still showing as hard references in the reference viewer and the size map is still huge?
Alright then, i think i should not use input and instead move the player as soon as the points are detected (initially)
Did you change them from hard to soft after having created the asset?
guys please help, my stepsound doesnt works
You can if you want. The only difference would be where you call the movement to start. Either the red one - after adding a location or the green one - after another input.
The movement code itself checks if it has anything to move to, what starts it isn't relevant
Edit: The first branch should continue from false, I didn't think much on the pseudocode, it is just for illustrating, sorry 
in blueprints, how can I make a function that returns something other than void? (without using output pins, that is)
similar to how you can declare in cpp int32 SomeFunc();
What youāre describing is contradictory. Your example function would have an output pin.
You configure the inputs and outputs to blueprint functions in the details panel while in the functionās graph.
After i activate a CommonActivatableWidget, all of my mouse inputs require me to double click for them to go through. how do i make my mouse behave normally after adding CommonActivatableWidget?
You need to override GetDesiredFocusTarget, you can inspect this in the WidgetReflector and see what happens after you activate your widget
thank you š
I'm working on something that allows the car to go through objects. I made a new object type called PhantomObstacle that the default response is ignore, unless if it's on my floor preset in which it is block so the car and player can still walk on the ground. I was successful in doing this with my player with the capsule collision component, but the car doesn't have a collision component, so I tried the mesh for the car and the wheels, but it doesn't go through the objects. Any idea why?
My guess is the physic asset still having collision, but idk how to change the physic asset to change the collision object type channel
I have this function that isnt blueprint native event, it has no output created but yet it has FReply return
but it returns an FReply
this is why I thought maybe blueprints have a way to replace void with another return value just like cpp has
Need help again, somehow im so confused whats happening. So basicly i got a manager that holds all actors i want to randomly activate, only one each time. But for whatever reason, the string with the actors name never match up with the one who gets activated, sometimes more get activated. am i missing something ?! I tried to play around with the array stuff, i mean get random integer in range, only random like in the picture, or with length. Duno what im not understanding.
Right click the Random node, and ShowExecPins. Hook it up before the interface call.
Pure nodes are reexecuted for every executed node they are hooked up to. So you randomize once for the interface, and again for the print. If you make it non pure with exec pins, it will randomize once.
Hmmm I don't know how/where you use it and what are the mechanics behind it - but this sort of output is used for handling input and deciding what happens with input after this event (bubbling, capturing, focus etc).
It is something separate from standard outputs and the C++ function return type
Does anyone know a good way to get an actors location on a camera or a a scenecapture 2d component? its specifically not the player, but i cant seem to find anything that works correctly
Thank you!
umg widget class but yea i dont understand why it has a return pin when there is none visible in the function itself, cpp is never used
Drag from it and type "event" in search box. You can look through what events can be passed
In a lot of cases you just use Handled/Unhandled
Yeah, I don't know where that return is coming from. If it's your function, all the inputs/outputs should be in that details panel. If you were overriding it, they should still be there and inaccessible. I've never seen that happen before unless you copy/pasted a return node from another function. You might see what happens if you place a return node using the right-click menu.
I would hope that if you connected that up, you'd get a blueprint compile error because that function isn't supposed to return anything.
thing is that its coming from a working function and system, I am trying to convert some stuff into CPP and then I encountered this because its used in other functions, FReply is necessary to get from it, and in the BP code there is Handled returned etc, yet it has no output pin which really made me raise an eyebrow lol
I mean I can add it to the cpp obviously but i was wondering what kind of sorcery is there
literally no outputs
It is not something you return - I mean, it is passed not to your code, but to the engine to decide what if anything to do with the input after this event
I can add a new output pin and it functions as 2nd output pin but as u can see 1st one isnt visible, and function is self-created by developer its not engine function lol

Because in the chain of inputs, if you don't return FReply::Handled() the chain of inputs will continue and won't consume the input, in this case
I think someone messed up the blueprint. That's not what the return node of that function (details panel with no outputs) should look like.
But if you're converting to C++ and you want a function that returns that type, you had it right in your original message (sort of): FEventReply ProcessMouseDown();
and then you write the body that returns one of those structures.
help me pls
change draw debug type to For Duration to see where it linetraces. it should be - 130 not 130 because it needs to shoot down not up
-130Z would shoot down
im newbie i dont understand everything that you showed š„¶
leave start connection same. dont change that. disconnect "End", for End you have to use this in the image. right click and search for Make Vector and Break Vector
that - is minus/subtract
First do some work yourself and determine what is not working - is not not hitting anything? Is the sound not playing even though the execution reaches it?
Draw the trace for duration.
Use a print after each possible branch or add breakpoints to any important nodes
Ok i tried it, its still not working :7
Because random is a pure node. It gets called each time between execution steps.
Activating anomaly is one step.
Printing is a second step.
If you want consistency from a pure random function, you need to save the result in a variable.
so showing execution pins wont change anything at all like he said?
sry if this may sound dumb, but im not into this kind of stuff
I'm not sure since I never used this method, I always make a variable. But if it works in a standard way it should fix the names not matching in editor.
well, still not working, stored it into a variable, called the interface message form it and printed it, also it activates sometimes 2 actors. thats weird
Then the problem is somewhere else, you didn't show much of the code. And yes, I tested it, showing exec pins makes the output static for the current execution. So it won't change between the steps
i cant imagine where the problem could be, its weird. How can more then 1 actors get called if it only picks one š
There could be many possibilities. Some actors start with a different value, you have two of the same triggers working instead of one, a loop count somewhere is off, you handle duplicates incorrectly etc etc
Start form the beginning, use prints and breakpoints to slowly debug step by step what is going on
ok wait, it works, at least the part where it shows its name. Still more then one gets activated sometimes
well all actors are different, no child classes. Every actors are using the same interface. My manager, where im using the random selection, has the actors stored inside through exposing. So there istn a loop call. weird
lol its so weird. Even the prints that are inside the actors print messages from other actors. for example: the light gets triggered > text printed "lights triggered" but in reality the radio is activated. im 100% sure there no error with false placement or same text inside another actor
fuck me and my life.... i got it....1 actors was just rotated the wrong way, so it seemed to trigger 2 actors sometimes...
guys is there any IO utility in 4.27?
like read write to a text file
I'm making an RPG and i have all of my inventory logic in the inventory widget. Is that a bad practice? It works well but i feel like it should be in the player character somehow
ye thats horrible
The widget is only responsible for displaying and widget controls
eg drag and drop
All the inventory logic belongs into a component
as said already, yes.
now if you're singleplayer it will work, which is the important bit (it will completely cease to function in any other context though)
that being said, if this is something for a portfolio, or you're just generally interested in learning Best Practices⢠or learning more scalable design, you should really design UI being a layer on top that subscribes and activates already built elements. Everything should work without that there.
Say for example, without a widget ever existing, you should be able to call AddItem, or whatever via a trigger, a console command, anything. Your UI is just the visual representation of the existing, functional system. Take a main menu for example. You can set sound settings wherever, you can update graphics settings wherever, you can call open level wherever. The UI is just a layer that sits on top to be the visual representation for those existing, functional events.
hi ,Are there any tutorials, videos, or people selling a Minecraft-style auto-pickup inventory system?
I havenāt seen any. Iām making a game similar to Minecraft, but I couldnāt find any videos or sellers offering this type of inventory system.
Its exactly the same as any other inventory system
Just instead of a linetrace to pick up items you add them to your inventory with a collision event
On component begin overlap - add to inventory
You can use this one minus the pickup logic
https://www.youtube.com/watch?v=b2atcZWYi3E
š Learn To Make Games In Unreal Engine In Weeks : https://www.unreal-university.io/?video=b2atcZWYi3E
šGet My Free Unreal Engine Beginner Course : https://unreal-university.io/freecourse?video=b2atcZWYi3E
šModel Assets : https://bit.ly/3SdQKcs
Timestamps:
Intro 0:00
Creating The Inventory Widgets 1:06
Creating The Inventory Bluepr...
i do inevntory but how to select block
I'm stuck here haha.
I want to place and break blocks by selecting them from the inventory, because my current breaking and placing system is independent from the inventory, and I know I will have problems with this later.
Im not sure if i understand correctly what you want to do
Do you want to drag items from your inventory into your hotbar ?
Or do you want to place items / blocks from inventory into the world ?
These need to be widgets then picture 1
In the widget you add logic
If widget gets clicked - get player character - cast to player - Execute drop
In the player
execute drop - do linetrace (start your characters head - end should be 2 - 3k units infront of the head) - spawn actor from class (The block from your inventory)
hmm okey
Hi maybe a silly ask but is there a way i can use the bp graph say on a pawn hook stuff up with placeholder inputs and recieve the resulting c++ for that native or via plugin. Small example would be onplay = the init called from where ever needed then a function containing a timer based loop that printed āhello iv been running for x time y minutes since i last outputā with the logic in bps. Then output that as a c++ called āperiodic nudgeā cpp&h files? Somewhat like a crude wysiwyg code maker i can then rename and refactor internal logic of nodes as needed?
You just need some way of saving what is selected, a variable in the inventory (or the quickbar, depending if they are separate).
When clicking on a slot in inventory, set the variable "SelectedSlot" to this one.
Then inside the logic where you decide what to place where - get the SelectedSlot from the inventory component, check if there is anything valid to place there, and place it if yes.
That is a general concept, not sure which part of it you have a problem with
I want to add given properties of ultra dynamic sky into my custom ui widget specially the weather one ... if possible i want to add and control all the properties as shown in first image.. It would be great if anyone can help with that.. : ) thanks in advance.
For UDS you can simply use Get Actor of Class and just set the variables
I do believe there are some functions for setting weather and time
For changing weather with a ComboBox this is how I would do it, you don't need to do the replace, that is just for aesthetics. AvailableWeatherTypes is an array of UDS Weather Settings
There is probably a more efficient way to do it, but this is easiest if you want to control what weather types the player can choose
opos figured it .. PCG spawned them with the same transform as the grass no wonder š
Thanks a lot for giving some time and showing the exact blueprint .. i'll try it ..actually i'm kinda noob in blueprint trying to learn..
Hi. I am trying to create a save system and came to this issue. I have a savegame ref in the gameinstance and loadinggame from slot in the first level but doesnt populate in the second level. When I call load game from slot in the second level it populates the changes correctly. Im using open level by name node. Is this a comman issue, or does somebody know what is going on here?
If the save file is loaded inside the gameinstance it doesn't matter if the level changes, the save will still be there.
Unless you are expecting the game instance to reset on level load? Which won't happen, because gameinstance is persistent - it exists from the point of launching the game, to the point of closing it.
Hard to tell much more without seeing how and where you save/load
Hi bro.. i did the same a you showed and boom got the option.. but when im pressing on selecting options weather is not changing..
try use these settings
it worked bro... you finally finished my 3 days hustle.... thanks a lot bro
Added a c++ class to unreal engine and chose blueprints when creating the project. I have a month of progress there with blueprints, but wanted to get the GAS System. I already have visual studios 2022 and rider, but whenever I try to load my project now, it says the same mistake "The following modules are missing or built with a different engine version: TheStrings Would you like to rebuild them now?" and if I click yes it says "MyProject2 could not be compiled. Try rebuilding from source manually." I have tried a lot already, and the option "Generate Visual Studio project files" doesn't appear when I click on the .uproject. I have tried everything already and any help can rescue me, thanks in advance
This shows up when there is a compilation error - either due to your code or some dependency missing.
Recompilation generates log files, look for them inside the saved folder (I believe it was there) and look for any errors - I recommend looking from the bottom, there is usually a few insignificant errors at the top related to random stuff. The one that caused the compilation to stop is usually near the end.
the only thing I mostly see is LogWindows: Failed to load 'aqProf.dll' (GetLastError=126)
LogWindows: File 'aqProf.dll' does not exist
LogProfilingDebugging: Loading WinPixEventRuntime.dll for PIX profiling (from ../../../Engine/Binaries/ThirdParty/Windows/WinPixEventRuntime/x64).
LogWindows: Failed to load 'VtuneApi.dll' (GetLastError=126)
LogWindows: File 'VtuneApi.dll' does not exist
LogWindows: Failed to load 'VtuneApi32e.dll' (GetLastError=126)
Is there much reason to do stuff like input in the player controller vs the pawn itself?
I was wanting to make a game where you swap between a top down building phase and an action phase where you control a character
Wasn't sure what might be the best approach for that
A somewhat common pattern is to put all the common input bindings in the controller, since you generally won't change it as often as you change pawns. Things like summoning the pause menu, for instance. Then you can have all the things common to a specific pawn type be handled in the pawn, like the input to jump over a ledge.
However, if you have the same camera controls, and both phases have very similar UI (for instance, if the game is like an RTS) then there's a lot fewer pawn-specific controls - or, rather you're eseentially always controlling one pawn, the disembodied camera commander flying drone thing.
You can do input in both, or in just one or the other - technically you can register input from arbitrary actors too.
That sounds solid. Would I just spawn the player pawn then possess it?
That sounds right to me
Cool Iāll look into that
I guess the top-down Camera would also be a pawn
Unreal has render targets right? I was wanting to sort of āscreenshotā the entire map and then cache it to a texture for use as a minimap
I guess Iāll figure that out later
Which runs first, the level blueprint or the gamemode?
Gamemode initalizes first
Was figuring out how best to do per map settings
i normally do it in the gamemode i never use level blueprint
Smart man
Do you just pull from world settings or do you just hard-code per level
my custom game settings i set in the game instance and then call it from my gamemode
what kinda settings?
Things like wave definitions, spawn points, optional objective spawns
Hey people! Im not quite sure where to post this question. Im trying to prototype something, and im getting on stuck on this issue im having. I want the player to take off when going over the crest of this hill when sliding along the ground. But the chracter just sort of sticks to the ground. Its probably just a dumb setting i'm overlooking. Any ideas?
Those can start as a wider "possibility state" on the world settings, but I tend to migrate (like copy at runtime) stuff like wave definitions into the GameState, and GameMode logic can reference either game state data for things that can change or back to world settings for stuff that doesn't change.
But there's a lot of ways to do things, and "best" depends on the project and your tolerance for abstraction. Singleplayer games can throw a ton on the Game Mode and be done with it.
Hi, Can someone help me with an issue I want the character to face the direction they are running in i get the Direction value in the Animation blueprint ie...-45, -90, 180 etc but when I use Orient Rotation to Movement the character rotates like a tank , I did try to force the actor rotation to the value of Direction ie.. 90, -45 etc but it causes issues, How would i got about doing this please?
Movement Logic.
Its a top down view so If they are running left i want the character to rotate and face left, Not rotate from their previous running angle to left.
I also tested this out on the tick event for testing purpose, But it causes the character to spin around wildly and not have a fixed rotation even though the character is not moving. As you can see the arrow component is directly in front so findlookatrotation to that component surely means she should always be facing in that direction towards the arrow?
Curious if step height would fix that? Lowering it considerably maybe.
It did help, but introduces some other weird kinks! Thank you very much. š Might have to move away from the CharMovement component for this one
Found a note that someone apparently did a "dynamic step height". Where they set the step height based on velocity. I assume on tick, but it isn't mentioned.
I set up a dynamic step height based on my current forward velocity (45/CurrentVelocity) and used a Clamp to make sure the value never went below 5. This ensured that my step height was always at an acceptable level while walking but was low enough at high speeds to get me to fly off jumps.
Tysm!
Per map or per gamemode? Because World Settings exists for a per map settings thing. Unable to create one in BP unfortunately, but it is very easy to do in C++. Just inherit from AWorldSettings and then in your project settings, search for the world settings class and change it to your new custom one.
Hello I notice when I put a break point the game does not stop if the break point is inside an Actor
is there a way I can set to stop inside the actor node ?
Per map, as I want some maps to have different conditions
Yeah, a custom AWorldSettings is what you're lookin' for.
Just a little bit of C++
Is there a modmail for bots and scams?
Oh this has messed with me for a while too thank you
It not having a BP representation in Pick Parent Class is wild
I can imagine once you make the boilerplate in C++ you could also just immediately go to BP
How to Sphere Trace a Spline? Or a BP which makes a SplineMesh?
you could also add custom settings as AssetUserData to the level
smth like this
that way you don't need to extend the world settings class etc.
Since apparently a spline can't be detected in a sphere trace, I'm sphere tracing for a physical material on a spline mesh (BP).
For testing, I'm sphere tracing and printing the "Phys Mat" from Hit Result.
However, it is printing only "DefaultPhysicsMaterial" and not the correct name of the physical material on the object.
Is this a bug?
How do ue5 pro devs go about implementing missions?
rn for me this is what i do: in the lvl blueprint i have event beging play that starts a widget with objectives after like 5 mins. but thats all i have right now. is that what pros do? setup missions in the lvl blueprint
no
Usually some very abstract UObject with parameters and corresponding data.
Doing it through a level blueprint is a bad idea though, since you can't easly share level blueprint code between levels. And triggering events from it is annoying to do.
The basic approach you could start with is to have a separate actor manager that will manage quests. And a structure or UObject representing each quest with the data related to it.
Widgets would just poll this actor to get what they are supposed to display without any logic inside them.
Level blueprints is not a good approach i handle my mission/tasks trough a component added on my player controller.
Look at creating a quest system. This is a system whose only job is to track whats happening in the world based on active quests. It should sit on top of everything else and be almost invisible to other blueprints.
To make something scalable you'll need to understand about actor components, custom uobjects, hierarchy and event dispatchers. (to name a few)
I decided to make a Box Collision(with everything turned off, it's just meant to be the layout of the region) which was meant to be the "zone" where the AI would spawn inside of, I got all of it working, I select the number of AI to spawn, and everything works. The issue I'm having right now is that I don't have any "real" way to select exact spawn locations, right now they're all simply being spawned near the center of the Box collision.
This is fine if I simply add 1 mob per region, I can just make the region tiny but I feel like it defeats a bit the purpose of what I was trying to make. Has anyone tried anything similar before?
Random Point in Bounding Box, then Project Point to Navigation
š«” you might have cooked
think thats what i was missing exactly
Project point to navigation is there to make sure the point you got from the box is on the navmesh - if you use navmesh ofc
I assume there's no realistic way where I can actually set spawn location manually right? I thought about spawning child actor components (based on how many mobs i was gonna spawn) inside the box collision, but unfortunately you can't move components around inside a parent component/actor
I'm not sure I understand what you are attempting to do. You can make the box an actor and add more components to the actor
If you want to specify locations for this instance of the actor - I would make it a vector array inside the actor. Check the instance editible, show 3d widget boxes. And in the level you can add vectors to the array and position them. The on begin play do whatever you want with them - spawn a spawner or use for anything erlse - keep in mind they will be relative locations to the root.
So ideally this is the workflow I wanted / tried to replicate:
- Region Spawner (Box collision, draw a region / area of my map / select mob types to spawn inside / choose how many monsters to spawn inside)
- After choosing how many monsters I wanted to spawn, the editor would spawn child components (example, 1 box collision per monster) which would allow me to reposition them inside the parent Box collision to set those as the monster spawn location.
Issue is you can't really edit the location of child components so this isn't really possible, i'm just wondering if there's another way to do things or i'll just have to settle with randomized spawn points
Seems like the box is unnecessary since you want to position spawners individually anyway
Well, the box was just a simpler workflow so i didn't have to set everything up for each individual mob but yea
Well you can use the method I provided for it. Use a vector array. In construct script set the size of the array to the number of spawners you want and/or randmize their location
You can move the points in the array with gizmos
But hm, the construct is nto a good idea for this xd
Because the construct is run with each change to the actor, so if you want to position them manually it would reset everything after you move a single point
it only resets if u move the parent no?
You would need to manualy add the the entires into the array in the details
No, any change to the actor in editor will run it
oh damn
This is why you sometimes get lags when working on an actor with heavy construciton script
Because the editor reruns it over and over
well guess I'll just settle with random spawn + doing single spawns if i want them in specific spots
Should be fine just more work but its all good
I have been working on some own stuff and i set up patrol routes using target points and the behaviour tree etc, i could set it so that actors move to a specified location on spawn. Something to think about it you want to try EQS, Behaviour trees etc.
Oh I found a workaround. Instead of using the construction, make it a function with "run in editor" checked. Then you can reset the number of locations based on some other variable you set on this specific instance of the actor.
Still manual but at least only one click.
Run in Editor is a cool option. Another one is to create an editor utility widget. You have a lot more control when using these but can take longer to setup.
uhhh got a problem with the camera shake
so when I posses other pawns the camera shake is still active on the possesed pawn when it should only be for the one I tell it too
now I think it's because the camera manager is for all the cameras in the level, how do I switch this to only affect one pawn?
The camera manager is specific to a player controller and any camera shakes would be applied to any camera the player is useing to view the world. There is a stop all instances of camera shake you could call when you possess a new pawn.
ah thanks
One of the great advantages of Packed Level Blueprints is that you can make updates and have the changes immediately propagate to any existing actors based on it.
Does anyone know how to accomplish the same thing with Blueprint Actors?
ie I have dozens of existing Blueprint Actors in my level .
I want to be able to make a property change just once in the actual Blueprint and have the change reflected in all my actors in my Level without having to drag a new instance of the Actor Blueprint to the Level.
If you haven't changed any of the properties on a placed actor, it will already do this. Default values will update to the new default value when changed in the main BP.
Hello, I'm trying to implement an alternative AI car overtaking logic since I haven't succeeded with machine learning. So, I'm trying another approach using a behavior tree to ensure that vehicles only overtake within designated overtaking zones defined by collision boxes. Overtaking can be done on the left or right by applying an offset to the path's spline (for example, -200/200 in Y).
Do you think this could work?
Regards
Well it certainly is an interesting approach. Try it and see what happens
there's a paper out there by Valve about the AI movement in left 4 dead (2?), where they use an interesting, well-optimised system to get a coarse path for the AI agents to follow, but then the agents have collision boxes that allow them to avoid walls or each other, so the coarse path is realised as a fine detailed path with smart collision avoidance.
you might find that you want your AI cars to follow the splines for the most part, but use a basic avoidance technique to keep away from the player car
so instead of having collision boxes where the AI is allowed to start and end an overtake, you'd have an avoidance shape that the AI tries to stay out of. the shape of that avoidance shape might be a diamond or hexagon that the player's car fits comfortably inside, with extra distance in front and behind
if the AI starts to enter the avoidance shape, then you apply correction to change its direction and/or speed
just spitballing here. I'm not sure what actual driving/racing games do. modern stuff is sometimes using neural networks, but not always - Gran Turismo 7 only supports neural network drivers on certain tracks that the neural net has been trained on. I don't know how the more naĆÆve drivers work
<@&213101288538374145>
If i need to send data from the actor component to the player character, do i need to use an interface?
You can.
You can also GetOwner -> Cast if you want to, but if the component can be on different classes this will be problematic.
My standard solution it to have dispatchers on everything that the component needs to communicate. Then the actor binds these dispatchers to events on itself in BeginPlay, or when the component is added. It is slightly more work than just casting, but it is cleaner than interfaces IMO.
Aren't event dispatchers only meant to be used when you have a one to many message or something like that?
I mean they work better in one to many scenarios than interfaces but there is nothing stopping you from having only one actor subscribed to it
yo there was a eject button in 4.27 but i cant find it in 5
wtf happened to it even
Got it, thanks
It terms of overhead it will be probably close enough to an interface.
The thing about using dispatchers for one to many is about not using interfaces in such case, not the other way around. Because to call an interface on 100 actors you need to iterate through them in a loop and also hold references to them somewhere. Looping adds overhead (not big with smaller loops) and managing an array of references is bothersome.
But for one to one it doesn't matter that much which one you choose, it it more about preference I think.
With interfaces you have to manage a separate blueprint with the interface and remember to implement it.
With dispatchers you need to bind the dispatcher and make a corresponding event on the actor. And at least one side has to have a hard ref to the other, so they know the signatures
I rarely use interfaces to be honest. Interfaces are more for when you have different classes that don't share a common parent but they need to have/implement the same set of functions.
Interfaces can have their uses when making plugin as well but personally, I would use them as a last resort.
I lean towards actor components, custom uobjects, class hierarchy and function only parents. This way I can cast away and utilize event dispatchers without worrying to much about hard refs.
Does anyone know how I can end a smart object behavior but still keep the occupied slot as claimed/occupied? I know it gets released by default when calling end behavior
Was there a function or something to get projectile component drop based on distance and travel speed? I could have swore there was.
I'm working on a project where you create vehicles in an editor and then you fight with them. I'm trying to figure out what the better way is to go about attaching weapons. There may be many weapons per vehicle. The two options in consideration are:
- Creating weapon actors that are attached to the vehicle actor in the editor. The group of actors is then saved as the built vehicle and when the player enters a game the weapons are loaded in their corresponding positions attached to the vehicle actor.
- ā Allows scripts on the weapon child classes that run per weapon and dont need to be generalized in the vehicle class (better modularity and maintainability and allows for outlier functionality)
- ā Each weapon can have its own sockets that can be referenced easily
- ā Each weapon needs to be transformed by UE when the parent actor (vehicle moves) and each weapon has its own mesh instance, creating more overhead especially with multiple vehicles in multiplayer.
- The vehicle and weapon meshes are combined once the vehicle is saved and one actor uses this mesh.
- ā More performant when a large number of weapons is attached or many vehicles are close by
- ā Easier to represent in the save file for the vehicle
- ā Sockets belong to one mesh and would have to be indexed with some scheme which makes the project less modular and maintainable
- ā All weapon functionality needs to be handeled by the vehicle actor
I'm looking for some advice on how this might be tackled in a commercial multiplayer game / if there is an outright better method or if its just a design choice based on if you value performance or modularity more. There is probably also a better method than the two I've described above or an approach between the two that combines the best of both worlds so any advice in that regard would be appreciated.
^ As some extra context, the main logic for the weapon firing is curretly handeled by an actor component on the vehicle anyway but the weapon actors in option 1) could have individual logic that also executes when the weapon actor component fires it and it would alow for some nice visuals where the weaponns rotate towards the target for example
this code runs fine on the host of the server but not the clients
it doesnt run as listen server tho, it runs as "client", which is supposed to start a dedicated server
so why does the code only work for the person who made the dedicated server. for all others, it prints false under the starting code
If you ever asking about performance, itās usually irrelevant which method performs better if each method would fit well into your performance budget. If they both fit well into the budget, then just do what makes life easier.
On what scale are these vehicles used?
Is there supposed to be hundreds of them? With tons if parts each? In some open world map thatās also demanding on performance, Maybe there could be a performance concern then?
Is each player supposed to just have one vehicle? Itās a 1v1 kinda game? A .01 fps gain doesnāt matter then, just do what is easiest first you in the future.
There would probably be a maximum of 24 players, def no more than 50 and each has one vehicle. Each vehicle could have up to 20 total weapons attached to it. So at most the upper limit there would be 50 player pawns and 1000 attached actors (usually much lower). I'm not sure whether that is a number that would be easy for UE to handle. Also I am keeping in mind that in the future there might be a want for weapon attachments so the number of attachmed actors could scale higher in that case.
The 24 player limit would be the maximum for the standard team vs team mode in a limited area and the 50 players would be for a potential extraction type mode in a more open map.
hello help please
if client 1 starts the dedicated server using advanced sessions, code will work smooth for client 1. if client 2 starts it, code works for client 2.
Um, how are you creating the widgets? Are you creating them on client side for each player?
yes
need help. i made a custom game state using the template as "GameState", it is for a multiplayer game. but now, my character cannot move or anything. why?
Unsure but I think you might be thinking of the Predict Projectile Path functions?
Maybe
I just need the angle based on distance and speed, than anything else.
I'm trying to make an equivalent to genji dash from Overwatch or Black Panther dash from Marvel Rivals. What I've tried so far is lerping the player's position using a timeline and Set Actor Location, but's pretty janky and sometimes just fails. Is there a better method to do this that's also multiplayer compatible?
Disable some of the correction settings on the CMC temporarily during the dash and put them back after.
Could even disable the CMC entirely for this since you're setting location directly.
Using this?
Sounds like you have a large but manageable scope. It may be a good idea to think about the performance of the player characters so it doesn't get out of hand tho.
You may not need to go as far as making a combined skeletal mesh in order to keep the characters lighter. Even just making each weapon a component on the actor would be fine. Components are a bit lighter then full actors in a few different ways. Just make sure tick is disabled on each component.
The issue that I'm running into is seemingly randomly, the position lerping won't make it to the end position, it'll fail midway through the timeline and the finished pin doesn't execute, so I'm left both not at the correct end destination and stuck not moving
can't figure out what causes it to fail
hello i want to use DDCvar.MMDatabaseLOD this console command in animation blueprint but it was not showing any results and after writing in the console command it was there also not showing any presence of it and yaa i want to use it for motion matching any one know about this
Hey, does anybody know how to break or stop loop of flickering light, I am using retrievable delay node in this in bp and with construction script too
You mean Retriggerable Delay? You need to add something that can stop the exec path that leads to the delay. Like a Branch and a Boolean you can set.
Cleaner overall would be using a Timer via SetTimerByEvent and using the returned TimerHandle to stop the Timer.
Ive set up this basic zipline thing with a spline, but it kinda sucks rn, how would I make it so that wherever you are you would connect to the nearest point? like currently if you try to use it half way you get teleported to the start, its using a timeline and I have no idea how to get the right time based on a position (especially if it curves) https://gyazo.com/dd35c2df4c615a47facee04cd36548f0
I hate to ask for help all the time, but how do i control another Player character and keep the current camera active? Basicly my Player should control a remote car, which is the other Player character and should look at it. Is there some kind of tutorial for that i didnt find?
If you aren't wanting to posses the other actor (or if its not a pawn), you can enable inputs on it instead. You specify the player controller it should receive inputs from. Just make sure you disable inputs when you've done.
Thats what im currently trying. But it wont recieve any Inputs
Show how you're enabling the inputs. Also do you get any error messages?
How do you set the ref for the ToyTankRef in your player character? (also theres no need to cast as the ref type is already of the toy car)
Level blueprint
Show the setup.
Sec im on the balcony Smoking. Basicly " at begin play, cast to this and Set ref, and cast to the other and Set ref" also i selected the characters inside the viewport, added them into the Level blueprint via rightclick
there
i also played around with player index and input priority, but that didnt seem to work as intended
Those casts aren't needed which is why they have the blue node. Casts are just a type check.
'Is this object actually this type of object?' If true, it returns and updated ref type.
Anywya, does the enable input ever get called? You can either add a print string or use break points to confirm.
well it disables my controls for the main character, thats for sure. but the tank wont recieve any input
Ok, it looks like its set to auto possess with player 1. Try clearing this on the car. It might be giving it a controller that might prevent it from receiving inputs from another controller
tried that already. i assume if i deactive it, i have no choice but to possess the car right ?
possessing works, but then it will get its own camera, thats not what i want
It could be that it's a pawn so has to be possessed. Another option is to set the view target to the character after possessing the car. This should get it to use the camera in the character again.
What's the recommended way to attribute stats to different AI types? I was doing 1 Data Asset for each AI which is then loaded on begin play of each AI Character BP, not sure if that's the best way to do it
Also need a way to keep both things binded together so I can somehow load them together in my spawn manager
I would go with data assets if its the default stats for the AI. You can use soft references for the data assets and load them as needed.
hi im trying to train doing mutplayer systems...
Im doing a trace & destroy on any actor that my actor sees
I also made a new empty small test level so that I can completelly focus & laern from zero on how to do multiplayer & then maybe implement it into my main project.
this is how im doingit
but the walls are still there...
so as you can see, on the left window I destroyed the walls
Is this Fucniton Right?, I just used the Branch in Flicker Start Event coz it didn't stop running and in loop
And how to make the point light as it removes the circle in the wall while its turn on or will i add the light material

What confuses me is that in my spawn manager I pick the enemy I want to spawn by selecting the soft class (IE: BP_SkeletonArcher), but since I can spawn multiple mobs it's an array of soft classes but I need to somehow bind a variable to that array as well so the right DAs are binded to the right soft class
I'm not sure what you mean.
Hi does anyone know how I would use this pool for widgets please? I am creating a bunch of UMG Widgets to store for repeated use but then how do i use these in the enemy as the Widget Component expects a class and not an actual Widget Object I am dynamically passing the textual values to display when I retrieve a Widget from the pool
Pool retrieval function
There's a function called 'Set Widget' which you can call on a widget component to directly set the widget that should be used.
Also, for the widget pooling, instead of having a variable on the widget itself, it might be better to have two arrays. One for available widgets and one for those in use. When you use one, you claim it which moves it to the in use array and when done, you release it which moves it back into the available array. This would allow the pool system to work more easily with different widgets in the future if needed. (just a suggestion)
@dark drum Thanks I found that! abd thats a good idea! thank you !
So for example, this is an AI Spawner I created, I select number of mobs to spawn + soft class (can insert multiple) + radius (this is for turning AI OFF/ON by checking distance to players)
Then I iterate the soft class array (in case I insert more than 1 type of Mob/AI). However, when spawning actor it also asks me for the DA (Stats Definition) and I'm not sure how I can make sure to get the right data asset for whatever soft class is being iterated
I would just put the class ref in the data asset. When specifying the enemy, you'd specify the data asset. This is what would contain the relevant data required.
What code do I need to do to get an external camera or actor to point at another actor (without them being attached)?
find look at rotation
ok so I figured it out myself, this is the best I cant get
works perfectly for all these straight ones, but the big curved one completely breaks, I try to attach at half way and it teleports to the end, or just straight up throws me out the map, I have no idea whats going on
anyone know anything about ziplines that can be grabbed at any point along it? thats literally all I need
Is there a node in the Anime Blueprint (Anim Graph) for creating blending conditions? For example, Blend Anim Node A with B if... otherwise Anim Node A is the output
<@&213101288538374145>
Sorry I didn't have the channel, dk why .. but thanks !
ah yeah big servers seem to have channels hidden by default now and you have to manually choose which you want
seems to just be down to the length alone, if I extend one of the straight ones long enough it causes the same issues
oh god, its an actual engine bug?? https://forums.unrealengine.com/t/bug-steps-splinelocation-along-distance-is-inaccurate/348986
Reproduce Step : Make an actor with spline. Put it to 0,0,0 in the world. Duplicate spline point 0 in X-axis. Now you have 2 points. 0 and 1 with the same X-axis with an undefined length. Setup a loop function to print out values at each interval distance ( i use 100 ) The location seems to be somewhere near 100 but not 100. I assume thi...
Trying to set up a start/stop timer bp be like
jesus, is this really that complex?? how many games must have already done this? and yet I cant get anywhere
I know of 90s games that have done this, its basically the same as the railgrind you see in skating games isnt it
it is indeed. i have done it 3 different ways (only one has worked) but it just won't seem to work for what im needing š¤Æ
Hi
i use that node to attack an actor to a socket
but i don't find how to detach the actor??
i tryied like that but doesn't work
ha i found: it was detach from actor
I have found a bug/problem in the UE5 Default VR template. Whenever you're in a server with players, and you open your 3d widget menu (came with the template), the UI doesn't work when you click on it and it repeats "on hovered mouse events" more than usual (i have put sound in the button to see the bug better). I have not modified the template, has anybody expierenced this? I use this menu system in my personal VR game, and still have this bug. Does anybody have a fix for it? I have attached a video of this bug in action.
i'm thinking follow cam is the local camera on each client ?
send the start and end through the multicast
or
make the walls replicated, spawned on server
and remove them on the server
i think i would do it that way
wrather then trace on all clients
just remove on server
and have it replicate
Hmmm, I have a question about ISM and their collision detection.
My setup looks like this:
- Character has a Bulding Component. This building component works on Furniture that is picked up, tracing forward with Visibility channel and positioning the selected furniture.
- Furniture is built form a bunch of Static Meshes usually. For example my Table Actor consists of 4 chairs and a table
Now, it works great. But then I wanted to add a Crate Stack. A single actor, representing a stack of crates that will contain ~20 of them. Using ISM seemed like the best idea, since there will be 0-20 identical meshes in one place.
But this caused my building trace to freak out. When picking up the CrateStack, the furniture doesn't move along the floor, but zooms right towards the camera, flickering wildly.
It looks like the ISM is blocking the Visibility trace, even though the Ignore Self is set to true on the Building Component's trace.
Collisions are exactly the same between the ISM and the table and chairs on other Furniture actors - but the problem doesn't happen with the other ones, only with the ISM.
I could disable the visibility block on the ISM, but I'm using this channel to also add a border around a mesh that the player can interact with. Using another, separate channel for building and for border is a possibility but I wonder if I could avoid it.
Are the ISM instances just handled differently by the engine that they don't count as "self" in the traces while being a part of the same actor?
Not 100% sure what part you are referring to with "self". "Self" is usually equivalent to "this" in C++ and would point to the instance that uses the keyword at that very moment.
The Trace of your Building Component specifying IgnoreSelf isn't really relevant to the mesh component you are tracing, unless I misunderstood the way your system is set up. If you want to ignore the actor you are moving, you would need to actively pass that actor into the IgnoredActors array. "Self" just refers to whatever has the Trace node in it I would assume.
Are you sure that VR template supports Multiplayer?
This sounds like the Menu is spawning more than once on the server. Which hints at them spawning it loosely on BeginPlay. Which further means it's not coded for multiplayer to begin with.
I should have tested it without assuming it operated as I though it did inside components. After disabling the IgnoreSelf nothing changes. So yeah, I'll retrace what is happening in the component again since it is a store one, maybe there is a check somewhere that ignores meshes only or smth
Possible. Again, if your idea was to ignore the Actor you are tracing, you would want to pass it into the IgnoreActors array of the Trace node after tracing it the first time.
I see it groups all of the meshes and changes two things about them when picking up - changing the collision with the pawn and changing the material to a transparent one. Does a transparent material make it so the visibility trace is never blocked?
I don't see any other changes to the meshes
Maaaan it will be a pain to include ISM in this code 
Or... I will hide the ISM when the furniture is picked up. Hm.
I don't think it supports Multiplayer but what I wanna do, for my use case is that I want the player to open the menu client-side only. I just don't understand how the bug affects other players in a Session. Maybe the menu detects multiple widget interaction references? I really don't know.
I'm encountering a very strange issue with my 3rd person character Camera Boom Socket Offset. Initially it is set to an offset of 104.820643, to align it to the default position for combat gameplay. I have a system to shift the camera boom socket offset when combat is not active, but when the socket is being updated, it glitches and refuses to stay at it's new offset, snapping back to the default socket offset. It's jittering during the move, like it's encountering collision, but none of the character components have camera collision activated, and there's nothing in the level that could be causing the collision. I've checked and the camera boom is not being updated anywhere else in the character while this is happening. Happens with DoCollisionTest and UsePawnControlRotation both on and off
Try using an finterp instead of lerp.
@harsh nebula Checking that now, how functionally would that differ from the lerp?
need major help with multiplayer
it requires dms
if anyone is good with this please dm me
@harsh nebula are you an expert that could potentially hghelp
its fairly simple, im js dumb and dont have any odea hwat to do
Finterp interpolates over time and gives a much smoother result, so you'll need to grab delta seconds or similar node as Finterp needs that to change over time.. Lerp doesn't have a time based component so it's a more harsh transition, if you could even call it that lol.
Multiplayer is not my thing sorry.
@harsh nebula Lol, turns out the CameraBoomSocketOffset can't be updated at runtime, at least not via BP. Just straight up moving the CameraBoom relative location actually works fine with the lerp š¤Ŗ
I'd still use finterp though, much better control of some variables.
The FInterp gave the same problem
I'll look into it, is it just delta time/interp speed = seconds to get world seconds of the tranisition?
I forget, but it is something like that.
Cool, I'll test something with that. Thanks!
The game has two player roles: frontliners and trackers.
Each player has a PlayerState containing a suspicion map, with keys of all other player states attached to a bool tracking which other players they find suspicious, true = sus.
The suspicion system works like this:
When a player opens the accusation UI widget, it dynamically lists all other players (not themselves).
Each entry has a toggle button to increase or decrease suspicion toward that player.
The suspicion data is stored in a TMap<APlayerState, bool>* (or similar) inside each PlayerState.
The Problem
For some reason, unless the player is the host, the map doesn't sync basically.
When a player reopens the UI, the suspicion toggles reset because the map isnāt stored or replicated correctly. (it does work for the host, the logic is supposed to get the owning player of widget, cast to the player state, get the map, check if the corresponding OTHER player is suspicious according to the owner, if so, the button will toggle on, if not, then toggle off.) for clients this doesnt work. it always defaults to off.
with the help of print strings, i find that the ui blueprint cannot FIND the other player target inside the map, it returns false
The system only works when the host (listen server) is the frontliner.
When clients are frontliners:
Their toggles reset every time the widget opens.
The UI canāt find values in the suspicion map (returns ānot foundā or false).
The suspicion map logic fails to update properly across the network.
Details / Current Setup
The suspicion map is stored in BP_PlayerState.
Each entry widget in the UI references a target playerās PlayerState, but not the ownerās.
When the suspicion buttons are pressed:
It gets the owning playerās PlayerState.
Casts to the custom BP_PlayerState.
Attempts to add or update a value in the suspicion map for the target player.
On reopening the widget, the UI rebuilds from the PlayerStateās suspicion map, but it always returns default or empty values.
The suspicion count variable (a replicated int) also doesnāt show the right values for clients.
Networking Context
Currently tested using āOpen Level by Nameā with ālistenā as the options ā Listen Server setup.
On listen servers, the hostās version of suspicion works.
On clients, suspicion states reset and maps donāt sync.
You canāt replicate maps directly, so a different structure or system is needed.
This is my issue
Can anyone plz help
Able to potentially pay if you can fully fix the issue quickly maybe
Visibility has nothing to do with the actual trace channel. They are purely names to give some meaning.
Again, pretty sure they use BeginPlay to spawn the Widget or the Actor that has the Widget. So every player that spawns causes another copy to spawn.
Your issue is what your text says at the end. TMaps don't support replication. Change the setup to use an Array instead.
Also #multiplayer is a thing
How do I make an array that is like a map?
Since I need it to store both a player state and one bool corresponding to that player state
By making a struct that has both properties and using that for the array. Just loop the array to find the right entry. You won't have even remotely enough players that this loop would end up being expensive
Or put the bool into the PlayerState to begin with
Ohhhh ok
i got a small question, why isn't my event called.
i checked the input, and the varraible is the good one for the BP where i do this
???????????????
It is luck of the draw with some problems. It's totally dependent if someone who knows your problem well can, will or has time to help. Unfortunately there's no guarantees.
Best thing to do is ask once every 4 or 5 hours or so depending on how buried you initial question becomes.
I guess so, but this always seems to be the way every time, I just dont know what to do whenever I get stuck with anything because this is just all there is
Hey all, not sure if anyone has experience with PCG or PCGex but hoping someone can point me in the right direction. I have a PCG creating a floor layout and it seems the bounds or something with the asset spawning is messed up. When I spawn the asset it extends it way up and down and the bounding box (shown in pink) is also too large but if I manually adjust it with modify bounds the mesh still extends all the way.
There is the Unreal Engine discord server, but same problem. But it does have a help forum where your question won't get lost so quickly.
Ask in #pcg-framework this channel is for blueprints.
awesome thank you
No worries. Adrien Logut one of the Epic devs for PCG often visits that channel.
got a small question, why isn't my event called.
i checked the input, and the varriable is the good one for the BP where i do this
Thanks
Assuming your player character is calling the Interface, then all you need to do is make sure that "Parent Ground Unit Ref" Blueprint has the Interface added and that the event that you're firing is also in the event graph of "Parent Ground Unit Ref". The interface doesn't need to be added to your player character.
When you call an interface like in your screenshot the Target will be the blueprint where the event will fire.
Either an issue with your input mappings or you never set the ground unit ref.
it has, that's why i'm asking help, this a RTS unit
how do you do that ?
You can drag a set node in for the var.
Yea, set it to the unit it should be referencing. (The instance the event should be called on)
like this ?
That would set the ref to whatever it's already referencing. (Most likely null in this case)
You need to get a reference to the instance of the unit and store it in the var.
how do i get that
That can depend. With you mentioning it's an RTS I'd imagine you have a separate event that triggers from a mouse click to select a unit. This event would do a line trace into the world (under the cursor) and would return the actor it hits. You can then store this ref in your var ready to use.
There are other methods but this seems most applicable.
okay, i will see how to do this, since i don't use a linetrace because there are some ither technics that i found simpler
That actually wasn't the case as you can see here. This is a log when I was repeatedly opening and closing the menu. It only spawned one menu, but Set Widget Interaction References are double and Closed Menu is called a bunch of times due to the animation it plays when you close the menu.
I tried making a new menu system from this youtube video. https://www.youtube.com/watch?v=x9fKx7hjq9g I am still experiencing this bug even with the new system.
Here is the ONLY WIDGET TUTORIAL You WIll Need For Your Experience!
Please, leave a like and a comment under this one, since I am giving out premium material here for free)
Got Questions? Join Discord Community!
āŗ Patreon: https://www....
Original video of my bug here, I have pinpointed the probable cause though, it is the widget component which is used to interact with the 3d widget. Has anyone has gotten a fix for this, any VR Developers?
So Im having a weird issue, my key press input is registering on one blueprint but not another where the setup is exactly the same. I set a break point on the input and it never activates. Anyone have any ideas?
nvm fixed it
forgot to set "auto receive input"
Android full touch screen is not working on android devices
only working lower screen area
swipe up and down function is working full screen of android but switchland or CheckXTouch is working only left corner area.
Hm, maybe there is something going on with the WidgetInteractionComponent.
Have you double checked it's not the device? Just in case you are hunting ghosts.
I fixed it as you suggested, by adding the picked up Furniture actor itself to the ignore list on traces.
But I'm still confused why it happened - it worked with standard meshes but not with ISM, all of them with the same BlockAllDynamic preset. Even though the only things the component is doing with static meshes is changing the material and the response to Pawn channel.
The only other collision related thing is Setting Actor Enable Collision to true/false on the Furniture actor.
So I dunno. Fixed but still weird.
Huh. After some more tests - seems like SetActorEnableCollision affects normal SM Components inside the actor but not the ISM. This seems to be the root of the problem.
Interesting to know. But yea, some systems have weird quirks to them. š For some issues you have to dig deep to really know whats happening. As a guess, I'd say the collision checks for the instance meshes are probably handled at a different point in the code and they never included a check for the actors collision.
It might be worth submitting a bug report if you can repeat it.
Hi, im trying to create a slot system for my saving and loading system
So for example these are my save-variables
and im trying to convert this structure into a slot....
so i wanna put these variables into a slot structure/array or something like that... But apparently I cant
Array.String : GayFileNames
What is bro programming
Happy file names...
Talk brother, talk
Structures can be used in save games. But every light blue pin won't work - since they are usually references to actors in level, that won't be the same after the game restart
Personally, I wouldn't put all your saved data into a single SGO.
When saving/loading data, you can use folders by using a / in the slot name. This can allow you to have different SGO and have them saved into a specific folder for the current save. (Game 1, Game 2 etc...)
LogBlueprint: Warning: Struct 'UserDefinedStruct /Game/Str_Slots.Str_Slots' Property 'Slots_3_2DDE95B440B4B29FF076E09F7657F36F' Error ( Recursion: Recursion: Struct cannot have itself or a nested struct member referencing itself as a member variable. Struct 'UserDefinedStruct /Game/FirstPerson/Blueprints/save-load-system/Str_Gave_Save.Str_Gave_Save', recursive parent 'UserDefinedStruct /Game/FirstPerson/Blueprints/save-load-system/Str_Gave_Save.Str_Gave_Save' )
Holy
I got this error by trying to convert it..
Recursion: Struct cannot have itself or a nested struct member referencing itself as a member variable.
It pretty much tells you the issue.
Did you put the struct you just created as a variable in there?
As an FYI, you don't need to even make a structure for save game stuff. Just add the variables to the SGO and set them directly.
hm... but each game should have its own SGO, right?
if (b=true)
b = true
else
b=false
hmmm.. yes I tried to do that
now that I think about it, it sounds very wrong
You try to complete a struct, but it cant, because you have a struct in there that can only be completed, when you complete the first struct
No, unless youre making a very small game, putting everything in a single SGO is a bad idea.
You can have 100 SGO's saved in a folder 'Game01' and then another 100 SGO's saved in another folder 'Game02'. When ever you go to save/load, you just prefix the active game slot. (Game01/Game02) This way it'll search the relevant folder for the SGO needed.
Grandfather paradox 
Is there a tutorial on this or something? I don't know how to do that... Sounds like im going to be using blueprint a lot to create folders or navigate folders etc... To keep it simple this is how many slots I've created so far... I've only created 4....
Setting up saving/loading can be a lengthy process and vary wildly depending on the game. I've not come across any tutorials specifically that cover using folders in the slot names but I do sort of go over it a little in the saving section of my inventory tutorial. (4 parts) Pt11 of the series might give you some ideas though.
Welcome to this tutorial on how to create an inventory system in Unreal Engine 5! In this video, we'll go over the concepts of setting up an inventory system using Unreal Engine's powerful Blueprint visual scripting language.
In part eleven, we continue setting up the required logic for saving our item data. So whether you're a beginner to Unre...
So I'm having an issue, I have aborts both when "TargetActor" is set in the right side of the BT, however, even though my perception is updating the targetactor and "setting" it, the Wait task still goes through before the AI targets me
I have a feeling your issue is down to that 'Is Set' and 'Is Not Set' isn't the same as Is Valid or True/False. Is set refers to if a value was set for the property on the BB. For example, setting a bool to false would return true when checking if the property was set.
Shouldn't be because it's set as None from the get go, that should be treated as "is not set" no?
I'm not sure how it works specifically for default values. Let me check the source. I would assume 'is not set' would be true if its the default value.
Is there another way to get the particle position more efficient? At 500 particles the FPS drops
Seems like it is working correctly but Perception seems to be significantly delayed and is only working properly once the "Wait" ends for some reason
Wait I figured out the issue, I added a Tick Interval of 0.1s to AIPerception component, while also having 100 AI next to each other for stress testing so it's updating the target perception for those 100 AI ebfore it reaches my "turn"
which explains the second/2 second delay before targetting me
I mean... My save/load Im planning on making is gonna has 4 slots. Shouldn't 4 save games be enough?
He is talking about different save files for different data.
For example you would make a Player SaveGame object and put all of the player data there. And save it in slot1/player
Level data could have another SaveGame Object and be saved in slot1/level
In bigger games it makes sense to fragment the data so for example you don't need to save level data when you only want to save changes to the player
Glad you figured it out.
Adding to this, there's the data size in general. For larger games it's not practical to load all saved data when you only care about a small fraction of it.
Just a shame that it seems like it cant be fixed through blueprints since I can't change the affiliation through blueprints as far as I know so the whole target neutral/enemy/friendly only works if done through c++
I'll look into changing it with c++ tho
Does anyone know how I can get the Anim BP to not override rotation using GASP? I'm trying to attach the character to a component but it's not rotating at all. I've been trying to fix it for hours with no lead
This is my attach code, and what I've tried most recently in the anim bp to stop rotation
I'm trying to make an equivalent to genji dash from Overwatch or Black Panther dash from Marvel Rivals. What I've tried so far is lerping the player's position using a timeline and Set Actor Location, but's pretty janky and sometimes just fails. Is there a better method to do this that's also multiplayer compatible?
The issue that I'm running into is seemingly randomly, the position lerping won't make it to the end position, it'll fail midway through the timeline and the finished pin doesn't execute, so I'm left both not at the correct end destination and stuck not moving
Hello everyone, I need some help with an Unreal Engine 5 Blueprint issue.
I already have a fully functional light switch logic inside my BP_LightSwitch Actor. The core logic for toggling the lights is driven by a Custom Event named "Event BP_Interaction".
My current problem:
I need to correctly wire the logic so that the player can call this "Event BP_Interaction" ONLY when the following two conditions are met:
The player is overlapping (inside) a Collision Box near the switch.
The player presses the E Key (Input).
Could someone please share a screenshot of the correct Blueprint nodes that connect the Overlap Events (Begin/End) with a Boolean variable and the E Key Input to trigger my Custom Event?
On the player character blueprint, you can use the on overlap event of the capsule component, take the reference to the actor that got overlapped and save it as a variable called "Overlapped Actor" or something. Then on end overlap make sure to clear the variable. Finally, when the player presses E, all you have to do is check if Overlapped Actor has a stored actor in it, then check if it has the interaction interface, and if it does, call the interaction event
hey i just noticed when im using the editor my "widows taskbas" is still visible
is that a settings in editor or in windows anyone know :/ ?=
Shift+F11 makes you go fullscreen if thats what you mean
ah thansk
If you change the location to Keep World on the DetachFromActor, will it still disappear?
Yo thank you do much
Love š
@crimson briar Can you also please explain the error at "add impulse"?
it says what it is - the reference you are using for the impulse is not set.
But since the impulse is not connected I'm not sure what was the code with the impulse before. Do a valid check with a print on nto valid before the impulse to see at which point the error happens
Why is one HeldBy marked as replicated and the other is not? Did you somehow get two variables named the same? But how.
Yeahhh i didn't notice
Now the error is gone
But I'm sure I didn't add the other heldby variable
I'm dumbbb
@crimson briar one more thing
When i play as client I'm not able to pickup or drop the object
I can't tell at a glance, I would need to experiment with the code, I'm not that good with replication.
In my project I had some problems making attachments work. I ended up using a repnotify variable for the attached actor then changing attachment, collisions and physics locally OnRep
Okay, thanks for the help I really appreciate it
I just downloaded unreal engine a week ago to build a multi-player fun game
But this is not easy. I don't even know what I'm doing lol
I definitely wouldn't recommend making your first project a multiplayer one. Replication doubles (at least) the complexity of the designs
Just my opinion though, looks like you got a decent enough understanding if this is only after a week so maybe you'll be able to handle it with some more experience
But usually in a situation like this you start debugging step by step. First check if the interaction event is reached. Then check if the event on the server is triggered. Then if the correct branches are reached. Etc etc.
You do it by using breaknodes (F9 or F8 when a node is selected, I never remember) or byu adding prints in important places.
But debugging with multiplayer makes it more confusing, since you get double prints because the editor is both the client and the server
but i can do many things from it
š«Ø
My head is spinning
I'm getting a pending kill or garbage error with a spawn projectile, anything obvious I may be missing?
Going to log into discord on the school computer to get screenshots
wow surprised I didn't get IP checked
So im trying to get a vfx effect to always lock on to an object simillar to the physics gun in garrys mod. I have an endpoint for the effect but i can't seem to get the endpoint to change to the object being picked up consistently after dropping it and moving to another object
Oh I think you're right... thats interesting...
You'd need to share the actual error message. Without it, any suggestion would just be a guess.
Blueprint Runtime Error: "Attempted to access BP_Ability_Projectile_C_1 via property Ability2, but BP_Ability_Projectile_C_1 is not valid (pending kill or garbage)". Node: StartAbility Graph: EventGraph Function: Execute Ubergraph BP Character Test Blueprint: BP_CharacterTest
comes with
Blueprint Runtime Error: "Attempted to access BP_Ability_Projectile_C_1 via property Ability2, but BP_Ability_Projectile_C_1 is not valid (pending kill or garbage)". Node: Stop Ability Graph: EventGraph Function: Execute Ubergraph BP Character Test Blueprint: BP_CharacterTest
if im understanding it correctly, stop ability is happening too early for the projectile to exist
why not create a second struct in the same SGO? I kinda feel like that would be easier for me
the 2nd struct will be an array
I have a bit of a gameplay programming question here. What is the "right" way to make sure the player can't clip the camera into the mesh when setting up your gameplay cameras? For context, I'm building a 3rd person shooter game that is fairly high movement and some of th elevel designs can be a bit claustrophobic.
I've been looking at what other games do. Some do nothing, they just let the clip happen, some hide the mesh or try to do like ghosting effect on the mesh. The "best" solution is to just design your levels around it I'm guessing.
What feels the best based you guy's experience?
Using a spring arm? if the collision is set to block camera it shouldn't clip
There are still scenarios where you can force it to when there's no other way to resolve camera position. 99% of the time yeah that's a fine solution.
Granted, to force this, you have to do some pretty janky stuff in a pretty constrainted space
could always hide a secret texture in there so its like an easter egg
I would say make the levels how you want then adjust the camera behavior as needed. In many cases they switch to a transparent material if the spring arm doesn't cut it, offset the camera to the side (fortnite), clamp the pitch a bit to keep from looking up from under the player, etc
Transparent material is something I'm implementing as we speak. Pushing the camera offset to further over the shoulder so it can't clip is also an interesting solution. Thanks.
hidden placeholder ad space for your next title
from what I remember lyra handles this pretty well if you haven't already taken a look
It's been a while, I'll have to check it out as well.
how do i hide custom variables from the details pane in bp view?
should be in the details panel of the variable, instance editable, expose on spawn, etc
private maybe
private didnt work?
I don't think BP can hide BP?
Hi all! quick question dose anyone have an idea why server dose not want to get the key from a player? but when i multicast to "cast to bp_survivor" it shows Client: yes Server: no
hey guys can you tell me what Construction scripts are used for in unreal, like what are they used for in Blueprints?
Is that a question mark in your variable name? How audacious
is anyway to bring back pawn actions in ue5
i upgrade my project to ue5 and my ai stopped working cuz it seems that they removed pawn actions
I am encountering a weird bug while designing a drag drop inventory
If I have two objects of the same type in my inventory sometimes if I move my mouse over the other object while dragging if I drop it to a spot next to it or anywhere else for that matter it just seems to trigger from dragging over the existing one.
It will instead of moving the one I'm dragging move the one that I went over.
To further bizarre this, if I attempt to move the one I was trying to move again anywhere else, even while trying to avoid hovering over the other item icon.
It will still move the other one. Anyone seen this before?
Unmark Instance Editible in the details panel of the variable inside the blueprint
Too little code to find what is causing it. But most likely you didn't replicate something correctly - either the ID or something in the Component
It runs for spawned actors before BeginPlay
The simplest use is to set meshes or attach components (e.g. if you want to correctly attach a sword to a character's hand socket on spawn, or a hat to their head)
Sounds like you should show some logic
The construction script is called when an actor is first constructed. There is also additional logic for having it rerun when properties are modified on the actor. Note however, any pre-placed actors won't have their construction script rerun in a build as they were already run at editor time and the results saved out.
This is useful as it can allow you to call functions at editor time to setup/modify the actor. This can be used for spawning in meshes, pre-calculating variables, setting materials etc... so that they are visible at editor time.
Some example are things like a fence actor that spawns posts along a spline at set intervals with the relevant beams in-between or an actor that automatically snaps to the surface below it. Updating the mesh/material of a door based on the type of door specified in a property etc...
just make sure it's deterministic
Component supostu be fully replied and ready for multilayer i will have a look if ID replication changes anything
Guys, I have a question. I want to create a mechanic where I cast a raycast and I want to get the first skeletal mesh it encounters. Because I'm creating a mechanic where I have several overlapping skeletal meshes, I need to accurately determine which skeletal actor I'm getting.
Do I perhaps miss-understand?
The ray cast will have a ref to what actor, component, etc it hits.
So, just use that.
No weird way, or special way.
There isn't one. I want a system where the pawn has several skeletal meshes layered on top that act as clothing, and I want to remove the clothing that's first being hit by the beam. I'm having a bug where it always removes the lowest layer instead of the top one; its bound colliders are causing a conflict.
Sounds like the base/ lowest model has a larger collision then expected.
So, given the collider conflict.
Either make them smaller/ correctly sized or similar.
Or, you'd need to manually keep track of the clothing, and get the one closest to the impact location.
So, it'd be pretty manual
Yea the line trace just returns the first one it hits so if its getting a different one than expected its a collision issue. For skeletal meshes, they use a physics assets so this is what you would need to check.
If the blueprint is already supposed to prepare things before the game starts
Hi,
I would like to access the border (Brd_Item) of the TileView entry to programmatically change its color when I select it.
The Event on selection item only works when clicking on the TV
Clear selection is not working.
What should I do?
more specifically in editor, it gets backed into the package and doesn't run again
Any idea how can I make the wildcard be a, well, wildcard and return any value?
Macro output variable (UeValue) type is wildcard
that's not how return types work. You can't define a function and say hey this can return anything. Why can't it have a type? even a struct would work
I just wanted an easy node to convert from the struct LuaValue to any type needed. Currently there are helper functions for each type and it works fine
This was more of a funny thing / brain exercise, but I figured it's impossible since I tried all possible ways to make it work and all of them failed. The type seems to be assigned to the first type assigned to the wildcard
so what are all the converted types LuaValue can return?
Anyway, it seems to be impossible to have a macro node with a single output that will convert the wildcard to any type
yeah that seems fine now you just need to parse out the output. Say for example all those values represent character attributes. make a attrib stuct and just populate is with those values
Then when you need the type pull out the type when you need the bool pull out the bool etc
you could also use the entire struct OR just the lua output as an argument inside a function then read the different elements of it
what's the correct way to do it lol
IsCarOutOfBounds
bCarOutOfBounds
Punctuation in variable names causes things to break in code, so programmers that use blueprint tend to exclude them.
ahhh interesting
i have some renaming ahead of me
i swear like 50 of my variables end with ???
I mean, it doesn't matter in blueprint. Just going to make programmers uncomfortable.
Unreal's standards is to have boolean variables prefixed with "b", to distinguish from functions.
oh right
I think starting bools with b is more like a leftover from old days. It is still kept in C++ for consistency but you don't need to follow it. I personally never do.
But I wouldn't use anything else than letters, numbers and _ in variable names, just in case something somewhere doesn't like a certain sign
And the name "IsLocked" doesn't need to have the b in front or a question sign at the end to indicate what it means and that it is a bool. IMO of course.
One question: Does "Use Complex as Simple" only work for static meshes? It doesn't work for SkeletalMesh collisions, right?
I can't get my player controller execute this function. works fine when it is called in my actor, but in this case I need it to be called in my player controller so that the moves will be replicated from client to server
Event FwdOne is not executing any ideas why
Owning Actor Ref is null? or does not implement the interface?
Thats what me thinks to.
Why do you need a variable of it, when you have the direct function for it.
Adds extra steps of potential issue.
I believe I added its so that it only performs the function on the clicked actor as their are many duplicates of that actor in the level it is set when the UI widget is added to the viewport
I think you just pointed me to where my problem is though
In the case of using a player controller.
The widget has a direct reference to the controller at all times.
So, there no need for manual input, or caring about multiple, cuz its the controller
the reference is to the actor that is being clicked not the player controller. I guess you think of it as like im trying to click on a chest
I thought you said it was through the player controller.
Cuz, if it is going to a chest or whatever, then the issue makes perfect sense.
The client likely doesn't own the object, thus can't run on server, it.
But, the setup of the pictures does look like its going through the player controller.
Given the target on your 2nd pic says Strategy Player Controller
hey all
is anyone here decent with vr or blueprints? im making a yugioh vr game in ue5.6 and im trying to make my cards snap into my hand via a line trace and grip function
Sure, that's easy enough. Are your cards 3D objects?
First question is how you want multiple cards to be arranged. Some kind of arc?
Hi everyone. totally beginner on unreal engine. anyone can help or guide me animate the hook to go up and down using blueprint? i have cable and physics constraint for the boom arm connected to the hook.. i also have a custom event to control the hook up and down but when simulating it goes all over the screen. Any help is appreciated!
you should look into timeline components, this is one of the blueprints I have for my doors, u can create an 'add timeline' node, then u can double click to add a track to animate the hook
How could I make rotator A relative to the Look At rotation of point A to point B?
I have a character at point A, facing a camera (point B). When they are looking directly at the camera, I want the rotator to be 0,0,0 for pitch, roll and yaw. But if they look 90 degrees to the right for example, it should be 90, 0,0.
I hope this makes sense?
I mean... FindLookAtRotation?
Well I needed more than find look at rotation, but FindLookAtRotation and a delta rotator did the trick
Was badly explained sorry haha, I've got it sorted now though thanks š
Hi everyone,
I've successfully created the BP_LightSwitch functionality (light on/off, switch movement).
I now need to implement the player input logic. I need a tutorial on how to set up an Interaction System (using a Sphere/Box Overlap or Line Trace) so that the player can press the 'E' Key to trigger the switch only when they are close to the actor.
What are the best video tutorials you recommend for setting up this kind of Actor Interaction Interface in Unreal Engine?
Thanks!
https://youtube.com/playlist?list=PLNwKK6OwH7eVj0NU_ImdvPXEmVFyWfd8E&si=VOvbUlftz9dljHf4
this should be a good start
Just adding to what NeuroSpice shared. There's a ton of different ways to make an interaction system all with their pros and cons. I would recommend you actually watch a couple to find the best approach for your project. You might end up doing a hybrid approach or sticking to one fully.
Guys I have a bug that is breaking my game and causing many refunds. Apparently while people are playing the game, after 1 hour or so, they can't run anymore. This happens also after the 2 time they launch the game. How the hell is possible?
can't tell without code, show the run code
well right off the bat your clear timer doesn't have exec into it
it's not an event
events are in red
you probably wanted to put the clear and invalidate on the same as stop sprint ?
promote the return value to a variable
and use that instead of connecting it like you have
also is there anywhere you actually shut can sprint off ? set it to false ?
Well to be honest I did this game 2-3 years ago and completely forgot how it works.. sprinting works but some people reported that after a few hours it doesn't work anymore (also when restarting the game apparently?)
maybe it is a problem of saved settings?
I usually set that off in levels where running isn't allowed (via level blueprint begin play)
so in normal levels it's never shut off ? but in other levels it gets shut off in the level bp ?
idk possibly, but what settings involve sprinting that are saved ?
Yes
Maybe key bindings?
It's a super weird bug.. never had it. fun thing is that it happens without touching settings, key bindings or using gamepad
that's what they reported me
I've never managed to witness it myself
tbh, you probably have to figure out how to repro this to actually debug it.
its harde to debug if you don't understand how it works tbh
repro?
reproduce
should I manage to make the bug happen to me?
that's tough. I just had someone download it yesterday and it didn't happen in 2 hours of gameplay š
Yeah, but that's part of it. If you can't repro it, you will have a hard time understanding what is going on. Gamers might also report things without giving proper information
Yeah they just say it doesn't run
or that happens after a few hours
but it's crazy
there must be a trigger
debugging is essential
if you don't understand the way it works, your pretty much out of luck
^.^ find this and it will help
I need help fixing the Blueprint logic shown in the attached video. I'm following the Interaction System Tutorial (Part 2).
My BP_ThirdPersonCharacter has issues with the BPI call setup (specifically the For Loop/Trace logic), and the BP_Door needs the FlipFlop added to the Event Interact to properly open/close the door via the Timeline.
Could someone please apply the correct nodes (FlipFlop, correct BPI call) and record a SHORT VIDEO CLIP of the working Blueprints (showing the nodes and the connections) and send it to me?
I'm having difficulty visualizing and implementing the solution from written advice. A video would be much clearer. Thank you for the direct help!
Check if this is also happening when you make the scale of the meshes 1 instead of 0.13. It looks more like a problem with the meshes/pivots than with the rotation code itself
I can't see on the video where is the pivot of the door mesh, dunno if it is so far outside the screen or invisible for a different reason. So check the pivot too - opening the mesh itself from the content browser
Iām trying to use the Min of Int Array node to create a leaderboard. Iām starting with an array of all 0s, and for some reason each time I play two player names are getting overwritten rather than one. I added a ādo onceā before replacing the minimum value in my array of scores but it didnāt help. Any thoughts?
For more context this is happening inside the Game Over widget. When the player enters their name, that's when I want to update the arrays containing top 5 scores and player names. I do the sorting of scores elsewhere so I'm not worried about that. Just want to see if the current score is higher than the lowest on the scores array and replace the lowest with the current score if it is.
I agree with VeraelHasta, this is 100% a pivot point issue.
How do you know its replacing two?
I go back to where the leaderboard is displayed on the start menu and it will have overwritten two of the player names
I also tried a print string to see the leaderboard before going back to start and thatās what itās doing at that step but I donāt know why
What is the min node? it does look like I would expect it to.
Yeah it looks weird, thatās what happened when I copied the blueprints into discord. Itās Min of Int Array, the outputs are the index of the minimum value and the minimum value itself
Ok. Personally, I would just keep the list ordered. That way you can insert where it should go and then resize the array to the max number of elements. This will also mean you wouldn't have to sort in other places.
It might also be worth just having a function on the GI that does this as well so it's not being done in a widget.
Itās just so weird that itās overwriting a second player name but not a second score
Okay so this would go in the game instance, and then on text committed in my game over widget Iād set the current score and current player name?
Yea, you could pop it in your game instance and just call it from the text committed and pass the name in.
Although, as i think about it, having it on the commit might not be the best idea. š¤ You might want a confirm button instead that gets the text and then submits the score. This might actually resolve your current issue. The commit button might be triggered multiple times.
Hi, I have a problem with my saving& loading mechanism for my inventory.... Everything was working perfectly before... But now I just added 4 new slots of saves.....
Loading game from Slot 1 gives me my inventory back like normal....
Loading game from Slot 2 gives me duplicates....
Loading game from Slot 3 gives me my inventory back multiplied 3 times....
Loading game from Slot 4 gives me my inventory back quadrupled....
Okay Iāll try this, thank you!!
Show some code.
what specifically? because I have no idea what could be causing this
How you load/apply the slot data and probally how you save to the slots as well.
This is working perfectly and so much more efficient than what I had, thank you!!!!
Can I somehow access and change the skeletal mesh's physics constrain property from simulated to kinematic during runtime?
Just one specific constrain, leaving every other as it was. I want to use it as a handle/grip.
This is the Load
This is the Save
This is the Game Instance
(Im not using that S_Game_Save_List anymore btw)
There's a lot to unpack here but the issue is most likely because you have 4 of the data struct in you're SGO and then do some stuff for saving to different slots.
Having 4 properties on the SGO for the different slots isn't required if you're saving to a different slot name.
There's also an issue in your save function where you do async load instead of async save.
I was using only one array before but I was having the same issue
I don't think you understand what I'm saying. This is fine as it allows you to specify the slot name you want to save too. However...
This is unnecessary. It's effectively creating slots within slots
When you call this, the slot name is just saying, 'Load the data from this file.'
oh youre right...
Also don't load saved data on init in the game instance unless it's specific to global settings like Graphics, Audio etc... settings.
If I don't do that nothing is going to work for some reason... it will break the entire save/load completelly. I learned this from Ali Enzoheri's save/load system on ytb
It's a trash system to be honest.
Not very scalable at all and does a few things I would consider bad practice.
what specifically is bad, and what would you do differently?
I don't need it to be super scalable tbh for this project..
I also didn't like his video at all, but I had no option because of the limited quality youtube tutorials that there were about this
He uses a single save game object for everything, loads it in the game instance, uses a save/load interface unnecessarily (in my opinion) are a few things I noticed from a quick skim.
The whole setup whilst it looks simple at first is actually pretty convoluted it also moves ownership of data to a single place which can introduce a single point of failure. If that save struct goes corrupt (can be pretty common for BP structs when edited frequently) you'll end up spending a few days to fix it.
Here's an example of a save game object I've setup in the passed for just NPC's with 2 functions inside for extracting and applying the data.
This is also how I then load the data for the NPC's which is setup in an NPC manager. It's a little more complex than usual setups because it does some stuff to account for level streaming.
you can set ragdoll from just a specific bone(s), I've used this kind of setup before
Your async save path just async loads the slot
The other thing is, are you loading these in order? slot1, then slot2, eventually slot4?
What happens if you start a fresh game, save it to all 4 slots, then load slot4, slot3, slot2 and finally slot1?
Can I have just one physics constrain (in the middle of the chain) turning into a "Kinematic" type?
And... can I turn it back on to simulated constrain when the player lets go of the handle.
so you basically just want everything except the part you're holding with the physics handle to ragdoll?
Technically couple constrains are already kinematic to affix the object to the wall, but yeah.
Player picks up reigns or another soft object, the "grip" section turns kinematic and follows hand, while most segments are simulated.
There might be a way to access them directly or something like this might work as well. Then you just would turn it on / off when you grab smth with the handle
also this node if you want more control
@ornate trail I have this now. It turns off, but it kind of snaps to the original rig position rather than simply stopping where it is at the frame.
Do you know how to access explicit constrain position? I could Get Position, Stop Simulation, Set Position when it is Kinematic all in the same tick.
that's about as far as a got with this was the ragdoll setup, mine didn't snap tho š¤
Hey, i cant find out how i can disable controller input during landing animation ? This doesn't work i dont know why. Anyone have an idea ?
Your simulated-disabled bones/constrains remained to where they were during the last simulation location?
I also see this, perhaps this is what I need to them animate the kinematic bone?
Though more info on the internet shows it doesn't support physics, and you need to have anim BP to drive skeletal mesh component individual bones via BP.
I am having trouble with a door interaction blueprint in Unreal Engine 5 (Third Person Template). The goal is to open a door using the "E" key and a Line Trace.
Your line trace vectors are incorrect, at 0:04 you can see its on the right side, also why are you decreasing 3000 from the forward vector? did you mean to increase?
I'm still stuck on the door interaction despite fixing the Line Trace vectors (Start/End) and confirming that the Tag, Timeline, and Mobility settings are correct.
Could someone please share a clear image of their final, working Blueprint setup for both:
You're doing the line trace from your camera which is why the line trace appears off to the right whereas I assume you actually want to be doing it from the character's mesh instead then adjust the 3000 value accordingly
Hi, i'm having an issue with my widgets.. my interactable actors have an overlap that displays a widget when entered and fades out the widget when exiting, works absolutely fine and as expected.. however if I enter the overlap so the widget gets displayed and then turn the camera enough so that the widget is now off-screen and then exit the overlap, despite it correctly calling to have the widget faded out, it doesn't actually fade out until the player turns to face the actor again so its on-screen to which it then fades out..
The widget component is being created on BeginPlay of an actor component that sits on the character, its widget space is set to screen and I've set 'Tick when Offscreen' to true but it still doesn't seem to fade out (despite the code being called) until its back on-screen again, any ideas how I can make it fade out correctly when off-screen?
Hi, just switched to another PC
but i cant build the project anymore :/ ?
ideas ?
Check what that lib file is usually part of and ensure you install your stuff properly
i mean i just installed teh UE engine with & Vs and the usual modifies then the proejct comes straight from my GIthub so same as i always use :/
Yop. So check why that lib is missing then
but ill check the Vs its probably something i missed
Also googling that error with unreal engine would have given you a result instantly :D
You def have something wrong set up/downloaded on the VS Installer
hm https://www.youtube.com/watch?v=C0q1HoHnbYQ im watching this and i have everything correctly settup based on this ./
How to install Unreal Engine 5: https://youtu.be/V1Aw68ArYMo
How to support the channel:
Support us on Patreon: https://www.patreon.com/flopperam
Become a member: https://www.youtube.com/channel/UCO77KLKwplncMHLo6gLpIHw/join
Donate to our PayPal: https://www.paypal.me/flopperam
Sponsor us on Github: https://github.com/sponsors/chris-gong
Get a ...
found 1 missing componnet
hoping thats it
now its getting 10 seconds further but still another error -.-
Ideas š ?
ew. Engine Version: 1012 Package Version: 1013 hm alot oof these
was not there before
could i be on the wrong UE version :/ ?
hm that cant be it im 100% it was on a 5.4 UE and thers only 1 available
did you migrate stuff ?
well it looks like you don't have the project properties matching the project
like you migrated a level or something
and your project settings are different
hm
i would also make sure your using the proper version
like you mentioned it could be the problem
#packaging might know about it ?
aye ill try there
would it be inefficient if I used an actor component blueprint for consumeable items?
since the consumables ive got planned will have various different behaiviours e.g: healing, grenade, buff etc. Im thinking off just making an component blueprint that I can plug into the item dataasset I use, and whenever and item is used it spawns the component, runs it, then destroys it once its done
A custom uobject would probably be better.
Yop. +1
that cant do ticks though can it? for example if ive got an item with a buff duration, would that work with a uobject?
Yes and no. Items and buffs are different systems in theory
Your items should be able to grant buffs if you coded a buff system that supports that. That buff system should do ticking fwiw.
Not out the box no but you can have an actor component that managers them. So the manager would do the spawning and store a ref to the created uobject. If it requires tick, it can add it to another list that it calls a custom tick function on each tick.
Your Items can tick too but the tick would come from whatever manager class they are in.
Can't type that fast on phone -_-
wouldnt I need different logic for items that do use tick and dont then? because im thinking if I keep it in a class that does have its own ticks, I can use the same exact blueprint to use any item, everything is self contained within the item blueprint
It really really really depends.
You can create this stuff in a lot of ways.
You can have a base Item UObject that your more specific items inherit from.
That base can have a tick function and maybe a Boolean to control if it wants to tick.
Inheritance is important when building systems.
The inventory component or manager etc, can then place the Item into one of two arrays.
The one for ticking objects can get looped on the components tick where it calls the fake tick on the item objects
But that's just one of many ways to do this.
It's important that you know the requirements of your system and plan a bit what you would need before deciding.
+- some refactors along the way of course
yeah i dont really know that yet so maybe ill just do it the most straightforward way for now and redo it once thats clearer
does actor component have a lot of overhead then or is there another reason to avoid it?
This is the important bit. If I've got to be unhappy so has everyone else lol. (Feels good when finished though) š
You can also make it way more complicated... But it's more important that you don't use the wrong setup entirely. Components are mostly meant to organize code, make it reusable and use it on Actors to build them up in a modular way.
Now I would be lying if components can't be abused for modular items. I know of an inventory system that defines its items via a DataAsset. And that DA has an array of "Fragments". Those add modular features to the item. Each item gets spawned as an actual actor when equipped. Each Fragment spawns a component on the actor then. Gets a bit more complicated than this, but that's just another possible way of handling this
It's mainly that components aren't really meant to be "items". You can use them to build up an item actor (sounds, meshes, effects, etc.). Scene components and its child components come with an overhead if the actor is moving, due to the terrible transform update code in UE. But that's mostly all
At least in terms of having to worry about it. You are using Blueprints I assume, so performance is kinda out of the window pretty quickly anyway
There will be more pressing performance things that you might encounter before having to worry about the slight overhead of a component I guess
yeah
guess ill add it t the pile of things to worry abouut when they become a problem for now then š¤£
I actually realized Im never using that async
It's way easier to not worry about async loading/saving in BP
oh so do you think I can put my slots into 4 save game objects? Because right now somehow Unreal seems to convolute my 4 inventories into one somehow even tho I seperate them into either 4 save structs, or 1 array of 4 elements.... which is weird, in the end it always ends up turning my 100 inventory slots into 400 slots.... or sometimes I might see 500 slots, or 800 slots or more....
yeah youre right
which one should I stick with async or regular?
from what I understand I probably need 4 seperate save game objects instead of 4 different slots all stacked on top of 1 save game object for each of the 4 slots... Will creating a new save game object create a new folder on my pc? Because right now with the multiple slots its fairly simple. Will I have to create 4 different save game object blueprint for all these 4 slots?
how would i make a simple mission system like do i have all missions setup in one blueprint and if the first mission is complete (like move this object to this location) does that set a boolean to true and it activates the second mission all in the same blueprint?
i need something very very simple for a small horror game like fears to fathom home alone
I mean that's one way, but I certainly wouldn't do it that way.
I'd probably set up some more modular system with gameplay tags. Triggers, actions etc can activate a tag, a quest manager listens for incoming tags and checks it against the active quest, which could be something like a data asset
im not really familiar with your way. what im really trying to work out is the 'optimal way' or how industry professionals would set that system up.
is there a vid i can watch for your system
I would stick with what you can understand.
I'd say you probably want regular.
@lost hemlock The way you have it set up right now, each one of your save game objects (or maybe your game instance) has data for each of your four slots. But, you save games to different slots, based on which slot number you're trying to save, yeah? So you have 16 different "banks" of save data.
Outside of the slot name, the string, get rid of anything that has a concept of a save slot. Your game instance only deals with the currently loaded save, or it can only save a single game.
Then, if you want to support multiple slots, it's as easy as generating a string name. "PlayerSave_01" is the name for the first save. "PlayerSave_02" is the name for the second save.
Your widget, it should know the generated name that you WOULD give a particular slot. If there isn't a save game on that slot, then the widget knows that there's no save for that slot, and it can display the slot for that save as like "New Game"
When players want to save their game you can ask them what slot to use, or you can save a game to the most recently chosen save slot
In the industry you'd almost definitely be using c++ for this and making some kind of editor using something like flow graph to do quests, which would allow things like quest steps triggering things in the world to be handled easier
As far as I know there is no video on what im describing, though plenty of videos on quest systems exist.
Generally speaking the method you would want would have some manager of quests, including the active quest, individual items having some way of notifying the quest manager that something has happened, and some way to define a quest asset or struct that defines what a quest is made up of, what it rewards, what happens at the end of the quest, etc.
should i just go into C++ as a beginner then? honestly i just want to make a simple game with a few missions like: put x in the closet, find xyz items, find a way to open this door, and I want it in that order so each mission can only be started if the previous mission is completed.
As a beginner I wouldn't be concerning myself with the industry standard
I'd be just learning how to make things, with keeping an open mind, being open to relearning, and keeping an eye out to not fall into bad practice pitfalls where possible
I absolutely reccomend learning C++, but probably not if you're brand new. The language on its own? sure, get some syntax practice in if it interests you, but get familiar with the engine before you try and use a more complex language in it.
yeah thats what im doing now, like i like to see how different people implement like a simple light switch and getting blueprints to communicate with each other, but im really trying to find the most optimal ways or industry standard ways for optimization, for work flow, for neatness etc. because generally professionals understand ue5 way better
Don't concern yourself with that too much. You get better with those things with experience, it's not necessarily something you learn by seeking out, it's something you learn by overcoming day to day challenges, happening across information that challenges an idea or assumption you made, as well as figuring stuff out
An industry standard system is all well and good, but if you spend a year making a system perfect from the beginning, that's a year of trial and improvement, learning and figuring out you've missed
Get it working to your requirements. You'll soon figure out if it's not optimal if you're not hitting performance targets, or it's taking 3 months to write a new quest, or you have to stick it in a single monolith blueprint.
Corners are cut all the time in games, the only time to worry is if cutting that corner impacts the outcome too much.
If something more scalable appeals to you, start dissecting how other people made their systems. Not necessarily going to be the industry standard, or possibly even good, but seeing different approaches to a problem might help you spot improvements or different ways of thinking.
It's also going to heavily depend on your requirements. A quest system for something like daily objectives where it's "kill X amount of Y" "Pick up X amount of Y" is a lot more simple, algorithmic and easy to automate than something than say, GTA's contact missions, which while they are still quests, require a lot of thorough making and planning, as dialogue needs to be triggered in specific places, people need to spawn, events need to happen at certain times, etc.
I'm trying to do root motion animation with Mover 2.0, using the Make Layered Move Anim Root Motion node, but it only works for one tick. Am I supposed to queue a layered move every frame or something?
ye I agree
What about this @dark drum
Im now creating 4 game saves objects instead of 4 slots... What do you think about it?
I tried to test it but on the save it says that my Cast to BP_SGO_children isn't working...
Or I could also do it like this
if it's not valid then from here I can say... if not valid... then create that SGO
I am tardy to the party so to speak, but by keeping the slot name the same your save slots overwrite each other now
No. Nothing about the game's structure needs to change to accomodate 4 save slots compared to 1 save slot, except that your widget knows it can display 4 slots to either choose a save to load, or choose where to save a game.
You should have a single SaveGame object type
literally the only thing that changes is the slot name you specify
yeah i did that before...
but the reason why Im changing that is because I had this problem
Be sure to have completed the first part to this series to get an understanding of how save game data works in UE4. In this video we go through how to save and load level state data such as opened doors.
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my pr...
Yeah I know you ran into that bug. I asked you a question about it, trying to help you along the path to debugging what's gone wrong.
I suspect between moving to a simpler setup for multiple save slots, and thinking hard about the logic you use to load any specific slot, that you can fix your bug.
I fixed that btw
ah nice
So this is how im doing it right now...
I also made a function like that here...
This will be inside of the BP_SGOs....
Ive added these variables & functions inside of my SGOs
What are you showing here, invalid refs?
I didn't follow the entire discussion but this loading logic seems completely wrong to me. You can't use the same name for different slots, unless you put them in subfolders.
SlotName at the end of the day is the name of the physical file on disc
Another thing is that you donāt need each savegame slot to be its own class, assuming these are equivalent save slots.
Like zelda or pokemon game saves, or multiple autosaves, or that kind of ātop level saveā could be implemented with a single savegame class, regardless of how many slots there are.
Now you absolutely CAN use multiple savegame classes, for example a āplayer progressionā save game class (which is used to store unlocks, current map, current stats) and a āgame settingsā save game class (which is used to store settings)
But if youāre implementing multiple savegame slots for a single purpose, like having 4 different slots for āplayer progressionā saved games, you donāt need 4 individual savegame classes
It just makes it more complicated
To add to this: if you save a game to slot āDefaultSlotā, it will overwrite whatever data was last saved there. So you donāt end up with 4 āDefaultSlotā save games, you end up with just 1.
Thatās why you get a cast failure
Because each game saved to the slot will silently replace the last, regardless of the type
I would consider making a whole new project (so you can come back to this one later) and following that Ryan Lalely tutorial playlist I linked earlier.
This is how an example save/load with slots could look like. Ofc it is not fnished, just a quick "sketch". You only need to change the input index which in turn changes the name of the slot and loads a different file from the disc.
Also when testing SaveGame systems remember to clear files from the save folder when debugging, because older version of files can cause you problems and they persist on the disc until you yourself delete them or overwrite them.
Save files in editor time are in ProjectName/Saved/Save or smth like that
oh yeah, I just fixed that right now... so now im using different slot names...
so now im creating slots like this...
idk why the 4th one didn't generate but anyways..., it still have problems & still doesn't work for some reason.. This is my load with the different named based on index
and im doing this here too on the save..defaultslot0, defaultslot1, defaultslot2, and defaultslot3
Are you starting your Index Slot at 0 or 1
0
Cause the Switch is starting at 0, and the variable name (you should really use the description field and not the variable name for stuff like that) talks about 1 to 4.
You are doing a bit of double work here by splitting things into 4 everywhere. Can the user load multiple savegames at once?
I've also made a function to bring me the variables that I need.... it's probably the most over-engineered function I made thus far, but I couldn't have done it any other way because all the other ways I tried wouldn't give me the structure data of the object that I needed from the 4 save game objects....
And are the 4 SaveGames actually different in terms of what they can save?
Like, your whole setup splits almost everything into 4 paths that you need to handle, but there is really no need for this.
these are the save game objects
so this is the function that I made to bring me those variables...
Yeah okay, but are those 4 child objects actually different to the parent?
@lost hemlock Please answer questions you are asked instead of posting so many images.
they're not different no
hold on, im still reading, 2 minutes
You really don't need to split this all into 4 everywhere. You aren't "over engineering" things, you are mainly duplicating (or quadruplicating?) your code for no reaosn.
yes but the problem with that isthat it would give me a huge inventory... so if i clicked slot 2, it would give me double the inventory, if I loaded from slot 3 it would give me triple, if i loaded from slot 4, inventory is multiplied by 4
yes but they are different objects
all are different types of variables... and I'd love to put them inside of a select... but that didn't work
actually it did work
but it didn't return me their variables when I did... "get structure" out of that object....
because the object was too generic, and it didn't GET any variable
that's a good idea actually...
And?
This is most likely unrelated to using one or 4 clasees, the problem was probably somewhere else. You are fixing a pipe by adding four more pipes around it instead of looking for a leak.
This is all you need.
If the child save game classes aren't different, then there is no need to have them in the first place.
They are classes, not instances.
yeah, I tried that earlier, and thats exactly what happened
thanks, I will check it
This loads all 4 save games and puts them into an array. Obviously not super useful, cause who would want that, but they all use the same BP_SaveGame class as a base, so why would you need 4 child classes?
All of your code where you split the exec path into 4 is totally redundant.
they are child1, child2, child3, child4 & they all have the same variables inside but they have different data each on each instance...
I thought I'd do that instead of creating 4 parent save games...
I always thought that it is a good idea for size optimization to use instances instead of creating too many parent classes unecessarily
Different data is fine as you create an instance of the same class and add the data in at runtime. You only need a child if a slot (for some reason) is requiring additional properties/var to be saved.
oh okay, I see, good idea, so are you saying that I can create 4 instances of 1 savegameobject on runtime and then safely save/load all 4 of them as 4 seperate SaveGameObjects, even tho I only have 1?
A Blueprint/class is like a well.. blueprint. You only need one and can create infinite numbers of instances of it. The custom data itself is not stored in the blueprint, but in the specific instance.
I can also use only one SaveGameObject, and with that one S.G.O.... I think about creating 4 structures of my entire game data as an experiment... Although I think I tried that before and had the same problem with the inventory
yeah but if I create instances into the game & then I try to save/load them, then the instances won't be saved... What will be needed to be saved is a bunch of transform variables & a bunch of class variables for when im going to for-each spawn them the next time I begin play a slot
Yes. You use the SaveGame blueprint to give a "shape" to your data so unreal knows how to handle saving them. Then it saves them in an optimized way in a binary file. But to decrypt the file it needs to know what was there previously - hence why you need the savegame class
Hi how to deal with the problem that blueprint function library doesn't show up in blueprint whose parent class is object? Any other way to create a true global static function?
I think eXi explained it somewhere, not sure if it was here or in #cpp . Basically Objects don't have a concept of World but you can make your parent object in C++ and overwrite the world functions
Haven't thought of creating a compatible base class. I know why it can't but just don't know how to work around
The discussion about it
Can you do it without modifying the parent class
I think you can sort of do a hack around it by having a reference to an actor in the Object, and using the Library functions through it... but I never tried
The discussion is pretty recent
Unfortunately not.
Don't remember dragging from an actor reference will show the function or not maybe not
actually there's a pretty simple hack
right click on the node that requires world context
collapse to node
copy the node to your object
expand node
then you got the node in object
Really?
yeah

