#blueprint

1 messages ยท Page 25 of 1

radiant bear
#

it's a sequence

static charm
#

ah okay

#

was hoping it could split

radiant bear
#

this will give a sequence

#

based on the logic, which is set in another bp(only animation)

#

@static charm i can share my screen if it helps

static charm
#

nah it's good, i was just trying to think of how you can get somethign useful from the return

#

see if you can convert it to a string or get class or get anything from it

radiant bear
#

yep see what i can do let me what the node does first in cpp!

#

i think it returns a sequence but it's stuck on previous anim pose

#

also this node is from Animation locomotion library

static charm
#

not sure what you mean, timers/timelines don't work inside functions.

radiant bear
#
FSequenceEvaluatorReference UAnimDistanceMatchingLibrary::DistanceMatchToTarget(const FSequenceEvaluatorReference& SequenceEvaluator,
    float DistanceToTarget, FName DistanceCurveName)
{
    SequenceEvaluator.CallAnimNodeFunction<FAnimNode_SequenceEvaluator>(
        TEXT("DistanceMatchToTarget"),
        [DistanceToTarget, DistanceCurveName](FAnimNode_SequenceEvaluator& InSequenceEvaluator)
        {
            if (const UAnimSequenceBase* AnimSequence = Cast<UAnimSequence>(InSequenceEvaluator.GetSequence()))
            {
                const USkeleton::AnimCurveUID CurveUID = UE::Anim::DistanceMatchingUtility::GetCurveUID(AnimSequence, DistanceCurveName);
                if (AnimSequence->HasCurveData(CurveUID))
                {
                    // By convention, distance curves store the distance to a target as a negative value.
                    const float NewTime = UE::Anim::DistanceMatchingUtility::GetAnimPositionFromDistance(AnimSequence, -DistanceToTarget, CurveUID);
                    if (!InSequenceEvaluator.SetExplicitTime(NewTime))
                    {
                        UE_LOG(LogAnimDistanceMatchingLibrary, Warning, TEXT("Could not set explicit time on sequence evaluator, value is not dynamic. Set it as Always Dynamic."));
                    }
                }
                else
                {
                    UE_LOG(LogAnimDistanceMatchingLibrary, Warning, TEXT("DistanceMatchToTarget called with invalid DistanceCurveName or animation (%s) is missing a distance curve."), *GetNameSafe(AnimSequence));
                }
            }
            else
            {
                UE_LOG(LogAnimDistanceMatchingLibrary, Warning, TEXT("Sequence evaluator does not have an anim sequence to play."));
            }
            
        });

    return SequenceEvaluator;
}

this confirms it returns a sequence i didn't see any UE logs from this fun

#

i also logged her it's triggered also just not sure what's causing the character be stuck in pose

tribal gazelle
#

How would I attach a spot light component to the character's mesh from inside an actor component? Is that possible?

static charm
#

I was about to tell you to ask in the animation chat but seems it's full of questions and no answer at the moment lol.

radiant bear
#

yea i've been stuck with this from yesterday

dim gust
#

made all of this with "no collision" so the raytrace should pass throu em and hit the world, still no luck, now it doesnt hit nothing ๐Ÿฅฒ

radiant bear
#

i have a curve compression setting

#

might that be the problem?

dim gust
#

i need the G as my bff

static charm
#

sorry bed time here, goodnight and good luck everyone.

dim gust
#

we're doomed Adore!

radiant bear
#

i guess i can put aside distance matching for now or do it manually through cpp

dim gust
#

wtv we do we are doomed!

radiant bear
#

i'm not good at BP but will try to help

dim gust
#

im working with BPs

radiant bear
#

i mean your bp

dim gust
#

yes the float number is ginourmous because i was trying to hit the world

#

and he is so far

#

they were hitting the "space capsule" before i turned off the collision

#

now they dont hit anything

radiant bear
#

can you tell me what your trying to achive?

dim gust
#

i wanna be able to click on a country and then go on to another level xD

#

just that xD

#

in a certain country, already made a child for it on the world mesh

radiant bear
#

so your getting location based on mouse cursor?

dim gust
#

thats right

#

we're doomed adore!

radiant bear
#

can you show me the logic for when you click?

dim gust
#

still havent one, and i dont need to, like, when the cursor goes through the world it should appear that its hitting it

#

i only need that logic after

radiant bear
#

it's always casting and moving with cursor?

dim gust
#

@radiant bear

frosty heron
dim gust
dawn gazelle
#

As I said over an hour ago...#blueprint message
You just need to have a mouse click input, Get Hit Result Under Cursor, use whatever channel, filter out what you want and check what actor was hit.

radiant bear
dim gust
#

right

#

if the collision is on for the spaceship it still hits the spaceship

radiant bear
radiant bear
dim gust
#

of course

radiant bear
#

the float why do set it manual can you try Casting an endless ray and end it when it hits something?

dim gust
#

how do u cast an endless ray?

radiant bear
radiant bear
dim gust
#

my starting point is where the camera is at

stone pelican
#

Is there anything I can add to see if the character is moving? right now holding sprint will drain stamina even if my character isn't moving

dim gust
#

actually i dont have a ending point now that i think about it

radiant bear
#

like acceleration

radiant bear
frosty wadi
#

so i have to increase r.Shadow.Virtual.MaxPhysicalPages to get things to work properly but when i increase it to a cetian point or higher thne whne i try to launch the game after packaging it or whatever it csays it crashes

frosty heron
radiant bear
#
bool PerformLineTrace(AActor* ActorToIgnore, FVector Start, FVector End, FHitResult& HitResult)
{
    FCollisionQueryParams CollisionParams;
    CollisionParams.AddIgnoredActor(ActorToIgnore); // Ignore the actor that initiates the trace

    // Perform the line trace
    bool bHit = GetWorld()->LineTraceSingleByChannel(
        HitResult,    // Output Hit Result
        Start,        // Start location
        End,          // End location
        ECC_Visibility, // Trace channel (you can define your custom channels)
        CollisionParams
    );

    return bHit;
}

this how you would do it let me see if i can give you a bp version or you can make a cpp file use this function expose it to bp and use it there

dim gust
#

omg C++? D:

#

would love to learn

#

just know a little of C# and GDScript

lunar sleet
#

#cpp has some good resources pinned and a very knowledgeable crew

frosty heron
#

You can use that function in bp

#

Lin's trace by channel

radiant bear
#

in your cpp

#

it's valid

dim gust
#

how so? I can paste that in my BP? o.o

radiant bear
radiant bear
dim gust
#

i have Visual Studio if it helps... x'D

dawn gazelle
#

You do have an end point for the trace which is your camera forward vector (so whatever direction the camera is facing) * that really large float (so it'll be a point somewhere that far away in the direction of the camera) + the camera location (so it's in line with where the camera is)

radiant bear
lunar sleet
#

what are we doing here, reinventing line trace? ๐Ÿ™‚

radiant bear
#

or any ide

frosty heron
#

Why? What do you need?

dim gust
#

ok ill make a new video showing whats goin on

frosty heron
#

Endless trace? Just shoot a projectile with box collision and give it a long life time

#

Nothing should be endless imo

lunar sleet
#

what could go wrong ๐Ÿ™ƒ

frosty heron
#

Asking for infinite is asking too much

radiant bear
#

so you know how to make a cpp class in unreal?

radiant bear
frosty heron
#

U still need beginning and end so what exactly the strategy here

dim gust
#

here it is the problem

#

u can see that when i put my "spaceship" with collision

#

the ray detects it

#

when i put it off

#

it doesnt detect the world

#

i want it to detect the world!

#

xD

dim gust
frosty heron
#

So Ur issue is u want to do linetrace that doesn't stop at first object it hir?

#

Then use multilinetrace node

lunar sleet
#

that make literal float is...interesting

dim gust
#

i want it to ignore the objects but that doesnt ignore the world

frosty heron
#

Then use custom channel for the hit test

dim gust
#

its a ginourmous number because the world is really far away from the spaceship

radiant bear
lunar sleet
dim gust
radiant bear
dawn gazelle
#

"No Collision" doesn't do what you think it does.

radiant bear
#

i'm not fluent in bp

lunar sleet
#

away with you demon ๐Ÿ™‚

radiant bear
frosty heron
#

Add custom collision channel

dawn gazelle
#

He is tracing for objects, namely "WorldStatic". WorldStatic is blocked by "No Collision"

dim gust
#

so what ur saying

#

is that he is detecting the spaceship

#

anyway

frosty heron
#

What u gonna do in cpp anyway? What's the actual start

dim gust
#

even if i set it to no collision

dawn gazelle
#

Yes. Because it's blocking the trace.

dim gust
#

i see

radiant bear
dim gust
#

and wt hell is cpp? I thought unreal worked with BPs and C++

radiant bear
dawn gazelle
#

C++ = cpp

lunar sleet
dim gust
#

ow

frosty heron
#

What's the content to fix his problem

radiant bear
lunar sleet
#

oh right, it's the wrong field

radiant bear
dim gust
#

Adore pfp from a distance looks like Newt Scammander from Fantastic Beasts

#

love it

radiant bear
#

it's just a bool you get an idea

frosty heron
dim gust
#

wow.... i wanna be a nerd like u guys, truly

#

i wanna get into the conversation

#

and give my ideas

radiant bear
dim gust
#

for now i just know that i must ignore the spaceship totally

dawn gazelle
#

"Get Hit Result Under Mouse Cursor" == "endless" trace.

dim gust
#

he wants to start in a location outside the spaceship if im not mistaken

frosty heron
#

Oh u can do that?

dawn gazelle
#

Just need to set collisions up correctly.

frosty heron
#

I mean the endless trace

radiant bear
dim gust
#

but u also needed if i recall

dawn gazelle
frosty heron
#

Then maybe should just do this, that's exposed to bp

#

Actually don't want to butt in, gl

radiant bear
#

GetWorld()->LineTraceSingleByChannel

radiant bear
#

he can call the bool fun i mentioned above where we wants to cast or just on updated

#

for testing

dim gust
#

so

#

u want me to replace this

#

ok guys nvm ive taken 2 much of ur time, i will do it one way or the other grrrrr

#

xD

#

Thanks โค๏ธ

frosty heron
#

Look at how to set up collision channels

#

And when u trace just give it a long number

#

I haven't seen anything that define endless trace yet, maybe under cursor just have a maximum range?

Don't know how you can give direction and location but no magnitude

dim gust
#

well the camera is static if that helps

radiant bear
#

in bp you need a endpoint defined

radiant bear
dim gust
#

thanks man, if u want i can cast my screen for u

#

that would be life saving ngl

dawn gazelle
dim gust
#

ill try that o.o

#

@radiant bear look at Datura go D:

frosty heron
#

@dawn gazelle how does the get under mouse cursor trace work?

#

I don't have editor on me rn

dim gust
#

wait wait, let me try Datura method and ill come back atcha

dawn gazelle
#

Just need to make sure whatever trace channel you have defined on the get hit result isn't being blocked by anything in the foreground before it, and that the thing you want to check overlaps or blocks it on that channel.

radiant bear
dim gust
#

maybe im just that noob

dawn gazelle
#

Right click on the "Hit Result" pin and select "Split Struct Pin"

dim gust
#

WORKED

#

ur a genious!

#

let me continue with ur bp

#

aham

#

i think that everything is how its supposed to @dawn gazelle

dawn gazelle
#

Not seeing any mouse cursor on the screen... You need to press your interact input to show it?
You are using the right click input node but you have the print string saying "Left Pressed" Make sure you're actually clicking right click and you should see something printing on screen if this pawn is controlled.

dim gust
#

ur not seeing the mouse because of my obs settings

#

OWWWW

#

IT WORKS WITH THE RIGHT CLICK

#

i mean it just says hit actor xD

#

not sure if im hitting the world

dawn gazelle
#

Ok, now you may need to verify that the actor you want to hit responds to the Camera channel.

#

(Should have Camera blocked)

dim gust
#

i was hitting basically everything xD

lunar mulch
#

I'm enabling and disabling camera lag to smoothen out the crouching camera transition. However whenever the camera lag is disabled inside the bp it will cause a slight jitter to the camera in-game. Is there a way to reduce this somehow? I've spend hours trying to make the camera transition smooth. Scratching my head at this point.

dawn gazelle
# dim gust i was hitting basically everything xD

You got a response from Hologram2. Again, you need to verify the collision settings on the thing you actually want to register. So if that's your planet or some other actor on the planet or what have you, look at its collision settings.

dim gust
dawn gazelle
#

Not sure if "Default" responds to Camera trace channel.

dim gust
#

let me check the hologram one

#

weird? o.o

#

it responded to the hologram

#

however

#

its set to block all dynamic

#

weird?

#

xD

dawn gazelle
#

That's different than Default.... Try putting your planet to Block All Dynamic and see what happens.

dim gust
#

yup

#

well at this point, we might get a rope

#

and a chair

frosty heron
#

Or make a custom trace channel

#

And have the world block it

dim gust
#

guess ill have to look into it

#

its just weird that @dawn gazelle method didnt work

#

really

frosty heron
#

It work wtf

dim gust
#

not for the planet

frosty heron
#

Cuz u got meshes that block the cam channel

dim gust
#

do i?

frosty heron
#

He told you to ensure that your meshes don't block it

dim gust
#

Theres no glass there

#

in the window

#

its open space

frosty heron
#

It detects hologram

dim gust
#

yes it does

frosty heron
#

So the hologram blocks the world

#

Because it blocks cam channel

dim gust
#

how the.... its not even in front of the world

#

its not even big enough for that

#

and it just responds when i click on it

#

in the hologram literally

#

besides

#

both hologram 1

#

and hologram 2

#

respond

frosty heron
#

Select Ur hologram in the world outliner

#

Then set the view mode to wireframe

#

The plane must be bigger than what Ur naked eyes van see

dim gust
#

ok u want me to put the hologram near the world right?

#

and set everything to wireframe

frosty heron
#

I will just add a custom channel for special need object

#

And I can forget about all the hologram or w.e u place in the world

dim gust
#

Cold Summer, i would do that, i would de really happy to do it if it would help, but im a newb, i needed instructions

#

is there a tutorial or wtv?

frosty heron
#

Youtubeable yeah

dim gust
#

can it be a "new object channel"?

#

and i put there the Earth

dawn gazelle
#

Sure

frosty heron
#

Or planets ๐Ÿฑ

dim gust
#

im seeing a lot of tutorials but they dont use BPs hmmm

#

how would the BP be in this case?

frosty heron
#

Wdym? They all should be in bp

#

In thr project setting

dim gust
frosty heron
#

I opened enough videos today

dim gust
#

xD

#

yeah maybe i should sleep over this x.x

#

been on this for 2 long and tried lots of stuff

frosty heron
#

I opened it anyway because u said it's not in bp

dim gust
#

my almost 31 year old head cant handle it

frosty heron
#

But it's in bp so I dunnoe wat u mean

dim gust
#

u have a funny personality xD

frosty heron
#

I'm 32

dim gust
#

i opened enough videos today

#

welp i opened it anyway

#

xD

frosty heron
#

Yea cuz I sense bs

#

And I was validated

dim gust
#

wdym? Theres no bps for the collision

#

he just messes with the collision in the details

frosty heron
#

U create the new channel in project setting

dim gust
#

yeah i did

frosty heron
#

Then u set the channel correctly for your world

#

Then all that's left in the bp is to do what datura says

dim gust
frosty heron
#

But change the channel from camera to earth

dim gust
#

OOOOOOO

#

NOW IT MAKES SENSE

#

THANK YOU

#

u.u

#

in the earth i put block

#

and the other ones i should set to ignore?

#

or overlap

frosty heron
#

Depend on your game

#

But if u just want the earth or planets

dim gust
#

i just wanna click in Portugal which is my country, then a second level comes

frosty heron
#

Then don't make it block for others

dim gust
#

i already have a child in portugal

#

i mean a child from the planet

#

xD

frosty heron
#

Click on random actor in your level and see if the earth is set to ignore

dim gust
#

its set to block

frosty heron
#

Then you have a problem

#

When you create the custom channel, set the default value to ignore

dim gust
#

okok

#

like sio

#

so

frosty heron
#

Try to see what collision look like on static mesh placed in the level

#

If it's still set to blocked then I dunnoe maybe start over

dim gust
#

they r set to ignore

dense jacinth
#

However, when I load that level, I don't get anything. What I'm assuming is happening is my character isn't actually spawning

#

when I try to play the level in the editor it works fine

Do I need to manually initialize the level by spawning in the character myself? or am I using the wrong node

dawn gazelle
#

You probably want to do "Open Level".

dense jacinth
#

I just changed the node and it works just fine
Thank you, I was assuming I was just doing something very simple wrong

#

Is this load level instance for if you need multiple instances of the same level for some reason? Assuming some sorta multiplayer thing?

dawn gazelle
#

Level streaming / World Composition.... Basically allowing you to expand the world as needed.

dense jacinth
#

ah.. to save on memory I'm assuming? for very large maps

#

Well, I'm just doing 2d stuff right now so it's probably fine for me to stuff each level into it's own "level"

#

I'll learn about level streaming when I get around to needing it

#

hm... actually just noticing a strange issue now that I reloaded the level

#

I'm unsure if this actually counts as a blueprint related question but I'll continue here for continuity

#

so I have two actors that are basically just a collision box, and a "paper tile map component", I got it from dragging a tile map into the viewport

For example, this

#

however, when I reload the level, the actor sprite disappears and the... (box?) gets strangely enlarged, although it appears to be only visual

#

on the right there's a normal looking heart, I just dragged that one onto the map and it's just fine

#

even when I play the level the two actors aren't visible, although one of them is a launch pad and it still works just fine, so the collision box is still there. Also the launchpad collision still appears to be in the proper place and size, which is why I think the box enlargement is only a visual error, or else the collision area would be too large

#

anyone have any idea what's causing this issue?

If I reload the level again the new heart ends up disappearing as well

#

Checking the actors themselves, they're not set to "not visible", and changing that setting doesn't make them reappear

dim gust
#

@dawn gazelle how do you call a blueprint to a cpp?

#

I already tried so many things to my bp. Iโ€™m thinking that maybe with cpp I can do the raycast properly

dim gust
crisp urchin
#

you cannot call the actual bp nodes

#

just the c++ than it inherits

dim gust
#

No. I meant. Doing a certain part on a bp and another one in cpp

#

Itโ€™s doable

crisp urchin
#

your wording is confusing

dim gust
#

Im Portuguese ๐Ÿ˜Œ

novel rock
#

This works but is it the right way?

dim gust
#

It works?

novel rock
#

yes

dim gust
#

Then itโ€™s the right way

novel rock
#

Time to give myself some well deserved pats on my back.
Good job me for properly programming with blueprints. ๐Ÿ˜‰

true igloo
#

Why does unreal allow a Bp reference to have multiple in connections. This caused a crash for me, and I canโ€™t think of a reason to allow it as it seems dangerous, so why have it happen at all? Is the idea that you can have ifs and hope that only one is always sending?

solemn basin
#

I'm making a card game and using a widget for the hand. I can get the front of the card, but how would I get the back of the card?

frosty heron
frosty heron
#

And FYI u do it the same way cpp or bp

dim gust
frosty heron
#

U are using line trace by channel

#

Ur job is to ensure that the channel are set right

dim gust
#

If I move the earth really close to the spaceship it can detect the earth

#

But it has to be really close

frosty heron
#

That's not solution

dim gust
#

I just said I found something

frosty heron
#

Maybe under cursor has range I dunnoe, nothing that I know allow for infinite distance cast

#

Don't have pc on me to check the implementation

dim gust
#

Dw I will check it out tomorrow. Itโ€™s 5:40 here xD

frosty heron
#

U can do line trace by channel again. Change the channel to earth and make sure that the range is at maximum number unreal allow you to write

frosty heron
dim gust
#

Told ya von Carlo

crisp urchin
gentle urchin
gentle urchin
# novel rock

Why is there a sequence + flipflop + 2 set active nodes

#

Ah 2 cams.

#

Third + first, gotcha

#

You could solve this with 1 bool and two set active nodes.

red berry
#

Why are some of my blueprint size maps 200mb? Is this too much and should I somehow try to lower it? I heard about people using soft references, but I've never found why and how to use them

gentle urchin
#

Its to avoid just that

frosty heron
#

This week Christian Allen will provide an overview of Hard & Soft Object references in Blueprints, why the differences are important to know about, and how you can utilize Soft Object references in your project to help with memory management.

Watch Inside Unreal live at twitch.tv/unrealengine, Thursdays @ 2PM ET

DISCUSSION THREAD
https://forum...

โ–ถ Play video
gentle urchin
#

All assets that are hard referenced are loaded along with that class

#

Including other classes (by casting or storing har references to them)

frosty heron
gentle urchin
#

Soft references are loaded on demand with Load Asset Async

gentle urchin
frosty heron
golden gull
#

Guys I have a theoretical question, if you were to make different types for doors like a sliding door, rotating door, locked door and etc. would you make a base blueprint and then inherit each new type of door off of it and add the new logic or would you just make one big component and add variables to control which type of door it is ?

frosty heron
#

Make a base door and inherit from it for diff types of door

#

Base door should handle common logic like loced

gentle urchin
#

Door logic + transform lerps

#

Sliding door is a lerp of location

#

While hinged door is a lerp of rotation

#

So if you make a lerp based on transform, you have your base door bp

#

Wrap the lerp logic in a function and you can modify it on child bps if needed (double sliding door f.ex )

spark steppe
#

does GetAllActorsOfClass just look at one big array or is the data more like a class tree?

keen hedge
red berry
frosty heron
red berry
frosty heron
#

Think about icons in your inventory

#

Sounds in specific levels

#

If u can change between skeletal mesh for your character that can also be soft ref

#

Imagine you hard ref everything in your data table

#

That will load the entire thing once u run the game

tame pecan
#

no need to soft ref that

frosty heron
#

If it's something that gonna be loaded like your player character then don't bother with soft ref

tame pecan
#

that was their question

red berry
#

I might as well ask about both since they're both confusing.
My Item blueprint is 223mb, 220mb of that is the player blueprint. Why is this not only 3mb?

frosty heron
#

If u have hard reference to your item bp in your character bp

#

Then you will load the entire item bp

#

Downside of blueprint

tame pecan
#

and let the children do the asset referencing

keen hedge
#

The bigger problem is that your player bp is 220mb ๐Ÿ™‚

#

It's probably okay if your item references the player ,as I assume you want to load the player right away anyway. Now why is player referencing 220mb of assets, thats another story

red berry
#

So there's nothing I can do about that?

Also my "Item description" class has a "StorageImage" variable which is a MaterialInterface, hard reference. Should this be a soft reference since its the icon of an item and it won't always be loaded? How would the game know what icon to load?

This async loading stuff is confusing for unreal engine. In javascript web development, its more easier to understand because of "skeleton UI" and loading spinners, which show by default, then once loaded, the asset replaces that.

keen hedge
frosty heron
#

If your item reference an icon and your player reference the item. The icon will be loaded regardless u need it to show up or not

#

Use soft ref on your icons, texture, skeletal mesh

#

Load them as necessary

red berry
#

My player BP is ~200mb because its referencing Manny and Quinn. I don't think theres a way to reduce this?

frosty heron
#

There is

#

Soft ref away ๐Ÿ™‚

keen hedge
#

You can soft reference manny/quinn and either async load or make a loading screen where you would preload your immediately required assets

tame pecan
#

no need for soft refs

red berry
#

I didn't do anything special to the blueprint. It was like that from the thirdpersontemplate

tame pecan
frosty heron
keen hedge
tame pecan
frosty heron
#

It really depend on the scenario for example my player character have 20 skeletons to chose from. Which in this case I would totally need soft ref

#

I didn't say he has to do it but he asked how to not load

#

Soft ref is the way but Wether u should is different question

red berry
frosty heron
#

U can async load class but don't know if u have to

keen hedge
#

You can soft reference entire blueprint classes as well

frosty heron
#

Most of the heavy stuff is like textures sound and material

red berry
#

Yeah thats what I'm thinking, just the heavy stuff that takes up lots of MB/GB I will soft ref. The logic I'm not going to bother with, like the logic for inventory or for handling pickups. They should work, even if the player can't see the actual item (or if the item is just a LOD or placeholder)

keen hedge
#

You don't need to worry about code/logic size when it comes to loading unless you're worried about cache locality etc but you shouldn't worry yourself with that stuff off the bat

frosty heron
#

I assumed you used data table for your inventory? In which case u should totally soft ref the icons or material

#

Imagine loading 200 icons when u don't have to

gentle urchin
#

Or 200 meshes

#

With materials and all

#

Even in your manny quinn example

#

Do you really need them both loaded, always?

red berry
#

How do you make the default player class soft reference the mesh? I don't see an option
No idea the difference between 01 and 02, are they male or female or lods?

keen hedge
#

Next to the variable type, the little colored ellipse, click it

#

Actually just checked, depends on where it is

red berry
#

I know that, but there's no option for the Character. I created a new empty third person template project, and the BP_ThirdPerson size map is 200mb

keen hedge
#

Oh if you want to change the skeletal mesh, you don't put it as a default

#

Instead you put it in a variable (of a soft ref type) and you can then async load it in your event graph and set it on your Mesh component at runtime

#

That way your class wont have a hard reference to it and you'll see the size diff

#

But like I said before, unless you're customizing the character (character creator or different meshes per character) you probably dont need to do this

#

Because it adds complexity and now you likely need a loading screen etc etc

#

This is instead useful for things you don't need ALL the time. Like UI icons etc etc

red berry
#

Yeah I'll worry about that later, I was just trying to get the whole soft reference thing to work, that way my other blueprints won't be 200+ mb just because they reference the player

keen hedge
#

Do note that the blueprints themselves are not "200mb", the skeletal mesh and all its assets are. That means that once that is loaded once, it's not loaded again for each individual thing referencing it

frosty heron
#

Sent you video earlier by epic on how to do async load.
They actually did the skeletal mesh of the character. So if you need some exercise to get rid off many and Quinn from the map then the video should tell you all you need

red berry
#

Yeah I'm 1 hour in and I still struggle to get it, so I'll have to rewatch. I do understand that they have a default skin, and while the game is running, after the second skin is async loaded, the character changes to the second skin. But I don't know how to implement it myself.

I tried to play around with removing the reference to the quinn mesh in a new third person template project, and it works. The sizemap is only 7mb now. But the player mesh has disappeared. I have a soft ref to a mesh, which is exposed on spawn, but there's no option to set it in the menu, since there's no player blueprint in the game world. Its spawned by a player spawner.
I guess there's no way to set starting variables for the player?

frosty heron
#

It's only 3 nodes isn't it

#

Soft ref = address

#

Think of it as path to the object

#

U use async load to resolve the path to a hard ref

red berry
#

I kinda made it work on a new third person template project. I can spawn another third person character, with the default mesh as quinn, but the blueprint is still 7mb.
Idk how to make it work for the player that gets spawned by the player spawner

frosty heron
#

On begin play, get the soft ref, async load , on completed cast to skeletal mesh.

Get mesh-> set skeletal mesh from the cast return value

#

So naturally Ur mesh should be empty at the start

#

If u already have Quinn there then it's loaded already

red berry
#

Not working in begin play?

frosty heron
#

From object to the new mesh

#

Is the new mesh the Quinn skeletal mesh?

#

From object cast to skeletal mesh

#

Then plug it to the new mesh

red berry
#

Do I gotta cast it?
New mesh is Skeletal Mesh

frosty heron
#

Yeah cast

red berry
#

Still invisible, and thats just for the ThirdPersons I manually place in the world

frosty heron
#

Print string to make sure it runs

red berry
#

Yeah i put it at the end and it prints, but no show. This is in beginPlay

frosty heron
#

Can you print string the skeletal mesh?

#

See what it says

red berry
#

This doesn't print, so I assume the cast has failed.
If I print the skeletal mesh its an empty string, so nothing

frosty heron
#

Yup

#

What is the type of your soft ref?

keen hedge
#

What is New Mesh, what type?

red berry
#

Skeletal Mesh (soft object reference)

keen hedge
#

And did you maybe forget to set its value to manny/quinn (for example the default value in Details pane)

#

Then just print the Object to see what it is

red berry
#

For another instance of ThirdPerson (not the player character that gets spawned), I set these details.
"Mesh" is set to none, and "New mesh" is set to Quinn

frosty heron
#

Can you print string the object

red berry
#

If I set the "mesh" directly (and not "new mesh"), the mesh appears, but that makes the whole soft ref async loading pointless
Which object?

frosty heron
#

From async load asset

#

It has object as the output. Print string that

keen hedge
#

Btw where did you put this code, is it begin play or what?

red berry
#

It gives nothing.
I put it in beginplay

keen hedge
#

Can you just set a bp breakpoint on the cast to see if it ever actually finishes loading

wooden wagon
red berry
#

Yeah I forgot to mention it fails to cast

frosty heron
wooden wagon
frosty heron
#

Imma shower, might take a look later

frosty heron
keen hedge
keen hedge
# red berry

Can you show us how you defined the variable? Sc that and the details pane pls

red berry
#

I print string the object instead of Skeletal mesh (output) and its still "" (empty)

frosty heron
#

U gotta do it after completed

red berry
frosty heron
#

New mesh is empty

crude spruce
#

I do melee traces on weapon actors.
the system is extensive when it comes what needs to be communicated.
Im current interfacing the weapon to a component on the target. And plan on working this into a sort of hub for resolves.

But does anyone have a recommendation beyond** weaponactor > target interface > actor component**?

keen hedge
# red berry

I did everything exactly the same and it works

frosty heron
#

So for his player character that get spawned it will fail

keen hedge
#

It's not, he set it on the instance

red berry
#

wtf now it works. But I had to move the async code around

#

But "PlayerStart" doesn't allow me to set "New Mesh", so the player's version of BP_ThirdPerson is still invisible

keen hedge
#

You can just set the default value in the BP class

#

Instead of dragging it into the level and setting on the instance

red berry
keen hedge
#

Do note that your character now might be invisible for a couple of moments while its mesh is being loaded

red berry
#

Is that where loading screens come in?
What about for icons? Should there be some placeholder loading icon, then once its loaded, the icons appear properly? Kind of like how websites do it?

Also if you were playing an open world game, and you walk near an enemy area, wouldn't the enemies pop in and look glitchy for a few frames until they're loaded properly? Should you async load when the player is far away?

keen hedge
# red berry Is that where loading screens come in? What about for icons? Should there be som...

Depending on your game, yes. Modern games do it by having your character crawl through a crawlspace or climb a long ladder while stuff is being loaded lol

What about for icons? Should there be some placeholder loading icon, then once its loaded, the icons appear properly? Kind of like how websites do it?
Icons typically load very fast

Also if you were playing an open world game, and you walk near an enemy area, wouldn't the enemies pop in and look glitchy for a few frames until they're loaded properly? Should you async load when the player is far away?

That is a whole other can of worms involving level streaming / world partition etc etc. Usually you would stream in adjacent "blocks" of the huge level etc

thin panther
#

You would also typically roll your own significance manager or something that will handle updates of things, and loading necessary references a bit out of view

young meteor
#

How can I update material parameters from code in my widget?

#

In this example I'm trying to have some borders around a skill icon in a skill tree change based on unlocks.

frosty heron
#

Set texture parametre value

young meteor
frosty heron
#

Get your material instance dynamic -> set texture parametre value

#

U will need to use dynamic material

#

To change something at run time

#

Create dynamic material instance, pick your material. Add it to the widget.

Then promote that material instance as variable.

From there you can set the texture parametre value

young meteor
#

I'm not even sure if I'm formulating this quite right.

I have a skill tree widget. In which I'm using a "skill node" widget I have made.
In this "skill node" widget I have set an image to use my material.

Not sure if this changes anything.

frosty heron
#

Read what I suggested above

young meteor
#

reading

versed sun
frosty heron
#

You can change anything from the material. Texture scalar or vector

#

Just set your parametre name accordingly and with the right type

versed sun
#

and Vector will be a Linear Color

young meteor
#

Still digesting. Don't worry. ๐Ÿ˜„

versed sun
#

And , FYI, you only need to Create and Set the Dynamic Mat once , after that you can just Set Parameters at will

young meteor
#

Think you already tried to tell me, but to set a color I do what?
It wants a float?

versed sun
#

Vector

young meteor
versed sun
#

Set Vector Param

young meteor
#

ah

#

my bad

#

Need to do this for every skill node.

Guess I just collapse this into a function with the inputs to not bloat then code, and the loop through all nodes. Sounds good yeah?

frosty heron
#

Don't know how you setup your widget but there is a few time where you have to redo something over and over

#

Is your widget an individual button? Then that's a problem

#

Your skills node should be a base class widget on its own

#

With function that create and set the material

young meteor
#

It is its own widget yeah.

frosty heron
#

Then you can move this to the skill node widget to avoid doing it as many times as your skill node

young meteor
#

Good point.

#

Just create an public variable in there I can set from the "skill tree" side.

#

Thank you very much. Both of you. ๐Ÿ™

gentle urchin
#

I prefer feeding the data into the sub widget

#

And let it handle itself

#

When skills are activated i suspect you can grab some identifier of which one got activated

vital cargo
#

Can someone assist me with this possibly? So I have a spline which I use, I need every 2nd mesh to rotate 180 degrees, which is does but now the location is off and I don't know how to fix it.

young meteor
# gentle urchin I prefer feeding the data into the sub widget

The sub widget is a button forwarding the "button clicked" event.

I'm thinking when a player click in skill tree, I cast to Game Instance to set it as unlocked.
And the sub widget itself will have a reference to Game Instance already, and update it's parameters based on logic.

Sounds right to you?

vital cargo
vital cargo
versed sun
#

That would be with your Origin point in your mesh

young meteor
#

Sorry if I'm asking a stupid question here.
If I cast to Game Instance and make a reference because I want to use a value from it.
Is that like casting to it on every tick to check if it is a new value? (In other words bad performance)

Asking because it would be for every skill node.

#

I could get around it by casting and checking a value when a node is actually pressed. This just seems easy.

versed sun
#

Game instance can never change

gentle urchin
#

I wouldnt worry about casting to GI

versed sun
#

Save it once at the start and you are good

gentle urchin
#

Thr othet way around is another issue ๐Ÿ˜

young meteor
#

I don't mean if GI change. I mean a value in it. Like Player Level in the screenshot

dawn gazelle
#

A value changing doesn't cause any additional execution of code unless the event that is changing the value causes additional code to be executed.

gentle urchin
#

Spoken like a true yoda

young meteor
#

So if the parameter is set based on Player Level like in the screenshot, it would not update itself if the Player Level in GI changes?

dawn gazelle
#

Correct, unless you had some sort of function that you use to update the Player Level to call additional code.

versed sun
#

if that is on tick, dont re-make your Dynamic Mat

young meteor
#

Got it. So I will update it when the skill node (button) is pressed then.

dawn gazelle
#

Or.... You can create a function to update the player level and have it call an event dispatcher in the game instance and call that function in every place that you update your Player Level variable. If other things need to know when that Player Level variable changes, they can bind to that event dispatcher in the game instance so they can do things based on when the value gets changed.

You also don't want to keep recreating your dynamic material instance. You should only need to do that once - you can promote it to a variable and modify when needed.

young meteor
#

Yeah, was a bit too quick there.
Same for GI reference. Can do those 2 on construct.

#

Thank you to all of you.

gentle urchin
#

Event dispatcher is the way to go

#

Then any class who cares can just subscribe to that, and get the new level whenever it changes ๐Ÿ™‚

young meteor
#

But it complicates, because Player Level is just a quick example to show something here.

Really I need a map with structs (I think) to keep track of node unlocks.

And if I bind to an event all nodes need to listen to that event and update.

Still consider it a better solution?

gentle urchin
#

Dispatcher helps regardless

#

I just have an array of gameplaytags for unlocks

#

Well, a struct with tag + int

#

As some nodes are stackable

young meteor
#

You still don't prefer to just run the code on the node that was clicked like this? (still swapping Player Level for something else)

tall field
#

Is there any way to use the "OnNotifyEnd" node when playing a montage? I've tried making a notify named "OnNotifyEnd" but it doesn't seem to work

gentle urchin
#

Or a level gained etc

versed sun
young meteor
versed sun
#

ok, Make the Dynamic mat first , then set your brush to it

young meteor
young meteor
#

Thank you Ryck0Shae. Saved me time for sure ๐Ÿ™‚

versed sun
#

ooohooohoo....
When playing in New window, if you Ctrl-Z , it will undo changes you made in editor

haughty egret
#

So, can someone please explain to me how to get Enhanced Input to trigger only once for a key press?????

versed sun
haughty egret
# versed sun

Thanks for replying, unfortunately I tried Started however it will activate even if a trigger condition is false.

#

So if I have a chorded action, how could I get a single trigger on press?

versed sun
#

sorry , no clue on chorded stuffs

gentle urchin
#

If all else fails, you can always block the tick one with a gate ๐Ÿ˜… not something i'd do unless i was desperate

remote meteor
#

chorded action should only trigger once i believe? ๐Ÿค”

#

if a normal key, the trigger action should be changed to pressed for a single fire of action

wicked cairn
#

Anyone know a way to have my Fishing Bobber Actor get buoyancy applied to it when it's interacted with a Physics Volume with Water Volume enabled?

I have a Buoyancy Component added to it and set its Mass and Linear Dampening but it does not float on my Physics Volume, only the fish can, which are Character bases

(2D Sider Scroller Image, the red/orange sphere is at the bottom, not the top like the fish are)

remote meteor
gentle urchin
#

Handy

young meteor
#

Is that a better way of doing it basically?

gentle urchin
#

Less nodes / upkeep ๐Ÿ˜„

young meteor
#

And where is it getting the material from then? ๐Ÿ™‚
Whatever I set it to for that instance in the widget?

gentle urchin
#

Y

remote meteor
#

though i have a feeling this function is kinda forgotten by Epic ๐Ÿ˜…

#

though its still works perfectly for a Material brush, it has a comment of some sort of additional feature, has a disable depreciation warning pragma, and also uses a C style NULL

young meteor
remote meteor
#

the image

young meteor
#

Can't seem to find it unless I untick "context sensitive". If I do that it breaks the connection when I pick it.

versed sun
#

Target is image

#

not material

young meteor
#

Ah, I see.

#

my bad

#

So I skip "Create Dynamic Material Instance" and setting brush completely. Everything else is the same? (providing I remember to pick the material in the widget instance ๐Ÿ™‚ )

remote meteor
#

you also can handle non material brush with a IsValid check before setting anything

young meteor
#

My thanks ๐Ÿ™

remote meteor
#

what the node does is basically the same as what you had, the difference is, the dynamic material is created on demand and replaces the original material, so subsequent calls of GetDynamicMaterial will return the already created DMI

versed sun
#

no need to save a ref / it wont keep making new ones ?

remote meteor
#

yeah no need to ref save it, as it gets from the image's brush instead

#
if Material
  if !DynamicMaterial
    CreateDynamicMaterial
    SetBrush(DynamicMaterial)
    DirtyTheImageForRedraw
  endif
  return DynamicMaterial
else
  return nullptr
endif
versed sun
#

hmm, no version for Mesh Materials ? ๐Ÿ˜ฆ

remote meteor
#

you can always make one yourself ๐Ÿ˜†

versed sun
#

ewwww, with c++ ?

#

sounds hard

remote meteor
#

let me check the one that primitive component has

#

bp would work too

#

this actually does work

#

the trick is to leave SourceMaterial empty, if its empty, it created what that index already has, if you set anything to it, it replaces what it already has, so this acts as 2 usage

#

it would also create a DMI and replaces it

#

also does the same if DMI, straight return it

#

you have to know which material index you want ofcourse ๐Ÿ˜‰

versed sun
#

interesting

jade lintel
#

ima save it for the next time i forget what they do

remote meteor
#

though arguably, saving the DMI ref straight would probably be more performant? ๐Ÿค” but this is bp land, i guess it doesnt really matter...

gentle urchin
#

^ word

versed sun
#

But , you wouldnt have to keep track of which mesh has which material
just , whatever it has, you can change a param

remote meteor
#

but you also will need to check your own DMI ref isvalid so its the same in the end

#

๐Ÿ˜…

#

true true

hybrid hare
#

Hi, I have a BP where I have 2 boxes acting as trigger, one for doors, one for drawers. But When I have fired the first boxes, the second become unresponsive (both have different enhanced inputs). Any idea what should be tuned ?

versed sun
hybrid hare
#

mmmm... obviously component overlap of the second box and the first box do not work at once

#

box / component overlap sorry

#

it's two bp asssembled in one.

#

I used to do this that way cause it was the same control for drawers and doors

versed sun
#

When you're confused , show code you used

#

When in doubt , print it out

#

and when code is crap , take a nap

snow gazelle
#

Hello, sorry if I'm asking a stupid question, but I'm having a little problem with a blueprint that isn't working.
I'm folowing a playlist of tutorials to generate, but my blueprint isn't generating the landscape properly.
Here is my fuction to generate triangles, what it does, and what it was suposed to do.

grizzled swallow
#

what blueprint class is optimal ifi just want to have a base class with some information: image, Text, and a function to override

#

something like a struct

frosty heron
#

Depends on the use case but if u don't need to spawn it into the world, you can use the most generic class.

Uobject

versed sun
gentle urchin
#

Uobject, aactor, bpfl,

grizzled swallow
#

Would just a c++ struct work?

gentle urchin
#

Dependsโ„ข๏ธ

grizzled swallow
#

like some memebers and a pure virtual function

thin panther
#

you wont be able to use the struct's functions in bp

frosty heron
#

Can unreal struct have function in it, apart from constructor?

grizzled swallow
#

Ok so just UObject as the class?

novel rock
remote meteor
versed sun
remote meteor
#

i recommend UDataAsset if its about a collection of info about something

grizzled swallow
gentle urchin
#

Sounded dynamic in nature

haughty egret
#

And I press Ctrl + Z

#

It sends many

frosty heron
#

I would use data asset/data table plus a class when it comes to items or weapons

hybrid hare
versed sun
frosty heron
#

The data table/asset can point to my weapon class which have custom functions depending on the weapon

versed sun
snow gazelle
# versed sun

So i just need to add that block before every array?

grizzled swallow
#

btw whats the difference between Text and String?

gentle urchin
versed sun
frosty heron
#

@hybrid hare better use boolean and stop using flip flop.

Imagine if you enter the level where the door is already opened.

Problem with flip flop is that it remember the state

versed sun
versed sun
hybrid hare
#

@trim matrixsummer ok. That's why I have another set of doors for rooms that works so... I used bool . Ok 'ill have a look

snow gazelle
versed sun
#

right before your first loop

snow gazelle
snow gazelle
versed sun
hybrid hare
marble tusk
gentle urchin
gentle urchin
#

The tut was only 1 year old tho... hmm

marble tusk
#

It's been there for way longer than that tutorial existed though

frosty heron
#

Idm some exercise to make a triangle

hybrid hare
frosty heron
#

Next would be a square then rectangle

#

Cpp basic turorial teach how to make shapes

#

Fibonacci or w.e it's called

marble tusk
#

That tutorial sucks. They fast forward through the stuff you need to see, and then don't even show the final blueprint graph before moving on to the next part

frosty heron
frosty heron
#

How to make rpg in 1 series ๐Ÿค” or make your gta

pulsar pulsar
#

Any tips on updating the text on a Interaction prompt during the interaction? So for a door, when it is closed it says F To Open but I cant get it to change to F To Close until I look away and look back at the mesh. I'm using a Custom Event inside the widget where I do Set Text and then call that event when needed. So far I have it so the text updates wether the door is open or not. But the text won't update itself unless i look away and look back at the mesh

thin panther
#

I mean I have my reservations about a tutorial doing full proc gen in bp anyway :P

snow gazelle
frosty heron
gentle urchin
thin panther
#

what you're asking is not a beginner topic, and assumes experience.
hence you won't find a tutorial

gentle urchin
#

Its 14000 hours distilled into 1

frosty heron
thin panther
#

it's very much one of those things where if you're at that stage to do it, you don't need a tutorial

frosty heron
#

I saw how to make elden ring combat in short video

#

He did all the attack anim in anim graph

#

Real garbage

pulsar pulsar
gentle urchin
thin panther
frosty heron
gentle urchin
frosty heron
#

Where do you keep the info for the door anyway?

#

It should be in the bp door

pulsar pulsar
pulsar pulsar
frosty heron
#

So just read the current state of the door

pulsar pulsar
frosty heron
pulsar pulsar
#

Good idea!

frosty heron
pulsar pulsar
frosty heron
#

If I must start from the bottom, I would look at these ones

young meteor
#

Are there no blueprint node for a simple blur effect in materials?

Trying to find a simple way to create glow effects in UI

crude spruce
#

and glow is not glow effect

versed sun
#

Glow = Emissive

frosty heron
#

He is trying to do it in UI material tho

young meteor
#

But for UI

frosty heron
#

Download Material lab to see how it's done

crude spruce
#

blur in UI isnt glowing. its blurring ๐Ÿ™‚

frosty heron
#

I can't dechyper most of them cuz I suck

#

But they covered how to do glow

#

Where is autheur when you need him ๐Ÿ˜”

young meteor
crude spruce
young meteor
frosty heron
frosty heron
#

Anyway download material lab

#

If you need to see how things r done in UI, including glow

young meteor
frosty heron
#

Pretty sure 5.0 is fine

young meteor
#

Still a good point though.

frosty heron
#

It's not easy like 3d material

crude spruce
#

still unclear if this is UI or not ๐Ÿ™‚

gentle urchin
#

It is UI

#

Widgets

young meteor
gentle urchin
#

Unless you have plugin you cant directly do glow in UI tho, can you

crude spruce
#

@young meteor
Are you thinking about radial blur that can work as a glow in 2d software like photoshop ?

dawn gazelle
#

I wouldn't even say it's blurring, it's more like an alpha blend out.

young meteor
#

There is a "SpiralBlur - Texture" node. Not sure if that is an option yet.

#

Need to investigate it a bit more. Doesn't seem intuitive.

crude spruce
#

its double plus good to be very specific ๐Ÿ™‚
not that its easy but it helps to find solutions eventually

young meteor
crude spruce
#

ay i used to do neon type effects wth the blur tools

young meteor
#

Actually I could just blur it in Photoshop and import a new Texture with blur. Seems stupid though. There must be a better way. ๐Ÿ˜„

frosty heron
#

Blur is just an average of neighbouring color I think

#

Mathematically

crude spruce
#

wasnt many special effects here eh eh

young meteor
#

Hmm. Are you saying you kinda solved blur with math?

crude spruce
#

shaders are math

versed sun
#

computers are math

young meteor
#

life is math

crude spruce
#

math, not even ones!

#

amirite

dawn gazelle
#

It depends on the "shape" of the glow that you want. Like, if you wanted something like this where it looks like it's glowing from the bottom, that's just a gradient that's being overlayed

frosty heron
#

Ive been struggling on making glowing font ๐Ÿซ 

remote meteor
#

๐Ÿ˜‚

frosty heron
#

Gave me idea. I might try that later

young meteor
#

It's annoying, because when I open up their "Spiralblur" node the preview is pretty much exactly what I want

#

Just can't get it to do the same for my texture.

barren drum
#

Hello, is there any simple way to get the "UWorld" object as a reference in a bluprint?

frosty heron
#

Any particular reason to get the world ?

barren drum
#

There is a static Blueprint API that needs the UWorld as a paramter

#

Like "static UObject* GetSomething(UWorld* World);"

frosty heron
#

Never try to get it in bp. But if I must I prob will make a function that return the world from cpp

young meteor
#

Oh it actually does. Just not in my live node previews.

This works with a Texture Object, but I don't have an option to "clamp" values in an object.

Any good ideas on how to get around it?

barren drum
#

@frosty heron Ok. I assume you can't get the UWorld in a c++ static implementation?

#

I mean one way would be to just remove the reference entirely and internally just get it from a global or so.

frosty heron
#

GetWorld()

#

Return

barren drum
#

'UObject::GetWorld': a call of a non-static member function requires an object

frosty heron
#

Where do u get that error?

barren drum
#

compiler

frosty heron
#

How about get the game instance and get the world from there

#

@dawn gazelle Would know more

barren drum
#

You need UWorld to get the game instance

#
UObject* UCommonFunctions::TestGetter(UWorld* World) {
    if (!IsValid(World))
        return nullptr;
    //GetWorld(); // generates error
    UGameInstance* GameInstance = World->GetGameInstance();
    return GameInstance;
}
frosty heron
#

U want to return world

dawn gazelle
#

UObjects don't have a world context.
You can give them one, but you have to feed in an object that has one.

frosty heron
#

Instead of passing?

barren drum
#
class MY_API UCommonFunctions : public UBlueprintFunctionLibrary
{
    GENERATED_BODY()

    UFUNCTION(BlueprintPure, Category = "Common")
    static UObject* TestGetter(UWorld* World);
dawn gazelle
#

Static functions are similar. They won't have a world context unless you're able to retrieve one from something.

barren drum
#

gosh... test again... I got lost in histor

golden gull
#

I am using enhanced ability system, I have an E key which interacts with something, I set it as a digital (bool) value type. Problem is if I hold the E key then it will keep interacting again and again. How do I make it so that the key only works once per press, so that holding the key doesnt retrigger the functions?

#

Ah I need to connect not from triggered but from started

barren drum
#

it can basically be just a plain UObject*?

dawn gazelle
#

If the UObject has a world context. by default they don't

barren drum
#

gotcha... thanks I was planning to do a convenience function for GetGameInstance

#

I always have to convert it into the custom GameInstance and the blueprint just looks very bulky that way

#

i.e. GetMyGameInstance() in c++

frosty heron
#

Make a pure function that return your game instance

barren drum
#

Yes, that is what I try

frosty heron
#

Save your self from casting

barren drum
#

but to get the game instance I need UWorldd

frosty heron
#

In blueprint?

barren drum
#

c++

dawn gazelle
#

Look how the built in one works:

    /** Returns the game instance object  */
    UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
    static class UGameInstance* GetGameInstance(const UObject* WorldContextObject);
class UGameInstance* UGameplayStatics::GetGameInstance(const UObject* WorldContextObject)
{
    UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
    return World ? World->GetGameInstance() : nullptr;
}

All you'd need to do is basically change the return type and cast.

barren drum
#

I guess I could dig into the implementation of GetGameInstance

remote meteor
#

you usually use WorldContextObject isnt it

#

then get UWorld out of it

#

in a FunctionLibrary

barren drum
#

GetGameInstance is implemented without any UWorld object reference

remote meteor
#

see the function above

#

it gets the UWorld from the WorldContextObject

#

for a bpfl, it will be wherever the function node is used

dawn gazelle
#

Yeah if it's being called in an object that has a world context, it shouldn't prompt you for a world context object, but if it is within something that doesn't have the world context, then you'd have to feed one in.

remote meteor
#

anyway i have another method to handle autocasting

barren drum
#

it's just nothing but instead of this

remote meteor
#
UFUNCTION(BlueprintCallable, meta = (AdvancedDisplay = "ClassType", ClassType = "GameUserSettings", DeterminesOutputType = "ClassType"))
static UGameUserSettings* GetExtendedGameUserSettings(TSubclassOf<UGameUserSettings> ClassType);

the ClassType will determine the return type

barren drum
remote meteor
#

just like the GetComponentByClass node does

barren drum
#

I just want a "GetPlaformGameInstance()" without requireing the conversion exactly everywhere I need it

frosty heron
#

In blueprint function library

barren drum
#

without any parameters if possible

#

otherwise I just stick to converting it

dawn gazelle
#
    /** Returns the game instance object  */
    UFUNCTION(BlueprintPure, Category="Game", meta=(WorldContext="WorldContextObject"))
    static class UPlatformGameInstance* GetPlatformGameInstance(const UObject* WorldContextObject);
class UPlatformGameInstance* UYourLibraryClass::GetPlatformGameInstance(const UObject* WorldContextObject)
{
    UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull);
    return World ? Cast<UPlatformGameInstance>(World->GetGameInstance()) : nullptr;
}
remote meteor
#

if you are too lazy to even select the class you want then i dont know if there is anything that is dynamic

#

just make one specific casted for the ones you need i suppose

#

this is acceptable to me as its one node for all possible classes

barren drum
#

Maybe this can work?

    GEngine->GetWorld();
frosty heron
#

Done*

#

For example if open and if text is already "open" do nothing

#

Otherwise u might be calling set text every frame

pulsar pulsar
#

Ahhh! Very true!

frosty heron
#

Which maybe insignificant but some node is just heavier. If you want to guard Ur fps, it's better to do micro optimisation

dawn gazelle
frosty heron
# barren drum

Make a function out of this for your blueprint problem. Plug the cast result and return it

#

Then you can call getmygameinstance function instead calling getgameinstance function

dawn gazelle
#

Note the lack of defining a World Context Object anywhere.

#

What is happening is that it tries to get the world context automatically from the thing that is calling it.

frosty heron
remote meteor
#

anywhere where a function library is usable

dawn gazelle
#

Basically... or anything that you've been able to give a world context to.

frosty heron
#

0o ๐Ÿ‘

remote meteor
#

function library only shows up when GetWorld() is resolvable anyway

dawn gazelle
frosty heron
#

I use the kismet library to get the game instance, never dug deeper

#

And made a function in bfl to return my gameinstance

remote meteor
frosty heron
#

Material font?

remote meteor
#

outline material

#

font is just plain text

versed sun
#

Mine isn't quite the same ...
How big is your outline size? anything i missed ?

remote meteor
#

my size is 8

#

but yeah, more or less thats the closest i have ever gotten to a font glow

#

๐Ÿ˜“

young meteor
#

Can't believe there is not a default glow option ^^

versed sun
#

It's the way she glows...

remote meteor
#

time to request photoshop feature into unreals

#

here is one with roboto bold

#

certainly some weirdness..

#

and it also affects the widget desired size

gentle urchin
#

That g and o

#

Really stick out

#

Any closed space really

remote meteor
#

i just want glow like this ๐Ÿฅฒ

gentle urchin
#

Theres a plugin

young meteor
#

Feel like one could set up a loop function for a translucent material that do X passes of:
Increase UV size by 0,0X (loop integer), set opacity to 0,01 (not sure about value), and add it to final color.

So in other words, expand the texture slightly X times (slightly bigger every time), with a very low opacity, and add them all up in the end, to fake a gaussian blur with X "rings" of glow. Faking a gradient.

Sounds way off?

marble tusk
#

Hmm, I think there is a gaussian blur panel in UMG which you could put a copy of your text behind in order to get the blur, but it would also blur everything else behind it

#

Unless you're fine with settling with a blurred box around your text

fervent zenith
#

Hey i have a problem im trying to spawn a player and possess it to the player controller so that the user can controll it the only problem is that the server can not move arround but the client can why is that?

manic cove
#

When i do "Get Player Controller > Posses" i can't move and no inputs work, how do I restore inputs to a posses pawn?

frosty heron
manic cove
#

mine isn't server/client, doesn't move at all on client, but interesting it's very similar ๐Ÿ˜„

frosty heron
#

Single player yeah?

#

Perhaps his problem isn't multiplayer related then

#

Normally possessing a pawn just works. But I'm not sure how inputs are handled with the new input system

pine idol
#

Anyone have any ideas for this?

manic cove
frosty heron
manic cove
#

Not sure what you mean

frosty heron
#

You might need to run that after the On possessed event I'm not sure

#

Look how enhanced input is setup

manic cove
#

Oh the assignment of enhanced?

#

Yeah that is fine

#

If i enable auto posses everything is fine and dandy

#

it's when i posses through BP

frosty heron
#

I can't comment much cuz I'm still stuck with 4.24 lol

#

Yeah try to run the assignment after posses. See how that go.

manic cove
#

OHH

#

@frosty heron that was it, so on begin play i checked for player controller and map controls, when not auto posses theres no controller so it doesnt set

#

dohh

#

thanks for the help ๐Ÿ˜„

frosty heron
#

@fervent zenith check out what he do. Sounds like Ur problem too

manic cove
#

i threw a print on this after what you said and it was apparent, so now after posses i just re-run this function

#

might help! @fervent zenith ?

fervent zenith
true oriole
#

how do i access a widget that is one of my actor component ?

frosty heron
fervent zenith
#

@manic cove IT WORKED

#

damn

#

thank you

#

โค๏ธ

manic cove
true oriole
fervent zenith
dawn gazelle
# true oriole

Get HealthBarWidget > Get Widget > Cast to your Widget's Class > Do stuff with your widget.

fervent zenith
#

the funny part is that my player character class is written in c++

true oriole
#

:LULW:

fervent zenith
true oriole
#

Unreal Engine

fervent zenith
#

huh? you mean Blueprint

#

Unreal Engine is the engine

true oriole
barren dove
#

hey folks am I doing this right?
I'm getting "shot" events
but the npc doesn't appear to be recieving the event

fervent zenith
true oriole
#

the one you using is created by you

barren dove
#

i am, thats what it created

#

thats on beginplay

true oriole
barren dove
#

for what, if it recieves the event, it is the damage actor

#

ah ha, there's also an "anydamage" event which is... the same thing(?)

true oriole
#

i never use the bind event node no idea how it work lol

barren dove
#

yeah i slapped that in there and it still isn't firing the print string i'll keep messing with it

true oriole
#

i use interface

barren dove
#

I dont know what that means

plush hornet
#

Hi all, anyone got any suggestions on how to do a charge attack and a basic attack from the same input? Not so much the mechanics of it as ive got that figured out, just how would i get it to work from an enhanced input action without them conflicting? Thanks

true oriole
#

u can just cast to the enemy blueprint and call any custom function in the enemy bp, or use interface

barren dove
#

yeah I could make my own custom event and event dispatcher and build everything from that