#blueprint

1 messages · Page 220 of 1

warped juniper
#

The easiest would be for the bp spawning the Actor in question to store it into a variable. If not, there should be some ways to go around it...
For example you can make whatever that spawns the ball send a reference to it via some form of BP communication to another actor.

copper chasm
#

Look into Blueprint Interfaces or an Event Dispatcher for the act of destroying the ball maybe?

autumn pulsar
#

does unrotate vector assume the vector is a normalized direction?

#

seems like it does

autumn pulsar
#

Can I make a montage continually play until I tell it to stop?

static sequoia
#

How come when this tutorial sets hud variable it actually works but in mine it doesn't. it cant get any widgets from inside it

high iris
#

Is there a joyful way of moving a set of events from one graph to another in my blueprints?

I'm asked what I want to do about those events I'm porting and I either say "do nothing", in which case the bp doesn't compile, or I say create functions, in which case I now have to delete those empty functions and then it compiles.

What am I doing wrong?

static sequoia
undone bluff
#

if you want to move the functions then copy them first

static sequoia
undone bluff
#

hell if I know

#

but it's normal that it doesn't

#

just unreal engine things

static sequoia
#

maybe its a different version of ue5 or something. weird

undone bluff
#

that is probably it

#

there were several changes to icons over the versions, it's pretty confusing

static sequoia
#

in the turorials version widgets are checked on "Is Variable" as default too. But now they arent. Strange...

gentle urchin
#

You do that explicitly

#

Encapsulation is something you should consider tho. Tutorials rarely handle that well, if even at all

static sequoia
#

what do you mean by encapsulation

gentle urchin
#

I.e. classes being responsible for their own shit

undone bluff
gentle urchin
#

Not manipulated by a third class (atleast not without intentz through a public function/event)

undone bluff
#

just make your whole game in your character subclass

#

bestest practices

autumn pulsar
sour island
#

i need help with bp key to open the door, so my bp_door its fine open and close, my problem is when i take the key goes to inventory now when i want to open the door still closed how to tell him check the inventory to open the door with the key,
I can do it easly without inventory but i need to do that on inventory, my question is how can specifly tell him about that item?

high iris
#

What is a reason why Reset Level might not return some of the actors to their original position? I have an Actor with a sphere mesh inside of it on my map which is located in a certain position of the map, and when I call Reset Level on the server for some reason everything but that actor returns back to its place.

I'm reading the documentation for the node and it seems like everything should be in theory going back to its original location on the map. What am I missing?

tall plinth
#

i dont know if i already clarified... but literally...... i had to unplug save replug save my opening sequence player..... ??? not sure why that fixed it but it did.

empty hare
#

Is there a way i can stream something like a uasset into a map? Im trying to mod a game that has poles you can slide down as well as ziplines, I have managed to replicate the ziplines with help but i cant work the poles out. If theres not a way to stream it into my map so i can use the poles is there a way i can see the data of the file so i can replicate them for myself?

fading sentinel
#

👋 Hey I'm experiencing an issue with updating my character's position at the end of an animation montage. The setup involves using a socket's location to update the character's position in the Character Blueprint when an AnimNotify is triggered. However, after the animation montage finishes playing, the character snaps back to its previous location, undoing the position update. Here’s a breakdown of the issue and what I've done so far:

Current Setup:
Animation Blueprint:

AnimNotify called AnimNotify_UpdatePosition is placed at the end of the montage.
This triggers a custom event in the Character Blueprint that updates the character’s location.
Character Blueprint:

The custom event triggered by AnimNotify_UpdatePosition retrieves the socket location (CameraSocket) and uses it to set the character's position using Set Actor Location.
Steps Taken:
Root Motion Handling:

I ensured that root motion is disabled for the relevant animations in the montage.
I also set the root motion mode to "Ignore Root Motion" in the Animation Blueprint's settings.
Despite these changes, the character still reverts to its original location after the montage finishes playing.
Montage Timing:

I moved the AnimNotify_UpdatePosition to different points in the montage timeline.
When placed in the middle of the montage, the character's position updated correctly for a few frames but still reverted back once the montage finished.
Possible Remaining Issues:
Animation Blueprint Overrides:

There might be something in the Animation Blueprint, such as a state machine transition, that is resetting the character's position after the montage ends.
Manual Reset in Blueprint Logic:

There could be some logic elsewhere in the Character Blueprint that is resetting the character's location after the montage finishes playing. I've tried searching for any Set Actor Location nodes or similar logic, but haven’t identified anything definitive yet.

neon ivy
#

yo what theme is this

#

thats fire

undone bluff
#

crystal nodes

neon ivy
#

thanks g

fading sentinel
raw sleet
#

Hello! I have a problem. My animation montages are not playing

#

The idle animation just continues on.

raw sleet
summer nexus
#

I like to create a material and have four transparent PNG images. I would like to layer them on top of each other and arrange them in the correct order.

maiden heath
#

Hi everyone I have a problem with the UI I would like to take "Throbber" to activate the Visibility but when it starts I don't see it how can I solve it?

surreal sonnet
dark drum
dark drum
maiden heath
maiden heath
#

I unplugged it but before when it was plugged in it didn't work

dark drum
# maiden heath I put it in my Open Level Blueprint

There's a node called 'Add to Viewport' alternatively, if you have a widget that has already been added to the viewport, you can get the relevant panel (canvas, verticle box, overlay etc.) you wish to place the newly created widget inside using the 'Add Child' node.

dark drum
# maiden heath I put it in my Open Level Blueprint

Also, handling UI on the level BP isn't a good idea as level BP is one way meaning nothing will ever be able to get the widget that was created. Normally, this would be done from either the player character or player controller.

raw sleet
wooden stratus
#

or simply set a boolean once the player obtains that key and check for that boolean instead

wooden stratus
#

you can do that by right clicking -> refresh node

kindred galleon
#

Quick fix for this? Location returns as 0,0,0 for the socket bone start and end...

#

it sometimes does the correct location sometimes doesnt

#

on hit result, it will go to 0,0,0 if it doesnt hit anything. and it goes to the correct hit result if it does hit.

wooden stratus
# raw sleet

you are using the wrong node.
Its "Montage Play", Target is AnimInstance

#

there are different ones for different cases, read up on them

wide smelt
#

i've got a physics problem where i got a character, a car and say a destructible wall. i want it so that if the car drives with enough force, it destroys the wall but the character can't.

#

is there a way to generate collisions so that

if A -> B: nothing happens
C -> B: B brakes

#

if car drive with enough force i don't want there to be any resistence etc...

#

now that i am thinking about it, maybe it's possible to wrap wall in a collider that only blocks human players

wooden stratus
#

Use the observer pattern,
You coud create an event dispatcher in your player/projectile/etc... (whatever your enemies get hit with) and add inputs being the hit type and wether its strong or not.
You call that event when it hits an enemy in your player/projectile/etc.. class/bp
You bind your enemies to that event
Thats one solution

wooden stratus
#

if its the character not being able to break the wall than simply check if the wall was hit by your car instance with force > breakThreshold and thats it

wide smelt
#

when human character interacts with wall, it's a solid impenetrable object
when car interacts with wall, it gets destroyed

#

but would that not generate a force?

#

i.e. wall would get destroyed but car would bounce

wooden stratus
#

how much mass it has and stuff

#

and how "strong" the wall is

wide smelt
#

👍

kindred galleon
#

could anyone tell me what and where this is?

gentle urchin
odd kiln
#

Hi all

#

Anyone knows why my collisions are not blocking each other ?

#

I added a "Box Collision" into 2 "Characters" and they not blocking

wooden stratus
odd kiln
#

I set both to "Block All" with all checked

#

But still not colliding

#

Maybe only the root can collide ? (Capsule Component is my root)

mental trellis
#

Yes. For standard collision only the root is checked.

odd kiln
#

So I need to create another Actor and attach it to my Character?

#

Another Actor with my Box Collision I mean

mental trellis
#

You'd need to "weld" them I think. I'm not sure on how that all works honestly.

odd kiln
#

I'll try. Thanks !

compact fable
#

how can I acces widget variables inside this child blueprint?

neon lion
#

when i create a class in CPP and then make a blueprint of it, is there any way to mark a property as required, so that the blueprint won't compile if that variable hasn't been given a nondefault value?

odd kiln
#

Can I detect if my camera is still rotating or is static ? (no movement)

gentle urchin
#

Sure

#

Track its delta location

loud tree
odd kiln
dire frost
#

no need for delays

odd kiln
#

The problem is that I have a "Camera Lag" enabled and even if my camera still rotating/moving, the number is "0"

dire frost
#

at begin play, save the current info in a "old transform" variable. in tick, compare the current transform to the saved oldTransform and just make sure to save the new transform to the ofldTransform variable after you've done your check

#

get its world transform instead of local/relative

odd kiln
dire frost
#

the camera's world location stays the same?

odd kiln
#

The Camera Lag is not taken into account

dire frost
#

can you show me your code? i have hard time believing that 😅

dire frost
#

use the comera world location instead of the boom's

#

the camera is the thing that's moving

#

the boom stays static

odd kiln
#

When I'm moving the location is changing but when I stop moving the camera Location becomes "0" even if the Camera Lag is still making my Camera moving

dire frost
#

is the camera component's reference instead of the camera's boom reference

#

you are getting the boom's location which of course will stay static when the camera lags

odd kiln
#

I just tried with the Follow camera and it's the same

#

I tried Location and Rotation

#

I have "Camera Lag" and "Camera Rotation Lag" enabled

dire frost
#

hmmm alright let me open unreal on my end real quick

odd kiln
#

Maybe it's because I'm doing a "Delay" in a "Tick" event so it makes bugging everything ?

dire frost
#

oh wait im dumb i didnt notice the delay! 🤦‍♂️

dire frost
#

try to implement that and see if the issue persist

#

which hopefully it wont

odd kiln
#

Sorry that's my bad I'm the dumb there

#

I will try, thank you !

dire frost
#

de rien

wooden stratus
neon lion
#

oh hey thats a cool feature

gentle urchin
#

Along with EditCondition, for properties if that can help at all

rotund harness
#

does anyone have any tips on how to approach designing a swimming system like the one in BOTW in the sense that you are locked to the surface, but with the feature of buoyancy? So for example if the player jumps into the water from a height, the character goes underwater and then floats back to surface, and only then movement is enabled? Of course I'm not looking for a full explanation just some tips from experience if anyone has any

gentle urchin
#

While (Underwater) -> swim up with disabled imputs

rotund harness
#

but can you like use the buoyancy system of ue5 for that kind of thing or is it just better to just add some kind of force?

lunar sleet
#

Then probably lock the Z axis and Bob’s your uncle

rotund harness
#

But in case of waves?

rotund harness
#

ok

#

thanks

drowsy anvil
#

Hello, any ideas how would I make my point system here to transfer points to another HUD text element, by removing 10% of those points every second and moving that 10% to the final score points bar?

lunar sleet
drowsy anvil
lunar sleet
#

#umg for widget questions

loud tree
keen tinsel
#

i'll see , thank you

drowsy anvil
loud tree
drowsy anvil
#

ah yeah, hud stuff is working now, just need to figure the math stuff out. EDIT fixed math, very happy now

shy canyon
#

Is it possible after selecting an item from an Enum, expose different parameters/variables associated with that item?

manic vessel
#

can anyone remind me how I can loop through an enum each time a button is clicked, Im trying to chenge to the next selection each time i click

dry sleet
#

That's EditCondition.

#
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (EditCondition = "Alignment == EAlignments::ChaoticEvil", EditConditionHides))
float Badness = 0.f;
#

Something like that is how you set it up in C++, but it's not possible through pure BP unfortunately.

#

But the best day to get started with C++ in Unreal is yesterday, the second best is today :)

wild crater
#

How can I run my dev build using custom launch options? We have them and use them on Steam, I just don't know how to use them straight for an .exe from cmd or something like that.

coarse grove
#

Hello, Im trying to do some basic interaction between 2 actors and an actor component using event dispatcher. But my event dispatcher seems to not been called. Anyone have an idea why?

coarse grove
# maiden wadi Do you see the print?

the print after the branch is working, but the print with the red comment is not working. The first print says the variable is true, so its working properly but seems the event dispatcher is not being called

maiden wadi
#

Then you're either calling it on the wrong component or somehow that binding is not bound.

#

Which. Looking at your BPs again. You're not calling it on the correct thing.

#

@coarse grove

coarse grove
maiden wadi
#

It's not the same.

#

It's the same component TYPE on two DIFFERENT actors. The component is not the same instance.

loud tree
coarse grove
coarse grove
loud tree
#

I just realized that said "call can teleport "
Sorry 😅

maiden wadi
haughty snow
#

is it a bad idea to try and implement a dialogue system that uses a for each w/ break to progress the dialogue, breaking when the user needs to input a response, then continuing from where the break occured? feel like im missing a more obvious architecture here

sharp void
maiden wadi
#

You should really check out the FlowGraph plugin.

coarse grove
maiden wadi
#

Nice! 😄 Happy it worked out

haughty snow
#

yeah i think this is not the best method - though it is only for a quick prototype. I have a custom for each macro that i added a delay / break to that i'd use for this

#

ill try and make it state-based first

loud tree
robust merlin
#

hey would anyone know how to describe blue prints for dummies by chance? 😂 like i just dont quite understand some of the terminologies and what it does, like the description of what location and condition mean in game terms? (sorry to even ask i know its fairly simple in a grand scheme of things)

blazing comet
#

Hey, I'm trying to do some high speed collisions using the 3rd Person pawn and the open world terrain. Around 1200cm/s landing.
My flying pawn falls through the terrain about 40% of the time.
If I make the capsule huge and enable CCD, I get to 95% landings, but the capsule collides stopping forward movement, then the mesh falls to the terrain. Not great.

This seems like a solved problem, what am I missing?

blazing comet
robust merlin
blazing comet
visual ember
#

I'd suggest youtube first to see if you even want to preoceed further. then either stick with yt or find a good paid course if you really need one

blazing comet
# robust merlin oh i gotcha, thank you i appreciate you. I'll see what all i can find 🙏

UE's documentation is hard to search and browse, but you might find this a good free start.
I still recommend the "game dev math" course if you're planning to make gameplay code.
: https://dev.epicgames.com/community/learning/courses/OP/unreal-engine-blueprints-and-gameplay-for-game-designers/8bB/introduction-to-the-course

Epic Games Developer

This course explores how to use the Blueprint visual scripting system along with other Unreal Engine features to create gameplay elements and prototype ...

loud tree
# robust merlin hey would anyone know how to describe blue prints for dummies by chance? 😂 lik...

https://youtube.com/@mathewwadsteintutorials?si=P-BG2djzaxghZViU

Here's an extremely solid place to start as well.

robust merlin
#

thank you guys i really appreciate you. I'm shooting for a survival game i'm not too sure what to do for an enemy yet but i'll figure that out way later, but something kinda related to the genre of ark but not ark 😂

blazing comet
# robust merlin thank you guys i really appreciate you. I'm shooting for a survival game i'm not...

There are some survival game templates (and other game templates) in the UE marketplace. Whether you're making games for fun or profit, you'll learn more by customizing them vs starting from scratch. This one is deluxe: https://www.unrealengine.com/marketplace/en-US/product/easy-survival-rpg
This one is basic: https://www.youtube.com/watch?v=FVvs-M-ucus
Both will get you started and be more fun 🙂 There are some YT vids that walk through building survuval games. It's a long distance run, not a sprint. 60 mins a day and you'll have it for sure.

Unreal Engine

Easy Survival RPG is a highly advanced and modular product designed from the ground up for multiplayer with a ton of different game-ready features for Unreal Engine.

A multiplayer survival game kit which features Jigsaw style inventory, equipment, main menu, crafting, weapons and much more!
Click▼

► Buy on Unreal Marketplace
https://www.unrealengine.com/marketplace/en-US/product/survival-game-kit-v2
► Discord
https://discord.gg/KNCmQb6
► Twitter
https://twitter.com/DefuseStudios
► Website
https://defusestud...

▶ Play video
deep vine
#

whats the proper way to do a loop if you want a sound to play every 30 to 60 seconds?

#

right now i got a tick > While loop > Completed goes to play sound > delay (30 to 60 seconds) and back to loop

#

which i'm pretty sure will just create an infinite loop

dawn gazelle
#

Rather than using tick, you can use a "Set Timer By Event" node that you can set up on an event and have its delegate call back to that same event to start another timer up.

deep vine
#

Thanks, never really looked into loops much until today.

blazing comet
deep vine
#

Good idea.

dawn gazelle
#

Here's an example of what I mean - this timer would continually fire randomly after 30-60 seconds once the PlaySoundAfterRandomDelay is called once.

deep vine
#

would this work?

#

i followed a quick walkthrough of how timer by event works

molten pike
#

This one's fun: I have a BP with multiple skeletal meshes for modularity. Each is assigned to the same animBP, which I'm starting to think means one instance of the animBP each. The grenade throw animation in the animBP has notifies for grabGrenade and releaseGrenade, which because each mesh is executing the animation means that the grab grenade and release grenade functions are each being called multiple times per grenade throw.

#

How can I get a mesh to ignore animation notifies? Or how can I get each mesh of my BP to follow the main mesh without their own animBP instances?

#

I've verified this by checking the number of spawned grenades. Pre-notifies it's 1. Post-notifies it's 8, cooresponding to the numebr of meshes in my BP.

#

reducing the number of meshes to 1 reduces the number of grenades to 1. But then I lose the mesh modularity.

#

Can the animBP be made a singleton so it can only ever have one instance?

#

BP meshes

#

animation notifies for throwGrenade

#
{
    if(!Reloading && !Meleeing &&!Shooting && !Throwing && !Healing && !GetCharacterMovement()->IsFalling() && GetGrenadesCarried() > 0)
    {
        Throwing = true;
        if(ThrowableClass == nullptr)
        {
            UE_LOG(LogTemp, Error, TEXT("There is no GrenadeClass!"));
        }
        else
        {
            GetCharacterMovement()->Deactivate();
            SetGrenadesCarried(GetGrenadesCarried() - 1);
            UE_LOG(LogTemp, Warning, TEXT("Grenade Spawned."));
        }    
    }
}

bool ACharacter::GrabGrenade()
{
    if(!GrenadeGrabbed)
    {
        GrenadeGrabbed = true;
        UE_LOG(LogTemp, Warning, TEXT("Grenade Grabbed."));
        FActorSpawnParameters SpawnParams;
        SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
        
        Throwable = GetWorld()->SpawnActor<AThrowable>(ThrowableClass, SpawnParams);
        if(Throwable != nullptr)
        {
            Throwable->AttachToComponent(GetMesh(), FAttachmentTransformRules::KeepRelativeTransform, TEXT("hand_l"));
            Throwable->SetOwner(this);
            Weapons.Add(Throwable);
        }
    }
    GrenadeGrabbed = false;
    return true;
}

bool ACharacter::ReleaseGrenade()
{
    if(!GrenadeReleased)
    {
        GrenadeReleased = true;
        UE_LOG(LogTemp, Warning, TEXT("Grenade Released."));
        Throwable->Throw(UKismetMathLibrary::GetForwardVector(GetControlRotation()));
        GetCharacterMovement()->Activate();
        Throwing = false;
    }
    GrenadeReleased = false;
    return true;
}```
#

animBP event graph for the anim notifies

molten pike
#

if(!GrenadeGrabbed) and if(!GrenadeReleased) also don't appear to prevent multiple instances of that code from running

lunar sleet
#

You’ve been here for a year but must have missed the #rules channel

flat raft
#

is there a way to check multiple gameplay tags at once ? key.blue and key.red is in the container.

dawn gazelle
#

Exact match only if you don't have further tags, like key.red.square and key.red.circle

undone bluff
#

For first person I have a separated head (to hide but still cast shadows), hands (to render with a different FOV) and body

#

And I got it set up with that

#

Body runs the animbp and the other skeletal meshes just copy it

iron idol
#

whats an easy way to make a single switch function for this refrence without just stacking a bunch of branches?

#

would switch on string be what I'm looking for?

stone field
iron idol
#

yea it crashed ue

#

despite having the same text

stone field
#

huh... well that's no good : E

iron idol
#

i might need switch on name instead?

#

nope not compatible haha

stone field
#

I would prefer having an enum or a tag or something to use as the value for switching.
That said, switching on name really shouldn't be crashing like that, sounds odd

iron idol
#

so i tried enum but its not working

#

but that was my first idea

#

maybe its because the enum is assigned in the spell actor?

stone field
#

best walk through the logic with breakpoints to check what values you are getting

iron idol
#

well i checked the text thats coming through with a print string and that was fine

#

so i then took that same text and tried with switch on text

#

nevermind I figured it out. I did need switch on name.

#

😅

olive pasture
#

hello everyone. in a game im working on i need to be able to spawn the player pawn at a given transform. what function do i need to override to do this?
note that this is not using a player start, but a transform which is changing during runtime.

solemn bramble
#

They let you customize Player Start logic.

molten pike
olive pasture
sweet silo
#

hi ! i have this throwing ladder mechanic
But how could i have more control over where it's thrown

#

ill send a vid

#

and have also feeback on wher is going to be thrwon.. Maybe with a UI ? *

#

also the collisions with the cliffs are making no sense.. maybe i should do this in a city instead

#

and i would also like to create a system where you can choose the size of the ladder before you throw it but maybe it would break the flow of the game so not sure

solemn bramble
#

It still doesn't fully solve collision issues though, such traces usually need to be quite complex to fully handle various enviro shapes.

sweet silo
#

oh nice that's a good idea

#

how could i draw the fake ladder?

#

im already using a line trace for the spawining mechnicn

solemn bramble
sweet silo
#

oh ok nice just the same ladder but with diff mat

solemn bramble
#

destroy it when not required

#

Or don't spawn and destroy but re-use existing one, just hide and show. : )

sweet silo
#

ah yeah maybe dynamic material is even bettetr

solemn bramble
#

could work as well

sweet silo
#

Thanks ill try those

#

im just wondering because like pressing E would show the translucent ladder

#

and then pressing E again would throw it

#

how would this work

solemn bramble
#

It's usually handled in a way that fake object is displayed whenever we're in some kind of "building" mode, and then it's removed and replaced by proper object when we press Build button

sweet silo
#

i have this for now

sweet silo
solemn bramble
#

it really depends on actual design

#

you might for example display fake ladder and do trace when you're HOLDING the button, and then place the ladder when you RELEASE it

#

but I don't know if that suits you

#

you can have a toggleable "Building" mode/state, and display fake mesh when in that state, and then build when input is pressed

sweet silo
#

yeah that first option would be good

#

your advice are great tahnks

solemn bramble
#

np : )

sweet silo
#

so triggered would be "holding"?

#

nope it's not lol

#

ok i get it its ongoin

solemn bramble
#

It depends how actual Input Action is configured

sweet silo
#

oh ok tans

sweet silo
#

how can i attached the spawned item to the firstperson character

#

this should be working but isnt

solemn bramble
#

as AFAIR you want to show it exactly in the position it will be placed

#

Also - now when I think about it you can actually consider a completely different approach and try moving your ladder with the Physics Handle component (https://www.youtube.com/watch?v=GS0YkKK8o_w).

This one is a little more casual but I go into more depth regarding physics handles and also how to do the same thing with objects that aren't simulating physics meaning just about everything in the world can be draggable and movable with very little in terms of programming and cpu usage i also show how to solve the snap problem

any suggestions...

▶ Play video
sweet silo
#

oh interesting

sweet silo
dark drum
sweet silo
dark drum
frosty heron
sweet silo
sweet silo
dark drum
frosty heron
#

are you with me there?

sweet silo
#

yes

frosty heron
#

so if you write self on bp player controller it will return that instance of the bp player controller

sweet silo
#

ok i get it

sweet silo
#

What should i do then

maiden heath
#

Hello everyone, a question I would like to ask in the UI a carousel that inside there are buttons that activate certain functions within the UI. Advice on how I can implement it? or even a Tutorial that explains the steps to me?

gentle urchin
#

#umg and provide an example if you got some reference for it

narrow pendant
#

is there a way to pass in a wildcard for a map into a function?

dark drum
gentle urchin
#

Print wildcard value

#

I doubt that can work

#

Aa stuff need conversions based on their type ?

dark drum
dry sleet
#

Don't macros let you create wildcard pins?

#

The alternative otherwise is probably non-trivial C++.

gentle urchin
#

Macros do indeed

#

But an object pointer dont have a direct conversion to a text input afaik

narrow pendant
#

I'll try with a macro

sweet silo
#

ok i got it but the ladder is far away from me how can i specify the location

loud tree
#

I think I'm having a moment here regarding references and dependencies.. and won't be able to research til later..

Adding an input to a BP interface creates a hard reference to whatever that input type is, right?

I'm assuming that hard reference is only relevant on the actor the interface is implemented on..

Is that correct?

Along with that, this part I thought I knew but can't get out of my own head right now...
Are dependencies from actors in the world referenced by the the players clients memory?

Probably a bad one but..
Example
Player comes across a door...
Door needs a password.
Door has hard reference to the thing holding the password.
Player does not have a hard reference to the password.
Is that actor holding the password still loaded into memory as if the players character had that reference or is it still just that the door and it's local assets are loaded?

I'm assuming everything in the current level that is actively relevant to the player character is loaded but I'm still kind of fresh into learning this.

Apologies, if this is worded atrociously.

sand bloom
#

Afaik a hard reference doesn't need to be inside your player for it to be loaded in

#

you can look into soft references too

gentle urchin
#

Hard references loads the thing they're referencing when they themself are loaded

sand bloom
#

Yeah so I imagine your doors would still be loading it all in

gentle urchin
#

Casting to player character is usually fine as its an always loaded class

#

Casting the other way around is more troublesome for this exact reason

#

Having a hard ref to a door that may or may not be loaded , forces it to load regardless

#

Same with its dependency (the key)

sand bloom
#

Also does anyone have experience with github because I may have just completely fucked up my project lol I feel ill
I switched branches foolishly before backing up because I didn't expect a ton of issues like this
now I have a ton of merge issues with my code and I don't even remember what these stashed changes are supposed to do

#

What is the best solution for not losing the progress I tried to upload

#

I should have updated the branch I took this from first..

#

I've never seen merge issues like this

#

I wanted to overwrite everything that was old

#

but I guess with merge it has issues partially overwriting things?

visual ember
sand bloom
#

using github desktop btw

#

Yeah I should have uploaded it my branch first

#

before bringing this back to main

#

But i'm not sure how to save my progress now

#

Did github merge my current stuff with the old main stuff?

#

is it some weird broken mix?

#

I'm trying to see if I can salvage it somehow

#

I haven't like actually uploaded anything yet I think i'm in a weird limbo

frosty heron
#

what's your git ignore like? you shouldn't include intermediate folder

sand bloom
#

So I was on a branch, changed the branch with a lot of stuff. Instead of uploading to that branch with my changes I switched back to main which is now causing the issues

#

oh my git ignore I added like ptb files because it was big

#

and apparently pdb files aren't vital

loud tree
#

Thank you all. I to a degree thought that's how it worked but wasn't 100% sure..

Recently started getting into interfaces deeper and learning about the hard reference on input got me thinking on how things not referenced directly by the player works when loaded.

frosty heron
#

you shouldn't even include intermediate and binaries to begin with

sand bloom
#

Yeah that sounds about right actually, my setup isn't ideal

#

I looked into it but that was a while back so im rusty

frosty heron
#

you don't work around hard references with interface, that's not even gonna work

sand bloom
#

I'm just hoping I can salvage my progress now and try to have a less shitty github setup after that

#

once I have like my proper project folder I can try and make the github repository better

#

and focus it just on the relevant folder

#

since it does seem to include some unneccesary things

#

totally forgot about focusing it vs just using github for the whole folder

#

I don't understand why I have stashed changes

#

do I try to commit

#

I mean the conflicts should be problematic on their own lol

frosty heron
#

add intermediate, saved and binaries to your git ignore

sand bloom
#

oh right i'll go do that once/if I can salvage my project files

#

thanks ill check there too

loud tree
# frosty heron you don't work around hard references with interface, that's not even gonna work

I know interfaces are generally utilized to avoid hard references

But when you add an input on an interface to my understanding that acts the same as casting and then creates a hard reference to that input type

I know that needs to be controlled and limited the same as casting.

The question I had with that was more specific on whether that dependency/reference is only created on the implementing actor or
If it's created on the caller as well.

frosty heron
#

interface is not UTILIZED to avoid hard ref

#

ignore youtube noobs

gentle urchin
#

Phrasing could be better but

loud tree
#

I know it has deeper uses and functionality but I'm just not sure how else to phrase it rn per my question

gentle urchin
#

You dont want to include hard refs to interfaces in general

frosty heron
#

different tool for different job

#

totally unrelated

gentle urchin
#

Interfaces bring known functionality to unknown classes

frosty heron
#

god damn youtubers

#

first page claimed many victims

gentle urchin
#

With the ref 😂

#

Lol

loud tree
#

I'm familiar with that
My terminology is not the greatest
So I apologize for any misunderstandings by my phrasing

visual ember
#

"don't use tick" "don't cast" "don't watch my video" are synonyms

frosty heron
#

all started from the blind leading the blind

gentle urchin
#

Been like that for yeeeaaars

#

Did they even do a mem check?

sand bloom
#

Wouldn't you be able to use generic actor references with said interfaces

#

I thought that was the focus of discourse surrounding it

loud tree
gentle urchin
#

Or reference viewer?

#

Thats would expose their wrongdoings instantly

frosty heron
# sand bloom I thought that was the focus of discourse surrounding it

The point is, if you need to access different blueprint, you will need hard ref anyway. Cast is harmless, it's the misuse of hard ref that gets thing loaded to memory.
So these people that says avoid cast use interface, they end up having hard ref anyway. And now inheritance is thrown out of the window and you will also end up with debugging nightmare.

Use interface if you need to communicate between different classes, there's no really avoid casting. The proper workflow is to make native class in cpp and use soft references to load heavy assets.

gentle urchin
#

Interfaces easily bridge functionality between unrelated classes which cant easily share a common parent

#

Pawn vs regular actor is one example

dark drum
#

I might do a video tutorial titled 'Stop Using Interfaces... Cast Instead!!'

gentle urchin
#

Stop using interfaces... use componemts instead

sand bloom
#

Ah right by focusing on casting people forget the actual issue then aka hard refs

dark drum
loud tree
gentle urchin
frosty heron
#

There's almost no interface in lyra afaik, just 1 - 2 very minimum stuff for a getter for ability comp and team interface?

dark drum
frosty heron
#

I don't deep inside too much cuz I can't read codes but the interface they had are like a few lines of codes

#

rest are components

#

hero component, ability component, targeting, etc

loud tree
#

Also any good resources on components?
If none readily available I can dig in later to start lewrning.

frosty heron
#

it's just an object you can attach to actors
Some examples
Rotating component, Character movement component, Projectile component, etc

#

something you can grant to an actor, also useful to give actors that doesn't share the same base class the same or simmiliar functionality

#

picture Exploding Component which just explode the owner after X seconds

#

you can add that component to your player or a barrel

#

if you are doing inventory system, you probably should use component

sand bloom
#

Yeah they're very useful for being modular reusable things but also for avoiding "god classes" or whatever aka putting all your code inside one actor like your player

#

which is not great

frosty heron
#

^ also reduce repetition

visual ember
#

I prefer slapping InteracteeComponent/PickableComponent instead of making class implement interface

gentle urchin
#

Yepp

frosty heron
#

why write the same functionality again when a lot of things can benefit from the entity?

gentle urchin
#

Holds state aswell

loud tree
#

All fantastic info ty

#

Will definitely read deeper into and learn to use

gentle urchin
#

Keeps code clean and segmented also

#

And if you dont know them

#

Learn about and use event delegates

#

Life changing

dark drum
#

So there's 1 blueprint BPI which is for getting the audio component for emote sounds and what I believe are 6 C++ interfaces in the Lyra project. Most of which are for getting data from an actor.

gentle urchin
#

I went 4 years without checking them out because youtube said ignore it .. silly me

rotund harness
#

Does anyone know how the buoyancy in the water system plugin detects the waves not as a purely visual effect? I want the player swim following the surface of the water, and not just on a plane

gentle urchin
#

Guess youd somehow read out the pixel offset ?

rotund harness
#

Do you have any idea on how i could do that?

iron idol
#

how do you get this as opposed to

#

this

visual ember
iron idol
#

I probably should have specified its for a binding

visual ember
iron idol
#

weird when I do it its just blank

gentle urchin
#

Object plugged in vs not

#

Not that weird 😅

iron idol
#

fair enough so maybe the question is why when I drag out from the event the dispatcher bind isnt on the list?

#

just trying to work out what I'm doing wrong here

exotic saddle
#

pls can someone help me how to use emmiter particles constantly

narrow pendant
#

for more specific niagara questions --> #niagara

lethal night
#

Hiya was wandering if there is a way to change these in blueprint

#

I can only seem to change the attach end to not if it is attached or not.

dry sleet
#

I'm almost certain you can, because I remember doing it.

#

Either there's a node like "Set Attached Start/End...", or the bool is exposed and can be modified directly.

#

I don't really recall the exact method.

lunar sleet
#

Also see #rules on crossposting since that channel was probably hiding from you for the past 3 years 😀

fluid reef
#

How can I sort an array by an associated float value? For example, I am making a Blueprint Editor Utility Widget that takes Selected Actors, loops through them, gets the Z value of their Box Extent, and then I want to position them in the Editor based on that Z value, but I can't figure out how to sort that array by that Z value. Can anyone point me in the right direction?

trail crater
#

Hey everyone, I have strange problem . My mesh isn't showing the player character, and the details panel is completely empty. Has anyone encountered this before or know a solution? thx for helping (or just looking 🥴 )

maiden wadi
# trail crater Hey everyone, I have strange problem . My mesh isn't showing the player characte...
Authaer

Ever had a blueprint suddenly have a component that was unable to show the details panel of a component?If you've used Unreal long enough, chances are high that you'll run into blueprint corruption even without the usual cases like hot reloading. Source control issues, and bad hard drives can be a nightmare too.The thing is, there are cases wher...

faint pasture
#

I love using components like that

static sequoia
#

Event Dispatcher is making no sense at all. When I interact with my Circuit Breaker it prints the string. But it doesn't print string on the blueprints it is in. But sometimes it does if a different instance (the door for example) is placed in the world. And when it does work it works perfectly. Every time it does end up working or not working it consistently follows that behavior and wont flip between working and not working until resetting and trying to play again. I dont understand

lunar sleet
#

And where is your event call?

static sequoia
#

Just to get the "bind event to flip breaker off"? is that wrong

#

first image

static sequoia
lunar sleet
#

Oh i kinda see what you’re doing nvm

#

But also your first image shows an interface event too, are you mixing both?

static sequoia
#

its separate blueprints, getting the event from BP_circuitbreaker to trigger locks on 2 other blueprints, BP_EntranceDoubleDoor and BP_GateMain.

static sequoia
lunar sleet
#

First image

#

Looks to me as if you’re using an interface event to call a dispatcher

#

Which is kinda like using your left arm to hold your right hand to scratch your head 😀

static sequoia
#

the interface is for if the object is an interactible then allow it to be toggled

#

this is BP_PlayerCharacter

#

so the circuit breaker and double door and gate are interactibles so I can hit E on them

lunar sleet
#

An interface and a dispatcher are 2 different methods of inter-bp comms, best to just pick one

#

There’s a pinned video on bp comms training here, have you watched it yet?

static sequoia
#

no I have not, I was following a guide and it worked perfectly for him

#

so now I am very confused and thats how I ended up here

#

should I send you the videos and let you scan through them to show you what I mean?

lunar sleet
#

Right now you have at least 2 potential reasons why you’re getting this weird flip flop behaviour

#

One being using 2 diff comms

static sequoia
#

Like it all made perfect sense to me but it just isnt working. ok ill watch it then

#

oh.... its 2 hours oof

static sequoia
lunar sleet
lunar sleet
#

You also have a branch in there

static sequoia
#

theres nothing in it, its just a name

neon lion
#

how do i give a default value to a function input in blueprint?

i want this bool to be false if called without input

static sequoia
#

idk if I fully understood the question but I hope that helped

#

oh wait sorry I think I didnt understand, idk what to do about that so dont mind me

neon lion
static sequoia
#

idk if thats the sollution either just throwing out stuff

static sequoia
#

none of those images is my interface blueprint, am I missinterpreting something

lunar sleet
#

The interface event

#

Again, you should really watch that video, interfaces can be confusing to begin with and you mixing them up with dispatchers is contributing to your issues

static sequoia
#

besides its working now idk exactly why

#

I had a duplicate of the breaker in the world so that might be apart of the reason

loud tree
static sequoia
#

I see what he was getting at but I dont think it applies to this situation.

blazing comet
#

Hey there, has anyone worked with high speed collisions and CCD? I'm working on a jetpack, and with CCD and physics sub-stepping, my character is still passing through my terrain unless I make it's capsule huge.

I'm working with a test "Open World" level. Is there something incompatible between CCD and open world maps (world partition?) in 5.4? Thnx!

fiery swallow
loud tree
fiery swallow
#

Probably the same with character movement component

#

Collision doesn't necessarily break, but you're moving so fast you're basically teleporting as you're moving faster then the tickrate can update you. And it starts becoming more like a teleport

sweet silo
#

i'm trying to use enhanced system with mouse wheel but i dont know how to make it go up and down

#

thanks

fiery swallow
#

Same effect happens when you tab out and your framerate drops to like 2 fps. You'll start glitching through walls

sweet silo
#

tried this but dosn't work

#

here is the code

fiery swallow
#

Collision isn't broken, you're going too fast

gentle urchin
blazing comet
# fiery swallow Probably the same with character movement component

I'm trying to recreate the jetpack in Just Cause 3, but I'm not sure the speeds. I think it's around 1200cm/s now or 12m/s. When I slow it down, it's more reliable, but I'm on fast hardware so I'm wondering if there is a more reliable solution of if I"m missing something.

fiery swallow
#

You could try and fix this problem by line tracing in the direction you're moving in, if you start getting close to an object then start reducing the speed

#

The other option is to downscale the size of the game

#

I mean everything

blazing comet
#

That's a brilliant idea to slow down.

fiery swallow
#

Because if everything's really small then the calculations and speed will be smaller too

loud tree
blazing comet
#

I'm trying ot understand your second suggestion. Can I pull that off by scaling everything by .1 ?

fiery swallow
#

I wouldn't even recommend it. It was good idea to reimportant everything to be way smaller in our case because it was a space game and everything was massive

#

It would fix your problem, but it's not a solution I'd recommend you

#

But it would solve the problem, for a tiny object 100/ms would feel as fast as a big object going 1000/ms

blazing comet
gentle urchin
#

Cant you just trace the delta ?

#

Every frame

#

You can assume the player will keepngoing in the exact same direction as last frame

#

So you predict and trace

#

Not relying on just the collider

#

Tick -> Velocity.Normalize x speed x Delta = Tracelength

Then trace from Actorlocation to actorlocation + TraceLength

#

Sweep capsule if you must

spice sequoia
#

Is there a way of automating in the editor (maybe a scripted asset action) of creating an enumeration list from an array of strings - I have a lot I want to convert to a list of enums but I don't want to have to create and type each one?

mental trellis
#

Create c++ enums using regex.

dawn gazelle
#

beat me to it...

#

I was gunna say use C++ and use excel with some clever formulas to just copy and paste the definition of each enumerator value.

mental trellis
#

That sounds far too complex.

#

However

spice sequoia
#

Thanks - was just reading in to a c++ option, is there a way of doing this via blueprints?

mental trellis
#

You would spend longer writing a script to do it than doing it by hand.

#

Also don't use BP enums and structs if you can avoid it.

granite dome
#

i got this tutorial that uses inputaction primaryaction but i cant find this in my first person character

loud tree
frosty heron
round elk
#

hey does anyone know of a way to make an item only have physics, ie fall, when it isnt a child of a character, thanks

spare sentinel
#

when i press the button the z value is rotating too -.-

#

why?

marble tusk
# spare sentinel why?

Because you're using "ADD Relative Rotation" and have the current relative Z attached to it

#

So it's adding the current relative Z rotation to the relative Z rotation when it's called

#

You'd probably only want that connected if you were to be using "SET relative rotation"

spare sentinel
#

when i reach ^90 z is rotating

#

on the top over the character the camera rotating on z value

marble tusk
#

gimbal lock probably

round elk
#

whenever the chracter picks up the item they ened up immediately dropping it

spare sentinel
#

what is gable lock?

frosty heron
#

Prob best to google it

#

But you will want to use quaternions to get around the issue of gimbal lock

spare sentinel
#

how can i do that?

frosty heron
#

@round elk I wouldn't say to avoid anything because almost everything have its uses but in the case of child actor component, just avoid that.

frosty heron
#

I don't know the actual calculation my self

spare sentinel
#

is is so hart to rotate the camera up and down? xD

#

no one know?

frosty heron
#

Gimbals lock is common issue, go look it up

round elk
#

ill redo to use attach actor to component?

#

ive heard of that but does it well, work

frosty heron
round elk
#

okay thank

frosty heron
#

@spare sentinel why are you rotating the camera boom to begin with?

#

If you want to manipulate the view, normally just set the control rotation

spare sentinel
#

control rotation? o.O what is this?

frosty heron
#

Go download third person template and see how the character adjust its view

#

You will see it's just mouse input with direction, added to the control rotation

#

Basically where the player is looking at

spare sentinel
#

that not what i need

#

i need top down template on press key move camrea up and down

#

from -90 to 90

#

complete up and copelte down

frosty heron
#

You still use control rotation for that

#

Just affect one of the axis

#

Before you brush it off probably try to understand important bit... look up control rotation then you can apply that to solve your problem

#

I don't see why the camera boom ever need to be rotated, it should be dictated by the control rotation

round elk
#

nevermind I fixed it

#

my dumbass made the box only use physics collisions

round elk
#

for whatever reason

#

I dont know why tf I clicked that

#

but thats 30m gone

visual ember
#

now you're older. and (maybe) wiser

round elk
#

yeah probably not the second one

#

well now im just confused

#

before attaching to actor it has physics

#

but when I detach it just hovers midair

frosty heron
#

@graceful sage still got error?

#

You just need to follow their instruction for the include. The file is located at subsystem/

graceful sage
woeful pike
#

Would this be the place to go to for any blueprinting issues?

woeful pike
#

I will try to limit my issues to more specific issues. I would say I am a beginner when it comes to blueprints. I look forward to working with and hearing from everyone.

timid wigeon
#

Hi folks - is there a way to find all the references and events bind to a dispatcher?

frosty heron
timid wigeon
#

Gotcha, Right, thanks!

#

Another question about event dispatcher:
From my understanding, event dispatcher is like a listener who is waiting to send message to their group chat, you can't implement logic in it in the class... but -- I also see that if a component has a event dispatcher, you can Override it?? What does this do?

#

Does any logic put in it gets executed when the event dispatcher is called, like you bind an event to it? What is the purpose of this compare to binding a event?

gentle urchin
#

You dont override it

#

You bind to it

#

So theres no inherited logic

#

They are functionally equal - binding manually or through the componemt details panel

#

And its kinda more like a mewa feed. Information only goes one way (from broadcaster (the caller) to the listeners (the bound events))

raw sleet
chrome crag
#

Hey Im having trouble with my collider capsule for my cat game
Any ideas thats not too costly? The stairs collisions look accurate

gentle urchin
#

IK?

#

Or atleast 2 ground traces to figure out the angle /rotation

chrome crag
# gentle urchin IK?

IK as in make animations for stairs? Sorry if bad question. I notice the capsule does not rotate if walking up stairs.. it seems problematic. Wish there was a way to have 4 capsules, one per foot or something lol

gentle urchin
#

Ik - inverse kinematic

#

Very commonly used for feet to touch uneven ground/steps

#

Basically a trace per foot, similar to your capsule wish, and then manipulation of the bones so it stretches to the hit location

chrome crag
#

Wow thats great

#

I will research it now, thank you!

mild galleon
#

Hello everyone!
I have a slight question here:
i have added in project settings default game mode and pawn etc.
Now, i have a main menu map with a different game mode, that kind of breaks it, because it overwrites the individual map settings, so either my main menu is broken or my map instance. What should i do?

frosty heron
#

@mild galleon you can override in your main menu map world setting to a game mode of your liking

mild galleon
#

in the world setting? okay, i thought it should be in the level blueprint, thank you for the pointer

#

thank you very much, it worked splendidly 🙂

timid wigeon
rough cedar
#

is it possible to have a blueprint event fire from within an actor component?

I have implemented a BPI on an actor that i place in the world. When I overlap it, I want it to send me some variables. But i need all that data to be sent via blueprint interface event within the actor component. I have tried a few setups but not seeing anything firing within the component. Only works when i have the event fire within the character (but i dont want that).

#

nvm i figured it out!

#

just had to take the overlapped actor then get the component by class and THEN send the message to the BPI

strange kraken
#

hey guys, i've got a blueprint idea in mind but don't quite know how to go about it. The concept is to make a boombox (or any asset), that emits particle effects to the beat of a song, where you can procedurally change what song and particle effects are on each track etc. I'd like to take a MIDI file, assign a niagara particle system to each track on the MIDI, which then plays according to the data on said MIDI file. These niagara systems' position is then centered around a mesh (i.e. the boombox).

umbral parrot
#

Hello everyone, if I took a course on the basics of programming (blueprints), then how can I continue to teach them to develop a knowledge base. Does it make sense to do some mechanics according to tutorials, If I don't understand the whole code. Or are there any tasks for beginners in blueprits? I only need knowledge in the field of blueprints, in the future I will not study C++

frosty heron
#

not a single video in youtube is for production

#

majority of them infact pretty bad

umbral parrot
frosty heron
#

you need to learn OOP

#

functions, events, event dispatcher, components, variables, inheritance, polymorphism

#

data types, including structs, data assets, data table

#

those are just the bare minimum

umbral parrot
# frosty heron you need to learn OOP

This is what I mean. I took a course on OOP and now I began to better understand what was happening, only no course will provide an opportunity to understand all the nodes. I'm wondering how best to create a knowledge base in blueprits . I watch how others do it according to tutorials (although i don’t understand half the code) or do something of own, albeit very primitive, but what I will fully understand?

frosty heron
#

rest is you figure out the logic on your own

mighty crown
#

Is there a way to filter on a datatables rows using a combination of the primary asset ID and other keys?

#

Like in SQL you can do SELECT * FROM X TABLE WHERE NAME == BLAH BLAH AND OTHER PROPERTY == BLAHBLAH?

spark steppe
#

no

ancient moth
#

Hey guys, I'm trying to implement a Dragable widget and now I have the issue, when i set the DefaultDragVisual to be the widget itself the drop callback is not fired anymore 😦

crude helm
#

Hey, I think I'm missing something very simple somewhere.
Regardless of what value I set to my initial seed (big red square), the sub sequent blueprints will always generate the same number.
Googling it a little bit, found people saying that one needs to make sure it is being passed as a reference, otherwise it will reset the stream to the start position. But as far as I can tell, there is only Structure for stream, no reference :(, also even if it resets to the start of the stream, the initial seed is different, I'm manually change it, so the initial position should also have a different value.

What am I missing?
Do I really need to generate a number from the stream, pass the number instead of the stream, then make a new random stream from that number and finally use this new stream?

spark steppe
#

you can't pass variables by reference when spawning a new actor

#

you should most likely implement your random seed in some global thing, e.g. gameinstance and provide a getter for others to use it

tribal gazelle
#

What would be the best practice to create a multi-language system? I was thinking of some sort of data table setup but is there any default or better ways to achieve it?

dry sleet
crude helm
crude helm
sharp python
#

Perhaps a dumb question, but: how bad is it really to have widgets tick? It is infinitely easier to do some things on a tick basis instead of with events (which will get called once every few ticks at best anyway) but everyone is warning me against ticking widgets. Is it a problem when I only have 10 instances of the widget at most?

frosty heron
#

for the most part you don't really need widget to tick?

#

just update values with event dispatcher

dry sleet
#

If the event dispatcher will invoke on tick (roughly), I'd just tick the widget.

sharp python
#

The caveat is that the event dispatcher will get called at tick rates anyway. 🤔

dry sleet
#

And see if it shows up on the profiler.

sharp python
#

The bar regenerates.

mighty crown
dry sleet
#

Does it represent a player value?

sharp python
#

It does not regenerate all the time, but it regenerates after you pick up health, yes.

dry sleet
#

In that case I would just subscribe to an event somewhere to update the bar, which would prevent it from ticking when the player's health is full, for instance.

sharp python
#

That is one half of what the widget tick does; the other half is to show/hide a target marker when you are targetting the character. This can be event driven but doing so requires each NPC to subscribe to the player's targetting component and that seems suboptimal as well.

sweet silo
#

hi i wanna use mouse wheel down for - 10 rotation and wheel up for +10 rotation how can i do that with Enhanced ? tahnks

#

this is my setup

sharp python
sweet silo
#

as if it didn't recognize mouse wheel up or down

sharp python
#

Do you mean scroll the mouse wheel up/down, or click/unclick the mouse wheel?

sweet silo
#

scroll the mouse

sharp python
#

If it's scroll, you'll need the ongoing exec pin and use the value to determine by how much

sweet silo
#

oh ok !

sharp python
#

You're listening to the start of the scrolling but aren't doing anything with the direction you're scrolling in

sweet silo
#

yeah that's what i thought

#

i would need to divide it between 1 or 0 or something

#

i should have something like this

#

but don't know how to get it

sharp python
sweet silo
#

i dont understand how this should work

#
  • before the real plank was spawning where the transparent one was but not anymore :/
odd kiln
#

Hi all

#

Anyone know how to iterate through a structure members ?

#

I have a Structure with multiple Arrays in it "Array_1" ; "Array_2" etc... and I want to iterate through them

frosty heron
odd kiln
frosty heron
#

sure

odd kiln
#

I can't do it automatically ? Like if I have 50 arrays..

hollow cove
#

couldnt you just make a map and put the array struct in the values

#

then you loop through the values and then loop through arrays

#

or just an array of array struct

frosty heron
odd kiln
#

They all are Array of Integers

frosty heron
#

then wrap them in an array

#

Array of My Integers

hollow cove
#

just make an array of arrays then?

frosty heron
#

that consist of array of integers

#

For each element of my integer , do a loop

odd kiln
#

So no need of Structure ?

frosty heron
#

depend on what you are doing

#

no context whatsoever is given

hollow cove
#

youll need a struct to be able to put an array within an array

frosty heron
#

I don't think that's accurate

odd kiln
#

So in my Structure I create an array

#

Of integers

hollow cove
odd kiln
#

But I need them to be "separate" by a different name

#

If I wrap them into one array it will be a problem right ?

frosty heron
#

well I guess in blueprint you need a struct

hollow cove
#

then use a map i guess?

odd kiln
#

So in my Struct_01 I create another Struct ?

hollow cove
#

if each name is unique

odd kiln
#

But in a Map I can set an array ?

frosty heron
#

you can but do you need a key value pair?

odd kiln
#

Yes I need an identifier for each array

hollow cove
#

make array struct like this

odd kiln
#

Because I will load these arrays and put them into each object which contains the correct name

odd kiln
hollow cove
#

map like this

#

now you can loop through the map keys and values

odd kiln
#

And I can add multiple Arrays in my Struct ?

hollow cove
#

you need multiple arrays for each key or just multiple keyed values?

#

you can do this with maps...

odd kiln
#

I need multiple arrays of integers and each array of integers has to have unique identifier

hollow cove
#

just keep adding elements to the map

odd kiln
#

So I add my multiple arrays in the Blueprint variable itself and not the Structure ?

hollow cove
#

yes, just make the structure a single array so you can use that as a value in the map

odd kiln
#

Ok I'll try that. Thanks !

hollow cove
#

heres an example usage, idk what you're doing though

sweet silo
#

hi im trying to make a clamp of a rotation what's the right way to do it

#

thanks

#

like i dont want it to go higher than 45

#

or 90 here

spark steppe
#

get the current rotation, add your offset, clamp the result, and set the rotation to whatever actor/component that is

copper chasm
#

I'm doing that thing where I make something more complicated than it needs to be again - I have a top down game where I want to be able to left click to select a character or an object. I am currently doing get hit result under cursor by channel, and then from there I am casting the hit actor to character, and if is valid, storing that as a "selected character", if it is not valid, checking if it is an object, and if it is valid, storing that as a "selected object" - is there a more streamlined way to do this?

spark steppe
#

if they are stored to serve similar logic you could use an interface (but that could also be over engineered in some cases...)

#

so after all it's up to you

copper chasm
#

I'm trying to keep it simple simple for right now to make sure I get the processes

spark steppe
#

if you are a beginner keep it that way

copper chasm
#

Characters can be selected and moved around, objects can be selected and then "interacted with" (interactions pending)

#

I'm trying to make the controller agnostic to the individual actors, I don't want to have to set up onclicked/hovered logic in each parent

sweet silo
silent plaza
#

Hello, I'm having a problem when I want to make a transition between two cameras, between the player's camera and the cine-camera actor in Level Sequence. I've ticked CanBlend and I want to make the transition between the two cameras. I'm using the Level Sequence editor to do this, but the problem, as you can see in the video, is that when I do this I get a sort of pop when I make the transition between the Level Sequence camera and the player camera at the moment of the blend.

The two camera have exactly the same settings.

How can I remove this pop?

Thanks a lot.

faint yew
#

Hey guys I'm curious... say I've got BP actor. I'd like to reference some sort of asset UMyAsset, that would have its own settings (like a data asset) + it would have its own event graph and implement some sort of event. The BP actor would then call this event, passing itself to it.

Is there some way to do this? Point is I'd like to have both the data + the BP scripting, in one asset, and reference it from another BP actor.

radiant wren
#

If I'm understanding what you're after... perhaps a component?

#

@faint yew

faint yew
radiant wren
#

Oh so you don't want to attach them? Ok then that'd just be two seperate actors that communitcate via an interface or casting, no?

faint yew
# radiant wren Oh so you don't want to attach them? Ok then that'd just be two seperate actors ...

Well that's also an option, but again, I don't really need to spawn it. It's more like... in the BP actor, I want to have a parameter, and in that parameter I'll choose the "function" that I want to use.

Sort of like how you can choose you know, say a curve asset. But instead, I want to choose an asset that will have some data like a curve etc., but it will also contain a specific function that I'll define myself in blueprints.

radiant wren
#

hmmm... Function Library?

faint yew
#

Yeah function library is very close, but it only has local variables.

radiant wren
#

Are you able to output the results of those variables and make them variables in the other bp?

#

(I've never actually used a function library, I just know they exist XD)

odd kiln
#

Anyone knows how to save my struct ?

#

I have a "Struct_01" and a "Struct_02". My "Struct_01" contains a Map (Name + Struct_02) but I can't succeed to save the "Struct_02"

#

My variables are not updated

#

Here is a screenshot. The "Array" Output is printing correctly but my "Print String" after the "Set S Test Structure (by ref)" is not printing the correct number.

#

I guess there is something I did not understand

frosty heron
#

set member

#

that find probably returns a copy

odd kiln
#

I tried with "Set Member" node too but it's same

#

You mean the second "Find" node attached to the "Print String" ?

#

I don't know if I don't "Set" correctly or if the issue is with the "Find"

#

The "Set S Test Structure (by ref)" node should save the values into my "S_Test_02" struct, right ?

#

Or am I missing something to save my "S_Test_02" struct ?

odd kiln
#

I had to do this, you were right Map::Find returns a copy, and you’re changing that copy, not the struct that’s inside the map. After setting the members, you can do an Add on the map with the Key and StructOut (so overriding the stored value with your new copy).

#

Thank you very much!

fallow hinge
#

Hey guys need some input from yall. Im making an elevator BP and it has mutiple floors. It works by 2 Bps the Elevator Bp and BP elevator floor. I have the call button working and it going to select floors. But now i need help in figuring out a way to do the buttons on the inside. I want to generate them based on the amount of floors that the elevator has modularly Ive tried a few solutions including spawning static mesh as component and hiding and unhiding based on which floors are in the index. Neither worked for me. Does anyone have any input or solution that they would be able to share with me?

#

Ideally i want to spawn a button with interactivity that has an assigned floor value

#

the floors are integers

radiant wren
#

Is there a better way to control where my actor would be on a spline based on a certain speed than this? cause it gets jumpy when I want to switch the Spline it's on...

spare sentinel
#

someone know the gimbal lock?

lunar sleet
fallow hinge
lunar sleet
fallow hinge
lunar sleet
#

doesn't make much sense from a design perspective but who am I to judge

#

anyways, you can probably have 100x arrow components or w/e and just attach static mesh components (buttons) to them as needed dynamically

#

put said arrow components in an array so you can iterate over them.

fallow hinge
#

I dont think that is a good way to do it but thanks for the input

#

Possibly something like static mesh instancing based on offsets

#

Also trying to decide whether to have the panel in the elevator bp or have it as a seperate bp

#

I tried the seperate method with adding static mesh components but the arrays didnt line up and was inconsistent when adding the indexs in a for loop

#

So i might try to do it via the elevator bp and get the array of the linked floors and connect the indexs

#

That way floor 1 is floor 1 in both indexs

#

Instead of weird inconsistencies

silk cosmos
#

does anyone know what's up with my rotators? Every time I try to edit one of the default axis it randomly changes one of the other axis???

mental trellis
#

That'll be because it's normalising them.

#

Or conveting them to quats and back again.

silk cosmos
#

I swear its never done this before

lunar sleet
#

my fault for not going with my initial instinct to just let you rubberduck yourself out of it tho.

mental trellis
lunar sleet
fallow hinge
mental trellis
lunar sleet
lunar sleet
mental trellis
#

He's editing a raw transform, though.

lunar sleet
#

and you said nah

#

😄

mental trellis
#

😛

warped juniper
#

For making an actor damage collision system, would you reccomend using component tags, or using custom collision channels?

past hull
#

hello,
could you help me improve this logic for firing a weapon ? I feel that doing the enum each time a fire input is triggered is bad but I dont have other idea

warped juniper
#

I don't know exactly how your firing system works so I can't fully judge this... But enums are basically a form of branch

past hull
rich locust
#

most cursed thing i've ever done)

mild ice
rich locust
#

it wasn't needed in the end, but it looks super cursed)

mild ice
#

2 spooky 4 me

old cypress
#

Is there a function or event that is called after all EnhancedInputComponent inputs but before AActor::Tick?

faint pasture
faint pasture
#

or rather, there are infinite euler angles that corrospond to the same rotation in space

#

Don't directly work with euler angles if you're doing something outside their scope.

gentle urchin
fallow hinge
#

so it practically could be used effectively to load level streams

#

I have the movement and everything perfect i just need to set up the buttons which im in the middle of doing right now

gentle urchin
#

So the only thing remaining is the interactive buttons for the different floors?

fallow hinge
#

I have the call buttons sorted in the elevator floor bp

gentle urchin
#

So a for loop then

fallow hinge
#

but for some reason it was inconsitent with setting the right indexs

#

i have it in the right range

gentle urchin
#

Sounds like code issue

#

Practically it will work

#

So just gotta allign the code output with the world data , so to speak

fallow hinge
#

In theory that was my conclusion aswell

gentle urchin
#

Floors should be designated an id sorted by their Z

fallow hinge
#

They are

#

0 is ground and top is last index

gentle urchin
#

So the only thing left is the code

fallow hinge
#

This is what i had

gentle urchin
#

You want /%

#

Division and modulo

fallow hinge
#

Which went into that

#

and so on

gentle urchin
#

Index % MaxPerRow = row
Index / MaxPerRow = column

#
Rowoffset = rownumber * offsetPerRow
Columnoffset = columnnumber x offsetPerColumm 
#

Should be fairly straight

#

Verify code øogic by printing the given index to the buttons

#

If they all match up but the id somehow goes to the wrong floor, then your floor ids are messed up

fallow hinge
#

Floor Ints are pretty simple

#

0 is ground floor

#

and goes up for next floor and so on

#

and the assigned floor is set in construction script

#

Cheers for help man im gonna try that in practice tomorrow morning

gentle urchin
#

Id be more comfy with finalmfloors evaluated at beginplay / runtime personally

odd kiln
#

Can I get only the first 3 items of an array which contains 10 elements?

gentle urchin
#

Sure

#

For 0 to 2 do....

odd kiln
#

So For Loop ?

gentle urchin
#

ForLoop (start index = 0, end index = 2)

odd kiln
#

Then I want to set these 3 items in another Array

#

I need to add them, right ?

empty marten
#

Hey peeps,
Can someone please explain to me when its best to use a Macro in a blueprint? Some peeps say not to use them but what's their general purpose?

dawn gazelle
#

They are useful if you have duplicated code that also needs to be latent, or if you want to use wildcards of variable types in some way. If they don't need to be latent in any way and you don't need to use wildcards, then you're generally better off with a function.

odd kiln
#

Thank you all!

ashen jungle
#

Hello
Could someone help me with spawning actors?
I was trying to spawn one actor
If an enemy go into sphere collision range and move the actor to the enemy but i dont know how spawn the actor and move the actor like that

scarlet pewter
#

Hey there! I just wanna check that this is the right space for help with blueprints? Essentially I've been following a tutorial by CodeThings to create a door similar to Resident Evil where it opens partially then opens fully and should then close behind you. I've rewatched it many times and can't find the issue.

Essentially the door will occasionally open towards the player (should be away) and when behind the door it will partially open towards the player (wrong) and then open properly. I believe it has something to do with the mathematics involved, but its quite simple and I can't figure out what the issue is. I have a blueprint I can send of the door, the tutorial and a video showing the issue, I just wanted to make sure this is the right place and I could really use some support with this. Thank you!

(and the door doesn't close behind the player which is also not helpful lol)

#

This is the tutorial I followed: https://www.youtube.com/watch?v=ARtaj0dAE20

This is my blueprint: https://blueprintue.com/blueprint/-eeyxqmf/

This is the issue:

Support Me & Get These Files Here: https://www.patreon.com/codethings
CodeThings Community Discord: https://discord.gg/ngVv7JQJMT

Ready to make your game even more realistic? In this tutorial, we remake a Resident Evil 7 staple in its door system. If you missed the previous tutorial, don't worry, I've got you covered with a card link to catch u...

▶ Play video
zealous zenith
#

Not sure if this is the right tab to ask this in, but why is it that waterbodylake does not change my character movement component mode to swimming? If i set water volume to true, then I can swim, but shouldnt being in the water change this? I saw some tutorials that choose flying mode instead of swimming for swimming. So they are flying in the water and doing a swim animation, but I am not sure what is best.

lunar sleet
#

Whether that’s swimming or flying depends on what works best for your use case, so try both

fiery swallow
#

Additionally, the engine assumes almost nothing about your game. As far as the engine is concerned a pool of water means absolutely nothing. You have to write your own logic

rich locust
#

speaking of, i might need a little bit of an assistance
i've encountered a problem, i made a custom pawn with similar capsule basis, but, for some reason, it doesn't register any direct damage, like Pain causing volume and such, since capsule is just a component it can't directly bind events on "on damaged" and pawn actor itself outputs 0

zealous zenith
proven moat
#

Hi, I am trying a basic scenario with UI widget Bowl button, when clicked the ball will attach to character mesh and detach with physics and impulse like regular throw but I am facing issue when I try to reattach the ball, yes I disabled physics and collision but in outliner it's showing it's attaching but in gameplay it's stay at first time thrown location. I tried and verified everything. Please help. This is my last option.🙂

fast compass
#

If i have a character that I am trying to manually lerp the position of, it will keep trying to stick to the ground or the navmesh. I am trying to lerp it on top of a table for x amount of seconds, and then back to the ground. I assume I have to disable something on the character, controller or whatever but I cannot figure out what.

frosty heron
heady lantern
#

Anybody have an idea why this Bind Event is working inside of a HUD Blueprint:

#

But this one isn't working inside the Game Instance:

#

Here is the call from the button on a separate widget:

versed sun
#

Start Hud doesn't yet exist on the Game Instance's Init , add a delay before the cast

heady lantern
frosty heron
#

and that is also a redudant casting

#

read the warning

#

casting is just a type check

heady lantern
#

I followed the docs for casting. The note says Drive HUD Reference is already a Drive HUD, but if you disconnect it, it get's an error. Regardless, the others function with the same note.

#

Should I be getting the reference variables from the BP_HUD and using them in Game Instance?

frosty heron
#

@heady lantern 100% you misunderstood what casting is for

#

also regardless you need to set the reference

heady lantern
frosty heron
#

you are assigning a pointer to null

frosty heron
#

ain't no way you get these idea from anywhere

heady lantern
#

Ok bud.

frosty heron
#

You are casting an empty variable, then assigning that empty variable to it self

heady lantern
#

Way to make someone new feel stupid and put them off from asking questions.

frosty heron
#

where do that even come from

heady lantern
#

Your attitude. It's not pleasant, lol

frosty heron
#

some people don't like being told they are doing the wrong thing I guess

heady lantern
#

That's not what I'm talking about at all.

frosty heron
#

even tho that's just a fact and the info they need to fix their problem

heady lantern
#

It's the way you belittle while you do it.

frosty heron
#

you are doing the wrong thing

#

what do you want me to say

heady lantern
#

I'm well aware.

#

That's why I asked for help. Not condescending bs.

frosty heron
#

U were given help

#

you are given direction to look what casting is

heady lantern
#

Okay pal. I don't care to argue.

frosty heron
#

but no, I guess just be lazy

heady lantern
#

Lol, now I'm lazy?

#

So helpful.

frosty heron
#

seems like you want a spoon feeding at this point

heady lantern
#

Not at all.

frosty heron
#

Uses cast wrongly, told to look what cast does -> gets offended

heady lantern
#

Not what happened. Offended by the attitude and the belittling, not by the "advice" lol

frosty heron
#

rather than fighting help, go fix your problem by reading the part where you are struggling with

#

saying you don't understand what you are doing is not belittling

heady lantern
#

You're an asshole, lmao.

thin panther
# heady lantern That doesn't seem to work either

Yes, that cast is pointless.
Casting is a type check, seeing if a general reference can be more specific (I.e. Is this Actor a DriveHUD), if yes, let me treat it like one.

Disconnecting the casts is the right move, however you still want to check validity of the object. The error you'll be getting is because the references you are casting are null, i.e. you're not setting them anywhere.

I'm sure you can deduce that this means you need to set them somewhere :P, either by grabbing the reference when it's spawned and saving it somewhere easy, or a couple of other methods. (If this DriveHUD is a widget reference, you may want to consider having the HUD class own all of these, as it's a nice easy globally accessible, per player, non replicated container for widgets)

obtuse oriole
#

why can't I set the members?

gentle urchin
#

Are they otherwise blueprint writeable?

#

Are you in some const function?

zealous moth
#

In a packaged build, my spawned AI is somehow not at the same height as my PIE levels and off by quite a lot

#

This is packaged

#

Z is positive 40

#

in PIE, it's -50 as it should be

#

the problem becomes that the unit is not touching the ground and cannot run the AI move script

#

anyone has any ideas? :/

gentle urchin
#

Not sure why its offset but

#

Force it to the ground on beginplay? 😆

#

Wouldnt they fall down tho? Gravity and all?

zealous moth
#

the ground is at -50

#

the values you see up there are the AI target locations

#

but the AI is actually set to 40.149

#

and I replicated this while having its location shown on tick in PIE and in the packaged build

#

so for some reason, in build, the Z location is set to something other than the ground

gentle urchin
#

Tried to just force them ?

zealous moth
#

this is another instance of the packaged project AI just doing weird stuff

gentle urchin
#

Beginplay -> trace downn-> set new location

zealous moth
#

packaging it now to test 😄

gentle urchin
#

Ive seen issues with nav mesh generation in packaged

#

Had a few of those myself

zealous moth
#

I am wondering if it's the target location Z that is the issue

#

trying to force the AI's Z on it

gentle urchin
#

Try without the z overriden

zealous moth
#

so if i force it, nope, doesn't work

#

gonna try with a value of -50 as target

zealous moth
# gentle urchin Try without the z overriden

which part?
I tried:

  • force on tick the location to -50, the slime is under the floor
  • leave the slime as it is: slime is at 40 and tries to find something at 40 but the nav mesh is at -50
    I'm trying not to force the nav point to always - 50
gentle urchin
#

Got baked navmesh?

#

Using recast?

zealous moth
#

also didn't work

#

yes

#

recast

#

it's a maze that is proc gen and I recast the nav at runtime

gentle urchin
#

Dynamic nav then

#

Not from invokers only i suppose

zealous moth
#

invokers never worked for me, even in PIE

#

@gentle urchin

#

did i tick something wrong? it was always dynamic

gentle urchin
#

Sorry, had to fix a dirty job. My A.I hasnt gotten the potty training set yet

#

Settings look fine to me

#

Does anything nav related work?

zealous moth
#

in PIE yes but I haven't tried a static nav mesh

#

I could

gentle urchin
#

Wont work with proc gen tho

zealous moth
#

it wont?