#blueprint
1 messages · Page 269 of 1
o yeah, im still gettng that nul error though
Make sure the actor is set to generate overlap events.
because what you are doing here have ABSOLUTELY nothing to do with your Gunbase
which you never set to valid instance.
so long you never set Gunbase to valid instance, the error will persist.
I think this is whats throwing me off, how exactly do i set a valid instance please, im not sure its a simple as using a set node because im dynamically picking up wepaons
You would most likely need to set the ref when you pickup the weapon.
That ref isn't in the player though is it. Each actor has it's own set of references so because you set a ref in actor A, it doesn't mean actor B knows about it.
it is not no
You need to set the ref in the player as that is where you're trying to call the event from.
from begin play? i get loads of errors
Go to you're player character and look at your shoot event. You call a function on a var ref. This is the ref you need to set when you pickup you're gun.
yeah i was trying this but i cant plug in that node
It's the 'GunBase' ref you need to set.
looks like shoot weapon doesn't have any inputs
other than target which is a default thing
his input work, he gets accessed none error on gun base because it is never set
Okay so I got this in the event graph, and this in the transition rule, what do I trigger it with?
in here you get the local AimCheck (The aim check that is a member variable of the ABP)
so delete all of this
just type Get Aim Check
i tried, same null error
Show how you attempted to set it.
that's not setting
that's getting a reference to gun base and calling shoot weapon on the instance that is pointed by gunbase
but alas it was never set, so you are telling a non existance weapon to shoot. Hence the error message.
I might be missing something becuase nothing is happening
im about give up, my meta health is taking a battering over these shitty null refrences
we;'ve explained like 3 times why that doesn't do anything at best.
you are setting a reference to it self
if the reference is null, what would be the result of the set? Null
i understand what is happening, i just dont have the knowwledge to appy a fix,
Lets start from the basic then, what is a reference?
Object reference specifically
an object refrence is where you get a pointer to that object, so for instance you can place an object in the world and you can refrence i from another actor, via editor or run time?
object reference is the pointer
it's just a container that can point to a type you specify
Hence why this doesn't make a single sense
Maybe this will help.
I can see you have a var called 'Equip' on the player character that you set to the gun that is being picked up in the pickup function. (on the gun) Swap the 'GunBase' ref for the 'Equip' ref.
@frosty heron The animation is fully working now, thanks again for the help
it wont go into the shoot function, i need to call that shoot function from the gunbase class
why do you keep plugging itself into itself, thats not doing much
basically a null code, no point because it doesn't do anything
yeah i thought that might set it, so it stores it, but yeah i get that its null now
once you make a variable it's empty
This is the gun base class as you're setting the ref inside the player character to self.
you need to actually set its value
yeah thats right, it gets the player sprite
The bit I circled isn't. The bit I circled is you setting a var ref in the player character to the thing calling the logic. As this is in the gun base class, self is there for a gun base object.
I appreciate all your help, i cant comprehend this, its me being dumb. Im going to call at a day
Just swap the gun base var your using in your character to the equip on and it'll probably work lol.
i need that refrence in the player though, beause the shoot function is inside the gunbase, so without it the player will nver be able to call it?
when you make a variable just setting to the type doesn't automatically set the variable, you still need to put an actual item in the variable
so i'm guessing you picked the type assuming it would load that bp
In your player character, drag the 'equip' var into the event graph and cast to the gun base class and then call the relevant function.
the variable is set to an object refrence
you have to actually set that reference
or how would it know to pick the proper one out of many ?
He already sets the ref to 'equip' but because it's an actor ref, he made a new one called 'gunbase' that he doesn't set which has gotten him confused.
He just needs to use 'equip' var, cast and then call his function.
hi!
I have a widget and in that widget some keyboard events. those work but only in game mode game and game mode game and ui.. they don't work in UI only.. why?
Are they enhanced input events?
idk what that means.. I just have this
They only call on the 'Game' input. You need to override the various on key up/down events and check the key for UI only.
Its a function you override.
It does get rid of all the errors! no more nulls, but dosent spawn the projectile
how is the weapon setup to spawn projectiles?
i know this works, somehow i got object references working before and it managed to work, but i dont know this time
It's probally not working because you don't se the player ref when it's picked up. This should be a simple as adding a set not to you're pickup function and setting it to the player character.
@dark drum my overriden OnKeyDown doesn't fire when I press a key
The widget needs to be focused or in the focus path. In addition to this, you need to make sure the input isn't consumed/handled by another widget.
I get it now. my widget inherits from a C++ widget with NativeOnKeyDown
it seems I can't properly override that in the widget
I need to return Super::NativeOnKeyDown which fries my brain rn but ok..
it works!!!! it all works man.
@dark drum @frosty heron Thank you very much to both of you! I would have never worked that out. The crap thing is ive done so many tutorials and watched so many videos on blueprint basics, yet i sill struggle so much, i guess i was in tutorial hell and never really learned anything.
it's hard when you have a bunch of code and don't really understand what is going on, when an error pops up you have no clue where to look
it's nice to do things in steps and test along the way
so you know it was tested and worked, when you get an error it's way narrowed down
Yea, tutorial hell can be a nightmare at times. Sometimes its best to try and find tutorials that explain 'why' they're doing something.
Yeah definitley, i learn best when i can ask questions on things so it gels better, im really glad this is working, its a huge relief, im dreading the next part i enable weapon switching from the ui, but i guess it can be done with enough persistence! This system is probably the most complex part of my game, the scope is pretty small so going to try and keep it as simple as possible after this
UI is always fun... 🥲
😅
I love UI. UI is easy. 😄
hello, is my first message here. I have a question, is there a way to use only mesh collision? I want to make a fightning game, but to make it better hitboxes I don't want to use the capsule component (I put the collision of the capsule component to ignore the character class) so only the mesh could collide. When I try to do that, the characters overlap each other...
Hard to get good/nice imo 😅
I'm with you on that one. lol.
quick question, I just found out data assets can change during runtime, but the issue is I dont want it being saved as well. Is there like a button i could press or do i just reset the values at event beginplay
I'm working on sum UI stuff at the minute and I've gotten to what I'm happy with and realized I've missed the back button. 😭 Now I need to find a way to incorporate it with it looking like I've just plonked it in lol.
Just put it right in there, last minute patch!
The changes can only be saved via the editor so wouldn't affect a shipped build. I believe there is a function for reloading an asset but I'm not sure if it's specific to editor utility widgets.
ahhh i see, that makes sense
What this does?
Hi there, does anyone know why my charakter rotates when i use the camera im using the third person template here is the code
Did you google it? It's like the first thing people wonder every time.
You're adding rotation to the controller, why are you doing that if you don't want it?
hey could someone help with this got this issue in my project where my animation jitters a bit before equipping the axe, and when the player walks the walking axe animation plays for a while then it stops. here are the videos
If you can't help him, don't even bother answering
I need some help making jumpscares for my game but every tutorial using a trigger box when I want it in the code for my enemy. I just want it to have a timer before a sound plays and the players head turns around. How can I do this?
Well i did help, and i expected a reply to the question. It's also called help to self help. If you have to think about why something is done, maybe you'll think about what you should do instead.
I have a first person camera setup on my 3rd person. My issue is that when the player goes up against a wall he can see through the wall and I do have the "Do collision test" I also do have a spring arm attached but the distance is set to zero so the camera is attached to a bone and such and it is within the capsule borders just no idea why the player can still see through the wall when against the wall
Is it when you're running or walking? Tried moving the camera a bit back?
i can be just standing there
its when i am up against the wall just standing there looking at it
if i move the camera back to much i start seeing inside my character
Seems like you're looking down, when you're not looking down can you still see through the wall?
looking up or down or left or right
So when you add rotation to the camera, it goes outside the collision boundries
well most people have rotations to their cameras for movements so how one would prevent a camera stop seeing through a wall
Not sure what the industry standard is, but i just move my camera a bit back and make the character invisible to self. A lot of games make the character invisible to self, but cast a shadow, and add fake arms in front. I want to add the body back in, but without the head, but still cast shadow.
is it possible to open the oculus quest keyboard when trying to type on for example a editable text
Extend the capsule, or add another collision, so player cannot get that close
does Event Tick take too much resources?
I have a project, where I created a cannon and connect an event to event tick to update the rotation of my cannon to always look at player.
it can depends on what you doing. I avoid it by using timers but there is one project I have that I have no choice because it need extreme precision where I only found event tick can provide but use it rarely
So event tick runs on every frame right?
So using timer, I can limit it to maybe every 0.1s?
there was one tutorial i saw where a guy was using event ticks for a lot of things and i was gringing lol
How can I implement the Easy Building System with my inventory & crafting system???
The EBS has these two data tables, i wanna implement them with my own ingredients lists and stuff like that
and im looking to collect some of those thumbnails for my menus that this EBS thing has, perhaps ill put it in an empty level, then take a screenshot and remove BG and put it back again?
right timers are better if you can get away with it
for example i have a project where when my crosshair changes to an eye when something is interactable I have a timer on it and set so low that the player does not see much of a delay I first used a tick for it as a tester to make sure it worked and the performence was better with the timer and tweaking the timer I saw no difference in the outcome except better performence
You could also make a custom event and put a 0.1 delay and then make it call itself I think
but on another project I made a flying system that syncs with the camera and i tried a timer and caused enough delay it was a problem and a tick was better for that system because I needed the precision compared to a timer
so it depends on what your needs are
Yeah, made 0.01s timer and it works perfectly
nice
yea in most cases timers and delay methods work better for performance in rare cases tick maybe the only option
Even with nothing connected, if there is a tick node, and it is not gray, it takes performance, but I think in your use case its alright, won't be much. Remember, you can always use the profiler
Yeah, I am new to it. Will check what profiler is later?
yea when i start a new project or new blueprints i generally delete all placeholder nodes it gives you that is not connected to anything just to keep things clean
Sure, I think a new way to do profiling, is to open unreal insights and then click record. Then launch your play in editor and stop it after a few seconds/minute, then you can see what is performance heavy
Yea, but they start out gray, so it won't tick until you use it
I have a class of (the purple colored variable) in a blueprint that I created, connected to a node that is now deleted as I was no longer going to use it, and now I am left back at the start with the variable. I can do things with the variable but attempting to delete the variable crashes the editor with the crash logs not specifying what is still holding onto it.
Yes I have source control and could go back and grab the old version of the class, but I want to know why it is doing this.
Maybe it tries to find all the times it was used or smth but fails
oh i know lol I just hate having nodes in my blueprints that is not being used personally
just like in blender most people first thing they do is delete the default cube lol first thing i do is delete those grayed out nodes
I delete them when I see them, but I don't go in every blueprint I made deleting nodes lol
oh no I do not need to I just delete them as i open a new blueprint if i forget i do not stress on it just a habit kind of thing
As any FYI, timers or delays with a time smaller than delta time do impact frames.
You can specify the frequency tick is called in the default settings for the BP. Unless you need to start/stop the timer, you'd be better of just setting the tick interval.
You'll fill however find that more often than not, movement stuff needs to be handled on tick or it'll look choppy.
having a brainfart, if I have 95% hit chance, how do I use random float in range to determine if my value is within range?
hi there can someone please help
does anyone know why the animations will work on the metahuman on the left and not the right
screenshot for those who uncheck tick on everything
You can use random bool with weight for that?
theres a setting which turns them off by default
which is what should've been default imo
I think It doesnt affect components, but I might be wrong
wouldnt surprise me if it only affects actors
is there an animation thread?
Also they said in 5.6 empty ticks will have 0 overhead
Are both of these viable structures of an inventory? You store an array of ItemData struct, which includes icon, details, name, max stack size, InventoryObject reference, etc in your inventory component, OR you store an array of InventoryObject references in your inventory component, and each object holds an ItemData struct (minus the object reference obviously).
While the second option seems more straight forward, I would like the first option, since you can isolate inventory management away from the objects themselves. But idk if 1 is just straight better than the other or not.
second is more flexible
but benchmark from Ari says it should have almost zero impact on game thread (empty ticks)
almost zero > zero
I think it'd be nice to just be explicit about wanting to use tick
when people run around with thousands of actors, anything counts
Im usure what the ItemStruct itself is tho. Wouldnt that be something like a Data Asset? Static item info... And then some additional variables for instance data?
That's kinda how Lyra handles inventory with its definition (Data asset) and instance ( data asset + instance data)
yea I figured, especially since it would be easier to add new item object children that do different stuff, but the only thing I think of is if for instance you make a crafting system that also uses the objects, then the crafting system doesn't rly need to know anything about the inventory (depending), or if you equip an item (assuming equipment management is separate from the inventory) and it goes into another array, then the object doesnt carry any inventory data with it.
crafting would mostly care about the static data anyways
item name and possible some instance data like rarity
I guess you could make another struct to hold CraftingData, and it reads the data from the inventory. Like I get why storing inventory data in the object is straight forward, but if its rly only the inventory that needs to know max stack size and those type of details, then you could easily make like a struct for the objects that just carries the name and stuff over for other systems.
A Crafting recipe would just be some Map of <ItemDefitinition, int>
int for the amount
yeah nothing else cares about the stack size
if a recipe needs 30 of some item
it doesnt care if it comes from 1 or 30 slots
Eri covers tick in his myth busting article. It's a complex story but if you need to use tick, you need to use tick. Swapping out for timers delays or what ever else you can think of, still isn't going to change much as it all boils down to what you're actually doing.
as long as they all exist
^ still need help over here if anyone can
Does anyone know why the the timer part of my widget disappears? It's one widget with static text, and a binding to a timer in my character blueprint. When I "inhabit" the pawn, the widget stays up, but just the countdown disappears, and I can't figure out why only the binding disappears.
triggerbox + timer ?
I’m trying to avoid using a trigger box
Is there a real limit/downside to how many actor components you can attach? Or is it really just a matter of preference
for what purpose
isn't it the perfect tool for the job?
you don't know how long time the player takes to get to X location
using a triggerbox means they can go whatever pace they want
Since I want the jumpscares to a be a part of the code so it can be randomized instead of just happening when hitting a point
Unless I’m misunderstanding
it can still be randomized
the spawning of the triggerbox can be randomized
so you'd setup your level with "spawnpoints" for both enemies and triggerboxes
Oh ok I’ll go figure this out thank you
limit is massive, dont worry
which you could still pass necessary data anyways, like if you needed the amount, you could just retrieve the current amount stored. It's just there is a lot more other things I have in my ItemData that only the inventory needs, like rarity. I guess it just comes down to how robust of a system you want, and if you want to actually seperate everything out like I am trying to do.
Yes my screenshot is from this talk 😄
I've gone for structs the last N times i've made an inventory
regret it every time 😄
usually means it's gonna be more rigid and project specific, meaning i can't resuse it as easily
Unless i structure everything the same, every time, but that's not a given
Oh yea I'm definitely not designing for other projects.
multiplayer ?
no lol, not even attempting multiplayer, I've made a few little local projects to mess around with it, and learn, but def not doing anything serious multiplayer.
then you're pretty much good to go!
I wouldnt worry much about separation tbh
I Inormally dont really consider crafting "outside" the scope of the inventory component (depends on complexity )
Usually they end up tied together anyways, so they may just be the very same thing imo
Yep you can make whole single player game in level blueprint if you want 💁
Seperation is just for sanity’s sake
alright, then I will refactor this, I guess everything has a refactoring stage eventually haha. It was just in my mind making sense to store inventory objects in a struct with all the item data in the inventory component. I could still use a struct just so its 1 variable lol, but just store it in the object.
ty for the help.
is there an animation channel
I answered this
just dont get stuck in refactor hell
It's an easy trap to get stuck in
It’s a bit down to preference. If you have a static inventory set you can get away with a simple system
is possible to do this?
Just make another project when you know weakness of your current test
For more complex things might be good to have an inventory object and a world object
Then the inventory object has a soft reference to the world object so it can spawn it
Yeah, if you’re only going to have 3 items it’s not worth it to make something complex
my quest system feels so flexible rn it's hard to even explain how it works or how its ment to be used
I think flexibility is good for long term solutions
tried making it reusable for anything, with near 0 assumptions about what a quest means to your project
especially something like a quest system
safe to say another project turned up in my library ;:D
I’ve done that
Thinking I had the hottest shit only to realize there was a nontrivial flaw
hard lessons
Currently trying to make a weapon combo system and realizing I’m going to have to do like 3 other systems
I'm doing something as dumb as a pickup atm
apparently not as easy as i first imagined
wondering if i just overcomplicate things tho
I did an interact system, where I got the closest objects and their interactions
I need to redo it to be smarter
This is a top down grid based game
trying to integrate with DA, but I must admit it's not all that I expected it to be (so far)
Ahh
DoShit52Subsystem
has there been an easy framework to drop actors randomly in a level in editor?
other than using a manager or something
Drag and drop the blueprint?
Oh you mean find a random spot to spawn them?
yeah
like i got a huge scene, some places need it others don't, can be scattered
gotta make it as tedious as possible to make the 2h mark on steam you know 😉
You'll need to provide more information. T Pose Characters mean you have no AnimationBlueprint set up with proper Animations.
Probably your own little helper Blueprints for it. Nothing else is known to me.
Pcg💁
pcg?
but I don't wanna~
Procedural Content Generation
Can maybe be used for it, but not sure. Only really saw more static stuff with it being made
Like environments
does anyone have any idea why one metahuman will change animationas but the other wont?
does it have to get with getskeletal mesh asset
its hard
well, not impossible
but the example code out there is an OOPy mess and they're slow as hell
Sooo dont bother ?^^
Im already limited on time so wfc feels like a stretch
Im currently at the placement and triangulation steps of the pathing algo between rooms
Kinda forgot which algo i was gonna try tbh 🤔
You can take mine for a spin once I'm done with it
it's pretty fast
I think I still have some statistical problems, note how there seems to be too many blue pixels in the output vs the input
Pretty dynamic results aswell
Hmm yeah they seem pretty dense now that you mention it
Still you're well on the way with it
The principle doesnt seem that complex
It's really not, I think I'm getting my perf from my approach. I'm ONLY doing the overlapping model and the "superposition" state that the output is in is actually in the data. Each pixel is a byte, with each bit being a color. 11111111 is "anything can go here", 10000000 is "This is collapsed to Red", etc.
so there's no keeping track of stacks of patterns, all the patterns get bitwise ORed together and stamped into the output. I think there's some speed gains there.
I want to make sure it's as correct as possible and all the statistics kinks are worked out, then I want to enable multilayer WFC (basically stacks of runs), then I'll release it. I'm only ever going to have it work on pixels, the translation from 2d pixel bitmap to 3d world geometry is up to the game. Basically "Lines of red = wall meshes" etc
The multilayer approach would be like if you wanted to generate a town. You'd have 1 run that places lots, roads, and open land, then within each "island", you'd have a separate run. Smaller runs are much faster than big ones and can run in parallel.
There's an official WaveFunctionCollapse plugin in unreal
It uses a totally different approach and is mostly for editor time work.
Here's the generation of a cave system with some enemy spawn locations
I'll hook you up if you wanna be the guinea pig
I don't have a game for it right now so it'd be useful for us both
Id be happy to !
pmd
the problem is, i cant connect my own systems to EBS's system
Easy Building System for example here requires you ---> 100 wood to make the most simple small thing
Image
This is waaaaaaaaaay too much wood, where I wanna make smth like this with 1-2 wood only
@dawn gazelle do you know anything about this?
how to get bounding box independent of rotation?
This wood is not connected to my inventory system.
Im trynna implement this Easy Building System with my current Inventory & Crafting Menus.
(Sorry, I made it in one image so that it's easier to read 😂 )
Should I change these structs?
Hey there, I've been looking into the crouch system that comes with Character and stumbled across this value. Doesn't seem to do anything and I don't see it being used in any way inside the Character or Pawn implementations. Is there anything I'm missing?
Does the VaRest "Apply URL" node only expect an object as root ? Can it be an array of objects ? Or do i need to make it a root object in my API first ?
Learn the plugin first.
Figure out how the information flows from one place to another.
Figure out how information is input, and what you expect as output, and where these are handled within the plugin.
Slowly try to integrate parts of it to use your inventory system instead of its own systems.
Build anything else that may be necessary in order to get the results you want.
In the end, if you want the plugin to utilize your inventory system, you'll likely have to convert the majority of it to read from your item definitions (however you may have them set up, was it a data table?) and communicate with your inventory components rather than using what it has.
It sets BaseEyeHeight in ACharacter::RecalculateBaseEyeHeight(). BaseEyeHeight is pulled from APawn::GetPawnViewLocation, which in turn is used in APawn::GetActorEyesViewPoint, some AI stuff for their control rotation as well as in APlayerCameraManager::UpdateViewTarget sometimes.
Wow thanks, that's very detailed
So it is used, I was just looking in the wrong places (I did find RecalculateBaseEyeHeight() and such, but not the camera manager one)
but it's not a plugin
im not using plugin
unreal editor crashing bc PIE references a function whose name has been modified
yeah be careful with that so you don't get crashed like I did lol
"Easy Building System" can be considered a plugin.
alright
I wanna show you something
I replaced all these
with my own f_slot_struct
instead of the structure that they had <----
it was a structure that wasn't compatible
Also changed this
it's not a problem because this is just a duplicated project <---- if all fails, I can just go back to the previous one
@dawn gazelle so remember when I asked about this?
and I pointed to a problem here?
Because?? Because the materials weren't compatible
It was getting it's type of materials from an e_num
it was completelly different
kinda like trynna install a (DDR3) memory ram on a (DDR5) computer
as you can see here my inventory system is using F_SLOT_STRUCT <--- content array
Right... So if it's different than what you're using, but you still want to use it, you'll have to change whatever is using the plugin's way of doing things to match your inventory. I can't tell you everything you need to change to get it to work. You'll have to figure that out.
yes and I did it
But there's a catch <----
I fixed ||***ALMOST ***|| everything
I guess I'll do the same thing as well?
My struct is a bit different, so this will never be compatible
My character goes under the ground during a sliding montage when I change the capsule height.. anyone know how I can fix or work around this?
@dawn gazelle
Any place that you change out a structure, will require any place referencing that previous structure to also be changed to the new one.
yes
but that means i need to replace the previous struct too
which will not be compatible
This is the BuildingObjectSettings < ----- I don't have anything close to it
You are trying to make this thing work with your system... If you can't connect it together, that means there is still more changes needed so it is adapted to yours.
You may well need to completely ignore anything to do with this building system's inventory and how it defines what is needed and how it defines its items, but that means you'd need to replace anything referencing what it normally uses with your own item and inventory system. It's likely not an easy task, it's likely a lot more work still, and it's not something that can be easily explained over Discord messages, especially by a party (myself) that doesn't fully understand either your inventory system or the building system.
You gave a great analogy earlier, but it's a little backwards.... You have a stick of DDR5 and you're trying to plug it into a DDR3 slot... You can't adapt the motherboard... You have to pull the motherboard out entirely and put in a new one, along with anything else that needs to be upgraded to facilitate the DDR5 memory... Like the CPU, maybe even the powersupply.
Can you be more specific? What exactly about my inventory system or building system do you not understand, and I can get down to explaining it.
For example, here's how my structs work, and a little information about my Inventory System
Im barely even using the S_ItemData
Most of it it's FSlotStruct <---- that's the one also doing all the heavy-lifting inside of the building stuff too so far, at least based on all the structs I've replaced
Sorry, I don't have the time to learn the intricacies of both the plugin nor your inventory system. All I can do is make recommendations about very specific things you may be having trouble with, but I can't go over 500 different aspects of these systems to try and get it to work how you want. If you ask large vague overcomplicated questions, you're going to get vague answers in return.
If it doesn't connect, you can't use it. It's really as simple as that. What do you need to change it to? What you need it to do instead. What do you need it to do instead? You need to be able to answer that - if you can't then you're not at the level yet of understanding either the plugin or your own inventory system.
Well I changed this struct which was connected to all the other things like this, it basically was an Enumeration that had 3 types of materials... Wood, Metal, Stone <---- Now this has been replaced by a simply Name ID. So now instead of the previous struct, I have a struct containing only Name ID and Quantity. This is what is used inside of my functions.
But that is why im having these issues here...
I don't have this Building_Requirements Data Table in my struct, and im asking your advice about how you would go about this?
These are literally all my Structs right here, I posted above
That's literally all the structs I have ^
So I guess, Building_Requirements can be the same as Building_Recipe <---- ????
This makes it similar to the crafting system <----- which I already have!!!!!
I already have a crafting system
These are 3 Inventory structs
My crafting system only has one struct<----
This is also how the crafting system works
this is a lot of information for someone casually looking at a discord channel to inspect and help with in a short period of time
true
if you are using two separate plugins made by different people, you need to make some sort of adaptor between the two, which requires YOU to understand how they both work at a decent level
i think you understanding it enough to make these commented images is a good start
this is a lot of information even for me, lol, human brains only have so much RAM. That's why I think it's more helpful to look at images like these that illustrate things to our homo sapiens brains in a more illustrious way
But this is probably the most complicated level my project will get, after this point I'll try to not add more complex developments lol because Im pushing my mental CPU to the limit, and I hope it doesnt overheat. I think I'm violating my brain's labor rights way too much that my neurons are drafting a resignation letter
if there was a button, where by pressing it I could give away 5 years from my life to add 5 IQ points to my brain CPU I would.
after all 5 years isn't that much
5 years is a lot
True, but think of it this way: with 5 extra IQ points, you might finally figure out how to get those 5 years back <----
Here's the problem... I don't know enough. I have 0 clue, nor idea, what kind of impact changing anything within the plugin may have and what those changes could have on everything else within that system. I literally cannot tell you what is needed in order to get you to where you need to be and it would require far too much time investment from me that I am not willing to provide in order for me to fully understand what this building system does and what it needs to accommodate your current inventory system.
How would I approach this problem myself? I wouldn't even be trying to adapt a plugin to a youtube tutorial inventory system in the first place. I would've designed systems from the get go that can mesh together well and then build them in tandem, and adapt them later if need be, all the while gaining an understanding of what it is I'm building, and how it connects together, so that later on I may actually be able to rework it if I need to in case something isn't working as I need them.
If I was in your position where this was dropped on my lap to do, then I would start by learning how these systems work first, understand what my needed inputs are, and what my needed outputs are so that I can figure out how they can mesh together, and then change everything needed to do it. I can't really be more specific about your current issue as I don't understand enough about the systems.
And again... It is a code plugin, whether it's packaged in plugin form or not. You're using someone else code and trying to ....plug it in... to your own systems. What you're discovering here is a problem of using other people's code - you have to learn and understand how they did things and if you want to customize it, and you need to change whatever is necessary to get it to work with what you want, whatever that may be.
Like... It may honestly be easier to just... Dump your own inventory sytem and just use theirs... I really don't know if that's feasible or not for what you have planned with your inventory.
But guess what... That means readjusting all those widgets you made so it now works with their system instead...
Along with any other gameplay mechanics you may have created that utilize your inventory system.
they dont have an inventory system, lol
If it's prompting you for certain amount of resources, they certainly do.
just some function trackers of how many wood,metal,stones (meterial points?) you got.
But I guess that's also how my inventory system works? lol
It may not be called an inventory, but it is.
I think its a lot bit different.
Like I tried to describe it here
hammer and axe are craftable items
and everything can be picked up
as an inventory system and added to your inventory system
getting all these now to somehow work with this other inventory system would totally feel really annoying
because it would be like I made all these for nothing, lol
welcome to iterative design
Do you think Leonardo DaVinci's first paintings were masterpieces?
Did we start making buildings by starting with skyscrapers?
yes but for example....
look at this coconut tree
this is more than just an inventory item
it has CODE inside of it
meaning you can plant this tree
it grows
you can harvest it
surely that can be reused in some capacity
it will show you health widgets etc etc
none of that is tied to it being an item
same for this coconut
true
ok so that means i can just make items for the building system , as in for these things to be more compatible?

Sounds like a simple "resource" actor that you can define what resource it gives, and upon a successful "harvest" of the object, it would add something to your inventory. Once chopped down, over time using a timer or something, it can grow back.
ok that isn't rly a problem lol
the actor just dies after you chop it lol
so you wanna know whats even crazier?
yes
the complexity of this project is probably not even done here, even if i solve all these problems with the EBS plugin lol
is that I even wanna do a farming system as well <----- to top this all off with even more blueprint craziness as a cherry on top
It sounds like you need to abstractify and modulate the fuck out of your project
Joking btw
please elaborate
this
Create base item templates and use data structures
For example
someone told me to make it generalized, as in the code being able to be reused again and again, smth like that
or "generic"
is that what you mean?
farming and building and inventory and crafting are separate pieces. they have some interface, but otherwise should not communicate with eachother
that's what this is, lol
ItemStructure, a custom struct in u5
- ItemName string
- ItemType someEnum
- isInventory
- isMelee
- isConsumable
Etc
Add this as a custom variable to your actor item and change accordingly
You can go further and create a spreadsheet of items
not exactly
You could use a factory class design philosophy
Just throwing some ideas
Lmao I felt this
I’m encountering a similar design problem in my current game lol
These are the structs im using for my inventory system, lol
i also have a crafting system, but only uses one struct 🤣
Okay good, you can go further and create a BaseItem blueprint class that’ll directly load some models and textures from the folder tree.
Use interfaces maybe for custom logic that’ll apply to certain item types
Again just throwing ideas
Abstraction is your friend in these sort of games tho
My game should come with a 'Dont try this at home' warning for other developers.
It’s just an issue that appears when a game has a ton of interactive items
I’m doing something similar for this coffee shop game im making lol
imo inventory and crafting systems shouldn't have too much work put into them because they really arent the fun things in games usually. just a means to an end...
the more transparent and easy to use the better for most games
for me this game is very crafting oriented <---- its literally a game that is supposed to be all about crafting
this game is 90% about crafting the next thing
like the game "Stranded Deep"
it's not really a recommendation or a suggestion, you literally have to craft the next thing to survive <---- thats how i love it
it's totally different from all those games that just slap some useless crafting&inventory mechanics just as a side quest
for me this is the main quest, there are no other quests
or Subnautica is kinda like this too.
maybe 80% of the game will be crafting
To be honest, crafting can be super fun in games. I feel like it is silly to say a certain mechanic just shouldn't be explored as a generality. Subnautica was a perfect example as the crafting station defined a lot of the games goals. Unlocking new crafts felt amazing, the satisfying crafting animation/sound effects was such a dopamine rush, especially on the bigger crafts like the vehicle stations.
Super early on in that game, you had some crafting recipe, and it required some palm oil or something. But the only way to get the palm oil was from these huge glowing fruits in a dark seaweed forest. Just so happened that the forest was full of a bunch of terrifying sharks. I remember that lead to this awesome experience trying to rush in and collect the oils, getting lost in that forest, getting the shit scared out of you by these sharks.
Simple crafting benches can defiantly be used to lead the player towards fun gameplay experiences.
To many times although, the crafting benches just lead the player towards hours long of grinding copper ore or something equally painful and not fun...
Yea
It runs on the machine that have authority of the actor.
It runs on the server if the authority is the server
For locally spawned actor, it will run on the client that spawn the actor
So it's not always run on server
It depends
E.g. you are a client and you spawn an actor. You have the authority of that actor so the switch on authority will run on your machine even though you are not the server.
Switch has authority just filter between authority and remote
It doesn't mean, run this on server
The only way for client to communicate to server is with server rpc
Client wants to buy an item -> check if have money -> server rpc I want to buy this item.
The function on the server then gets called, checking if the player have money
If valid, server add an item to the replicated item or array of the player
Player on rep item -> broadcast on item added and you can do what you want with the event. E.g. updating UI or popping a msg that the item is purchased.
For clarification, as a remote client, you will not have authority over your players character, even though it is "locally spawned". "Locally spawned" could be confusing wording.
Your characters IS NOT locally spawned.
They are spawned by the server hence you won't pass as the authority on the switch check.
Yea yea ofc, but just the wording.
Locally spawned is very easy to understand
It's just an actor the client spawn.
Which means no one else would even know it exists, just your computer.
Because replication only work from server to client.
Just saying cause it confused me when I had no idea.
Think about building placement system.
Where you want to have a ghost building.
You don't want other players to see it.
So you can just spawn that locally.
Spawn locally = spawn actor node executed by a client.
Replication only works from server to client
Setting a replicated variable as a client will only change the value in its own machine.
Marking a variable as replicated doesn't magically replicate it for everyone.
Replication is server to client.
So if client -> ask server to change the value with server rpc.
The variable will then be replicated to everyone.
If server, just change the value right away. It is the server. The value will be replicated to everyone.
Yea there is absolutely nothing in unreal that "Replicates" REMOTE -> AUTH. Replication does not support REMOTE -> AUTH.
It only supports AUTH -> REMOTE.
Any REMOTE -> AUTH stuff is handled using a different system. RPCs
Biggest tip. Just remember that the only way for client to talk to the server is via server rpc.
Once you accept that, goint forward is much simpler.
And client don't directly talk to other client. Ue doesn't support P2P out of the box
It is using server to client model.
Which mean server is the truth and authority.
And replication is done from server to client.
Multiplayer is hard, replication is just the basic and it's taking quite a while for it to click.
EX 1:
- An AUTH client changes a variable that is tagged as replicated.
- The AUTH client automaticly sends the new value of said variable to the proper REMOTE clients.
EX 2:
- A REMOTE client changes a variable that is tagged as replicated.
- Nothing happens. Nobody else is notified about the new value. Cause replication doesnt support REMOTE->AUTH.
for bonus, EX 3:
- A REMOTE client runs a event tagged as an RPC.
- The REMOTE client automaticity notifies the AUTH client that an RPC was ran. This is how you send info REMOTE->AUTH
think im starting to get it, thank you
When I say, REMOTE client or AUTH client, I mean the actual net role of the connection (Is the connection literally the server or not). Not the net role of the specific actor, which can change like ColdSummer pointed out earlier.
EX 4:
- A REMOTE client changes a variable that is tagged as replicated. This variable exists on a actor which has the NetRole Authority.
- Even though this actor has the NetRole Authority, nothing happens. Nobody else is notified about the new value. This is still a REMOTE client.
I cant remember the actual names of the term that talks about an actors net role vs the games netrole. I think NetRole relates the actors, and NetMode relates to the actual games network status (dedicated server vs listen server)?
Ok yea it looks like it..
enum ENetMode
{
/** Standalone: a game without networking, with one or more local players. Still considered a server because it has all server functionality. */
NM_Standalone,
/** Dedicated server: server with no local players. */
NM_DedicatedServer,
/** Listen server: a server that also has a local player who is hosting the game, available to other players on the network. */
NM_ListenServer,
/**
* Network client: client connected to a remote server.
* Note that every mode less than this value is a kind of server, so checking NetMode < NM_Client is always some variety of server.
*/
NM_Client,
NM_MAX,
};```
/** The network role of an actor on a local/remote network context */
UENUM()
enum ENetRole : int
{
/** No role at all. */
ROLE_None,
/** Locally simulated proxy of this actor. */
ROLE_SimulatedProxy,
/** Locally autonomous proxy of this actor. */
ROLE_AutonomousProxy,
/** Authoritative control over the actor. */
ROLE_Authority,
ROLE_MAX,
};```
The HasAuthority node, checks an actors NetRole.
FORCEINLINE_DEBUGGABLE bool AActor::HasAuthority() const
{
return (GetLocalRole() == ROLE_Authority);
}
Since it checks NetRole, this isn't a perfect indicator of if an actor can replicate variables or not. As support for variable replication is dicated by the games NetMode.
It's checking for local role 🐈
Spawning actor locally also makes it having authority over it even on clients, just remember that with this, it is only most likely to be true if everything is spawned on server and replicated.
Playing ESO makes me want to redo my attribute bar code to make the text display a setting. 🤔
Soo many things to learn and use 
I might regret not getting into common ui, modular gameplay, fast serilization etc.
But will deffinitly refactor my savegame
Modular gameplay is nice, but mostly just a stepping stone to Lyra's modularity. It's good for large and branching projects. But not always necessary for a lot of projects.
CommonUI, I personally wouldn't live without anymore. Gamepads aside, the rest of it's perks are too good to pass up, specially when you mix it with CommonGame stuff for the pushing menus to screen from anywhere without linkers, or needing to keep refs to them in something like HUD.
Elder Scrolls Online
(Escargot Supreme Omelette)
I want to change the point of axis of rotation/pivot of a mesh within a blueprint. How can I do that? So instead of rotating from middle. It rotates from one end
can you post a picture to visualize what you want?
write a test case and expected result
"combine the array numbers in the order they were set into a single 4 digit integer"
not sure I understand this. Just write a test case and expected output.
you can use for loop
the easier way is to just convert them to string and back
or you can multiply it and add if you want
wouldn't matter either way
you are not processing a big data
the last index would be the last index of the array
you can probably do this in a function
i'm bad at math
first index is the starting index, so 0
last index is the last index of the array
you want to loop through the entire array
probably can just do for each loop
instead of for loop
Does anyone know why this Neighbor Offsets For Each Loop only loops once while I got 6 Array elements by default?
Local Intiger TotalValue = 0;
Local Intiger AmountOfDigits = ArraySize;
ForEach (CurrentDigit in EnteredDigits)
{
TotalValue = TotalValue+ (10^(AmountOfDigits - 1 - Index) * CurrentDigit);
}
return TotalValue;
I think this is the math.
This is just pseudo code for a function, hopefully you can translate it into bp.
I can if you really need
AmountOfDigits - 1 - Index
4 - 1 - 0 = 3
10 to the power of 3 is 1000
I'd save myself some headache and just append string then convert to int on complete
no math needed, create a local variable of type string, when your array has 4 elements, make a loop and append to that string local variable your element at index i, then use that string variable to do whatever you need to do 🙂
does it work ? 🤔
What is this for anyway, a pass code?
If you never need to do any math with it, just turn the variable to a string
Or just use an array of integer..
An array of integer will do.
You have a single int variable
Why do you have to combine them?
Why can't they just be a 4 digit single number?
Also you can just combine them to a string. Bypass all the math all together.
So you want all the ints in the array to be converts into a string/text in the order they're in, in the array?
No, the return value on the array add node is the index the int was added, not the int itself.
Id rather do the math than rely on string conversions personally
Why this is stored in an array in the first place is beyond me ofc
What happens when entry 2 has 11 in it
I was thingking of a passcode machine where you can only enter 0 , 1 , 2, 3, 4, 5, 6, 7,8, 9
can't tell if that's what OP wants though
Id do the math preemtively
And not have the array
As in do the math on the input
Add the value directly to the final value ?
Unless amount of inputs can differ from combination amount
Eg 6 inputs on a 4 digit code..
At that point you know it failed anyways
So the math doesnt matter
This issue with this is there could be multiple ways to get the same value meaning there could be different ways to get the same result which probably isn't desired.
There would only be one way to get a given value
If this is a combination lock thing
3 + 4 and 4 + 3 would give the same result but the order is different.
It wouldnt
First digit is 4th integer place in a 4 digit code
So it has a different value
4000 vs 400
Ohh, I get what you mean. So pre multiply then add to the final result.
Yepp
This would work as well based on Squize's suggestion.
I would track it like "CurrentDigit" which would start at the total amount of digits in the solution
NewInput -> if CurrentDigit > 0 -> CalcValue(InputDigit) -> CurrentDigit--
You could but that would add an extra step to calculate the exponent needed for the power node.
The the digit to add. It's an input on the function the logic is setup inside.
I just had it randomally add a digit for testing.
If you're using 5.5, this symbol means it's a function input var. 🙂 I'm so glad they added these. There's one for local vars too.
But yiud have a quick out for chevking if the code can even be in the realm of correct
You can go a step further and make a function for getting the number of digits in the passcode.
Not really but for the sake of a few extra nodes, it means if you change you're mind, you just change the passcode and it'll work out the rest.
I feel like we could get rid of the digit counter though. 🤔
An alternate version without the digit counter.
That looks like an issue with UE's input conversion thing. (That allows int inputs to be converts to floats and vis versa) Try disconnecting, recompile and try again.
if that doesn't work, you can manually convert the return float on the power not to an Int and connect that instead.
I thought that it is generally bad practice to reference your custom classes in a function library since this creates references to the custom class in every blueprint. Is that correct? And if so, is it also bad practice to set any input/output of functions to a custom class in a BP Interface?
It's not advised as anything that (as you mentioned) uses either the function library or interface will load said classes. Bases classes that would most likely be loaded will probably be fine though.
Is it just me that thinks when you learn a lot in unreal you don't need much to make games so someone can do unreal for 10 years he knows blueprints everything can he then leave work for himself or there's more to it than that
Will learning unreal make me a game developer
Making a game is what makes you a game developer. What tool you use to make said game doesn't matter. 🙂
Oh okay 😃
if you are making game, in any engine, you can acomplish this bro
I've just realized, this wouldn't work with 0. o.O
Use the to Text node.
Good to know this will always load the classes. Does it also introduce circular reference quicker? I got issue with this in older versions of the engine but i am not sure it is still that big of an issue
I'm not sure to be honest as I've never had any issues with circular dependencies. (I can only assume I don't tend to make them myself lol)
As an FYI, I've just realized that this method won't work with passcodes with 0's. So if you wanted a passcode of '0024' for example, it wouldn't work. If you're wanting this, you might have to use the array version to keep the digits separate.
Okay apparently it still exists in UE5 but measures have been taken against it to make it less likely. https://forums.unrealengine.com/t/is-circular-reference-dependency-still-a-problem-in-blueprint/1338618
So it’s 2023 and do we still have to clear every circular reference to avoid any potential crash/corruption when the project gets bigger? This is a key to my project architecture since most of my code will be done in BP and now I have been excessively using interface to avoid circular reference. I’ve heard the problem was mostly fixed since UE4....
0 is just 0
Add nothibg but shift current integer
Easier to just use the array version at this point, but yea.
Anyone remeber where the tick box is to allow physical mats to be returned through trace hit results ???
If i remeber right it's unticked by defualt
Proper vs improper 😆
If input == 0 -> CurrentInteger--
What's the best way to do 3d assets
Such a broad question.
Maybe you want to start from looking at what DDC to use.
Then look for modelling technique. (Polygonal or box modeling)
Then work your way forward.
out of interest where would you do this, You have a UObject GlobalAudioManager would you construct this within the GameInstance so it runs through regardless what happens with the game or on the game mode so specifc one is loading along with Game Mode that loads with the level ?
hiya im really struggling getting this plank to this bp, i need it so i can toggle the visbilty onvce the left plank has been picked up
So what ? When did I say my goal is to re-invent the wheel? This is just a base architecture, for a starters this is exactly why I didn't close down to any idea yet because I dont wanna limit my choices later on in what I wanna create. That would give me soooo many creative limitations. But first the only thing im trying to focus on is the base architecture, meaning a working blueprint inventory, crafting, building, farming systems that work, then I can turn it into anything I want. Which is why I tried to make it as generic as possible <--- this is by the way the advice that my unreal engine friends also gave me when starting out and had a lot of ideas. Because If I close down early on on any of these ideas I would really limit myself forward..
These are the hardest things inside of Unreal for me which is why I tried to get into them and learn the hard things head on. And I started game development around 5 months ago without any developer background or experience what so ever.
the comment was directed to the statement that "stranded deep" inventory is innovative.
When did I or anyone say "stranded deep" inventory was innovative? Or that my goal is to make a game which inventory is innovative?
tbh it might need to be innovative or special if it's 90 percent of the game
oh I see what you mean
well I don't know if it's gonna be 90 percent of the game, it's just an idea so far, but it's a good suggestion
Hi all, im trying to create a hud, it shows on screen fine, but when i bind it in the designer it disapears from the viewport, i run over a weapon and it still dosent update. I think is it maybe somthing simple im missing?
Im just trying different things, im not sure how the game is really gonna pan out, but Im not trying to really limit myself in terms of ideas because once I commit to some specific genre then I really have to give up all other things that I wanna do with it, 😄
it's when the actual hard game design begins 🙃
sad truth
exactly 😂 and it hurts 😭 because the more you go on the more you have to commit to certain ideas and give up so many other incompatible ideas, it's very hurtful, and the more and more goes on it gets even harder
New core plugin
at some point you just gotta make enough dogslop that it hits critical mass and resembles a gams
then you can polish whats needed
much like student loans, technical debt means nothing if you never have to pay it off
at this point im just trying out everything, see what works, or what's easier. Kinda like making abstract art on a paper, and if this doodle ends up looking like a horse then im committing to drawing a horse.
Or say if I accidentally make a horse look like it's sleeping <---- then i pretend it's a sleeping horse, or if it looks like it's a running horse, then guess what, it's a running horse, it's not a bug it's a feature 
for example I didn't know how to figure out the slot transfer system in the inventory
from experience, that's a easy way to waste a lot of paper on poorly drawn horses
so I ended up just removing the whole function all together and decided, hey is it really that important in this case to be able to move around these slots?
so I just made it an inventory display system
true
Hello!
I am working on a Save and Load system for my inventory. When the server runs the Load function, it updates the "items" array for all players. Then server sends an RPC to the clients right after the update to make them update their widgets. However, sometimes the RPC is executed before the array is fully updated on the client side. How can I ensure the array is updated before the RPC is processed? Is there a better approach to handle this?
make the array a replicated property and call the update function in an OnRep
but I also modify this array frequently except when I load it, so it doesn't only change during load. Doesn't this mean that the RepNotify event will run many times?
property replication is only considered at the end of a frame. so if you edit it 5 separate times in one update, it'll only replicate the new array once
thus only calling the onrep once
I did make doodles but through all this non-sense create, remove, create, change mind, remove, create, remove, change my mind, create etc. I also learned how to use blueprint code. For example before committing to this inventory,crafting,thing, I barely even knew how widgets work<---- I learned how widgets work like around a month ago lol
👍
actually unsure if that's how it works for a purely bp property. cpp and bp OnRep behaves differently
but I'd give it a go and just see how many times it executes
Why do you need server to send rpc to update client widget?
Actually I didn't mean that. For example, when the player moves an item in their inventory, the RepNotify event will run, because the items array will be updated. Widget update event should only run after Load.
ClientOnRep-> Broadcast Array updated
and any listening object including widget can do their respective task
I didnt use RepNotify in my system. Generally, clients send a request to the server, the server does the necessary calculations and sends a request to the client to reflect it on the widget. Is this the wrong way?
I don't want to use array repnotify for widget updates because I can't get the information of what has changed in the array, so I need to loop the whole array again and do widget update for each element.
Include the index in there ans you're golden
RepNotify is the way. RPC is not
generally speaking
Statefull things should be RepNotify
RPCs might be missed for various relevancy reasons
In c++ you can figure out what changed
But if I use Repnotify, it will run when I move/drop/transfer/use/add/remove the item. I have to for loop all items array again and update all widgets. Isn't this a bad way?
Annoying that that's not the case in bp... ...
Even if, its still stateful, and important that it remains correct
also tbh unless you're updating hundreds of widgets id be surprised if the performance hit is meaningful
worst case would always be updating all widgets regardless of solution
what's wrong with looping through item array. You do have to do that anwyay. One way or another.
Hey guys, how do I make a static class in BP ? I'm trying to have a simple 'world debug screen' that any other class could print a string into without having to get its reference but somehow there's little resource online. Is it only possible in cpp ?
if you need state, subsystem. if you just need static functions, BP function library
subsystems require some c++ iirc
it does
What's state ?
like storing a value
like if you want to count the number of times the debug call is made.
It isn't what I'm looking for but I'll that in mind
I may have hundreds of items in my inventory. So I'm hesitant to do that. I'm making a Tarkov-like inventory system where there's no limit to how many items you can have in your inventory.
But if it's the only way, I'll look into it. Thanks.
avoiding rep notify sounds insane as f
i would be suprised if you can have a working mp at all
If you are going to have a large item, look into fast array
but that's CPP
^^
bp multiplayer is limited so, better know your limit
I'm not avoiding RepNotify, I'm avoiding updating the other 100 items with every item update. But I'm probably wrong. I will research more about this
Some c++ solves this neatly 😄
if you have many slots but not many items, you're probably better off replicating an array of just the items with their positions.
in c++, you could diff the array every replication and only update the widgets that get changed. i believe this is impossible in bp
From my understanding, you'd need to replicate all the items to begin with anyway. After that it'll just be the items that are modified.
You can locally keep a copy of the array thon
And thus do a delta compare and trigger delegate with index that changed
durrr yeah you def can I am narrow minded
While you still end up looping, you dont have to update all the unchanged widgets
Yea, it's probably desirable to reduce network traffic for those that spam open/close their inventory.
Heck even the slotnitself can track what it last displayed
The slot index doesnt really change, only its content
So it can do a delta check
Does itemid differ? Update everything...
Else..
Did amount change? Update amount
though if you really want it to be like tarkov, make it take up as much network traffic and CPU cycles as possible 😃
It's very hard not to do that
For the longest time i cleared all the inventory slot widgets and remade themb
Was pretty noticable
Both visually and framespikes
I still do. 👀 (initial setup of course lol)
(Thats the thing i guess, i stayed with initial setup untill i abandoned it for a new project 😂😂)
I'm actually working on something that has different slots that need displaying. Doing it properly this time. (my 3rd iteration that I'm actually happy with)
Still working on that 3rd edition quest system
Hows it going? Have you made much progress?
Lets talk about the weather instead
Oh dear. lol
I need to do some more work on my version X of the quest system idea I had. Not needed for my current project though so it's been tossed to the bottom of the pile.
so what would make sense more, the In game menu widget be created and refed on the game instance or on the game mode ??
just thinking cause the game mode would only be their for when in the game like not main menu
as I'd have a specific Game Mode for when in Main menu
Not sure why game instance would come to this
game mode is fine imo
I have a game mode lobby
cause game instance is their from start to end of the duration game is well loaded
I tend to have it spawned and created from the Player Controller. I wouldn't normally store a ref too it though as you wouldn't normally need to do anything to the in game menu unless you're in it.
well it's cause my options stuff in within the menu it's not seperate
ok? why should that spawn your main menu
it doesn't, I would have a main menu version and then an in game menu version. this is so visual and logic differences can happen and be done
Options data shouldn't be stored in a widget. They should be stored somewhere else and the widget fetches the data to display it.
thats what I'm doing, but I still need to find a suitable place to spawn the widget so it's there and can be made visible or non visible depending when player wants it
I have a widget stack manager on the HUD class that allows me to push and pull common ui widgets so I can do it from anywhere. Because they're activatable widgets I don't have to worry about it. Just push when I want it visible and deactivate when I don't. If the previous widget is still valid the widget stack will just display it again.
hmmm
You have to remember that widgets can take up a lot of memory after all the various images are loaded so it can be good to not keep the around if you don't have to. (granted this is dependent on what images you're using an how many)
even if it's collapsed ?
what if I created it and removed and added it to viewport when needed would that still take up a lot of memory ?
im trying to get the display name for a hud weapon, it should work because i have made a bind direct to the base gun class, and done a check to see if the player has a weapon. nothing is updating though
Yes, collapsing just means it's not included in the layout pass so can be good for performance as it can skip it. The elements themselves would still be loaded though, ready for that moment you make them visible.
what about removing and adding to viewport
If you remove it from the viewport, the widget will stay loaded if it's referenced anywhere. When it's not referenced, it can be garbage collected.
I think I might have the HUD spawn it actually just thinking cause I'd need to take in stuff from the widget to pass elsewhere and I feel HUD might be better place to do that
stuff like when audio slider is moved I'll need to pass new value back to where it needs to go so it can be saved etc and same other way round so getting the values
but then again if I do it on the HUD will it be initlised early enough
hmm actually HUD may be too late in the flow to init the Menu widget
well in game menu widget
My instanced struct idea seeeeeem to be q good track tho!
Good to know. I have mixed feeling with instanced structures. I just wish you could create instanced structs as an input without first having to use the make instance structure node.
Cant you?
I am currently using them for my interaction system in the current project I'm using. Most of the interactions are the same type of thing so opted to give instanced structs a try. Seems to work pretty well. I specify the interaction object I want to run when the player interacts and then pass the payload which is an instanced struct array.
I didnt actually test the incoming struct, but was able to plug it directly atleast
@dark drum how would you do the widget init stuff if I created and destroyed it when I needed it and didn't ? Would you have widget call local functions on construction to grab the data or have the think creating the widget auto pass it through the details through a init function ??
Yea, you can do this, but not ideal if you want an array of them. (ignore that this calls itself)
Yea, on construction, I'd have the widget fetch the data it needs and update accordingly.
fairs
Nono, i.made a vector struct that i passed inn
Which i hesr now makes no sense buut i did 🤣
Can you show me an example? I'm not sure what you mean lol.
I hate when that happens. Nothing worse when you think, 'I'll quickly load this old project to see how I did X' 30 minutes later. 🙄
But you were right, it didnt workn
Without make instance
Atlesst not with my current setup
I couldn't figure out how to do it without it. It's the only thing I don't like about using them. Granted, using them as vars works well though.
Alternative would be some uobject thing but feels just ss troublesome
Third option would be a functiom for every base type
But thats also messy
so got a question if I have a Map and I need to set a specific value within it what best way to do it ??
I had a crash course in Instanced Structs recently. I found them incredibly annoying to use in BP. The non pure helpers are kind of annoying. They make pure nodes out of shit returning arrays, and non pure nodes out of things that should be... But even past that, instanced structs don't currently support bundling. :/ Which is a massive downside.
IMO I wouldn't use them as anything more than a wildcard in something like a messenger at runtime.
Thats what i need tho
A wildcard
As an input for updating/checking/probing the quest system
Atleast ... that was the idea
Thinking about it now...
Location quest would just get the owning pawn and use that
No need to feed it into the quest system directly
So i actually just need a new tasktype
Im on a quest to make my questsystem flexible
Capable of doing any quest
What I mean is that I wouldn't put them in any form of static data like a data asset.
Without me defining strict rules for what exactly that means
If you're using data assets and you need a wildcard for data, you can always use instanced objects.
Wouldnt that too be cumbersome to work with?
How so?
Create uobject of type -> set value?
Or is there a neat trick i dont know about? 😄
any way to get this smoking animation from fab on my metahuman? its facing down as well
does anyone know if there's a place to see all enums in UE and what the values are?
Instanced objects work identical to instanced structs in this regard. If you have a property of one on the class and you populate it in the class, that object is automatically created along with the class and the instance. Can be somewhat useful for runtime stuff, but much more useful for static data in data asset.
For instance, take this code....
UCLASS(Blueprintable, DefaultToInstanced, EditInlineNew)
class USomeSubobject : public UObject
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadWrite, EditAnywhere)
int32 SomeIntegerThing = 32;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
float SomeFloatThing = 33.f;
};
UCLASS()
class HOMESTEADGAMEPLAY_API USomeDataAsset : public UDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
TObjectPtr<USomeSubobject> SomeSubobject = nullptr;
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly)
TArray<TObjectPtr<USomeSubobject>> SomeSubobjects;
};```
This is a data asset with a default object and an array of default subobjects, you can do it either way. They're instanced because of the object's specifier, DefaultToInstanced. You can also explicitly mark the pointer instanced too if you want.
In a data asset, you can populate these same as an instanced struct.
I created a BP version of the subobject for example.
Has a new boolean in it.
Ah yeah this is cool, im using this all over my quest setup
My wildcard was intended to be an input to the questsystem
Another alternative i can think of, if im sticking to a function call with wildcard input, is a custom union struct, with static functions for serializing typical data types, and deserialize once inside the QuestTask with another set of functions
So whats actually passed in is a custom struct that basically is just an array of bytes
Hello, ive been struggling all day trying to set a variable for a simnple task, ive been here for 2 days now could someone please help me. my project is due in less than a week i dont have time for this!!!
Click where it says 'Branch' and show a screenshot of where it takes you.
So the issue is that where this logic is, it doesn't know which 'plank' instance it should be using. Where do you set the ref to 'plank'?
in this one
If Plank is null, and you set Plank from Plank, Plank is still null.
how do i go about setting it, this has caused way too much frustration
I strongly recommend the BP communication video in the pins. It's a couple of hours that will make things like this a bit more clear.
okay ill have a look at that but, is there a way of doing this for now? i dont really have time to be watching relly long videos atm. thanks
Unsure. Your logic is confusing. I'm unsure why the class Plank has a variable named Plank, that points to an instance of Plank. Why does one plank need to know about another plank?
The interface implies you intend to pick up a plank. But you're having plank pick up another plank. So I'm not sure what the intention here is. Do planks hold other planks somehow?
no, im trying to pick up the plank, which i want to "go into my inventory" which isn't a thing as its a simple point click adventure, si im just trying to destroy the actor and when the rapids is clicked it un hides the other plank on the rapids bp
So one plank needs to know about another plank to unhide it?
Is the level hand made? Like you've preplaced planks in it?
so one plank is a blueprint, the other plank is just a mesh on top of the rapids that is hidden
But is the level hand made with preplaced planks?
Then you'd probably want to make Plank in the blueprint Instanced Editable(which you've already done). Delete your beginplay. Then you need to click on the first plank in the level and look at the Details panel where you can see the Plank variable.
You can then pick the next plank from a dropdown or with the dropper.
I'm assuming you've done these already since that is instance editable, or no?
i havent tried that, but i have the plank on the rapids hidden in game, so i can toggle the visbilty once the other plank has been picked up
What does the interface do? Because i'm not sure it's necessary here.
You can simplify some of your stuff a bit.
i thought i need an interface to communicate between the blueprints
Not really. In fact in my personal opinion an interface is one of the very last tools you should consider for it. You can cast generic references, or get a component from a generic reference. In your case everything is happening through this one class Plank here. So there's not even any need for casting or interfaces. You already have a casted reference set from the instance editable property.
oh okay thank you, that makes more sense. im going to try this now. thank you for your help!
Hope it works out. 😄
Personally I would say that until you understand more about how UE works and hierarchy, I would pretend they don't exist. 😅 Save you misusing them.
how do you make the green function, mine appears to be blue
Make it a pure node in the details panel.
thank youi
it ahsnt worked out for me, been here still trying to get it to work
Hello. I would like to author a conditions system where I can define a blueprint that has a function called "Condition" that returns true or false, then have subclasses of that object that can do "and" and "or" and stuff, and importantly author these entirely in a data table without having to make separate assets for them. is this possible?
Some c++ and instanced uobjects would probably get you there
hmm. last i tried i was unable to add a uobject to a data table
Instanced ones should work fine
Altho And/or easily gets complicated with ordering etc
Yesh its a uclass property
EditInlineNew is the marker if im not mistaken
sorry i know a lot of C++ just not a lot of UE C++ 😅
Havnt specifically tried it in a DT but cant see why it shouldnt work
Erh i think the uproperty must be set to Instanced
Let me check real quick
yea i tried another editinlinenew in my data table and wasn't able to get it to appear in the data table properties
haven't tried that hard. let me see what i can cook up. so i need both DefaultToInstanced and EditInlineNew maybe?
I think i marked the property instanced but they should do the same if inunderstood Authaer correcrly
Hmm if youd nest the condition with the and/or it could prob work
which config is the one that runs when i double click the project file? so i dont have to build them all
"Development Editor" ?
oh yea F5 true
hmm yea it does not appear in the data table
funny that it has a column but not a row in the row editor
yea i was thinking that
in the meantime i'm trying a c++ struct instead of a blueprint struct so i can try the editinline specifier there
thats what im testing aswell
is there a way to dynamically declare a new blueprint class at runtime?
no dice
dang
Data Asset next ?
yea i've never done those before so i was trying to avoid it 🥲
they work splendid for nested stuff like this atleast
quest/task/condition are all instanced uobjects
Not extremely readable atm but with some meta specifiers this could be cleaned a tad
i'll have to change my blueprint data table to a code data asset?
If you want this sort of thing, yes
Gut feeling would say no
Wouldnt expect it to be possible from blueprints
Construct Object "Blueprint".... But then how do you set up any properties within it? And then actually use it?
this didnt get pretty 😄
lol
my problem is i have a bunch of existing data tables that are from blueprint structs that reference other blueprint enumerations and structs and i would have to move everything to C++
That is an advice i'd give you regardless of this
any structs should be declared in c++
bp structs bring some corruption risk with it
and it can get really nasty
yea i've been careful but it's still been weird
plenty of people have had crazy experiences with it , and some get along with it just fine
not a risk i would take ^^
is there a better versioning situation when it's in C++
as in, when i load a save game that is a struct and it has V1 on the disk and i can convert it to V2 so i can load old save game formats, for example
You got more options for converting them afaik
Also feels like a chicken egg situation cause who's gonna compile that BP and execute it
Some VM weaving lol
So Using "get overlapping actors", I was really confused because sometimes it was getting the actors and sometimes it wasn't. Well I came to realize something.
Actor i'm wanting get overlapping actors - 'Box Detect'
Actor i'm wanting to get detected - 'Jeff'
If I make changes to 'Jeff' then it will stop detecting him, I then have to delete 'Box Detect' in the level and put down a new one in order for it to detect it. Any idea why?
I think the closest you can get to that would be changing blueprint property values using the editor utility blueprint, and that only just recently got added. Probably not helpful information at all though 🤣
you could set a flag on your struct, and have a manual convert function, and select it depending on the flag on both structs, like V1 to V2 or V1 to latest
What kind of flag do you mean?
Ai that can write, compile and run itself. O.o
man, this looks perfect... anyone heard of anything like that for unreal
https://youtu.be/JiLEkc4G_F0
How to use the auto tile feature in Godot, it is easier than you think and this short video will get you started.
If you have any questions please let me know and I'll see what I can do to help you out. I did gloss over some things in order to keep the video short and bite-sized.
Tile Set Logic Video: https://youtu.be/z-6VfnoPi5w
If you would...
or rather, any idea at all of how to start programming it
I dont even really know how to ask this in the first place
but heres the one I set up manually myself, and as you can see it doesnt work for 1x1s because it doesnt have every possible sprite made for that. and even if I did make all of those, theres no way in hell I could get the logic working on top of everything else already
@sacred canyon I don't know what's the video about but if you want to generate dungeons you can look at wave function collapse.
A hidden int32 id or key
@sacred canyon are you doing 2D? If you are why are you using unreal? 2D support is non existence / abandoned.
Yeah you will get that a lot if you are giving impression that you are doing 2d with unreal in blueprint.
there are plenty of reasons to use unreal for 2d games
yeah Im 3 years into this project and have only ever used exclusively unreal so thats not gonna change any time soon
My condolonces
Not saying it's not impossible. Ofc it's doable
Just not the best tool for the job
I know, this is one of the many setbacks its given me
Yeah the tilesets are rough imo
im curious if there is a better way of handling this?
I want to play an animation and then once its done, move on to the next animation
Isnt there some delegate? OnAnimationComplete or BlendPut or smth?
I couldnt find anything similar to those phrases in the BP menu
Might need to hook into the animInstance
If these are ment to play in order, couldnt they just be combinednin a single montage ?
if you are doing a combo, this is not the way
make a montage and add an event at the end of the montage and listen for the event
also using play animation means you aer giving up your anim blueprint
or just use the play montage blueprint node, which has an OnCompleted output
its a combo system that you would chain moves together, not really a set combo
then this is not the way, regardless
move 1 (H,M,L)> move 2 (H,M,L) is how I plan on having the combos. Most games have a combo system where each move is different
its hard to explain without examples
yeah
You want to look into input buffer
like DMC has single moves that you chain together
though the concep[t is simple
thats a different function
this is literally just putting out the animations
theres a specific function that stores the next move
store inputs within a given window, have any logic you want
play the animation when your buffer is closed
simmiliar to tekken
or whutering waves
btw wdym by "window"?
means time
like in tekken you can do left down right arrow key, followed by a punch
oh yeah
the user are given a window to enter the inputs
When the window is open you can store the inputs, then you proccess it when the window is closed
this is pretty different to a standard fighting game
how "different"?
well its more of a turn based game
this is 1 of the combat systems
you input a combo, then the enemy does. During the enemy turn, you have to figure out how to parry their combo
putting the logic aside, start impriving your code by playing montage.
yeah, someone else suggested that on another server
and someone else did a few seconds ago
If I have actor components, is it better to use an interface to interact with them or access it directly?
refactor that first imo.
was reading through a marketplace addon's Blueprints and they use interfaces
don't use interface like that
damn that's horirble
