#blueprint

402296 messages Β· Page 791 of 403

frank viper
#

I had a problem like this before with engine content.

#

Now I am using bools and branches and that works.

maiden wadi
#

They should work fine. Would need more information about the issue to determine.

frank viper
#

I was copying and pasting them over into actor class BPies maybe thats why

#

It only happened when I added a lot of them

sonic crow
#

merry xmas all, i got my demo ready i built it how do i share my demo with a friend without sending them the unreal project

#

ty I hope you well πŸ™‚

maiden wadi
#

@frank viper I really doubt that the number of them had a cause for this. At the very least if something like this happens again I'd consider refreshing the nodes. DoOnce is just a function with a class wide bool variable that is changed on first use and reset. What you're describing sounds like some odd form of blueprint corruption or something else stopping the logic somewhere.

zealous fog
#

If you guys wanna see what that blueprint you helped me with does I posted it in #work-in-progress

zealous fog
#

Is it bad to set a value in a pure function?

ornate linden
#

If I have a widget built into my BP, which presumably the engine is auto-creating, is there a way to gain access to the actual widget instance it creates?

Normally I would Create Widget and use it's return value to set a variable so i can use it later. But since the BP is implicitly creating the widget in this BP i don't seem to have access to the instance it creates. I figured the widget component would be it, but it's not compatible with the event function from inside the widget.

#

Figured it out. It's WidgetComponent > GetUserWidgetObject > CastToYourWidgetBP > CallEvent

was trying to just cast, but i needed to get the user widget object first to get the actual instance

brazen merlin
ornate linden
#

What's the difference between setting a widget to visibility false vs hidden in game true

tawdry surge
#

Visibility will make it not show in editor either

ornate linden
#

I meant programmatically--at runtime. since during the game it doesn't matter what the editor is doing.

tawdry surge
#

Probably not much

icy dragon
ornate linden
#

and set hidden in game is on the same level of change as the normal set visibility. but the set visibility for widgets is different? is one more efficient? or some other difference

lusty shard
#

This is a picture of bps within a pickup. Im trying to lerp the pickup to the player when the playercharacter sphere overlaps the pickup. Currently, AddWorldOffset is the only one that seems to do anything and its sending the pickups out of map bounds/destroyed.

#

anyone know what im missing.

#

the pickups use physics but dont think that is a problem.

brazen merlin
ornate linden
#

I'm understanding now. I was once again confusing places i had written code for widget components and places where i had written code for the actual widget instance.

solemn kernel
#

Hi guys. I have a hard to google problem.
How do I change a box grab/setworldlocation center point to a different place (preferably where it got hit by a linetrace)

I try to drag around a box, with grab component/setworldlocation (tbh don't know how it works, but sorta works) the issue is that the box gets grabbed (set to new position) of it's center that causes a small snap between the center of the box and it's edge. (example of the issue https://www.twitch.tv/videos/1242757504)
Any respons in DM would be much appriciated! (happy christmas and stuff!)

lusty shard
#

I have tried so many things lol

solemn kernel
# lusty shard I have tried so many things lol

grab component has an interpolation in it that you can fidle around when it tries to move to the location where the physics handle is. It didnt fix my issue tho lol but it might fix yours

maiden wadi
#

@ornate linden For actual widgets there are two types of invisible. Hidden and Collapsed. Hidden still 'renders' the widgets, but just doesn't display it so that it keeps it's sizing between other widgets. Collapsed treats the widget as if it doesn't exist anymore. Collapsed in this manner saves on performance. Any other setting is visually visible, but changes how the mouse interacts with the widget.

However for a WidgetComponent, which technically has nothing to do with UMG or Widgets, it is just an actor component. All Actor components have a Visiblity and an HiddenInGame value. Largely these are pretty much the same with the exception of design time and multiplayer. Design Time in the editor, the HiddenInGame setting doesn't do anything. You can set this to true and still see it in the editor. Visibility will work at design time and will hide the object in the viewport if it's set to false. These are also useful in multiplayer to distinguish visibility. The Actual Visibility setting is replicated, so if the component and the actor it exists on is replicated, then setting visibility on the server will also set visibility on all clients. HiddenInGame on the other hand is not replicated and can be set on any machine without it affecting other machines.

ornate linden
sly ibex
#

I managed to fix the audio for the footsteps I created and decided to just lower the speed of the player to make the sounds sync up, although why does the audio take a bit to start after i start moving

brazen merlin
sly ibex
#

Heres the bp @brazen merlin

#

I might mess with the sound files a bit and try to fix it

brazen merlin
#

can i see the sound wave of the sound file?

sly ibex
#

yeah one sec

#

Thats the one that is the delayed one

#

I can see that theres about a frame or two where there flat silence

#

Heres all three of the sound clips for the walking

last abyss
#

set timer by event doesn't immediately run the event

sly ibex
#

Could that be ELI5 please, still new to this all

#

explain like im 5

icy dragon
#

Set Timer by Event waits the timer to run out first.

last abyss
#

If your time input in the set timer by event is 5 seconds, the first time it runs the event is after 5 seconds

brazen merlin
#

they right you know πŸ€“

terse gale
#

Hey everyone! NM_Wave
I have a delay that stops working when pausing the game. After some googling I found Tick Even when Paused but it seems to do nothing. Anyone knows another solution?

icy dragon
terse gale
#

Ah that makes sense. Is there an alternative type of delay or any other workaround I can use?

icy dragon
terse gale
#

I'll look into em! Thanks for the help! mtpHEART

vague dome
#

So i have tried a bunch of ways to get this working, but cannot for the life of me seem to get it to work:

I have an posessed actor (vehicle) that im trying to destroy after the passenger leaves it, but every method i have tried for deleting the vehicle have only worked on the server but not via the client (it just not trigger the event via remote)

#

Is there some kind of failsafe way of deleting an actor in a multiplayer environment when its not possessed by a player?

#

The concept is that the vehicle deploys into a static building, and consumes the vehicle in the process, so the graph looks like:

Left click -> spawn building -> unpossess vehicle -> destroy vehicle

solemn kernel
#

K after 4 hours of suffering I got closer to the solution. However I can't find a way to smooth out that glitch like Jitter with Physic constrait, any ideas? https://www.twitch.tv/videos/1242893249

terse gale
gentle urchin
gaunt ferry
#

can you add movement input to a pawn that ur not possessed?

gentle urchin
#

Sure, if you redirect it

gaunt ferry
#

how exactly would i do that

gentle urchin
#

You'd need a reference to it from whatever bp you are controlling

#

Then forward the event to the desired actor

gaunt ferry
#

oh okey thanks

zealous fog
# gentle urchin Yes πŸ˜…

Then why is it possible in a pure function but not possible in a pure const function? Why wouldn't they make it impossible in just a pure function ?

meager spade
gritty elm
#

how to link two animation blueprints?

meager spade
#

? ^^

#

Haha

dawn gazelle
meager spade
#

Btw someone mentioned having a sprite always face the camera the other day, I have a similar thing where I have a widget component always face the camera. There's nothing built in to have a widget always face the camera right? Like I'm not asking to help with implementation, I'm just wondering if there's functionality built in for that already?

#

I already have it implemented

#

Was just asking if I reinvented the wheel

#

Yeah, this must be a widget because I've got logic inside it

gentle urchin
#

Widget will always face the screen if it exist in screenspace,

#

If thats what you invented then the wheel already exist

#

It's not the same as a world space widget rotating towards a camera tho

solemn kernel
maiden wadi
#

Limit their angular rotation values.

frank viper
solemn kernel
#

The issue was that the physics constrain center point wasn't on the center point on one of the objects only the other. This caused a small lever to be created between the physics constraint center and the mesh center that got flung uncontrollably regardless any dampening as it did not applied to that lever in any shape or form.

torn kettleBOT
#

:no_entry_sign: rishi2702#4030 was banned.

remote meteor
# lusty shard

if you do still need advice, attaching the pickup to the player and use the "Move Component To" node to Relative Location of 0,0,0, this is only ideal if you want your item to guarantee reaches your player at a fixed time, but its incredibly easy to use.

hybrid ether
#

How to create that dynamic gun placement? When you aim fast left to right you can see nearest part of weapon move bit later than farthest part of weapon? Many fps games use that

brazen merlin
trim matrix
#

Hmm, anyone know how to reset editor after a crash? My child blueprints are only showing a white sphere now instead of their actual skeletal mesh root component and I can't figure out why. (In the editor content browser)

trim matrix
#

It's also not showing my deleted blueprints since before the crash, but wont let me make another one since it says it already exists.

dim root
#

How can I hit event but only when a specific actor hits it

brazen merlin
zealous fog
#

And this runs on a timer so the trace radius is updated every time the sphere trace goes off

meager spade
#

I mean yeah, nothing wrong with that

#

Just don't set stuff from input since people assume a pure function is the same as a const so you expect the data you send in to just be a copy and remain unchanged

#

Or if you take it by ref you would usually have const ref and not change it

zealous fog
#

Also, I read something that a pure function is executed for every connection to a node, does that mean this function is ran 4 times, or just once because its connected to only 1 node?

#

But when I do this it only shows 60

#

However, if I connect the same pure function to another node after the trace, it does execute more times

#

Like such

umbral ginkgo
#

Anyone know why this isnt working?

zealous fog
#

It executes 246 times

#

(and its suppossed to be 60)

#

So I do believe it only executes once if connected like the first screenshot

#

Alright I made a test for it

#

In this scenario, the first time it will execute the pure function once even when connected with 2 connections

#

In the second case it will execute twice, giving 2 different random numbers instead of 2 random numbers that are the same

#

Found this in an article: "Another thing in our statement which is also extremely important: the pure nodes are evaluated for each impure call."

#

So as long as its just one impure call its ok

brazen merlin
dim root
#

Could you tell me exactly how I would do that like step by step? Sorry I just started ue4 today

brazen merlin
dim root
#

Ok

#

Ty

zealous fog
#

This runs the function 120 times instead of 60

#

Each pure function is called once by the impure function

spark steppe
#

yea because you call it twice for each run

zealous fog
#

But keep in mind if you use a pure function within a pure function, you might be calling more things than you would like depending on how it is set up

dim root
#

Says trouble logging in

zealous fog
#

More info on pure vs impure

spark steppe
#

well, in theory the random number nodes from the engine shouldn't be pure in the beginning

umbral ginkgo
trim matrix
royal helm
#

Any idea why this sometimes doesn't work? These are level streaming trigger boxes that trigger new levels to load when walked through. sometimes they just don't trigger.

maiden wadi
#

Prints to make sure the box overlap is running when it should. Prints after the branch to make sure the player character == works. Past that it's probably a map naming issue.

royal helm
#

Definitely not a map naming issue because it sometimes works

#

I can try that. Adding a few print to screens to see what's going on

zealous fog
#

You can also add a breakpoint to the load stream level and see if it executes

#

If it executes but it doesn't load the level you know its a name issue

barren relic
#

Does anybody know why UE4 crashes every time i try to delete a variable now? It doesn't matter if it's being referenced or not, deleting any variable crashes the whole thing. I can delete anything but a variable so far

#

It seems to be a problem with my First Person Character and the children

#

If I delete a variable from either one the engine crashes

#

looks like it's affected the hud elements too

#

I think i'll just delete everything and remake all of it

ornate linden
#

Is there a way to create a widget and set one of it's variables at the same time?

I want a widget to add a bunch of items to its own list view on creation, but it needs the array of items to do so. So right now im making the widget, setting the variable inside the widget, and then calling a custom event to add the items.

But i thought it would be better to just create and set at same time if possible so i can just put the add items code in the construction event

trim matrix
#

Use the construct event?

ornate linden
#

yeah that's what i want to do. but the items it's adding are based on an array i currently set after creation

#

it's for a context menu for an inventory. so when you right click on an item it opens up a context menu with certain options. and the options differ depending on item. so i need to pass in what item was clicked so it's options are added to the context menu.

trim matrix
#

Oh I see. Are they multiple widgets in the same blueprint?

#

If so you can use a widget switcher and pass the index you want to switch to

ornate linden
#

the inventory widget has inventory entry widgets it creates in its list view, and when you right click on an item entry it creates a context menu widget, which has context menu entry widgets in its list view

trim matrix
#

You should be able to pass the variables into the widget after creation and before adding to viewport

ornate linden
#

ah, is the adding to viewport what runs the construction event?

trim matrix
#

It's what displays it on screen

brazen merlin
#

yeah, just show it last, after all the code stuff

trim matrix
#

When you use create widget you get a return node which returns a reference to the widget. Add your logic to generate the menu items there before you pass add to viewport

ornate linden
#

so basically the way im doing it is the correct way and i can't make it simpler.

create widget > set variable > call custom AddItems event > show in viewport

brazen merlin
#

or on the construct event of the widget if applicable

ornate linden
#

since i assume "create widget" runs the construct event, i can't add items there yet since i need to set the variable first. i'd need to be able to set the variable and generate the widget in one go before the construct event happns

trim matrix
#

You could possibly use bind to update the items but im not sure if the way you are building it works that way

#

Like for example you can bind a progress bar to a custom function and on tick it auto updates. If your general menu is bindable you could do that and update the menus based on the variable the bind pulls in but that may not be possible with the widget you are using

brazen merlin
#

maybe the widget should be made at the start, but hidden, so you have a reference, and then you can do what you like whenever, just unhide when you need - i think you can keep it collapsed which is performantly better (i tihnk)

ornate linden
#

That is a question I was kinda thinking about. So, for the context (hehe) of a context menu, is it better to create the context menu on inventory creation and then just change its options, move it, and show it when a user right clicks?

The current way I'm doing it for comparison is that whenever a user right clicks an inventory item it creates the context menu widget, adds items, moves it, shows it. then when an action that would close it happens i just delete it.

but I guess the 1st ones probably better since it's only created once. I don't know if there's any downside to leaving it in existence, maybe a microscopic memory hit

brazen merlin
#

i think, as a general rule of thumb (barring some exceptions) if you intend to use the same object throughout gameplay, hide/show it instead of create/destroy. Correct me if im wrong

ornate linden
#

Sounds like a good rule of thumb to me

brazen merlin
#

basically, keep it in memory since its going to be referenced often

silent bridge
#

I've tried to make super mario 64 on unreal engine. Everything is decent with the blueprints except idk how to model on unreal. I tried 3ds max but I'm not that good at it either. Any tips on how to model?

brazen merlin
#

3ds max will be better than unreal for modeling

#

you can level design with BSP in ue, but nothing fancy

silent bridge
#

True but I've seen people model on unreal using bsp or something

#

Yh that

#

Makes sense

#

Oh makes sense. I've heard people say it's for skeletal meshes but that makes sense. What's super cube simulator?

#

Ohhh. Fair enough I get you. Well yh, my computer as of right now can't install blender, I haven't tried Maya but I have 3d max. I'm just so bad with it and the tutorials aren't that good. Anywhere I can learn how?

brazen merlin
#

there's all the crap for modeling online, but it just takes practice and learning

#

issues happen and sometimes forums have answers, but we generally learn the problems from doing them too many times and figuring out workarounds or whatever

#

then later, someone will tell you the right answer which is usually more complicated, but reliable

silent bridge
#

Fair enough. I'll just try to experiment then. Gets frustrating but that's how we learn...

ornate linden
#

Honestly wish I was forced to do more art in school or something. I want to make my own assets, but i feel like I'd need so much time to get good at it haha.

brazen merlin
#

just keep modeling

#

more and more and more

#

take concepts you like and practice from them

#

find 3d artists you like, try to copy their models

ornate linden
#

I should watch a ConcernedApe docu and see when he decided he needed to up his competency in pixel art haha. whether he did it at the same time or had like a bunch of code finished and then started doing the art

brazen merlin
#

wait what?

ornate linden
#

?

brazen merlin
#

oh know i understand, that was odd to read at first

maiden wadi
#

Art is irrelevant to code. Code is irrelevant to art. You can programmatically finish your entire game before introducing a single art asset(Possibly with the exception of animations).

brazen merlin
#

i prefer to stick with design and code for as much as possible, but some placeholder art is always needed

#

yeh, animations are important for coding

#

mainly the timing of them and the systems around them, they can get polished at anytime

#

but yeah, they're moreso parallel routes

#

code is more important to me until its feature complete, then that becomes less of a focus

#

still important to maintain though

ornate linden
# maiden wadi Art is irrelevant to code. Code is irrelevant to art. You can programmatically f...

My problem with this assesment i suppose is where art and code meet with level design. like how things will move when intereacted with and I would assume you'd want a general if not exact idea of the dimensions characters will be in versus the world so ways you move characters around and what not work regardless. but i guess if you're only considering the code outside of level design specific applications i could see that. but there will be code involved in the level design

brazen merlin
#

you've got the right idea - art, code, design

#

the big three, they can run in parallel but also overlap

ornate linden
#

probably could make some janky art at first but with the right dimensions and create your whole world and how everything works and interacts, and then improve the art at the end; but you still have something servicable in the meantime

brazen merlin
#

since art is an asset, that asset can always be prettied up. its important to have it so code-wise it can be referenced

#

level design does inform coding decisions as you state, and often a basic "blockout" of architecture shapes and whatnot go a long way

#

but keeping things overly generic does not help as much as one would assume

ornate linden
#

I think the only thing i have in my code that overlaps with design and would need to be refractored if code and art were done seperately is when i drop an item im placing it a certain distance away from the character. but if the artist/level designer changes the dimensions of the game in some way that code would need to be changed. I suppose that means I should also think of a different way of doing it.

#

instead of dropping it x amount in front of myself dropping it on a invisible cone i've placed in the viewport

#

then it's the designers problem again

#

lol

maiden wadi
#

Code shouldn't care about art assets. Dimensions are meaningless and can be queried. Character capsules can be resized to fit art assets with two variables that exist without the consideration of the art asset. Capsules generally encompass most of the art asset when set correctly and are what determines if a player can walk over something or through a doorway. These are all art and design questions and are largely irrelevant to coding.

ornate linden
#

Yeah i definitely am seeing the hard seperation you can do now.

It was just strange to see at first cuz in unreal i'm doing it all so it feels like it all flows together.

but yeah i see the hard seperation now.

maiden wadi
# ornate linden Yeah i definitely am seeing the hard seperation you can do now. It was just str...

I can definitely understand that. It's also much easier to think about coding for your specific use cases as you have them, but it can bite you in the end. This is actually something as simple as particle effects. Say you're making an RPG, and you have a cone like effect that sprays fire. Instead of having the particle system query for things it hit, it's just a visual thing that has it's parameters set similar to the code used to do the actual gameplay function. In reality your code might actually get all actors in the cone's distance and filter them based on which ones are within the cone's direction. This simple math is not only much faster and lightweight but is not prone to errors that randomly affected particle systems(Probably won't), but COULD cause. This has already separated your art asset from your gameplay logic. All the gameplay logic has to know is that it'll spawn a particle(Actually it doesn't even need to know that, it just needs to have a designer hook when the effect starts that a designer could spawn a particle asset from).

This all sounds like a lot of wasted effort when working with only yourself, but it's well worth it even when working alone. You'll find you'll fight the engine a lot less, and you'll also find that you have much easier to debug code. Because your art asset is useless in the sense of debugging why an enemy isn't taking damage, but the coding you did to handle that damage interaction is much simpler and cleaner, easier to navigate. On top of this massive bonus, it makes this code easy to subclass or affect differently. So that you can reuse identical code for a spray of ice, or a spray or fire, or a spray or force. The only difference is how this code applies affects to other objects after it's ran, animations it might play and the particles it might display. All of which are easily interchangeable without touching the underlying gameplay code.

ornate linden
#

Good information. Makes a lot of sense to me. I'll have to think about that seperation more from now on. Especially since it'll make debugging way easier in the long run. And debugging is where the real time sink is.

ornate linden
#

How do you set a variable to NULL? like this?

#

and then how would you check if it's null like this?

#

seems to be working

umbral ginkgo
#

Happy Holidays y’all! πŸ˜„

maiden wadi
mossy vessel
#

anyone know what these circle nodes are?

ornate linden
#

looks like vector colors

#

multiplying the "get forward vector" return by a float to get a bigger vector and adding it to the other vector returned from the "get socket location"

mossy vessel
#

?

ornate linden
#

right click then type vector *

#

or vector +

#

depening on which one you want

maiden wadi
#

This is also different if you're running UE5

mossy vessel
#

u4

mossy vessel
maiden wadi
#

The math nodes in UE5 were changed. Don't know how entirely, don't plan to care for another year at the least until it's stable for production.

mossy vessel
ornate linden
#

?

maiden wadi
#

That's Vector * Float.

ornate linden
#

a vector * a float is just a bigger version of the vector

mossy vessel
#

alright thanks guys appreciate it

ornate linden
#

it multiplies each of the 3 parts of the vector by the float

mossy vessel
#

alright it worked thank you

ornate linden
#

How do you stop button events from eating the mouse click event?

I had a overwritten function that runs OnMouseButtonDown. but now that i've changed my widget to be a button it's eating the click events in it's own On Clicked(button) and On Pressed (button) events. These events don't have the mouse event parameter that the OnMouseButtonDown does; and I need it.

brazen merlin
ornate linden
#

interesting

brazen merlin
#

but since you overrode the function, might not work as normal

main lake
#

Simple question : Is there any online tool (website) to prototype code like in Unreal with blueprint using Nodes ? I really want a tool like this to prototype ideas fast before coding it in any game dev software. I found Draw.io but it's not close to what I want as you only have shapes and you have to link stuff write stuff,... instead of having premade programming components like : variables, branches, gate,...

Please ping me if any answewr πŸ™‚

brazen merlin
#

What's worse for memory/performance: 40 float variables or 20 float arrays with two floats in each? Any difference?

tight schooner
#

Do something on each 10,000 times in a loop at the push of a button, play as standalone, enter console command Stat Raw and see which approach produces the bigger spike on the graph

#

I wouldn't know offhand

olive cloud
#

I’m guessing the arrays would take up slightly more space in memory?

brazen merlin
#

tis my guess as well, ill see with seanny's idea

main lake
brazen merlin
#

these floats are to be used in some different places, as individual floats i can have a name for each of them because they are used for specific thing. If i have one array of 40, i have to remember what each index relates to when referenced. I am building a data table struct so that would not be pleasant for me. It's a silly question i know πŸ™‚ but if its cheaper, ill just have all my entries as floats, otherwise i would like to combine some of them as certain couplings for those that make sense while other floats can essentially stay unique (not in an array)

main lake
brazen merlin
#

well i did a test. 10000 times in a loop. Print String of a Float variable ~152. Print String on Float Array 0 index ~330.

main lake
#

what the number means, is it the FPS ?

brazen merlin
#

going off of game, but yes, its the same as frame

#

uh, its ms

#

so it takes 150 ms for the single and about double for fetching the array float

main lake
#

if it's ms it should be the lowest is the best

brazen merlin
#

i guess im keeping them separate!

brazen merlin
#

and by twice the amount it seems

main lake
#

intersting

brazen merlin
#

wait a second...

#

nope, nvm

timber knoll
#

Array should be faster actually

#

As it’s guaranteed continuous memory

#

But I guess blueprints array isn’t a pure array

brazen merlin
#

it is bp, and thats what im calling

#

array is twice as slow

timber knoll
#

Yeah I think blueprints just makes it slower

brazen merlin
#

and i would be using array getters from the data table struct data

#

thats helpful

timber knoll
#

Also that’s a very bad test

brazen merlin
#

whats a better test for it?

timber knoll
#

You are measuring the time to print, not the time to get the value

brazen merlin
#

so instead of print, do some math?

timber knoll
#

A better test would be sum of all floats

#

Once completed print sum

brazen merlin
#

well if im watching the stat raw chart, i guess i dont care about printing

timber knoll
#

Print string is debug stuff which is usually veeeery slow

#

At least compared to memory read operations

brazen merlin
#

good point

#

hmmm, if i do math on an array element i have to use set array element

timber knoll
#

No I mean just get the 0 element

brazen merlin
#

oh wait, i can get as ref

timber knoll
#

And add it to a local variable

#

Or that yeah

#

And make sure both tests use exact same values

brazen merlin
#

thats the plan

#

just gunna add 1 πŸ˜„

#

getting a weird problem

#

the float test always returned 0

#

should be 10000 like the array

#

so im not sure if there's something inaccurate about it, but now the single float is around 80 ms while the array method has a tiny spike (no number pops up as its below the 33.9 ms line, but its suuuuper small, like literally nothing)

timber knoll
#

πŸ€” I never use the increment

brazen merlin
#

i tried the float + float but i still get 0 for the single float test

timber knoll
#

But I can say that a normal array has complexity O(1)

brazen merlin
#

now in english πŸ™‚

timber knoll
#

Which means it’s the same as just using a float seperatly

tight schooner
#

I kinda hate that I planted this idea in your head cuz it's generally not a good idea to adopt weird patterns (using 20 variables instead an array) for the sake of a vague performance benefit; I would assume getting float variables is pretty optimal as far as BP is concerned. But the general approach of pushing a button and profiling approach A vs approach B is sometimes handy. If anything it puts my mind at ease about BP perf cuz it shows that you need to do something 10,000 times or 100,000 times in a frame to noticeably affect the gamethread.

You can package the project to get a more accurate reading. Just never do it in PIE cuz there are a lot of weird/debug things happening during PIE.

fossil skiff
#

how do i put all these meshes into an blueprint?

spark radish
#

Hey, one question, why does my Character Component keep resetting its movement to Walking even tho I set it to Swimming?

brazen merlin
# tight schooner I kinda hate that I planted this idea in your head cuz it's generally not a good...

nah, its a weird question, but as i described its pretty much just weird. From an abstract sense, yeah, i would just have one array and be done with it. But im pulling from data table where some entries are floats while others are small float arrays (maybe 2 or 3). There's some other crap on top of this, so maybe i just do what ima do and if i get hitches try the other. It was worth asking just to see.
If i could test how the fetching of a float vs float array happens then it would give me a better idea. Dont worry, this aint my first rodeo. There is a runtime concern since my data table is referenced when my ai is spawned. Im revising the data table so its looking like the same than what i had previously which did not have hitches when they spawned. I figured a bunch of little arrays would be worse, but are a bit nicer to work with from the human side. Thanks everyone for racking your brains on this one, i think ill toss this thought into the ever expanding bin of "it all depends on all other factors" and the only way to know for sure is to just commit.

timber knoll
#

As a final thought: I would say just try to cache it where possible when you need it at runtime and go with what is easy to work with while remaining readable

#

Rule nr1 on optimisation is to not optimise πŸ™‚

brazen merlin
#

i think i need to make a parent class for my bt tasks and such so i can store the data table struct reference there to be used on all the separate tasks

spark radish
brazen merlin
#

actually... i guess i could cache it in my controller and then those tasks get from that

#

id have to cast though

#

generally just not a smooth solution :/

timber knoll
#

You can also cache a casted result

#

If it doesn’t change at runtime

brazen merlin
#

lol, once again, its individual tasks so i would cast them the first time they run, but yeah, not sure how different that is then just making a parent with the reference already

timber knoll
#

πŸ˜‚ go with what you think works, change it when it starts breaking or you got a better idea

brazen merlin
#

yup yup, got options

#

ima go with what seems less weird first πŸ™‚

tight schooner
brazen merlin
#

thanks again y'all

tranquil rock
#

hey, new to unreal but not to game dev

#

orient rotation to movement seems to not be working for some reason

#

I have unchecked all of the use controller rotation booleans

#

and I have the orient rotation to movement as true

#

I even tried doing it by c++ and it still doesn't orient the rotation to movement

#

I did exactly like it said in a tutorial

trim matrix
#

Hi

#

Is there a way to block movement or input while an animation is running ?

charred beacon
# brazen merlin getting a weird problem

In the first case you pass a copy of a variable, instead of a reference.
In the second case you send a reference of an element in the array into the increment, hence it works.

#

You can tell if something passed by a reference if the pin spots have some sort of rhombical shapes

dim marten
#

I have a multiplayer problem. When one player turns a light on/off the other player doesn't see this change.

fossil skiff
#

When i selected my seleches and i did "convert selection to blurprint class" and i played in the editor nothing showed up and this error appeared

vapid ibex
#

I have a chain of meshes, and I want to roll every segment of that chain around it's local Y axis. It should work but in reality the segments start to freak out and strobe. What I'm doing wrong?

trim matrix
#

Why I dont get this player controller class anywhere??!!

fiery swallow
trim matrix
#

how to change player controller class? why is there has been one but now i cant do it? Wtf?

fiery swallow
#

that's kind of like putting a foreach loop on event tick, there's gonna be some problems

granite copper
#

How do I check if an actor has spawned and destroyed?

vapid ibex
trim matrix
#

player controller CLASS

#

I cant believe stuff has been there and now removed.

fiery swallow
trim matrix
#

Its just constant shit like this happening in UE. and searching google gets the impression im the only person in the world to do this.

granite copper
fiery swallow
fiery swallow
granite copper
fiery swallow
granite copper
#

These are the blueprints for spawning the actor

#

I have a timer which I'm trying to let the timer go faster if the actor has spawn

fiery swallow
#

drag off the return valid of "spawn actor" node and type in is valid

granite copper
#

And this is the timer

fiery swallow
#

type in the is valid node

#

if it is valid continue with the code

fiery swallow
#

yes

granite copper
#

Okay let me try

fiery swallow
#

if it is valid then run the code

#

if it's not valid then put a delay of 0.2 seconds and then check again if it's valid

trim matrix
#

how to change player controller class? Why has been but now not possible? What to do instead?

granite copper
#

@fiery swallow It's working now. Thank you very much!

trim matrix
#

How to set player controller class?

compact vapor
#

I've been programming for a while now but want to learn ue4 blueprints.

I'm wondering is there a way to create my own class?
I mean like a class called "Enemy" or "item" and instantiate it at runtime?

icy dragon
trim matrix
#

im possessing a new char

#

and it needs its own player controller class to function properly

icy dragon
compact vapor
tranquil rock
#

is anybody having any issues with the oriente rotation towards movement in the character movement class?

#

it's not working for me

#

and idk why

trim matrix
#

So in unreal you cant set a player controller class right?

icy dragon
trim matrix
#

this is just fucking stupid for real

compact vapor
#

is it possible to make a map, where it's values are another map?

trim matrix
#

and there has been pictures it has been available earlier on

#

yes it is

#

you can store for exampel in gamestate

#

@compact vapor

compact vapor
trim matrix
#

gamestate I believe is persistent all the time when the game is running

compact vapor
#

i have this but im not really getting anywhere.

there is no option in the string values to set them to a map.

trim matrix
#

?

#

You are not making any sense whatsoever what you want to do

#

You probably want to use an enumeratot

#

and no context

#

Enumerator

tidal marlin
#

Hello.
Where i can read about path query ue4 type?

pulsar arrow
tidal marlin
#

It use in does path exist decorators

compact vapor
compact vapor
maiden wadi
#

Struct with a map in it.

trim matrix
#

^

maiden wadi
#

A heads up though, maps are absolutely terrible to alter in blueprints. If this is all for lookup, this is perfectly fine, but any alterations are really ugly in BP.

icy dragon
#

What are maps for anyway?

maiden wadi
#

Lookup mostly. They're insanely fast at finding data in.

compact vapor
pulsar arrow
#

How do you plan to find factions? By their ID or index?

maiden wadi
#

In practice, an array of structs that have a key value on the struct can be used almost the same as a map. You just have to make your own small lookup function. It'll be slower than Maps, even in C++. But that won't matter until you're hitting hundreds of entries and many use times per frame.

But in BP, to alter data in a map, you have to first find and store the data from the map entry in a copy, then remove that entry entirely from the map, and then alter the copy and add it back to the map. This is for every entry change you do. You cannot just look it up like you can in C++, get the pointer to the data and just alter it right there.

pulsar arrow
#

Create two structures. Let's say first one is called "FactionContainer" and the second one called "FactionDetails"
In FactionContainer, you will add new variable and variable type will be FactionDetails. You will make it an array.
In FactionDetails structure you will create those Stats, Level variables.

pallid crescent
#

Is anyone good with quaternion math? how would i compare 2 quaterninos and apply the delta to a third quaternion?
if it was a vector i could do v3 = v3 + (v1 - v2)

compact vapor
#

Thank you, @maiden wadi and @pulsar arrow.

That's tremendously helpful.

maiden wadi
#

@pallid crescentNot sure in BP. I know that FQuat has a - operator in C++ at least.

#

Seems there's a BP exposed function for it as well. Not sure if it'll work the same to get the delta.

pallid crescent
#

okay. well im working in Control rig. didnt really know where to post that question but this is what i have avalible

pallid crescent
#

math is not really my strong side, but maybe it needs to be converted to euler?

pallid crescent
maiden wadi
#

On a side note. FQuat code looks questionable. O.o

pallid crescent
maiden wadi
#

Yeah. Just has a lot of the math wrapped in some platform specific checks.

pallid crescent
#

what? like the calculation would be diffirent on diffirent platforms? πŸ˜„

tender cedar
#

I want this key to set a door's unlocked variable to true. What target do I use for the Blueprint interface (got key)?

maiden wadi
# pallid crescent what? like the calculation would be diffirent on diffirent platforms? πŸ˜„

Possibly. It looks like it's a very low level SIMD optimization. Little out of my area. I assume it won't cause much variance. But operator- for instance has this.

#if PLATFORM_ENABLE_VECTORINTRINSICS
    VectorRegister A = VectorLoadAligned(this);
    VectorRegister B = VectorLoadAligned(&Q);
    return FQuat(VectorSubtract(A, B));
#else
    return FQuat(X - Q.X, Y - Q.Y, Z - Q.Z, W - Q.W);
#endif // PLATFORM_ENABLE_VECTORINTRINSICS
pallid crescent
granite copper
#

What does default map means for packaging?

icy dragon
granite copper
#

How about the startup map?

#

The editor startup map

icy dragon
#

The same thing but for the editor

granite copper
#

Ohh okayy thank you very much!

odd ember
#

find look at rotation > xvector from rotation > multiply by -1

#

If you find the way the ai is looking at a player and take the opposite vector then that's running away from the player

#

that's the direction the AI will want to run, that is

late gorge
#

Is there some way to figure out boundaries of an instanced static mesh component?

odd ember
#

Multiply the direction with 300, then add it to the current location

true vortex
#

hey so is there a way to make something like weapon fire rate more consistent no matter the frame rate, for example at 30 fps some weapons shoot slower compared to 60 and 120

#

I have tried multiplying the fire rate variable with world delta seconds and it did not really do much

maiden wadi
trim matrix
#

Hello guys sorry to interrupt. I have been struggling with this issue for more than a week, can someone experience tell me if I'm going crazy or that is how it suppose to be in the blueprint.
When a custom event is fired and goes throught in the middle of the event, there is a requests to do other event in different place, everything works fine, that even starts to work BUT in the middle of that event it just stops (without going foward) and bluerpint goes back to the first event without finishing the requested event to be finished. On a level with nothing in it, everything works fine, but on level with a lot of different objects and bluprints, it stops in the middle ( no warning no errors, it just stops).

true vortex
maiden wadi
trim matrix
#

Its as if, the engine thinks that there is infinity loop or CPU just told it, that it needs to go back to the main event to finish its operation.

#

No there is no delays, or for each loop there. It just fires and event goes half way and goes back to the first event that requested the event trigger

maiden wadi
#

Would be very hard to say without seeing the logic pattern.

trim matrix
#

Am I able to post pictures here?

#

I will make something custom to explain it better

maiden wadi
#

Sure. WinKey+Shift+S is an easy way to screen grab as well.

trim matrix
#

This is just a swift make up event to explain better

#

The secondary event is of course much longer than this

#

Just to make it clear in the second event there is no delays or anything that could potentially pause the event from going forward.

maiden wadi
#

That is certainly unexpected and not normal.

#

Of course in normal execution flow you would expect this.

trim matrix
#

Yes exactly !

maiden wadi
#

Is this UE5 or is that just a visual mod?

trim matrix
#

That is what I was always thought

#

No its in Unreal Engine 4.26 clean build

#

No changes made to the engine

#

The worst thing is there are no errors or warning, so I have no idea what else has this problem, I notice it from pure coincidence.

#

Also one more clarification, everything works normally in clean level, but when there is a lot of "stuff" in the level, something that will have some load on CPU and GPU, those problems start to appear.

maiden wadi
#

I can't say I've ever experienced that. Even at work on some of the massive maps.

trim matrix
#

I do have stable 70 FPS on that heavy map so I wasn't sure if that is the problem.

#

But I triple check it to make sure, and indeed on heavy loaded map this problem start to appear.

maiden wadi
#

If you have the time / authority to show code, it might be worth posting a bug report to epic, or on the AnswerHub.

trim matrix
#

Is there a way in blueprint to make sure that an event is fully completed before it will allow previos blueprint to go farward?

icy dragon
#

Unlike functions, macros can have latent nodes like Delay

trim matrix
#

I know that, in this case its not needed, as the function just halts in the middle.

#

Will Delay trigger that function again to make sure it will go farward?

#

Previously I thought that in the closed function it will make sure that the entire event is finished until the return node is hit or enough time has passed. (something like this ) but it also halts in the middle.

maiden wadi
trim matrix
#

No I make sure there is nothing like that, that could potentially halt the script

#

its clean just forward setters nothing else.

maiden wadi
#

Then either there is a bad bug there, or your test case is.

trim matrix
#

I made the script as pure as possible with only bools and floats (setters) to make sure nothing could potentially be invalid (the script had to be a little bit longer than my main one) but the bug appeared there too.

maiden wadi
#

Can I ask how you're testing this?

trim matrix
#

I jsut made two blueprints, one is calling another, both have just simple custom functions with a lot of setters ( to make the blueprint longer) on a level with a lot of stuff happening ( heavy load on cpu and gpu)

#

Calls are valid nothing in problem there, but in the middle of the script it just stops going farward and goes back to the main blueprint as if the second blueprint finished.

maiden wadi
#

But how are you testing it? Prints, breakpoints, UI Widget updating on tick?

trim matrix
#

Sorry. Breakpoints)

#

And Prints in the middle to make sure it was triggered

maiden wadi
#

Single breakpoints or multiple? I find Blueprint debugger tends to shit itself with multiple breakpoints in the same execution line. Will skip them.

#

I hate that thing.

trim matrix
#

With one and with none (just print point to make sure it was indeed not a debugger)

#

Never got hit

#

In clean level it always gets hit but on the heavy loaded map never.

maiden wadi
#

I'm out of ideas. πŸ˜„

trim matrix
#

Well it did help a little knowing I'm not going crazy.

#

πŸ˜„

maiden wadi
#

Like I said, if you have authority to share assets/code, I'd really consider a bug report with the necessary elements. Cause that kind of cutoff of execution is not normal or inended. Even object being marked for destruction won't cause that.

trim matrix
#

I have no authority to do that, but its very simple to make it on my own on a clean project (just copied the cube with light over and over again, and some blueprints making heavy load on CPU calculating) and the error always appears.

#

Its very easy to reproduce, will try to write something down and report it. Thank you for the help nevertheless Authaer.

odd ember
#

Have you tested that the object where the code is taking place doesn't die in the meanwhile?

umbral ginkgo
#

Is there a way to get a call back to the actor/pawn that triggered something?

maiden wadi
#

For what use case?

odd ember
umbral ginkgo
#

Ok

flat coral
#

Is it possible for a blueprint to retrieve all files in the directory it's in?

maiden wadi
#

An Editor Utility blueprint could. Normal blueprints not really. Maybe with the asset manager. I feel like that's a C++ area though.

odd ember
#

definitely CPP area

brazen merlin
# charred beacon In the first case you pass a copy of a variable, instead of a reference. In the ...

Unless you know of a way to make the first var a ref version this should work. The increment float is is getting that var as a reference. Ive tried both wires and also tried the manual approach of adding +1 to the float and then setting it thereafter. And if i get a copy of the array float and use set array element after adding, it works. I am setting and storing the values in both cases; they should both work.

charred beacon
#

not sure then why the result is 0 for them.

gentle urchin
brazen merlin
gentle urchin
#

Have you tried this exact thing in another bp or in a func? Pretty sure ive had this work as expected

brazen merlin
#

Dont worry i abandoned the idea so you can forget about it and sleep peacefully 😁

gentle urchin
#

I dont have it in me to just forget it...

brazen merlin
#

And like i said, without the macro too

maiden wadi
#

Bugses

brazen merlin
#

its probably PEBKAC but maybe i just can see the nuance that im missing

maiden wadi
#

Nah. What you did was fine.

#

When things act illogical like that, it's most often some form of BP corruption. If that variable isn't used in a lot of places, it can be worth torching it with fire and recreating it.

brazen merlin
#

i did, and i deleted it then restarted engine πŸ˜•

maiden wadi
#

Hmm.. Wonder if it was a naming issue. What class was that in?

brazen merlin
#

ill try a complete new actor class with new names

#

just some actor i made

maiden wadi
#

Dunno. I can't recreate it with same functions running on a F input key calling a custom event named Float, with FloatVar float being incremented 10,000 times.

brazen merlin
#

i would hope not πŸ˜›

maiden wadi
#

I tend to recheck engine files semi often when stuff like that starts happening. If nothing else works, that class gets trashed and redone from the ground up with a different name.

#

Makes me happy that I started writing most logic in C++. πŸ˜„ I still glue everything together in blueprint, but code runs in C++. Less error prone IMO.

brazen merlin
#

pretty much doing so, didnt care enough last night though

#

i agree, one day ill learn cpp

#

@gentle urchin rebuilding from scratch works as expected. You can sleep easy πŸ’©

#

the macro isnt working but the manual addition is.....

gentle urchin
#

Wth

#

Do i have to power up my pc?

brazen merlin
#

lol no no im a capable individual

gentle urchin
#

πŸ˜‚ version?

brazen merlin
#

4.26

#

and fwiw awhile ago, like 4.15 or something, the increment int/float macros did actually have a bug with their logic

#

but its been fixed

gentle urchin
#

We're in the same boat regarding cpp btw ,

#

I just took the step some week ago

#

After 5 years of ignoring / postponing it

brazen merlin
#

ah really? yeah, thats many things, id rather maintain my focus of game creation above anything else

#

spent this november learning BTs

gentle urchin
#

Yeah there's still a ton of stuff i've barely scratched the surface on (bt being one of them)

brazen merlin
#

still "learning" them but my AI BT is done now πŸ™ƒ

gentle urchin
#

My cpp ai is still very early in progress πŸ˜‚

#

Progress is slow

brazen merlin
#

last thing is to connect up all the AI BT stuff to my data table - hence the weird question last night about single vs array floats - now im here πŸ₯²

brazen merlin
# gentle urchin My cpp ai is still very early in progress πŸ˜‚

yeah, i dont look forward to it, but at some point id like to take certain BPs and optimize them for cpp as a way to get me to learn while being familiar enough with what im trying to do. Game runs well above 120 fps and aiming for 60, there's some art but im sure the more i push there its going to drop. So nothing has become "i have to make it in cpp because it runs like potatos" yet

maiden wadi
#

Definitely a bonus. It opens a ton of doors. And quite honestly if you ignore the C++ channel it's very easy. They'll tell you to go spend ten years learning every aspect of basic C++. IMO that's a waste of time because you'll have to convert that knowledge to all of the stuff that Epic has wrapped in their own codebase. There are a ton of things you really don't need to know to use C++ with Unreal(Not saying it may not be helpful in some cases, but it's largely pointless).

gentle urchin
#

^this is exactly the reaction i got

gentle urchin
#

worked instantly

brazen merlin
# maiden wadi Definitely a bonus. It opens a ton of doors. And quite honestly if you ignore th...

lol dont worry, im not impressionable like that. Ive worked with programmers, they vary on this spectrum - some are cool while others pedantic - my background is art and design, i dont plan to become a programmer so they can crucify me all they want. It comes down to good enough performance for my needs - lets say its a postmodern idealism - and you cant shake my mentality there. I'm not trying or caring to make the opus of optimization. I keep in mind Minecraft for that reason and how badly it performed but got optimized in time. I'd rather have a game made then boast about an incomplete, but optimized system.

brazen merlin
#

im losing my mind

maiden wadi
#

To be fair, I'm with you on that regard. πŸ˜„ Learning C++ as a designer/artist is fairly pointless unless you're getting into the realm of techart. It can be really useful there, but is still not a requirement.

brazen merlin
#

ive been a tech artist, but it was in Unity and i did enjoy making shaders and little scripts in C# - it was approachable

gentle urchin
#

I didnt read the books suggested yet, but i've gotten down about 1k lines of cpp, slowly but steadily moving forward, learning the syntax as i go along

#

Personally it feels like i've got pretty good progress already, so im not gonna pick up a book any time soon other than to explore some programming patterns

maiden wadi
#

Amusingly, I probably don't even need C++ for this personal project I'm working on. I originally wanted to learn C++ because I intended to start with a city builder. CMC code for moving pawns is stupidly slow. Then I had multiplayer aspirations after that. And you just can't do honest multiplayer without C++.

gentle urchin
#

^City builder is what im on now πŸ˜„

#

1500 pawns, kiss cmc goodbye

maiden wadi
#

Dude, check out some of that new Niagara stuff.

#

There are some Epic and GDC talks on using Niagara emitters that can potentially blow TotalWar level battles out of the water.

gentle urchin
#

Yeah the potential is massive with Niagara . Not looking at that many pawns so ill make it work with just actors and some baked vertex animations

brazen merlin
#

considering i spawn over 10k meshes (200-3000 tris - no ISM) and have on average 50-60 AI pawns (5k-8k tris) plus dynamic lighting and pp effects - and I get 120fps+ I'd say i could make things smoother for performance. My pc isnt that crazy even. The point is that i obviously practice optimization within bp, and i would say successfully well

gentle urchin
#

how many meshes are moving at the same time ?

brazen merlin
#

none of the spawned 10k ones, but they are all movable

gentle urchin
#

its not before they start moving performance kicks you in the nuts

brazen merlin
#

the pawns do and i dont have any expensive shaders..... yet

#

dont worry, they wont be πŸ™‚

#

those 10k meshes are all environment

gentle urchin
#

with bp i capped around 200

brazen merlin
#

is that green navmesh or material?

gentle urchin
#

Its material (and navmesh)

brazen merlin
#

the navmesh previews tanks frames though

gentle urchin
#

it was without preview

brazen merlin
#

but im not disagreeing with you about cpp

#

but you said...

#

the green

#

and its

#

but not.

gentle urchin
#

sry, it was true but a lie

#

the green is not the preview

#

but its a material showing walkable area

brazen merlin
#

gotcha

gentle urchin
#

which i happen to have a navmesh on

#

without ISM the performance is horrible

#

with ISM it's acceptable

#

if the ism is anchored correctly.... thats one of the parts of the cpp im not steady on yet

brazen merlin
#

id imagine thats the point of ISM, and im looking forward to getting back frames after doing so

#

the majority of my world gen is 3 meshes with some different material swaps πŸ™‚

gentle urchin
#

I've heard tales about auto ISM in 4.2x and upwards, but i couldnt reproduce it with regard to performance atleast

#

Ah ^^

#

World gen is also interesting field

#

which i probably should try in cpp next aswell

brazen merlin
#

sounds like a good project

gentle urchin
#

world gen is a very nice addition to the city builder

#

but costs alot of dev time to get right

#

so im gonna do that as an "extra" later on, if it becomes a thing

brazen merlin
#

ive worked on, but did not create, a city builder for max long time ago and aside from so much use of the same terms, it was very cool

gentle urchin
#

good times for sure

#

it was before i even dared look at cpp, so my code was very slow

#

at generating the world

#

and the world was stupidly simple

brazen merlin
#

luckily the world gen happens before and at times where the player wont see

gentle urchin
#

Yepp ^

brazen merlin
#

start of the game and at key moments

#

took a page out of the dark souls 3 game where the shrine area puts up fog walls until the outside loads

maiden wadi
#

I switched to C++ for performance reasons of course. But knowing what I know now, I do wish people would emphasize more on the lack of things you can do in Blueprint alone. I can't even imagine doing UI in UE4 with only blueprints.

gentle urchin
#

UI is one of the things i mostly prefer to do in bp really

brazen merlin
#

and although i have, i know there are things i simply cant get at that cpp allows

gentle urchin
#

tho, i have not yet touched UI in cpp , so maybe that changes

brazen merlin
#

but im also really good and convincing myself that the feature is not important or can be similarly achieved another way πŸ˜†

brazen merlin
gentle urchin
#

There's almost always another way, especially in bp πŸ˜‚

maiden wadi
#

Make a combobox with the ability to search the contents via clicking on the box area and allow the user to type, which also showing the options that relate to what they're typing.

#

You can do it in BP. Semi easily actually. But here's a fantastic point. You don't have to. πŸ˜„ Slate already has that. It just isn't exposed.

brazen merlin
#

there's many of those cases, simply a thing not exposed to bp for some reason

#

its does entice me πŸ™‚

gentle urchin
#

Lazyness, or by design cuz they dont want to expose slow things to bp? I dont know really

maiden wadi
#

Another one is Comboboxes that take other data besides a String. There's actually an Enum Combobox in Slate. You can also make a Combobox very easily out of any of your own Datatypes like a Struct.

gentle urchin
#

Its bugging me, but i can understand some of it even if i dont agree with it

brazen merlin
#

i can only imagine that they cant really change it or it would break things in people's projects

gentle urchin
#

That hasnt stopped them before

#

They could easily do it in a version update

#

Thats at the users own risk

#

Usually not recommended down the line

brazen merlin
#

yeah but wouldnt that deprecate bp nodes?

#

i mean, this is why you shouldnt just update to latest all the time lol

maiden wadi
#

A lot of it is that it would just take too much time to correctly implement stuff that for Blueprint in a dynamic way.

#

The reward for doing it isn't there because most studio's UI Programmers know C++. And creating a specific wrapper for your own use case in C++ is very easy to do. Versus Epic having to make it open ended for all use cases.

brazen merlin
#

true true, if you're going to dive deeper into the inner works, just go cpp and spare the hassle

#

as for not everything being exposed, i get by just fine

gentle urchin
#

Plus even if ui artist dont know cpp, theres atleast one in the team that do know it and can make and expose the functionality for the ui/ux artist

brazen merlin
#

though yes, i do have to adjust my goals in minor senses

#

thats a good point, cant think of a UI artist ive met that didnt know some coding language in a professional capacity

maiden wadi
#

<@&213101288538374145>

torn kettleBOT
#

:no_entry_sign: admin02#9854 was banned.

maiden wadi
#

It's kind of a requirement I started with modding WoW with Lua. Addons I needed were way too much for my crappy PC at the time. πŸ˜„ So I learned to rewrite them not using the ridiculously large libraries most of them used.

odd ember
#

So that FNames made at editor time would show up

maiden wadi
#

Like GameplayTags. πŸ˜„

#

Nah, that would be nice though.

#

GameplayTags are amazing though. Super tool for organizing data. Even with networking they're stupid light.

odd ember
#

The mapping almost exists in that there's a meta specifier for FName UPROPs where you can specify a list of FNames. But I haven't been able to get it to work

#

I probably need to look more into them tbh. I suffer way too much from NIH so I almost always overlook convenient tools

raw orbit
#

so i put this mouse wheel axis event in my player pawns blueprint and it seems to be 'ticking' every frame because i attached a print string to it to test something

#

would it be better to just have a custom key in input settings of the project

#

and use that for 'zooming'

maiden wadi
#

Axis events do run on tick, yes. As for your Zoom. That depends on how you want to handle it. Personally I set my camera zoon with event driven action mappings, and the spring arm handles the smooth zooming.

raw orbit
#

ya, im not comfortable with using on tick unless absolutely required given all the times ive been conditioned not to use it πŸ˜„

#

so ill try event driven action mappings too thanks

brazen merlin
#

if its a zoom toggle, then go with action. Axis events, as mentioned, are meant to pay attention to the changes in the values overtime for precision

#

id also suggest making an input mapped action versus calling the literal input in bp

maiden wadi
#

@raw orbit While I commend the attention to performance, I'd caution against the community pitchfork driven avoidance of Tick. Realistically there's going to be pretty much no discernable difference between you setting a float with an AxisMapping(In fact you would need this for Gamepads), and setting the float from an action mapping.

brazen merlin
#

is that because the engine has to be ready to receive any kind of input at any time? the ones coded/used, that is?

raw orbit
#

hmmm

#

is independently deciding when a tick is warranted and when not more of a question of experience cause it is quite often tempting to use it though i do try to typically use timers that get the job done when its actually needed and can be set to tick less often than every frame

#

or timelines

maiden wadi
#

Well, input itself already ticks. Player Controller has a list of Inputcomponents, every actor that you call EnableInput in has an input component locally created, and added to that controller's input stack. The only single difference between an axis mapping and an action mapping is that the bound functions run at different logics.

brazen merlin
#

different logic... speeds? or just different for optimization?

maiden wadi
#

As far as the Gamepad point, it's just that if you're using a gamepad joystick, you can control the axis value by only moving it a small amount unlike pressing a key on a keyboard.

#

Axis runs every frame and isn't gated. Action mapping runs if the key was just registered as pressed, and if it has not been ran since the last time it was pressed and isn't ran again until it's registered as released.

brazen merlin
brazen merlin
maiden wadi
# raw orbit is independently deciding when a tick is warranted and when not more of a questi...

It really just comes down to use cases. Timers run on tick as well. They're just functions bound to a TimerManager that it itself ticks and calls those return functions when the timer is evaluated as finished in the TimerManager's Tick.

A Timeline is nothing but an ActorComponent which is added to the actor and ticks in it's own component space to run the outputs from the Timeline.

Both of the former use tick. Tick is just a function that the engine calls each frame drawn to screen.

#

If something has to happen smoothly or over a time, in some shape or form you're going to use Tick, you cannot get around it.

brazen merlin
#

true, they are all forms of ticks, but i like timer because it can be initiated and cleared, vs having a bunch of gates on the tick event

#

seems less cumbersome

maiden wadi
#

It can be. But it depends on the case. Timers aren't useful for smoothing things out. They're only useful for calling something after a time.

brazen merlin
#

right, but that is my process of determination

#

it is good to realize that they also do ticks in their own subtle way

maiden wadi
#

For instance, I use tick quite often in UI to animate things. UI tick isn't called when it's not visible on screen. It works well because simply collapsing a UserWidget stops it from ticking. Great for performance gating. And that's also the reason a lot of people like Timelines, they do that gating internally for you.

brazen merlin
#

i read this about umg stuff, that its a different tick because it will only tick on updates (butchering the idea im sure) because i was concerned that things like health bars and whatnot would be there ticking away while no changes happened

maiden wadi
#

They would. But that change is literally not discernable. The reason killer of UMG performance is from invalidating widgets. If you don't actually call a change, and you simply evaluate if you should change it, your performance is pretty much untouched. Bearing in mind that this is for a few objects on screen. This conversation changes speeds really fast when we start talking about thousands of objects checking stuff on tick. But even in that conversation it comes down to why? Why do you need that many things ticking at the current moment?

odd ember
brazen merlin
odd ember
odd ember
#

Widget tick is only different because it is inheriting from FTickableObject

brazen merlin
#

you're talking about turning off tick in the class defaults right?

odd ember
#

There are nodes for it as well

brazen merlin
#

that part i did not know, but i pretty much turn off tick right away for my classes

#

save for the few that need it

odd ember
#

Yeah I do the same, but you can always turn it on again

#

It's only in CPP you have the bCanEverTick

maiden wadi
#

It's just the point that tick exists for a reason and it should not be "avoided" if you really need it. I think I lose hair every time someone comes in here with a 0.001 timer to replace tick. 😦

brazen merlin
odd ember
#

a 0.001 timer isn't the same as tick though

maiden wadi
#

It's not. It's even worse. πŸ˜„

brazen merlin
#

lol true

odd ember
brazen merlin
#

get delta is better

brazen merlin
maiden wadi
#

Even that doesn't work with variable framerates. Timers can run multiple times each frame if they're too fast. For example if you happen to run that function at 120 fps and get 0.008333, and you start a timer for that, and then walk to a new area in the game and your FPS drops to 60. You're now uselessly running the same function twice every frame.

odd ember
#

I did favor using timers due to being able to enable and disable them generally. But now that functionality is available for tick as well

brazen merlin
#

thats the same reason but now im wondering...

#

im in too far now to refactor that, but this is great to know, something i can try at some point to see if i can squeeze more accuracy where needed

#

so far, all my timers work without a problem... but hey, this helps inform me of ways to test if a timer is a problem now

#

thanks for the knowledge drops, ive actually learned quite a bit of performance nuance just in this week compared to the rest of the year, Dean also posted a nice article on pure functions which i was able to optimize easily

odd ember
#

I will have to refactor things as I move more and more classes to CPP

zealous fog
brazen merlin
#

but on the note of timers, if im doing a looping timer at 0.5, would there be a point to making it tick instead?

odd ember
#

I've been injecting custom CPP classes for my BP classes retroactively so I have an easier converting. So far I'm kind of looking forward to it

brazen merlin
brazen merlin
maiden wadi
#

Character movement, UI Animation, Animation graph updating.

zealous fog
#

Makes sense

maiden wadi
#

Anything that needs to be updated frequently.

zealous fog
#

I find a timers a bit easier to control, but yeah some things should really be updated on frame

odd ember
maiden wadi
#

Speaking of pure functions. That was a fun thing I learned when learning correct C++. Const functions are automatically made pure even when BlueprintCallable. You still have to mark them BlueprintCallable, BlueprintPure=false

brazen merlin
brazen merlin
brazen merlin
zealous fog
odd ember
#

subsystems are a godsend tbh

brazen merlin
#

i cannot type anymore

zealous fog
#

So, then if you put a timer at 0.02, its the same as running something on tick (if you have 60 fps)?

#

Performance wise

brazen merlin
odd ember
#

Well UE4s CPP is not to be feared. It's got training wheels on

odd ember
#

If you've done serious work in c# or the like you'll be fine

brazen merlin
odd ember
#

have you built architecture?

#

that's probably the threshold for me

zealous fog
#

Im learning C++ at the moment and so far its easier and more fun than I expected it to be based on how some people were describing it online

#

Might change further down the line lol

brazen merlin
maiden wadi
#

Learning to use C++ with UE4 is very easy if you just avoid the mentality that you need to learn all facets of C++ to understand how it's being used in UE4 UE4's largely wrapped C++ is more or less a scripting language.

odd ember
#

so you've built a pathfinding algorithm and optimized?

brazen merlin
#

optimized? maybe

maiden wadi
#

Or similar. 0.02 is 50 FPS, but relatively the same.

zealous fog
#

Compared to never having used it

maiden wadi
#

Not a clue, I have no inclination to learn it. πŸ˜„ I won't ever leave UE4's design environment.

#

I had a rough first month trying to learn C++ though, because I was following general C++ channel advice. Learn basic C++, then learn it in Unreal. Of course you can't actually ask basic C++ questions in the C++ channel if they don't relate to unreal, so when you're trying to learn what basic C++ is, and you come in with questions about std::vector, people just start the "lol y u no use TArray?"

brazen merlin
#

UDK Uscript was a headache and a half but i did some stuff in it to try learning it, but i was thoroughly annoyed. Unity C# was a smoother time, so ive not cared to pursue cpp in unreal even though i hear its easy - always a subjective viewpoint

odd ember
brazen merlin
#

considering life goals, programming is also not on the path, making games is the goal, especially the art

brazen merlin
#

if i do have to, well, i dont have a choice do i? πŸ˜†

odd ember
#

I think it's a bit more complicated than that. Making games is wicked problem solving, so taking the utmost care that you start right is extremely important, lest technical debt consumes you

zealous fog
#

There are different philosophies, I suppose

#

If its your hobby, making a functioning game is more important than making a efficient game imo

odd ember
#

sure, there are successful ones and unsuccessful ones ;)

zealous fog
#

If you wanna go pro, you should probably immediately be thinking about that stuff

maiden wadi
#

If you're making Slime Rancher, you can afford to just.. do things. If you're making Red Dead Redemption 2, well, you can't. πŸ˜„

brazen merlin
zealous fog
#

In blueprints I find cleaning up code to be very zen so I like doing it

odd ember
#

It's not planning per se, it's staying flexible for as long as possible

brazen merlin
#

anyways, i gotta eat, fingers and brain no work gooding lol

zealous fog
#

In code I find cleaning up to be a pain in my butt

brazen merlin
maiden wadi
#

I'm still just annoyed that I can't nextline the math equation node. :/

whole dune
#

Hi! I have a Mesh moving along my spline and I want another one following it with a set distance between them… So it acts like a train.. I tried adding to Lerp but thats dumb and wont work especially in curves… Thanks in advance

brazen merlin
#

i beg to differ with uscript, that was an unfortunate nightmare, let alone rebuilding ever time - literally restarting the engine half of the dev time

#

lol okay

#

yeah its more pleasant that uscript, epic said they would use an actual language with ue4 but then i saw it was modified and felt the same burning feeling as uscript

#

im sure you could also "do more" in C

#

right, im not saying they're repeating the same mistake as uscript πŸ˜† but it sounded like there would be some extra hoops

#

dont worry, im all sorted on it, i want to use cpp, but need to learn it, and time deadlines are not allowing that tangent

#

yeah.... that seems like such a distraction

serene kiln
#

Does anyone know how to get a scalar & vector value from a blueprint to a material?

#

Considered a material parameter collection, but that only seems to work at runtime

#

*on play

maiden wadi
#

If it's a dynamic material instance you just have to call SetScalarParameter on the material instance pointer.

serene kiln
#

in my case though, the scalar value needs to be visible on the parameter in editor

#

as i understand it, dynamic materials have parameter that can change during play

#

but i need to bake a value from a blueprint to a material in editor

maiden wadi
#

Not sure. Blutility stuff or something maybe.

serene kiln
#

ok, thanks for the pointers!

main lake
#

Is there a difference between these 2 things ? :

  • Create a health variable and set its value to 100 in the "Default Value" property
  • Create a health variable and use the construction script to set it to 100

Please ping me if any answer

ornate linden
#

is there a concept of making a variable that is local to a loop?

or do i just make a variable and then set it back to default before calling the for each every time

icy dragon
drifting socket
#

Is it possible to only show certain struct variables that relate to the "category" of the struct?

#

Its for storing items so for example a consumable doesn't need a weapon config

dark crow
main lake
dark crow
#

I would imagine it initializing the value in a .h file vs in a constructor

#

So technically they both work yeah

main lake
#

thank you πŸ™‚

dark crow
#

Just take care that Constructors can be "heavy"

#

I think if you move the actor it refreshed the value evetytime for example

#

In the viewport ofc

ornate linden
#

is there a array.find where you don't have to know the exact object? Like In javascript where you can look for a specific paramter of your item and if it matches your condition it stops?

Like I have a loop here where I

  1. Set a variable Broke to false each time i run this so it's always false when the loop starts.
  2. loop through each item and find out if it's selected.
    a) If it is, break and set Broke to true
    b) If it isn't, just go to the next item
  3. Check if Broke is true to see if any item in the array ever met the criteria

JS would be like
Array.find((item) => Cast(Item, BP_InventoryItem).InventoryEntry.IsSelected)

and it would return the item if it found it or null if it didn't

we got something like that? or at least some way to make this specific thing less painful?

#

theres my example

brazen merlin
spark steppe
#

with some success bool and the actual object as output parameter

drifting socket
ornate linden
#

That makes sense. I assume when you return from the function it also stops the loop from continueing in the background? Regardless it's a way more space effecient method. Thanks.

spark steppe
#

yes it stops the loop

ornate linden
#

Rad. That should definitely work

rigid fractal
#

can anyone tell me the name of this highlighted node?

ornate linden
#

it's a vector2d + float, but it has 2 floats added. mine won't let me add a pin for the second float.

rigid fractal
#

yes thats what i found strange

ornate linden
#

oh it's vector2d + vector2d but the second vector is split

rigid fractal
#

how come? here it only allows put vector2d type pins

icy dragon
ornate linden
#

if you take this

and right click on the 2nd blue pin on the left. you can "split struct pin"

rigid fractal
#

aaah i found it, tyy

main lake
#

Please ping me if any answer πŸ™‚

dapper bobcat
main lake
dapper bobcat
#

If you're trying to emulate fortnite you could check out the GAS, its what they use for fortnite. All be it a modified version of GAS but still GAS.

brazen merlin
dapper bobcat
#

(its a useful tool/system to know if you work with unreal engine)

main lake
dapper bobcat
#

Gameplay Ability System

#

It handles anything from shooting guns to managing health in Fortnite

brazen merlin
dapper bobcat
main lake
#

the thing is I don't want a premade system for me because what I'm trying to do is to code this system to recode it in another tool because my brain is more organized when I use this blueprint system

dapper bobcat
#

It requires setup in c++ though, unless you use something like GAS Companion from the marketplace to make it blueprint only

main lake
#

Is it possible to comment out code to not be executed or something else to not being execute instead of just unpin the first node or deleting the code ?

dapper bobcat
#

You'll need to bind Enable Node as well so you can re-enable them. You can also bind Development Node to a key and make nodes that don't get compiled in the code in shipping builds

#

I do believe this feature is marked as experimental, but I haven't had issues yet. Although admittedly I don't use them as much as I'd like

main lake
#

found it thank you πŸ™‚
So for my code abode do we agree there's no way to optimize it right ?

dapper bobcat
main lake
dapper bobcat
dapper bobcat
#

There isn't really much going on in your event though, so I highly doubt you'll find any noticable performance increases from anything you do to improve it.

#

This is a random image from google, but thats where you'll see Local Variables inside of a Function

main lake
#

yeah I'm more asking about the logic because I have to write this in lua and I need to make sure it's optimized as much as possible

#

I don't have that

dapper bobcat
main lake
#

oh

#

aright

#

thank you

barren relic
#

will having this cast be a problem in the future?

brazen merlin
#

on event begin play perform this cast and store the result as a variable, then you can just reference the variable

barren relic
#

I'll try that thank you

#

so this is better

brazen merlin
#

yup, though your StopShooting isnt plugged in

barren relic
#

lol yeah

#

can I make it so that the children of this blueprint have access to that variable?

brazen merlin
#

they will

barren relic
#

I made it public, now it works πŸ™‚

brazen merlin
#

children inherit all parent variables

barren relic
#

it gave me an error at first lol

brazen merlin
#

maybe because it was not compiled

barren relic
#

that makes more sense

earnest tangle
#

I wish you could flag BP variables protected πŸ€”

#

It's kinda odd that they have public/protected/private for functions, but only public/private for variables

remote belfry
#

I think it's because if a variable is not set to public it's considered protected essentailly.

#

I mean it's not really, but kinda sorta is in a round about way.

brazen merlin
earnest tangle
#

same thing as it does for functions

#

only allow access from child classes

brazen merlin
#

so the parent cant do anything to them?

#

is that all protected means?

earnest tangle
#

I mean the class where it's declared can of course access it, but other than that only child classes can access

brazen merlin
#

oh i see, so no other classes can get at it

#

does that lighten the load?

earnest tangle
#

Load of what?

brazen merlin
#

performance

#

why restrict its access from other classes?

earnest tangle
#

Encapsulation. Sometimes you want to have variables that are used by internal logic of your class

#

You might not want those available for anyone to poke at

brazen merlin
#

i guess thats something ive always wanted πŸ˜„ i just throw them in a private category or hide them from showing up in the class settings

earnest tangle
#

heh

#

yeah I usually mark everything private by default since that option is available also on variables

dusky topaz
#

I have a question regarding how to structure logic. As far as I've understood, the Game Mode is meant to execute logic, so in my case, that would mean I would have my turn based combat logic in the Game Mode, but I am wondering if it would be better to have a separate Combat Manager object that handles all of that instead

earnest tangle
#

protected is handy sometimes when you have a base class where you might want to share some things with its child classes

brazen merlin
#

yup, i can see that

dusky topaz
# earnest tangle You can do it either way

sure, but what's the benefit of doing either one? I guess one benefit of having a separate manager object would be cleanliness, but I'm wondering if there's anything else

earnest tangle
#

Doing it in GameMode could be a bit simpler since you wouldn't need to manage the additional manager actor

#

But having it as a separate actor could give some further flexibility, for example if you wanted to have more than one GameMode, or some other cases like that

dusky topaz
earnest tangle
#

Something you could also consider is having it as a component

#

since GameMode is an actor, you can add components into it

#

so if you later decided you wanted it to be somewhere else, you could just move the component elsewhere

gentle urchin
#

Gamestate would probably also be a good place to handle it

#

Seeing as who's turn it is fits right into the state of the game

earnest tangle
#

Yeah probably depends on what kinda logic it involves

hazy igloo
#

And now for a something completly different: A beginner question πŸ˜‰
I have a problem with dispatchers in UE4.26.1 😦
I have an sphere in my level and I made a dispatcher "KillIt". I call "KillIt" in my sphere blueprint (picture).
Then I have some cubes in my level, they should be "killed" (picture).
My sphere is an object of type sphere object reference (see picture).
I got this failure (picture):
Why it says assigned to none? There is only on sphere in the level. Whats going wrong?

timber knoll
#

what are you doing after the destroy actor?

#

also the print string will not work after you call Kill It

#

since you are destroying the sphere

#

the error is basically telling you, that sphere no longer exists which is probably because you're trying to do things with it after destroying

hazy igloo
#

@timber knoll After destroy actor ist a print string as debug
The print string after "call KillIt" works
I want to destroy the cubes.

#

The sphere is there in my level

timber knoll
#

oh wait yeah you don't destroy the sphere true

#

what are you doing after DestroyActor

hazy igloo
timber knoll
#

well yes, because you just destroyed self

#

it no longer exists, so it can't print string

hazy igloo
timber knoll
somber panther
#

The problem: The character is "twerking" instead of moving the spine (rotation)

timber knoll
hazy igloo
hazy igloo
timber knoll
#

okay 2 changes to make

neon siren
#

@somber pantherhttps://docs.unrealengine.com/4.26/en-US/AnimatingObjects/SkeletalMeshAnimation/AnimHowTo/AimOffset/

Using an Aim Offset, a character aims a weapon in the direction of your mouse or controller.

timber knoll
# timber knoll

either your sphere is not valid, or it's complaining about the print string being after destroying

#

so in case it's not valid, you can add an additional print string to tell you the reference is invalid

#

if the other thing was the issue, this should also be fixed by printing before destroying

hazy igloo
#

Sphere is not valid... But why?

timber knoll
#

did you properly reference it?

#

you can use breakpoints on the valid node to see what reference it has

hazy igloo
#

Says nothing in the "Not valid print string"

timber knoll
#

if it's invalid, it also can't tell you it's name

hazy igloo
timber knoll
#

well yes that will work

hazy igloo
timber knoll
#

otherwise it wouldn't print your string

#

what is the sphere value here?

#

did you ever set the reference to begin with?

#

or is it just "none"

hazy igloo
timber knoll
#

so the reference is just not set at all

#

now, you've got a few options to set the reference

hazy igloo
#

Just none.
In my cube BP:

timber knoll
#

either you set it from where you create the cube

hazy igloo
#

I can't change the Default variable?

timber knoll
#

because it doesn't know of any existing objects to reference

#

at least that's what I would think

#

so you probably want to GetActorOfClass at the start and fill the reference with that

maiden wadi
#

You can only set default pointers from an instance of an object, not it's class.

hazy igloo
#

Hm. My sphere calls with "self" to the cubes, and they said "sphere = none"? Hm

timber knoll
#

as your cubes are unaware the sphere even exist

hazy igloo
hazy igloo
timber knoll
#

your sphere is just saying "hey everyone who is listening, I want you to KillIt"

#

but no1 is listening

hazy igloo
timber knoll
#

self in that context, just means what object has to send the message

#

you could choose any sphere object in there

#

it's not going to tell your cube what sphere object sent the message

#

you have to decide in your cube, what sphere object do I want to listen to

hazy igloo
#

Should a cube not listen to all spheres?

timber knoll
#

then you need ALL sphere references

#

you should quite literally see the binding as a connection

#

without having a connection, you don't hear them

maiden wadi
#

Binding a delegate is like handing the other object a walkie in a bad spy movie. "Call you when I need you, don't call me."

timber knoll
#

or like subscribing on youtube

hazy igloo
#

I spawn the sphere class in the level now, but the value doesn't change. Its none

timber knoll
#

only if you are subscribed, you will know there is a new video

#

you need to let the cube know of the spawned sphere

timber knoll
#

so for example, if you have both the sphere and cube spawned in the level

#

once you spawned the sphere, you want to drag from the cube and tell it: this is the sphere

#

I'll make a blueprint example, one sec

hazy igloo
#

Thanks

timber knoll
#

so here I spawn both after eachother

#

after spawning the sphere, I tell the spawned cube: this is the sphere you are looking for

#

keep in mind tho: this won't work since you are binding it in beginplay

hazy igloo
#

BeginPlay is not working?

trim matrix
#

Hmm I seem to be running into some issues with weapons. What's the best way to store weapons on a character? There are only 7 weapons in the game, each in the same unique spot per weapon. Right now, I am storing a Weapon1-Weapon7 variable, which is an actor bp_base object spawned into the world. When I pick the item up, I set the Weaponx to the item that was picked up, and hide it in the world. When I switch to it, I unhide it and attach it to the player. I feel like this should be handled better, perhaps the pickup in world is just a basic actor with a bp_weapon_class variable attached to it, and that is stored on the player, then whenever I switch to the weapon, it just spawns a new actor based on the class attached to the player. Which way is the better way?

timber knoll
#

changing it to this will work tho (basically replacing BeginPlay with a custom event)

trim matrix
#

The weapon is never visible unless they have it equipped and using it, so I am trying to find the best and optimal way to store the weapon data.

timber knoll
#

then you could simple just change the index (representing the current weapon) and create small functions to handle switching between them

#

hiding them and all is just fine

#

spawning a new actor every time is making it more complex and more expensive

trim matrix
#

Yeah once I get the general concept in I will go back and refine it, but wanting to make sure that I am going about storing the actual items correctly. Each weapon bp has the stats (weapon xp, ammo count, etc) on it, so trying to find the best way to retain that data between weapon switches.

maiden wadi
#

Persoanlly, I'd do GameplayTag/WeaponPointer, but FName would work just as well.

timber knoll
#

also on an additional note: you just need to attach them once, from there even when invisible they should still be properly attached

#

meaning you only have to swap visibility and array index

maiden wadi
#

You can define a default on the weapon's class, and add it to the map when you pick it up. Saving is as easy as saving and array of the weapon's keys from that map and respawning them at load.

trim matrix
#

I already define defaults, just not sure how best to retain/update the weapons info during gameplay. Right now, since it's attaching an actual spawned actor, the values are stored on the spawned actor.

maiden wadi
#

Well. Saving would also entail bullet counts and stuff, but you can associate that with the map key in a struct or something and repopulate the weapon at load.

timber knoll
#

having the references means you basically have all the data available as well

trim matrix
#

@timber knoll Yeah, I just wasn't sure if having 7 spawned actors that aren't visible at all times would cause any issues or be troublesome.

timber knoll
#

it's for sure a better approach than spawning/destroying them constantly (just please change it to a container πŸ™‚ )

#

especially for scalability πŸ˜