#blueprint

1 messages ยท Page 281 of 1

frosty heron
#

The tag probably lives in the character actor though not component.

Although combat related should be a component imo

warped juniper
#

Well I'm early enough that I can tweak stuff

frosty heron
#

Life soo much easier if you just use GAS

dusky cobalt
#

You can also put tag on component and check Component Has Tags

#

but cannot be Game Play Tags though

frosty heron
#

The tag container is already in ability system component

dark drum
frosty heron
#

Wouldn't use that for a status effect, ever

frosty heron
#

Making base class in cpp isn't difficult, often people use interface for the wrong reason.

warped juniper
#

Well I gotta figure what to do now then

#

Maybe tweak the logic I need

frosty heron
#

If you are doing RPG or the like, it's better to get familiar with GAS

#

Don't have to reinvent the wheel

warped juniper
#

How about I add a HealMultiplier variable... And add a function to set it

warped juniper
#

Is GAS even that good?

frosty heron
#

Yeah, most people that used it have nothing but praise

warped juniper
#

I find it so broad that it becomes kind of redundant in a project by project basis...

frosty heron
#

It's what epic fork from their work with fortnite

frosty heron
#

You will appreciate it once you tap into it....

#

Saves me from spaghetti hell

dark drum
#

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

frosty heron
dark drum
#

I make most things uobjects so I'd imagine it'll feel the same, just a different base class.

warped juniper
#

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

mild jacinth
#

there are a couple plugins available on marketplace that simplify the setup for you whilst having the same system setup as regular one.

#
Fab.com

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+...

warped juniper
#

I don't think I wanna spend money on GAS before I see if it's what I need

mild jacinth
#

fair enough

warped juniper
#

@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

frosty heron
warped juniper
#

I mean I guess it's something like that

#

Just no idea what exactly

frosty heron
#

Someone probably have covered it on youtube

#

My advice would be to get rider running first

warped juniper
#

What is Rider?

frosty heron
#

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.

frosty heron
#

Like visual studio but the one that works with unreal

maiden wadi
warped juniper
#

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

maiden wadi
#

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.

warped juniper
#

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

faint pasture
warped juniper
#

@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

frosty heron
#

My locking system isn't really tied to ability, I mean you can if you want

#

It's just a component

warped juniper
#

Yeah it's a component for me too

#

I'm just not sure how I should access the Target variable... Should I cast?

frosty heron
#

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

warped juniper
#

Yeah i'm wary of casting mostly because of hard references but did learn they are not as bad

frosty heron
#

Which you can worry less if you have native class

warped juniper
#

Hmh yeah

#

Right now I just want the ability to access the owner actor

frosty heron
#

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

mild jacinth
#

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

frosty heron
#

Hidden in game will hide in game mode

warped juniper
frosty heron
#

Set vissibility if you want to hide it in editor

warped juniper
#

Weird how Get Owner doesn't work that way

frosty heron
mild jacinth
#

rendering -> visible?

faint pasture
warped juniper
frosty heron
#

You just want the avatar actor

#

That will be the caster so to speak

mild jacinth
#

worked. thanx

maiden wadi
warped juniper
#

@frosty heron Alright done, got the Avatar info and all... The ability now compiles

frosty heron
#

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

faint pasture
frosty heron
#

And you need to decide Wether to pop the ASC in the player state or the character, depending on your project.

faint pasture
#

I suppose by saving the FGameplayAbilitySpec would work too, you can activate by that I think

warped juniper
#

What else do I need to set GAS up?

#

Assuming this is a fresh project

frosty heron
#

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

warped juniper
#

I thought you meant setup like, in engine via adding lines of cpp code?

maiden wadi
# faint pasture So button would know the class, and that's what gets passed along? It seems so ...

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.

frosty heron
#

Most of other things like initialising the ability system component can be done in blueprint

warped juniper
#

Alright then

#

I'll see how you declare the attribute

frosty heron
#

You should get rider working imho

#

Otherwise it can get very overwhelming

dark drum
frosty heron
warped juniper
#

I don't like using AI stuffs though

frosty heron
#

No one mention AI

warped juniper
#

I thought people used Rider for AI

#

Atl east that was about the subject for the only times I heard about it before

frosty heron
#

I don't even have copilot on my rider version

#

But A.I suggestion can be turned off

warped juniper
#

Hmh that does sound nice

#

Guess I can give it a shot

frosty heron
#

Also they can predict allright

warped juniper
#

Wait...

#

Pricing. It doesn't have an indie plan

#

Does it?

frosty heron
#

It's free for non commercial

#

When you are ready to sell your game you can just get the perpetual lisence

warped juniper
#

Well no rider for me then

frosty heron
#

But it's free? If you gonna release a game anyway you should fork some money

warped juniper
#

Yes but consider this, I live in Argentina

#

I have to pay like 50% taxes for stuff like this

frosty heron
#

You need 100 dollars to publish in steam

faint pasture
warped juniper
#

I know, I will spend money, but this is spending money on a paid alternative of something I have for free in VS

faint pasture
#

Putting Descartes before the horse here

frosty heron
#

Rider is free for non commercial project

#

Try it first then make your decision later

warped juniper
#

I am just planning ahead, that's all..

faint pasture
#

Preorder that Lambo

frosty heron
#

If you are serious with making a video game you shouldn't gate keep your self

warped juniper
#

Well fine, I'll get Rider

frosty heron
#

Don't pay for it?

#

Just use the free version

warped juniper
#

But I still have the entirety of GAS to figure out, so that will take a bit...

frosty heron
#

There's the learning curve

#

I probably only know 10% of GAS

warped juniper
#

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?

narrow sentinel
#

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 ?

warped juniper
#

@frosty heron Hey... The Rider plugin is not compatible with UE5?

frosty heron
#

You still need to install visual studio with the required component though

frosty heron
warped juniper
#

It says it's not compatible with 5.4?

#

I got it from FAB

frosty heron
#

You don't need that plugin

#

Download rider from the website

warped juniper
#

Alright did it

frosty heron
warped juniper
#

Yeah I downloaded it

#

Just trying to set it as my editor

warped juniper
#

@frosty heron Alright success, I set Rider up! Thanks

trim pollen
#

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

warped juniper
#

@frosty heron Just checking... Would you mind a DM?

frosty heron
#

There are a lot more helpful people other than me

warped juniper
frosty spruce
#

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

faint pasture
#

like how in Roguelikes you can have unidentified items?

narrow sentinel
faint pasture
#

ah

#

yeah that should be a property of the character state, not really its inventory

narrow sentinel
#

Awsome

faint pasture
#

that way inventories just do what they say, and you don't have treasure chests with known item class arrays on them

narrow sentinel
#

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

queen vault
#

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)

faint pasture
narrow sentinel
#

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

faint pasture
#

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

frosty spruce
faint pasture
#

what do you WANT the camera to do when you run around a loop?

narrow sentinel
#

Rather then how i do it now which is the logic etc is purely on play character

faint pasture
narrow sentinel
faint pasture
#

As a bonus, your damage system can go right to the stats component

#

Hit -> get component by class -> modify hp

narrow sentinel
narrow sentinel
frosty spruce
faint pasture
#

StatsComponent.HP is great

faint pasture
narrow sentinel
#

On the character player or enemy its an pointless struct

faint pasture
#

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

narrow sentinel
#

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

faint pasture
#

It would make sense if you had gobs of stats

#

like path of exile

#

or base / derived / double derived

narrow sentinel
faint pasture
#

you can skip all that

narrow sentinel
#

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

faint pasture
#

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

narrow sentinel
#

Yeah that makes sense

faint pasture
#

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

narrow sentinel
#

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

flat coral
#

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?

faint pasture
#

spatially? Or change which scene component is root

prime carbon
#

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

narrow pendant
#

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?

flat coral
# faint pasture spatially? Or change which scene component is root

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

faint pasture
#

they do need to be moved if you are offsetting the root at the class level

#

how many maps are these things in?

flat coral
#

not that many. Honestly I should probably just bite the bullet

maiden wadi
maiden wadi
final berry
#

Thanks for the help! I've checked and also no reference in any functions. I'm still lost ๐Ÿ˜ฆ

dark drum
final berry
dark drum
final berry
#

I thought seeing as that one is on top its directly referenced. The reference viewer also implies that I believe

frosty heron
#

Size map never to be trusted from what I read

dark drum
final berry
dark drum
dark drum
# frosty heron Size map never to be trusted from what I read

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.

dark drum
final berry
dark drum
mystic blade
#

any way i can set the player as an enemy ai can recognize?

dark drum
frosty heron
#

Plenty of way. You can just check againts the class

mystic blade
final berry
maiden wadi
final berry
#

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)

dark drum
maiden wadi
#

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.

final berry
#

If I ctrl+F the entire project on BP_EnemyManagement I only find hits on the BP_EnemyManagement itself

maiden wadi
#

๐Ÿคทโ€โ™‚๏ธ 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?

frosty heron
#

What can I use to get value that slice the red region to front, rear, left or right side?

vernal snow
#

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.

frosty heron
#

Can you show your child actor component

#

you might be using the buggiest unreal engine feature which most likely will never be fixed

dark drum
dark drum
vernal snow
dark drum
frosty heron
#

Why does each animal type have their own component, sounds very counter intuative

vernal snow
#

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.

dark drum
frosty heron
#

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

dark drum
#

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.

fading sentinel
#

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?

frosty heron
#

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

dark drum
frosty heron
#

but if nothing else implements eating, then why not just encapsulate it in the animal class

dark drum
vernal snow
frosty heron
dark drum
fading sentinel
frosty heron
#

if you are not working on procedural generation or heavy queries, just don't worry about performance until your fps is actually tanking

dark drum
frosty heron
#

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

dark drum
dark drum
#

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.

faint pasture
#

It'll be the same speed in bp and c++ will usually optimize to a multiply anyway

dark drum
#

I find it fascinating that division is still pretty much a brute force kind of operation. Them mathematicians need to get on it haha.

vernal snow
# frosty heron but they all can derive from Animal

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.

faint pasture
#

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.

frosty heron
#

Animal -> Bird, Dogs, Human
Bird -> Crow, Eagle, etc
Dogs -> ShibaInu, Pitbull, etc.

faint pasture
#

Don't subclass past Animal imo

frosty heron
#

true

faint pasture
#

Unless it's data only like BP where you just add some components.

dark drum
faint pasture
#

Everyone knows divide is slow but going to cold ram is about 3x slower

dark drum
# faint pasture

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. ๐Ÿค”

dark drum
# faint pasture Don't subclass past Animal imo

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.

maiden wadi
wide light
#

Ok thank you, now i just need to elaborate that with my brain

faint pasture
glass blade
#

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

frosty heron
#

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

glass blade
frosty heron
glass blade
#

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?

frosty heron
#

otherwise there's no collision to collide with

glass blade
#

i guess thats why it works when my character is dead?

frosty heron
#

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

glass blade
#

i will triple check the collision settings

frosty heron
#

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

glass blade
final berry
#

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".

final berry
maiden wadi
#

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. ๐Ÿ˜„

inland walrus
#

Anyone know what this could be?

maiden wadi
#

Do you have multiple editors open?

inland walrus
inland walrus
maiden wadi
#

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.

inland walrus
maiden wadi
#

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?

inland walrus
#

I'm not sure what I've done, but yes that is one of my maps that I stream inside my main level

silk hinge
#

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 ?

royal egret
#

Do any of y'all know what this V means? I recently updated to 5.5 and I've never seen it before

merry mirage
#

Variable?

merry mirage
royal egret
#

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

silk hinge
#

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 ??

final berry
#

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 ๐Ÿค”

maiden wadi
dark drum
#

Does anyone have any suggestions for how to handle movement for a caterpillar without using the character movement component? ๐Ÿค”

final berry
maiden wadi
#

I also realized I said SoftObjectPtr, but it works identical for object and class pointers.

silk hinge
#

anyone knows how to load / unload a data layer on client only when they provide server only functions into unreal ? ๐Ÿค”

dark drum
silk hinge
#

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 ??

final berry
dark drum
final berry
#

Right, cheers!

silk hinge
#

So no one knows about the data layer stuff ? x) It's part of the world partition system

maiden wadi
# final berry I don't understand what you're saying ๐Ÿ˜… Do you have a "for dummies" explanatio...

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.

final berry
#

Thanks for the info! Appreciated!

remote meteor
#

reminder that under lumen gi, ao does nothing

dark drum
#

When you learn that root motion is handled by the character movement component. ๐Ÿ˜ญ

granite nacelle
maiden wadi
granite nacelle
maiden wadi
#

Add a new skeletal mesh and attach it to the camera. Remove the arms from the default mesh. Check out the first person template.

granite nacelle
#

also I cant delete the old character mesh

maiden wadi
#

You don't need to delete it. And what animations don't work?

granite nacelle
#

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

bold eagle
#

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?

bold eagle
#

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.

plain creek
#

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

leaden raven
#

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...

plain creek
# leaden raven Hi all, wondering if someone can help me out with this issue I'm having with dam...

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

dark drum
#

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?

leaden raven
# plain creek I can't say for sure that it will solve the issue, but is this using an interfac...

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

plain creek
#

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

silk hinge
#

with would you ever put a posses ?

#

interact -> overlapping actor == Door -> Door Actor, Execute door rotation with a time line

plain creek
#

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

silk hinge
#

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...

leaden raven
#

im just confused now with how doors and vehicles came into it and seeing what overlapped with foot or head HUH 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

silk hinge
#

This means that something happens when your head is overlapping with something, right ? x)

#

and another with your foot

faint pasture
#

that isn't a "is currently overlapping", it's a "wasn't overlapping last frame but is overlapping this frame"

silk hinge
#

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

silk hinge
# faint pasture it means it started overlapping

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 ?

frosty heron
#

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? ๐Ÿคทโ€โ™‚๏ธ

final berry
#

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?

frosty heron
#

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.

faint pasture
frosty heron
#

Your tower management shouldn't need to know the widget at all.

final berry
silk hinge
# faint pasture I have no clue what a data layer is

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 ^^

maiden wadi
unkempt valley
#

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

dusky cobalt
unkempt valley
#

@dusky cobalt Yes i do, i even put the same as the other project file

dusky cobalt
# final berry Can anyone give me some points on how to handle updating an UI without cyclic de...

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.

fervent bone
#

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.

dusky cobalt
dusky cobalt
unkempt valley
#

@dusky cobalt

dark drum
dusky cobalt
unkempt valley
#

yes

#

@dusky cobalt

dusky cobalt
#

can you show scrrenshot from construction script

unkempt valley
#

@dusky cobalt actually it isnt sorry

dusky cobalt
#

yup

unkempt valley
#

@dusky cobalt it also isnt in the other project where it works though

dusky cobalt
#

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)

dusky cobalt
#

Get Random > Set Current Start > Get Transform and then Remove Current Start from Array

unkempt valley
#

ill try that ๐Ÿ™‚

dusky cobalt
#

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

fervent bone
unkempt valley
#

@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

dusky cobalt
# fervent bone Hmm. Similiar issue. It prevents the NPC from turning 180 degrees to face the pl...

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

dusky cobalt
unkempt valley
#

in the new test one yes

dusky cobalt
dusky cobalt
#

and gamestate?

unkempt valley
#

yup!

dusky cobalt
#

they should be both either Gamemode Gamestate or GamemodeBase GamestateBase

unkempt valley
#

ye they are the same

dusky cobalt
#

any more context? what is new? what did you change?

fervent bone
unkempt valley
#

@dusky cobalt i sent u a dm with more info to stop bloating this

dusky cobalt
#

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

fervent bone
dusky cobalt
misty jewel
#

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?

frosty heron
#

@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

misty jewel
#

Here is example how it works right now.

frosty heron
#

That should lock the root

misty jewel
#

I'm using Anim montage for that, if you could look up there is code.

frosty heron
misty jewel
frosty heron
#

That should work

misty jewel
#

It not works ๐Ÿ˜„

frosty heron
#

But from my experience playing montage with root motion will drive the capsule according to the root motion

frosty heron
#

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

misty jewel
#

That fixed one problem

faint pasture
misty jewel
#

But still as you could see right now there is sort of flick. And I'm unable to look up and down.

faint pasture
#

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

misty jewel
#

I moved camera back and set capsule to visible.

faint pasture
#

basically your animation ends with you looking backwards, then you go back to your regularly scheduled programming which is to look forwards

austere ingot
#

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?

faint pasture
#

If there is nothing then you'll probably have to compose it

#

what shape is this box? Square-like or long and skinny?

austere ingot
#

either, both, just curious if theres a way to grab points on the nav mesh to spawn ai to rather than the radius node

frosty heron
#

Sounds like EQS

frosty heron
#

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

misty jewel
#

This is the whole montage.

frosty heron
#

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

misty jewel
#

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.

faint pasture
#

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

frosty heron
#

The idea is the character is not rotateable

#

Just the head

zenith veldt
#

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.

frosty heron
#

Source control is probably the only hope

#

Other than that, I don't know what can fix bp corruption

zenith veldt
#

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? ๐Ÿ˜›

frosty heron
#

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

zenith veldt
#

yea i am way too close to shipping for that but next time prob do the same.

frosty heron
#

If you just use blueprint, most of the time it's pretty safe though

zenith veldt
#

i'm using C++ too but usually only when i need to

frosty heron
#

But there are casses with yours I suppose

frosty heron
zenith veldt
#

im going to try to snipe it

#

by creating a variable with the same name, but i think i have attempted this before.

frosty heron
#

Fingers crossed

autumn pulsar
#

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

frosty heron
autumn pulsar
frosty heron
#

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

autumn pulsar
#

I was in the flying movement mode

frosty heron
#

Remind me if I forgot

heavy lion
#

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

zenith veldt
#

its not setting the values in the struct?

heavy lion
#

Basically, how do I fill these variables in in order to save them?

zenith veldt
#

but its fine with setting the transform?

heavy lion
#

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

zenith veldt
#

usually if yo uneed to stash some stuff the game instance is the place to do it, sure

heavy lion
#

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

zenith veldt
#

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

heavy lion
#

No I think I was just being very stupid.

#

Thanks! I will see what I come up with

autumn pulsar
#

I was trying to swap out the pins lol

#

how does this work

frosty heron
frosty heron
#

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

granite nacelle
spark steppe
#

welcome to child actors, they really behave like childs

autumn pulsar
#

I have a line trace that's inside an object, and it's returning an impact normal of 1, is this normal?

full fjord
#

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"

prime carbon
thick flame
#

Hello everyone! Im looking for support in procedural random creation of a level. Heres my current concept, but im having hurdles:

  1. Create a parent module for each type of section. (Combat section, Health and rest section, platforming section, etc.)
  2. Create personalized children modules of each section parent.
  3. Each parent would have a section of code to spawn in the next section.
  4. 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
snow halo
#

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

surreal peak
#

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.

spark steppe
#

maybe describe what it's supposed to do... because it looks wild

surreal peak
#

Well they did

spark steppe
#

my bad

surreal peak
#

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

spark steppe
#

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

surreal peak
#

Items is never modified though. I assume this is their actual inventory already

spark steppe
#

i think they intend to modify it

#

even tho it modifies a copy currently with the ++ node

surreal peak
#

Right. That might not be intended then I guess (modifying the copy)

#

I feel like there are too many arrays and maps in this.

spark steppe
#

Issue:
โŒ Doesn't increase the number

#

so that can be nailed down to modifying a copy

surreal peak
#

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

spark steppe
#

which brings us back to my suggestion ๐Ÿ˜›

surreal peak
#

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

spark steppe
#

yea it's super confusing, because it could probably be 5 nodes

frosty heron
#

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?

spark steppe
spark steppe
frosty heron
#

Asked there 3 times but no answer ๐Ÿ˜ฆ just thought I could ask one of you since I know you use ue5coro

spark steppe
#

you should check the things you use after the co_await to be sure that they are still valid

frosty heron
#

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

spark steppe
#

you crash 100% because i had that problem before ๐Ÿ˜„

frosty heron
spark steppe
#

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

frosty heron
#

Right I am going to approach this more sanely. Thanks

maiden wadi
#

Need more cues.

tough fern
#

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 ๐Ÿ˜„

maiden wadi
final berry
frosty heron
#

The whole point of interpolating is to do it over time (use tick)

dark drum
primal summit
#

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.

dark drum
#

@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)

frosty heron
#

@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

primal summit
primal summit
#

cuz i want them to spawn into a collider and when both are in the collider i would start the timer

frosty heron
#

@dark drum I followed GAS tutorial by Stephen ulbardi

#

And kinda use his way of handling input

frosty heron
heavy lion
primal summit
frosty heron
primal summit
#

But whats the best way to handle client's result on server?

frosty heron
#

You can get game instance -> set something. Nothing stopping you from doing that

heavy lion
frosty heron
frosty heron
dark drum
primal summit
primal summit
frosty heron
# dark drum Is that a uDemy course?

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

frosty heron
#

You detect the hit on server machine

#

And do action accordingly

#

On hit -> switch has authority -> do something

dark drum
primal summit
frosty heron
primal summit
frosty heron
#

you need to ensure that the overlap happend

primal summit
#

i happens becuase i have a print to make sure it works

frosty heron
#

show the actual log

primal summit
#

it doesnt print the boolean turning true but the print that the player collides yes

dark drum
primal summit
frosty heron
#

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.

frosty heron
# primal summit

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

primal summit
#

if i do an event on the server to check both the bools it will come out that the client bool is false

frosty heron
#

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

dark drum
frosty heron
dark drum
#

Do you have any other sources for handling Input in GAS I could comb through?

frosty heron
#

checking some of the code I copied from the tutorial atm.

dark drum
frosty heron
#

() -> . and you are good to go imo

dark drum
frosty heron
#

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

dark drum
frosty heron
#

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

primal summit
frosty heron
dark drum
frosty heron
primal summit
#

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

frosty heron
#

it checks on server machine if the component overlap

#

you still haven't tell me what you want to do when the overlap happend

primal summit
#

the game logic works i just want to make sure that both players are on the collider to optimize the game

frosty heron
#

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

primal summit
# frosty heron Overlap -> Switch has Authority -> Start timer

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

frosty heron
#

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

primal summit
#

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

frosty heron
#

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

primal summit
#

tick is not optimal usually

frosty heron
#

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

primal summit
#

i even tried with adding 1 everytime that someone collides but it would come out server 1 and client 1

frosty heron
#

Client data has no meaning in this context

primal summit
#

im not trying to do anything client side thats what im trying to say

frosty heron
#

You only care if the server collide with the right number of player . Then start the game that's it

primal summit
#

but nothing works server side for client

primal summit
frosty heron
#

So logic to start the game is purely executed by server machine

primal summit
#

i know

#

you want me to explain the problem better?

frosty heron
primal summit
#

i will

#

thanks

frosty heron
#

you can do the overlap route too

#

just share the code for other to check

primal summit
frosty heron
#

you wouldn't be able to do mc event there though, GM not replicated

primal summit
#

its not an RPC

frosty heron
#

when do you start the timer?

primal summit
#

its just an event on the server

#

Custom event after the invalidate is the timer event

#

it works

#

thanks for the tip

frosty heron
#

"works" but I still see error in doing this X_X

#

You don't want a server RPC in this context

primal summit
#

its not an rpc, im executing everything in the server

frosty heron
#

2 RPCS

primal summit
#

yh u right

#

i'll show u my timer after lunch

south eagle
#

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 ๐Ÿ™‚

dark drum
little moat
#

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

dark drum
little moat
autumn pulsar
#

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 ForestCat

south eagle
#

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 !

autumn pulsar
#

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 ForestCat

south eagle
#

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 ? ๐Ÿ˜…

autumn pulsar
#

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

south eagle
#

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 ?

autumn pulsar
#

Yup

#

Hereโ€™s how roller coaster tycoon did its weather with a similar approach

south eagle
#

Sweet, will take a look at that now. Cheers for taking the time out to help

autumn pulsar
#

Sure, hope you get it working!

autumn pulsar
#

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

south eagle
#

Iโ€™m deffo gonna give the slot way a try but Iโ€™d rather try and learn why I was wrong as well !

autumn pulsar
#

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

maiden wadi
autumn pulsar
#

And then use the result of that roll

dark drum
#

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.

autumn pulsar
#

I ought to look more into GAS but it looks pretty heavy

maiden wadi
dark drum
dark drum
frosty heron
#

I loop through my Abilities quiet often ๐Ÿ˜…

dark drum
#

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.

maiden wadi
#

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.

dark drum
maiden wadi
#

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.

dark drum
maiden wadi
#

I use that currently to stop a hiding ability as well that requires the pawn to be still.

dark drum
maiden wadi
#

To add or remove the GE?

dark drum
maiden wadi
#

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.

dark drum
maiden wadi
#

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.

dark drum
maiden wadi
#

All nice stuff that abilities can listen for. And the same state is easily usable in your animation graphs too.

native canopy
#

In unity they have data oriented technology stacks, how about unreal

maiden wadi
dark drum
#

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.

maiden wadi
# dark drum 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.

frosty heron
#

@dark drum how do you trigger the ability using input atm?

dark drum
dark drum
faint pasture
quiet gust
#

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?

remote meteor
remote meteor
blissful grail
maiden wadi
#

@worthy frost Tell Duro how much you love Mass. ๐Ÿ˜‚

maiden wadi
# blissful grail To counter - I've also heard the opposite. I've heard that it is quite enjoyable...

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.

blissful grail
#

@austere matrix Has been diving into and has been enjoying it. ๐Ÿคท

austere matrix
#

Define enjoy kekw

#

Na it's nice, it's just a little awkward sometimes

#

Definitely doesn't deserve hate

keen ore
#

I'm try to have a realistic ammo management system and I can't quiet figure it out.

snow halo
snow halo
faint pasture
keen ore
# faint pasture 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.

faint pasture
#

So why not just model it like that

keen ore
#

I'm not sure how to go about it. I new to the engine.

faint pasture
#

Does a weapon have a constant mag size?

#

like M4 -> 30

keen ore
#

No there will be customization

faint pasture
#

But i mean for any given weapon instance

keen ore
#

ah yes

faint pasture
#

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

keen ore
#

yeah

faint pasture
#

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

keen ore
maiden wadi
maiden wadi
# faint pasture Does that play nice with prediction?

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.

faint pasture
wraith olive
#

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)

maiden wadi
wraith olive
# maiden wadi Where is the material being changed though? You're setting a new mesh. But what ...

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

faint pasture
#

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

merry mirage
maiden wadi
#

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.

blazing thicket
#

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

timber oar
#

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?

zinc swift
#

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?

wraith olive
wraith olive
snow halo
#

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 ๐Ÿ‘Ž

dawn gazelle
#

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.

spark steppe
#

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

lusty shard
#

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?

spark steppe
#

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

snow halo
dawn gazelle
# lusty shard peeling away from hard references and thinking of having a bpi dedicated to UI, ...

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.

snow halo
dawn gazelle
# snow halo 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".

snow halo
lusty shard
dawn gazelle
lusty shard
#

crazy how it is more optimal to be less specific with variable types haha

dawn gazelle
#

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.

lusty shard
#

in your name... casting creates hard references lol

dawn gazelle
#

And sometimes that doesn't matter. If it's already loaded and it requires the specific class, then there is nothing wong with casting.

snow halo
#

because this inventory works with Item ID and data tables mostly

lusty shard
#

In our project, hard references are causing multiple files to get tagged for dirty/unsaved

snow halo
#

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

lusty shard
#

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

snow halo
#

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

dawn gazelle
lusty shard
#

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.

dawn gazelle
#

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.

lusty shard
#

First dive into soft references.. Just wish the reference viewer could point to the node or variable that creates the hard reference.

lusty shard
lusty shard
dawn gazelle
#

But I suppose that's just "hard reference" anyway ๐Ÿ˜›

lusty shard
zinc swift
mystic blade
#

what are some ways i can disable diagonal movement? i only want to move up down left and right

snow halo
# spark steppe you are sus, you are still modifying a copy

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

dawn gazelle
# snow halo im making an Action Control UI

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.

snow halo
#

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?

dawn gazelle
#

Becuase that is not the purpose of UI. Ui is to visualize data.

spark steppe
#

i think it's pretty irrelevant for now as he still struggles with the basics

dawn gazelle
#

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?