#blueprint

1 messages · Page 36 of 1

trim matrix
#

i often end up making these sort of "manager" bp actors, because idk where the code should otherwise go

lunar sleet
#

Then things like changing input mode and other parameters from main menu to a normal level

#

there’s only one GI but you can have multiple GMs

trim matrix
#

yep

lunar sleet
#

Remember that when you want to change world settings you need to override the GM and assign the new controllers, default chars etc

south dagger
#

Ill have to keep this in mind in the future

trim matrix
#

nah its not

#

u can use it whenever and wherever you want

south dagger
#

Thats one thing I havent played with yet. save states

trim matrix
#

what are some bp classes besides a gm or anything else world specific that would allow me to spawn an actor always upon begin play?

#

do i do that in the gi?

#

or go c++ 🙂

mental trellis
#

"world specific"?

radiant cape
#

I'm making a function that can adjust the player's health, is it better to make 2 functions 'AddHealth()' and 'RemoveHealth() or one function 'SetHealth()'?

gentle urchin
#

I do it in one

#

But its just a preference

#

But its not "set health"

#

Its still Add

past swan
#

Sup folks. Is that possible to make a reference to other actor, and get location of specific mesh (component) of those referenced actor? Currently i doesnt see any possibilities for this. Maybe im missing something?

leaden saffron
#

Not sure if this is the right place to ask but, anyone know why yesterday my mesh was working fine on character controller, but today its not there and i cant edit anymore?

#

kinda new to this

past swan
#

Thats the problem. I didnt see such possibilities.
To make it more clear. Let say i have 2 actors. Both contain trigger box and sphere mesh. Both of them have reference to each other. So trigger box A have a reference to trigger box B and B have reference for A.
On construction script i set sphere_position vector to its world location, enable "eye" to make it public.
Now when i step into trigger box A, i try to get something from my referenced trigger box B, but it doesnt seems to work.

barren dove
leaden saffron
barren dove
lofty rapids
leaden saffron
#

like i cant edit any of the stuff in viewport thats already there

lofty rapids
#

it's just the one bp ?

#

what version of ue ?

leaden saffron
lofty rapids
#

normally i have just seen to revert to a recently saved version, i think it's a bug i have seen it a few times on here

#

you probably have to remake the character, or if you can load a saved version

past swan
#

unfortunately that wasnt helpfull. I see how they trigger some custom events from trigger zone, but not get any data from referenced actors 😕

barren dove
#

the only time ive had stuff just vanish that I thought should be there, was when I was in a child actor and you can't see any of the parent actors blueprint

steady night
#

hey guys im using the Homing target in the projectile target

lunar sleet
steady night
#

is there any way to set the "root component" with a +Z offset ?

#

since now its aiming for the rott (always the feet) basicly

haughty latch
#

Anyone knows why the Location coming from a Hit Result (of a Sweep) is (0, 0, 0) despite the objects clearly hitting each other during the Sweep event? You can see my "Sweep" flag is enabled, "Simulation Generates Hit Events" is enabled, "Generate Overlap Events" is enabled and my "Collision Preset" is set to Default, but I tried multiple options and the same thing happens 😦

carmine palm
#

Just created a BP from a cube and never seen this happen. What the heck does this mean

lunar sleet
carmine palm
lunar sleet
steady night
#

@lunar sleet yeah obvviously im dumb 😛

lunar sleet
carmine palm
#

ah got it

lunar sleet
#

Which would give you default value (0,0,0)

carmine palm
#

lol

#

no like 0.0 size lmao

#

for width

haughty latch
# lunar sleet Clearly hitting each other based on what tho?

The node you see in my screenshot at the left with "Set World Location" takes Obj1 and moves it across the screen through Obj2 (which is huge), out the other side, with the "Sweep" flag enabled. For me, this should clearly be the definition of a Hit result from a Sweep. The Location of the Hit result should be the point where Obj1 first intersected Obj2 as it started going "through it" and out the other side. The movement itself happens, Obj1 gets to the other end of Obj2, just with no Hit Location 😦

lunar sleet
#

Try using an actual hit or overlap event

#

Just because 2 objects move through or in close proximity to each other, it doesn’t mean a collision has occurred

#

It’s important to understand early on that what you know makes sense IRL does not necessarily mean it works the same way inside the engine, this reality has different rules 😀

#

“Abandon all hope, ye who enter here” should be on the splash screen 🙂

haughty latch
#

Obj1 is a tiny object like a satellite, while Obj2 is a planet. The "Set World Location" takes the satellite from "close" to the planet's surface and moves it right through the center of the planet. I'm not sure what could go wrong in this scenario.

lunar sleet
#

In UE, for 2 objects to register a collision, you need both (not just 1) to be set to overlap OR (not either) block each other

hollow cove
#

is there a way to profile a specific actors gpu usage in real time? it'd be nice to be able just throw a number in the corner

lunar sleet
#

Otherwise moving things through each other does nothing at all^

lunar sleet
#

There’s events for this, onBeginOverlap and onHit

#

For example

hollow cove
haughty latch
#

hmm... now I begin to understand what I'm assuming wrong, but I still don't understand what you mean by "both be set to overlap"... how can I "set" them to overlap? Do you mean they should be overlapped and not just "move through during 1 frame" ?!?!

past swan
lunar sleet
haughty latch
#

right now they're Default, but I also tried all variations with Overlap

#

any suggestion what exactly I should try?

lunar sleet
#

Start by setting both to OverlapAll for example, then use the onBeginOverlap event and print something

#

See if prints when they overlap

#

If it does, it means collision was detected successfully

radiant cape
# gentle urchin Its still Add

i'm just wondering because you can for example feed a negative number into an add node and it will subtract it... so maybe they can be combined if you wanted

lunar sleet
#

Keep in mind overlap all means nothing will block, so things might start falling through them ^

heavy lion
#

Anyone know how to control Master Volume in BP?
I am able to adjust the volume for effects, voice and music, just not overall volume.

carmine palm
#

When you "open level", is there stuff you NEED to do? IE: BP things you need to add after open level to clear cache, etc (single player game)

carmine palm
#

So its all automated

heavy lion
#

@lunar sleet Ahh good thinkin!

carmine palm
#

Word

#

No clearing references?

lunar sleet
#

Engine handles that stuff

carmine palm
#

Perfect

#

Ty

#

Makes that easier

lunar sleet
carmine palm
#

is there an open level (not doing multiplayer or co-op atm) but open-level where you select actors that you want to open it for

lunar sleet
#

Wdym

carmine palm
#

One I see right now doesn't take any input for actors

lunar sleet
#

You can’t just open it for some actors, open level means change the level

carmine palm
#

ah

#

So if you want to do zoned instances. IE: a dungeon you enter. Is that not another level? or is that something else

#

So if you have co-op you can have one person enter but another not

#

local co-op*

#

keep forgetting to say that

lunar sleet
#

#multiplayer is a diff beast and one you should prly not tackle on your first game

#

Speaking from experience 😅

carmine palm
#

I work on an MMO (Swgemu) and have worked on MMO's in unity. Just not a single player co-op or built one myself from ground up lol

#

But word. Weird uh... discord question system here 😛

#

since this is multiplayer and BP question ;P

lunar sleet
carmine palm
#

o lordt

gentle urchin
#

negative numbers

carmine palm
#

I'll do single player rpg then

#

lmao

#

for now

haughty latch
# lunar sleet Start by setting both to OverlapAll for example, then use the onBeginOverlap eve...

I think it's a UE bug, as I just found this article from another guy having the same problem and he is using the Overlap events properly: https://forums.unrealengine.com/t/sweep-results-for-overlap-collision-not-populated/431170

carmine palm
#

Maybe add local co-op later

lunar sleet
carmine palm
#

Have to set object to allow the overlap event

haughty latch
#

I've set both objects intersecting each other (aka overlapping) and the Hit is still zero 😦

carmine palm
haughty latch
#

it's enabled!

lunar sleet
#

If you want hit, use Block

#

I only said try overlap first for testing purposes

carmine palm
#

yea hit is a diff event

#

I use print statements to validate overlap before doing anything lol

lunar sleet
#

And don’t rely on forum posts, some are just people that gave up too early and chucked it to engine being faulty

haughty latch
#

Sorry, my bad for the terminology

#

I've used BlockAll and no Hits

lunar sleet
#

Show your collision settings for both actors

haughty latch
#

both identical

lunar sleet
#

Ok, now go to your satellite bp and use the event hit

#

Then break hit result, drag from other actor and plug that into a print string

dusk folio
#

Hey \o , How i Implement a interface in Data Asset? Let me explain

In C++ , i have an simple Interface, and a Implementation

#

And my Data Asset has a Variable that is This Interface , But, if i Create a DataAsset
I Cant Implement, How i do this?

#

i have a Blueprint from the C++ class

#

ops wrong Image

haughty latch
lunar sleet
#

I saw you mentioning something about it but I hoped you’re not trying to do this in editor time

haughty latch
#

Ahh ok, so that might explain it

lunar sleet
#

Yeah

haughty latch
#

yep, it's in Editor time

lunar sleet
#

I mean there might be ways to do some form of collision check on construct but that’s more advanced

haughty latch
#

then... any idea how I can make my Satellite "snap" to the surface of my Planet in the Construction Script, besides this failed attempt I had with the Hits?!?!

lunar sleet
#

🤔 not sure, you’d basically be making an editor utility/tooling

mental trellis
#

Is it a crashed satellite?

lunar sleet
#

I mean if you select a mesh and hit End it usually gets plopped on the landscape but it’s not always super precise

haughty latch
#

cause it's not as simple as moving it at the known distance = the radius, since my planet's surface is not uniform and I want to emulate a somewhat realistic collision snap which is not a perfect sphere.

#

kinda like a crashed satellite yeah

slow flint
#

Hello i was wondering how do i get the player ping to the server ? i want to have a widget where the player can see how much ping he has .

lunar sleet
haughty latch
#

ah, hitting End won't do, since this happens after a complex rotation (which works already), so it should still be done in an automatic way, it's not a 1-time manual click

mental trellis
lunar sleet
#

You can trace on construct ?

#

Neat

mental trellis
#

Why not?

lunar sleet
#

Idk never tried it 😀

mental trellis
#

You can even spawn actors on construct if they're set to allow it.

haughty latch
#

well.. I was expecting normal collision Hits to work also, but apparently it doesn't

lunar sleet
#

The actor spawn node is disabled there iirc

mental trellis
#

From c++ too I assume (in OnConstruct)

lunar sleet
#

I don’t think it works in bp

mental trellis
#

Shrug

#

I just know there's a setting to allow an actor to be spawned in CS.

#

You can just make a function that spawns an actor and run that function.

haughty latch
#

@mental trellis: any tip on what BP node to use for that trace you mentioned?

#

cause there are many traces afaik

mental trellis
#

It should just be a trace node

#

Idk, I don't use BP.

#

Or traces. Or games.

haughty latch
#

I guess for what I need, a Line trace would be better suited than a Sphere trace, right?

#

for a small satellite against a planet

mental trellis
#

Yes.

#

That'll fine the surface of the planet.

#

Your satellite centre will probalby be at the centre of the model, so you should add the radius of the satellite to the position.

haughty latch
#

of course

mental trellis
#

(in the direction of the impact point from the centre)

haughty latch
#

yep

#

Thanks a lot, both of you!!! Back to the drawing board 🙂 I'll keep u posted in case I need some advice ❤️

mental trellis
#

Good luck.

gusty shuttle
#

Have you ever had an issue where doing a camera blend, the rotation back to player camera is janky and studdery?
When going back to my player camera, the rotation is really choppy. Any fixes?

#

I'm also using the Advanced Locomotion System from the marketplace

haughty latch
#

@lunar sleet and @mental trellis Haha, I managed to solve it differently, by using a Line Trace Component... strangely this works

#

and I'm still in the Construction Script

#

not using any events

mental trellis
#

A line trace.... component?

haughty latch
#

yep

mental trellis
#

Why would you use an event if you didn't weren't using that component?

haughty latch
#

Target = planet

mental trellis
#

Ah.

lunar sleet
#

I didn’t know that was a thing

mental trellis
#

It's not a component.

#

It's line trace against a component.

lunar sleet
#

It’s line trace to component

mental trellis
#

Yes.

lunar sleet
#

I c

#

Couldn’t be bothered to add the To

haughty latch
#

yep, but that's what the BP node is called 😄

lunar sleet
#

Ik I meant Epic

haughty latch
#

strange that the Hit result of this Line Trace works, but the Hit result of the Set World Location (with Sweep enabled) is null :/

lunar sleet
mental trellis
#

That's why it's a pointer.

haughty latch
#

seems strange if it is, cause the Set World Location node itself works in the CS (editor), outside of Runtime, so...

#

I'm using the BP, not the C++ of the Set World Location

#

and the BP node looks the same in both cases

mental trellis
#

Eh.

haughty latch
#

I doubt it's a pointer, it should be dereferenced already

#

just like for Line Trace

winter minnow
#

hello (idk if its good channel for it) dont know how I could do camera transmission like in this game https://youtu.be/_xXD_9vS56E?t=54 (0:54-0:55) like how i can achieve something similiar? In my game player only moves on x and z axis. I thought about trigger and then something like second camera is on with this move after that I lock movement to y and z so nothing really changes in movement. I dont know if it will work, or maybe there is better way? Even something like telling me what to look for in google would rly help cuz I have no more ideas.

faint pasture
woven turret
#

I'm trying to hook up a Material Parameter Collection to our Landscape material instance, which I then need to modify via construction script in an Actor present in the level, and get live in-editor updates on them as I change the values. I do this with some other systems for post process updates as well, I tested it on it's own and it actually works fine for the landscape material as well.

The issue is that the landscape material instance doesn't update live like you would expect it to.
For example I have a Dirt layer with several parameters that come from a Material Parameter Collection - when I modify the variables in the Actor that are connected to the Material Parameter Collection the changes don't show up until I actually open up the material instance itself, and only then it refreshes and shows the changes.
The same applies to if I modify the values directly in the Material Parameter Collection for example.
I can't tell if this is just a visual thing or if there is a different way to go about this, as I need to be able to have these apply automatically.

The image shows the Blueprint method I use to update the scalar and vector parameters.
The array variables hooked into the array corresponds 1:1 with specific parameters found in the Material Parameter Collection, and the For Each Loop is used to grab them automatically rather than me having to have a separate variable for each parameter.

faint pasture
#

The characters plane of movement is not simple. It's probably defined by a spline in the world.

trim matrix
#

Would it be possibly to efficiently get all components from a certain class within the level? What I'm trying to achieve is to have some kind of way of giving some special data and identifiers to certain actors. Something along the lines of tags, but that would be more cleaner. The most ideal choice for me would be to create a component in which there would be stored some params. Then I'd want my "game manager" blueprint class to get all of those special components and run some events on them based on their individual data stored in their individual variables.

faint pasture
#

That mechanic honestly looks like way more trouble than it's worth unless you think of some really compelling reason to have it. It'd have consequences on your AI pathfinding as well.

faint pasture
#

Does manager talk to just one component at a time or broadcast to all of them?

trim matrix
#

btw is it even a good idea to have something like that?

#

I mean a game manager actor thing

faint pasture
#

You need to tell more about what you're actually trying to do

#

Yes it's fine, depending

trim matrix
#

Okay, so the game manager is going to be reading files from the disk and based on the data contained within those files it is supposed to "talk" with those special components. Each component should have an ID that is associated with the data pulled from the files, and with the data received from the files, the components should do some logic. I have all the data processing setup, just the communication is the problem.

faint pasture
#

What is the actual game mechanic. When does it talk, does it talk to all of them all the time?

trim matrix
#

it can do that often, yeah

faint pasture
#

just use a dispatcher

#

component begin play -> bind to dispatcher

#

manager wants to say something -> trigger dispatcher

trim matrix
#

i can't do that

faint pasture
#

I use a worldsubsystem but same idea

#

why not?

trim matrix
#

each of them should have their own ID

faint pasture
#

It'd be a lot easier to help if you said what you're actually trying to do here instead of being all nebulous about it.

#

Just register them with the manager then

trim matrix
#

and when the data will be read from the file, it should do some stuff on that specific comp bound by the ID with the data

faint pasture
#

Component begin play -> register self
Component end play -> deregister self

Manager does whatever it wants

trim matrix
#

and then do the registering by calling some function on it?

faint pasture
#

The correct™️ way would be to use a subsystem if you want to go C++ with it

trim matrix
#

i want to go BPs only with it

#

also could i use like the soft references or whatever

#

to make this less expensive

#

?

#

idk how expensive is storing a ref really

#

@faint pasture

#

if the reference is to an actor, i'd imagine it not being overly expensive but what do i know 🙃

trim matrix
faint pasture
#

I don't see how a soft ref would come into play here

#

hard ref from manager to components is fine as they'd be loaded anyway

trim matrix
#

yeah, i guess i was just missing the point of them then... kinda

trim matrix
#

around

faint pasture
#

doesn't matter, the manager should be loaded anyway right?

trim matrix
#

yes

#

it's an actor within the level

faint pasture
#

you just don't want to hard ref stuff that's not loaded all the time unless you want your entire game to load as soon as it starts up

trim matrix
#

@faint pasture would it be fine if i assigned the references at event construct?

#

or is that not possible?

faint pasture
#

Why do it at construct?

trim matrix
#

good question

faint pasture
#

if begin play works then just use it

trim matrix
#
  1. Code being "cleaner", if the game manager is something ever present within the level (doesn't get spawned), it could be run in the construct.
  2. I have quite a few things spawned at begin play, so in my head if i did the get actor of class beforehand it would need to "look" through less stuff to access the game manager (or vice-versa, if i tried accessing the components from the game manager)
#

@faint pasture feel free to 💩 on me

faint pasture
#

That's what's so great about subsystems, they're always there, always just 1 of them, and globally gettable with just Get Subsystem

trim matrix
#

not a bp thing 🙂

lapis imp
#

Question with a video: When ADS is activated, a "set view target with blend" node moves player to Camera on Gun.

An issue I'm having now is the pitch won't work during ADS: https://streamable.com/dtmgon

Video shows the issue (during second half while ADSing). Let me know if you guys have encountered/solved this before and what you suggest for this issue

trim matrix
#

@faint pasture could the engine create a sort of crash loop (lol) if i tried assigning the reference within the event construct and doing something with it, making me unable to open the project anymore?

#

i'm not that type of guy with source control

#

oh wait

#

i'm might be a buffoon, but the actor comp bp class doesn't seem to have the event construct anyways

#

so i just gotta use the game manager's cs i guess

#

this doesn't seem like the most efficient of things 🙂

#

ok, i'm gonna do it with begin play on the components

unique cloud
#

Any reason why do any damage appear like that inside the Function Library?

trim matrix
#

wth is do any damage?

#

doesn't seem like a built-in node

unique cloud
#

You know what, I answered my own question

#

Legit failed on that one

versed sun
faint pasture
trim matrix
lunar sleet
trim matrix
faint pasture
#

I would have the component tell the manager when they begin and end play

#

otherwise you spawn one at runtime and the manager has no idea about it

trim matrix
#

question, is it possible to make bp function automatically pass (and require) world context (self)?

#

outside of a bp lib

#

(BPs only)

leaden raven
#

how would one be able to predict the value of something if 10 of the same item were to be bought at once
im trying to set up a buy 1x, 10x, 100x, and max for my idle clicker game, each time something is bought its price is increased by a set percent, so say the basic item cost 5, it would increase by 7%

faint pasture
#

simplest way would be a loop unless you want to do the math

#

what's the max buy count?

#

we talking 100 or 1,000,000,000?

leaden raven
#

the max would be the max that you can buy with the amount of money you have

trim matrix
#

big numba

#

for loop would suck for this

#

do math

faint pasture
#

A is your base price, R is your ratio, N is how many

#

r would be 1.07 for you
You'll have to do algebra to work backwards from price to how many you can buy

trim matrix
#

Hi does anyone have some pointers on a good character select method? the current default charcter when you press play is the purple monster, and im wanting it to set the next character when pressed play as the blue one 🙂

lofty rapids
neon burrow
#

it doesn't do anything.
it should be true when health reaches 0 but it keeps going to -1

lofty rapids
#

maybe <= @neon burrow

trim matrix
#

it's a bad practice to use == for things like this

trim matrix
trim matrix
# trim matrix sorry i dont know what that means

save what you selected in something called a game instance. It's a special type of class that doesn't have its variables reset between levels. Then when the level where your actual game is loads, grab the selection value from the game instance and based on it use the correct character

neon burrow
lofty rapids
dire frost
neon burrow
#

when i have it 0.5 then its fine and stops at 0
but when its 0.1 it goes to -1

#

bit confused

trim matrix
trim matrix
dire frost
lofty rapids
#

or even clamp it

lofty rapids
#

i don't see why 0.1 would go -1 all of a sudden tho

neon burrow
#

when i use 0.1 it brakes

trim matrix
#

print 'em values

neon burrow
#

yeah testing rn

trim matrix
dire frost
#

Did you try pouring some holy water on your pc?

neon burrow
faint pasture
#

you're dead if your health is 0 or less

neon burrow
trim matrix
lofty rapids
neon burrow
#

it goes to minus when using 0.1

trim matrix
#

shatted itself

lofty rapids
#

well what are you using the branch for ?

#

you can always clamp it as well

neon burrow
#

to see if health is 0

trim matrix
trim matrix
trim matrix
#

there's no way it won't work then

trim matrix
#

what is suppoused to happen then?

lofty rapids
#

that branch would work, but probably not effecting the display

neon burrow
#

when i reach 0 health it should no longer subtract the health

trim matrix
#

clamp it

#

no <= or anything

#

just clamp it

#

or do max(0, health)

#

if u're feeling a bit special

lofty rapids
lofty rapids
neon burrow
#

but the thing is it doesn't make sense why 0.5 works but 0.1 not

trim matrix
#

its quite obviouz

#

just do a clamp/max(0, health)

neon burrow
#

also while we are talking about this,
I want a number 1-100 so an integer ?
but I cant use integer in a widget progress bar ( it only accepts float )

trim matrix
#

u'd have to map it to a range

lofty rapids
#

current / max

neon burrow
#

not sure how to do that

trim matrix
#

put for out range B 1.0, and for in range B ur max health

lofty rapids
#

you can use 100 as max, and just change the current, it's current / max

#

so whateverYouWant / 100, will give you the percent

neon burrow
#

so with this i can use Float Variable?

#

ok let me try,

dire frost
neon burrow
dire frost
#

If it doesn't effect gameplay I wouldn't worry about it tbh

neon burrow
#

i mean it could in some way, but rn i am just testing ( if i wanted to use it for gameplay, then that would be quite annoying )

dire frost
#

Sure

#

Btw you could find references of the set node

#

Maybe you have something somewhere setting your health to -1. Idk from what we know it could be a ghost changing up your variables to fuck with ya

neon burrow
#

no it's just that i made it specifically for this.

neon burrow
dire frost
#

Add a breakpoint just before you set the health

#

And hover over the health variable to see it's value

#

Then step (F10) then hover again to see the new value

#

Just do that for all spots where health is being set and you should find where the issue is

#

Anyway gn!

neon burrow
#

Gn :)

trim matrix
dawn gazelle
#

You can use the map range clamped if you want to for the visual display, but really, it's just health/maxhealth will give you the 0.0 to 1.0 range you would need for a progress bar.

lofty rapids
quaint ravine
#

Does anyone know what the deprecated Bind Analog Event function has been replaced by?

flat coral
#

I gotta do some Real Math. Is there an actual For loop in Unreal? Like, NOT a "for-each"?

lofty rapids
#

yep

flat coral
#

Alternatively, is there a way to make an array N long?

#

Oh sick there is!

dawn gazelle
#

Resize

flat coral
#

Haha this is gonna be so complicated I'm an idiot for doing this in BP

#

But I dont have VS installed on my new machine and I'll be damned if I'm doing that crap today

quaint ravine
flat coral
#

Okay if you've got a vector in LOCAL space, and a transform in world space, how would you add that vector to that transform?

trim matrix
#

How to make a function not require an array param (make an optional argument)?

mental trellis
#

Make the parameter a pointer.

#

Oh. Blueprint.

trim matrix
#

yepp

mental trellis
#

Make 2 functions

mental trellis
#

Have one, without the array, call the second one, with the array, using some default empty array.

versed sun
#

Or just pass the Array ref in , but make a Local array inside the function and play with that

trim matrix
versed sun
#

I think a functions Array is greyed out and True on Pass-by Ref

mental trellis
#

BPs do dodgy things with references.

versed sun
#

took me a bit to understand the difference between a Copy and a Ref in arrays

trim matrix
#

never heard the word "copy" before you understood the diff?

versed sun
#

Lika dis 🤌

trim matrix
#

i now

trim matrix
#

i'll be shocked if that's actually true

versed sun
#

was a theory

#

because you dont want to modify the array you are feeding into the Function , right ? you just need to filter it or something ?

trim matrix
#

i just want to either pass it or not pass it

#

There's another array that that the function collects by itself

#

and the passed one should be added onto that one

#

(if it exists ofc)

#

No wait...

#

I am passing it by the reference

trim matrix
versed sun
#

i think thats always greyed and true, no choice

trim matrix
versed sun
#

why do you need a Array copy?

trim matrix
#

i dont need a copy

versed sun
#

ohhhh, misread question

trim matrix
#

yeah, i misread stuff often too... too often even dietered

lofty rapids
#

make an input boolean for use it or not

versed sun
#

or ... a select node ?

trim matrix
#

i can't just not pass it into the function call

versed sun
#

huh? you need to decide if you want to use an array or not, but you dont want to know what the array is ?

#

I'm confused

trim matrix
#

i can't not pass it

versed sun
#

you mean you have to pass it ?

trim matrix
#

yea

#

otherwise it gives an error

versed sun
#

ohhhhhhhhhhh

trim matrix
#

oh yea

versed sun
#

make array

#

and leave it empty

trim matrix
#

there's no way to make it optional?

lofty rapids
#

make a boolean, and make array

versed sun
#

make a 2nd version of the function

lofty rapids
#

set the input boolean to use/not use the array

trim matrix
versed sun
trim matrix
#

I dont wanna dup it tho

versed sun
#

call that one Choose Random Recording (No array)

trim matrix
#

or create another func

versed sun
#

and omit the array as an input

trim matrix
#

that calls the old func with empty array

lofty rapids
#

and just make array and pass in an empty array

#

then you can just use it or not

versed sun
#

Mocking it up, sec

trim matrix
#

without passing the array

lofty rapids
#

no, you pass a make array

#

just don't use it

#

with the boolean

trim matrix
#

i dont want to

lofty rapids
#

unfortunately like the error says you got to pass something

versed sun
versed sun
#

i disabled the array

trim matrix
#

yeh that's what i thought of doing but

#

at this point i'd rather use a make array

dull kraken
#

Hi, can someone help me? I've got a simple request but can't seem to get it working. I have a vehicle bp and I have a keybind, when I press the key i want the vehicle to spawn as many times as i press it. I am using an actor placed in the world and want the vehicle to spawn there.

lofty rapids
#

have you got it to spawn at all ? are you going to be driving it ?

#

you should be able to spawn actor when you press the key, probably with a do once

dull kraken
#

I dont want to drive it, its basically like this in the video, he is using a key and when pressed it just spawns the actor / vehicle https://youtu.be/Yrf4d5IGpKk?si=8RsipkMF6s_R0uNY&t=5

➤ PATREON - https://www.patreon.com/REEANIMATION
➤ TWITTER - https://twitter.com/Ronnie_Ree
➤ DISCORD - https://discord.gg/cmsBqGtnqP
➤ BUY ME A CUP OF COFFEE and some Popcorn 🙂
https://ko-fi.com/reeanimationandgaming

➤The Adventures of Gorm - Devlog #1 (Making an Action Sidescroller Rogue-Lite)
https://youtu.be/naX40P726Js

➤How To Animate Lik...

▶ Play video
lofty rapids
dull kraken
#

yes I do

lofty rapids
#

it works when you press the key ?

#

you can test with a print string

dull kraken
#

this is the bp, very messy and when i press it does say its pressed and also on the right it shows it being spawned but i cant see it.

thin panther
#

why are you adding a child actor component

#

but never doing anything with it

#

which i mean is probably the best way to use them considering you shouldn't use them :P

dull kraken
#

Im not even sure haha, I have the spawn actor in the world where i want the bp to spawn, I just dont know how to go about doing that.

#

yes its in the vehicle bp

lunar sleet
dull kraken
#

I changed the collision type and got a surprise when 20+ actors spawned at the same time hahaha. Thankk you!

#

is there a way to spawn it on the actor that i added in the world?

lunar sleet
#

if you don't want to attach it, you can also spawn it at that actor's location if you've turned off collisions between each other

#

depends on what you're trying to do

maiden ginkgo
#

can someone help me recreate the free flow system from arkham knight pls?

#

cause there isnt really a tutorial and its kinda hard to do on your own

dull kraken
lunar sleet
#

I mean idk if you'll need a socket or something but the node is attach actor to actor

dull kraken
#

I got that node but i cant get the actors target, everytime i drag the actor into the bp i get this component

dull kraken
#

I add a blueprint then click actor. It should be then

lunar sleet
#

you need a reference to it

#

nvm, so just right click the graph, find attach actor to actor

#

then you can plug in self as the parent and drag from that spawn actor's return value (or promote it to a variable) and plug that into the target

inner ravine
#

Hi would anyone know or have good tutorials on youtube about when your inside a box collsion and press a key it activates something (in my case i want to activate a niagara system for 10 seconds only once the key is pressed then it switches off )

dull kraken
lunar sleet
lunar sleet
#

You can use spawn system at location and then use Deactivate after a 10s delay

uncut elk
#

doing some troubleshooting and trying to make sure my understanding is correct ,
Do widget blueprints still fire on Event Construction despite being collapsed?

frosty heron
#

Logic run as normal it doesn't care if you collapse it or change its visibility

uncut elk
frosty heron
#

It just fires when you do create widget

foggy topaz
#

I have a Blueprint project. Whenever I make a C++ script and try to build, the IDE i use can't compile. I have tried Visual Studio and Rider, and both have been problematic.

How do you get IDE's working with Unreal??

#

Been troubleshooting all week, it's pretty frustrating

lunar sleet
dense badger
#

Is there a way to stop BP from opening a new duplicate tab every time I double click a function? After 30 mins of working I always end up with like 20 tabs and have to close them all.

dense badger
lunar sleet
#

Just go back to the tab

dense badger
dense badger
lunar sleet
dense badger
lunar sleet
#

Idk, maybe there’s a setting in editor settings for you tho

foggy escarp
dense badger
foggy escarp
#

yep

#

this is the search feature in BP Assist

#

it searches everything open

tepid lily
#

BeyonderBeyonder"{P,y6hpg5o76

dense badger
radiant cape
#

This might sound noobie, but why do I never see rep notify used in single player systems?

#

It can run a function when a variable is changed which seems helpful no?

dawn gazelle
trim matrix
#

I've run into quite the roadbloack here. Would it be possible to stop execution in a graph althogether?

runic pagoda
#

is there a relatively simple setup for making the gun_muzzle of a weapon always point at the place where the crosshair is? As this depends to a degree on depth I guess it involves a line trace of some sort (?)

trim matrix
#

Should I replace all of the delays with timers?

#

Or is there an another way?

trim matrix
runic pagoda
trim matrix
#

1 should be your gun's muzzle

#

2 the crosshair's location

#

it will return the "look at" rotation from 1 to 2

runic pagoda
trim matrix
#

ah i see

#

Just get the camera's forward vector * 1000 + its world location for B of find look at rot

#

and for A do the gun's muzzle world loc

#

If you're unhappy with the rotation, increase the forward vectors scale

#

until it suits you

trim matrix
runic pagoda
#

I always get lost with the object definitions. What works in one blueprint doesn't in another lol. What should I be using here?

trim matrix
#

but there's an another way you could do this

#

without casting

#

with GetPlayerCameraManager

runic pagoda
#

oh is there? maybe that will work. This current version is shooting off in a totally different direction

runic pagoda
trim matrix
#

oh it's mp

#

you'd have to do that locally

burnt obsidian
#

I have a simple blueprint that adds static mesh components based on an index number I give and puts them next to eachother. These meshes gets their lights baked but now they all use the same lightmap. Is there a way to make this "unique" asin that they each check their own lightning situation rather then copying the first one?

runic pagoda
honest imp
#

Greetings,
Probably a question that has been asked and answered a million times...
If I am doing a simple platformer(PaperZD) for PC/Console will I ever need to be worried about performance if I opt to use Blueprints?
In essence should I use C++ or will blueprints be OK for this case?

jade lintel
#

blueprints should be ok

#

but still use a c++ base class for underlying logic

#

matter of preference totally

#

you'll be fine with bps for a simple platformer

honest imp
jade lintel
#

yeah then go for bps

honest imp
#

👍 Thanks that's what I needed to know.

vast stream
#

How can I convert UTC time to computer local time? I tried this setup but it returns invalid date (01/01/0001 - 00:00:00).

lilac storm
#

Hey devs , does unreal have ability to change render length of the camera ? In unity there was some settings so too far objects doesn't got rendered , and it optimizes game a bit

jade lintel
#

render distance?

dawn gazelle
vast stream
dawn gazelle
# vast stream How to do in C++?
Local = UtcTimeStamp + (FDateTime::Now() - FDateTime::UtcNow());

Probably could do this within blueprints too, but the + and - nodes you have to work with don't like the date time connections.

vast stream
dawn gazelle
#

No. It's just whatever UTC time you have that you want to convert to local.

vast stream
#

Oh you mean some date time UTC that was saved to a variable.

steady night
#

hm do anyone se anything wrong here ?

#

the "self" exists*

dawn gazelle
vast stream
#

Thank you so much @dawn gazelle. Appreciate the help! 🙂

dawn gazelle
# steady night

You're pulling different random values with each pull from the rotate vector node....

steady night
#

wdym

dawn gazelle
#

I think it ends up getting called twice, once for the start and once for the end, but still likely not the desired result.

steady night
#

oh true the start point is weird also

dawn gazelle
steady night
#

i dont get it it spawns at 0,0,0 map position :/

#

it is hitting the landscape tho, and im printing the impact point

trim matrix
steady night
#

yeah i dont get whats going on .O

#

the weird thing is

#

im using this on another actor and it works flawlessly

trim matrix
#

If it prints something other than 0,0,0 then it means it must be doing the hit there

steady night
#

well im not even seeing the line trace there

#

always at the same spot .o

#

ehhhhh

#

even this spawns it at the same location

#

wtf O.o

gentle urchin
#

Spawns != trace

steady night
#

wdym

#

not equal ?

#

if it dosent hit u mean ?

#

it dose hit,

#

ok yeah so its the origin thats the problem

steady night
#

i dont fucking get it O.o

red berry
#

Is there a way to have an async delay? I want to have my code continue on, but also run some additional code seconds later
AsyncLoadAsset is perfect for this, but I don't need to load an asset. I need an async delay node, with 2 white output pins

winter minnow
toxic drift
#

I'm trying to make a "shadow" underneath my character for a platformer. I want to make it so I spawn a decal underneath my character (of a simple black box), but it's just a fixed location. How would I make it so it would go a maximum of X units and if it comes into contact with a surface before the max distance, it stops and displays there?

faint forge
#

Workflow question:
In my BP Character I need to access some variable from my GameMode, and also in other blueprints. So I created a Struct and Data Table to select from there my Game Mode and other general use BPs. What do you think, guys? is it dangerous or not good approach in some way?

toxic drift
#

yep, JUST found that. Was using "draw line" which is a "painting" function. (Whatever that is)

toxic drift
dreamy mountain
#

Hey so I'm trying to make it so that when you're in the collision of a certain object, it sets a UI thing to appear, but it isn't working.

#

Pumpkin Collectible is an Actor Object Reference

faint pasture
manic vessel
#

Trying to use a enum for weapon switching and controlling the animation layer , But Only The shotgun layer seems to get set and all others seem to stay on Unarmed. and going back can set the playet to T pose , Is there a better was to do this

clear sierra
modern radish
#

Anyone can think of a reason why when I package the game I can't click on the Start button?, nothing happens

#

is it perhaps something related to the window not capturing mouse input?

versed sun
#

I think you have to include what maps you want to package

#

in project settings

modern radish
#

Nice, good catch! Let me try that

#

Thanks @versed sun

#

that worked, but now the game map doesn't.. I'm getting something like
LogScript: Warning: Accessed None trying to read property LocalGameInstance

#

would this cause issues in a build?

trim matrix
#

DoOnces would make it all look extremely messy with the exec lines

versed sun
frosty heron
#

Just use timer

#

You can clear and invalidate

trim matrix
#

And does a timer get reset if the settimer node is called again?

frosty heron
#

Sure

#

You can create comp if u want to create instances of the timer

trim matrix
frosty heron
#

Or uobject

frosty heron
#

U create an instance (component or object) which create the timer

#

When u call the function again it will create another timer instead resetting the previous one

clear sierra
trim matrix
#

Can there be only 1 timer per event?

clear sierra
# trim matrix I mean, why would it get reset tho?

you need to use time TimerHandle, to design it.
Use TimerHandle to allow only one instance per event and also TimerHandle to cancel,

for it should set another timer that is a very good question ? i think it will set another time, unless you use TimerHandle to cancel the first one.

trim matrix
clear sierra
neon burrow
neon burrow
trim matrix
neon burrow
neon burrow
trim matrix
#

just search up the types in google

modern radish
#

I have this on my GameInstance BP.. Simple command line stuff.. runs at Event Init.. worked perfectly in Editor, but not in a packaged Build.. am I missing something?

#

Ah, I used Execute Console Command instead and it worked

wild crater
#

So I want to spawn an actor from an Editor Utility Widget, but it fails to spawn one. Is it possible to do this?

frosty heron
#

Deffinitly, seen ppl doing it

#

Infanct Matthew video about editor utility widget spawn an actor in the world iirc

wild crater
#

Ok I'll have a look at it!

manic vessel
#

Why does this First Picture work , But the seconds method ONLY key press 4 works ?

versed sun
#

the first pic isnt hooked up to the Link nodes , false positive that it works ?

manic vessel
#

I know Its just for deom

#

demo

versed sun
#

then hmmm

manic vessel
#

Im sure second pic should be working,

versed sun
#

does pic 1 and 2 exist at the same time ?
the first pic might be consuming the input

manic vessel
#

no

versed sun
#

print out the Enum to String after the Link node

manic vessel
#

I have and the enum is changing . But the animation only changes on key 4. , but in the first pic they all work

#

I just removed the select and re added it and now it seem to be working. ffs

versed sun
#

ahh , just had to kick it

manic vessel
#

These are the worst kind of issues spending hours trying to fix something that already worked , just because the editor wanted to be finicky

versed sun
#

at least your bug either works or doesn't 100%
Im searching for a bug that works 99% of the time

tight pollen
#

can i Save Input Action References in SaveGameObject?

young meteor
#

Hey folks

I'm trying to understand "order of operations" in order to know if I'm draining performance without needing to.

In the screenshot the bottom Boolean is based on a DOT Product and is not relevant in most cases.
Will the stuff coming in on the bottom left be excecuted/calculated if the top Boolean is false? (the "Only Front Shots Crit" one).

versed sun
#

i think all pins in a select node get calculated, no matter the Index

clear sierra
#

yes

#

That is true

versed sun
#

seems silly to me

young meteor
#

hmm, so I need to find another way around it is what you are saying.

#

And thank you for clarifying by the way 😄

clear sierra
#

This usually as 0 impact if all of the data is already calculated, like multiple string with values,
but if you going to calculate, its bad

versed sun
#

might have to branch it

young meteor
#

So in this case it would not calculate selects if "Only Front Shots Crit" is false?

clear sierra
#

no this is same thing

versed sun
#

can remove that Select

young meteor
#

So basically "Selects" are calculated no matter what? Even if their output is not used?

versed sun
#

its because of the Diamond (Ref) pin

#

and yes

young meteor
#

So a Branch tree is actually better in this case 😄

#

to avoid Selects

versed sun
#

yes , or a Switch if its not a Bool

young meteor
versed sun
#

can you plug it in and it stay non-diamond ?

clear sierra
#

This will not calculate, every node

versed sun
#

hmm, might work

young meteor
#

Yes I can

versed sun
#

nice ,and it works?>

young meteor
#

Haven't run it for anything. This is a sample setup.

#

Just to not drag you through my spagetti 😄

#

I can compile it. All I know so far

clear sierra
#

Now, how would you even check if it is referencing all nodes or not ?

young meteor
#

Set up a massive calculation (much more than DOT Product) and see if it hits performance. 😄

clear sierra
#

You can create a UObject Class which has a float, now try to read the float value form null object ref, now you will test the oposite boolean, eg: if you put the null object on A , you should only try to get B, if it did not reference A, it will give no errors or warning, But if it did reference A , you will get error in your message log.

versed sun
#

hmm, i think it still calculated both pins

young meteor
#

Hmm, guess that is for Ryck0Shae. Too complicated for me.

clear sierra
#

hmm, which means select nodes are trash

versed sun
#

made 2 function, each one print that it is running

clear sierra
#

maybe because these are pure functions

versed sun
clear sierra
#

okay, maybe Select wants to have the return data ready, which means each select is calling Node A, Node B, before doing the boolean check,

versed sun
#

this one only calculates once or the other

clear sierra
#

Conclusion : Select Trash for Calculation, but if data is already present, then it does not matter and will behave like a simple branch

versed sun
#

but as always , use whatever is right for your needs

young meteor
#

Is it actually expensive to do the DOT Product then? Like in the screenshot

#

I have many towers firing often.

clear sierra
#

this one is not that bad, Because you are using it a value.
Its expensive to do in BP little bit then C++

young meteor
#

Okay. Thank you all 🙏

clear sierra
#

Laura came with a Fire of truth and burned everything down.

young meteor
#

Just as a general statement, all code that is not executed is not hitting performance right? (perhaps except for Selects and other exceptions)

#

In other words, I can go crazy if I want. As long as a Branch or similar is making sure only one path is excecuted?

thin panther
#

Not strictly afaik

#

There is still some incurred cost for unused nodes iirc

clear sierra
thin panther
#

It's also worth pointing out that large branch chains normally indicate something wrong with your approach

#

Though it's not a guarantee

young meteor
#

Right. I'm not so much trying to compare to C++

Rather I'm looking for a way to set up different damage calculation options in a Template tower with many children.

So that the player can unlock a new unique shooting function (for example the mentioned "can only crit is hitting the front of the enemy" we talked about above.

But I need flexibility to have many different unique functions a player can unlock.

#

So I'm not quite sure how to keep this flexibility allowing a player to change a towers functionality if I can't do as above.

thin panther
#

This sounds like a candidate for overrides.

#

Basically the tower base implements default.

The tower that can only apply crit from the front, overrides a function you make called CanCrit() or whatever, then does it's dot product there

#

For each unique tower, if a default setting doesn't work for something, you just override it

young meteor
#

overrides meaning implementing code in the childrens BP's or what do you mean? (like overriding code for a specific Event in the child BP)

surreal peak
#

Yes

#

Parent Class has a Base Implementation
Child Class overrides and either replaces or extends the existing logic

#

And that goes on for Child Class of Child Class of Child Class

young meteor
#

Okay. Then I can't use this approach. Because It applies to a whole group of children, and only when/if a player unlocks/picks it in the game.

#

I might make it out to sound worse than it is since I'm still on my first small game.

I'm just trying to be proactive for both performance, but also Blueprint clarity for my own sake.

dreamy mountain
#

Hey, so I'm trying to create a collision-dependent UI element, but it stays visible after before and after I'm away from the objects collision

#

The top one is the object itself, bottom one is the visibility binding on the widget

#

Pumpkin Collectible is an actor object reference

thin panther
young meteor
thin panther
#

If that is in your child, then yes

young meteor
#

Fascinating. Not sure it helps in this case, but certainly something that opens up my mind to posibilities. Golden info 😄

#

In my case I kind of just want to seperate a bunch of functions.
Almost cosidering doing them in a Blueprint Library. And just pick the function I need and feeding it a whole bunch of variables.

Guessing a function in a blueprint library certainly will not be run if it is behind a false Branch? (meaning not actually called/run)

quick grove
#

hi guys, I have to transform array to string, so that I can put it on a db, and then I can take that and re-make it as an array var in ue5

#

how can I transform a string to array and viceversa?

versed sun
#

there is a Transform to String node
i dont think there is anything built in for string to Transform
but there is String to Vector and String to Rotator

#

what's a db ?

thin panther
#

Database

quick grove
#

yes

#

I can use Join Array with a custom separator

#

and the Parse Into Array with the same separator

versed sun
modern radish
#

I have some logic in my GameMode blueprint which is attached to BeginPlay. I'm only declaring a Local reference to my Game Instance and Player Controller.. There are other functions on the same blueprint, but in editor the BeginPlay always fires before anything.. In a Build however, I'm getting errors of the functions trying to access None when referencing those declarations.. The EvintBegin event runs, but only after the functions.. Why is that?

elfin hazel
# young meteor Not sure I fully understand. Is it pretty much like this you mean?

What if you had an Actor Component perform the calculation? Each tower would have its default Actor Component, then when an upgrade happens, replace it with the upgraded one that has different behavior.
The pro to this is that the tower doesn't have to do checks, it just has to ask the component for what happens.
The con Is that I guess the actor components would still have a base class to override behavior. And the reference lookup time. But that would only be an issue with a massive amount of towers.

modern radish
versed sun
modern radish
versed sun
modern radish
#

But that makes it not work in editor

#

because then I'm ensureing it will not have run before the functions

#

But thanks, let me try putting that on the functions

elfin hazel
#

Double check and see that the casts don't fail in the build.

modern radish
#

That worked, thanks

versed sun
#

i havnt done much packaging , but this might help

modern radish
#

All I needed wa to delay the functions by a tick, to make sure Event BeginPlay fired first

#

very weird that it doesn't happen in Editor

modern radish
young meteor
# elfin hazel What if you had an Actor Component perform the calculation? Each tower would hav...

This is very interesting. I was considering it earlier, but I'm not yet familiar with how to use the components. Seems pretty easy though.

Would both keep Blueprint complexity down, and avoid calling code I don't need if I'm not mistaken.

The two cons you mention:
Reference loopup time: That is only done once right? When tower (actor) is constructed and if the component would need to be updated on the fly which it does not in my case.
Actor components would still have a base class to override: Not sure what you mean by that one.

elfin hazel
#

The lookup time I'm referring to is the time it takes the cpu to access a reference, and is a cost that happens every time that something references something. Like GetActorLocation() just as an example, would require a lookup time for that actor reference. It's small, but depending on the game....

#

Just like how you were talking about having a base class for towers, that other tower types could then override the damage function of, you'd probably want to have a base class Actor Component that other more specialized would override*.

#

*Inherit from

young meteor
#

Guess "many" is relative. Say 50-75 in this case.

elfin hazel
#

Well, yes. But I don't think it should have a major impact. If something is impacting your game, you probably have other, more expensive things to look in to.
I think the most practical way though, is that when the actor component swap happens, update its variables then. Then you don't need to look up every time, which again is a small cost.

noble crescent
#

Quick Question, when should I convert a function to Pure?

elfin hazel
young meteor
elfin hazel
#

But I like to keep functions that return an array.. unpure. Saves me from creating a temporary variable.

noble crescent
#

So generally, if its just simple calculations, it's fine.

elfin hazel
#

Absoltely, even encouraged I think. Saves from having a bunch of stuff connected to the execution line

noble crescent
#

Time to un-spaghetti my BPs, slightly.

earnest swan
versed sun
#

Flat Nodes ?

tawdry surge
#

@noble crescent keep in mind pure nodes fire every time an execution node they are attached to fires

earnest swan
modern radish
lime gyro
#

Hey, I am trying to achieve eye tracking for my HTC Vive Pro Eye. I followed tutorial by Varjo: Eye tracking | Varjo for developers . However, it doesn’t accurately track my eye. Can you see where the problem might be? Thanks in advance. Thank you for your assistance!

fiery ridge
#

I have an actor that needs to have Simulated physics on but it moves when colliding with another object. How can I make it so it doesn't move when it collides with another object?

lusty mulch
#

Hello all, seeing something odd in unreal engine 5.2. I have a custom actor component that has a variable array of a structure type. Inside an actor BP that has his component, I am attempting to get the array and run it through a for each loop inside the construction script. I can see the array has values populated in it, but the for each loop doesn't run, it terminates immediatly. If I move the logic into the event graph and try to call it from the construction script that does work, but doesn't fit my needs. Is there some limitation here anyone else has encountered?

quick grove
elfin hazel
fiery ridge
elfin hazel
versed sun
#

or more mass?

haughty latch
fiery ridge
#

Would that affect velocity? I also tried making the mass like 999999kg but still moves a tiny bit

haughty latch
#

or better yet, if you have the position as numbers (pair of X,Y,Z), just always put that in

fiery ridge
#

In every tick?

haughty latch
#

yep

#

the Tick will anyway feed transform matrices for the objects, so it's a neglectable overhead

fiery ridge
#

Thanks ill try that out

lusty mulch
versed sun
#

Maybe the Actor is trying to read the Array on the Comp before it has a chance to load?

haughty latch
#

yes, probably u should check the order in which these things happen

lusty mulch
haughty latch
#

and not assume or rely on your array being there no matter what

lusty mulch
#

I'm just using it in editor, not during PIE. so on this instance of the BP I have the array values set.

versed sun
#

I had to do a fake Construction function on the Component that i called from the Actor's Construction for a similar issue

haughty latch
#

you probably have an issue with accessing the array across the different actor components, or BP...

lusty mulch
versed sun
#

yes , and for my use i wanted my component to add Collision boxes to my Actor

lusty mulch
versed sun
#

what is the array of ?

lusty mulch
lusty mulch
versed sun
#

you just need the Actor to accurately grab the Array which is stored on the Component, right ?

#

and it is saying it is empty, when you know it isnt

lusty mulch
# versed sun you just need the Actor to accurately grab the Array which is stored on the Comp...

mostly correct, its actually not saying its empty. if I hover over the variable get node output I can see its populated. but the for each loop I try to run on this array doesn't run even once, it immediatly completes. so maybe its getting populated right after the for each loop runs or something? and I know its not empty, I have the actor in a scene with the array variable set on the instance.

lusty mulch
versed sun
lusty mulch
#

did you set those values on the component itself? I am setting them on the instance of the component in the details panel for the actor which has the component on it in the editor.

#

Yes, so if I hard set those values on the actor component then it works.

#

but if I leave the default value empty, then set it on the instance of the actor it behaves as I described above.

versed sun
#

I made the array Instance Editable , and can change/print it

lusty mulch
#

mine is set to instance editable as well on the actor component.

versed sun
lusty mulch
#

in my actor bp, its now reading the defualt value of the variable set inthe actor component, not what I have it set to on the instance in my scene.

versed sun
#

make sure everything is saved/compiled

lusty mulch
#

indeed, been doing that but I'll be safe and just save everything and restart unreal.

versed sun
#

give PC a little kick

#

is my setup the same as yours ?

lusty mulch
#

So just for sanity/recap.

I have an actor component with a variable array of a structure I made. Its default values are empty and its instance editable.

I have an actor bp that has this component on it. I don't set any default values here as well.

I have this actor bp in my scene, on the instance of the actor I set the values of this variable.

When I attempt to read those values in my actor's constructor script, it doesn't work.

lusty mulch
versed sun
#

I myself am getting into Actor Components

lusty mulch
#

I just tried adding a new array of bools to the actor component. same thing. no default values set on the actor component or the actor using it. its instance editable so in my scene I have the values set on the component. attempt to print the bool values from the array in the actors construciton script and nothing gets printed.

versed sun
#

ooo, replace the Actor in the world with a new one

#

I think I duplicated your issue

lusty mulch
#

oh wow I think that might have worked!

#

retesting it now.

versed sun
#

are you setting it like this ?

lusty mulch
#

yes!

versed sun
#

did you get it ? mine isnt reading the array now

lusty mulch
#

yeah its not working for me.

lusty mulch
versed sun
#

same

lusty mulch
# versed sun same

trying to think of what the alternative is....I guess maybe I can try changing the flow? setting the variable on the actor instead of the component, then trying to set the values in the actor component from the variable in my actor maybe? not as reusable that way but I need to be able to access the values in construction.

versed sun
#

even if it isnt an array , it only reads the default value

haughty latch
lusty mulch
haughty latch
#

so first time you place your Actor BP in the scene, the CS runs, the array is empty.
then you populate the array with values, but now the CS is long gone, so you missed out.
now if you further move your actor around the level or you save/recompile the ActorBP, the CS will be re-run and since your array values are already set in the Editor, you will now see the for-each-loop execute

#

so it's a hit and miss because of the order in which your trigger the events

#

either move your for-loop out of the CS, or if you really need it there, make sure to initialize the array before that, so don't rely on populating the values later via the Editor, cause u run into the same issue

#

so initialize your array also in the CS, right before the for-loop

lusty mulch
#

hmm yeah if I move the actor around or save/recompile it still doesn't print those values. if I move the for each loop out of the contructor (like into event graph and then calling from constructor) then it does not seem to work.

haughty latch
#

you might have some other things we're not seeing here

lusty mulch
#

when you say "make sure to initialize the array before that" can you explain what that means please?

haughty latch
#

I mean initialize the array with the values you normally put in the Editor, just do it in the CS before the loop

#

aka "populate it"

lusty mulch
#

ah okay, yeah the values are different on each instance of the actor.

haughty latch
#

understood... even so, you can think of a clever way to do that procedurally in the CS

lusty mulch
#

so maybe have some abstaction between variables set on the instance and this array? where they set a variable on the actor that fills in the array?

haughty latch
#

so that they have different values according to whatever rules u want

#

that could also work

#

and in order to better understand how the CS works, or more like when it actually gets executed, print out a "Hello, world" in your CS, then in the Editor make sure you have the "Show Stats" enabled in the preview window. Now compile your BP and see the Print appear. Then nothing happens, as normal. Then if you further move the Actor in the level, you will again see the Print outs for every movement until it settles down again.

lusty mulch
#

yes I understand that aspect of it. again, I was fine with missing the first run of the construction script and just having it run when cs got run again. even added an "active" branch so they could toggle it on/off to force rerun the cs

haughty latch
#

last, but not least, you can extract this logic into a separate event that you can fire/trigger at any point whenever u wish to

#

both during CS, also at BeginPlay, then later on also during runtime (EventTick)

lusty mulch
#

okay thank you, its just needed for the editor, not when playing, hence why I was attempting to use the construciton script. I did try adding an event to event graph that is call in editor enabled

opal kraken
#

I have this first person character blueprint, i want that the mesh rotate with the camera boom, how can i do?

haughty latch
#

try to Get Rotation from the camera and apply it as a Rotator to your character

#

if not, try using the Look At function and make both the camera and the character "look" at the same thing

jade lintel
opal kraken
#

ok i'll try

opal kraken
versed sun
jade lintel
#

The arms should be parented to the spring arm

opal kraken
#

The one parented to the spring arm has the arms mesh, the one without parent is empty

lusty mulch
jade lintel
opal kraken
#

yes

jade lintel
#

Try parenting it to the camera

neon burrow
#

What is the best way to Send a Exec to another BP ?

Custom Event ? or something else ?

i have a actor that "kills the player" and i need the Widget to show the death screen"

so as soon as health = 0 happens i want it to send a exec to show Widget

opal kraken
#

only in z rotation because i use pawn control rotation

jade lintel
#

im not sure if i understand

jade lintel
#

You could also use an interface

neon burrow
#

is there any advantage of using either?

jade lintel
#

You won't need to cast every time if you use an interface

neon burrow
#

okay thanks :)

jade lintel
#

No problem

faint pasture
faint pasture
#

Have OnDeath show the widget

lusty mulch
neon burrow
neon burrow
#

i am getting Widget reference from my player character Cast

gentle urchin
#

Just make sure its valid i guess

neon burrow
#

it's not valid

#

okay the problem was i was not using the reference but widget

gentle urchin
#

😅

#

Not confusing overlap at all

neon burrow
#

i am confused, but it's working

if it works, don't fix it.

lunar sleet
#

Do your future self a favour

neon burrow
#

yeah, it's not everything that's confusing, most of the stuff are named good.
just couple of ... yeah...

noble ledge
#

How can I do an Add like this?

thin panther
noble ledge
#

Hmm. Not seeing the split option

#

Ah nvm I see

#

Thanks for the help

thin panther
#

no problem!

hollow cove
#

what math am i looking for here

noble ledge
#

Is it possible to find where a specific type is used in blueprints? For example I want to know where a enum type is used. If I right click on the enum and look at reference viewer it shows me which blueprints it is in. The issue is some of these blueprints have hundreds of functions so I would have to search all the args as well as local vars which is becoming a pain.

haughty latch
#

so what are you actually trying to do?

lunar sleet
haughty latch
#

map what range to what range?

hollow cove
#

essentially trying to get a direction from a 0 to 1 float in x y

haughty latch
#

so you wish to pass X to f(X), which outputs Y, where X is 0 to 1 and Y is 1 to -1

#

?

#

meaning convert 0..1 to -1..1 ?

hollow cove
#

i think im trying to do something with pi probably. imagine 0-1 is degrees with an arrow at 0 and 0-1 pointing the the degree around the circle from 0-360 but getting the end vector which is -1 to 1

gentle urchin
#

Map range

marble tusk
#

Does the output need to be a whole number for both X and Y?

noble ledge
haughty latch
#

X * 2 takes the 0..1 and makes it 0..2, then the -1 takes the 0..2 and makes it -1..1

#

simple domain mapping

hollow cove
haughty latch
#

do that for both axis

gentle urchin
#

You make a function for both axis

#

^^ yepp

#

Or map range for both

noble ledge
#

Like the "blueprint" file/icon

haughty latch
#

don't confuse X and Y in my reply with the axis

#

X is the input

#

Y is the output

#

or replace them with A and B

#

and keep X and Y as the axis

lunar sleet
noble ledge
#

This enum is a type, but I want to find where this type is used

lunar sleet
#

You should still be able to search for it

haughty latch
#

so if B = f(A) = 2 * A - 1

#

apply X = f(X) and Y = f(Y)

marble tusk
hollow cove