#blueprint

402296 messages ยท Page 840 of 403

sharp rapids
#

But it does not get garbage collected because the 'Outer' object that I passed in while creating it still seems to reference it

#

So, I also have to destroy the 'Outer' object and then it get garbage collected. Can the reference be removed in the Outer object?

obtuse herald
#

UObject holds a reference to Outer, but Outer holds no reference to UObject

sharp rapids
#

Or maybe I'm doing something wrong

wicked osprey
#

What is it?

obtuse herald
obtuse herald
sharp rapids
#

Wouldn't that make it impossible to release the reference then?

faint pasture
obtuse herald
gentle urchin
#

Are those blocking refs?

#

the return values on a node?

#

I somehow imagined them being an exception to the garbagecollection system

sharp rapids
gentle urchin
#

Yes, and release the old one

sharp rapids
#

got it

gentle urchin
#

you can (apparently, maybe?) do it like this

#

to clear it out earlier

sharp rapids
vital aspen
#

A question, I was working on my project when I wen to add some things to the PlayerController just to find it that the project is setup for that, It's just that I can't find it.

#

No matter what I do, That file doesn't exists.

sharp rapids
#

this works
So, the 'Construct' node acts like a variable in itself
I didn't know a node could do that ๐Ÿ™‚

merry moth
#

That still didn't work so i tried bitshifting in blueprints... Flloored my ram to 32gb crashed my engine so i just made a blueprint node....

int USeedGen::GenSeed(int worldSeed,int chunkX, int chunkY)
{
    int h = worldSeed + chunkX * 374761393 + chunkY * 668265263;
    h = (h ^ (h >> 13)) * 1274126177;
    return h ^ (h >> 16);
}
#

Was just... alot easier

#

That was the first time i ever had a huge headache in blueprints

merry moth
#

I actually have no idea why the same stuff in blueprints just fucked up

#

Could be a UE5 thing tbh

fiery glen
#

scam link, do not click

gentle urchin
#

discoerd sure sounded tempting

thin panther
#

Idk my fav was discorb

gentle urchin
#

i would think biscord was more up your alley tbh

thin panther
#

Havent seen a biscord, but my all time fabs were discorb and streamcommuninty

faint pasture
gentle urchin
#

Having to manually clear them is.. interesting

sharp rapids
obtuse herald
#

And Garbage usually isn't a problem in blueprint anyways

gentle urchin
#

fair enough

surreal coyote
#

When I leave my car at an angle, this happens. How can I fix this?

#

Because this does not fix it

#

Well that fixed the character but not the camera

#

so this doesn't work

gentle urchin
#

Undo what you do when you enter the car

obtuse herald
surreal coyote
#

I don't think I get what you mean

obtuse herald
#

Get player controller

#

-> SetControlRotation

surreal coyote
#

Like so?

obtuse herald
#

Or Driver->GetController->SetControlRotation for multiplayer

obtuse herald
surreal coyote
#

Thanks a ton

tired granite
#

hi everyone, can anyone tell me why physics object behave difrently depending on resolution and a way of potentially fixing this?

#

when i play on standalone full screen the results are vastly difrente from in editor aswell and when packaged into executable

thin panther
#

Iirc default ue4 physics are change with framerate, not sure if they ever fixed that, i remember seeing it a while back

tired granite
#

oh so its the framerate thats affecting the change?

thin panther
#

Could be, i may be wrong though, physics isnt my specialty

tired granite
#

i am making a 2d physics based pong game but the ball either gets added force very slowly or super hard

#

that would make sense

thin panther
#

Yeah physics change based on frames, they can start to break at high framrates

#

For now maybe cap the fps

tired granite
#

i will give that a go , thanks ๐Ÿ™‚

thin panther
#

Np

crisp vault
#

hi, quick question, is it okay/proper to use the level blueprint to make events happening to the level? I.e weather events and changes

odd ember
#

if they are part of a system, you may be better off with a weather manager

crisp vault
#

lets say its like this: weather changes, players widget and ui and stats should react to this, its still okay?

odd ember
#

that's irrelevant

crisp vault
#

okay, thanks!

obtuse herald
crisp vault
#

does communication includes only retrieving data? no, or? cause what the player will do is only ask "what the weather is" and use the data to react accordingly.

obtuse herald
#

I don't even think you can retrieve anything from the level BP

crisp vault
#

i mean we cannot change weather and all im trying is to try to object oriented thinking..

gentle urchin
obtuse herald
#

The level BP can only send

crisp vault
#

thats enough :D

#

cause .. all weather does is send, i mean i cannot change if it rains, but i can open an umbrella and the nature doesnt do it, i do, i hope it makes sense. Thanks guys, it clear that level bp's are exactly for systems like this.

gentle urchin
#

So a dispatcher perhaps

#

or a direct call to the player if its only for the player that cares about it

crisp vault
#

sort of yeah, all needed is an independent weather system which works for itself, player only uses the data to do other things

obtuse herald
#

I generally avoid level BP beyond debug

crisp vault
#

mind elaborating why? i thought about making an extra bp with a huge trigger box, and do exactly that, so far i started with lvl bp, but i gladly change my mind if its "better" due to X reason.

gentle urchin
#

Same

#

LevelBP is cursed ๐Ÿ˜„

crisp vault
#

love hate here haha

obtuse herald
#

It's more a me thing probably

crisp vault
#

ah okay

gentle urchin
#

Most of its usecases feels as dirty as "getallactorsofclass"

#

"Lets just grab an actor ref here, and hardcode some stuff to it"

crisp vault
#

so in the end, i guess it depends then on use case

obtuse herald
#

But you can't reference it, it's limit to the level, I tend to forget it's existence

#

And I like modularity

crisp vault
#

basically, all needed is try to replicate things around the world, weather is nature, and thus not controlled or altered by humans (directly), so a player cant change anyting, he spawns into the world and the world affects him, not he affects himself according to the world. Like.. "hey look im on moon, ah true i need to hold my breath cause there supposed to be no air" <-- i want to avoid this xD

#

im trying "ah damn i cant breathe, the planet doesnt have any atmosphere", how does he know? environment "told" him

crisp vault
gentle urchin
#

WeatherSystem would in my world be its own actor

crisp vault
#

Yeah now it makes more sense..

gentle urchin
#

LevelBP might spawn it due to level specific parameters for it,

crisp vault
#

Then Level bp is in most cases empty, ive seen it empty too mostly

gentle urchin
#

Yeah i'd prob let GM or smth spawn it really

#

Or pre placed in the level, but then there's less control over it

crisp vault
gentle urchin
#

over when it initializes compared to other classes ..

#

Exactly

#

"Oh , this is some icy world with winter storm, lets tune this to the max!"

crisp vault
#

yup, still follows the rule, something "creates" it, it makes still sense, level bp could be "nature" in this case instead.

#

nice nice, thanks! good thinking

gentle urchin
#

who creates it is less important as long as you have control over when it must be created and initialized (hopefully before player can see it winding up etc)

crisp vault
#

yeah thats exactly what a loading screen is for if it takes longer than a flash i guess

obtuse herald
#

Level BP is untouchable by anything and can only send

tawdry surge
#

But it does receive event dispatchers. In reality it's not a "bad" thing to use, it just has specific use cases

gentle urchin
#

It does serve a purpose yes

#

Its not inherently bad

#

Its just heavily abused in those uses i do see

odd ember
#

if you have that for multiple levels however

#

it's better to have it systemic

odd ember
gentle urchin
#

Tbf the only references i do have are those coming from tutorials, which is in a league of its own when it comes to quality and consistency

odd ember
#

fair enough, I don't watch tutorials but I can imagine them being quite underwhelming in terms of architecture

gentle urchin
#

Oh they never disappoint ^

obtuse herald
#

true

gentle urchin
#

Then again my architecture is pretty far from perfect aswell ๐Ÿ˜‚

odd ember
#

as long as you can stave off tech debt for some time I'm sure you'll survive

gentle urchin
#

Im used to finding fixes even in horrible setups so Most likely it'll work out in the end

#

Not sure what you mean by tech dept ?

#

Is that some common term for painting one self in a corner by bad architecture?

#

Ah. I try to avoid it to the degree possible. I feel like im bending over backwards to avoid future problems, but not sure yet as very few of my systems end up being developed far enough for that to become a thing

#

Perhaps this time... ill see if i managed ok

obtuse herald
#

ok, quick explanation for 'tech dept' please?

#

is it the need of rewriting bad code?

gentle urchin
#

Quick narrow solutions increasing cost of rewrites down the road

obtuse herald
#

Ah yeah I see

#

I tend to over-modularize my systems

rapid bronze
#

i created a collision preset. this preset problem is can push by other characters in map. but default presets Do not have this problem

odd ember
#

which really springs from the fact that software development (and by extension game development) is wicked problem solving: https://en.wikipedia.org/wiki/Wicked_problem

In planning and policy, a wicked problem is a problem that is difficult or impossible to solve because of incomplete, contradictory, and changing requirements that are often difficult to recognize. It refers to an idea or problem that cannot be fixed, where there is no single solution to the problem; and "wicked" denotes resistance to resolution...

ruby cliff
#

Hi guys, question about a character BP... I know how to set a morph target on BeginPlay, but what if I'd like to have it applied just in the viewport, so without any play or simulate event? Possible?

odd ember
#

Construction script

gentle urchin
#

or editor event

ruby cliff
#

Thanks. Construction script doesn't have a set morph targe node however?

odd ember
ruby cliff
gentle urchin
#

they come up in the instance details panel like this

#

custom event -> details panel -> mark as "Call in Editor"

#

they cant have inputs

#

so the "inputs" must be instance editable variables

ruby cliff
#

Thanks a lot @gentle urchin , appreciated.

versed sun
#

Is there a way to 'Mask' off the Directional Light/Skylight?

odd ember
versed sun
#

to have areas of the map that the Directional Light/Skylight don't effect

#

right now they are 100% off

#

but if i turn them on a little bit , then i can see the center area

odd ember
#

not that I know of. sounds like stuff you'd want to handle at a renderer level

ruby cliff
silent pilot
#

I'm trying to spawn a big block of instances of cubes (32*32*16) but it crashes when I click run :(

#

The code is very basic, just a for loop in a for loop in a for loop, each for loop for each dimension

#

And "add instance" at the end

#

But I end up with this:

#

Idk if PC specs matter but they should not since I have a decent computer

#

GTX 1050 (with 2 GB of VRAM), i5 7500 or sth close, 20 GB of RAM

#

But most importantly I use (Arch) Linux btw

obtuse herald
versed sun
silent pilot
#

invert number sign

fiery glen
versed sun
#

ok

obtuse herald
#

bp has a default max iteration of 1 000 000

faint pasture
#

He should only be doing 16k

#

I thought iteration max default was 10k tho

obtuse herald
#

yeah, if the loop is set up correctly

silent pilot
#

The current code crashes tho

#

With what I showed you guys

#

32*32*4 lol

faint pasture
obtuse herald
#

try adding a variable that increases inside your deepest loop, and print it everytime afterwards

lucid ingot
#

Index is only set to Y axis?

fiery glen
#

max loop iteration is 1000000 for me by default

#

it's possible multiple nodes increase that count faster?

#

no clue

silent pilot
faint pasture
#

IDK if it would but your non-pure minus node might be messing with your index

lucid ingot
#

and then sets to Z

faint pasture
obtuse herald
#

oh yeah

silent pilot
#

alright

obtuse herald
#
  • takes a ref
faint pasture
#

you might be modifying the index in place lmao

obtuse herald
#

don't do that

fiery glen
#

it's flipping it each time

silent pilot
obtuse herald
faint pasture
#

Even if that's what he's after he's not gonna get it with what he has

obtuse herald
#

until it breaks

silent pilot
#

it surprisingly works without the - sign

faint pasture
silent pilot
#
  • takes a ref lol
obtuse herald
#

just don't modify the index variable itself (aka don't connect it with a diamond shape)

silent pilot
#

yeah ik

#

thx for the help

faint pasture
#

If your math has an execution pin you're prolly fucking up unless you mean to

silent pilot
#

My math has an execution pin? What do you mean?

obtuse herald
#

that is an excecutin pin

#

short exec

versed sun
#

I don't know if this helps, but there is a handy 2d Grid Macro build in

obtuse herald
#

what

versed sun
#

and you can just run that Z times

obtuse herald
#

is it build in?

versed sun
obtuse herald
#

I always did my own math to achive this

#

so much time

#

wasted

versed sun
#

At least you understand how to do it manualy

silent pilot
#

This is right, right?

#

I now have a loop of 64*64*64, but it crashes because "infinite loop"

#

64*64*10 works tho

versed sun
#

are you clearing instances before you start your loop ?

silent pilot
#

No, but why would I do it? It's the only time I add instances

#

Is like "in case"?

versed sun
#

you may be stacking them on each other

silent pilot
#

My computer can do it ๐Ÿฆพ

#

I believe in it

#

Nah for real that makes sense lol

obtuse herald
#

or you increase max iteration and hope for the best

#

I recommend lorash's advise

silent pilot
#

Maximum loop iteration is at 1000000

#

1 000 000

#

I'm only at the quarter

#

It should be fine shouldn't it? but whatever, Ill split work

#

Also, last question, is it possible to have a instanced blueprint instead of a mesh?

faint pasture
#

You're getting into C++ territory IMO. This is not sustainable in BP

#

What's your frame time when you hit that loop?

obtuse herald
#

yeah cpp has a lot faster iteration time

silent pilot
#

I thought BP was just CPP but graphical :(

silent pilot
gentle urchin
#

Just use a forloopwait

#

Crises averted forever

faint pasture
faint pasture
silent pilot
#

UE4 version of Cpp is so weird so I thought using BP directly would make more sense, but now you guys are telling me it's slower :(

gentle urchin
#

It is quite a bit slower

faint pasture
#

It's always been slower. Use BP if it works for your use case, but I'm smelling this as not working. What are you trying to do, gameplay wise?

gentle urchin
#

Proc gen a level ? First guess

silent pilot
#

Recreate Minecraft, kind of

gentle urchin
#

Go cpp straight away^

faint pasture
slow pewter
#

Mhh got again in Trouble i have, 3 Widgets as Child in an Widget, why on debugger its always duplicates, like i called it "0""1""2". and i get it doubled -> https://puu.sh/IJLc5/ae6711c353.png

silent pilot
# gentle urchin Go cpp straight away^

I feel like it would be easier to use Blueprint first, because Cpp objects are just a code representation of what Blueprint graphically represents. And it's easier to learn with graphics representation

thin panther
#

But what you want to do is more suited to native code

silent pilot
#

Yeah ik

#

But it's not a real project

#

It's just to learn

#

Ill redo it in Cpp after I have made sure I understood everything

#

I'm a diehard Cpp fan so dw I'll do it ๐Ÿ™

gentle urchin
tawdry surge
#

I mean 100x slower is an exaggeration. But loops are particularly not good in BP

gentle urchin
#

In my case i got 8x the speed ๐Ÿคทโ€โ™‚๏ธ

#

1 to 1 bp to cpp

#

So if you've made it work ok in bp you can be sure to reap some rewards moving to cpp ๐Ÿ˜„

#

I've only done proc gen in bp myself

#

Could go relatively big maps before loop iteration went to slow

thin panther
#

Is it advisable to use the thing that converts blueprimts to native code before packaging

gentle urchin
#

Even then, chopping it across a few frames avoided the 10 sec freeze

gentle urchin
thin panther
#

Ah, okey doke

sharp rapids
#

takes around 10 minutes to compile everytime I make a small change

gentle urchin
#

Compiling wrong? ๐Ÿ˜‚

#

Takes 15 sec on mine

sharp rapids
#

OR use the 'Compile' button in the editor

#

both are really long

silent pilot
#

I know I was just doing tests

#

Yeah

gentle urchin
slow pewter
#

How i edit Items in Array?, i was trying to Insert, but thats not like Editing, thats like Adding everytime..

versed sun
#

you might be looking for this

#

it edits an existing element or adds a new one

slow pewter
#

But is this not like Creating always an Array Element?

#

Like i try to Add Dynamically Indexes on Changes,

#

like on Text Change, Add it on that Index ->

versed sun
#

only is Size to Fit is checked AND you dont already have that index

slow pewter
zealous meteor
#

Hi

#

How do I disable and enable a component in an actor through blueprint?

#

I want to make a cube appear and dissappear

cold cobalt
#

So for some reason, even while setting air control to 1 I cannot maneuver my character at all when falling... Any thoughts as to what I can check?

vital aspen
#

for some strange reason, that I don't know. sometimes I just can't get a widget to close. I'm opening and closing my inventory widget from the player controller,

#

I have watched about 3 videos and still have the same issue. anyone have any idea what I'm doing wrong.

gentle urchin
#

Instead of relying on your custom bool

#

You can check if the widget is in viewport

#

Also you dont have to create a new widget each time , but thats just a detail i suppose

vital aspen
#

well it looks like the UIInventory wasn't getting set, So I added this to the construct in the Hud.

#

this is what I changed.

#

how ever it still doesn't close the widget. I can open it, I just can't close it.

gentle urchin
#

Input mode ui only

#

I think thats your culprit

vital aspen
#

Let me try game and ui.

#

bingo. Thank you, That worked.

lime yoke
#

Is it possible to call a Super in blue prints from a parent class? Let me show you a simple example.
Expected result: "Hello World!"
Actual result: "World!"

wet grotto
#

Hello everyone, I am creating an endless runner game and I have infinity tiles which spawn when it is collide with the box. When I set the for loop to 2 it creates 2 tiles in front of the character however in time its became massive amount of tiles and I am looking a way to tell the engine the max amount of the tiles.

blissful grail
vivid hatch
lime yoke
vivid hatch
#

Hi
How would I get a child camera to follow the parent but add extra values to the position on runtime?

lime yoke
#

I tried that but I thought it wasn't the correct option.

#

Where should I connect this?

untold dust
#

Hello everyone, newbie question here : In my PlayerController there is a Componement, I would like to have access to a variable that belongs to the PC from the AC, it's there a way or I need to cast it.

blissful grail
lime yoke
#

It runs backwards, though.

#

It prints "World Hello" instead of "Hello World".

thin panther
#

Have you tried reversing the nodes then

#

Put world fiest then call parent?

lime yoke
#

It sounds kind of counter intuitive.

#

It kinda works I guess?

thin panther
#

It is but code takes time to execute l, its likely gonna be quicker to print the string than it is to call the parent

lime yoke
#

That is my main concern. I would like it to be synchronous, call parent event and just after it finishes, call the child event.

#

I think I've got an idea, though...

gentle urchin
#

Go for it !

#

Just make the function in the parent

#

Call it at the end of on landed

#

Override it in the child

surreal coyote
#

So how do you use a while loop without getting the infinite-loop error?

#

Isn't it the point of a while loop to be "infinite"?

#

I come from Javascript but I doubt it's different in c++

#

Why can't this just run until I set Can Enter to false?

gentle urchin
#

It does

obtuse herald
surreal coyote
#

Or do I have to set it to false inside the loop at some point?

gentle urchin
#

But you must do it within reasonable time

#

Exactly

surreal coyote
#

So I can't wait for another event to set it to false

obtuse herald
#

if you don't set 'can enter' to false in the same frame, it throws you out

lime yoke
obtuse herald
#

not like that

gentle urchin
#

It blocks anything else in the game thread from being processed

obtuse herald
#

you can however create your own while loop and add a delay after every loop

surreal coyote
#

Then I can't really do this with a while loop

#

Just want a text to rotate with the controller camera

gentle urchin
#

Yes you can

#

But not ... in a while like that

#

You could say the preconditio for the while loop is a rotation comparator

surreal coyote
#

Tick then?

gentle urchin
#

If rotation != desired rotation

#

But

#

It doesnt make sense to have such a thing in a while loop

#

Tick is reasonable for this, yes

surreal coyote
#

Aren't too many functions on tick tanking performance at some point?

gentle urchin
#

Yupp

#

Everything comes with a cost

surreal coyote
#

Why is there no option with texts to just do this saddofroggo

gentle urchin
#

It would be done on tick..

#

You can add a rotation component to it

#

As the partial root of the text component

#

They tick in c++ so less costly

obtuse herald
#

you could also create a timer

#

but usally rendering or physics stuff are one of the only things you actually put on tick

gentle urchin
#

^ some of the good usecases for tick*

surreal coyote
#

That's what I've done so far

#

And engine sound

runic plinth
#

on this tick topic i was having a question. Should I use tick if I want to track what's the closest actor based on player distance?

#

Because to find the closest actor I'm using "get all actors of class" and for each loop, and running a loop on tick is costly.

earnest ridge
#

How often do you need to check the closest actor? Almost constantly?

odd ember
runic plinth
#

oh i could use this "press key thing" to fire the event

odd ember
tawdry surge
#

It's fine if you do it once to get the list, save it to a variable and then just loop through the locations

earnest ridge
gentle urchin
#

Registering objects that come within a given radius

runic plinth
#

Then I would need to filter what that volume collides with

odd ember
#

correct

gentle urchin
#

Either you do it initially by the channel so only objects you're interested in reacts to it ,

#

Or you do it on overlap and check if they have a given property that you desire

#

Like Tag

runic plinth
#

Besides the Tick there, how does it look? (made it compact for the print)

odd ember
#

messy

runic plinth
#

messy cause i had to pack the nodes for the print ๐Ÿ˜…

odd ember
#

there is nothing inherently wrong with the code shown, but it seems to cover a lot of cases on tick rather than looking into how those cases should actually be registered

runic plinth
#

The idea is to replace the Tick with the player input event to fire the closest actor reroll, this would be more efficient correct?

odd ember
#

it would but you're not solving the problem, only moving it

#

realistically it's fine but you can mash that key and you'd still have issues with framerate drops

runic plinth
odd ember
gentle urchin
#

Getting rid of the GetAllActorsOfClass would be my first mission

odd ember
#

you should create an architecture to support this instead of looking at quick hacks to fix them

silent berry
#

like CE said, it's still a problem and adding a cooldown is basically just sweeping all the dirt under a rug

#

all it takes is that rug to get moved and the dirt goes everywhere again

obtuse herald
odd ember
silent berry
runic plinth
#

Sadly don't have that know-how to build that architecture. The player input is basically an aid to find actors on a maze. In the maze the more you use this the closer the bad guy gets to you. So I was assuming this would disincentivize player to abuse, on top of this indeed I need some sort of resource to manage the potential abuse. Any references I should look up to build this architecture?

gentle urchin
odd ember
#

registering actors on collision is a better way already

runic plinth
dark crow
#

There's GetActorOfClass if you just wanna access the first one too

Less messy visually

odd ember
obtuse herald
odd ember
#

look at the code

#

it iterates through a TArray of actors

silent berry
#

I've seen way too many youtube tutorials that push using GetAllActorsOfClass

runic plinth
obtuse herald
odd ember
#

that's fair

#

I don't know the implementation of TMap

#

I know TArray is a heap

#

is it?

gentle urchin
odd ember
#

I thought they had a heap implementation on the backend for faster use

#

oh well

runic plinth
odd ember
#

I was under the impression they came pre heaped

#

wouldn't you just go left to right in the heap for indices?

zealous moth
#

kill me... what is inconsistent dll linkage

#

and i'm in the wrong place

#

ty

odd ember
#

it only tells you of inconsistent dll linkage, not of consistent dll linkage ๐Ÿ˜”

gentle urchin
#

I ended up with two TMaps for semi-predictable iteration, and for speed above TArray

silent pilot
#

I think I've already asked this but can I have an instanced mesh that is a whole class I created, like a BP?

#

I have my chunk, my chunk is made of blocks, I'd like to have a ISM that stacks those blocks

odd ember
#

it is possible yes

#

it's a pain in the ass to work with but it is possible

silent pilot
#

How should I do it then?

near wolf
#

Hello, how can I trigget 2 events at beginplay? This is not working, im trying to play video and audio at the same time

odd ember
silent pilot
#

Well I don't know how to do this

#

No clue comes to my mind

odd ember
#

you don't know what?

silent pilot
#

I have a block

#

I want a chunk that stacks a lof of blocks

#

But I don't know how to do it

odd ember
#

ISMs are available as component inside actors if that's what you're asking

obtuse herald
silent pilot
#

No I know how to use ISMs

thin panther
#

If you wanna make minecraft you shouldnt be stacking cubes

silent pilot
#

It's just that they only allow a Mesh

#

Not an object

odd ember
#

yeah there's no such thing as an instanced actor in that capacity

silent pilot
#

Alright

odd ember
#

you can have a manager actor that spawns bricks as you want them

#

or you can use the bricks as meshes

odd ember
# obtuse herald I don't have the full source installed and going through it via github is rather...
void UGameplayStatics::GetAllActorsOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass, TArray<AActor*>& OutActors)
{
    QUICK_SCOPE_CYCLE_COUNTER(UGameplayStatics_GetAllActorsOfClass);
    OutActors.Reset();

    // We do nothing if no is class provided, rather than giving ALL actors!
    if (ActorClass)
    {
        if (UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull))
    {
        for(TActorIterator<AActor> It(World, ActorClass); It; ++It)
        {
            AActor* Actor = *It;
                OutActors.Add(Actor);
            }
        }
    }
}```
obtuse herald
odd ember
obtuse herald
#

it loops over every actor of the class and just adds them to the out array

#

I never said if you want the best performance for you game use GetAllActorsOfClass

#

I just said it's not that bad as it often gets called out

odd ember
# obtuse herald yepp, that fits with the article I send pretty well
void operator++()
    {
        // Use local version to avoid LHSs as compiler is not required to write out member variables to memory.
        AActor*           LocalCurrentActor      = nullptr;
        int32             LocalIndex             = State->Index;
        TArray<UObject*>& LocalObjectArray       = State->ObjectArray;
        TArray<AActor*>&  LocalSpawnedActorArray = State->SpawnedActorArray;
        UWorld*           LocalCurrentWorld      = State->CurrentWorld;
        while(++LocalIndex < (LocalObjectArray.Num() + LocalSpawnedActorArray.Num()))
        {
            if (LocalIndex < LocalObjectArray.Num())
            {
                LocalCurrentActor = static_cast<AActor*>(LocalObjectArray[LocalIndex]);
            }
            else
            {
                LocalCurrentActor = LocalSpawnedActorArray[LocalIndex - LocalObjectArray.Num()];
            }
            State->ConsideredCount++;
            
            ULevel* ActorLevel = LocalCurrentActor ? LocalCurrentActor->GetLevel() : nullptr;
            if ( ActorLevel
                && static_cast<const Derived*>(this)->IsActorSuitable(LocalCurrentActor)
                && static_cast<const Derived*>(this)->CanIterateLevel(ActorLevel)
                && ActorLevel->GetWorld() == LocalCurrentWorld)
            {
                // ignore non-persistent world settings
                if (ActorLevel == LocalCurrentWorld->PersistentLevel || !LocalCurrentActor->IsA(AWorldSettings::StaticClass()))
                {
                    State->CurrentActor = LocalCurrentActor;
                    State->Index = LocalIndex;
                    return;
                }
            }```
second loop inside the `++` operator of the iterator
odd ember
gentle urchin
#

Relying on such a function, that is

odd ember
#

I'm still trying to see where GetObjectsOfClass is being called

#

because we're not even at the end of the rabbit hole here

#

and we're already at O(n^2)

obtuse herald
#

Well lets end that here (kinda out of scope for #blueprint ), I stand corrected (or not I'm still not 100% sure :p). In the end using GetAllActorsOfClass is (in most cases) bad practice anyways and should not be used beyond prototyping.

odd ember
#

it's worth mentioning that using it in editor is even more expensive, as it adds an additional 2n from what I can see. though I suspect even with any hashmap functionality you'd still have an additional n somewhere

indigo bough
#

Hey folks, any idea why I'm getting these gaps between my spline meshes?

odd ember
gentle urchin
#

Spline meshes are also stupidly expensive :(

surreal coyote
#

Smoother way to teleport to interiors? Don't think so. CoolDonny

gentle urchin
#

Why split the pins? ๐Ÿ˜„

surreal coyote
#

Oh I played around with the Z value before

odd ember
#

that double comparison is unnecessary

indigo bough
odd ember
#

apart from that, I'd say it's the spacing given per spline mesh component

indigo bough
gentle urchin
#

Also

odd ember
gentle urchin
#

Using mesh length?

tiny prairie
#

still working on my fortnite building stuff this is some code i have right now for when something destroys gets really laggy when i connect alot of buildings to eachother https://www.youtube.com/watch?v=z9F7UVloESw&ab_channel=WALLZ "Death" plays when i shoot something https://blueprintue.com/blueprint/f6qyleq5/ , https://blueprintue.com/blueprint/tndzuvq6/ any idea on how i should improve / remake this EDIT: "Checked in", "Checked out" And "Checked" are arrays

surreal coyote
indigo bough
odd ember
#

whether a mesh actually fills that space

odd ember
indigo bough
#

Right, I see. Seems counterintuitive, but I'll try with that. Thanks

surreal coyote
#

Yeah I suppose you're right but it doesn't hurt

#

In coding you always have to expect everything. Even players getting cars in interiors

odd ember
#

seems like correct logic to me

gentle urchin
#

So why is it spaced

odd ember
odd ember
gentle urchin
#

Actually i think i realized it

#

Is the spline only like 4-5 segments?

#

Doing the division you're missing out on the fractional part

indigo bough
#

Ahh, yeah that'll do it

gentle urchin
#

But then... it would only be on the end of it ... hmm

#

Thats not it then

crimson hornet
#

Hello I got an problem. My NavLinkProxy is not working. I assigned my NavLinkProxy to an BP, but when the AI follows me it wont go through.

indigo bough
#

I even checked the mesh pivot, and it's perfect

#

I've done these splines so many times before, no idea why now it's a problem

pulsar path
#

hi i started making a town down game yesterday, but im running into a weird issue where if my editor perspective isnt top down (ie: is in perspective) then the player starts in a weird location with the camera permanently rotated and i cant seem to find whats going on. anyone have any idea?

odd ember
#

because there's your answer

gentle urchin
#

Length / meshlength = #meshes.
Mesh index * meshlength = DistanceOnSpline

#

Math checks out in my head

#

But there is some initial offset

#

To only one of them

#

Which breaks the math

odd ember
gentle urchin
#

Start of the mesh has an offset, end of it does not,

odd ember
#

sorry, scale being 1/meshlength fraction

gentle urchin
#

In the right direction that would give spacing

odd ember
#

for the last one

gentle urchin
indigo bough
gentle urchin
#

That, or apply it to both start and end...

indigo bough
#

Same result unfortunately, all that's doing is shifting the points up in world space

gentle urchin
#

Ah i misread(phone)

#

2 sec, booting project

indigo bough
#

I've somehow seriously broken this and I'm not even sure how ๐Ÿ˜„

#

Looks like the tangents are now broken too

gentle urchin
#

worked like a charm

surreal coyote
#

How would you do a quick screen fade to black?

#

Is there a function?

gentle urchin
#

this was surprisingly smooth

obtuse herald
#

something along does lines

gentle urchin
surreal coyote
gentle urchin
#

code i used, for reference

#

not sure what has happened really

indigo bough
#

Thanks! I'll try the flooring instead of Whole and Remainder perhaps

gentle urchin
#

last time i used it it tanked my draw time at even small amounts

indigo bough
#

I tried using the start/end at each point instead, but it's not as good a method because you get massive UV stretching depending on the distances between points

gentle urchin
#

ouf

#

looks pretty bad

#

i can force oddities at specific points,

#

but nothing weird beyond that

gentle urchin
#

and spline mesh settings

latent basin
#

hey guys, is there a way to make a realistic mirror in ue4? i need it to be realistic no matter the cost in performance. Ive tried a second camera but ran into many problems, and using materials and planar reflections isnt looking too good :(, is there another way or am I missing something?

odd ember
indigo bough
gentle urchin
#

ue5...

indigo bough
#

I mean it's possible it's broken in UE5... But I'm pretty sure I had one working a few weeks back

near wolf
#

Why I have so many missing nodes, what the hell. I look for something and it's not there

gentle urchin
#

try the basic cube

near wolf
near wolf
odd ember
#

that's all I got

obtuse herald
#

same

maiden wadi
#

What is the parent class that your blueprint inherits from?

obtuse herald
odd ember
#

they would still show up I'm pretty sure. when placing them you'd get warned iirc

#

(the node wouldn't spawn)

#

just like spawn actor in construction script

indigo bough
#

Why my particular mesh won't work is beyond me, but I'll investigate

gentle urchin
#

Somehow its not the size it think it is?

obtuse herald
odd ember
#

ah yeah

#

maybe that's it

maiden wadi
#

The world may never know.

indigo bough
#

Ahh hahaah

#

Yeah, it was the bounds

#

Well, now I feel stupid, but at least I know that's causing it.

#

Thanks for the assistance folks

gentle urchin
#

Tehe no problem !

#

If this is a road perhaps virtual texturing could be an idea

near wolf
#

so im trying to play both video and audio on button press. But only 1 of them works. Can someone help?

odd ember
#

I'm guessing the media player can only play one media at a time

near wolf
#

even if I have 2 media players it still doesn't work

odd ember
near wolf
#

not sure if this is the right way

maiden wadi
#

That's not two different media players...

odd ember
maiden wadi
#

That is two different nodes, using the same pointer that points to the same media player.

#

Also

#

Why is the audio not encoded into the video?

odd ember
#

because that would be too easy

near wolf
#

because they are not from the same place

maiden wadi
#

Why not use an audio component for the audio instead of the media player?

near wolf
#

I tried that too

#

but maybe I don't do it correctly

odd ember
#

is the audio in a separate video file?

maiden wadi
#

That isn't an audio component.

#

Also. To do this, you probably need two different Media Players in your content browser. And even then I'm not actually sure if that'll work.

near wolf
#

I have 2 different media players

#

and both of them have the audio and the video

odd ember
#

best thing would be to merge the audio and video channels before importing the video

near wolf
odd ember
near wolf
#

im not sure what im doing wrong

odd ember
#

that's, again, not two different media players. that's just two pieces of media

maiden wadi
#

I dunno. I've never tried playing sound through Media player unless it was encoded in a video file. Even then I use the MoviePlayer in C++ instead of the content browser MediaPlayer. Sounds are much easier handled as basic sound files through an audio component.

mild tangle
#

how would i get the timeline to stop part of the way from a to b

#

i tried to mess with the values of the timeline

#

but it didnt really change anythiong just the speed of movment

near wolf
obtuse herald
# mild tangle

if you want to pause the time line and resume it later use the stop pin

#

else just adjust your float curve

#

remember that alpha is a value between 0.0 an 1.0 corresponding to 0% to 100%

stable smelt
#

Hi, does someone knows of a good way to find which character skeletal mesh is being used in the player blueprint? other than checking the name of the mesh? (I feel like that is something I shouldn't be doing, even though it only does it once at the start).

-I suppose that changing manually a public variable in each instance should do the trick, but I want to know if there's something that can automatically do that.

PD: I tried checking the distance between sockets and from the head socket to the floor. But my characters share skeleton, and that seems to make all values the same, even though all my characters are different height.

odd ember
stable smelt
#

Hmm, btw is a bad practice to use the name? I'm no programmer, I'm just messing around. But I feel like that's like a "hack" way of doing stuff xD

odd ember
dawn gazelle
# mild tangle

Timelines can have function tracks. On that function track you can make it pop out an event at a certain point in the timeline and that event can then stop your timeline.

mild tangle
mild tangle
steady night
#

hey guys, what is the best way to add my stats onto my charachter, i mean i got variables "strength,endurance" and each of them gives 5+ health how would i best make it interact with the value, instead of when increassing and decreassing str,end value to update should i use event tick to always set the max health value ?

gentle urchin
#

When a stat changes -> recalculate stats

#

Either all or affected. Id just do all, duck it :)

steady night
#

yeah

gentle urchin
#

Only on change

steady night
#

hm and i would do that inside my charachter Bp with all the variables i suppose ?

gentle urchin
#

Not on tick

#

Yep

steady night
#

oh ok,

#

how would i check if value change ?

spark steppe
#

use a setter method, e.g.: create a function setStrength()

gentle urchin
#

So when player levels up -> stats change -> recalc

#

When player equips/unequips -> stat change -> recalc

steady night
#

aye so i should do a function that recalcs ? and call it when i need it ?

maiden wadi
#

Would recommend doing this inside of an actor component or something. Makes it reusable for other stats elsewhere on other things.

spark steppe
#

and the setter can call something like updateHealth()

gentle urchin
#

Strengts affection on other stats would be hard to isolate in a singular comp tho?

#

It would be an entire stat comp

spark steppe
#

i wouldn't make a component for that

gentle urchin
#

With its complex interaction inside

spark steppe
#

maybe rather an UObject

gentle urchin
#

Why uobject over component? Modular piece of code may aswell reside inside a simple component?

spark steppe
#

component adds more overhead

#

and if you add one for each value you may get a clusterf*** of components in your actor BP

steady night
#

so like this ?

gentle urchin
prisma snow
#

is there any way to create and publish game for IOS with windows PC?

gentle urchin
#

Since they have some 'complex' effect on each other

gentle urchin
random plaza
#

is using for each loop on tick a bad idea?

spark steppe
#

depends on what it does

random plaza
#

it casts to the player, gets the current quest array, compares each item in the array with the quest object's variables then if it matches up sets the visibility of it's screenspace widget

#

it's a quest marker

spark steppe
#

yea that sounds like a bad idea

gentle urchin
#

And it needs to check this every single frame?

#

Sounds pretty bad indeed

spark steppe
#

that sounds like something that can be event driven without any problem at all

random plaza
#

i could have a event that fires when a variable changes in the quest struct

spark steppe
#

now guess what is more efficient, checking ~60 times per second or firing event every few minutes ๐Ÿ˜›

dark crow
#

Using a timer that calls a timer that calls another timer that casts to all classes with a for each loop in 10 sequences and evaluates if the data is the same before infinitely adding it all to an array ๐Ÿ‘

gentle urchin
#

Nested timers decreases cpu cycle time, i've been told. Speed increases by power of timers

dark crow
#

Pure mathematics

gentle urchin
#

At some point i need to deal with the memory issue im facing ...

#

started coming after i played around with virtual texturing

gentle urchin
#

which i have removed yet it haunts me

steady night
#

yay got it to work ๐Ÿ™‚

high yew
#

how do I make it so that my static mesh rotates toward its velocity?

silent pilot
#

So, what's the best way to remake Minecraft with Blueprint/Cpp?

gentle urchin
#

pretty broad question

obtuse current
#

Anyone know why Making an Enum via a Byte is incorrect? In this example, just to test that something was wrong with bytes, I convert an enum to byte, to int, back to byte, back into the enum. I'd expect these enums to be identical, but they get different results (byte is always returning enum index 0)

gentle urchin
#

tried going via literal byte?

odd ember
gentle urchin
#

expanding to int -> trunacting to byte , no?

odd ember
#

might be

torpid hound
tiny prairie
#

is there a way to append 1 array to another using only uniques. instead of having to go foreach loop and using add unique

grand oasis
#

hello, does anyone know if I can reference each chunk in a chaos fractured mesh system?

obtuse current
#

@torpid hound @odd ember I don't think it has to do with the int to byte conversion, for example, these both print the same results, where it should be different

#

The conversions seem to all be correct, in that they are appropriately always 0 or 1 as expected, but plugging those byte values into the enum results in the same enum (index 0) each time

maiden wadi
#

I mean you could dump them into Sets maybe. Can't remember how blueprint handles adding arrays to sets. Could work, but it's the same thing internally. Just loops over the members to check and adds them.

tiny prairie
#

il try something with sets

silk hinge
#

Hey guys, I'm having a little trouble finding something, Like I literally just want to stop running a behavior Tree, The "Run behavior tree" node set up with no value dosent do anything, any ideas of a node ? I can always run an empty bevior tree to make the AI stop, but I'm pretty sure there is a "Stop running behavior tree" node, right ?

blissful grail
# silk hinge Hey guys, I'm having a little trouble finding something, Like I literally just w...
silk hinge
bright harbor
#

so i'm trying to make a system to allow me to swap my character at runtime, and i tried this, but for some reason randomly sometimes it will not put me on the new character, but rather just put the character in the ground and not have any input

#

this bit of blueprints is on all the characters, and the get character macro gets the class of the current character

#

looking closer at things, it appears when the camera gets put in the ground, no new character is spawned, and all that remains is a camera actor

odd ember
#

what's inside the macro

#

also I believe you don't need to unpossess before possessing anew

#

also I'd ensure that the controller you're giving is the controller of the character you are using

bright harbor
#

this is the macro

maiden wadi
#

That really should be a function with a class input and a boolean output.

#

Not the problem though.

bright harbor
maiden wadi
#

I mean the macro you're using the get the class and the == class check you have on your branches.

onyx frigate
#

Hello, I am using set view target with blend, and it works great. The first time I have a smooth blend, but the second time it's called it's instantaneous. What is the reason ?

onyx frigate
#

No blend time is set to 2s everytime

bright harbor
onyx frigate
#

Don't mind the spaghetti, it's a POC

#

I have a camera rig with CAM_IDLE. I press a button and it's blending to CAM_PLAYER. but after that, whatever blend I call, it's always instant

odd ember
bright harbor
odd ember
#

yes

bright harbor
#

gotcha, i'll redo those, and i tried removing the unpossess and still nothing

native ice
odd ember
#

check what the controller is possessing

bright harbor
odd ember
#

right but you're saying it only sometimes possesses it

#

so check what it possesses in the cases where it fails

wet grotto
#

Hello, Add controller pitch Input not working! I tried everything but it does not work any idea ? I feel like it is a bug.

bright harbor
odd ember
odd ember
wet grotto
#

It is inside the main character blueprint and there is no controller input.

#

When I connect that to yaw it is controlling it but not other way around.

bright harbor
odd ember
bright harbor
odd ember
#

and what's your input pitch scale?

wet grotto
odd ember
restive token
#

random: is it possible to use the navmesh as a render target? or as something to generate a minimap sort of thing

odd ember
wet grotto
#

I fixed it thanks for the help CE

odd ember
wet grotto
#

It was my fault, I enable the pitch and fixed.

bright harbor
odd ember
torpid hound
bright harbor
bright harbor
#

but it could also be very sporadic

#

correction, it's pretty random

torpid hound
bright harbor
odd ember
#

if it's happening randomly or because the switch is too fast perhaps it's a same frame type issue

#

but equally I've said how you could optimize your code so that your minimize risk of these issues propagating

bright harbor
#

my apologies, i'll see what i can do, thanks for all the help

native ice
#

anyone here good with bp splines and stuff? i'm not sure what i'm doing, been following a few tuts and i just want to be able to spawn mesh along this spline - at the moment there's a linetrace to make the spline stick to the ground, but i just want some mesh to spawn along the line. This is what i have at the moment, would appreciate some assistance - cheers https://blueprintue.com/blueprint/jrtuppz3/

main pollen
native ice
#

oh, like an intersection?

#

when i mean connect two things together, i meant two separate lots of code together.

main pollen
#

oh okay

#

can someone help me with this? I'm trying to spawn an actor at the position of my cursor in the world space but with this blueprint, it spawns the actor at where my camera is at. I guess I need to use "world direction" too but Idk what to do with it or what to connect it

main pollen
#

much more easy with that

frank spear
#

Does the Blueprint version of GetComponentByClass not work with derived clasess? If I try to get a component of a base class type from an actor with a derived class component, it returns none:

dark crow
#

Blueprint Debugger is unreliable, did you actually check if it's truly none?

frank spear
#

Well, the code beyond IsValid doesn't execute, so as far as BP is concerned, it's none.

#

if I do a GetComponent<> in C++ it works with derived classes - it seems that in BP it does not

#

I was just hoping to avoid needing to write a new C++ class for a simple thing that can be done in BP

dark crow
#

Yeah, I think it searches specifically for that class

frank spear
#

Actually, I have it running in the debugger now - it runs the same code as FindComponent by class, the bonkers thing is the IsA test is Failing!!

#

OK, this is bannanas - when I step into the IsA() check - it returns true..... but FoundComponent never gets set?

#

I'm going crazy

obtuse herald
#

Your case just seems to behave diffrently

#

does your actor contain a static mesh?

#

actually create an new actor

#

just static mesh

#

and try it there

frank spear
#

I've tried it with both static meshes and ShapeComponents - result is the same

#

the crazy thing I'm getting now is that the IsA check actually succeeds and returns true - but in the debugger the FoundComponent is never set (stays null) I'm not sure how the code block is getting skipped

obtuse herald
#

it shouldn't

#

did you try to access a function of the component?

#

try that and see if it actually errors

frank spear
#

Ok, so I see that GetComponentsByClass (with an 's') actually executes a different code path

obtuse herald
#

yeah that returns an array

frank spear
#

just tested it with my blueprint by replacing GetComponentByClass with GetComponentsByClass - and it works

obtuse herald
#

that is weird

frank spear
#

But GetComponent (no array) does not work - at least for me

#

in the C++ GetComponents uses the templatized version of the function, while GetComponent does not

obtuse herald
#

I thought you accidently edited the IsValid macro

#

but that it actually just does not work is weird

frank spear
#

No, I haven't changed the macro - I just finally got fed up and went to visual studio and am now seeing that these two BP functions follow very different code paths

obtuse herald
#

just remember, the blueprint debugger is not reliable whatsoever

#

always print your values

frank spear
#

Well, I guess this is the way for now for me - I mean, it's not super important code, but I'll need to keep an eye out, it could be that GetComponentByClass is broken in 4.27.2

obtuse herald
#

wait let me try actually

#

I actually almost always use GetComponentsByClass

#

I just assumed they would behave the same

frank spear
#

GetComponents does this:

#

GetComponent does this

trim matrix
#

no idea whats cuasing this but it is blueprint caused... just not in the way you'd expect. I'm trying to organize my files but whenever I try to move the contents of the blueprints folder (They appear to be the ones from that one test level that shows the materials and effects like the smoke and light) the engine crashes. It dont even get to the part where i can copy and paste, dragging them is enough to cause the crash. Is there some aspect of blueprints that cause this jank orrr

frank spear
#

When you move a folder with a whole lot of assets that are being used in the game the editor will try to redirect a ton references - which can go wonky

pale iris
#

I am having an issue with moving some pawns they face the wrong direction when moving and I enabled orient rotation to movement but it still doesnt work

trim matrix
#

Ive manage to narrow it down, its a single default blueprint. When i open it the engine crashes as well

frank spear
#

the only way I've been able to successfully move a load of assets into another folder is to export / import using a tertiary project

trim matrix
#

"BP_Light Studio"

#

any idea what may be causing this one blueprint to crash the engine? I've never touched it before

obtuse herald
#

Unreal engine create redirector files where your old assets were

#

you can clean them up when you right-click on the folder

trim matrix
#

still crashes after that

frank spear
#

no Idea what BP_LightStudio is - is it from a marketplace asset?

#

it could be referencing code that is crashing

trim matrix
#

nope, this comes with the 3rd person blueprint starter

#

thumbnail is black and interacting with it in anyway crashes the engine

frank spear
#

do you get a crash log when it crashes?

trim matrix
#
Assertion failed: !IsInsideRenderPass() [File:D:\build\++UE5\Sync\Engine\Source\Runtime\RHI\Public\RHICommandList.h] [Line: 3377]```
#

for context i have no map open at the moment

obtuse herald
trim matrix
#

so it shouldnt be rendering anything at all

frank spear
#

found this

obtuse herald
frank spear
#

So at least one other person is having the issue

#

If you're just prototyping something, I would just avoid using that blueprint - maybe delete it from the template

trim matrix
#

yeah, they mention it not being in 4.26 so perhaps its a 5 issue?

trim pollen
#

(sorry to interject, wish there was more than one channel...)

I'm trying to create a slider to control my directional light. I can create the slider, and I can control the directional light with a public variable, but I can't seem to figure out how to set the slider value to the variable (or directly to the transform) no matter what I do. I have a widget blueprint and a light blueprint. This is the error I get, so I guess I'm not setting "target" correctly? Blueprint Runtime Error: "Accessed None trying to read property Target". Blueprint: NewWidgetBlueprint Function: Execute Ubergraph New Widget Blueprint Graph: EventGraph Node: Set lightRotationZ

frank spear
obtuse herald
#

seems like you never set it

trim pollen
#

but how

#

I thought it was set to directional light

obtuse herald
#

yeah that's just the type

#

but it doesn't know which directional light you mean

#

you could have mulitple

#

(but for directional lights you usually only have one)

#

this should work for your case

#

or wait actually

#

did you create a custom directional light?

trim pollen
#

I created a directional light from the "place actors" tab, then I converted it to a blueprint.

obtuse herald
#

yeah alright

#

where do you create the widget?

trim pollen
#

User Interface -> Widget blueprint ๐Ÿ™‚

obtuse herald
#

no I mean in your code

#

you need to add it to the viewport and stuff

#

is it just in your player controller?

trim pollen
#

in my level blueprint

obtuse herald
#

ah ok

trim pollen
obtuse herald
#

yeah drag return value and place a 'SetTarget' node

trim pollen
#

drag from what?

obtuse herald
#

that here

trim pollen
#

lol, on which node?

obtuse herald
trim pollen
#

ok

obtuse herald
#

connect it before add to viewport

#

then select your directional light in your level

trim pollen
#

okay then drag that in and set it to target?

obtuse herald
#

exactly

trim pollen
#

the first "set" node won't connect to anything

obtuse herald
#

that should be right

#

you maybe want to rename your variable to avoid confusion

trim pollen
#

i mean i will once this works

#

not sure what that accomplished

obtuse herald
#

it should work like that

gentle nebula
#

Are there pointers in blueprint? can i input a boolean pointer into a blueprint function/macro?

trim pollen
#

nope, doesn't seem like it.

obtuse herald
# trim pollen not sure what that accomplished

You need to do that with reference variables, because you are basically telling your variable when you create it "You will receive (in your case) a directional light" and when you set it you're actually sending to variable to it

gentle nebula
trim pollen
#

top is level blueprint, middle is my directional light bp, bottom is widget bp

dawn gazelle
obtuse herald
gentle nebula
obtuse herald
trim pollen
#

there's no error, it just doesn't work

obtuse herald
#

alright, that's already better

trim pollen
#

lmao

#

my game just crashed but i'm pretty sure lightrotationZ is just print out 0s

#

one sec

obtuse herald
#

alright

#

ah right

#

did you change the max value of your slider inside your widget?

trim pollen
#

it goes from 0 to 360 ...

obtuse herald
#

ok

trim pollen
#

wait, it might be working

#

hold on

#

yep! thank you!

#

๐Ÿ˜„

obtuse herald
#

you're welcome

gentle nebula
#

why am i getting an infinite loop error ?
Mouse up would turn the Boolean false
Is it possible to set it to ignore infinite loops?

obtuse herald
#

however it will block the main thread while it's running

#

meaning the function never returns

#

meaning it will just run endlessly until the editor throws you out

gentle nebula
obtuse herald
#

yes

#

that's probably a better phrasing

pale flare
#

can anyone help me, im having an issue where whenever i take damage it breaks my health regen

gentle nebula
# obtuse herald yes

Is that the same with the function as a whole? it has to end before next frame?

obtuse herald
#

everything has

#

expect the functions with a small clock at the top right

#

like delay

gentle nebula
obtuse herald
#

you need to call your function on every tick

odd ember
#

pass by ref is the closest you get to being able to use pointer like structures

pale flare
#

can anyone just tell me what might be wrong this

gentle nebula
frank spear
gentle nebula
odd ember
gentle nebula
odd ember
obtuse herald
pale flare
#

i feel dumb, thank you

obtuse herald
#

you're welcome

pale flare
#

but it still breaks the regen

#

means im still missing something

obtuse herald
pale flare
#

whenever i shoot the mana regen works fine, but when i lose health both mana and health regen break

obtuse herald
pale flare
#

i did

gentle nebula
#

i wanted to have a drag function, that would be initiated when the mouse click on a certain actor. But i wanted to have all the logic inside of a function for the purpose of having "clear code".
I thought that if i could have a pointer of "mouse down" which is updated when mouse is up or down, i could control the loop which inside the function, i understand that it is a wrong thinking about how stuff work, but wonder how to do it alternatively, without having to much stuff in the same page
Maybe creating another event graph?

pale flare
#

i got it working

#

for some reason the mana regen got set to zero and was bein funky monkey

obtuse herald
pale flare
#

gotta say i love blueprint coding

gentle nebula
obtuse herald
obtuse herald
gentle nebula
#

In that case, would that make sense to have many event graphs?

obtuse herald
#

it's just personal preference I guess

#

doesn't really change anything regarding functionality

gentle nebula
#

Don't you get to the point where the event graph become too filled?

obtuse herald
#

But filled is different for every person I guess

sour goblet
#

I have a quick question, is there an easy way to keep a camera in the same spot when changing characters? I've tried storing and passing spring arm location and rotation but it just messes up all the camera movement.

gentle nebula
#

I have 2 eventgraphs on the same actor,
1 event graph have a set timer by event,
what would be the best way to bind an event to that timer at the second event graph ?(cannot simply copy past the custom event and duplicate it it seems)

obtuse herald
#

I already closed my project but there is a 'create event' node

gentle nebula
#

Since i created a second event graph, it is slate clean, so i have no access to all of the previous event graph events

#

Any way i can also have these event in the second event graph?

obtuse herald
#

If you want to override it, that is not possible

#

it's like having 2 functions with the same name

#

if you want to call the event you can still do that via the normal way

#

if you want that red square (delegate pin), use the 'Create Event' node

gentle nebula
#

If i have a timer event, i only have that event on one event graph, can't i use both event graphs with one timer?

obtuse herald
#

I have two event graphs

#

MyEvent is my main one

#

now I want to create a timer by event in my 2nd event graph

#

and that is how you would do it

gentle nebula
#

ok but now lets say you want to have "MyEvent" on the second event graph too

obtuse herald
gentle nebula
#

Better ask, can you connect two events to one timer?

obtuse herald
#

like have 2 'MyEvent' with different behaviour?

obtuse herald
#

you don't

#

create 2 timers

#

or create a event that calls both events

gentle nebula
obtuse herald
#

I'm heading to bed now tho

#

good luck

gentle nebula
lofty ravine
#

How can i get insert a file in a foler and it reads an array and is usuable in combo box

gentle nebula
#

Is there an equivalent to that in blueprint?
I want to run a function each time a certain variable is set