#blueprint

402296 messages · Page 799 of 403

odd ember
#

I just pay commission for art

faint pasture
#

Where are you guys getting grants lol

odd ember
#

also if you did most of the work for 2 years I'd have found someone else wtf

high ocean
#

We wanted to build a team, learn hard while making some money meanwhile, have a target, all that. I strategized all of it and in the end, he just worked like a mercenary - only what needed to, didn't know how the game was until he played it off steam...

odd ember
#

sounds like multiple plates spinning

high ocean
#

@faint pastureEU Commission

odd ember
#

a 2 year grant is pretty damn good regardless

faint pasture
#

We don't have that over here in freedom land, sounds sick tho.

#

Do you have to demonstrate something novel or can just any old hack get a grant to make a commercial game?

high ocean
#

@faint pasture U want it, and don't at the same time. We had ridiculous targets & impediments for subsistence money (500 euros/month)

odd ember
#

what kind of targets?

#

500 a month? in which country is that livable?

high ocean
#

I can post the game here if it's fine with u, check out for yourself - it had to be educational, so I needed to get creative to convince them lol

high ocean
#

Wrote 300.000+ words in that game 🤦‍♂️ 😂

odd ember
#

I got friends with PTSD from working there

high ocean
#

heh... I live in Germany now, but still have a job as a lecturer in a Ro university for ... another 500 euros/month 🤣

#

actually a little less than 500 lol...

odd ember
#

why not get a job at a german place?

high ocean
#

more like 430

faint pasture
#

Funny enough I live in the town where BMW has their North American manufacturing plant.

high ocean
#

nobody will have me with my qualifications w/o knowing the language at a certain level, besides, I want to make it by doing what I like honestly 😄

odd ember
#

fair enough

high ocean
#

so B german won't do to teach shit...

#

it needs to be top notch, and I just... can't man 😂

odd ember
#

can't say my german is stellar either

#

I lived there for a couple of years

high ocean
#

weird given ur name is after a Hamburg station 😛

#

love hamburg, my fav city from Ger - as a visitor tho

odd ember
#

someone got the ref

high ocean
#

😛

odd ember
#

I like the south more tbh

#

stuttgart is probably my favorite city

high ocean
#

I live in Augsburg 😂 let's switch lol

odd ember
#

but to be honest it's like half italian

#

in how its laid out

high ocean
#

the biggest romanian community in germany is in Stuttgart

odd ember
#

had no idea

#

I just like the verticality of the city

high ocean
#

ofc not, it's irrelevant if u don't know the romanians lol

#

look... I was earning more in RO than I am now, we left because of the people there man...wow! just... wow, nvm.

odd ember
#

I've heard stories

high ocean
#

and we came from the best part of it - the west. You don't even wanna hear stories about the south and east - now that's hardcore thuggery

odd ember
#

lol

high ocean
#

aaanyway, I'll try to see if I can get some artist(s) with my next grant. Btw, if the same grant would've been hired me from a german organization, the salary for the same job would've been 2.2k euros instead of 500
EU citizenship for u in a nutshell

trim matrix
#

so i'm new to this engine and wanted to know if it was possible to change the specular values on a texture? i can't find a good answer anywhere

#

this is all i have

odd ember
dusky harness
brittle raptor
#

So I have a direction vector from my camera and direction vector from the tip of a weapon, what is correct way to find the resultant (combination of the 2 as a direction)?

agile edge
#

This is weird

#

When I add a Vector variable to an actor in blueprints, it's rotated

#

Like it displays it's location in the editor relative to the actor's rotation

odd ember
#

anything you put on the actor will be relative to the actor

agile edge
#

yea it is weird although I guess I can use something like this

#

that way I can get the locations in blueprints as I see them visually in the editor

#

it is weird though (seems convoluted)

faint pasture
#

@agile edge those nodes above the execute node are triggering lol

agile edge
#

I had to summon my computer graphics 101 matrix math to make it match what i see visually in the editor

agile edge
#

I thought I was making it more compact

#

Btw I wish they made blueprints easier to edit as text. When you copy a blueprint and paste it in a text editor, it pastes text but it's so verbose

faint pasture
#

I do it like this. Same idea just below. Feels right.

agile edge
#

idk why this is better though

#

Maybe it's like passing arguments to a function. Function name (arg1, arg2, arg3). Reads top to bottom and left to right

faint pasture
#

I just like it better. I also never drag pins off of sets, just get the variable again. Logically the same thing but cleaner.

#

Loc1 and Loc2 already exist so just get them instead of spaghetting the pins all across the graph

desert juniper
#

I have a node that needs refreshing when starting unreal

#

Upon refreshing I see this and all is well until the next time I restart unreal

#

I suspect that there is a cached version of this node somewhere in the project files that it keeps reverting to, though I'm unsure where to look for that

#

I've not used hot reload

dawn gazelle
#

Have you tried to delete the node entirely and recreate it and hooking it up as needed?

desert juniper
#

did not work as well

agile edge
#

can you set the dilation on a timeline as an input

#

oh maybe I can just set the actor dilation

winged sentinel
#

is there a way i can destory an AI when its dead to save resources but leave the ragdoll skeletal mesh on the ground

indigo bough
#

This is a mixed blueprint/animbp question, but I have a animbp which sets the bone locations of two bones in a skeletal mesh (rope end points). Anyway, I noticed when moved, the refresh of this is lagging behind quite noticably. Is this just down to how often the "Event Blueprint Update Animation" runs? Is there any way to mitigate this? 🙂

trim matrix
#

hi guys how can we change graphics settings in game like going to settings and changing graphics like high, low, epic something like this ?

#

without changing in cmd

desert juniper
brazen merlin
desert juniper
winged sentinel
#

Thank you I’ll check it out tmrw

brittle raptor
silent bridge
#

Can someone tell me how to understand the blueprint code please. I know how to make stuff from remembering tutorials but I can't do what Matt has just done FROM memory without one

#

Any easy way to think about it?

unique yoke
#

I'm trying to do something I'm sure is really easy for others, but not sure what I should be doing. Basically, trying to make a cube rotate in a circle like if it was on an invisible Path. I figured I can do something like get the actor's forward vector and do an offset on tick but what I'm doing just causes it to move in one direction out towards the horizon:

modest sparrow
#

How do I replicate widgets so I can send/recieve information from the server?
I tried this and the event never gets sent to the server:

brazen pike
terse elm
#

is there an easy way to remove the acceleration that seems to happen during a blend when going from an anim with root motion to your walk or run state

#

oops bp chan sorry!

#

well maybe its bp related too

#

lol

#

i think i found it

#

oh hm i removed requested move accel but it still maintains no movement during blend.

thick orchid
#

I got this weird ghosting - it's not motion blur, as it's turned off.

#

But it's kinda like MB - anyone have any ideas? It's a new project on UE5, so probably some kind of post processing effect I'm guessing.

terse elm
#

i added root motion to the anim but it still eases in. its being called from a state machine . i dont see the ease in/out options that are on montages

thick orchid
#

oop - sorry, was AA.

unique yoke
willow phoenix
#

imagine it like this: you need to have the actor move forward and backwards (or side to side) first. like +1 to -1.
then you have to move the actor on the second axis too.

#

and then you realize you are talking shit

#

xD

#

wait

serene pike
#

Simple question, how do I make a widget animation play on a button press and/or add it to the character as necessary?
Just a blink animation, 2 bars come in and out of view in a fraction of a second.
I don't know how to tell where I should put anything like level blueprint, character, gamemode and all that, but I can't seem to just add it to an f key already (pic).
Tried Adding it as a custom event that just has play animation but I figured it needs to be added first (Don't know where or what) and I don't know how to play a custom event as I'm trying to do, which is probably the wrong way.

gentle urchin
#

given Forward Vector X, whats the proper math for adjusting it according to a normal vector from a trace hit? I cant seem to wrap my head around it

willow phoenix
willow phoenix
eternal reef
#

For the rotation issue, couldnt you just use Polar Coordinates?

gentle urchin
willow phoenix
#

the direction is "forward"

#

thats why is called a forward vector

gentle urchin
#

yeah but im not after forward directly 😛

#

i want adjusted forward

willow phoenix
#

then you cant use the forward vector and have to do the vector math for the direction you want

gentle urchin
#

Which is what the question is about 😛

#

atleast, was intended to be about

#

seen in 2d space, this is what i want to achieve, (it's in 3d but hard to demonstrate)

eternal reef
#

Given the root of the BP actor is on 0,0 and the object rotates around it, I guess this should be possible
x = radius cos "degree"
y = radius sin "degree"
Meaning you could just start off with degree 0 and just increment it over and over returning the x and y coordinates

willow phoenix
#

but if you want to ahve something move predictable in a game context i would not use this method, id use a spline, attach the actor and make it move along the spline

spark steppe
#

is there no method to check if a material is an instance of another material?

robust kite
#

How do i check if a text box is empty ?

spark steppe
#

equal None or check the length

robust kite
#

ok ty 🙂

odd ember
mint comet
#

I can't seem to make this node work with any input type event it works with beginplay but nothing else

gentle urchin
maiden wadi
# mint comet

If it doesn't work with input, you're trying to do that in an instance that doesn't have input enabled. Or something else is consuming input before that instance.

faint pasture
#

2nd trace start position is the hit location + normal

smoky marsh
#

Is it dot or cross, I can never remember

#

Some combination of that anyways should get you what you're after

gentle urchin
#

Ill give it a try, thanks ^^

faint pasture
#

Cross product gives you a vector at right angles to both inputs

#

so the first cross will give you 2ndTraceDirection.Right

faint pasture
#

2nd cross between that and Normal will give you 2ndTraceDirection.Forward

#

not sure on the input orders, just mess with it

gentle urchin
#

This seem to work 😄

odd ember
#

ah you do

#

I usually leave the pins on the start node empty

gentle urchin
odd ember
#

I also do a lot to tier blocks so that you can clearly see the step by step calculations

gentle urchin
#

That makes sense. I tend to do it more if im making it for others than for myself, not really sure why. It's not like it's easier for me to follow a stack like this when its not tiered properly 😛

odd ember
#

I do it for myself as well as for others

#

nothing worse than opening a function you made 6 months ago and go "what the f was I doing"

gentle urchin
#

I've been caught in that trap way to many times already, one would expect monkey to learn at some point

#

the glorious result!

odd ember
#

cool

#

what is it for?

gentle urchin
#

ai pathing

#

navmesh doesnt deliver desired result

odd ember
#

as in, GetPath didn't work out?

gentle urchin
#

get path isn't accurate enough

#

going up that slope gave me 4 path points

#

its respecting step height upwards,

#

but not downwards

#

so my ai cut through terrain like butter

odd ember
#

very strange

gentle urchin
#

not really, its custom ai movement with interp

#

so it makes sense

odd ember
#

ah okay

#

any reason you're not using moveto?

gentle urchin
#

costly

odd ember
#

fair enough

#

I guess it makes sense if you have some 800 AI

gentle urchin
#

yeah

#

so im using the nav result, and trace based on it

odd ember
#

interesting

gentle urchin
#

so im testing 1 uu above ground , and if it doesn't hit i trave below ground,

#

if neither hits, it means i've safely arrived at target

odd ember
#

well here's hoping it's not too expensive!

gentle urchin
#

It seems fine, and all path request are queued, so i think it'll be alright

#

I could probably move it to async later on if needed

waxen garden
#

guys, may I post a youtube video explaining an issue I have?

#

even though my english sucks, it might be faster 🙂

#

thanks a lot in advance for all the help

#

I just can't figure out how to fix this issue (or if its even fixable at all)

#

I'm starting to think that using a light is not the way to do it at all

gentle urchin
#

print the location

#

and see if its correct

waxen garden
#

k

gentle urchin
odd ember
#

that per AI?

gentle urchin
#

per path request, so currently once per frame

gentle urchin
waxen garden
#

I can't interpret this numbers man

#

doesnt make sense to me

#

let me show you

gentle urchin
#

just compare them to a known location ( the ground below f.ex)

#

If they are wild, perhaps using the Impact point is better?

waxen garden
#

look, if i just print the location

#

i get all these numbers

#

without moving the character or anything, of course

gentle urchin
#

also, change print time to 0.0

#

Well thats wild 😄

waxen garden
#

print time to 0.0 gives me this

#

i don't like this at all hahaha

#

the distance also gives me these 0s I don't know how to interpret them

gentle urchin
#

is it hitting self?

#

or the light ?

waxen garden
#

hmmm

#

could be, let me make an array of actors to ignore

#

that would work, right?

gentle urchin
#

should

#

or just adjust the collision setting on the light

#

have it to not collide

spice smelt
#

How is the lifetime of objects created by "Construct Object from Class" managed? GC, ref count, manual, 1:1 to "Outer"'s lifetime...?

maiden wadi
#

@spice smelt Usually by hard references to it. Also do not use that for most things. Most objects have their own construction functions.

waxen garden
#

I give up. THe same actor is giving me all those distances with 0 on them. I mean, its a line trace, once it hits something it should stop giving me the distance

gentle urchin
#

Makes me wonder whats infront of the trace

waxen garden
#

now a wall

#

but this should not be like that

gentle urchin
#

if you have some code that makes it so, then it will 😛

spice smelt
waxen garden
#

I mean...I'm doing it from scratch to see whats wrong

gentle urchin
#

we know nothing beyond this

waxen garden
gentle urchin
#

for all we know there's a loop with invalid vectors coming in

spice smelt
waxen garden
#

and thise

#

this

maiden wadi
#

Zeroes sounds like you're not checking if the hit blocked

#

You're not checking if the hit blocked.

#

Uninitialized float == 0.0f

gentle urchin
#

whats calling this function?

waxen garden
#

i took everything out

#

even with this, it gives me the 0s

#

the event is being called by the tick

gentle urchin
#

What's calling Display Laser Origin

#

thats all?

#

show 😄

waxen garden
#

I had it on a timer before

gentle urchin
#

i prefer to know it all

#

LasterStart, is that a scene transform?

#

usually one wants to go a tad outside of the mesh to ensure no weird hits

waxen garden
#

thats it

#

This was just a test, nothing serious...but I still don't get why it's not working

maiden wadi
#

Can you print the hit component? Because if distance is zero and it's hitting something, it has to be finding something immediately.

gentle urchin
#

the amount of prints doesnt make sense to me tho

#

it should only print once , regardless of hitresult (now block by an actual hit, but still just once)

waxen garden
#

the hit component is giving me all this

#

hmm

spice smelt
# waxen garden

try to: start == end > to string > print string, make sure it's false
also you ignore the character, but if the character is attached to another actor and it's inside that actor, the trace will collide with it
try enabling drawing like in my picture, it can be helpful sometimes to find stupid errors

waxen garden
#

this is the hit the debug line gives me

#

so...I still can't understand why all the other components

#

Let me do something. I'm gonna make this from scratch

spice smelt
#

then you're definitely inside some collider which isn't the character itself

#

is the character holding another actor right where the ray starts from?

waxen garden
spice smelt
#

and now it works?

waxen garden
#

Gonna me it from scratch

#

no, it doesn't

spice smelt
#

;-;

waxen garden
#

don't bother anymore man

#

I'm doing it from scratch

#

playing with a scene made by others when I don't know that well UE is not the best practice

#

just wanted to learn how this guy did the laser sight

#

thanks again for your help

gentle urchin
untold fossil
#

Hello. I have a question about a scene capture component. We've changed the FOV system of our game to vertical lock (from horizontal lock default) but the scene capture components still seem to be using the old default horizontal lock system. How can we change the scene capture components to also use vertical lock as specified in our defaultengine.ini file (like normal cameras) ?

spice smelt
#

is there a way to get a reference to a struct instead of the whole struct in order to change individual values from outside?

odd ember
odd ember
#

take a look at google or the UE4 docs

#

I can't remember what it's called exactly

crisp lance
#

Why do LineTrace nodes have a "Return Value" boolean to determine if there was a hit? Could we not use "Is Valid" on "Out Hit" instead?

maiden wadi
#

@crisp lanceBecause it's just a wrapper around a C++ function which does the same thing. You'll often use them in if statements like the following.

FHitResult TraceResults;
if (GetWorld()->LineTraceSingleByChannel(ArgumentThingsHere))
{
  // We know trace results are validly populated here.
}  
spice smelt
#

uh nevermind, why doesn't it use TOptional? 🤔

maiden wadi
#

It possibly could. But bear in mind trace code is probably ancient. I don't know if TOptional is.

wary tinsel
#

Hey guys I need to play and stop a timeline many times during my racing game, How is it possible that the third number is always a 0, 3, 6 or 9? I got 5.483, 5.500, 5.516, 5.533 bla bla, is this normal? I am doing something wrong for sure 😦

earnest tangle
#

Framerate most likely affects it

#

if you run at a consistent 60 fps or such for example, the play/pause would generally hit at the same fraction of a second

wary tinsel
#

it's 60 fixed, how can I fix this?

bitter helm
#

How can I use another character in my character customisation made using skeletal meshes?

brittle raptor
granite gull
#

Hi. Anybody experienced and issue/bug with binding to a delegate in blueprint where the function to be bound errors out with having non-matching signature ?

odd ember
#

it's not a bug, your event or function needs to have a matching signature

wary tinsel
earnest tangle
#

@wary tinsel Why do you think there is a problem with it? Is it not working correctly?

#

If it works correctly I don't think there's anything wrong just because the numbers hit certain fractions

wary tinsel
#

okai

hazy cobalt
#

Hey can any one help me out with something? I have a blueprint with a bunch of static meshes in them and am trying to make a check box to toggle the visibility of those static meshes but i can't seem to figure out how to do that with toggle visibility i have a bool with a visible parameter hooked up to a branch but the toggle isn't doin g anything

brittle raptor
hazy cobalt
maiden wadi
#

It's not connected to an event or function.

brittle raptor
hazy cobalt
#

Just making a check box to toggle the visibility of different static meshes in my blueprint

#

through the details section

#

does this toggle visibility only work in the actual game ?

maiden wadi
#

Why not just click on the component and set it's visibility?

hazy cobalt
#

because that will trigger it on every single instance of that blueprint

brittle raptor
random crow
#

Anyone knows if you can get more info of the stacktrace when a Game crashes within a BP? Now I'm getting something like MyGame_Win64_DebugGame!ProcessLocalScriptFunction() and I'd love to know which BP or function is that

maiden wadi
#

Ah. Then you need to handle that in the ConstructionScript.

#

Check the bool there and set visibility.

#

@random crow What is the crash reason?

hazy cobalt
#

hmm it seems to effect every instence what i want might not be possible

random crow
#

Assertion failed: Result [File:Runtime\CoreUObject\Public\UObject/Stack.h] [Line: 252]

earnest tangle
#

Launch from Visual Studio or Rider in debug mode

#

most of the time if a BP crash occurs, it will break execution where the crash happens

#

at that point you can try to inspect the variables that are in scope, or possibly lower in the stack... they sometimes contain the name of the BP currently being executed

random crow
#

Ok, I'll try that, I don't have the debugging symbols for the editor installed right now, but I'll check that way

maiden wadi
#

@hazy cobalt I'm still not sure why you need that. Drop your actor into a level. Click on it, select the component you want hidden and find the Visible property under Rendering.

hazy cobalt
#

it effects them so i have blueprint that is made up of an 4 static meshes

#

and i wanted to be able to toggle visibility of different parts

#

to have variation of damage

maiden wadi
#

You can select different components.

hazy cobalt
#

the issue is it effects every single one of them

maiden wadi
#

Not if you place it in the level and then do it on the instance you've put in the level.

#

Drop your actor into a level. Click on it, select the component you want hidden and find the Visible property under Rendering.

hazy cobalt
#

I need to change the blueprint from harvested

#

let me google if that's possible

#

only hides in viewport not in actual game

#

:/

earnest tangle
#

What setting did you change? If you change the visible thing in rendering it definitely affects game and not just editor

#

there is a separate visible in editor checkbox iirc

bright frigate
#

Hey, anyone free to quickly verify if my BP logic is ok? It's very simple, just onoverlap and endoverlap with a do-once and reset for curtains - if I'm in a curtain's collision box, it'll draw the widget telling player to press button and on exit it destroys it.

What happened is that before I had a do-once, it would draw thousands of widgets everytime I made contact with the triggerbox. For instance, since the box is a box and the player capsule is a capsule, that means you make some slight contact with the edges of the box as you move around or whatever. I noticed that the remove from parent node could not keep up, there were always more that were drawn and remove from parent would not remove all of these. I don't know why but this is what I observed. I fixed this by putting a do once and resetting everytime I left the box, which worked everytime ... until now where I packaged my game and gave it to someone for testing. They went to a curtain and no problems were had but then one of them had the widget frozen on the screen meaning something happened that wouldn't remove all the widgets. I can't figure this out why it's happening.

trim matrix
#

When using the Get Game Instance node it is returning the Engine's default Game Instance object instead of my own Game Instance Object I've set in project settings

#

any idea why?

gentle urchin
#

You need to cast to your new type yourself

trim matrix
#

Any idea why this cast is failing?

#

WW_GameInstance is the game instance set in project settings

hazy cobalt
#

@earnest tangle yes there is actor is hidden in game

#

but you can't apply it to the child static meshes

#

only the the actor as a whole

earnest tangle
#

You definitely can, it's called "Visibility"

#

There is a node also called Set Visibility which changes it in the node graph

wary tinsel
earnest tangle
#

How is it not accurate?

hazy cobalt
#

Yes but my issue is it changes all instences

earnest tangle
#

Show a screenshot of what you're changing I guess

twilit gull
#

if i perform function from parent bp i dont get those var values in child bp?

twilit gull
#

this one is accesible from child bp

#

and this one is not

earnest tangle
twilit gull
#

same bp, same event graph

wary tinsel
earnest tangle
#

Ah. Try locking your framerate to something else to see if that affects it

hazy cobalt
#

in the blueprint that visible doesn't exist on the instance it setlf

#

only to hide the whole thing in game

#

not to select the children individually

wary tinsel
#

it was the framerate dude but thanks 😄

crisp lance
#

Is the "taking an output pin twice will execute the BP node twice" always true?
If I take an output pin twice from a SET node, will it be harmless, or will it also call again the node before the SET ?

#

Thank god, for a moment I thought that some lazy programming chaining madness might happen.
Thanks for your answer

#

Yeah I can imagine.

twilit gull
#

for some reason functions do have access to parent class values, but calling them from child somehow gets their new instance and getnnone

#

what do i do wrong 😐

#

should i call functions from child class and do a lot of ctrl-c ctrl-v for every child this way

maiden wadi
#

@twilit gull If you have a parent class and a child class, and you're calling a function in the parent class, and getting parent class values instead of what the child has set those values to, then your instance is a parent class one, not a child class instance.

twilit gull
#

no, i mean:
i have function that i setting up value for var
if I call another function - it has its value
if I try to reach this value from event graph - i get null

gentle urchin
trim matrix
twilit gull
#

same goes for child, its not getting this value while being inherited
but if i set up value from event graph with, for example keyboard event it gets it and holds it.
and if i set this value after calling the event, also in event graph, i don't have this value anymore

odd ember
#

they are notoriously buggy

#

and perform badly

twilit gull
zealous fog
#

Still have to be careful

#

Basically any time a pure function is called by an impure function it runs (which becomes logical once you really understand how the code runs: if I get the location of your character and manipulate it, and then the next impure note gets your location again and prints it, it should be different. Even if you use the same get actor location node)

#

If you have a big pure function, it's better to save the results as variables and use those instead of running the function over and over again

#

Except if you need the result to be different every time you get the informatiob

#

Or use a pure function which caches the result

crisp lance
crisp lance
zealous fog
#

Impure I meant

#

Also BP pure functions aren't really pure unless you make them const

#

Try using a set node

#

It works

#

Unless you use constant function

crisp lance
zealous fog
#

Is there any real disadvantage to setting variables in pure functions though

#

Except that they can be easily abused if not careful

#

In BP I mean

maiden wadi
#

No disadvantage. It's just very odd.

zealous fog
#

I guess I did do that but I used the variable only within the function

crisp lance
#

It's confusing as hell for anybody who knows the original meaning of pure function.

zealous fog
#

Would that be considered a local variable?

maiden wadi
#

No, but it would act like one.

#

Then an intern will come along and ruin your day. 😄

crisp lance
#

The function still only relies on its inputs to determine its output so it is theoretically pure, but it's not implemented as such.

maiden wadi
#

Concerns about scalability later and people being able to work on the same code base with you are the biggest concerns and the reason there are such explicit ways that things are supposed to be done in certain ways.

crisp lance
#

Yeah I'll do that as well, can't hurt.

full flax
#

Hey all...I have a blueprint class I created for a window...it has 4 meshes (frame, sill, upper sash, lower sash). in my blueprint, I created a variable for OpenRatio which is float 0-1. I'm multiplying this ratio value by the maximum z movement of the lower sash (76.2cm), and applying the result to SetRelativeLocation Z for the lower sash mesh...My question is: My building has multiple sized windows (smaller ones for upper floors, etc). Should I create a different blueprint class for each window size? Or add the different size meshes to this window class and have another variable for window type?

brittle raptor
maiden wadi
#

Rule1, don't repeat yourself. All these classes do the same thing. Should be one class with a switching mesh. Meshes should be SoftObject Pointers.

full flax
#

I haven't really streamlined the final use case, but I actually envisioned a trigger with a drag action of sorts to raise the window using the mouse...haven't gotten that far into the engine yet to know if it's possible...I just want to know if I should make a separate class for each window size

full flax
maiden wadi
#

It's much cleaner just to specify some differences based on the window itself. Choose what you want your key to be. Can be a Name, GameplayTag, Integer, Enum, whatever. If you really want to cleanly implement, have a couple of maps in a data asset and let that window class get the static data from that data asset via a pointer in it. You can specify each window's mesh, size, etc in the same data asset and change your logic based on the key you choose to represent each window.

#

You end up with no extra useless data laying around per window, and a window that can be thousands of different types with two classes total.

brittle raptor
#

Question, Does BP not support the use of a switch statement on something like a damage type?

maiden wadi
#

Damage Type enum?

full flax
brittle raptor
remote loom
#

cannot get my punch collider to interact with a player character by hit or overlap, anyone have an idea what is going on here? it works fine with other dynamic objects it seems

#

these never trigger

spice smelt
#

Is it possible to extract/copy the functions inside a broken blueprint without opening it? (trying to open it results in the editor crashing)

remote loom
#

@spice smelt did you try and open it in a blank project? might open for you that way

gentle urchin
#

Or copy the bp in the project (breaking references) tend to work in some cases

spice smelt
gentle urchin
#

Doesnt let you fix the original tho

spice smelt
#

uhm i'll try

#

it still crashes

maiden wadi
# full flax So this is like week 2 for me learning the engine...I know a lot of the words yo...

Hmm. I don't. I don't really follow tutorials that much. Basically to start, I'd start with data assets. They're a key tool you'll need to keep static data organized. Static data being data you can get from anywhere in the engine in BP. A Data asset is two parts. One is the actual class. You create it and specify your properties there. And then you create an Asset out of that class which acts very similar to static meshes. You specify a Data Asset pointer property on your window and then you populate that property with the data asset same as you would do if you create a Static Mesh pointer and then populate it with a mesh. This lets you get your data from the data asset directly in the window class.

#

@full flaxAlso on the remark about pointer types.

#

To further cover on that a SoftObjectPtr is just a WeakPtr and a path to where the asset is on disc so that it can load it up, but not force it to stay loaded.

full flax
#

so I'm creating a DataAsset and it's asking me to pick data asset class?

maiden wadi
#

Did you go to Misc -> Data Asset?

full flax
#

yup

maiden wadi
#

You'll need to create the class first.

#

Right click and create new blueprint. Search for Data Asset there.

full flax
#

this is separate from my window class right? I'll add the pointer to the data asset in the existign window class?

maiden wadi
#

Yep.

#

All total in the content browser you'll end up with two classes, Window and DataAsset, and then also an asset of your DataAsset type.

full flax
#

PrimaryDataAsset?

coarse forge
#

Hi, so I have animals.. And I'd like to have a radius sound attached to them. Is this just the normal audio component or should I just play sound cue and it will work? How does this sort of thing work with actors?

maiden wadi
#

That'll work fine.

odd ember
#

moo

odd ember
#

you'll still have to query it

full flax
#

I'm learning! So to start with I just need to create an enum for window type in the data asset class?

coarse forge
#

which i think leads me to just doing a begin play play sound node

#

but how does that deal with distance?

odd ember
#

audio handles distance on its own

#

but probably better questions for #audio tbh

coarse forge
#

yeah.. just found that channel

odd ember
#

there's a bunch of stuff that I had to setup to get sound to respect environment

coarse forge
#

seems I see these after I ask questions

#

hahah

maiden wadi
#

@full flax If you're going to choose windows via Enum, then you'll probably want to start with a map of Enum/SoftObjectPtr to the mesh. It may also be worth creating a simple struct that you can use instead and map the enum to the struct. Then in the struct you can have a property for each changeable thing about the windows. The multiple meshes as SoftObjectPtrs, Size, etc.

Also as a side note, bear in mind that enums stop at 256. If you have any plans on long term scalability keys like FName or FGameplayTag is a lot better.

full flax
odd ember
#

you'll be fine

full flax
#

which woudl be the best way to do it?

maiden wadi
#

Enum will be fine then.

odd ember
#

which is good because FNames are a pain in the behind

full flax
#

lol nice

#

holy crap...there's a long list of enums for variable types or is that not where I create my enum?

odd ember
#

it is not

#

an enumeration is a data type

maiden wadi
#

You create that in the content browser if you're blueprint only.

odd ember
#

yep

#

really it's just a fancy face value for a byte

maiden wadi
#

Under.. Blueprint? If memory serves.

odd ember
#

I think so

maiden wadi
#

Been a while. 😄

gentle urchin
full flax
#

the layers keep adding up...trying to follow along...ok so I created an enumeration...let me add some types.

maiden wadi
#

Hmm. Not a bad autobiography title. "Programming. The never ending Onion."

full flax
#

I could do this in my sleep once I learn the api in C...C++ a little tougher...Blueprint...never heard of her...but I am tryign to learn it for my day job.

odd ember
#

archviz?

full flax
#

no, aeromedical research...I'll be doing simulation vizualization and a lot of cognitive distractor "games"

#

the archviz is for my side project, which is the asylum building I'm learning with.

#

ok...so I have my data asset class and my enum...I need to add the enum to my data asset class right? is that a node or a variable?

odd ember
#

aeromedical? flying drones performing surgery? 😅

#

to be fair I've seen that in games 😅

unique yoke
full flax
#

Aeromedical is stuff like Spatial Disorientation, Hypoxia, Fatigue, Motion Sickness, Color Vision, etc...anything medical related to aviation.

odd ember
#

ah like that

#

sounds interesting

full flax
#

it's a pretty cool job, lots of cool toys.

#

@maiden wadi do I add the enum as a variable or a node to my DataAsset Class?

odd ember
#

as a variable

full flax
#

ok...so if that's all I want to start with...where do I go next? Do I need any blueprint nodes in the DataAsset class or just the enum for now?

odd ember
#

tbh I haven't been following the entire conversation, but is this so you can easily swap out windows?

full flax
#

He presented to me the proper OO way to do this, but it's way deeper than I've dove thus far...

odd ember
#

I mean I would probably have settled for the enum. but I'm not sure of the full scope here

#

data assets make sense if you're making complex actors

gentle urchin
#

Isnt the enum to define which data asset to pick ?

odd ember
#

not sure if they are relevant when just picking out static meshes

#

ah like that

#

perhaps

gentle urchin
#

with data assets varying depending on the need of the windows?

full flax
#

Well there's also the amount of vertical movement the sash has to move to be all the way opened

gentle urchin
#

I've never done data assets, so i got no clue, but i'd imagine something along those lines

odd ember
#

not sure why a struct wouldn't be enough for that though

full flax
#

so I need a different data asset for each window type?

odd ember
#

but I guess data assets are the rage

gentle urchin
#

If they're very different i guess ?

full flax
#

I have 10 window types, only three of them have the ability to open.

odd ember
#

a difference instance of it I suppose

full flax
#

and the open amount is variable

gentle urchin
#

if one slide up, one opens inwards from mid, one opens inward from top etc etc

odd ember
#

I'd handle it through a struct that you can then make into a data table. but maybe that is now considered "old school" 😔

gentle urchin
#

enum for selecting dataAsset, to minimize variables?

full flax
#

so I need a dataasset class with all the variables in it. And a datasset asset for each window type?

#

startign to sound like overkill for windows, lol

odd ember
#

yeahhh

#

if you want you make a WindowStruct instead

#

populate it with a static mesh class and your variables

#

and turn it into a data table instead

full flax
#

Do I still need the enum for selecting which window?

odd ember
#

yep

gentle urchin
#

How would that work with just a struct?

odd ember
#

with a data table the only asset you need is the table itself

gentle urchin
#

I guess there's only so many ways to open a window,

odd ember
#

and the struct used for the table

gentle urchin
#

so it should be fairly limited

odd ember
#

then you can just create new rows of static data

full flax
idle pelican
#

Hey, I'm trying to fill up box with some potatoes (3 different meshes). I have very precise collision for potatoes meshes and I would like to fill up box randomly. In addition I would like to use Hierarchical Instanced Static Mesh bcs of optimization. I was thinking about spawning them randomly and simulate physics on them but HISM doesn't allow to simulate physics on meshes. Any ideas how to do this? Finally box with potatoes will be just static thing and it will stand on the floor.

gentle urchin
#

Some enum or data table row handle for picking the window type, which has the mesh and data you need

odd ember
full flax
#

ok...you keep mentioning adding the mesh...each window is multiple meshes...(frame, upper sash, lower sash, sill)

odd ember
#

right

#

so in your struct

#

you want each of those

#

as a static mesh

#

on your struct

full flax
#

ok, do I make the struct in the content browser?

odd ember
#

yessir

gentle urchin
#

yeah, same as with Enum^^

odd ember
#

it's right next to the enum option

#

coincidence? I THINK NOT

full flax
#

sweet

odd ember
#

so basically create a bunch of StaticMeshComponent soft references

#

for each of your construction types

idle pelican
gentle urchin
#

That would work, but depending on amount would be quite expensive i imagine

odd ember
#

yeah

#

probably more expensive than just using regular static meshes

idle pelican
#

I would just do it once, and then, after copy, use only HISM

odd ember
#

what if the potatos move?

idle pelican
#

they will be static thing, as I said

#

I'm just trying to figure out how to fill up box

odd ember
#

try it I guess

full flax
#

So in my struct I have: WindowTypeEnum, CanOpen (bool), OpenCm, HasSill (bool), and now I need to add the 4 mesh slots?

idle pelican
maiden wadi
#

Make a box. Make an actor that is a potato. Spawn hundreds of potatoes, simulate physics, fill box. Have editor function to save transforms of potatoes in box. Delete last two actors.

Create new actor that is the box and an ISM. Use transforms to spawn ISMs at said location at runtime.

full flax
odd ember
#

static mesh

#

and they should be soft references

full flax
#

so I have the struct...I need to make a data table of the struct and add that to my window class?

#

as a variable

maiden wadi
#

Nah. Only thing the window needs is an enum.

#

Struct should go in the data asset. Should be a Map of Enum as key, Struct as Value

#

You create the map in the class version of the Data Asset, then you populate the Map's values in the asset version of the data asset.

odd ember
#

I gotta admit I don't get the data asset part of this

#

I would just use a data table

#

but maybe there's some fancy stuff about data assets I don't know

maiden wadi
#

Enum to name conversion is ew.

gentle urchin
#

Unrelated; Would it be cheaper to have a UObject with a vector and a rotator, compared to moving an Actor with a transform?

maiden wadi
#

Much easier just to have a map.

odd ember
full flax
#

I might go the data asset route when I learn more...but enums are familiar to me...

#

where do I create a data table?

gentle urchin
#

Content browser

maiden wadi
#

Then you have to reinvent finding functions the map already has. Learning Data Assets is a good thing anyhow. They're extremely useful in the engine.

odd ember
#

I believe it's under miscellaneous?

gentle urchin
full flax
#

Ahh yup...

maiden wadi
#

Datatable searching is only cheap when you already have the key. Otherwise you're iterating over every value. Trivial in C++ with pointer returns, but that returns copies in BP. Costly.

odd ember
#

I don't disagree with the usefulness of data assets, but I wouldn't store everything in a TMap

#

default values for collection types in BP are surprisingly finicky and buggy

#

well we're talking about a set of perhaps 10 types

maiden wadi
#

I deal with UI all day. 😄 TMaps galore.

full flax
#

@odd ember so I can delete the static mesh components from my window class and pull them from the struct?

odd ember
#

you still need them

maiden wadi
#

Hmm.. I wonder if UE5 will have SetMeshFromSoftObject.

odd ember
#

it would be nice

full flax
#

I'm using UE5...I can look, where is that supposed to be?

maiden wadi
#

On the StaticMeshComponent

#

I find it weird that UI has that and something as core as a Static Mesh doesn't.

full flax
#

@odd ember I guess I'm confused again...where in my window class does the data table go and how do I switcheroo the mesh based on enum choice?

maiden wadi
#

Datatable works same as the DataAsset. Just make a pointer to that type and set the value.

odd ember
#

or add them as a variable

#

as said above

maiden wadi
#

Oh yeah, that is a Static call isn't it.

odd ember
#

it is

#

and has that fancy FName combobox I've been dreaming of

maiden wadi
#

To be fair, he'll still need the table pointer. Needs to get the Names Array.

full flax
#

ok, I have the data table logic built I think. I'm gettign the row based on the selected enum value...I then BreakWindowTypeDataStruct which gives me all the values from the data table. Now I need the mesh switching logic...should I be dynamically adding the meshes to my actor class from the struct row or do I need to already have existing meshes that I change out?

#

Here's my logic thus far...the HasLedge, and CanOpen logic will depend on the mesh setup stuff...As you can see I only have the large window meshes in my components list....but the small window, which is row 2 in my data table has references to the small window meshes.

maiden wadi
#

Components are just a wrapper. They're the class that displays a mesh at a location. You can put different static meshes in the same component, just not at the same time.

#

So in this case. You would get each of your components, and call SetStaticMesh on them after calling LoadAssetBlocking on the softobject pointers in the struct.

#

You can also load the soft objects async, but it's a little trickier.

coarse forge
odd ember
#

patience

gentle urchin
#

Is a virtue

full flax
#

LoadAssetBlocking return value is not compatible with new mesh?

maiden wadi
#

Cast it back to StaticMesh

coarse forge
# odd ember patience

Yeah 😦 im being super motivated haha, one of those coding storms and knocking out lots of things.

full flax
#

Here's my first stab at it. Thsi is in construction Script, so it's not changing when I change the window type variable...what do I need to do to get it to change when it needs to? Event graph? @odd ember @maiden wadi thanks for the help thus far...if this is horrible work, please tell me 😉

maiden wadi
#

It should change there as long as a table row is being found.

#

This was one reason I was iffy on the datatable method. It requires you to look up the struct by iterating over the datatable.

twilit gull
#

how can i cast to random overlapping actor and get inherited variables?

maiden wadi
#

Casting just changes a pointer type to another pointer type. It doesn't actually communicate with objects. There should be a function that allows you to get the instances of overlapping actors, a few of them. If you have a specific mesh, use that and GetOverlappingActors. If you need to do it without that, use something like SphereOverlapsActors to generate a sphere and test with. Some of those come with casted arrays. Otherwise you just iterate over the returned array of actors and cast the pointer type to the one you need. If it succeeds, use the data.

twilit gull
#

well. i need to get specific variables from random actors in case they are implementing interface

#

and there are multiple possible classes inherited from one main that contains vars i need

maiden wadi
#

So cast each actor from the returned array to the main class your variables are in.

full flax
#

How do you even simulate a construction script? It's not changing when I change the enum.

#

when is the construction script triggered I mean

feral ice
#

Sorry for the interuption! I am a bit confused. How does Get Velocity work? It remembers my velocity before lerping between two locations why? The zipline is clearly nopt going in that direction...

full flax
#

when I run simulate it doesn't show anything happening

orchid star
#

because it is already constructed

maiden wadi
#

You can open the blueprint. It'll run whenever you compile. Or whenever you place a new instance of the actor class in a level or move it in the level.

orchid star
#

its not begin play

#

it happens even before game initalizes

#

its when it is
"constructed"

full flax
#

yes...so therefore, when I place the class it runs the script...then when I change the window type variable, nothing will happen because it's already constructed...I need an event right?

twilit gull
#

well, yes, but it requires me to specify the targetDolan

#

and i cant connect nodes

maiden wadi
#

Changing instanced editable variables will rerun it. But you don't have to place one to test it. Just compile the blueprint.

twilit gull
#

or if i cast till the parent class it will do changes in inherited child class this way?

#

cus variable value is specified in child class

#

not in parent one

tulip mason
maiden wadi
#

Why would you create an interface for having a child and parent class communicate?

twilit gull
#

Thats not parent/child
Thats actor overlap and get vars from it 😦
casting not leading to the variables i need unfortunately or i'm doing that wrong

maiden wadi
#

Do the actors you're trying to get the variables from all inherit from the same class, which is originally where the variables were specified?

twilit gull
#

Nope, vars are specified in child actor class that i'm interacting with

maiden wadi
#

Wait. When you say child actor, do you mean class or child actor component?

twilit gull
#

I have this structure:
Parent BP, that have var1 = None, var2 = None
Child BP1 Specifies other stuff
Child BP2 where var1 = blahblah, var2 = blahblah

maiden wadi
#

And these are what you're overlapping?

twilit gull
#

And i'm overlapping actor made from Child BP2, yes

maiden wadi
#

Then you can cast that overlapped actor to ParentBP class to access the variable.

twilit gull
#

but i get None

maiden wadi
#

From where?

twilit gull
#

get overlapping actors gives me Child BP2 if i cast to its parent i dont get specified vars

#

but i cant specify cast to Child BP2 cus there can be other actor with those vars, but have different values

maiden wadi
#

If you're casting to the parent class and getting the parent class's values, then it's an instance of the parent class or a class that hasn't overridden the values.

gentle urchin
#

Sounds like values are defined in the wrong class?^^

maiden wadi
#

That or you're trying to access class default variables, or you're trying to access a nullptr, and mistaking the value returned none as a set variable when BP is just returning an uninitialized type.

#

If you're actually overlapping an instance of Child2, and you cast that instance of Child2's pointer to ParentBP, you will get Child2's values.

twilit gull
#

hmm, should i somehow setup parent class for that? like abstract class or smth

maiden wadi
#

You already have, that's what your ParentBP is that has the variable created in it that you're setting inside of Child1 and Child2

twilit gull
#

so thats what i should do, yes?

#

thats parent class with None initialy

maiden wadi
#

Cast the actor pointer to a pointer type of the parent class, not the class itself.

#

That's why you're seeing the parent class values, you're getting CDO values.

#

Drag from OtherActor, CastToWeaponBPMain

#

Should give you a new pointer of type WeaponBPMain, you can drag off of that to get the Hold value

twilit gull
#

oh finally it seems I get it 😄

#

now it gives me the value i specified in child class

high ocean
#

Every day I get something weird with simple things... I have a simple teleport actor from point A to point B. Debugged everything, the values match, the actor returns the proper values, but it just doesn't move...

#

Any ideas? 😮‍💨

astral epoch
#

Will an array find node throw errors if the item in question isn't valid?

#

Like is it worth doing a contains node and branch before it or is that redundant?

high ocean
#

@astral epochIt will return accessed none if that's the question, as soon as you try to access info. From 4.25 or 26 if the array is empty it will simply early exit, before if it was empty still returned errors.

#

Or were u asking about the Array Find node? Then no, if any of the items u search are not valid, it will just ignore/skip them, and will return -1

astral epoch
#

I mean this thing

#

Inputs an array and an item to search for.

#

Though I'm thinking just validating that the item exists is worth doing anyways.

#

I'm using it in an event to essentially remove an inputted item from an array. Said item should have a particular index.

high ocean
#

@astral epochye 😂 sry, misread the first time. I had a bad experience with that unless it's simple data (ints, strings, names etc). For actors I got weird results 🤷‍♂️ And don't get me started with structs. But it works well with simple data

astral epoch
#

Right.

maiden wadi
#

Why not just simply call Remove?

astral epoch
#

Because I want to retain array's size.

#

So setting the array element to null works better here I think.

maiden wadi
#

Ah. Yeah. I'm fairly sure that passing -1 to a SetArrayElem will just not do anything. So you could likely just pass the Find value straight to that.

astral epoch
#

Yeah that's what I'm thinking. Current setup looks like this.

#

Validates that the inputted item is part of the array.
If it is, find that items index value, and then set said index to null data.

maiden wadi
#

@astral epoch Seems that passing an invalid index to the array will cause a warning. Could get extremely annoying for logs.

astral epoch
#

Interesting. Cheers.

maiden wadi
#

Checks IsValidIndex on both statements before defaulting to the error.

#

But it would work, no logic problems. Just an annoying log. 😄

rancid junco
#

Hi can someone help me im loosing my mind there's a simple thing that im missing and its driving me crazy

#

it eighter phases or goes backwards
and sometimes it works

#

its suppose to be seconds so i get the seconds and *6 so we will get 360d and ill do negative so it would go clockwise but idk what im missing

maiden wadi
#

@rancid juncoYaw and Roll go between -180 to 180 for 360 degrees total. Pitch only goes between -90 to 90. -90 is looking straight down -Z axis. 0 us perpendicular to Z axis, and 90 is looking straight up on Z axis.

rancid junco
#

im now im confused cuz first i didnt know that

#

second so im using it wrong? cuz -90 on this pitch in the editor is like this

#

oh ok i think i got it, im just being stupid again thanks

maiden wadi
#

Think of a rotator as representing the camera in a FPS game. You can't look up above 90 pitch, which is straight up, character would break it's back and fall over backwards. That was the consideration when FRotator was originally created.

rancid junco
#

yep got it thanks mate

#

should be okay now just change a few parameters and should be good

tulip mason
# twilit gull oh finally it seems I get it 😄

My point is having this will reference and load the whole blueprint even if you aren't using it, and if that blueprint is hard referencing anything else it'll also load that, regardless of if you're using it or not.

Especially if you only need one variable, which is a text.

Although if every variable in the parent class is blank it may not be an issue, just something to keep in mind in the future, otherwise you end up loading the whole game into memory in the main menu.

rose citrus
#

Does anyone know why this would happen? In my parent BP I set collision on a component to ignore a certain object. In the child BP, the collision is set to overlap on that object. If I then check ignore for that object and compile, it goes back to overlap. I'm so confused why this would happen.

odd ember
#

I don't know if the editor would self correct it though

#

but it may be what's happening

rigid fractal
#

why does a character blueprint work even on an empty level where there is no character?

#

it doesnt make sense to me

earnest tangle
#

Huh?

#

What do you mean a character bp with no character?

maiden wadi
#

@rigid fractal GameMode spawns a default pawn when the controller is created from the class that you set in the GameMode class.

rigid fractal
#

i have an empty level with no characters, but even when executing that level, the BeginPlay event of the character blueprint is executed

earnest tangle
#

Ah, yeah it's what Authaer said then

rigid fractal
#

but is it possible to get around this?

earnest tangle
#

Set your default pawn class to something else than a character I guess, unless there's something you can override in GameMode to stop it from being spawned at all

rigid fractal
#

ah ok

#

do you know where this option is?

gentle urchin
#

What are you trying to do 😛

#

spectatorpawn is great for a menu 😛

rigid fractal
#

thats exactly what i want to do, a initial menu

#

but i can't find the option where to change it

maiden wadi
#

Your project has a default GameMode specified. But you can also override that default in each map's world settings.

rigid fractal
#

but it is possible to change this through the blueprint, right? because when the game starts, i think i need to switch to the default game mode

gentle urchin
#

You cant switch gamemode easily when a map is loaded

#

you usually swap map

rigid fractal
#

aah, now i understand that each level has a different world configuration

#

but the initial menu level no longer has a gamemode by default, should i change this to spectator pawn?

fluid rover
#

If I have a Widget as part of a Blueprint, and that Widget has a Text component in it, what's the easiest way for the Blueprint to change the text in the widget?

#

I'm aiming to input a value in the placed-in-scene Blueprint, and have that value translated on Play to the displayed Widget text.

worthy rock
#

I have a DoorManager cpp class extending AInfo spawned by gameMode.cpp.
How do I fix my cast to that class? New Var 0 is AInfo

maiden wadi
#

Pretty sure you need to set that value. If it's spawned on GameMode, make a UPROPERTY(BlueprintReadOnly) pointer to it on your GameState. Your spawning code can Cast<AMyGameStateClass>(GameState), and set that pointer. Then you can call GetGameState->GetDoorManager->RegisterDoor(Self) in the BP

worthy rock
#

Thx!

#

I like how often times BP/cpp are just completely meshed together. So a bp question just ends up being a cpp thing haha.

brazen merlin
fluid rover
#

So just this? @brazen merlin

brazen merlin
#

Yep

#

Just need to access that var from wherever now

fluid rover
#

This is within the Blueprint. Widget class name is in gold, component for it is in Red, but I can't seem to call the variable?

brazen merlin
#

Never did it like this but im guessing you need to first know that its the teleport menu of the fadein component. Is there like a get widget node? I usually create the widget then store it as a var instead of a component.

#

I have a question for you though, since it is called fade in... you know you can animate widgets in umg?

fluid rover
#

I do know, yeah. Point here is to fade in the widget itself as basically a splash in front of the player with text set relative to where they are

modest sparrow
#

I created this simple widget blueprint, however it's not sending this event over to the server for some reason:

#

Server bp:

fluid rover
brazen merlin
#

If your willing to wait i can mock it up in a bit

fluid rover
#

Sure, I've got time if you're willing to show the method, would be much appreciated

brazen merlin
pliant jewel
#

Is there a way to poll a variable on map instantiation, and change game mode based on that?
I know I can pass parameters into the open level to handle this, but in editor when i simply hit play obviously I cannot pass those parameters in.

tropic pecan
#

Hey there, can I ask someone how to sort out a map with two enums base off of element and resistance reactions? I've tried to do it myself but nothing I've done so far has been working correctly. I've creation enums for these two things that must cooperate with one another and go to the switch setup for damage to get what kind of reaction but it hasn't been working. I'm just getting errors.

#

This structure was made to sort out units element reactions weather weak, normal, or repellent in some way.

tropic pecan
odd ember
#

can't you just say what the error is?

tropic pecan
odd ember
#

battleskill is what?

tropic pecan
odd ember
#

okay so it has no relation to what you're trying to do with enums?

tropic pecan
# odd ember okay so it has no relation to what you're trying to do with enums?

I added the enum for the dispatchers from the actor to the unit actor and it still gave the same reactions of not the correct reaction and errors at the end. I would imagine it will be hard to talk about cause one small thing seems to involve many. I only ask is their a way to make a reaction of element from first the skills as well as the resistance reactions to units.

odd ember
#

my first thought is that default collection values bug out often

#

so I wouldn't be surprised

#

my second thought is that you could probably solve this using breakpoints

tropic pecan
odd ember
#

that's what they are called

#

it's a debug feature

tropic pecan
odd ember
#

they just pause execution where you place them while playing

#

and you can hover over any pin while paused

#

and it will give you the current value

#

if you step over, it goes to the next node in the execution thread

tropic pecan
odd ember
#

it will most certainly help you

#

it is the best way of finding issues

#

bar none

modest sparrow
#

Why is this event not being sent to the server? I feel like I'm missing something with how UE replicates widgets.

odd ember
modest sparrow
#

Alright

tropic pecan
# odd ember it will most certainly help you

So, I made 2 enums based on elements and resistance reactions. I've added element enums in the battle skill attack base which was to sort out their elements. For the units, they have a map with variables based to both the elements and resistance together. The damage setup is in the unit base for reactions and a switch of the resistance. I then have a child blueprint of the unit base for separate units cause I tend to make different functions for units. I already added the default of the battle skill in the child blueprint and added their map. It's hard to explain it nicely but I'm trying to make units react to a element which is shown in the images. Is that any clearer?

#

I'm unsure of any other way to explain.

#

I need some time to think, maybe it has something to do with controller I think...

late gorge
#

im trying to generate random amount like so but it ends up being the same for all iterations of the for loop, am i missing something here?

odd ember
tropic pecan
odd ember
tropic pecan
odd ember
#

look up MathewW's videos on breakpoints

#

it'll give you an understanding

hearty ore
#

whats a good approach for the blue box to detect red boxes within a certain defined range, but not through walls (unless specified)?

#

basic on component begin overlap on the sphere collision doesn't fit this use case

#

i am familiar with raycasting in 2d, not sure how best to use it in this scenario

brazen merlin
#

approach wise..... to know/have an array of all red boxes, with another array (suppose a map could work instead) that knows their distance from. Updating that sort of thing doesn't seem too performant though. So maybe you could just do a line trace to box in the array to determine which ones are close enough

steel zealot
#

Hey guys. I'm using an Input Key Selector for a control rebind menu. Is there a way to set the text to show the currently selected key? Cuz theres no default option to do that, but idk if its possible through BP

hearty ore
brazen merlin
hearty ore
#

overlap works but it can detect through obstacles, unless i am using it wrong

#

this kind of overlap at least. are you referencing something else?

brazen merlin
#

for example, the pawn channel

hearty ore
brazen merlin
#

or else you need to filter it by a different means, such as checking if the overlapped actor has a matching tag

#

yes, it will overlap all, true, but this is still better because you can add and remove (based on begin and end overlap respectively) which red boxes to check for and then perform your raytrace to those whenever you want

#

no point raycasting to those beyond the sphere

hearty ore
#

gotcha, yep makes sense. thanks for the help

brazen merlin
#

great, sure thing

winged sentinel
#

Conrad I tried doing unposess then destroy and it still deleted the mesh

#

wait nvm i was deleting that character class not the controller works now

steel zealot
#

Ok so I've progressed a little in my keybinds and now I'm trying to set the 'No Key Specified' text to display the currently selected key, but somewhere in this BP I'm not getting something right. Anybody have any experience with this?

high ocean
#

😭 Help! I'm going crazy!

#

I have that code in the GI - it runs those functions. I reset the God damned var to 000, it shows 000 after exiting the function. I load a level, and it just goes back to the value it had before being clearly set to 000. WTF?!

#

that old value should not exist in memory anymore - right?! where does it retrieve it from?!

dark crow
#

Really depends, you have 2 vars here

#

One from SaveGame and one from GI

#

GI is indeed kept in memory till you close the game

high ocean
#

no, I'm setting the savegame var to the GI's var

#

not vice-versa

#

so when I read it there, it should say 000

dark crow
#

So you gotta reset the SaveGame one then

#

To 0

high ocean
#

I don't get it. And be that as it may for the savegame obj, my problem is that var controls another function handling player spawn on the next map - and i spawn 100kms off map because this isn't 000 as it should be when i transition (that's why I handle it in the gi)

#

the savegame function was just so i can cram in the example. The var is the "old" value when I grab it with the player pawn on the freshly open level.

#

This is driving me crazy 😶

#

This is from the PP on the freshly loaded level:

#

it's soon after beginplay & there's no other function setting that var anywhere else. double & tripe-checked.

dark crow
#

I think you may be overcomplicating things

#

You can handle it all directly with SaveGames

#

Only use the values inside a SaveGame, reset the value inside SaveGame when needed or read it from there

#

If it needs to be saved on disk

#

If only while playing, then you can use only GI

high ocean
#

Half my game is programmed in the GI because I jump levels for every encounter/fight. I can't re-write anything, it's released and this was a bug reported by some players "falling through the map" - then I find this. I don't even remember how the whole thing works - it's convoluted and old - not the best of my work.

dark crow
#

Yeah, it's rather messy to understand tbh

high ocean
#

So since i'm far beyond the point in which I can refactor a whole mechanic w/o introducting God knows how many bugs, I just want to understand how in the world a var set to 000 which appears to be set to 000 can suddenly fall back to some old value which shouldn't even exit in memory anymore since its been rewritten - wtf?! Could it be a bug? Should I just try to delete my interm and saved (loose the build and have to rebuild from scratch but meh - idk).
Question is: should it technically be 000 or am I missing something?

high ocean
dark crow
#

Are you sure the value is set to 000 in the first place? Debugged it?

#

The flow is important

high ocean
#

I just posted a pic while debugging - you can see the breaks 😆

#

how else would I hover over values and see them?

#

that's the exact flow there 😐

icy dragon
#

Having an entirely separate map for battle is sooooo last millenium

high ocean
#

I made this last millenium 😆 tell me about it: was a pain in the arse: GUIDS for respawns, no persistent values for anything so all is constantly tracked by the GI, actors reporting back & forth etc, costant worry about performance cos u don't want ppl to wait 15 secs every level jump etc.

dark crow
#

The only thing I can imagine is something running when you open the level and setting the value to that

high ocean
#

It was my first thought too - the problem is that the only function setting that value at that point is that. Nothing runs on tick so that can't be it, and the value is only called to set again when the player enters combat so GI can register its location and knows where to respawn next time (there are no enemies there).

#

@icy dragonAnd when I think I used some bones from this project in my current 😐 same thing, all tracked in the GI. I wouldn't want to rewrite this one either, it's faster to make a new game from scratch really... So guess I'm trapped doing this crap.

#

aaaand there's the level I should be on:

#

falling lol 🤦‍♂️ 😆

high ocean
#

but no no... that should be in the right place and can't do that nvm... It's too late

#

3AM lol

dark crow
#

It doesn't mess itself, there's totally something going on, you could try to see if the reset works properly without the OpenLevel

If it does, there's something that runs that messes it up

steel zealot
#

For anyone who runs into the same issue I was, this is how to remove current keybinding(s) set new one(s) and then show the currently displayed keybind in the 'No Key Specified' text field

high ocean
dark crow
#

You could use Find in Blueprints tool too to see every place the variable is called

#

Never know if there's a cheeky forgotten something

high ocean
#

I try to only post here if I just can't figure out myself - which is often lately for some reason xD

dark crow
#

If i can't figure something i sleep for 2 days and hope to dream about the solution

#

sob in a corner or such

high ocean
#

@dark crow ye, ima just fk it and check it fresh tmr 😆 thx anyway 🙂

calm mesa
#

is there a way to hotkey scripted actions?

quick lark
#

Hi there, for some reason the AdvancedSessions plugin is not being detected when I try to package the build.
Could not find a function named "FindSessionsAdvanced" in 'BP_Multiplayer_Menu'.
Does anyone know what I can try doing or looking for to debug this? I did Refresh All Nodes on all relevant blueprints.
Cheers 🙂

compact anchor
#

how do i lock a mesh's movement to a relative axis?

#

for example, i only want the center (which controls where the strings end) on the bow to only move in the relative x axis.

#

as you can imagine im doing this in vr so the player can pullback on the string. I tried the constraints settings but to no avail

brazen merlin
compact anchor
#

sockets?

#

never heard of them

#

whater they do

brazen merlin
#

looks like you sort of have them with lower/upper string no?

#

just realized its a static mesh too, sockets are for sk

compact anchor
#

oh

#

do you have a way of just constraining it so it wouldn't move on any other axis? currently even doing the most dumb (event tick set location) doesn't work

brazen merlin
compact anchor
#

yea

brazen merlin
#

what that attach code look like?

compact anchor
#

gimme a second gotta boot up unreal

#

sorry for the spaguetti

#

this is in a hand bp which the character has two of

#

each hand is attached to a motion controller

#

and using the grab function, a keypress on the player is relayed to the hand

brazen merlin
#

id guess Weld Simulated Bodies is overriding any independent transformation

compact anchor
#

oh

#

lemme try that

#

idk what it does tbh it was cheecked by defualt

brazen merlin
#

it "welds" them lol, i think its more more physics, but its also a guess

compact anchor
#

does this work for the locking?

brazen merlin
#

those are in the physics section?

compact anchor
#

yea

#

oh

#

is that why

brazen merlin
#

does your mesh simulate physics?

compact anchor
#

it has nothing to do with physics

#

no

brazen merlin
#

i think it's more for controlling the physics solver yeah

compact anchor
#

oh

#

is there a way to do it without physics then?

brazen merlin
#

i dunno, probably

compact anchor
#

ok I did it on event tick and it seems to work this time

#

this is a really stupid solution but idrk anything better

#

shouldn't be too expensive though

brazen merlin
#

considering physics is on it own custom tick, doing things on tick aint to bad

#

its also only while in hand, so i mean, thats pretty important while the player is interacting

compact anchor
#

oh ye

#

also doesnt work in vr

#

ik why though

brazen merlin
#

tick doesnt work in vr?

compact anchor
#

nonono i mean the string constraint

#

i think ik why

#

bc i attach the end of the bow to the other hand when ur archerying

#

i think in that case the local location is still 0 0 0

brazen merlin
#

if lower and upper string have world locations, cant you get the midpoint between them?

worthy rock
#

How can I bind to an event of a different class (An AInfo class from AActor)?
I tried this:

brazen merlin
worthy rock
#

doorManager.h:

UFUNCTION(BlueprintImplementableEvent, Category="DoorManager")
void OnTriggerMazeChange();
brazen merlin
worthy rock
#

Yea it's not there 😦 I guess I should ask in #cpp

brazen merlin
#

yeah, maybe its not called BlueprintImplementableEvent but something else

worthy rock
#

Maybe I actually want multicast RCP...

brazen merlin
#

multicast would be good for mp, but ED is essentially a function call

#

if you're called an event (red node) then just drag off your var and search for OnTriggerMazeChange

#

binding and calling events are different as you can see 🙂

worthy rock
#

Does BP have functions?

brazen merlin
#

yes..

rough cedar
#

is there any way to convert a blueprint actor to a scene component for a character?

brazen merlin
rough cedar
#

I'll try that!

obtuse herald
brazen merlin
#

disagree that its buggy, but i do think using Child Actor Components is more complicated

steady thicket
#

How can I place the reference of my "FirstPersonCharacter2" in the level blueprint? Do I just drag the object to the level BP or is that wrong?

gentle urchin
#

If its the player char you wanna change, doing it in GameMode might be the better way

eternal reef
#

Is it SinglePlayer? Get Player Character / Get Player Controller is the easiest way

gentle urchin
steady thicket
#

Because I tried it and checks if the Tarray I made in the c++ script contains the actors I set in the BP but the game crashes after running

proper umbra
#

Hey. Anyone know a solution to this issue I've been getting? After packaging a game and launching it, some events wont fire off

eternal reef
#

You are trying to cast from the Controller to the Pawn
Either you need to "get player character"
Or get the controller -> get controlled pawn

steady thicket
#

ahh yes, it should be get player character

eternal reef
#

Just note that it works like that only in SinglePlayer
In Multiplayer the player index would be required, but as in SP there is only 1 Player, the index 0 returns it correctly

gentle urchin
#

Multiplayer aswell afaik

#

index is for local multiplayer

eternal reef
#

@gentle urchin Wouldnt calling Index 0 always return the client?

#

(if its run on the clients side)

steady thicket
# steady thicket

another problem here is that the code found nothing in the TArray elements but I thought the level blueprint already set the Actors in the array? Here's my code:

{
    // Call the base class  
    Super::BeginPlay();
    this->collectibleList.SetNum(4);
    UE_LOG(LogTemp, Warning, TEXT("SIZE: %d"), this->collectibleList.Num());
    //gather all the collectibles
    if(this->collectibleList.Num() != 0)
    {
        UE_LOG(LogTemp, Warning, TEXT("SIZE: %d"), this->collectibleList.Num());
        for (int i = 0; i < this->collectibleList.Num(); i++)
        {
            if(this->collectibleList[i] != nullptr) //false result
            {
                UE_LOG(LogTemp, Warning, TEXT("Delete"));
                this->collectibleList[i]->SetActorHiddenInGame(true);
            }
        }
    }```
eternal reef
steady thicket
timber knoll
#

But you are literally creating them on beginplay

#

Ofc they will be null

#

You are saying in BeginPlay: make my array 4 long (starts empty), if there’s anything in there hide it

#

But nothing will ever be in there like this 🤔

eternal reef
#

I mean... the code just hides the actors, but it doesnt destroy them, so they should still exist?

timber knoll
#

Yeah but I don’t get the use of the script

#

If you make an array in blueprints after

eternal reef
#

Could you try adding a delay right after Begin Play of like 1 Second
Bc. I sometimes encounter weird situations when using code right after begin play as it basically runs before an actor has been spawned

steady thicket
timber knoll
#

No the C++ code should run first

gentle urchin
#

The list here doesnt make much sense

#

or rather

#

the list might

#

but the check doesnt

timber knoll
#

But regardless, you are literally creating a new array in BPs right after and copying it

#

So that makes the C++ code useless

gentle urchin
#

as pointed out the list is full of nullptr's , so it won't do anything

#

If you want to initialize the array in bp

#

you must first call a bp implementable event

#

before doing whatever your listcheck should do

#

Well... I guess thats the beginplay part

#

still its a bit odd. why even initialize the array, especially with a hardcoded value like 4 ?

#

Being set from BP it will be resized and filled from there

timber knoll
#

Well it won’t be resized/filled

#

It will literally remove the old and replace it with the new array

gentle urchin
#

Set Array will resize it

#

So it already has a size, suited for the pickups

eternal reef
#

Couldnt you create an array directly in the level blueprint that gets called in C++? (Not filling it after Begin Play)
So you dont mix up Begin Play in C++ and BP where they basically rely on each other

gentle urchin
#

refering to this part*

timber knoll
#

That’s interesting, I would imagine it did a copy

gentle urchin
#

If it did, i'd have no clue why some of my bp's work 😛

timber knoll
#

If you fill in that array in parameters

gentle urchin
#

Seeing that im mixing things here tho! Beginplay is in levelbp, so its not the super::beginplay 😕