#blueprint
1 messages ยท Page 281 of 1
Well I'm early enough that I can tweak stuff
Life soo much easier if you just use GAS
You can also put tag on component and check Component Has Tags
but cannot be Game Play Tags though
The tag container is already in ability system component
Inferior
Life would be easier if they add a gameplay tag container to the actor class by default. ๐
Wouldn't use that for a status effect, ever
Maybe but probably don't fit for every project? I dunnoe
Making base class in cpp isn't difficult, often people use interface for the wrong reason.
If you are doing RPG or the like, it's better to get familiar with GAS
Don't have to reinvent the wheel
How about I add a HealMultiplier variable... And add a function to set it
Is GAS even that good?
Yeah, most people that used it have nothing but praise
I find it so broad that it becomes kind of redundant in a project by project basis...
It's what epic fork from their work with fortnite
The only reason I've not used gas is because of the minor c++ requirement. But... With rider working well I might actually look at it lol
At the bare minimum you only need the attribute declared in cpp
Then work with blueprint can commence
I make most things uobjects so I'd imagine it'll feel the same, just a different base class.
Alright, alright
You've convinced me...
I'll try to figure out how the heck to use GAS
Since I am not smart enough to do all this myself
there are a couple plugins available on marketplace that simplify the setup for you whilst having the same system setup as regular one.
Documentation / Discord Server / Example Project / ChangelogLast Update: Nov 12, 2024 (6.1.1 for 5.3, 5.4, 5.5)GAS Companion aims to be a general base for GAS powered projects without making any game design choices. The various parts of the system are intended to be subclassed and customized per project needs.It includes the necessary initial C+...
I don't think I wanna spend money on GAS before I see if it's what I need
fair enough
@frosty heron I can't do this to save my life, but what was the cpp related process to add GAS?
I know I have to add a few lines of code
Declaring the attribute
Someone probably have covered it on youtube
My advice would be to get rider running first
What is Rider?
Working with vanilla visual studio as is, would be equivalent of using note pad and that will be overwhelming for people not familiar with cpp.
As a newbie I need the auto complete.
Ide
Like visual studio but the one that works with unreal
Actually the project by project basis is part of the perks. Cause it's an already set up system that you can just start using.
Hm well
I don't think I need IDE atm
But I just need to figure how you even set up GAS in UE, I just know it's weird
For a basic quickstarter. You add an ability system component to an actor that needs abilities. You create a GameplayAbility blueprint to do stuff. You grant the ability to the component, and then you activate the ability.
No I mean, I need to setup GAS in the code
Like I know I have to add a few lines before I can even use GAS, just don't know what or where
What's the dummy simple way to do ability "slot" binding, TryActivateAbilityWithTag?
@frosty heron Alright I think I did the setup. My current goal then is to convert what I have to GAS...
Since I'm using a lock on system I have to figure out the targetting first
That's more quick than I though
My locking system isn't really tied to ability, I mean you can if you want
It's just a component
Yeah it's a component for me too
I'm just not sure how I should access the Target variable... Should I cast?
You seems to be afraid with casting
It has almost no cost. The issue is having a hard ref to bp asset
That will load the depdency
If you already have rider setup, then I pray you just make a base class
Casting to native class cost you nothing.
Interface is not a replacement for casting, it's a terrible way people try to go around having a hard ref to a bp asset ( which they will end up having anyway sooner or later )
As for your targeting you can just get component by class
Yeah i'm wary of casting mostly because of hard references but did learn they are not as bad
Can be really bad, it depends
Which you can worry less if you have native class
The ability already have pointer to its owner
Get actor info in gameplay ability
Get actor info -> get component by class -> my targeting comp -> find target
I have enabled 'Hidden in Game' boolean for an actor but for some reason when initially loading the project it still displays that static mesh component. is there a way to disable it from the start
inside the editor
Hidden in game will hide in game mode
So I use the Get actor info, and pull Owner Actor
You mean like for a hotbar?
Set vissibility if you want to hide it in editor
Weird how Get Owner doesn't work that way
Get current actor info already return the owner actor
rendering -> visible?
Yeah, or just a quick and easy way to activate ability number 3, or activate MyCharacter.LightAttack, whatever it may be
Current Actor Info or Get Actor Info?
I don't remember, the two should give you what you need
You just want the avatar actor
That will be the caster so to speak
worked. thanx
Depends on your preference. You can activate an ability by class, tag, inputid(that you assign when granting it), or event(also kind of by tag), or by applying/removing a tag to the owner of the ability.
For a player pressed hotbar, I'd be inclined to simply do it by class to allow easier UI customizations.
@frosty heron Alright done, got the Avatar info and all... The ability now compiles
Compiling is one thing, are you sure you already have gas setup? That's very quick
You need to initialise your ability component
Via init ability actor info
So button would know the class, and that's what gets passed along? It seems so awkward that you can't just have "slots"
And you need to decide Wether to pop the ASC in the player state or the character, depending on your project.
I suppose by saving the FGameplayAbilitySpec would work too, you can activate by that I think
I tried to ask you but the response didn't really help me understand
What else do I need to set GAS up?
Assuming this is a fresh project
You can probably look at videos on yt
But you will need to declare attributes, have attribute sets.
Initialise your ability system component.
From there you can create gameplay effect to initialise your starting attribute
I thought you meant setup like, in engine via adding lines of cpp code?
You can do it by input id too. But GAS isn't there to make hotbars. Abilities are many different things and how you define your actions is entirely up to you. A shooter game for instance might not have hotbars. Something like Magicka might not have traditional hotbars either. Things like WoW with 999999 abilities per class requires a much more in depth idea of hotbars and player owned management of them.
The only must requirement in the cpp side is declaring the attribute
Most of other things like initialising the ability system component can be done in blueprint
I can second this. VS would always shout at me before I had even done anything. Rider is significantly more pleasant.
Intellisense is borked out of the box. It doesn't understand unreal macro.
Rider (jet brain) also have plugin for visual studio called resharper. It would work the same with the plugin and some people prefer VS for debugging.
Not free however, so rider is probably better option for many indies
I don't like using AI stuffs though
No one mention AI
I thought people used Rider for AI
Atl east that was about the subject for the only times I heard about it before
Also they can predict allright
It's free for non commercial
When you are ready to sell your game you can just get the perpetual lisence
Well no rider for me then
But it's free? If you gonna release a game anyway you should fork some money
Yes but consider this, I live in Argentina
I have to pay like 50% taxes for stuff like this
You need 100 dollars to publish in steam
You selling this unmade project already?
I know, I will spend money, but this is spending money on a paid alternative of something I have for free in VS
Putting Descartes before the horse here
Rider is free for non commercial project
Try it first then make your decision later
I am just planning ahead, that's all..
Preorder that Lambo
If you are serious with making a video game you shouldn't gate keep your self
Well fine, I'll get Rider
But I still have the entirety of GAS to figure out, so that will take a bit...
GAS seems to have a learning cliff
Hmmm, no idea where to start exactly
@frosty heron Is there some specific setup Rider needs for UE or just installing with default settings work?
got a question what would make more sense, I have a Player Stats struct for things like Health, Stamina etc. I am thinking of the following two options A - I include in this struct an Known Item class array for item classes player has picked up. B - I have within the inventory Actor component the Known Item Class Array for item classes player has picked up.
any ideas which would make more sense out of these two options ?
@frosty heron Hey... The Rider plugin is not compatible with UE5?
Been a while but should work out of the box.
You still need to install visual studio with the required component though
Compatible with all version
Alright did it
Develop .NET, ASP.NET, .NET Core, Xamarin or Unity applications on Windows, Mac, Linux
@frosty heron Alright success, I set Rider up! Thanks
I want to execute a python script from my EUW blueprint. The script is in the same directory as, or some where relative to my EUW. how can I execute the script with a relative path?
If there was something that just gave me the path of the EUW i'm executing I could go off that, haven't found anything yet
ref to self -> get object path gives me where the euw is being executed from in game, not where the actual file actually lives
@frosty heron Just checking... Would you mind a DM?
Better post here, I just started work 
There are a lot more helpful people other than me
We should move to #gameplay-ability-system then
i was curious if i could get some help im having the issue when i try to do a loop the camera dosent rotate with the character and so at some point when i hit the loop the forward and reverse input swaps so instead of the W key being forward and S key being reverse the W key Reverse and the S key is forward here is an example clip of whats happening
here is a clip of me manually rotating the camera to get what i want but i want the camera to automatically change its rotation
what does a known item class mean?
like how in Roguelikes you can have unidentified items?
So it's classes you've already picked up, basically do of say you've never picked up a battery before you'd get a inspection widget thing
ah
yeah that should be a property of the character state, not really its inventory
Awsome
that way inventories just do what they say, and you don't have treasure chests with known item class arrays on them
Yeah makes sense. Just thought obvs with player stat having health and stamina on it didn't think if the known picked up classes would have been a fit in that struct as well
I was thinking on right track though it seems it being within player stats struct
I'm trying to make a trick system in my game where you perform the trick in the air, it adds points depending on how many tricks you do while in the air, and when you land on the ground it takes that points variable and adds it to the player's speed. How would I make that? (I FIGURED IT OUT BY USING EVENT ON LAND)
I'd have at least 3 structs
1 for things with stats like hp, stamina, etc
1 for inventory
1 for TheProgressionStateOfThePlayer
Well the inventory is have as its own struct which lives on the inventory actor component
The player stats one has the struct for like there health, stamina etc
I haven't yet got to stage of putting in anything for progression
I'd call it stats
and put progression in some other component, since presumably enemies don't have progression stuff
Player Char has Stats, Inventory, Progression
Enemies have Stats, Inventory
Chest has Inventory
i was curious if anyone knows how to fix this funky camera
6dof gets funky, you gotta do things differently
what do you WANT the camera to do when you run around a loop?
So would you say I'd be better container stats etc in a actor component that will live on stuff that'll use it ?
Rather then how i do it now which is the logic etc is purely on play character
If other things than your player character are going to have stats, then it makes sense to make a stats component
Nevermind I know what you mean now haha
As a bonus, your damage system can go right to the stats component
Hit -> get component by class -> modify hp
So i can make it a component it wouldn't have much in the component though as it'd just have a struct in it which would have the various thing
Yeah that makes sense for ease of doing something in a simple way, I'll prob do something like that
to always look at the back of sonic here i manually rotated the camera but i want the camera to follow him automatically from behind
.
you can skip the struct layer
StatsComponent.HP is great
Instead of having the camera/spring arm just using control rotation, you need to directly set the camera/spring arm's LOCAL rotation based on control rotation
Yeah i only put it in to contain the stats but obvs if I'm going with component method then as you say struct is then kind of redundant
On the character player or enemy its an pointless struct
yeah that's the typical approach
as a bonus, just slap a StatsComponent on anything and voila, you can damage it, do whatever
you'll want to use delegates so the actor the component is on knows when its been damaged or killed
I think I'll keep the struct as something that you can get from the stats component say if you want to in bulk take all the stats each one if that makes sense
It would make sense if you had gobs of stats
like path of exile
or base / derived / double derived
Well at moment i have been using the any damage and apply damage event things
you can skip all that
Yeah I was thinking of doing that anyway
As in just implement my own method of damaging and healing which will be roughly like you've already outlined
you can do it like this
Weapon:
hit something -> get component by class StatsComponent on HitActor -> do the damage thing (Apply Damage would be a function or event in StatsComponent)
StatsComponent:
ApplyDamage -> modify hp -> oh shit we died -> call OnDeath
WhateverActorHasThisComponent
Stats.OnDeath -> do the actor-specific stuff that dying means
A door might be like:
Stats.OnDeath -> open
While a character might be like:
Stats.OnDeath -> ragdoll -> spew loot everywhere
but the weapon JUST talks to stats component. Thats it
Yeah that makes sense
At the end of the road this takes you on is GAS, which is basically just bags of stats talking to other bags of stats through abilities
but don't jump into that until you've made a small system yourself first
Yeah I think i tried GAS a while ago and I ended up getting quite confused with it that for my game I ended up realising it wasn't at the level to fully utilise it
This is a bad question that I'm bad for asking, but is there a way to move the root of an actor WITHOUT moving every single instance of the actor in every level you've ever used it in?
what do you mean by "move" the root?
spatially? Or change which scene component is root
Hey guys , quick query here.
I created a User Widget in BeginPlay and Set its value to a UserWidget Variable HUD.
Now i Got HUD for a Custom Event ( Say Notification ) and connected the value of HUD to a Function (Set Notification Say), but i keep getting "Accessed None Trying to Read Property HUD".
Whats the issue? ;-;
I checked IsValid after Setting HUD on BeginPlay but the issue persists
All in the same BPC btw
is there a limit to how many layers deep I can pass through data in bp? I've passed a data asset through a bunch of functions and was getting an invalid reference when the input being passed in was definitely valid. is that a stack / buffer overflow thingy?
Spacially. The problem I'm trying to solve is, I've got an AI actor that's targetting a different AI actor. The latter is a very common type I've used all over the place. Thing is, the latter's built so the root is at the base of it (it's a turret emplacement) and so it's usually slightly underground. But my AI targets things by using GetActorLocation, so it gets THAT, and then the targeting trace fails
You could probably make an editor utility blueprint to move them for you
they do need to be moved if you are offsetting the root at the class level
how many maps are these things in?
not that many. Honestly I should probably just bite the bullet
I doubt it buuuut... ๐คทโโ๏ธ . If it's 100% reproducible, then I'd assume you're overlooking something. Pointers don't just null. I'd never rule out an engine bug, but I also have personal experience staring at something for hours, only to ask about it and get something that should have been obvious pointed out. ๐
Can you share code on this? Because created widgets should not null if they're either added to viewport or in a class variable.
Thanks for the help! I've checked and also no reference in any functions. I'm still lost ๐ฆ
The last thing I can think of is fixing redirectors and then rebuilding lights,paths etc...
So Im trying to find blueprint A inside of blueprint B. Does a sizemap of blueprint B also increase if blueprint B is referenced by blueprint A? I thought not, but thats the only link I can find now..
It could be that BP B references a BP C that references BP A. ๐คท What does the size map look like?
I thought seeing as that one is on top its directly referenced. The reference viewer also implies that I believe
Size map never to be trusted from what I read
No need to be so cryptic. ๐ In all seriousness it is difficult to gauge anything from screenshot like this. Kinda need to see the full picture.
Sorry, didnt want to flood with noise. Just bear in mind I'm trying to fix this reference spaghetti ๐
Ahh ok so it's literally 99% of the size. O.o do you have any interfaces assigned to the BP? (Regardless of if you've used or implemented them)
I think that's because sometimes it still shows connections if it's in the undo data. Something like that. I could be wrong of course but it normally shows what I would expect in the end. Especially after I've saved all changes and restarted the editor.
Yes, one
Does the interface have any functions that use that class?
No, just one function with bools and a string as input
๐ค hmmm I'm not sure I can think of anything else.
any way i can set the player as an enemy ai can recognize?
Are you using perception?
Plenty of way. You can just check againts the class
yeah. ai perception
๐ฅฒ Thanks anyway
Which two classes were the problem? Like which links to something it shouldn't?
BP_EnemyManagement is in the reference viewer and sizemap of BP_PopupMessageHandler. Which I don't expect, because there is no link or presence whatsoever in the BP (anymore, I removed them)
Copy the BP_PopupMessageHandler to another project and see what breaks. ๐ (as in what errors you get)
There's still something there if you've compiled and saved the BP, closed the sizemap and reopened it.
Look for blue pointers. Purple class pointers, and even SoftObject types of the class on any function inputs, outputs, or member variables. And check any nodes that are unhooked, etc.
If I ctrl+F the entire project on BP_EnemyManagement I only find hits on the BP_EnemyManagement itself
๐คทโโ๏ธ I've never had the sizemap be wrong, personally.
You said there's nothing but a single function in it. Can you screen the BP?
What can I use to get value that slice the red region to front, rear, left or right side?
Hi, anyone able to help with talking through inheritance with Blueprints?
Basically making derived classes and want to actively access Child class components it will have.
So as a quick example:
Actor_EntityBase -> A_Human + A_Animal (deprived classes)
And
Componet_EntityFoodComp -> C_HumanFood + C_AnimalFood.
Each Actor having their respective Component (Animal having AnimalFood Comp), but i also want to make derived classes further: IE A_Animal -> A_Birds -> A_Crow. So i'm thinking naturally I should make different Comps for the Entity Deprived Classes, so IE C_BirdFood, but im somewhat unsure how to access these specific components through the child actors.
So in the example: if i set A_Animal to have C_AnimalFood and i want A_Bird to have C_BirdFood how do i do that? since C_BirdFood inherits from C_Animalfood - is there a way to make C_AnimalFood that C_BirdFood in A_Bird?
I messed with Add component by class in parent but that does seem to only bring out the Base Parent class as a actor reference.
Currently im thinking just to keep the A_Animal empty of C_AnimalFood and only add the specific component to the unique Bird Class.
so, instead of A_Animal having C_AnimalFood it'd just be A_Bird that has C_Bird, with the parent just being there solely for functionality and no implementation.
But i think i am getting tunnel visioned or doing bad practice, so i wanted to ask around for that stuff and see if there are other avenues to approach it.
Any links or information is helpful.
Can you show your child actor component
you might be using the buggiest unreal engine feature which most likely will never be fixed
Something like this should get the angle. Then you can check it's value.
So you have actors that are children of a parent actor but want each child to have their own child of a parent component?
Yeah.
So All birds are children of Animals which are children of Entities.
And birds have a BirdFood component that are children of AnimalFood Component - to Entity Food Component.
What would the component be doing exactly? What would the differences be?
Why does each animal type have their own component, sounds very counter intuative
Well in my head i was thinking, instead of a large bloated component that checks whether the entity is Animal / Human it'd be better to make specialised components that do the specific things.
Animal Food comp deals with generalised stuff - where bird food would add in the bird aspects
I mean yeah now that you asked the "what are the differences" im thinking its too much and like ColdSummer said Counter intuitive.
So what would the component actually do? It seems like something that could just be a variable or maybe a data asset.
You make common functionality in the base class
such as Eating()
Animal have method to Eat
because all animal needs to eat
then in the derived class, you can override Eat
I'd have an eating component that uses eating behavior uObjects that can then be either specified in the editor or dynamically changed at runtime if needed.
Hey, I'm curious about the performance difference between using Event Dispatchers and custom functions in Unreal Engine. Both require a target reference, so is there a notable difference in terms of speed or overhead?
I feel like a component just to eat is very overkill, just my 2 cent
sounds like something that can just be embeeded to the animal class
unless you want to make the behavior for different classes
and make it more modular so it's not attached solely to animal class
Yea probably, I guess it depends on the end goal.
but if nothing else implements eating, then why not just encapsulate it in the animal class
They're not really comparable in my opinion. One is an actual function where the other used to trigger a function called is bound delegates.
The main thing the component would be doing is:
Degrade current hunger, check if its meeting any thresholds to cause hunting or foraging / dmg self, see what preferred "food" it has / poison etc
But i guess in my head i was thinking for each Animal type it'd have to be a different Class
but they all can derive from Animal
It sounds like the Food component would just be a single component with vars (Or even data assets) to control the other things. These can be set in the children of the parent actor. Event dispatchers can be useful in the comp to tell the owner when stuff has happened so it can do things accordingly.
Ohh okay
So using custom functions works best for frequently called events like 20 times in a second
and event dispatcher works more like a messanger who is always ready to deliver but not frequently
you really shouldn't be worried about such things. Unless you are looping over a large quanity of data, chances are what you are doing is peanut.
if you are not working on procedural generation or heavy queries, just don't worry about performance until your fps is actually tanking
Event dispatchers are just a way of broadcasting that something has happened without it needing to know anything about the things listening.
and if you can't sleep at night then just profile it
Some people even fear line trace on tick
like 10k can be done without a hitch per frame from what I heard
Yea procedural is the only time I would say to think early on because that stuff gets muliplied fast haha.
okay thanks
Little things like multiplying by 0.5 instead of dividing by 2 can make a difference when called 100,000 times in a tick lol.
It'll be the same speed in bp and c++ will usually optimize to a multiply anyway
I find it fascinating that division is still pretty much a brute force kind of operation. Them mathematicians need to get on it haha.
yeah i do see that now, i think.
To clarify, what i think you meant it could look like:
AnimalFood -> Crow / Robin / other animals
I think because i was trying to categorise it by types i went down the rabbit hole.
"oh these are all birds, lets make a animal child class for Bird and go down from there"
But with your input and Pattym it has been helpful, in my opinion so many thanks.
Funny enough it's often faster to just do more math than try to memorize variables in hot loops like that. I got far more perf calculating the neighbors indices of a pixel every time than saving them, for example.
Animal -> Bird, Dogs, Human
Bird -> Crow, Eagle, etc
Dogs -> ShibaInu, Pitbull, etc.
Don't subclass past Animal imo
true
Unless it's data only like BP where you just add some components.
I admire the people that spend time figuring this stuff out and sharing the knowledge. It's not always needed but when you do it can be a god send.
Everyone knows divide is slow but going to cold ram is about 3x slower
It's interesting that a floating point division can be faster than an int division. Makes me wonder in what conditions that would be true. ๐ค
I don't know, a bird would probably need to handle it's movement differently with it needing to fly. It'll probably have ground movement as well. I guess it tends one what they'll be doing.
There's two causes. For starts there are special coprocessors that make floating point arithmetic faster. And secondly there are assumptions you can make with floating points that you can't with integers, like sometimes being able to turn parts of it into a multiplication which is much faster. Since integers require a whole number precision it complicates the operation a bit.
Ok thank you, now i just need to elaborate that with my brain
You have a MovementComponent and the data for the MovementComponent for a bird allows flight in addition to walking
My Collision Capsule is blocking my projectile hit but i have the collision setting set to "ignore" for in the capsule component collision settings. Whats causing this?
i want my projectile to hit my skeletal mesh component because i want to retrieve the bone name from the hit
are you sure it's hitting the projectile? Print string the hit component
if it is, then triple check the capsule comp collision settings and the projectile object type
If you want to hit the skeltal mesh, use physic assets
what are those
Physic assets is pretty much what defines collision for your skeleton
btw weirdly, it works after the character is dead, it hits the skeletal mesh component
ah ok so it will only hit the skeletal mesh component if it has physics assets assigned to it?
Correct
otherwise there's no collision to collide with
i guess thats why it works when my character is dead?
I don't think that's related at all
but collision can be tricky sometime, you have to go through the checklist
for now I will just print the component that is actually being hit
Also taht's how you get the bone name. By assigning collider to the bone in the physic assets
yeah so right now its printing capsule component when alive and skeletal mesh component when its dead
i will triple check the collision settings
post them here if you need someone with fresh eyes
I gotta hit the hay though, good luck
@glass blade btw it could be that when your character die, you set simulate physich on
and maybe the capsule component becomes ignored
if you are using default TPS character, it already come with physic assets
maybe that's why it hit your character when it die
hmm..i will investigate this. ty
What would be best for a popup message (for example "Not enough resources" "Invalid placement" stuff like that) I now add a widget and have a handler that does the animation on the text inside the widget and hides it after. Or should I create a message widget that gets added to the viewport and then removed after "Playing".
I just started deleting sections of the blueprint until the sizemap was small ๐
Found it. It was a event call (without a cast before it, it was unused) that was inside the BP_EnemyManagement. So a ctrl+f wouldnt find it. Note to self: If I encounter this again then also ctrl+f all events from the referenced blueprint ๐
CC: @dark drum
Yeah. Always check all pins for called and member functions, and all class properties. If the sizemap says there's a link, there's a link. ๐คทโโ๏ธ Glad you found it. ๐
Anyone know what this could be?
Do you have multiple editors open?
No sir
I would check your task manager as well if you've opened and closed Unreal recently to be sure a second instance isn't silently crashed. Alternatively double check this folder and it's parents to make sure that they're not readonly. But the map failing to save is usually that there are multiple editor processes running.
Alright, I see this in my task manager
Odd reference. O.o But it seems that a Landscape2_CustomBrush_MaterialOnly thing references a second level somehow.
Is Map_NovaWastes your map?
And did you maybe copy something from it if it is?
I'm not sure what I've done, but yes that is one of my maps that I stream inside my main level
hello hello I need help understanding how data layers are actually working :
I'm running a OWNING CLIENT event to unable a data layer, but clients are not doing anything when running this code
And then if the host / server runs this code, then everyone sees the activated layer even if it's a owning client event ? I'm assuming there is a special rule for those layers into multiplayers ?
Do any of y'all know what this V means? I recently updated to 5.5 and I've never seen it before
Variable?
Looks like the icon from the add new menu so I am just assuming
huh, okay
ty!
okay yeah this is inside a function so I'm assuming it's a new visual affordance for saying it's a local variable
What class is this in?
well I guess I got my issue
then I dont understand, isnt the entire point of data layer to load / unload stuff from any cilent to manage memory and performances ??
Why does this soft class reference increase the sizemap? I thought a softclass only increases a sizemap if its then casted, but as soon as I delete these two nodes the sizemaps shrinks ๐ค
Because SoftClassPtr has a weak pointer of it's type. This is why you softref of the parent type and specify child classes in it.
If you have a SoftObjectPtr of type AActor and put a B_MyMainCharacter in it. It will not load B_MyMainCharacter automatically.
If you have a SoftObjectPtr of type B_MyMainCharacter and put B_MyMainCharacter in it, then it'll force load it.
Does anyone have any suggestions for how to handle movement for a caterpillar without using the character movement component? ๐ค
I don't understand what you're saying ๐ Do you have a "for dummies" explanation ๐
I also realized I said SoftObjectPtr, but it works identical for object and class pointers.
anyone knows how to load / unload a data layer on client only when they provide server only functions into unreal ? ๐ค
Soft references will still force load the class type you set it to but not the child you might populate it with. Not sure if that helps.
I thought this feature was ment to load and unload stuff from a client depending on where he is on a map
should I then use the good old level streaming ??
So anything directly inside the BP_Tower_base_parent in this case will still be loaded in, but not the (for example) meshes that are inside childs of that parent
So if you have a parent BP A and then children of it A1 and A2.
If you have a soft ref with the type A but populate it with A1 or A2, it'll only force load A not the children you've set in it.
This is why function only parent class can be nice as they'll be force loaded but be very small as they don't have any fluff in it.
Right, cheers!
So no one knows about the data layer stuff ? x) It's part of the world partition system
The first part is that every class has a CDO, a Class Default Object. This CDO is what you're avoiding loading when you don't link to it. The CDO is used to create instances of things. So you have to have the CDO loaded to create instances like SpawnActor, CreateWidget, etc. You avoid loading CDOs because some of them link to heavy assets like sounds, textures, etc.
Okay so the way softobjectptrs work is that it is like a struct with a weak pointer and a disk path. This weak pointer is the same as a hard pointer as far as linking and forced loading goes. And this weak pointer is what you're picking when you pick the type of soft ref it is. So if you pick Actor, then you're hard linking actor to the BP this softref is in. If you pick B_MyMainCharacter as the type, it'll link that.
Linkers are what you see in the sizemap. These are caused by hard(and weak but you don't see these in BP) pointers and the dark purple class types.
So if you set a soft pointer to AActor and put MainCharacter bp in it. Then it will not force load MainCharacter. If you make it's type MainCharacter, then it will force load and link to MainCharacter.
This is why the majority of softrefs can typically be asset types. Like a softobjectptr to a static mesh or texture. Or SoftClassPtrs to main classes like AActor, UUserWidget, UActorComponent, etc.
Thanks for the info! Appreciated!
reminder that under lumen gi, ao does nothing
When you learn that root motion is handled by the character movement component. ๐ญ
I'm trying to make my FPS arms follow the camera but I cant figure it out and "Use Pawn Control Rotation" is turned on also
You normally do this the other way around. The arms are attached to the camera.
the character mesh wont go to the camera it says "the selected component is inherited and cant be reordered here" but the camera will go to the character mesh in my situation and it doesn't make a difference
Add a new skeletal mesh and attach it to the camera. Remove the arms from the default mesh. Check out the first person template.
got a new issue after bringing over everything to the new skeletal mesh the animations won't work anymore after switching to gun
also I cant delete the old character mesh
You don't need to delete it. And what animations don't work?
just the gun and axe equipping, I tried to use animation asset to see if it was too far but that wasn't the case but basically it isn't behaving the way it used to
Hello! Just a quick question if anyone knows on the top of their head. I'm trying to find a node similar to "Set Actor Location And Rotation" but I'd like to move over time instead of an instant relocation to the line trace hit. Is there a node that I'm just blanking on or do I just need to build that myself?
FInterp To or TInterp To
Thank you! Takes a bit to figure out what nodes are already made lol. Tried looking for something similar but all I could find were pages talking about the node I was already using and off topic stuff.
Not sure if this is the right channel to post in, but I don't see anything directly related so this is probably the closest.
I'm working on a game project that has a submarine the player should be able to enter and walk around in as well as pilot. I'm creating a super basic hollow cube with a door hole for now (in blender). I just wanted to test things but the collision is broken, particularly when I attach the mesh to a blueprint for setting up the controls. I'm creating the UCX_[modelname]_00X meshes, and it seems to mostly work if I just place the mesh in the world (though even that is funky). When I set the static mesh component in my blueprint though it basically just stops working altogether.
Please feel free to let me know if I need to move this post or if there's a better channel.
Here's some pictures
Exterior Blender
Interior Blender
Unreal results as static mesh in level
And there isn't much to show for it hooked up as a blueprint unless someone wants to see specific settings, but it basically just ignores collision altogether or has me bouncing around with some sort of collision issue whenever I step inside as if it can't determine how to place me
Any help is greatly appreciated
The weird visuals on the collision inside of unreal concern me slightly, but it does still seem to work fine just placing it in the level
Hi all, wondering if someone can help me out with this issue I'm having with damage in my game. Basically the player can deal damage to a tap, turn on the sink and if they go in the sink they take damage. The damage is dealt through component overlap with a box collision and a retriggerable delay checking if that specific class of player is overlapping.
The issue is, any player that goes into the sink and takes damage that manages to get out of the sink alive will essentially can't take or deal any damage, other than falling into the kill volume when they fall off the map. Screenshot 1 with the green background is the 2 sources of damage the player can deal, a headbutt and a kick, screenshot 2 is how the sink deals damage to the player once activated, the 3rd is just how i define when they leave the sink, but I figure that will be an issue as it's not specific to just 1 player, it's up to all 4 of them at once, so now im thinking that this is the issue after typing all this...
I can't say for sure that it will solve the issue, but is this using an interface at all? If not you could try setting up an interface for any actors that need to be able to deal or receive damage then call those functions for any overlapping actors in the collision logic. I've had that be useful for me in the past when doing things based on overlap with delays. Not sure why it helps given that the logic tends to be the same between just coding it out per blueprint or using the interface
Also, sidenote what are you using to get your graphs to look like that. I kinda love how clean it is
I've finally started looking at GAS and have successfully used the Jump ability. ๐ The question I have, how would I go about making the ability to move an ability? By default this is done by adding movement input (which I could do from an ability) but is there anyway to get the input axis that would normally be provided by the input action?
I'm using interfaces for character spawning via the game mode blueprint, but I'm not entirely sure how I'd go about setting them up for the characters as its up to 4 instances of 1 character BP, unless I'm able to use an array similar to my game mode stuff?
To answer the graph question, I'm using electronic nodes and darker nodes, both paid plugins via fab, it's also how my editor is purple
I'm still a bit rusty and re-learning things myself after years of time not using the engine, but this is how I did it with my interaction interface for piloting things or opening doors or whatever
It's probably not efficient if you have a lot of potential actors overlapping given the loop, but I imagine you could tweak it to use tags or something and just change things to use your damage calls instead of the possess I'm doing
with would you ever put a posses ?
interact -> overlapping actor == Door -> Door Actor, Execute door rotation with a time line
Oh this one isn't for a door it's for a vehicle
There's every chance that's still not a correct way to do that, but it's working for testing taking control of a submarine on my simple project
Thank you for the plugin info btw Matter
ha yeah it was in reference with the guy above.
I think you got that wrong cause the overlapping component is the head actually, so your trying to apply DMG to the head component instead of reaching for the player itself and apply DMG to the player
with the water volume you cant just check what are the overlapped component ? You dont need to double overlap like this
people are usually overthinking stuff and making things too complicated also if you showing screenshots, unless it's super simple part of code, we need to know where you putted the code
Especially when we see "self" what is "self" if we cant see the class your coding into ? Barely can help TBH ^^
IMO if you overlap with a volume, you should already be able to see what component overlapped (foot / head etc...) then from there you get the player owning this head / foot, and apply DMG to them
If your trying to do localized DMG, you should also consider having a collision capsules on your charactere with physical materials for "head / foot / legs " etc...
im just confused now with how doors and vehicles came into it and seeing what overlapped with foot or head
i guess i wasnt clear describing what each image contained
but the overall issue was that when players overlapped with the volume in the sink, taking damage, and managed to escape, they would be immune to the "Apply Damage" node i'm using to deal all my damage. so the only way to kill any player that had gone into the sink would be to walk them off the map into a kill volume
This means that something happens when your head is overlapping with something, right ? x)
and another with your foot
it means it started overlapping
that isn't a "is currently overlapping", it's a "wasn't overlapping last frame but is overlapping this frame"
your right, it started overlapping, but I dont see what those are doing here into a code that is trying to apply Dmg when you are into a volume
And then when the volume stopped overlapping, then you apply your invincibility to the type of DMG applied by the volume
also I was waiting for you or squize to be online x)
Could you help me understand why data layers are "server only events" when trying to activate a data layer at runtime trough blueprints ?
in this code only the server can activate a data layer, and then if the server does activates a data layer then every client sees this layer...
Like whats the point of this system if each client cant have it's own layers for optimization ? Like Player A is on the top and sees the top layer / Player B is at the botttom and sees only bottom layer ?
If you activate by event, you can send a payload
Look into the application of tags btw, like blocking tag for example.
You can just add DeathTag or interacting tag to block the activation of jumping.
GAS is soo nice.
The common way to send data is also to use target data but if you are not doing multiplayer, maybe overkill? ๐คทโโ๏ธ
Can anyone give me some points on how to handle updating an UI without cyclic dependencies (and decoupling in general)
I have a TowerManagement blueprint that handles spawning and placing a tower. This works fine, but now I also want the UI to update when selecting a tower. I currently have it implemented as in the screenshot, but I feel like this isn't the best way, because now the tower management also has all the info of the UI_Defense, which seems excessive.
Does anyone have suggestions on how to properly handle this?
So never tell UI what to do. Instead UI reach its owner
Let UI job to read
Never do character -> hey UI update something
Instead character -> broadcast my health changes
And anything that listen to it including your UI will update accordingly
So use event dispatcher, they are great.
I have no clue what a data layer is
Your tower management shouldn't need to know the widget at all.
Yea that's what I thought, I'll take a look at Event dispatchers. Kinda did do something with it, but I believe I ran into an issue and it still was coupled where I expected it to not be. I'll give it a whirl and if I run into the same thing I'll let you know. Thanks for the info!
it's part of the world partition system that lets you add actors and stuff to a data layer, and then make those layers visible or not to load and unload stuff to manage memory usage ^^
But I dont understand how you can manage this client side ^^
To me this is an ability question more than a UI one. If you have a UI that can pick buildings to place. Then you should have abilities that can be activated to start placing buildings. All the UI needs to care about to display correctly is the ability list, and how to query if an ability is active or not to display if it's the currently selected building ability.
So I have a "system" setup so you spawn with certain tags of the player starts. However all players only spawn at 0,0,0. on the other test project it works but i cannot see why it isnt working on the main project
this is the error i am getting
Do you have enough player starts in the map?
@dusky cobalt Yes i do, i even put the same as the other project file
Building System is quite big system usually because you need Grid/Placement Area. You need preview of building when you ''spawn it'' so you can see where it's gonna be placed, and then after clicking you spawn the ''real'' building on the place of the building preview. You need to trace the preview on tick or timer by event at the location of your mouse. This can be put in like: BuildingPlacementManager, Building (itself) BuildingPreview and PlaceBuildingWidget (innitiates event on Manager to ''Activate Building Placement''. Manager can also check if enough resources or do other validations. The other validation is CanBePlaced which is traced in the BuildingPreview and updated on tick, so before you are about to place the ''real'' building and you click, you need to validate if the placement is right from the preview. More or less something like that.
Hi all, I'm currently banging my head against the wall trying to get an NPC to face the player more slowly after interaction and playing a sequence. Been troubleshooting this for a couple of hours with little luck. I know the RInterp speed is much higher than it should be but anything less and the NPC doesn't fully rotate 180 degrees to face the player. With or without the Rinterp he instantaneously snaps. Any advice would be appreciated.
Can you show more code how you get the start locations and the tag thingy? The error says that it cannot get anything from the array like it's empty (the player starts). So the starting problem is that you are not getting any player starts. How do you get them?
Try to multiply Get Delta Seconds by like 0.1 or less. Also because you use RInterpt i think you dont have to take only Z as it's only for rotation?
I moved on from that for now and started looking at a sprint ability. I was able to get it to set the max walk speed when activated but I can't figure out to stop it when the input key is released. I guess I have some more reading to do. ๐
is this in construction script of gamemode?
can you show scrrenshot from construction script
@dusky cobalt actually it isnt sorry
yup
here you go, so basically you need to filter a bit the way you get all of it and when you shuffle and give transform
so at construction script all u care about is all actors with tag, and want array, nothing else
as you have array of the starts already, then you can use it during the handling start of player
you can get random from the array, then get transform from it, spawn actor there, and remove this start from the array (so players cannot spawn in 1 spot)
Get Random > Set Current Start > Get Transform and then Remove Current Start from Array
ill try that ๐
and the name of function can be Get PlayerStart because the ''tag'' thins yu handled in script
so now you just getting playerstart or even ''location''
and not exactly player start
Hmm. Similiar issue. It prevents the NPC from turning 180 degrees to face the player.
@dusky cobalt okay so out of curioisty in the test project that it works in, it only works on one specific map. If i change the map it doesnt work
What I would try: Put it on tick, if it works on tick, use timeline.
If this doesn't help, try to work with what values you are giving to this function (maybe on internet someone has better examples)
I would just put actor location or rotation. and to target just player controller location/rotation, it should figure it itself (i think) if not then keep trying different things, but firstly, just put it quickly on event tick and see what happens, btw this Interp value might be capped between 0 and 1 and g iving it more than 1+ it might setting it to 0 which means it's instant
did you place the starting locations in the map and gave them tags/
in the new test one yes
i also found something like this: you might need to be updating the new location or something like that
Note: When using the interp-to functions you have to keep updating the "current" value, otherwise it's just stuck trying to do the same first-frame over and over again.
yup!
they should be both either Gamemode Gamestate or GamemodeBase GamestateBase
ye they are the same
any more context? what is new? what did you change?
I originally had it on a tick so he was constantly following the player, but without the Interp. It worked fine then but since I need this rotation to happen after the sequence plays, is when the snapping became an issue. I saw some timeline setup so I may try that method next.
@dusky cobalt i sent u a dm with more info to stop bloating this
ok, so if it was working on tick, use Set Timer by Event, set this timer when the sequence stops playing, wait 5second and disable it (clear and invalidate timer).
it's basically tick that you can turn on/off (ofc you can do the same with whole actor), just need to set it to looping and give it low timer to update like 0.03 or a bit more depending on what you want to achieve
Thanks. Will give that a shot.
if you need help let me know
Issue with Free Head Movement While Sitting (UE5, Blueprints)
Hey everyone, Iโm having an issue in Unreal Engine 5. When I disable "Use Pawn Control Rotation" in my blueprints, it prevents the character from rotating with the camera, which is good. However, I need to make it so that when the character is sitting, I can freely move the head while the body remains in a looping animation (e.g., an idle sitting pose).
What Iโve tried so far:
Disconnecting camera rotation from pawn rotation โ but it still affects the body.
Using a separate animation blueprint for the head โ but I couldnโt get smooth movement.
Does anyone know the proper way to set up free head movement while keeping the body in an idle animation?
@misty jewel you can control the head transform with the bone transform node.
Ofc set limit so you don't twist your neck
Use interpolation too if you don't want to snap the head rotation
Here is example how it works right now.
Try using montage
That should lock the root
I'm using Anim montage for that, if you could look up there is code.
Need root motion in your anim for the root to be locked
That should work
It not works ๐
But from my experience playing montage with root motion will drive the capsule according to the root motion
And this is for your idle anim?
Disable use pawn control rotation @misty jewel
That should be the case 100%
And now what you have to do is to transform the head bone as long as you are seated
That fixed one problem
He instantly snaps because you can only ever change the rotation of the dude ONE TIME with your current code. You can't smoothly move something without updating its state every frame for a duration, meaning, use Tick or a Timeline
But still as you could see right now there is sort of flick. And I'm unable to look up and down.
make the capsule visible
so you can tell if it's rotating with you when you sit or not
the "flick" is you going back to the exact same "rules" for orienting the capsule as before you sat down, which is probably to orient to control rotation
I moved camera back and set capsule to visible.
yeah the capsule isn't laong for the ride
basically your animation ends with you looking backwards, then you go back to your regularly scheduled programming which is to look forwards
is there a way to get a random point on the nav mesh inside a specific box?
something similar to GetRandomReachablePointInRadius but inside a box?
If there is nothing then you'll probably have to compose it
what shape is this box? Square-like or long and skinny?
either, both, just curious if theres a way to grab points on the nav mesh to spawn ai to rather than the radius node
Sounds like EQS
So when your animation ends (start sitting anim), you stopped the montage
Imo what I would do here is to have the sit idle as a montage too with root motion
So the character will stay seated and locked
Rest is just moving the head by transforming the head bone
Make the head orient to your control rotation
This is the whole montage.
What do you have in your control anim notify?
Did you re enable rotation again? I would keep it disabled
You don't want to move the character at the time you are sitting. You just want to move the head
I wanted to restore the ability to freely look around, but that caused problems with the whole character. The initial idea was to lock the controls before the animation so that the camera would move nicely from the head, and then unlock them when you sit down so you could look around.
Or you can just snap control rotation to orient to the sitting position as soon as you sit and take it from there
so when you go back to control rotation calling the shots you're not lookng through your own head
Looking around with your head doesn't mean you rotate your whole character with it
The idea is the character is not rotateable
Just the head
stranded local variable issue.
converted a function to an event. before i did so i deleted almost all the local variables and just used the input param pin instead. however, i missed one local variable reference.
work continues, and i now have the local varaible getter in my eventgraph. clicking it will crash the engine as it doesn't exist, so its undeletable.
anyone have a way to fix this? feels like a landmine potentially.
if i click the hand param, engine crashes.
Source control is probably the only hope
Other than that, I don't know what can fix bp corruption
yea ijust... my CL is long in this file, so kinda mentally deciding what form of hating life to choose.
like, do i leave it there for 2 hours work? ๐
It's not a perfect world
My bp also corrupted (silently)
And there's no way but to redo all the work
Now my workflow is have almost nothing in bp
yea i am way too close to shipping for that but next time prob do the same.
If you just use blueprint, most of the time it's pretty safe though
i'm using C++ too but usually only when i need to
But there are casses with yours I suppose
Yeah just becareful with adding and removing comp
im going to try to snipe it
by creating a variable with the same name, but i think i have attempted this before.
Fingers crossed
When doing motion driven by animation, is there a way to disable acceleration/velocity from it and instead move exactly where the root motion defines
Using montage will purely drive the capsule component with root motion. Nothing else is accounted for (acceleration, current velocity, etc) they all get overridden
I had motion inherited once you left the montage though
You can call stop movement at the end of the montage maybe. Not sure how I would handle that but maybe worth a shot.
Atm I have nothing going on after the montage ends
No ongoing velocity etc. So I'm not sure what happend on your end
Maybe I don't play with breaking and accelerating enough
I was in the flying movement mode
I will share you what I got after work. A way to detect input and released delegate inside the gameplay ability
Remind me if I forgot
Driving myself insane. Think I may just be tired. But I cannot get my settings to save and load. Functions are in the game instance, Load Settings on Event Init and Save Settings on Event Shutdown.
All the functionality for the Controls settings UI seems to work. Atleast visually. If I change the defaults in the save settings clas variables, they are reflected in the UI.
But I am not understanding how to actually save and load between sessions.
This is the Controls UMG, it loads these settings from the struct, which applies them to the UI itself.
But how would I then GET these variables to store them in the save game object?
I figured I would apply them directly to the save game object? Then I can just save???
This is how I am saving simple location for the player, which works absolutely fine.
But I cannot figure out how to do similar for settings
its not setting the values in the struct?
Basically, how do I fill these variables in in order to save them?
but its fine with setting the transform?
Setting the transform is fine, cos I GET from the player character, the information I need
These variables are stored inside the Widget.
Can I just keep a copy inside the game instance?
I think I may have just solved it myself
usually if yo uneed to stash some stuff the game instance is the place to do it, sure
If I just create a struct variable of the same type inside the game instance, and set those values from the widget?
Instead of having values on the widget itself
too tired / stuck in my own problem to fully wrap my head around your setup, but if the widget is not around and you just need to store some stuff from it
u can stash it in the game instance
if the issue si the struct values aren't setting
maybe it is something to do with set members etc
Looks illegal to me
Having values in the widget is always no no. Any variable in the widget should be related to widget only (e.g. page etc.)
Don't have hit point for example in the widget.
Widget job is just to read
You can do widget -> get character with the struct -> set struct with param
I have this problem where the child actors aren't appearing the place they should be on the skeletal mesh
I have a line trace that's inside an object, and it's returning an impact normal of 1, is this normal?
Is there a way to make it so that the top line and bottom line are read in an "AND" function? in english this should read: "When overlapped with the triggerbox3, if the F button is pressed, X happens"
Sorry for the late reply ( i was sleeping ) , figured it out. Turns out the struct i was using had a type specifier in its code ( for some reason ) , which overrode the datatype i assigned to the variable through my editor. thanks for asking though' : )
Hello everyone! Im looking for support in procedural random creation of a level. Heres my current concept, but im having hurdles:
- Create a parent module for each type of section. (Combat section, Health and rest section, platforming section, etc.)
- Create personalized children modules of each section parent.
- Each parent would have a section of code to spawn in the next section.
- a random child would be selected.
The issues im having:
- Currently, I cant just randomly choose between the children of each parent. Right now, I get around this by making a DT with every child in it, and then randomly select an integer to choose from that DT. If theres a better way to do this, I havent found it, but I'd love to hear about it.
- I can't seem to call events from the children. Right now, I have an event that just changes the size of the floor, as a test. Later on, there would be seperate events, like placing spawn points randomly and things like that. I need to be able to call an event on the spawned actor, right after I spawn it. I have tried to make the class in the parent, but I can't call that because the parent doesnt exist in world.
I don't know what parts of my code would be helpful to look at, but im happy to provide screnshots as needed! thank you in advance :3
Goal:
โ If item exists, increase count in the same slot
โ If new, add a new slot
โ No duplicate slots!
Issue:
โ Doesn't increase the number
โ Might be messing up indexes vs. values
Should I use โSet Array Elementโ to update?
It doesn't help that this loop ends up completing way too quickly after the first loop body
Find into Get into != Doesn't make sense to me
How is it supposed to be unequal if you found it
I think you want to just do a Contains check at the start
Instead of that find/get setup
You might also want to consider cutting this setup in more reusable widgets. The combination of image and text for quantity shouldn't be 16 single widgets. You rather want to make one that has the setup and then place 8 of them.
maybe describe what it's supposed to do... because it looks wild
Well they did
my bad
Bit confused why this function gets a generic texture pointer but then access the items array later down anyway
Seems like the items array already contains the information of how many items per type exist
Looks like it might be way easier to just looping over the keys of that map and spawning/setting a widget with the item key and the matching value entry
might be enough to to a find on the items map, increase the result by 1 and add it to the map
the find should return 0 if the item isn't in yet
Items is never modified though. I assume this is their actual inventory already
i think they intend to modify it
even tho it modifies a copy currently with the ++ node
Right. That might not be intended then I guess (modifying the copy)
I feel like there are too many arrays and maps in this.
Issue:
โ Doesn't increase the number
so that can be nailed down to modifying a copy
If it's the modification that fails then a SetArrayElement would solve this
Well actually
It's a map
So an add call with the same key I guess
And the new value
which brings us back to my suggestion ๐
Yeah I didn't realize the count is incremented and expected to be saved
I thought they would check if the element exists and then increment some int on the widget.
Too many arrays
yea it's super confusing, because it could probably be 5 nodes
Not soo much bp related but I haven't been able to get answer, can I quickly ask about loading object with co await
What if the outer destroyed before the object is loaded
Do I crash?
depending on what you do, yes
Asked there 3 times but no answer ๐ฆ just thought I could ask one of you since I know you use ue5coro
you should check the things you use after the co_await to be sure that they are still valid
Ty just hope I don't go down the rabbit hole from abusing it
Like
Sfx = Co await ur5coro::loadobject (mysfx)
(Sry typing from mobile)
But the actor is destroyed before the object is loaded
I wonder if I'm gonna crash but don't even know how to test this
you crash 100% because i had that problem before ๐

but at least the callstacks are usually giving it away pretty obvious
the nasty thing is that it's often not showing immediately and months later you hit the edge case once
Right I am going to approach this more sanely. Thanks
Need more cues.
hi, i want to package a game im working on, but keep getting visual studio related issues. I did install all the required packages, including those MSVC build tools, however my packaging keeps failing. Now I have a dirfferent output, but still can't really figure out what to do to package successfully.
Any help will be greatly appreciated ๐
You're missing the correct build tools most likely.
I appreciate the answer, but the question was about something else ๐ I have a system of building, the question I had was about updating the UI when selecting a build tower, currently that is what was in the screenshot ๐
Why is there a delay before the interp?
The whole point of interpolating is to do it over time (use tick)
Yea, that would be helpful. I've only been learning GAS for about an hour but I have noticed a lot of the information seems to be spread about. ๐
Hi Guys,
I've stop programming for a bit and i hope i didnt lost the fundamentals.
My problem is that i'm trying to start the level when both players collide with each other box collider.
For the server is working but i tried everything for the client but i'm not able to pass the result to the server, meaning that i created a bool that turns true but when the client collides the server still see it as false.
The reference photo is not the only method i tried, I tried putting a run on server event but nothing, I tried coding it in the game state but nothing, I tried RPC but nothing.
Event dispatchers are your friend. Have event dispatchers that get called when key things happen. The UI can then just bind to these and do stuff accordingly. The event dispatchers can then pass the relevant data so anything listening should have access to what it needs.
@frosty heron would I be correct in assuming there isn't any built in (BP exposed) functionality to bind Input Actions to gameplay abilities and is specific to Lyra? (I'm not using Lyra btw)
@primal summit client doesn't need to do anything.
What possible info does the client need to tell the server?
Absolutely nothing
On Hit -> switch has authority -> server travel
that's what im trying to do but i cant get to replicate or make the server change the bool when the client trigger the collider
its in the same level
cuz i want them to spawn into a collider and when both are in the collider i would start the timer
The only thing I snatch from lyra is camera feeler soo far. I can't read the rest of the code, kinda too cryptic and over engineered.
@dark drum I followed GAS tutorial by Stephen ulbardi
And kinda use his way of handling input
So by level you don't mean the world then
Can I update a single value in a strict stored in the game instance from a widget?
i have different levels, when they join the main game level they will spawn on a collider, when both the colliders are hit i would start the timer.
Not sure what strict stored mean
But whats the best way to handle client's result on server?
You can get game instance -> set something. Nothing stopping you from doing that
Struct, autocorrect
This is depends
Yeah nothing stopping you from doing that
Is that a uDemy course?
i think its on yt
would u help me pls
Yeah and despite what people say about it, it's actually good. The most common critique about deleting intermediate is misunderstood since the author already fix his workflow.
For multiplayer it's 100% the best resource for a visual tutorial. Multiplayer c++ shooter and gas
Why do you care about client hitting something?
You detect the hit on server machine
And do action accordingly
On hit -> switch has authority -> do something
Ahh ok. I'm not in a position to purchase courses at the moment. :/
Dont work, nothing prints in the server, i tried like this and without RPC.
check your collision settings
nothing to do with networking or replication
you need to ensure that the overlap happend
i happens becuase i have a print to make sure it works
but you said nothing prints in the server?
show the actual log
it doesnt print the boolean turning true but the print that the player collides yes
How does the gameplay tag stuff work in GAS? Is the container on the ability system component? Can you add/remove tags to it to automatically trigger/stop abilities?
The ability component holds tag container yeah
which is collection of tags
The tags normally granted through abilities
you can specify tags as requirement, to block ability, to grant another tag, etc
@dark drum I would probably work on the input first.
So it's printed, but you said nothing prints in the server 0o?
kinda hard to help if I don't get the actual info
the client colliding is printed on the client and not on the server
if i do an event on the server to check both the bools it will come out that the client bool is false
This is some misconception
switch has authority checks if the one executing the code is authority (server in most casses) or remote (client)
So when your clienty collide it will go to remote pin and print client collided
im not sure what other behavior you are expecting
and again I can't stress enough, why do you need to check the collision in client machine?
You care the collision that happend on server machine and execute your action from there
so don't have anything on the remote pin
Ok, I'll pivot back to inputs. ๐ Is the input stuff something I'd need to do with C++? (Beyond using the input ID)
I actually don't know how to use the Input ID 
๐ I'm not entirely sure but this works when giving the ability with input ID 2 but I'm pretty sure the Input Cancel would cancel all inputs though. ๐คท
Do you have any other sources for handling Input in GAS I could comb through?
checking some of the code I copied from the tutorial atm.
It sounds like my very noob C++ skills are going to be put to the test on this learning adventure. ๐
im total noob too, it;s no different than blueprint tbh. Just need to know events, param, functions to do the basic
() -> . and you are good to go imo
Yea, it's easier in BP though because you have a nice list for most things.
you have even more in cpp
bp only gives you what's exposed
in cpp you can look at the header file and see way more functions
Ctrl + T to search for things
Let me just skim through these 106 entries. ๐
okay, atm I am iterating through all of abilities inside the component and calling a delegate. I am not sure if you want to go with that approach
This is my aiming ability
My input produce a gameplay tag, then I map that to a gameplay ability.
The GA also listen for InputReleased delegate
so when the input released, I stopped aiming
i dont want to check it in the client thats why im asking whats the best way ๐
just have nothing on the remote pin
And the 'AC WaitInputRelease' is a function you've setup in C++?
I have found this article regarding binding IA to GA.
https://ukustra.medium.com/how-to-easily-bind-gameplay-ability-system-to-enhanced-input-b45ece2ca02b
Yeah cpp
What do you want to do when the overlap happend?
just check in the server if both are on the collider
i'm trying everything but i'm not able to change anything in the server side when the client collides
Overlap Switch Has authority already does that
it checks on server machine if the component overlap
you still haven't tell me what you want to do when the overlap happend
when the overlap happens i want to check if both the players are in the box and then start the game timer on the server
the game logic works i just want to make sure that both players are on the collider to optimize the game
this got nothing to do with the optimize
Overlap -> Switch has Authority -> Start timer
if client needs to know the timer then you want to replicate the time (float)
but if the client doesn't need to know the time (e.g. showing it in widget) then don't worry about it
the problem with this is that when the overlap triggers it will start the timer not caring about if the clients collides it. Cuz the problem with multiplayer is that the client will take more time to connect to the match. I want to make this code so the server waits for the client
and then starts the match
the client can't collide if they don't exist (haven't connect yet)
you need to decide your game rules
like wait for X ammount of player
or wait for minimum player
right now I can't even picture what collides with what
yh i know but i'm making the code for when he collides
i thought using box collider to start the game was the easiest way
cuz postlogin dont work because i already have that in the lobby
You can do it in anyway you like
So your issue atm is not even networking related
How about just checking every frame if the collider, collided with the number of players?
On tick, switch has authority, get overlapping actors filter by class MyPlayerCharacter.
If length >= get game state -> player array.number
Start game
That way, you only start the game when all players inside the collider
tick is not optimal usually
That's the wrong mindset, this cost you nothing
If things need to happend every frame then you use tick.
Of course you don't have to use tick here
You can check on every overlap and end overlap and update the count
But again, performance wise. It's peanut
Not gonna cost you 1 fps
Beside you just use it to start the game. Once the game starts just delete the collider
i even tried with adding 1 everytime that someone collides but it would come out server 1 and client 1
yes
Stop trying to do anything client side
Client data has no meaning in this context
im not trying to do anything client side thats what im trying to say
You only care if the server collide with the right number of player . Then start the game that's it
but nothing works server side for client
i know
I don't know what this mean
So logic to start the game is purely executed by server machine
#blueprint message
Try this maybe
with this you gave me an hint for a solution and i think i fixed it like this. It seems like it works now
Server RPC is Client telling server to execute a function.
You can start the timer in game mode as game mode only exist on server
you wouldn't be able to do mc event there though, GM not replicated
its not an RPC
when do you start the timer?
its just an event on the server
Custom event after the invalidate is the timer event
it works
thanks for the tip
"works" but I still see error in doing this X_X
You don't want a server RPC in this context
its not an rpc, im executing everything in the server
2 RPCS
Sorry for a beginner question but can anyone advise why this might not be working ? Created a weather data table and depending on the season, it sets the min max. Using a random number generator it should then set the weather but for some reason it doesnt seem to set properly.
The print string shows the value is being generated but for example when the season is winter and number is 34 it doesnt change the weather to Cloudy. Any help appreciated ๐
You probably need to cache the random value as it'll generate a new one for each exec node.
Can someone help me figure out why this doesn't work?
I'm trying to figure out if I need to avoid other npcs
Right now it just always says that I need to avoid
It looks like some of the logic is missing for the pastebin.
Works fine for me
Youโre picking the weather in a linear fashion with the branch nodes, so anything near the top rolls first before anything near the bottom
What you probably want to do is generate weights based off the numbers
So you take the input numbers and add them up
Say for example you have 5, 10, 15
That adds up to 30, so you divide each number by that
So 5 becomes .16667, 10 becomes .3333 and 15 becomes .5000
Then your range for sunny would be 0-.1667 cloudy would be .16667 to .3333 and rainy would be .5 to 1
Then you do a roll in the 0-1 range
And then you do a select based on that
You can also do a slot based approach
Where you have a fixed amount of slots, say 8 and you roll from 1 to 8 and pick a slot
If you want something to show up more often you just place more of it in those slots
Like say 5 sunny slots, 2 cloudy slots, and 1 rainy slot
Most normal people arenโt keeping tracks of specifics and slot is more simplistic from a design standpoint 
Ahhh I think I get you. My initial idea was just trying to be simplistic pick a random number and then what ever range it lands in, set that as the weather ๐
Thanks guys !
Thatโs not a bad idea, the issue was the further down the chain it was, the less like it was to be picked with your current approaches
Because the weather had to fail 7 rolls in a row for the last to be selected
Also, another issue is if it fails ALL of its rolls you donโt have weather 
Before completely abandoning this then could I just set it as a variable and then compare with all the ranges in a sequence rather than using 7 branches ? ๐
Itโs the exact same issue
The issue is the rolls are being evaluated in a linear fashion rather than 1 roll for all of them
Thatโs what the weight approach is ideally supposed to fix
You take the numbers and add them up. The biggest numbers relative to the pool are more likely to show up
Slot based approach is also really easy. You just store arrays of a weather enum thatโs say 8 slots, then when you need the weather chances for an area, you just pull the array, run a random integer between 0-7 (1 to 8) and then select it from that array and set that as your weather
Ahhh and then if you want say rain in winter to be more likely then you just have rain appear in more slots within the array ?
Yup
Rain, sun, thunder, clouds, there are a lot of different weather types. But how do they all work and what are their effects? This video explained everything you need to know.
Join my Discord server: https://discord.gg/TP8EGQG
Follow me on Twitch: https://www.twitch.tv/marcelvos
Follow me on Twitter: https://twitter.com/MarcelVos96
Join my subre...
Hereโs how roller coaster tycoon did its weather with a similar approach
Sweet, will take a look at that now. Cheers for taking the time out to help
Sure, hope you get it working!
Actually, taking a closer look, it does seem like you were using sort of the first approach I mentioned
The issue was you were using a pure node on the random number
So it was rolling individually rather than altogether
(Would still suggest the slot approach as itโs easier to author and implement)
But if you want to fix that graph, right click the random number and hit โshow exec pinsโ
Then plug it into your graph
Iโm deffo gonna give the slot way a try but Iโd rather try and learn why I was wrong as well !
So a pure function youโre letting the compiler decide the sequence. For most cases this doesnโt matter, but in this case it might be running the random number logic every time you do a branch
If you show exec pins, youโre picking the place it runs. In this case you want to make sure it runs before the branches and only once
Wait til you find out that you can add effects with effects, or remove effects with effects, or add abilities with effects, and then block the effect to remove the ability with a tag. ๐ GAS is neat.
And then use the result of that roll
Anyone know of a nice way of removing an ability in GAS? I can only find the way to remove an ability is with it's spec handle.
I ought to look more into GAS but it looks pretty heavy
You can get the spec handle by FindAllAbilitiesMatchingQuery or some of the other lookups.
Yea, im still in the exploration stage. Just trying to figure out how it all pieces together.
Ah, yea, that's what I need. I thought I might have had to get all the abilities and looped through them. ๐
I loop through my Abilities quiet often ๐
So i got my Jump and Sprint abilities working for the most part. I'd like the sprint ability to cancel if the player stops moving though but not found a nice way to handle it yet.
You can listen for tags in the owner. I have an IsInMotion tag that is ticked in the characters. It's a GE that is applied or removed that I can use it's tag to differentiate some other things like stamina use and whatnot.
So does the GE add the IsInMotion tag?
In the ability I mean you can put like a.. ListenForTagRemove or whatever it's called. And when that runs stop the ability in itself. That way it maintains all of it's own state. I think you can also use the tags in it's class defaults for that too. Should cancel if one of it's blocked tags are added.
Yeah.
Yea I just a tag to block sprinting if you're falling. (after you've jumped) but i probs need to reasses how the tag is added.
I use that currently to stop a hiding ability as well that requires the pawn to be still.
How does it perform the check?
To add or remove the GE?
yea
Simple velocity check on tick. Ignore my note of wanting to make something more generic. ๐ But it'd probably be the same thing, just in a component that I could apply tags based on conditions. At the time I wrote that I was considering applying different GEs based on levels of speed, movement mode changes, etc.
This is in the pawn itself. So owner of the abilities.
Do note in the GE itself I put AggregateByTarget with a stack of one. I did that to avoid having to code my own stack checks here. So I can repeatedly just try to apply the GE but it'll ignore it because it can't stack more than the once.
That's what I was going to ask. It seems a component specifically for handling the adding/removing of GE for specific states is in order. IsMoving and IsFalling being two I've could already do with lol.
Any others you can think of that will be useful?
Hard to say. Depends on the project I would suppose. I mean some things are more... System oriented? Like if you want special tags for being damaged enough, you wouldn't want the pawn to care about that really. But the character already mostly manages it's own movement states and whatnot since it's interconnected with the CMC that it makes sense to make it apply the movement ones.
Falling from a jump or falling from walking off of a cliff might be one. Which requires listening for jump and apex reached and falling movement modes.
I currently have a tag that gets added for jump and gets removed when the movement mode switches back to walking.
I guess a secondary more generic one for is falling would be useful.
All nice stuff that abilities can listen for. And the same state is easily usable in your animation graphs too.
In unity they have data oriented technology stacks, how about unreal
Unreal's default ECS at the moment is Mass. I've heard Mass is a about as fun to work with as driving a nail through your left hand and then clapping. But some people have implemented some Flecs plugins too.
Repost
At the moment I have my sprint ability modify the max walk speed, but would it make sense to have the actual change handled by a GE?
This is what I currently have for context.
This is... a rough question from a BP Only standpoint. Cause normally you'd let this be changed from attributes. Reason being is cause then you can make a delegate in the attribute set and listen to it in the character which changes speeds on everyone who gets the replicated attributes for the character.
For a BP Only I could definitely see this being an ApplyAndActivate ability that just listens for tags. But to work in multiplayer you would need it to set state only on server and in the pawn itself, and do some sort of replication in the pawn itself to set new movement speeds so that it updates to all.
@dark drum how do you trigger the ability using input atm?
Like this at the moment so nothing fancy.
Yea I was thinking about using attributes for the speed as currently it would only work with the movement component.
As for Apply&Activate I assume you mean an ability that never gets cancelled?
Does that play nice with prediction?
Question
Hello, I have a BP for a Static Mesh that I want the player to be able to pick up. It works with a Collision Box > SoundFX > NS > Destroy Actor, like in the screenshot.
I would like the Item to "float" up and down. I made a Timeline with a Vector Track and enabled the Loop function inside it.
The Item now floats up; but at the top it disappears and the destroy animation is played. Any idea what I'm doing wrong?
same caveat with any GE, applied tag is predicted if it also runs on local client, removal is not
with enough latency, GE tags would "rubberband"
for direct attachment from attribute to cmc, override GetMaxSpeed to get attribute from ASC directly
for indirect attachment from attribute to cmc, listen on attribute change, update MaxSpeed accordingly.
as for changing movementspeed based on mode, use override GE that activates based on tags, and use tags to switch between speeds.
To counter - I've also heard the opposite. I've heard that it is quite enjoyable to use. So, best to try it out yourself and see if you like it ๐
@worthy frost Tell Duro how much you love Mass. ๐
Personally. I haven't seen anyone use it except for dumb citizens in a city. If there was a more gameplay oriented demo for it, I'm sure it would be a bit better received. But as far as usability goes, some of the other ECS plugins seem better at first for incorporating gameplay easier.
First case. I make an actor and put a mass agent component on it. I want to spawn specifically 13 agents that follow this specific other agent around. I already cannot do this without digging into the spawner which is the only general example of how to spawn entities and going around it to get those thirteen specific entities and their handles. And using the spawner means I have to spawn all of them at once up to the max I could have and just disable some of them in their processors, and create that spawner actor for everything I want a group of entities to follow which is just a really stupid option.
@austere matrix Has been diving into and has been enjoying it. ๐คท
Define enjoy 
Na it's nice, it's just a little awkward sometimes
Definitely doesn't deserve hate
I'm try to have a realistic ammo management system and I can't quiet figure it out.
well, did you not notice that it goes to the find from the False of that?
thats a good idea, but how? Considering that it's not that easy
What's the problem, and what is a partial and full reload supposed to do?
I'm trying to set up reload system similar to battlebit or amra. Where the game remembers how much ammo you left in your mag in reload. It then cycles through all your magazines until it comes back to previous use magazine then i rember how much amoo is in and then set that to your current magazine.
The partial and full reload just mean if the when is empty or still has a bullet in the chamber.
So why not just model it like that
I'm not sure how to go about it. I new to the engine.
No there will be customization
But i mean for any given weapon instance
ah yes
I can't carry 30 and 40 round mags at the same time
ok so your weapon can have data like:
int RoundsInChamber (or bool, int might make it simpler)
Array<int> Mags
int MagSize
yeah
Is the only choice a player makes whether to drop or save the mag?
full/partial just depends on if the chamber is empty or not right
You can just have 1 reload event with a bool parameter for if to drop or not
you can even do it branchless up to the part where you determine whether the outgoing mag goes in the pack or is dropped
Yeah by default the player can either reload on empty or reload with a round in the chamber. However they can do faster reload by double tapping r.
Correct. They're nice for some things where you need an ability that can just maintain itself based on state changes.
I'm not sure. We don't really do prediction that much. Our current project is a strategy game and everything is pretty server driven. But I haven't seen a problem with it on clients with simulated lag in my personal projects that I'm doing similar ticked GEs for. So hard to say with any certainty.
Yeah I suppose it'd be pretty hard to mispredict an InMotion tag and have it actually matter. You'd only see CMC / InMotion tag get out of sync for the transients when you just start moving or stop
Guys, could someone please help me with a problem, regarding dynamic material instances?
So, I'm trying to implement modular metahumans in a character customization system from the marketplace called UCS, but i've ran into a problem in regards to changing the skin color and switching materials between genders. Basically, that system only had one material for its character mesh, while metahumans have different materials when it comes to their genders.
As you can see from my screenshots, to change color of the character, the system makes use of dynamic material instance, and I made it work with the metahuman too, expect the fact that materials are getting set to their appropiate gender materials only when finishing the character and playing on the level, but it DOESN'T work in the character editor widget when I switch the genders. It seems that it only uses the materials that were first set in the initialize function of the character component (there is a check for gender there), however, the material that is applied to both male and female is the male material, the female material is only applied when finishing the character.
In combopicker, where there is logic for switching gender, I tried to set material there, and also to create dmi like in the initialize function, so that when you switch the gender, theoretically material should also be set, but it doesn't work, it doesn't do anything, it seems that the material is stuck the same as it was first initialized.
TLDR: Creating dynamic material instance and using it to change the color of a character's mesh works, but materials don't switch based on gender, only one material is applied to both genders while inside the character editor level/widget (BUT when finishing customizing character and pressing play to enter a level, the character materials would be set correctly)
Where is the material being changed though? You're setting a new mesh. But what is happening after that? Are you applying your dynamic material again somewhere without changing it?
I will attach here some screenshots of how this system handles changing the color and where the parameters are applied. I have put some inputs there while trying to figure how to solve this issue (but mostly i don't seem to know what i'm doing๐ฅฒ ๐ )
But, the materials are set inside the create dmi's macro, on the source material, there I set the material
There is also a function (equip clothing), in which if the DMI materials don't exist, then it will be set as a fallback
Sorry if I can't get all the details, because this is not my system, I just try to implement metahumans into it
But what is different from the original system, is that I made a function inside the combopicker (i'm still learning and i followed a tutorial), where I have my metahuman (it is made from modular parts) set up for modularity, and for saving it in a game instance making use of character structure.
Maybe I could do something here? To make it work? Perhaps this part is not well integrated within the editor (maybe i have this issue because that part is only implemented within the game instance and save instance, but not within the editor?). But I don't know how I should do it, I mean, I tried to make it work at some point, and get hold of the mesh from here, but I don't think that it was what I should've done
wat in tarnation
my guy just copy paste those getters
it's logically the exact same, just now your stuff is readable because you can see where values come from when you're at the place that uses them, instead of having to visually follow a rats nest of wires back to the one getter node that 5 nodes are sharing
These kind of graphs are what made me learn C++, how the fuck do you work like that?!
I don't know the system. But my initial suspicion is that the material is being saved somewhere and you're accidentally reapplying it to the other gender on switch. But it would be seriously hard to track down in just images.
Hey everyone, has anyone else encountered collision issues in version 5.5.2?
https://forums.unrealengine.com/t/ue-5-5-2-whats-wrong-with-the-collisions/2312305
After updating from version 5.4.4 to 5.5.2, I encountered numerous collision-related issues. For example, the Charactersโ Capsule Components are not updating their collisions and Channel Response. As seen in the GIF, I am unable to dash through enemies, although this was possible in version 5.4. Additionally, it can be observed that I can do thi...
Hi gang I'm trying to get an mesh to move to a players relative location but only along a spline. So like the cone will move up and down the pipe with the player but only along the spline. But I have not worked a lot with splines this way. any advice?
Hey, whats the "best" (performant) method to activate an widget (and its animation) of a target?
Trying to re-create the LockOn-overlay like in Elden Ring (small white dot on the target to indicate that its the current locked-on target).
I want to avoid casting to the lockOn-Target. Is creating an interface just for activating a widget on the target overkill or is this the way?
i don't know bro๐คฃ ๐คฃ, i work by praying, mostly๐
Yes, probably this would be the issue, but I just can't figure it out
Component is an option
I realized that I was populating an empty array so now im trying to populate a dictionary
so if Branch is true then it means that it is a new item๐
If Branch is false then I need to count how much of a similar Item I have
It looked like this before๐
but the SET at the end still doesn't work ๐ฉท
everything else looks like it works, like, it creates new slots for new items โ
I have a feeling this Set Array Elem is kind of sus ๐
This whole thing is sus. It's hard to undestand what you're trying to do. Like why does a texture have anything to do with the count of something in an inventory? Why is the count being handled in the UI at all? UI should be reading from an inventory and that inventory should be able to provide the count.
he got a suggested solution and help this morning
nothing of this was done, as the screenshot is still the fricking mess from before
the whole thing is a fricking mess because it's over engineered
Any reason not to have a single BPI that all BPs use?
peeling away from hard references and thinking of having a bpi dedicated to UI, and another for player pawn and controller. But WHY would i want it seperate?
you are sus, you are still modifying a copy
this time one of the array instead of one of the value
you don't even have to loop over everything if you would just do it the way i've suggested
I didn't even read those text messages because I got no notification that someone was disgussing something about my code. Which is why I always reply directly to whoever im trying to reach
how?
The BPI won't necessarily solve hard refs, depending on what that BPI returns or uses. Your inputs and outputs of a BPI may use hard refs to types which would still cause those to load.
Organization is another key thing - you can know all the functions that are needed specifically for a specific type of interface at a glance - if you add every possible blueprint interface function in one interface, then you'll have a gigantic list of functions, and it may not be clear what you need.
There's also the benefit of being able to check if something actually implements a specific interface so you can know whether or not certain things need to be done if it does.
it is already reading form the inventory
Where within the code you've shown is it reading anything from the inventory? Everything looks like it's being managed within the UI, based on Texture2Ds using the "Items" map which is a variable that is contained within the "Central_UI".
if i plug an object pin from an async load into bpi blue pin, does that count as a hard reference?
It depends on the "Type" set fo the input or output. If the input type is set to "Object" then nothing futher would be loaded.
sweet.
crazy how it is more optimal to be less specific with variable types haha
Any base classes and the like too... So like "Actor", "Actor Component", "Texture2D" etc..
They're all already loaded... It's when you get into your custom stuff, then more stuff would need to be loaed if it isn't already.
in your name... casting creates hard references lol
And sometimes that doesn't matter. If it's already loaded and it requires the specific class, then there is nothing wong with casting.
ok so are you saying i should migrate the classes of the items instead of anything else?
because this inventory works with Item ID and data tables mostly
In our project, hard references are causing multiple files to get tagged for dirty/unsaved
by mostly i mean 100% works like this
the inventory system works fine, but now im not making an inventory system
im making an Action Control UI
although i am not sure which hard reference is triggering all that.
either a cast or a variable type.
like if i compile 1 file, unreal says 4 files need to be saved
so for example, you craft an axe, it's added automatically to your inventory โ
up to this point everything works
but now you also wanna add this to your action control UI<----- This UI controls what item is in your hand , so when you press "action" it makes an action based on what item you're holding
Which can be happening if you're casting to a class that you're constantly modifying along the way. If you cast to a base class that doesn't get modified that has all the potential functions and variables you can use, then subclass it and modify the subclass, only things that directly reference the subclass would need to be updated and trigger that dirty/unsaved behaviour.
in our case, we are compiling a buildmenu widget, that is not a child or a parent of any of these things.. yet all register as changed and need to be saved.
Have been making all my projects with hard references. Suddenly with this project, it is a problem because perforce is seeing all these file changes and this is a team project.
If you're modifying W_BuildMenu, and the other things displayed here are getting marked dirty, that's a good indication that they have a hard reference to W_BuildMenu, whether through casting, or a variable, or something else.
First dive into soft references.. Just wish the reference viewer could point to the node or variable that creates the hard reference.
is there 3rd possibility for hard references, after casting and variable type?
honestly, I dont even have to change anything in the buildmenu. Just hitting compile triggers a change for all the other files.
Again any functions that may use the specific type as an input or output... It's not just casting that can do that.
But I suppose that's just "hard reference" anyway ๐
yea true. hadnt locked in the input pin as a possible hard ref. Thanks for reiterating
do you have more information about this or even a video for me?
what are some ways i can disable diagonal movement? i only want to move up down left and right
can you please use @pings so that I can know whenever you're talking to me and whenever you're discussing between other users? Or replying same way Im doing to you right now whenever I wanna talk to you.
There's a text message being created here every 40 seconds and the chat gets lost pretty quickly and I dont always look what everyone says here because they're not always talking to me and I can't know if they're talking about me unless they directly ping me
and sometimes I try to read what people recommend but some answers dont make sense. Someone might feel like they're helping when suggesting me to use ducktape to solve my problems and getting angry about why I don't wanna use or don't understand the utility of that solution.
TL;DR Note: I can't read your thoughts to understand what you always mean & I dont have spidey sense to sense when someone talks about me with their friend without directly pinging me
And your action control UI should be reading everything and making it look how you want it to look based on data somewhere else, not updating itself based on texture2D assignments and values you have stored within your UI. If you need your UI to make changes to the data that's fine too, but the data shouldn't reside or be managed by the UI, the UI should only visually represent the data.
So if I had an inventory component, and in it contained a simple array of ItemID (which means you can have more than 1 of the same item in the array it's just an array of those item IDs) I could have a function "Get Item Counts" which then would return of Map > Integer. The function would have a local map variable of the same type and then loop through the array, looking up to see if the local map variable and add its value + 1 back into the map in the loop body. On Completed, I'd return the local variable map. That now gives me a way to know the count of all the items in my inventory - and any UI can easily call that function to then know the items and the counts of them.
The UI then just needs to geneate what it needs to display based on the Keys of the map, and set any values. You'd probably want additional functions within your inventory to poll it for any other information as well so you can have your UI just ask for the value.
And your action control UI should be reading everything and making it look how you want it to look based on data somewhere else, not updating itself based on texture2D assignments and values you have stored within your UI. If you need your UI to make changes to the data that's fine too, but the data shouldn't reside or be managed by the UI, the UI should only visually represent the data.
why not?
Becuase that is not the purpose of UI. Ui is to visualize data.
i think it's pretty irrelevant for now as he still struggles with the basics
It makes things harder to manage, find your code, follow along, and just otherwise confusing. Again... Why does a Texture2D have anything to do with how many items you have in an inventory?
