#blueprint

1 messages ยท Page 264 of 1

maiden wadi
#

Correct. This is the component IMPLEMENTING the event. But none of your screenshots are CALLING the event on the component.

lost hemlock
#

@dawn gazelle so now the new problem is that after I close my widget, I cant move my player

chilly crane
#

or is that the wrong way to do it?

maiden wadi
#

Again. This is getting all ACTORs. A component is not an actor.

ornate wren
#

I got that working a year ago... its difficult to do in UE without experience.

lost hemlock
#

it's like after you start up that widget and close it later, your player goes on a wheelchair @dawn gazelle

chilly crane
#

regardless of whether it's a component or actor?

placid flame
lost hemlock
#

Ok never mind I found what was putting my character on a wheelchair

kind estuary
#

๐Ÿซก

maiden wadi
# chilly crane is there a way to broadcast to everything implementing the inferface then?

You could iterate over every single actor and get all of it's components with the interface and run it. But realistically that's going to blow up performance wise. Cause you'll be literally iterating over EVERYTHING. All static mesh actors, their static mesh components, some random camera actor and it's camera component in the level. The landscape and it's components, etc etc etc.

This sounds more like something where you would place an event dispatcher somewhere global. GameState or something similar. And let components and actors that care register to it, then you can broadcast that.

lost hemlock
#

@dawn gazelle turns out the problem is with this one

#

oh wait I know how to fix it

#

parent of that one is wb_crafting_menu

#

if the other problem with my previous reference was related to a parenting reference issue

#

then that means this one is also related to a parent reference issue

#

that means this variable is essentially equivalent to an abandoned orphan who's parents died in a car accident an autumn night 6 years ago in a small town due to poor visibility, fog and rain

dawn gazelle
#

What it boils down to right now....Are you actually setting a reference to an "Ingredients View" widget in that reference anywhere in this blueprint? If not, then it would always be invalid.

lost hemlock
dawn gazelle
#

That's not setting a value in it... That's defining the type.

#

You're saying it can contain a reference to a "WB_Ingredients View" widget, but how are you actually giving it a reference to the widget you want to use?

lost hemlock
#

SET

#

?

dawn gazelle
#

SET allows you to populate the variable, sure

#

Do you really need to SET that particular variable tho?

lost hemlock
dawn gazelle
#

SET doesn't just give itself a reference. You feed in a reference to set it to.

lost hemlock
#

but wait i think i am setting the crafting menu right after i created

dawn gazelle
#

Is the "Crafting Menu" a "WB_Ingredients View"?

lost hemlock
#

the reason why im not hooking up everything to crafting menu widget is because i would have a very messy blueprint

#

so i just promote someone to variable and really clean up everything

lost hemlock
#

but its not a child or anything

dawn gazelle
#

Ok... So then do you really need to have a variable that references a WB_Ingredients_View in your player controller? Is this the only place its getting used?

#

Can you maybe utilize your WB_Crafting Menu reference and get its WB_Ingredients_View that is living inside of it instead?

lost hemlock
#

its the only place

dawn gazelle
#

So then it's not really useful as a variable here - it's a one time use thing.

#

You'd want to GET your WB_Crafting Menu, make sure it is valid, and if so, you should be able to GET its WB_Ingredients View and call that function.

lost hemlock
dawn gazelle
lost hemlock
#

The baton is getting passed on from one to the other

dawn gazelle
#

But again... This wil throw errors.

#

If it's not valid, don't just proceed.

#

Is Not valid > Print a log to warn you there is a problem > Stop doing anything that tries to use the invalid reference.

lost hemlock
# dawn gazelle Ok thats fine... I wouldn't necesarily do a valid check on the WB_Ingredients Vi...

Looking at the errors again went into some of them and realized I had the same (crafting system) code on "Ac_crafting" as well as Controller bp at the same time, what this did is it still caused despite that i had fixed all of them, now it got updated and i decided to delete this entire crafting system from controller and keep it on ac crafting instead and it all works smooth like butter on warm toast

lost hemlock
#

also now i replaced all the unparented movement component components, so now all adolescents are supervised by an adult, and I find the parent of them first, and their grandparents, and their grandgrandparents too

#

it's a family issue

dawn gazelle
#

Congrats. You're starting to understand references, and how they can relate to one another ๐Ÿ˜„

gentle urchin
#

After the most patient person on here has spent day and night pointing in the right direction

#

Pointing... got it ?

frosty heron
#

I went through helping someone's doing save system because he promised that he knows blueprint and can do it in 15 minutes if people just show him how.
End up as 4 hours session. Promised my self to only to not ever do it again.

odd widget
#

alright, normally this is hopeless asking for help in BP based chat for performance stuff, but can I ask the best performance tweaks for BP only as I'm the main programmer for our project and my course never covered it as bp performance was never considered an important factor

#

i know the basics such as interfaces but most of it is foreign to me

frosty heron
frosty heron
#

if you were fed bullshit about use interface don't use cast by youtubers, read Unreal Myth and Bust article for facts and what to do.

#

things to avoid
Hard reference in Data Table
Looping over large data with blueprint

odd widget
#

im not saying you are lyong of course, i am just citing my source

frosty heron
odd widget
#

i may have absolutely

frosty heron
gentle urchin
frosty heron
#

common traps and misconception around bp

#

Can't / won't crying

#

yes you can do it!

odd widget
#

yeah, they mainly were saying my basics were wrong, dont think they meant me to gain a phobia of casting

#

wish id have realised that a year ago cause ive been avoiding casting for years

frosty heron
#

That's why I have vendetta againts general youtubers

#

we got people coming everyday saying don't cast use interface

odd widget
#

theres a point there for 5.5

#

my "boss" has said i can upgrade if i like

frosty heron
#

Not necessary tbh

odd widget
#

right

#

he thinks this game will be equal to minedraft

frosty heron
#

you can go with Before 5.5 equivalent

odd widget
#

so im trying to work on that level

#

but tbh thats mostly just my low level bs

frosty heron
#

I would totally avoid blueprint for world generation

#

or voxel/grid stuff

#

if you need to loop a lot of times, blueprint overhead matters

#

it can be 500X slower or more

odd widget
#

what weve discussed was multiple layers of height maps

#

cause they want villages that know where eachother and generated dungeons are

#

theyre also not using grids or voxel

#

want a fortnite esque aestetic

#

im fully aware this is probably not going to be possible with the team we have...which is him and me, maybe a third for vfx XD

frosty heron
#

you can prototype in blueprint but it's important to know it's limitation. If you need to loop over large data, it's a good indication to refactor it in cpp.

odd widget
#

then of course tell the programmers whatever extra they need since in know my fair share of that too

#

i just find BP so much more readable

nova grotto
#

how do you set up a iswalkingforward boolean

gentle urchin
#

Velocity dot Forward vector ?

nova grotto
gentle urchin
#

Yeah

#

GetVelocity->Normalize
GetActorForqardVector

#

If you only care about exactly forward then thats if the dot product is =1

#

If you have some leeway, you may want it from > 0.3 or smth

#

Or you can read the input values

nova grotto
nova grotto
gentle urchin
#

ActorForwardVector , as in forward relative to the character

#

Even if you want exavtly forward i might consider a small deviation

#

.95 or so

#

Almost precisly forward

nova grotto
gentle urchin
#

But test it out and see ๐Ÿ™‚

#

Yepp

nova grotto
#

also what does dot mean

#

or do i guess

#

it works lets gooo

placid flame
#

Why is this getting 12 sockets when the debugger shows there is only 1 socket?

lusty scroll
#

if i get forward vector and multiply with -1 and add some offset shouldnt i be getting backward vector? then why am i getting right vector

gentle urchin
#

Because forward vector isnt .X explicitly

#

The entire vector orientation is forward

#

So you nultiply the entire vector with -1

#

Also combine it with existing location of the actor to get world space

lusty scroll
#

instead of x * -1 you are saying to multiple vector with -1 and add offset?

gentle urchin
#

TargetLocation = GetActorLocation+(GetActorForwardVector*-1*offset)

lusty scroll
#

offset add or multiply?

gentle urchin
#

Multiply

lusty scroll
#

still aint working, the location of debug changed but not where i wanted

gentle urchin
#

My friend

#

You must multiply the entire vector

lusty scroll
#

ah wait you told to add vector location

gentle urchin
#

Not a component of it

#

Offset in hard X isnt the way to go

lusty scroll
#

i wanted offset backward direction only not on all axis

#

this is what you said right?

#

is that correct?

gentle urchin
#

Yepp

lusty scroll
#

it is spawning right beside actor location

#

i want that blue sphere in shown red area

gentle urchin
#

50 beside it, yes

lusty scroll
#

ahhh

#

understood

gentle urchin
#

Actually hardly looks 50 but

#

Might be

lusty scroll
#

changed 50 to 1000 now it is around the location where i wanted

#

thanks mate, little confusing tho

frosty heron
#

is getworld delta seconds and the delta on tick gives the same or almost the same result?

#

not playing with time dilation or anything

gentle urchin
#

Should be

gentle urchin
dawn gazelle
frosty heron
#

thx

dim halo
#

does anyone know how to make a ui text binding only run once?

frosty heron
#

Don't create binding if you don't want it to be evaluated every frame. Just sets it?

dim halo
#

ahh thank you

gentle urchin
#

Or let it be read

dim halo
#

im a little confused what you mean

frosty heron
#

give us a run down on what you want to do if possible.

#

gameplay wise

dim halo
#

when the player dies i just want to get in game time and set that as the text

#

idk why im having such a tough time with it

frosty heron
#

Use event dispatcher

dim halo
#

I only want it to occur once so that the score doesnt keep going up once the player has died

frosty heron
#

When the player die it just broadcast the delegate and anyone that listen to it can act accordingly

#

so this will not restrict to only U.I but to anything that needs to know the Player has died

#

Widget Construct -> Get Character -> Bind to death event

#

Player Death -> Death.Broadcast

#

Widget then -> UpdateText -> Player has died

dim halo
#

this is the last thing i need to do before im done with the game. It wa sjust meant to be a quick test so their wont be anything else

#

is an event dispatcher a little heavy for this

frosty heron
#

takes a minute

#

not doing it that way probably mean that you haven't been doing one way relationship

#

which can cause headache as the project scales

dim halo
#

gotcha

frosty heron
#

Who creates the widget? @dim halo

dim halo
#

the only actor in the game that can kill the player

#

i.e. the only actor in the game that knows when the player has died

frosty heron
#

well that just makes event dispatcher even more valid since the actor in the game kills the player need to know if the player died

#

if it were made in the player character where the death happends then you can do the more lazy way which is to just get the ref to the widget and set text (not prefered but works)

dim halo
#

would this be how i do it

#

the player doesnt actually die im just ending the game so the thing that "kills" the player is really the only thing that needs to know

frosty heron
#

you will have to get a ref to the widget and set the text when the "death" happend

dim halo
#

if this is happening at the time of death shouldnt that set the text or am i a bit confused

frosty heron
#

but for proper game, don't do this. Distribute the task sensibly. These kind of U.I can probably offload to HUD class

dim halo
#

ok noted

#

thank you so much for the help

placid flame
#

Does anyone know why this node is getting 12 sockets when the debugger shows there is only 1 socket?

tacit sail
#

If anyone can help:

trying to find the best way to have multiple local controllers operate a character select screen at the same time.

Iโ€™m relatively new

frosty heron
elfin lagoon
#

which node do i need to change transform mode of the spring arm from world to relative?

surreal peak
#

Components attached to other Components have both a RelativeTransform (to its Parent) and a WorldTransform (based on its Parent's WorldTransform).

#

There should be functions to set Relative or WorldTransform for SceneComponents (which a SpringArmComponent is).

#

The DropDown you are showing is mainly for Editor only stuff.

elfin lagoon
surreal peak
#

But the proper solution is actually to use the PlayerCameraManager and to code the exact behavior into that.

#

The SpringArm, or rather the CameraComponent, is only an Offset to your Character's WorldTransform.
Unreal Engine only really knows "ViewTargets", which are Actors. By default UE will look for the first Active CameraComponent on a ViewTarget to offset the Transform (and pull some additional visual information, like FOV, PostProcess and all the other stuff you can set up on the CameraComponent).

#

But in theory, if you want to "cut the camera loose" from the Character, it's best to create your own APlayerCameraManager BP/C++ child class and override the UpdateCamera (or whatever the method is called) function and returning the Location/Rotation/FOV you need for the given situation in your Game.

#

You have access to the ViewTarget in that function/class, which you can cast to e.g. your Character (if that's your ViewTarget).

#

E.g. you can have a boolean on the Character that defines if the Camera is following or not.

#

In the PlayerCameraManager you can cast the ViewTarget to your Character, get the boolean and if it's false (let's say it's called bCameraFollowsPlayer) you can just return the Parent call, so handle it just like it would do without overriding it, and otherwise you can code whatever you need and return the WorldLocation/Rotation that the Camera should be at.

#

Def the cleaner solution and in terms of using UE you should always try to utilize the base classes it provides to get the maximum out of it.

#

At least on the Gameplay Framework level

elfin lagoon
#

u made a simplest thing overcomplicated for me
i just need to switch mode from absolute to relative, bcz, when the free camera is focused this way, overhead HP widget is twitching

surreal peak
#

On the other hand, I did tell you you can set the set WorldTransform nodes, so the "simplest thing" solution was also provided.

surreal peak
#

You can try, instead of setting it one there, to save the GetActorLocation and set a boolean in addition, and then use the Boolean and the saved Location to set the SpringArm WorldLocation on Tick.

#

But well, hacky solution, up to you.

compact fable
#

Speaking of the spring arm, how would I be able access its variable from outside the character without casting to the character? I tried using an interface but didnt get it work

gentle urchin
#

Sounds a bit like an anti pattern there

surreal peak
compact fable
surreal peak
#

"self" is your PlayerCharacter. All you are doing here is calling the Interface on the PlayerCharacter.

#

That's probably not what you want?

gentle urchin
#

GetComponentByClass sounds like a more reasonable approach

surreal peak
#

The function should be called something like "GetSpringArmComponent", returning a SpringArmComponent reference.

#

Then implement that on the Character

#

And in the Overlap event, call the GetSpringArmComponent interface function on the "OtherActor" pin.

compact fable
#

okay so the interface should be inplemented on the character and not ont he volume? The volume is where the function is called?

surreal peak
#

Right, do you know what Interfaces are and how they work?

#

Cause it surely looks like you don't.

compact fable
surreal peak
#

An Interface allows you to call functions on Objects without knowing there actual Class.
That is usually only useful if you need to do something with Objects that don't share a common class.
Best example for Interface usages is an Interaction Interface, where a function called "Interact" is added to the Interface.
Then, when trying to interact with different Actors (e.g. a Lever, a Button, or an NPC), all you'd do is trace for a given Actor (or get the Reference however you like) and call the Interact Interface function on whatever Actor you traced.
If the given Actor implements the Interface and then Function, it will call it on that Instance.
E.g. the Button would implement being pressed and the NPC would start a Dialog.

#

Interfaces are redundant if the different options share a parent class. If you can put the function in question into the parent class and override it in the children, then there is no need for an Interface.

#

Interaction is a good example for Interfaces cause a Button inherits from AActor, which an NPC might inherit from ACharacter. And while ACharacter ultimately inherits from AActor too, you have no way to put a common parent class in between that.

#

So for your specific issue, if you want multiple different classes that don't share a common parent to return a potential SpringArmComponent, then you would need to add a GetSpringArmComponent function to your Interface, add it to the different Classes, implement the function and then call the Interface function on whatever Actor you want to potentially get the SpringArmComponent from

gentle urchin
#

(Many, including me, prefer components over interfaces as they can remain stateful and have pre implemented code, unlike interface)

surreal peak
#

If you, however, know that it will always only be your specific Character class, then using an Interface is redundant

#

Interfaces still perform a cast. You gain nothing from that. At that point just cast to your Character class and grab the SpringArm.

surreal peak
frosty heron
compact fable
#

@surreal peak Thank you for the explanation, I was able to set up interaction like you mentioned with the interfaces, just this is different but also not dfifferent so I was confused

surreal peak
#

Yeah, it also doesn't help that a lot of people don't get that Interfaces are just another class the BP inherits from, so one has to cast anyway

frosty heron
surreal peak
#

Still don't like the "UseAnInterface" part.

#

Like, mostly cause it's so not explaining as to why

frosty heron
#

"Can't / Won't"

surreal peak
#

Which is not enough for a Beginner to understand

#

Someone who needs that image is def not able to tell if they can't or won't

frosty heron
#

I have linked the full article earlier but clearly wasn't read ๐Ÿ˜ฆ

#

the fact that he tries to even pass a hard ref to the player character

surreal peak
#

Also not a fan of the Actor Tags. But that's mostly a UE problem.

#

I have not, in the past idk how many years, used that Tag Array

#

It was never needed.

frosty heron
#

Trying to avoid memory foot print from hard reference but end up passing the hard reference to the interface anyway

surreal peak
#

If those were GameplayTags, that would be a different story.

compact fable
#

so how to avoid those hard references? ๐Ÿค”

surreal peak
#

Hard References to Assets, in this case BPs, can be avoided by not using the BP Asset when not needed.
That's what the image is about.

#

E.g. if you need a property or function that is part of the C++ class, don't cast all the way down to your own BP class.

#

But you also need to realize that hard references aren't anything bad if your need them.

compact fable
#

okay, so in this case where I just want to get the spring arm from the player, I can get component instead which will not to a hard cast to the entire BP

surreal peak
#

If your Volume there needs to access teh SpringArm on the Character BP, then it's totally fine to simply cast to it.

#

You can work your way around this with an Interface

#

As explained

compact fable
#

I just want to zoom in or out the camera at certain points haha

surreal peak
#

But in cases like these, it's questionable if the efford is worth it

#

Interfaces make it really annoying to navigate your code

surreal peak
#

There isn't much more to it.

#

Despite cutting this whole thing further apart.

gentle urchin
#

For zooming i'd implement a funciton in my character class and let that handle the spring arm modification

#

not a fan of externals modifying internals

surreal peak
#

So the Overlapping Volume Actor has to notify the Character

#

I would just have a function on it to tell the Character to modify it.

#

I mean, I would over engineer the shit out of this anyway

#

So who am I to speak

gentle urchin
#

OnOverlap -> CastToMyCharacter->SetSpringArmLength(float NewLength)

compact fable
gentle urchin
#

This way, a class that I've modified, can intervene or react to it being changed

surreal peak
#

I would have a APlayerCameraManager child with an Array of Modifiers for my Camera that have priority.
And that would control the Zoom Level and then different Overlaps can get the CameraManager and push a Modifier on overlap and remove it on EndOverlap.

#

xD

compact fable
#

this what I got, I will probably expose the arm length so I can adjust in editor

gentle urchin
#

Im just starting to play with the camera manager, so maybe ill do that next lol

surreal peak
#

And simply check if the SpringArmRef is valid

#

Before modifying it

frosty heron
#

Casting is absolutely FREE or cost next to nothing

surreal peak
#

But you'll ultimately notice that your setup is in fact a bit too simple

frosty heron
#

it's the memory footprint you are trying to tackle from the hard reference

surreal peak
#

How do you return back to the default value?

frosty heron
#

which you drop there anyway

surreal peak
#

Where is that stored?

#

What if 2 overlaps modify it?

#

It's better to delegate the whole SpringArm state to the Character

gentle urchin
#

and you leave one while staying in the other

#

it would break instantly

surreal peak
#

And instead of doing the GetSpringArmComponent add functions to modify the SpringArm via the Interface

#

And use those

gentle urchin
#

OtherActor -> ImplementsInterface(ISpringArmInterface)->ModifySpringArm

compact fable
#

so many voices! I appreciate the help guys

gentle urchin
#

Sorry, I should learn to not meddle

surreal peak
#

Take the best of all of them tbh. None of use have the true answer anyway

gentle urchin
#

I can see how it easily becomes very confusing

surreal peak
#

All based on experiences and subjective shit

compact fable
#

yeah, I really appreciate it! It's very insightful!

surreal peak
#

And programmer god complex, so all of your solutions suck anyway partycat

compact fable
#

I gotta help bath the baby now, but I will be back if I get confused again ๐Ÿ™

compact fable
frosty heron
compact fable
dark drum
#

@compact fable 3 ways for you. ๐Ÿ™‚ I prefer the top one but as eXi said, pick which ever is best for your situation.

(The bottom interface one, you would need to implement the function to update the spring arm on the actor it's placed on)

gentle urchin
#

(4th option , letting the Character handle the changes! ) ๐Ÿ˜„

dark drum
gentle urchin
#

Ooor subclass the springarmcomponent

#

My outcome was mostly to provide an opportunity for a project specific class to control the state changes ๐Ÿ˜„

frosty heron
compact fable
#

so many choices! Thank you @dark drum

neon aurora
#

I am using the ability system to trigger a punch ability.
However, during it, my character can not move at all. I need this ability (and montage, of course) to be interruptible if the player moves after say 1 second from triggering the ability (and montage.)
Have to say that the animations themselves are root motion.

What is the best practice of doing the above?

eternal cradle
neon aurora
#

That's new to me

eternal cradle
#

yeah of course! ^^ the good thing with this approach is you can determine when a montage can be "interrupted"

#

something like this should work

lost hemlock
eternal cradle
lost hemlock
#

Yes so when I press a crafting button, only one item from the ingredients is removed

gentle urchin
#

Because completed

eternal cradle
# lost hemlock

hmm. not sure how this inventory is built. but the map in RemoveIngredients() should correlate to an Identifier | Amount

#

right!

lost hemlock
#

Also this doesn't add any inventory

#

it doesnt work sadly ๐Ÿ‘Ž

gentle urchin
#

So the things you told me was working, is not working ๐Ÿ˜…

lost hemlock
gentle urchin
#

Adding to inventory for one

#

You said it was working

lost hemlock
gentle urchin
#

I was questioning how it could

lost hemlock
gentle urchin
jaunty jolt
#

How do i check if a level exists? I have a name, and will open level with that name.
Though sometimes this name is not a level

frosty heron
#

use soft ptr instead to compare level

#

somehow epic doesn't have UWorld exposed to blueprint by default... maybe to protect blueprints users from using a hard ref to the world, no clue.

gentle urchin
#

Bp got safetyrails, no question about it

lost hemlock
jaunty jolt
lost hemlock
#

the add to inventory after you created a craft <----- this doesn't work

jaunty jolt
#

thanks

frosty heron
#

sure it can work, but not the approach I will take.

lost hemlock
gentle urchin
#

Yes

lost hemlock
#

@eternal cradle

gentle urchin
#

Ehat does log say

lost hemlock
eternal cradle
#

so rock is not being removed?

lost hemlock
#

before it was wood not getting removed, rock was always removed

#

now its the other way around

gentle urchin
#

Show us the log

eternal cradle
#

try putting a breakpoint on RemoveIngredients (F9) and check the map

gentle urchin
#

Since you print

#

It would show in the log

lost hemlock
#

but thats it

dark drum
lost hemlock
#

Did you find array element? True

What did you find(quantity)? One

gentle urchin
#

But...

#

Lol

#

You dont remove the index as a quantity ?

gentle urchin
#

The find in recipe map is a ItemId/Quantity

#

Not index to remove.

#

You should specify the amount to remove.

#

Index should be handled internally in the RemoveItem

#

It needs to look through the unventory untill it has remived all items in the recipe list

lost hemlock
#

Two loops and then do == node

#

or maybe something like this

dark drum
# lost hemlock

So the 'Index' you're providing is actually a quantity and the 'Name' is never used. As Squize said, you need to loop through 'Content' and find the matching index required based on the supplied name.

lofty rapids
# lost hemlock

this should check if Item ID matches name inside content and return if it does

lost hemlock
#

I tried to run it and I couldn't find any bugs

#

I guess it's good

#

it works... so i assume no problem

#

no bugs found

jaunty jolt
#

I'm making a dialog between characters.
Each answer will change different stats.
Insult: -10 relationship, +5 arrogance.
Push: -20 relationship, +6 arrogance, -5 energy.
Hug: +10 relationship, -1 energy, +4 friendly.
For now what i have is a Data table, with Name, "Insult", then a TMap with String and float. So like Relationship -> -10. So now i know Relationship must decrease -10.
How do i now convert the String "Relationship" to the actual variable Float Relationship in the character?

scarlet root
#

as i scroll thru the screenshots here..
Guys.. you don't need to drag Wires all over your graph, from the Function Input to the target..
You can simply rightlick.. Write "Get <InputName>" and you can create a Getter for the function Input... no spagetthi everywhere..

dark drum
# lost hemlock <@430016173694779402> I made this, this works, but do you think there is anythin...

Yea, you need a for each with break. Once it's found the item in the content var. it doesn't need to look through the rest. Also, your passing the quantity of the items currently in the inventory into the remove from inventory function. Depending how you use the input in the function, this could result in all the items being removed. This most likely needs to the the value returned on the initial 'find' node.

Also, with the 'Name' being stored as a text value. If you decide to do any nativatation, this whole thing would most likely break. Text should only really be used for things that would be shown to the player.

dark drum
scarlet root
scarlet root
scarlet root
#

Many roads lead to rome

scarlet root
jaunty jolt
#

thanks

#

GAS is kind of complicated

scarlet root
#

just the setup - if the basic Actors and Classes are done, it gets super easy and fluid.

#

but yes.. if one is beginning, it can be overhelming

floral stump
#

That RegionTwo is inside the if block or is outside?

floral stump
jaunty jolt
shy matrix
floral stump
shy matrix
#

What's connected to the false pin?

floral stump
scarlet root
#

Region two should get printed, regardless of the state of the Bool.. since a sequencer will always fire all its Executors in order.. one after the other finished

floral stump
#

from the code side i guess this looks like

if(bRegionOne)
{
    print regionone;
}
else{
    //nothing in here
}
print regiontwo;

but i am curious why is regiontwo not printed
this is what i am asking

scarlet root
#

you sure it not get printed? maybe the print time is wrong, or key is overwritten, or the color makes it being overseen?

shy matrix
#

That's what you have

floral stump
#

print time is 5sec, color is black still not shown on screen
but in logs i found it was printed ๐Ÿ˜„

floral stump
lofty rapids
#

print to screen is checked ?

scarlet root
#

have you set a Key in the print String?

floral stump
scarlet root
#

interesting.. maybe try with a different color than black.. like a very dark grey..

floral stump
#

and setting that bool to true, the regionone also not prints in red color

scarlet root
#

possible that the renderer uses black as opacity 0

#

then definitely something is wrong with your screen logger

#

Do you set ENABLEALLSCREENMESSAGES to 0 or called DISABLEALLSCREENMESSAGES ?

floral stump
#

i guess its broken yeah, because in logs it works print to log

scarlet root
#

Try to set ENABLEALLSCREENMESSAGES again..

And.. if you are on Source version of the engine, make sure to have the correct build setup (Development Editor)

#

you also wanna check for the DisableAllScreenMessages...

1 - Close your project.
2 - In .\Saved\Config\WindowsEditor\Input.ini file, delete these lines have โ€œDisableAllScreenMessagesโ€, save file.
3 - Open project again.
floral stump
#

in all conditions it says enabled ๐Ÿ˜„

scarlet root
#

i think you just need to call the ENABLEALLSCREENMESSAGES without a value ๐Ÿ™‚

floral stump
#

yeah it works now ๐Ÿ˜„

scarlet root
#

DisableAllScreenMessages is ok when shipping the game to avoid any prints (like the Shift + F1 to mouse unlock thing..).. but it also makes all the debug prints not being drawn

floral stump
#

thanks for poining this out

spark steppe
#

oO i think they're stripped off anyways if you don't make a Development build

haughty ember
#

I'm trying to use tags for character statuses, but I also need those statuses in the my blueprint animation.
I'm trying not to keep it too tied and use only tags, but in my animation blueprint I can't check for tags since it's not thread safe. Or at least it's not recommended.

What do you guys think should be the design here?

spark steppe
#

show how you try to access the tag from the AnimBP

#

where it complains about thread safety

haughty ember
#

well it's inside a method that's called from BlueprintThreadSafeUpdateAnimation, so it make sense - I want to keep it thread safe, just not sure how

#

I'm usually using the Property Accessor thing, just can't use it with "Has matching gameply tag" method

spark steppe
#

show the graph... there are certainly ways to get this data in a threadsafe way

haughty ember
#

Not really sure what you're asking to see. Does this help?

spark steppe
#

make a function to get the LyraCharacter, it just returns the variable

#

mark the function as threadsafe, pure and const in the function details

#

and then use the function to get the character reference for your target input of HasMatchingGameplayTag

#

it should work, but i'm not 100% sure

#

sometimes the animbp graph is a bi...t hard to deal with

haughty ember
#

@spark steppe how do I know that method is thread safe btw?
I mean according to the compiler accessing that property isn't thread safe, so why would the method be thread safe?

#

yeah actually it doesn't allow me to do that in that method

spark steppe
#

the function is supposed to return the character reference

#

not the result of the query

#

the point of the function wrapper is to have the const promise, which tells the compiler that you aren't going to modify data on that character

haughty ember
#

I don't think that's true though, the data on the character can be changed - it is multi threading and data is changing

spark steppe
#

during animation?

haughty ember
#

but even if so - I still need to call the "has matching gameplay tag", and that's not thread safe.
So how do I continue after having the thread-safe method that returns the character?

haughty ember
spark steppe
#

are you sure that it complains about the matching tag thing not being threadsafe?

#

i think it's rather because your character reference isn't const

haughty ember
#

are you sure that it complains about the matching tag thing not being threadsafe?
Yes, it complains about both.

It doesn't even allow me to choose that node btw, I have to copy it from somewhere else - and then it complains about it

#

Weirdly enough, it complains about everything once I add it

spark steppe
#

is the getChar function set to const?

haughty ember
#

yes, const pure and thread-safe

spark steppe
#

maybe remove the threadsafe, i'm not 100% sure which it was tbh

haughty ember
#

I think I found a way though; Lyra project has a c++ base class (LyraAnimInstance) with FGameplayTagBlueprintPropertyMap; which is a map of tags to class variables, and I can add my tags there and then use the variable.

#

Even the comment on it:

    // Gameplay tags that can be mapped to blueprint variables. The variables will automatically update as the tags are added or removed.
    // These should be used instead of manually querying for the gameplay tags.
    UPROPERTY(EditDefaultsOnly, Category = "GameplayTags")
    FGameplayTagBlueprintPropertyMap GameplayTagPropertyMap;
swift kiln
#

Hey I have this custom macro for a For loop with delay but I want to make a For loop with break with delay and I don't know how to do it. Can someone help me here please?

haughty ember
#

@spark steppeAnd thanks for the help btw!

#

@swift kiln Add another Exec pin in the Inputs.
Then connect that to a "break logic" (assign your Local Integer to Last Index I believe)

spark steppe
#

Has a developer ever casually mentioned something that made you realize you could've cut months off your last project? You could be that developer! Join Unreal Engine Evangelist Chris Murphy as he runs through some of the lesser-known Unreal Engine 5 features that could turn weeks into days.

Weโ€™re excited to bring you sessions from Unreal Fest ...

โ–ถ Play video
scarlet root
spark steppe
#

this kind of explains how it works

#

maybe it just wont work for your specific scenario where you use the tag query ๐Ÿคท

swift kiln
haughty ember
#

What gate logic

scarlet root
#

Oh.. just to complete this..
The gate only fires one exit. If you want to have the completed also fired, you may want to have a Sequence from the Break input to first close the gate, then go to the output completed

haughty ember
#

personally I think the gate overcomplicates stuff; you have your loop anyway, setting your state so it will max anyway makes more sense to me.
But if it works for you, that's great ๐Ÿ™‚

spark steppe
#

that's a wild macro to begin with...

#

i think it needs at least some failsafety to somehow cancel earlier execution if it get's called again!?

scarlet root
lofty rapids
#

you can actually look at the macro to see how they did it ?

haughty ember
#

@lofty rapids yup, and they use a boolean.

@scarlet root if you want the value then yes, a boolean is the alternative. Either way a gate sounds overly complicated for this case, at least to me ๐Ÿคทโ€โ™‚๏ธ

astral orchid
#

Question: What is the practical difference between using regular Trace By and Multi Trace By?

dark drum
astral orchid
#

Does Multi Trace account for Duplicate Actors?

dark drum
#

I use both in this finial trace (ball on a stick) i made a few days ago.

astral orchid
dark drum
astral orchid
dark drum
ornate wren
#

Why wouldn't this be happening?

The Green is the Actor.
The Red is the Boom Arm.
The Blue is Follow Camer "Player Camera".
The Pink is the Get Camera Position.

But, the Camera is suppose to be at the Blue. After AI Move, the Camera posiion isn't updating?

astral orchid
eternal cradle
ornate wren
#

Looks like the Player Controller and the Get Controller (also a player controller) are out of sync... I have no idea who this happened...

shy matrix
#

anyone had any success with the delete file node in bp?

If i check the same file with the FileExists node it returns true, but then it does not delete it. Bit puzzled

shy matrix
dark drum
shy matrix
#

in context, if useful

#

but i dont think im doing some weird operation there that could cause failing. then, i am happy to stand corrected

#

oh well no need to debug this in-depth. im gettin by deleting dups manually. just wanted to know if someone has used this node before successfully and there is maybe some quirk i need to be aware of

dark drum
shy matrix
#

oh actually youre right, i should use the macro in both places. its the same code as the previous check

mortal coral
#

I'm noticing an object spawning with vastly different behavior when I spawn it via "SpawnActor" vs when it is simply part of the level.

Specifically, it spawns with "Hidden In Game" set to true, and it also seems to have very weird collision behavior (the collision config seems to be set correctly as far as i can tell, but it generates no collisions, which is incorrect)

mortal coral
#

it's a building plot; i have a simple building system where the player can interact with plots to spawn buildings

#

the spawning logic is incredibly straightforward ^ (the final node is a workaround for the visibility issue, but i don't understand why that's happening at all tbh)

lofty rapids
#

maybe bp plot is doing it ?

#

setting it to hidden, or it's hidden in game by default

mortal coral
mortal coral
dark drum
final ferry
#

hii wanna ask is there a better way to do this? with it like this rn, when i do another thing (aiming on the second pic) it resets my move speed back to default when I crouch, aim then stop aiming

haughty ember
final ferry
#

im new to unreal so i dont really understand but when i search that i dont see anything

ornate wren
gentle urchin
#

I'd just leave it event based

#

having this on tick, when you have all the executions avaliable, is just waste

#

i Would wrap the speed change in a function tho., And just call that

final ferry
haughty ember
ornate wren
#

What do you need?

final ferry
#

can you explain what a method is first?

ornate wren
gentle urchin
#

made for a specific task

final ferry
gentle urchin
#

those are functions

#

you can create new ones

#

by clicking the plus sign

#

Tutorial time sounds reasonable , it's time well spent

final ferry
#

im a little confused cuz i cant find anything online searching method function

ornate wren
final ferry
ornate wren
final ferry
#

i tried to look for some but i found a lot thats goes through too much and the other is for animations so i kinda gave up.. probably shjouldnt have done that then

ornate wren
#

Want to add functionality to your Unreal Engine 5 game or experience? Designers, artists and just about everyone can do that with Blueprints. In this video, you'll the basics of what blueprints is and how you can use it to get started writing scripts for your games.

By the end of this video you'll create a toggle-able flashlight and door that a...

โ–ถ Play video
#

Get my 12 hour course on how to make 2D games with Unreal Engine:
https://tinyurl.com/Ultimate2D

Support the channel on Patreon:
https://www.patreon.com/CobraCode

This is an introduction to Blueprints with Unreal Engine 5 for absolute beginners. We are using the full release version of UE5 which was released in 2022.
If you're new to this top...

โ–ถ Play video
fathom mica
#

Hey folks. Some reason even with my character's movement component having Orient Rotation to Movment enabled and Use Controller Desiered Rotation disabled, my character will always snap to the original rotation... any tips? It's clearly trying to rotate each frame when moving but snaps back in a very jittery way.

#

Pawn had "use controller rotation yaw"

final ferry
ornate wren
#

Yes

#

Normally a function has a return value

#

Where a method does not in UE

#

Here ->

In Unreal Engine 5 (UE5), the terms function and method are often used interchangeably, but there are subtle differences based on context, especially if you're working in Blueprints or C++. Here's a breakdown:

#

Some things can only be done in methods is the main difference. Like calling animation BluePrint methods I beleive.

final ferry
#

that clear things up a lot more now, ill look up functions more then thanks!

lusty delta
#

I'm using an Enum to choose a name of a speaker in a data asset. In the script displaying dialogue, I figured I can convert the Enum to a next, yet only when converting to a string first.
The problem is, this can apparently not be localized for names that would have to be localized.
ChatGPT claims there's a node "Get Display Name Text" but it doesn't seem to exist.
Any idea how to convert and still be able to localize? Or: an easy way of being able to choose the name in the DA?

gentle urchin
# final ferry that clear things up a lot more now, ill look up functions more then thanks!

They're both really the same thing but with slightly different rules. A "method" isnt called a method in unreal. Its an Event. Its the same as a function except it doesnt return anything. This is also what allows it to be latent (delays/async/later callbacks etc)

So a "function" usually returns something (altho its not a rule, but the restrictions still count in regard to latent etc)
An "Event" is just a function that per rule cannot return anything

In C++ (for UFUNCTIONS amyway) theres litteraly no difference between the two. Because they are in fact the same thing

zealous moth
#

@lusty delta make another text array and get index based on enum int

lusty delta
lusty delta
#

GPT also claims there's an option "Expose Enum Entries to Localization", but it seems to be another lie ๐Ÿ˜ฆ

lusty delta
faint pasture
#

Name, text

lusty delta
# faint pasture Name, text

I'm using a data asset and I want to be able to easily choose the name for every entry and not have to type it.

lofty rapids
#

"In programming, a method is a function that is defined within a class"

faint pasture
#

Either way, the list of valid entries to an enumeration shouldn't really be data. It shouldn't really be changing when you add a new character to the game.

#

ECompassDirection won't really ever change. It'll be North, South, East, West. It's not like a new direction is gonna drop.

ECharacter will change all the time.

ornate wren
#

2.5 half days to get this to work because of issues with rotation, AI, and possess... ๐Ÿ˜ข

lusty delta
# faint pasture Gameplay tags then

I don't think I understand. I wanna change who is currently speaking just like is happening here and display the name accordingly.
I don't know what gameplay tags are, actually.

lofty rapids
#

basically any function attached to an object

#

is a method

gentle urchin
#

Which is 99% of it

dawn gazelle
#

(Specifically the "Crystal" part?)

lofty rapids
#

i mean it makes sense by definitioin

#

you need to access the outer class to access the function

gentle urchin
#

Unlessss static?

#

Hmm nvm guess it still technically belongs to the class

#

Unreal doesnt refer to methods anywhere in bp tho

#

Its only events or functions. Using method will only create extra confusion imo^^

surreal peak
#

Every time I have to explain a new BP user what a "Reference" in BPs is I get annoyed.
Cause I can't just call them Pointers, the have no clue what that is. And References are a thing they could find online and would learn the wrong thing then.

#

sigh

autumn pulsar
#

Are UE5 rotators stored internally as quats or Euler angles?

gentle urchin
autumn pulsar
gentle urchin
#

Point them to some reference material perhaps?

#

So bp refs are pointers, and not refs?

#

Thought they were refs and not pointers (no dereference involved)

#

Never really gave it much consideration ill admit

#

||And even tho a function belonging to a class could be refered to as a method, it is still also a function ๐Ÿ˜…||

autumn pulsar
#

While there is a difference between pointers and refs, I think for most users they just care if theyโ€™re working with the object itself or a copy

gentle urchin
#

Yepp yepp

autumn pulsar
#

Most modern C++ code pushes references instead anyways

#

Pointers are footguns in a lot of cases but are powerful

surreal peak
gentle urchin
lofty rapids
#

pointers and references are similar, very close to the same thing

#

in cpp you can use a reference as a pointer

surreal peak
#

BP References to Objects are Pointers. Or at least they behave as such.

#

BPs also have references to Struct elements

#

Those are .. I guess actually references

dawn gazelle
#

I'll admit... Even though I learned what pointers do decades ago... I always had a hard time figuring out why you use them and though I do understand why now, I still struggle with their syntax (&*?!). I've gotten much better with them working with them in Unreal.

surreal peak
#

I yeah I can point them to reference material, but since they learn BPs and not C++, it's tricky to find something explaining that stuff without going too far away from rounded little nodes.

gentle urchin
#

The joke was right there

autumn pulsar
surreal peak
#

I mean, Pointer Syntax is stupidly easy. First class at Uni we had got a fake Address Row with numbers in some of the slots.
And then multiple different expressions, such as ***ppptr + 5 or *(**pptr + 2) - 3

#

And had to figure out what goes into which cell.

dawn gazelle
#

@_@

surreal peak
#

After that it was mostly boring.

dawn gazelle
#

It just looks like the code is swearing at me!

surreal peak
#

It is. It's calling you names.

dawn gazelle
#

T_T

lofty rapids
#

references and pointers are always complicated topic

surreal peak
#

No but honestly, pointers are really simple. It's an integer with the number that points to memory.
If the address is 1000 and you add 5 to it, then it's now pointing to the memory with address 1005.
It also made things even "easier" once it was clear that Array[5] = 10 is the same as *(Array + 5) = 10

lofty rapids
#

but if you have done memory addressing at any point it becomes a lot easier

surreal peak
#

Yeah

lofty rapids
#

in things like assembly you need to worry about that kind of thing, unreal takes care of it all in bp

surreal peak
#

And ***ppptr ? That's also only looking weird, but ultimately it just dereferences one "pointer" after another.
Since Pointers are just integers with an address number in them, if one pointer points to a pointers which pointers to a pointer, if you just put 3 * in from of it, it will chain.

#

Obviously that Uni exercise was done in a way that the fake cells had numbers in them that were addresses of other cells.

#

As soon as one touches a TMap with a Value that is a pointer, calling Find on it will get you into a Pointer to a Pointer situation.

gentle urchin
#

I tried TPair with a pointer

#

I left screaming

#

Also messed up and chugged 40 gig of ram in seconds

surreal peak
#

Find just gives you a pointer to the Value or null if it can find it.
If the Value is itself a pointer, then what you get is just a pointer that points to the actual pointer, which in return points to the actual data.

#

You can probably chain that hmm

#

Wonder if TMap allows UObject*****

#

Let me tell you the tail of how I lost one of the pointers in between my pointers.

#

But yeah, back to References vs Pointers in BPs. I still don't like that they are mixed up there.

#

Not that BP users would be less confused.

lofty rapids
#

ref and pointer are so similar i'm not surprised it's mixed up, they are basically the same thing

#

i like to think of them as the same atleast

#

fundamentally they both "point" to something, instead of hold the value

gentle urchin
#

Its always confusing reading about it ๐Ÿ˜…

#

But it kinda makes sense

#

References are just dereferenced pointers if im not mistaken

#

Brings along some type safety which pointers doesnt (or didnt?)

eternal cradle
#

:=)

tight pollen
#

Is there a better way to replicate Pitch than using Multicast >> Set Rotation?

#

Get Base Aim Offset doesn't works on clients side

surreal peak
#

GetBaseAimRotation should work just fine

#

@tight pollen

#

That's literally using a replicated Pitch Value for SimProxies

tight pollen
#

I'll check it again tomorrow, I always have some problems with this

#

With Pitch

tame loom
#

Trying to avoid using "Get all actors of class" Node. So i got NPCs ai walking around town and going to different destinations. But whenever they decide to go to a new destination they are calling get all actors of class and selecting one. Is there a way I can some how cache this is like a manager bp at begin play and then get my AI to just reference that to get data about the locations? I can put an actor in the world and have it call get all actors of class, but how would i get a reference to that actor into my AI controller or AI class? Please let me know if you can THANK YOU!!!!!!

maiden wadi
tame loom
#

probably less actually

maiden wadi
#

Probably worthy of optimization at that point depending on how often it's running. As far as the general question, you can make a manager someplace glocal like a component on your GameState, or a singular actor in the level. Then you could either access it through GetGameState->GetComponentOfClass, or GetActorOfClass

tame loom
#

If my Ai can just get access to a manager actor i think it will work. I guess i would just have to have every ai cast to it at begin play.

#

ohh

#

Ok and if i use get actor of class, Would i then have to cast to it as well? or would i not need to because there is only 1 manager actor ?

maiden wadi
#

It wouldn't matter if you needed to cast to it or not.

tame loom
#

for sure. Saving your answer in my notes. THANK YOU SO MUCH. This has been super helpful bro

#

Very much appreciated!

maiden wadi
#

Of course. Anytime. ๐Ÿ˜„ Also semi unrelated due to C++ requirement, but you can also make WorldSubsystems for this sort of thing too.

tame loom
#

ahhh ok for sure. When i level up more I'll look into that lol! but i'll put that in my notes as well

chilly crane
#

So why is it doing this? I've used the exact same setup before in another bp and it works?

maiden wadi
#

You haven't set Value to point to a specific instance.

dawn gazelle
#

In this case that "Value" variable should be an instance within the widget, no?

#

It's not a separate variable Natsuya created.

chilly crane
#

Yeah, it's supposed to be set here:

maiden wadi
#

Then it's probably called too soon. Underlying widgets are not created until just before PreConstruct.

chilly crane
#

I've the exact same logic here and it works perfectly fine

maiden wadi
#

Are you calling one after adding it to the parent?

chilly crane
#

this is where I call the one that works

#

this is where I want to call the one that doesn't work

maiden wadi
#

Why aren't you using the ArrayElement here?

maiden wadi
#

You can cast that. But right now you're telling that one widget to update multiple times.

#

But what is OptionLine?

dawn gazelle
#

But it still fails!

chilly crane
# maiden wadi But what is OptionLine?

is a template widget that holds all the layout for each option in a menu. Rather then having a gazillion items to make a single line, I use 1 optionline

maiden wadi
#

But that specific one. Is it a default widget in that blueprint?

chilly crane
maiden wadi
#

๐Ÿคทโ€โ™‚๏ธ Either the internal widget inside of OptionLine was removed from it's parent and collected, or it was never created due to OptionLine not being added to a parent, or being remove and all of it being collected. I'm unsure

trim matrix
#

is there a way i can import tracked camera motion from blender, into unreal and use it as a camera shake in my game? im using a headbob camera shake rn and it just looks bad. im trying to give a convincing handheld camera look

pulsar osprey
chilly crane
jaunty jolt
#

This is what im doing for my CYOA game. ITs mostly UI game, where you go to places, and then choose what to do.

#

Is this okay?

#

I was told to do Gameplay Ability System though this sounds simpler to me ๐Ÿ˜•

pastel apex
#

you don't necessarily need the abilities or effects, but the gameplay tags will definitely help immensely when it comes to classifying stuff

#

and you can provide some basic boilerplate GAS system to give characters an ability system component so they can received named events

pastel apex
#

and to my surprise

#

you can just give an ASC in BP classes

#

which I think is sufficient enough to receive gameplay events

#

le oof

desert finch
#

can someone else me figure this one out? I am trying to have different meshes inside of a blueprint, that when the player looks at the mesh, it will show a message on screen, the function already works when return node is used, but I cant figure out how to make an array, that calls the specific mesh the player is looking at...

pastel apex
#

quick question, what would happen if you try to set opacity in the negatives?

#

would it automatically clamp it back to 0?

desert finch
#

i can easily set it so that 1 mesh has a name, but i need it so like, 15 mesh, can have individual names when looking at

desert finch
pastel apex
desert finch
#

yes, i can make an array and attach all of the mesh components to it

#

but i cant figure out how to have the correct info FROM the array be called to the return node

pastel apex
#

this is when the player is looking at it right?

desert finch
#

yes

pastel apex
#

so i presume you have some linetrace system going?

desert finch
#

yes

#

and a blueprint with about 20 different buttons

#

need each button to show which one you are looking at

pastel apex
#

why do you need 20 different buttons well if you already did the line trace, you can then pass in the actor that got hit in the line trace into the function

#

and use array find function

#

to see where it matches

#

you can probably use a set if you want O(1) look up times

#

since using find on an array can be slower

desert finch
#

array find function?

#

its an elevator btw xD

#

like i know this is incomplete, i just dont have a clue how to set the find array to work with what im actually looking at

pastel apex
#

add a parameter for actor

#

and pass in the actor that your linetrace picked up

lost hemlock
#

@dawn gazelle remember when I had a problem with this system that was basically checking if you got the right ingredients or enough of them to be able to craft something? That was solved. But now the same problem would come except in this case I have a different system. And that is a slot color system.

#

Same problem here

#

Well (almost the same)

#

And I blame this function

#

so as soon as I get one wood, this slot turns to looking normal

dawn gazelle
#

Once you're sure you have enough, you return true.

lost hemlock
lost hemlock
pulsar osprey
dawn gazelle
# lost hemlock I am returning true once I have enough
  1. You're not checking the total of any particular item in your inventory
  2. You're checking if the total length of the list of ingredients matches the number of particular ingredients in the inventory (in other words, if your crafting recipe required 2 wood and 1 rock, and you happened to have 1 wood and 3 rock, you would still be returning true
lost hemlock
# dawn gazelle 1) You're not checking the _total of any particular item in your inventory_ 2) Y...

So that means... You're fixing a car, and instead of checking for the wrench and screwdriver, you see that you have two tools. You just count but never check what those tools actually are. They could be a hammer and a paintbrush or a spoon and a toilet brush, but they are totally useless. And what I need to do is do both at the same time. Count both quantity and if the item id of those items is correct?

dawn gazelle
#

Right, but what is its crafting requirements?

lost hemlock
#

Looks craftable. And it's allowing me to craft it

#

It shouldn't be possible to craft here.

dawn gazelle
#
  1. You're checking if the total length of the list of ingredients matches the number of particular ingredients in the inventory (in other words, if your crafting recipe required 2 wood and 1 rock, and you happened to have 1 wood and 3 rock, you would still be returning true
#

You have an ingredient list of 1.

lost hemlock
#

And if I craft it, it will actually remove 1 wood from my inventory.

dawn gazelle
#

Oh this is fun too... You're checking if the quantity in your array >= the "Slot Quantity" of the class default object, nothing to do with the actual crafting requirements.

#

So it's probably 0 coming out of that number there.

#

which is true.

#

so then you add 1 to your counter.

#

Then this part will return true.

lost hemlock
#

Also I got this new function

dawn gazelle
#

Loop through required ingredients, store the # required of the ingredient.
You have a function already in your inventory that should be able to tell you the number of any particular items in the inventory. Do this.
Compare that number making sure it is >= # required of the ingredient. If it is not, then you must return false.
If you make it through all ingredients without returning false, then you should be able to return true on completed of the loop.

lost hemlock
lost hemlock
#

So I got 3 functions that sound like could help

  1. GetItemAmountFromInventory
  2. Is Item In Inventory
  3. GetItemData

you only want me to use one of them, which is the first one?

dawn gazelle
#

Well, if GetItemAmountFromInventory is still set up the same, that one seemed to count the total from all inventory slots from what I recall.

#

The other problem here... Is that with each ingredient, you're having to loop through you inventory that many times... That's not great.
Ideally you'd loop through your inventory only once, checking if each slot contains a desired ingredient, and if so, increase a counter that relates to that ingredient, an at the end compare the counts of each required ingredient to the amount found in the inventory.

lost hemlock
dawn gazelle
#

That would be the required check at the end if you loop through the inventory only once etc..

lost hemlock
# lost hemlock someone recommended me i do this:

but im comparing dictionary/map to content which is struct, i guess it doesnt have a boolean but i can engineer it to have a boolean value, for example , if return output is 0 then that means it's false, if return of the integer is >0 then return output is true

dawn gazelle
#

?

lost hemlock
#

I mean this

dawn gazelle
#

You don't need to put your inventory into a map.

#

You just need to keep track of:
ItemID > Count in Inventory

#

Just like your recipe keeps track of:
ItemID > RequiredAmount

lost hemlock
dawn gazelle
#

And you can do that in a function.

#

this function specifically.

lost hemlock
#

Another one recommended this

#

or its more like checking laundry one sock at a time, even though you could just do it all in one go and save time

lost hemlock
rotund ruin
#

anyone have any idea how to use this correctly - I just want to orient my player to the cursor, but if I calculate the mouse position from the player controller it spazzes out, I assume because I set the control rotation from that calculation. it works fine if just use gethitresultsundercursor to get my mouse location

lost hemlock
dawn gazelle
#

That's not keeping track of how many are in the inventory.

lost hemlock
dawn gazelle
#

This is what you would have to do to currently accomodate what you have.

lost hemlock
dawn gazelle
#

Loops through all ingredients, storing the Name > Amount Needed.
Loops through the inventory, checking if anything is a required ingredient an keeping track of the number in the inventory.
Loops through the ingredient list, checking if the found ingredients quantities < the required quantites and if so returning false....
IF the loop completes, then all igredient have been accounted for, and we can return true.

lost hemlock
dawn gazelle
# lost hemlock instead of classes what could i base this one?

You normally do not want to use actor classes as a means of keeping track of static information about items. They are meant to be objects that are spawned and exist in the world, not meant as a data asset.... A Data Asset is something that works better for storing static data about an object that doesn't need to be spawned in the world. A close second would be a data table, but they have their own struggles if you load them up too much too, and makes it kinda wonky to handle since you'd have to continually store the data as variables in order to access it.

#

Don't worry about that for now. Get your system working, otherwise you're going to be struggling trying to rework everything.

lost hemlock
#

This is a good method?

dawn gazelle
#

That's how i'd handle what you have currently.

#

It limits the amount of loops needed.

pastel apex
#

so i know you can't run timelines in widgets but is there some equivalent in widget blueprints for it?

dawn gazelle
#

Animation Sequence is probably the closest equivalent XD

pastel apex
#

oh yeahhhh

#

i forgot about that

jaunty jolt
#

Do you Create Widgets at runtime, or you include all widgets in the HUD as collapsed, and make them visible anytime they are needed?
I have a ton of Widgets all hidden (Collapsed), under my mainwidget. Then i just make them visible when i need them. Is this the correct thing to do?

tropic token
#

guys, is there any way to make some kind of checked get from array? so if the index is out of bounds it won't give me an error like:

LogScript: Warning: Script Msg: Attempted to access index 1 from array 
dawn gazelle
dawn gazelle
tropic token
surreal peak
pastel apex
tropic token
#

guys, is it okay that? kinda annoying thing. why it shows incorrect value?

frosty heron
jaunty jolt
#

thanks all

tropic token
jaunty jolt
#

i like widgets

tropic token
# jaunty jolt is it that much better?

it's scaleble and overally great

it's same widgets just different base classes, all is the same, but a bit different workflow. more convenient in many ways

lunar sleet
#

Not quite the same, thereโ€™s some useful things common stuff can do that regular widgets canโ€™t

#

Setting it up initially is a little painful tho ๐Ÿ˜„

surreal peak
#

I would probably not do any serious project without CommonUI anymore.

#

Maybe a pain to set up, but it gives a lot more than just "different base classes".

#

Needs C++ in some cases though

lost hemlock
#

Where does "Desired Ingredients" and "Found Ingredients" come from? @dawn gazelle

chilly crane
#

Is there a better way to do this otherwise massive switch function?

#

also, will text variables get converted to different languages in the event graph? I want to compare some text with a string, and I need to know that it will always be in the same language while being used in logic (it ought to convert when being displayed)

#

ping with response please

lost hemlock
# dawn gazelle

i think varaibles get created from when you promote a value to variable from this creation of yours, (and maybe also SET them afterwards) , otherwise they would be empty values

tawdry walrus
#

Hi, I have created a save system, but when I tried to load the inventory, the saved items loaded correctly. However, the items I picked up are also appearing in the game world. Is there any way to remove or destroy those extra items?

gentle urchin
#

Looks like a collapsed graph

lost hemlock
#

@dawn gazelle also where are you getting this from? I mean it's a new variable right, but where is it getting SET? Where is this getting any data? It's gonna be an empty variable

#

@gentle urchin can I ask you instead about Datura's code?

#

Where tf is "Desired Ingredients", "Found Ingredients" and "Ingredient List" coming from?

wraith loom
#

Hello, bit of a computer science question here. I have a 3 integers (32 bit) that I want to combine into a string for savegame, and I want to make the string as small as possible. Is there a better way to do this other than just concatenating the integers together (with dividers to show where one int ends and another begins)?

lofty rapids
#

three integers in a string are usually stored with a delimiter @wraith loom this is a classic technique and still works great

#

but you could also store a hex representation

#

which is typically smaller than a large number

#

normally it's just number|number|number

#

also depends on how complicated you want the reader

#

you want to just convert a string to a number, or do you have to convert a hex string to number

#

but imo hex would be smaller

#

atleast for larger numbers

trim matrix
#

Hello there i am using "Archviz" explorer template for my project and i created another level to practice, i have added one BP_explorer_Pawn node in map but when i start the game it spawn another pawn object rather then using the one which is already in the level

lofty rapids
#

you need to set it in the gamemode override

#

set the pawn

#

you need to make a game mode class, set the override to that class

#

and then you can override the options

trim matrix
lofty rapids
#

so default pawn class is set to the one you want ?

#

and it's not loading it ?

trim matrix
#

the class are same but the problem is it is creating another instance

gentle urchin
lofty rapids
#

well ya

#

it doesn't use the one in the level

#

it spawns a new one

#

thats intended behavior

#

just remove the one you placed in level

#

and put a player start

gentle urchin
#

I know ๐Ÿ˜

trim matrix
#

thank you both of you

gentle urchin
#

Glad it worked

trim matrix
#

๐Ÿ˜†

trim matrix
lofty rapids
#

you just need a player start

#

and thats where it spawns

mystic light
#

super dumb blueprint question.

I have a branch, which means i ahve two execution paths.. i want to do some logic on one of them...

But after that.. i want to go back to the main execution flow;

ie; i want to merge both branches back to the single execution flow (rather than end one branch).

How can i do that

frosty heron
#

maybe describe what you want to do gameplay wise

lofty rapids
mystic light
#

if i draw two execution lines to the same node, the first one disconnects?

mystic light
#

how do i merge the two white lines from the two branches... so the final stuff can be done regardless of which branch it went down

frosty heron
#

If A -> Do Extra -> Do Final

lofty rapids
frosty heron
#

If B -> Do Final

mystic light
frosty heron
#

well you are probably in some control rig or PCG

#

that's not standard bp stuff

#

can't you copy the return node?

mystic light
#

looks like i can only havce one of them

lofty rapids
#

ya idk because it's not normal bp

frosty heron
#

in normal class you will just do this

frosty heron
#

control rig?

mystic light
#

yeah,

lofty rapids
#

can you only have one return ?

frosty heron
#

I'm looking at it, it seems you can only have one return

#

can't copy paste, can't even make another output pin

mystic light
#

seems cumbersome but might work

#

so they want to just use sequence, and abuse the fact that it will jump to #2 after finishing #1.

Where #2.. is just the return node

frosty heron
#

I don't know what the OP is talking about

#

probably just saying rubbish

#

when asked about solution, he is just saying he doesn't use UE

#

๐Ÿคทโ€โ™‚๏ธ

#

how sequence could help with the branch

lofty rapids
#

looks like they are just suggesting not running both, but running the if in first part of sequence, and then return after

mystic light
#

hmmmm

lofty rapids
#

so in theory it would return after both run, which makes sense

frosty heron
#

ok yea, im retarted

#

@mystic light that's what OP meant

gentle urchin
#

Thats so strange

#

Cant combine exec paths

mystic light
#

What a mindfuck

#

i think that will work

#

and is what the reddit guy is trying to articulate poorly

lofty rapids
#

it's the same logic

mystic light
#

yeah

#

mmm im glad this only exists for control rig blueprints lol

frosty heron
#

isn't there a helper function to calculate the closest actors in an array of actors?

jaunty jolt
#

anyone worked with templates. im constantly lost in this soup of blueprints and finding myself having to breakpoint the hell out of everything

#

is this even worth it?

#

by this time id have done the whole thing myself i think

hoary junco
frosty heron
frosty heron
#

blueprints become ๐Ÿ real quick

hidden fossil
#

Any ideas on what could be wrong with this part of my in-level cutscene trigger blueprint? It's for a 2.5D platformer, and is supposed to "camera pan" to the left or top by adding increments to the X, Y or Z vectors (checked in that order) but it's timing out at the first branch.

spark steppe
#

i'm still trying to figure out what is right with it

gentle urchin
frosty heron
#

found it

hoary junco
frosty heron
#

nvm! it's from some plugin I am using

#

just gonna re-create the functions on my own library

spark steppe
#

not sure if that's your issue tho

#

and use a decent amount of tolerance, something like 0.001

#

or maybe even higher, 0.1 or 1 should probably work, too

#

and if you need further help i would advice you to clean up that mess, because it's a disgrace to ask people to sort it out for you

frosty heron
#

Does passing pointer as reference instead of value even make sense?

#

probably not right? even thousands of them should be negligible?

gentle urchin
#

Not really a differemce

#

Bp is copy anyways

#

You might save some on a big array

frosty heron
gentle urchin
#

If im not mistaken by ref is less of a copy than a regular input ?

frosty heron
#

I don't think I can see bp the same way again after mine got corrupted

gentle urchin
#

Could be wrong tho.. just heard it a while ago

frosty heron
#

nah you are probably right

#

might end up with more overhead

gentle urchin
#

But you inow what to do if performance is an issue ๐Ÿ˜

spark steppe
#

i doubt that pointer arrays are your primary concern... ๐Ÿ˜„

hidden fossil
# spark steppe and if you need further help i would advice you to clean up that mess, because i...

I've only really done that once, and then lost track of how to do it. If it helps, I'll give you the breakdown of what's supposed to happen. The incrementing variable is counting from zero to however much pan distance is set by hundredths, one increment at a time (.01, .02 etc.) This is added to the X, Y or Z and fed into a vector which is then used to set the camera location, essentially panning the view. (So basically, it's the same thing I'm doing to set the camera position while the player is in control of the action.) Once each increment is counted and the camera is advanced, it should restart for the next one.

spark steppe
#

we don't even see what's on your branch logic for the left branches

hidden fossil
#

Thge branch nodes are for setting the correct axis

spark steppe
#

you showed us half of it, and i'm afraid to see the other half...

faint creek
#

Hi guys, beginner question: what are these node in the Event Graph? Thanks

spark steppe
#

which is declared in the BP it exists in

frosty heron
#

could be collapsed graph too? I think

spark steppe
#

yea possible, i don't use them often enough to tell

frosty heron
#

it's soo conviniently cropped, hard to tell

#

maybe show us what it looked like before you double click it

hidden fossil
#

actually, this is the half that is giving me problems. The conditionals going into the branches are in alphabetical order from the top (so X, Y and then Z in that order, and if the axis is not valid then a quit node crashes the game)

lost hemlock
#

Hi, can I get a second opinion on this?

So basically what im trynna do is have SLOT only turn red if you are too poor to afford it.

That's how capitalism works.

You should only be able to unlock it if you have more than 2 wood, otherwise it's called STEALING.

#

And this is the code responsible for it

#

So it takes ingredients from the inventory aka searchers through your content array aka your backpack, and in this procedure it tries to compare it to the things that already exist in to the other "array" <--- but its not really an array, it's actually a dictionary... ( although they work the same way pretty much )

Theres no difference cause I convert them anyways with certain nodes to both be comparible to a "equals equals" node ==

#

at least thats what I think it does

hidden fossil
#

I'm with my family for Christmas week, although I do have remote access to the development rig in case I figure out how to clean up the blueprint graph or solve the problem (would have it directly on my laptop, but I'm platform approved so I can't exactly do that without risking exposure)

lost hemlock
#

This is like when a vending machine requires $2 for an item but only checks if any money at all has been inserted.

You can still get the item with just $1.

hidden fossil
#

also the fact that it takes a lot of storage space to hold it all on the dev drive

frosty heron
#

remote access to development rig?
Why not just use source control

#

if the idea is to re-do the codes using Remote Assistance, that sounds pretty insane

hidden fossil
frosty heron
#

I don't see how that gate you from using source control

hoary junco
#

The engine files have nothing to do with the project files

frosty heron
#

your laptop don't even need the source version

#

My brother can open the project using non source version

#

while I use source build on my end

hidden fossil
#

and some people find certain things to be more convenient for them

frosty heron
#

Keeping in sync means using source control

hidden fossil
#

in any case, I'll take a look at cleaning up the blueprint graph and repost

hoary junco
frosty heron
#

a few command lines to keep in sync and the ability to revert beats re-doing codes using remote assistance anyday

hidden fossil
#

I should also note that I have a lot more display room on the main rig as it's hooked up to a 4K (while my laptop is only 1080)

frosty heron
#

Nothing to do though

cerulean cape
#

Hi, is there anyway to change the drag-and-drop's dragging visual when I enter another widget?

frosty heron
#

this shouldn't even be a fight tbh

hoary junco
hidden fossil
#

as a last question for now, I was only able to add the dots once for straightening out blueprint graphs and then lost track of how to do it. What's the procedure for that, if I may ask?

frosty heron
#

Double click the line

hidden fossil
#

thanks

#

I'll clean up the blueprint and repost later today

frosty heron
#

or you can right click the line and select re-route node. (maybe)
Usually I just double click the line.

lofty rapids