#blueprint

1 messages · Page 222 of 1

chrome pumice
#

idk how but filling in actor just any actor actually just fixxed it

#

that was so weird cuz i dont remember this not working like ever

#

Ue5 Peak

stuck hedge
#

Any idea why I can make an eattachmentrule enum variable in a blueprint, but in a struct, It's not available as a variable type? Tons of other enums are, but not that one

soft lion
#

My set percent function is working in breakpoints but no matter what in my HUD I can't seem to get any progress bars to update. I have made idk how many games I understand how progress bars work, I am lost I can't figure out what is so wrong my bars won't update at any time in this project.

#

When I update values the percent correctly calculates in my breakpoints but in the HUD it never changes

#

Where else can I look for an issue like this?

#

If I put text the text values change

#

just not progress bars this time bro I'm dying

#

Nvm I put text below at the same time and it looks like for some reason there's one stacked on top of another. That's a direction I can go with damn

#

Yeah there was 2 HUDs being created my bad

frosty heron
#

Probably running it on some begin play for mp

#

Or in some character bp that isn't filtered by locally controlled

gentle urchin
#

Also, encapsulate the logic inside the widget

soft lion
#

I did

gentle urchin
#

Dont let an external actor define how they update

soft lion
#

It's fine I had the call to create HUD inside the BP player

gentle urchin
#

Instead listen for event dispatchers

soft lion
#

Guy my entire widgets are MVC

#

All my values are delegates

#

I had just forgot when I set up this project I did a quick throw together a HUD to show health values

#

and now I made the real widgets setting this up properly I forgot to not call create HUD in BP so I called it once in BP once in C++

gentle urchin
#

Fair enough^^

#

So you solved it then, with double hud being the issue?

soft lion
#

Yes that was the whole issue was double hud

#

I deleted the function out of BP player it works just fine

gentle urchin
#

Perfecto

next kite
#

Any people in here good with UMG?

calm comet
#

how to work with elements in array of a Input Action ? Thank you for hepls

soft lion
#

You're doing it right like you have move forward with different options for key inputs

#

but you can just make it IA_Move and add those move backward keys there, and negate the values

#

But to your question I don't understand what you're asking either

calm comet
#

wait

soft lion
#

what do you mean array

calm comet
#

actually, i want create ReBinding key Mapping feature for player can change input in setting, Some input action can have many key, so i need able to change which key instead just one key and remove rest of them

soft lion
#

Oh I don't know anything about rebinding sorry

next kite
dark drum
# calm comet actually, i want create ReBinding key Mapping feature for player can change inpu...
hardy mango
#

I am having a game mode where you control a VIEW camera - i was accomplishing this by having an ACharacter base class that has the cameara angled desired - allowing for AddActorWorldOffset(...) while maintaining Z height relative to the landscape it is walking on top of... which gives appropriate height offests when moving up ramps, climbing ladders etc (Think XCom camera follow on a controlled pawn).

The problem i'm facing is the camera actor moves REALLY slow (expected) when climbing elevations. How do I make it so that the camera wouldnt have this physics lag when climbing elevated landscapes? I"m looking in the CMC and found this - thought it was the culprit but it is enabled by default... and it is worse when turned off. I literally want ZERO phsyics applied when climbing elevation - if this is even possible?

gentle urchin
#

You could force update the Z?

hardy mango
#

i dont know thats a viable solution - going downhill - there is 0 resistance. its only uphill. there has to be some calculation on slope - i'll look into the CMC coding - may need to extend the class and override funcitonality

gentle urchin
#

Let me check xcom then. Sounds like i misunderstood the issue

#

Sounded like you wanted constant movement regardless of elevation differences

hardy mango
#

i do know that XCom has the same functionality - but they really have just a set height in Z as far as the camera goes

hardy mango
#

that boolean on the CMC appears to be the requested behavior - but it is not reacting as i'd expect it to :/

gentle urchin
#

Yeah that ignores Z

#

In its velocity check/limiter

#

think i used a floating pawn for my rts camera

#

cmc sounds rather overkill

#

checking now to see how it behaves...

hardy mango
#

how would you handle dynamically changing z height? IE: going over hills/elevation changes

gentle urchin
hardy mango
#

i was relying on the CMC + Character class to perform this

#

with the Camera boom driving it.

gentle urchin
#

i might've ditched the cameraboom

#

and just done the calc myself

hardy mango
#

it just seems added overhead

#

but this is a single player game

#

not much goign on

#

might be worht hte sacrifice

gentle urchin
#

me doing it manually is likely cheaper than the boom 😛

#

since i dont care about collisions etc

keen forge
#

Hello people!

keen forge
#

how has your day been?

hardy mango
#

how bout you?

keen forge
#

Would anyone here by any chance have a little bit to sit down and help me with a really minor issue I'm having haha

#

I think I'm staring myself blind and missing something obvious.

gentle urchin
#

i did use springarm

keen forge
#

I fixed it in the process of trying to test it again

#

by restarting the godamn engine...

covert arrow
#

Hi everyone,

I am experiencing a issue with my post process vignette to signify to the player that he has taken damage. Now, the begin visual function is working because it is showing the red vignette I specified but the end visual part is not working correctly because I would like it to fade out. Basically, I put it on a set timer by function node so that it can call it based on how much damage I've taken. If you can let me know what I did something and explain what I can do better on some parts of my code I would appreciate it 👍.

barren tangle
#

Do you when when the "On Interrupted" is called?

gentle urchin
iron idol
#

if you have an equation that includes random integer in range and use the equation to set two different variables. Will the equation result be the same for both if run on one line of code?

hardy mango
hardy mango
#

if you duplicate it - it will calculate 2 seperate RNG's

iron idol
#

awesome

#

yea that makes sense and what I figured would happen. thanks for the confirmation

gentle urchin
gentle urchin
hardy mango
#

i'll load up a game here this afternoon - but i remember being able to zoom in/out. Dont know the engine but it mimics camera boom functionality.

I'm mostly concerned with getting past the hurdle of steep inclines going x/y slowly (physics). Again -i'll probably have to look into custom CMC code to pull this off.... shouldnt be that hard to track down where the ***AddActorWorldOffset ***comes into play

obtuse mulch
#

what are you trying to do

#

try pressing z and mouse 1

#

it will zoom in

iron zealot
#

Hi, do you know how to get in which function a warning took place ? I would like it to behave like errors.
I do attachments in many functions so it's hard to know where the warning came from:

agile moss
#

Anybody know to make player detect on which material of a landscape is put on?

lucid quiver
#

Hello all, I would like some opinions on where a Players "shared/replicated" Target variable should reside in a multiplayer game . Currently I have it on the "PlayerCharacter" class but, I am thinking that maybe it should live on the "PlayerState" class?

Example use case; As a player, click on another player character and get their target. Call it, "My Target's Target".

warped juniper
#

Is there a quick way to run a function on all objects minus one?

#

Not within an array, but I have several objects of the same class that hold a property I want reset when another object gets modified

warped juniper
#

The objects are all components within the actor so probably not an event dispatcher

empty marten
#

Curiosity question, are you able to add content to a data table at run time or are they read only content?

rugged wigeon
#

read only

empty marten
#

thank you

wet marsh
#

Those tables are specifically read-only

empty marten
#

Thanks 🙂

runic parrot
rose crest
#

you have auto exposure on

wet marsh
#

For some reason no matter what I do, input doesn't trigger. The subsystem is added and valid.
No InputAction triggers ever.

mild ibex
#

is there any reason why playing a level sequence in bp would immediately cause lag, even if the sequnece is empty?

obtuse kiln
#

exploring hacky solutions for a problem I've been trying to figure out the last few days, any advice (even just 'no, that's too dumb to bother attempting') welcome

my enemy (using hte character class and movement component) is facing away from their target after an attack or being circle strafed or whatever. I don't want them to rotate in place or rotate sharply while barely moving, I want them to start moving at normal speed and turning in an arc even if it moves them further away at first.

Is any of these ideas at all viable:

EQS to find points to move to that will eventually get them turned around? I tried this and it was stuttering along the points even with what seemed like a fairly lightweight EQS, but maybe because it was moving, then doing a query, then moving, then doing a query? Any solution to that?

have a spline that it runs along with an appropriate curve until the target is within an appropriate angle for normal movement to work fine. only thing I'm iffy on is the possibility of overshooting the turn if it's not dynamic, but I dunno how quickly and performant-ly(?) a spline can be updated with an appropriate shape. I guess if it were a relatively short bit of curve that it just followed repeatedly that could work, but I again have no clue how smoothly that could be done. I'd have to figure out a way to make it not run into the environment, too, I guess.

I know, or at least strongly suspect, that root motion turn animations could do it (and the asset I'm using here does include those), but I'm not quite sure how to get that to play nicely with the rest of movement/not just end up with the overshooting-the-turn problem I'm worried about with a fixed spline

red cape
#

Anyone able to help? Im trying to communnicate between a widget and an actor BP, when the exit button is clicked i want the code in the actor BP to fire, instead of the input interact that is already there

warm fern
#

Is there no way to iterate over a Set in Blueprint?

rose crest
obtuse kiln
red cape
obtuse kiln
#

If there's just the one actor in the world you could use get actor of class

red cape
dawn gazelle
#

If this widget has the ownership assigned to the player controller that is utilizing these inputs, you could just use "Get Owning Player" in the widget which gives you a reference to the player controller, and from that you can get its controlled pawn.

#

i think there's even a "Get Owning Player Pawn" in widgets.

frosty heron
# red cape thats worked, legend thank you

You better off learning how to pass the reference to the widget

Get actor of class only work for singleton and it's only a matter of time before you run into the same problem again.

surreal bridge
#

I am working on the tutorial for my game. Currently, I have everything hard coded in the level blueprint. However, doing things this way makes it rather difficult to save / load progress on it.

Does anyone have any suggestions on a better way to handle quests / tasks

trim matrix
#

Hello all!

I made a system where the player can pick up physical objects using a physics constraint. However, the problem is that when a client picks up an object, it doesn’t replicate. I’ve checked and made sure replication is on for the objects and all constraint components.

RPC_Server_Grabbing is set to “Run on Server”

RPC_Grabbing is set to “Multicast”

You can see my blueprint here:

https://blueprintue.com/blueprint/itsoybfr/

thin panther
undone bluff
#

player controller component doesn't sound too bad either

thin panther
#

I don't think I'd do quests in a component for the player controller personally. It depends on a few things, like if the game is multiplayer or not, etc. etc.

runic parrot
surreal bridge
#

Also, I am doing quite a lot of my game logic in the Game Instance.
Will this cause issues down the way or should I change how I am doing things?

I am using the game instance to handle saving, loading, changing stats and things, among many other things.

Currently the game is single player, but I want to add a multiplayer thing later on.

undone bluff
runic parrot
undone bluff
#

haha, classic

runic parrot
#

Tough that static mesh have collision by default when created with the modeling tool

undone bluff
#

I'm not sure, but auto generated collisions with a plane without thickness probably doesn't work nicely together either

frosty heron
frosty heron
#

I would suggest just trying to finish a single player game since you just start

undone bluff
runic parrot
undone bluff
odd kiln
#

Hi all

#

Anyone has an idea about making a constant radial froce pushing my Character ?

#

Should I use "Radial Force" and enable physics on my Capsule or is it better to fake it playing with velocity of the Character OR with a Set Actor Location node

undone bluff
#

add radial force does not require physics

odd kiln
#

My goal is that the Character has to be constantly pushed by a "Wind force" with some force varieties

undone bluff
#

it should add velocity regardless quite sure which will be used by the movement component

#

nevermind I am wrong

odd kiln
#

So it's better to use the "Radial Force" node ?

odd kiln
undone bluff
#

can't add radial force to character, you can launch character and multiply the force by delta time, maybe

undone bluff
odd kiln
#

Humm ok so I should play with the Launch Character node you think ?

#

With a Timeline or Tick ?

undone bluff
#

Tick, timelines are meant for visual changes and execute on the animation tick

#

instead you can call an event on tick and bind/unbind as needed

#

(or activate/deactivate ticking entirely)

#

if you have an actor that solely exists to add the force then the latter is a solid option

undone bluff
undone bluff
#

for the radial aspect I can only think of using find look at rotation and get the rotations forward vector

#

then scale the resulting vector inversly by distance

warped juniper
#

I need a quick help with something regard an actor that spawns other actors.
How can I add a preview on it to check where they would get spawned?

undone bluff
#

multiply by delta time and add it as impulse, done

warped juniper
#

For the record, it's an actor that creates X counts in a ring, with settings to control how many coins and such...

#

It works fine, but I can't see the coin placement in editor which is annoying

undone bluff
#

is there a reason you don't create them in the construction script?

warped juniper
#

How does that work here...?

#

I am nowhere near a decent programmer

undone bluff
#

well, if you use it the script will be executed in editor and baked so it won't need to run in the packaged game

warped juniper
#

That's nice, but this is something that outright spawns actors

#

I just need it to preview something at least

#

Could I maybe instead make it create something as a component and child of itself...?

undone bluff
#

you probably want to have the actors not spawn in on begin play if you can avoid it

warped juniper
#

Ah, I see. Any particular reason why?

undone bluff
#

just longer loading times

warped juniper
#

Ah I see

#

I have the actor as a quick and easy way to make coin patterns tbh

#

Like you know in mario games where you have several specific patterns. I thought making a simple tool for that would be somewhat faster.

undone bluff
#

right and the construction script would let you properly preview it in the editor and the coins would be there as if you placed them yourself

warped juniper
#

The thing is, the construction script cannot actually spawn actors

#

You can't put the node to create actors in it

frosty heron
#

I would do it with editor script and do it via button click.

Like have a generator actor that have a button you can click and everytime you click, it just generate the coins. In random pattern or not

#

And just have a bunch of different settings that are parametized

warped juniper
#

Ah, not sure how to do that, never tried it

undone bluff
#

ah, child actor components are supported though

warped juniper
#

This is the first time I ever heard of any of that honestly

#

Like I said I'm a programmer out of sheer necessity as of now

undone bluff
#

I haven't used them myself so far so I'm not sure if that's a good idea

frosty heron
#

Most people here are hobbyist imo

#

Ppl that make a living out of programming are prob in #cpp

warped juniper
#

I ain't a hobbyist

#

More so I'm a "why am I the one that has to do this"

frosty heron
#

You get paid to work on games? That's my dream

warped juniper
#

Like my BP knowledge is at a "I can work with people involving this" level, hardly full time stuff.

#

Not right now but yeah I have.

#

Just wanna wrap up with college so I can dive in back proper

undone bluff
#

I've used plenty of cpp when it's necessary, but overall I'm just a BP kinda guy out of many years of habit I guess

frosty heron
#

Well then it's a hobby project and most people are also in the same boat

warped juniper
#

Imo as someone who sucks at cpp

frosty heron
#

You gotta do what you gotta do, especially when you are in a small team or a solo dev

warped juniper
#

UE is at its best when using both bp and cpp

frosty heron
#

Even the cpp people never say to use 100% cpp

#

Those that do get banned actually for trolling

warped juniper
#

Yeah UE's best call system is within BPs

undone bluff
warped juniper
#

Ok yeah I refuse to touch slate with a 10 foot pole lol

frosty heron
#

I have maybe 20% bp atm, going to be more bp when the core system is done

pulsar hazel
frosty heron
#

Imo never limit your self, I did and I regret it.

#

Just learn what you have to learn

#

Do it out of love not neccesity

warped juniper
#

Okay so 2 things

#

There's nothing regarding bp specifically that would cause the issue

undone bluff
#

ColdSummer, any ideas how one could approach the Nier Automata dash?

pulsar hazel
warped juniper
#

And second, the problem is that your hierarchy doesn't really have access to the stuff

#

Like for testing it's fine

#

But I assure you, you DON'T need 2 canvas panels at once

frosty heron
undone bluff
#

yea pretty sure, plus the smooth transition to running

warped juniper
#

I actually did an in depth study on how to do dashes

undone bluff
#

it's tough

frosty heron
#

Certainly

warped juniper
#

How did the Nier Automata dash work again?

pulsar hazel
frosty heron
#

The smooth transition to running can just be a blend maybe? I actually have short dash to running

pulsar hazel
#

I will ask in umg talk

frosty heron
#

But my dash isn't influenced by player controller direction

#

Dash start -> run

warped juniper
#

If the dash can be influenced by player controls I would say it's done in 1 of 2 ways

undone bluff
#

yea my current setup uses motion warping but that takes away control

frosty heron
#

I will take a video when I got home

warped juniper
#

They have a direction vector that moves the character each tick in that direction, and the vector gets updated with input based on sensitivity

#

Or they apply constant velocity to the player character, with a new turn rate and physics settings for the "dash state"

#

I made a very simple dash using the CMC via repurposing the Flying Movement Mode. I only ditched it because when returning to walking, the player would inherit their flying velocity from the last update

odd kiln
undone bluff
#

I probably want to do a blendspace and have it as a cycle in the animbp instead of montages

odd kiln
#

I mean I can use the "Add Impulse" node in the "Actor_01" but target the "Actor_02", right ?

undone bluff
#

I rotate my character towards velocity so I have that off during the dash so the directional animations work properly, afterwards it will help transition into a forward sprint

undone bluff
warped juniper
#

Using states can work too

undone bluff
#

need the forward vector of the look at rotation

#

no state for dashing specifically yet, but would be good to have

warped juniper
#

Wait, but isn't Add Impulse for only once?

#

And Add Force to get called each tick

undone bluff
warped juniper
#

Ah, I see

undone bluff
#

so I suggested to add impulse and multiply by delta time

warped juniper
#

I really need to see how other people actually manage to do dashes ngl

odd kiln
#

So I have to use the "Add Impulse" on "Event Tick" and multiply it by the "Delta" of it

warped juniper
#

It's such a staple mechanic, how does everyone get to make one?

frosty heron
#

For nier automata dash, I would just have it as a state in the anim bp. The direction and input can be freely controlled in cmc.

Never venture there but should work?

undone bluff
odd kiln
#

I'll try that. Thank you so much !

warped juniper
#

iirc it also has a setting to ignore gravity yeah?

undone bluff
warped juniper
#

Like if you dash mid air in Nier, you reset your Z velocity

#

It's been ages since I played it

undone bluff
#

yea

#

I should install it to test honestly

warped juniper
#

But yeah, if it does reset Z velocity and disable gravity then

#

How would you then "make it dash"

undone bluff
#

disable friction, gravity, add velocity in the direction, then interpolate back after the dash and blend into running animation

#

in theory

warped juniper
#

Just set acceleration to an infinite value and tweak the max walk speed

#

You add velocity with just the Move node?

#

Or some other node I don't know the name of

#

I tried to do a root motion based dash but couldn't figure it out honestly.

undone bluff
#

nah just set velocity haha

#

I do that for sliding

warped juniper
#

Lol yeah?

undone bluff
#

works like a charm

warped juniper
#

Just set velocity for as long as the dash is in play?

#

Like every tick

undone bluff
#

honestly my current sliding behaviour already has most of what I need from the dash

warped juniper
#

@undone bluff Ah btw, on the construction script I could onlt manage to make it draw a debug circle to preview the stuff

#

It "works" but I need to click it for it to work

undone bluff
warped juniper
#

It works yeah, just not permanently

undone bluff
#

ah yea the script only executes when an update is triggered

#

not sure what'd happen if you make the debug circle show up forever

#

would probably make it unusable

whole dove
#

Sorry for the book while ya'll are chatting just throwing my question out there

I have a problem thats hopefully simpler than ive made it out to be in a rats nest of a BP. My third person camera orbits around the player on mouse movement. My running animations work fine while moving. I'm working on Idle animations now and id like to make it so that my characters feet stay planted in place until you've rotated far enough to trigger some stepping animations for various degrees around their point.

What I've got so far: While moving (WASD movement) i store the latest rotation of the root bone (feet). When standing still i compare this to the angle of the camera. If the angle reaches a threshold I play a sections from an animation montage that contains each of the 45,90, 135, 180 degree stepping animations. It sorta works until the animation starts and then its all borked.

So, surely theres a better way to do this lol

warped juniper
#

Then the more I update and tweak it, the more circles I get

undone bluff
#

yea

warped juniper
#

And it'd just be an eyesore

whole dove
#

I think i just thought of a way to do it with a blendshape..

undone bluff
#

you should be able to find resources on how to set it up if you look with that term

#

you def do not want to do this with montages

whole dove
#

probably right lol

#

Nice that term has a bunch of videos, thanks

warped juniper
#

@undone bluff btw, I'm curious about your project. What you making a dash for?

undone bluff
#

action rpg, with switching between third and first person (but properly, not half-assed like how bethesda does it)

warped juniper
#

Is the switching part of the gameplay or just a setting?

undone bluff
#

just an option to change perspective at any time because I enjoy being able to do that in games

whole dove
#

thanks dude haha

undone bluff
warped juniper
#

Thought it would be something like Clash: AoC

whole dove
#

I actually didn't add the turn animations, this way it detaches the character rotation from the camera when you're not moving so you can actually look at your character ,kinda like that better

warped juniper
#

The game has this fun little mechanic where you can enter first person mode and fight with a strong powerup

undone bluff
#

oh that game looks cool

#

for me first person just started out as a simple option to make exploring interiors a bit nicer

#

now it's proper with hidden but shadow casting head mesh, arms rendered separately and its whole own interaction system and animation setup

#

it's kinda a little like a second game

warped juniper
#

Clash is neat

#

As a fellow Latin dev it's a shame to see it perform poorly...

#

Imo the issue was that there was hardly any marketing for it

#

Like quality wise the game is excellent

raven vine
#

Can someone help me with concepting my idea? I'm trying to make a tile system that has hundreds, if not thousands of tiles, and the tiles need to be interchangeable. I would like to store these tiles in chunks, and the chunks would be a single actor. I'm just having trouble wrapping my head around how I would get this started and what I should store the information in. Arrays are too slow.

frosty heron
#

You are hitting bp limit when it comes to loops

#

Deff do procedural generation stuff or any large data in cpp

#

In bp you do be making copies and not to mention bp loops are slow as hell

raven vine
frosty heron
#

I mean if you don't care about it being slow since it's for editor then you can just use bp

#

If you want faster iteration you will need to use the right tool

warped juniper
#

You can also use bp's to interact and implement it if you make the stuff callable in cpp

#

But if it's a for loop... That has no place anywhere outside cpp imo

#

The performance difference is massive for how easy it is to implement it

gentle urchin
#

For only a thousand tiles bp is fine

#

I ran 50k on it, and while the initialngen was slow, the rest was not (altho my operations were limited to 1 tile swaps)

#

But ofc, c++ is far faster if its an option. Definetly my go to for larger loops

raven vine
#

Thank you, guys! I'm still very new at cpp and coding in general, but it really shouldn't be so hard setting up a bunch of tiles at xyz cords.

gentle urchin
#

Correct

#

But the number gets out of hand for bp quite fast^^

#

10x10x10 is suddenly 1000 tiles

dim halo
#

is there a way to rotate a box overlap actors? I am tryting to make an attack that hits in a square right in front of the ai but when i use the code in the attached photo it does not always create the square so that it lines up perfectly in front of the ai, as in sometimes it spawns and the ai is at the corner rather then the box being centered with the ai. Does anyone know how id fix this problem

hybrid ether
#

What is best way to detect is actor possessed. Like for example vehicles. I don't want to enemies detect those if are not possessed.

dry sleet
gentle urchin
#

isPlayerControlled is the closest you'd get for a 'flag' I think

hybrid ether
gentle urchin
#

so if all your cars , bikes etc are pawns then you can use this information

barren tangle
#

Hello, I have an issue with collision.
I have an actor that accelerate. But when reach a high speed it go through a collision object without activate the overlapping event.
I try to activate the CCD collision, the speed before passing though is increase but the issue is still there... is there a way to avoid that with all high speed?

gentle urchin
#

trace based on velocity

frosty heron
#

if it's a multiplayer game

gentle urchin
#

yeah

#

you'd need to ask it to possess it anyways, right ?

#

possess being a server auth event

frosty heron
#

yeah

glass blade
#

is someone experienced with using ik_hand_gun ? I'm having a hard time understanding what does it do.

#

or why would i use it instead of attaching guns with just a regular socket to hand_r

iron zealot
#

Hello, do you know what Reset Array is doing ? There is no description in-editor nor in the unreal website:

glass blade
iron zealot
#

@glass blade It says "Reset Array"

#

Top usefulness

glass blade
#

i mean it probably resets the array after the function is executed right?

#

so pretty much putting it back to a state how it was before you executed the functionm

#

im just guessing

iron zealot
#

But what does this means in the context of attached actors ? Ticking it does not seems to alter the behavior of anything

glass blade
#

can you show a bigger pic?

iron zealot
#

It may be C++ only

maiden wadi
# iron zealot Hello, do you know what `Reset Array` is doing ? There is no description in-edit...

It clears the array before populating it. Less useful in BP.

TArray<AActor*> AttachedActorList;
ActorA->GetAttachedActors(AttachedActorList, false);
ActorB->GetAttachedActors(AttachedActorList, false);
ActorC->GetAttachedActors(AttachedActorList, false);

For example this allows you to take these three actors, A, B, and C, and call the function on them with that as false, and populate the same array without having to copy or append it.

iron zealot
#

AAAHHHHHHHHHHHH thank you

#

void AActor::GetAttachedActors(TArray<class AActor*>& OutActors, bool bResetArray, bool bRecursivelyIncludeAttachedActors) const but we can't pass this in blueprints so it's useless here. That's it ?

maiden wadi
#

I'm not entirely sure. But being a pure node, I think the array will reset every time this is called because it will be a newly allocated array it posses from BP. So you'll probably get same logic regardless if it's on or off.

iron zealot
#

I think you're right, since it's impossible to set &OutActors

grave relic
#

When it comes to detecting stuff like collision. What is cheaper, using Get Collision Object Type. Or setting up a system with tags? I want to have weak-points on my enemies, and I dont know if I should make new custom collision channels or a tag system 🙂

maiden wadi
#

I think a lot of people do this via phys materials.

narrow pendant
#

how do I get this value in construction script?

I'm moving the spline component however Get Relative Location returns 0,0,0

grave relic
narrow pendant
#

I've seen people do that via bone names

#

you get the phys material for free if you do a line trace, I guess that's why

grave relic
gentle urchin
#

Bone is pretty generic in comparison

#

Low resolution

#

Hard to tell a joint from mid-bone

maiden wadi
heavy summit
#

Hi I made a widget, and it has a size box that I'm overriding the height and width.
I then put it into a canvas panel.. but the canvas panel seems to be deciding the size of the widget. Even if I change the variables they have no effect

Is there some setting I am missing?

gentle urchin
obtuse oriole
#

how do I set my sound source to not stop when player is outside the fade out area? basically can't even hear it. I am making a radio that loads sound with the help of Runtime Audio Importer plugin. I already made a sound asset and set always play but it still stops when player got out from the source region

remote meteor
cerulean prism
#

how (should I even) talk to PlayerState from a projectile? I have a liveProjectilesCounter in PS I wan to do a -- after the projectile despawns itself because of an internal timer

cerulean prism
remote meteor
#

on spawn of the projectile, you can bind OnDestroy of the projectile to do the --

cerulean prism
#

awesome, I'll look into binding, didn't know that. thanks

remote meteor
#

called Event Dispatcher in blueprints

dapper panther
#

Not sure where best to ask but any tutorials / documentation on creating player made trenches or other items that change the level? Like being able to grab a shovel, see a highlighted trench of where you want to dig, and insert the trench asset where the original world terrain was.

exotic saddle
kindred vault
# dapper panther Not sure where best to ask but any tutorials / documentation on creating player ...

Funny running you here, https://www.youtube.com/watch?v=b88Dj_k9b84
This video should cover what you are looking for. Need to make sure the trench assets can fit the terrain well.

Hello guys, in this quick and simple tutorial we are going to see how we can build objects with a preview in Unreal Engine 5.
↪️Project Files: https://bit.ly/GorkaGames_Patreon
🏆My New Unreal Course: https://bit.ly/UE5_StealthCourse_GameDevTv_GorkaGames
🔥Discord: https://bit.ly/GorkaGamesYouTubeDiscordServer

Danger Zone Tutorial: https://youtu....

▶ Play video
#

It'll be a bit tricker with replication, so keep that in mind.

native vector
#

i feel like this is simple but I cant figure it out. How can i stop a looping audio on an event end overlap?

#

is there an "opposite" of the play sound node?

gentle urchin
#

You need the audio comp handle

#

So using the play audio spawned or whatever its called

#

Whichever returns a reference to the audio comp

native vector
#

add audio component?

#

spawn sound at location?

fresh trench
#

My brain hurts, can anyone explain to me why my forward vector is going the wrong way...

marble tusk
#

So add the actor location right before the line end pin

#

Oh, and convert the bottom pin on the multiply to be a float

#

When you only multiply the x it'll mess up the direction it's pointing

fresh trench
#

Brilliant, tysm. Ive been having a nightmare trying to fix this. Im trying to apply forces in the forward vector and its been going crazy - this might just fix it 🥲

native vector
#

anyone know how to cast to a specific sphere collision within the BP_Player?

thin panther
#

What exactly do you want? This sounds like an XY problem.
Casting is just a type check, not accessing a specific instance. Casting takes a specific instance, and checks if it's of the requested type, converting the reference to that type if so.

#

It's like saying "is this piece of furniture I've showed you a chair?". It has no actual knowledge of that specific instance, it's not a getter.

native vector
#

okay wait lemme rephrase

#

how can i execute this overlap event when it overlaps specifically with a sphere collision in the player bp?

thin panther
#

any sphere collision, or a specific one?

native vector
#

well there's only one, so either i guess

thin panther
#

You could always manage the overlap event in the player itself.

If the sphere in the player wants to do something when it overlaps something, the sphere should be responsible for that

native vector
#

OHHHH that makes so much sense

#

thank you

thin panther
#

No problem, to put it another way, it would be a little odd if your enemies told your gun to shoot, instead of you :P

native vector
#

dude you're so right lmao

#

wait wait

thin panther
#

If you want different things to happen based on what the sphere overlaps with, take a look into interfaces.
It would essentially let you call an interface function on whatever's overlapped. Then if you wanted say a crate to break, you would implement the interface function on the crate, and do the breaking logic there, and if you wanted it to turn on a light, you could implement the function on the light... yada yada yada, you get the idea

native vector
#

hold on im still confused actually so

#

in the player bp, i can make an overlap event with the other object cast to the water bp

thin panther
#

Yup

#

Specifically an OnComponentBeginOverlap, for the sphere in question

azure narwhal
#

Trying to stand on an object with physics enabled using the default third person template causes some very weird behavior. The object and character will jitter wildly and launch either one far away. This happens at any size and weight.

hollow yacht
#

Hello can anybody point me in the direction as to why this simple Cast To StaticMeshActor is failing?

maiden wadi
#

Cause the thing you fed to it is not valid or not a StaticMeshActor.

faint gale
#

Hello, I am still learning unreal and hoping someone can help me with a issue I am running into. The blue prints in the screen shot work perfectly fine how I want, however the "Get World Location"/"Shooting Player Location" variable only sends properly if the host/server is the killer player controller, when a client shoots another player the hit indicator shows up but the "Get World Location"/"Shooting Player Location" is the same each time.

maiden wadi
hollow yacht
maiden wadi
hollow yacht
maiden wadi
#

Rather than casting to a StaticMeshActor, you could cast it to whatever this BP is and get that ShapeMeshComponent to set the material on.

hollow yacht
#

The nomenclature isn't the same but this is the Actor, it doesn't need to be this particular kind I don't think, I just need to have an actor where I can change the material/texture on an event trigger

maiden wadi
#

The other way would be to simply use the Actor type and GetComponent(s)ByClass

faint gale
ashen belfry
#

hey, I'm trying to get the closest point of a skeletal mesh from the cursor (using the get closest point on physics asset) which works fine if the cursor is outside of the mesh (pic 1), but not when the cursor is inside (pic 2). i really only need the outside edge. I've been adding an offset if the cursor is inside the bounding box before, however this makes it very hard to get inside any crevices the mesh has. anyone know a better way of getting the outside edge?

brittle wind
#

Does someone know's why my foot ik works totally fine on the master blueprint character, but does not work on a child blueprint of him?

fresh trench
#

Im feeling extremely stupid right now, Anyone know how I can add force in the forward vector? 🥲 Its currently making me go sideways

queen vault
#

I got this error "Blueprint Runtime Error: "Accessed None trying to read property CallFunc_CreateDynamicMaterialInstance_ReturnValue". Node: Set Scalar Parameter Value Graph: EventGraph Function: Execute Ubergraph BP Player Blueprint: BP_Player". The screenshot is the blueprint that caused the error. How do I fix? BTW I checked the param name in the material and it's the same name.

queen vault
#

If you only want to move forward only

maiden wadi
#

Force is a direction. ForwardVector is a direction. ActorLocation, is a point in space. Multiply ForwardVector and add it.

inland walrus
#

Is there another node I can use instead of set text, that will still set the text but only in intergs

queen vault
fresh trench
maiden wadi
maiden wadi
fresh trench
maiden wadi
#

If it's still going sideways only applying a multiplied forward vector, then your camera is sideways to the actor's forward vector.

fresh trench
#

It seems to work fine until I go on an incline, then when i re-enter the "vehicle" it loses control and freaks out

sweet shoal
#

does anyone know how to cut a hole in worldstatic as if it was a portal hole? (im struggling with the logic for disabling collision upon entering the portal)

  1. i used a small floor tile that is enabled upon entering the area of portal, but it caused an issue when youre touching the portal on your eyes height it teleports you from being stuck in geometry
  2. i used a method that is very basic. i have a scalable overlapping triggerbox that is turning off player's collision with worldstatic upon touching it and vise versa
    can anyone help with 3rd? like is there an actual way?
inland walrus
#

Any ideas on why this isn't working? It is saying I cannot afford this property even when I have more "crypto" than property cost

lilac hill
sweet shoal
#

like, you dont have do worry about worldstatic collision

#

because you dont get bumped into a wall

fiery ridge
weary citrus
#

Hey all, quick question: I'm adding a menu system and flow to my version of Breakout. The tutorial I'm following recommends creating a main menu as a separate Level. When the player clicks "Play", the game loads the Gameplay Level - Level1. But when this happens, I can't control the paddle.

I'm able to control the paddle when I load Level1 directly by starting the game "in" Level1. But when I load it from the main menu the player has no control over the game. What do I need to add to enable player controls on a new level?

#

For context, my Level1 blueprint looks like this:

little orchid
#

Hey everyone, have you ever worked on a level you're walking around and the characters fine, and then you open up a different level maybe from an asset pack or something and then all of a sudden your character that was once walking becomes grounded to the terrain and they're just running in place? And when you don't move the character just sits there and twitches up and down... 😭

This is a strange issue that's just happening right now and I don't know how to fix it, I've been spending the last few days building mechanics in a spaceship and I switched the level because I want to try something out and now I can't move and it's extremely frustrating I even disabled my line trace to see if that would help but nope still twitching and lock to the ground can't move

weary citrus
#

And my actual Player Paddle blueprint has this in it - which I assumed would be good enough:

chilly geyser
#

Maybe you guys have the same problem, check the defaults on the level

weary citrus
#

By Defaults, you mean these?

little orchid
#

Well the test bench level that I was using to build mechanics on was just the default open world UE level just blank and a regular sky that's all. I didn't change anything specifically, and then when I opened up the other level the defaults looked to be the same but yet I'm grounded However I'm going to try something and I'll get back to you

chilly geyser
weary citrus
# chilly geyser yep

So I'm not sure I understand how the default classes would enable control. If I set the main menu's defaults to those of Level1, the same issue persists.

It's almost as if I need to perform a function when Level1 loads, to give the player control of the pawn.

chilly geyser
#

try to set the input mode after you load the level

nova grotto
weary citrus
weary citrus
#

Now when I load the MainMenu, the screen is black. No UI Widget, nothing.

chilly geyser
#

what does the level blueprint look like on your main menu(level)?

weary citrus
#

The same.

chilly geyser
#

🤔 maybe the widget is set to not visible or collapsed?

weary citrus
#

Let me check.

chilly geyser
#

check in class defaults* too

weary citrus
#

It's not something I changed (at least, consciously) The elements of the Widget are all visible. I even created a new level, assigned its game mode as "MainMenu" and left the class defaults be and the screen is black.

#

That leads me to think it's something with the Game Mode or the Widget.

chilly geyser
#

in the new level did you set the level blueprint to create widget and add to viewport like the pic above?

weary citrus
#

Yup.

#

I copied and pasted from the original level to this one. So their BPs are the same.

#

I think something I might have done - and I don't know if it has an effect - is click this:

#

Because my MainMenu Game Mode and my game's Game Mode now open very different panels for me.

#

AH

#

Figured it out.

chilly geyser
#

what was it?

weary citrus
#

Not sure why, but when I drag my old GM_MainMenu into the GameMode Override, I get this:

chilly geyser
weary citrus
#

I recreated the Game Mode, dragged it over, and I get this:

#

The second loads the UI normally now.

little orchid
#

Okay so all my defaults are the same, and I even made a copy of the level and converted it to a world partition level just for the sake of it, all the defaults are the same the collision on the default character is default everything is just default. And my character is still grounded to the floor. 🤷🏾🤷🏾🤷🏾😭

weary citrus
# chilly geyser what was it?

And somehow...my player controls are back to normal when pressing Play. I think it was the setting Input Mode Game Only you suggested:

#

Thank you!

chilly geyser
#

😊

chilly geyser
#

You could also check if auto possess player is disabled

weary citrus
#

Ok a bit of a more advanced question now: As I understand it, when a level is loaded it also loads the default classes such as the Game State Class. I've been keeping and updating my player's score and lives in the Game State class. I thought I understood that this class would keep track of important variables across the lifespan of a game - but that doesn't seem to be the case.

When my player completes a level, I open a new level. And their Score and Lives are reset. Which I don't want. I want their Score and Lives to persist across levels. How would/should I do that?

#

I see a few hypothetical options, but I'm not sure which are possible:

A. Manage the player's lives and score in the Game State class and pass them from one instance of the class to another as a level is loaded.

B. Manage the player's lives and score in a separate class that somehow sits "over the top" of all levels in the game. (I'm not sure how I would do that)

C. ???

chilly geyser
#
Epic Developer Community Forums

Hi mrstarks510 I need to clarify a few things you said: I learned save my character stats to the player controller and not the player pawn as it will be destroyed during level transfer and the controller will likely stick around. But now I need to save those variables to game mode as the controller will not carry over because the contr...

weary citrus
#

Boom, three paragraphs in answers this question AND my next task which was saving data (score and high score) between plays. Thank you.

#

What was the search term you entered to get this result?

#

I feel like sometimes I'm using the wrong terminology.

chilly geyser
#

"save data that persists through levels unreal engine"

weary citrus
#

Thanks!

little orchid
weary citrus
#

Question about the GameInstance. When you create an empty game in Unreal Engine, it creates several objects including the GameInstance - which I know is pre-set in the Project Settings > Maps and Modes menu. Am I right that this object can't be accessed or edited in the Content Browser? I need to create my own, and set it in the Game Instance Class settings myself?

past hull
#

hey, I am kind of stuck here for my weapon bullet trace logic. What I want is, the more the player hold the left click on an automatic rifle, the more the bullets spreads. Actually I have this logic which spread the line trace to x y and z axis a little to have some randomness. But I would like to increase the range over time while left click is hold. So first bullet would go straight away, then range increase to 0.01 etc....
I really dont have any idea on how to approach this issue. Any Idea ?

weary citrus
#

So as the player holds down the left click, increment an "Accuracy" variable. Then use some math to set this variable as the degree of the tip of the cone.

#

You could also use the Clamp Angle function to ensure your accuracy is clamped between your minimum and maximum values.

past hull
weary citrus
#

You're welcome!

rigid summit
#

Hi, not sure if this should be in Animation or here, but I was wondering if I could change a socket rotation per animation montage? Right now, I'm using random sword animtions and they all working more or less fine. But I have one animation where the character slams down the sword, but the way the rotation is set up, the sword is being held rightside up. If I change the socket to fit this animation, everything else would be wrong. I see I can "Get socket transform/rotation" but there is no set for it?

weary citrus
#

So I do a loooooooot of casting to my SaveGame values for the score of the game. Something tells me this isn't ideal. Should I be setting a variable in this class to the Save Game Object I continually cast to?

fiery ridge
#

Do everything in one go

weary citrus
fiery ridge
#

You have score, lives, what else?

weary citrus
#

Is it "best practice" to create an object variable and cast to it on init?

weary citrus
fiery ridge
#

Ok so make a function and call that function instead

past hull
weary citrus
weary citrus
#

Is it: faster? better? Or does it have no effect other than the code being cleaner?

fiery ridge
#

Where are these nodes happening?

weary citrus
#

This is in my Game State class.

fiery ridge
#

And when do you call some of these events?

weary citrus
#

I call Update Score every time the ball hits a block. I call Update Lives every time the ball falls below the player's paddle.

fiery ridge
#

Ok let me think

#

So you need the score stored somewhere because you plan on using save system, correct?

weary citrus
#

I have that saved in a SaveObject that is instantiated during the GameInstance init (or loaded at the main menu), yes.

#

But really my question is less about the logic and more about the performance. When an object has an Object Reference Variable - and that Reference Variable calls a function - is that faster? Or the same as performing a "Get Object -> Cast to Object -> perform function"?

fiery ridge
#

For performance, you want to minimize the casting in this case and use it only once, like at the end of the level or when game over

weary citrus
#

Got it! Thanks!

#

I decided to do that because I figured it was faster but wasn't sure.

fiery ridge
#

The way you have set it up, is that it saves the score even if the player quits the game mid game

weary citrus
#

Yup!

#

That's what I want.

fiery ridge
#

I wouldn't do that but that's your choice/design

weary citrus
#

This is just the current iteration. I'm adding a "Do you want to save?" option, and a load system. This is mostly for self-learning. What would you change about that?

fiery ridge
#

For Breakout, I think autosave is ideal

#

Save score and levels unlocked

weary citrus
#

Ah, saving from the last level, rather than saving mid-game.

fiery ridge
#

But then again, the score depends on how you want to implement it. Do you want players to save the score for next session?

weary citrus
fiery ridge
#

Yes

#

I think I have a Breakout myself

weary citrus
#

And instead keeping "temporary" score and lives variables for that play session.

fiery ridge
weary citrus
#

Got it. That makes a lot of sense.

#

I'll refactor to that tomorrow. Thanks for the help!

fiery ridge
#

Np

warped lotus
#

aye I've been working on a game for a while, just had a shift in direction to roguelike and I'm having a bit of trouble with my stat system. Gonna try and keep this short:

  1. The individual stats are stored as arrays with 5 elements representing a formula
  2. The stats and formula function(s) along with anything else attached to this system is attached to a component.
  3. For the Modifiers(perks if you will) I created an array of structures that store which stat they should modify, the part of the equation to modify, and how much to modify it by.

My issue is how the Structures reference back to the Stats. I know I could like map them out to ints or something and compare or something gross but they're all treated the same so I was hoping it could be done generically. I can post screenshots or other info if needed.

Lookin for either a design pattern that might fit this or a simpler solution to tell the modifiers which array to mess with. Perfectly fine having to redo this from scratch, it's not hooked up to the rest of the game yet fortunately.

fiery ridge
#

Individual stats are stored in a struct?

warped lotus
#

Here's an example of one of the stats along with the calculator function that calculates the output.

#

Along with the formula so it makes sense:
(BASE * SCALE1 + BASEMODIFIER + FLATMODIFIER) * SCALE2 = STAT

#

And currently StatModifiers or "perks" are stored in an array that looks this. The "StatArray" portion is an enum because I was about to do a map before deciding to ask for help

indigo bough
#

Hey folks, this may well be a #geometry-tools question, but just wondering if anyone is away of a path to create new static mesh or skeletal mesh sockets in the construction script or at runtime?

Hoping to create a socket 'painter' tool which lets you click somewhere on a mesh, trace to it, and place a socket at that location to streamline some vehicle setup

warped lotus
indigo bough
# warped lotus Sockets can only be done in editor. What are you trying to do with vehicle setup...

We have a lot of sailing ships to assemble rigging (ropes/pulleys/etc.) for dynamically, and my hope was to make that process a little more streamlined in a custom editor tool rather than having to open/edit each of the meshes which might need to be attached to at a precise location and add (and manually name with a very specific naming convention) hundreds or even thousands of sockets on hundreds of meshes 😄

The idea was to instead have a tool which lets you load in the whole ship at once, and it would take you through a list of predetermined (specifically named) attachment points, and you could either click where it should be on the actor (thereby adding a socket to the clicked components mesh asset at the location, and mirroring it to the other side as well) or skipping that particular attachment point if it's not applicable to this ship, and so moving onto the next one in the list.

#

We can't do it in the DCC because of the workflow for the ships being quite awkward already and reimporting them would be quite a nightmare (tech debt, to be honest, but something I'd rather work around than fix due to the impact that would otherwise have on timelines)

#

And simply storing those locations into a vector array or as separate components isn't really good enough, because these meshes will translate at runtime based on all sorts of factors. I suppose we could use scene components and attach them to the mesh components with the correct relative offsets and not use sockets at all but that just feels really inefficient and would bloat the component count by thousands per ship.

chilly geyser
#

Looking for a solution to click on an object, have a character run to object (if not next to) then open a widget once the character is in range. I would also like the character to open the widget if he is already in range and then clicks the object. Does anyone have a loose good idea of how to accomplish this?

I've been trying to use a gate and event actor begin overlap, but I can't seem to find a way to be able to do it. Any logic suggestions?

warped lotus
raven vine
mossy hemlock
#

hey i got a question. I've been following a tutorial to learn more about ue5. and I've run in to a road block. I'm trying to make a animation for the character however it's not working i was wondering if someone could help me please.

covert delta
#

you should be piping Try Get Pawn Owner into the cast. Not a reference to Character itself.

mossy hemlock
#

wyhen i do that it give me the warning that it will always fail

warped lotus
#

That is the wrong cast node. ABP Hero Quin stands for Animation Blueprint, you may want to double check that node

inland walrus
#

even if I change the first value from 500 to 100, it will print the value 100 perfectly but it will not let clones be independent

tawdry walrus
mossy hemlock
#

i messed up and choise the wrong node. i fixed it but it dident change anything

#

suppose to just be bp

cerulean prism
#

Hi, I'm having trouble trying to handle the hit event of projectiles against enemies. both actors have a printString in OnComponentHit. but nothing happens after I see the bullets bounce of the enemies when I'm shooting at them. If my character touches an enemy, the enemy's hit printString does appear, but not with bullets

BulletActor 
 > SphereCollision (collision:BlockAll,physics:On,event:OnComponentHit) 
 >> SphereMesh (collision:NoColls,physics:Off)
 > ProjectileMovement
EnemyActor 
 > BoxCollision (collision:BlockAll,physics:On,event:OnComponentHit) 
 >> CustomMesh (collision:NoColls,physics:Off)
PlayerController 
 > OnInput: Spawn a BulletActor and adds velocity to its ProjectileMovement
tawdry walrus
mossy hemlock
#

yeah changing from ABP to BP fix a few thing so now it look like the tutorial only thing that i can see is different is from character to target to as BP Hero Quin

warped lotus
mossy hemlock
#

are you ok with that?

warped lotus
#

In about 20 minutes I can help

mossy hemlock
#

ok want to dm or just in a channle server?

warped lotus
#

Server channel is fine👍

mossy hemlock
#

ok just tell me when you arte ready

tawdry walrus
inland walrus
tawdry walrus
#

like when you create the widget try to update the ref actor

inland walrus
tawdry walrus
# inland walrus

the "Get actor of class" node it will get the first actor in the level

warped lotus
tawdry walrus
#

no, you need to set it from the actor

inland walrus
#

And remove it from the wbp?

tawdry walrus
inland walrus
tawdry walrus
#

like this

inland walrus
#

it now just prints 0's which I assume is the default value of the interg

tawdry walrus
#

no you need to get it from the create widget return value

inland walrus
tawdry walrus
# inland walrus

remove the "get actor of class" node and from the create widget return value drag and drop and set the ref actor and the value is self

tawdry walrus
warped lotus
inland walrus
tawdry walrus
#

the "get actor of class" node it will get you the first actor that placed in the level so you need to remove this node and in interact function in the actor you need to drag from the create widget return value and drop and search "Set name of the variable"

tawdry walrus
#

what the name of your actor ref in the widget

inland walrus
tawdry walrus
#

so type this name

inland walrus
tawdry walrus
#

now the value is self

inland walrus
#

plug it in before the viewport?

tawdry walrus
#

it doesn't matter I think

inland walrus
#

is this stuff still neccessary?

tawdry walrus
#

no remove it

inland walrus
#

Amazing, thank you

fair coyote
#

Watched a guide for a crouch bp thats smooth but when I uncrouch below an object my camera clips through any way to keep crouched if below something?

dull hare
covert delta
dull hare
chilly geyser
#

So I've got this loop to check if the character is close enough to "interact" with the actor. And everything works great if you simply click the actor.

The problem is, I don't know how to break the loop if the character clicks on the actor, then clicks somewhere else before the move to completes.

  • The break loop that's already in place works if the character stops moving, but will continue to the loop otherwise.

Anyone have any ideas?

warm oriole
#

Getting some weird results when trying to normalize a float between 0 - 1. It appears as though the number I'm getting is the original and it hasn't been normalized at all. This kind of makes sense when I look at the formula in C++ but I don't think I've had this problem before, any ideas?

gentle urchin
chilly geyser
#

Simple move to stopping line trace from working on static mesh, anyone have this issue before?

sonic basalt
#

Hey everyone, I am not sure if this is the right place to ask, but i have a question regarding the best use for actor components. I do plan on creating a 2D metroidvania/rpg with several mechanics. I created a movement and a camera component already but i am not sure about the other components (Inventory, Equipment, Skills/Attributes/Perks, Crafting, Dialogue, Quest and Combat). Is this a good seperation or should i merge or seperate it any further? Furthermore i am not sure if Quest should be in a component or rather a seperate system. Hope someone can help 🙂

dim halo
#

I am not really a pro or anything but id say that skills and equiment should likely be components. I am not quite sure what you mean by combat but if you mean a damage system id say that could be an interface. Assuming you are getting quests from a variety of characters I would likely use an interface, and a component to keep track of the quests the player has gotten. Hopefully this helps, sorry if it doesnt

#

Is there a way to rotate box overlap actors?

dire vine
#

hey guys ,
any idea where i can store my json file, to be in a build and i can read it at runtime

upper badger
#

Question: Is there a way to line trace multiple trace channels at the same time? For example, I want to have effect X when it hits trace channel A (like add an impulse to an object), but I want to have effect Y when the line trace hits a something with trace channel B (like adding a decal to a wall). I was thinking of having a line trace by channel for A + cast to object nodes and if it's invalid, I have another line trace by channel for B + cast to object B, but it's ugly af. In code, this would be a simple switch-case statement. Is there a way to do this without resorting to C++? Thanks.

trim matrix
faint pasture
verbal kayak
#

Anyone have A niagara effect inside their blueprint? Why my niagara resets when I move the BP?(Any niagara fx)

crude pike
verbal kayak
#

no cs whatsoever

crude pike
#

Ahhh I think remember that many particles even reset when they aren't in a Blueprint though so it might be related to that instead. I forgor how it's handled sadly. Maybe something to do with the particle asset itself and its lifetime/spawn modules.

verbal kayak
#

i tried all of them

#

weirdly, old cascade effects work

#

and all of them work if they just are normal particle/niagara systems and I move them around the level

#

hmm, ok its only on editor I guess.. weird.

dark drum
#

Does anyone know if it's possible to have an input variable for a function have a random default value? So that when ever a new node is created, it just sets the value to a random value?

#

So for example, the UID input, instead of being 'None' it just prepopulates it with a random value (which can then be changed if required).

lost sky
dark drum
lost sky
dark drum
lost sky
dark drum
#

I did think of this but then it would just get a new GUID each time the node is called.

dark drum
narrow sentinel
#

Someone able to help please, I'm getting stack overflow error but I can't seem to see where this is occuring to fix it, all I get on the crash report is UnkownFunction

lost sky
narrow sentinel
#

also a note I'm in the TSW public editor so I don't have access to the source to dig into stuff I've not made as a fyi 🙂

dark drum
#

In the above example, I manually copies different GUID's in but this isn't an optimal solution lol.

gentle urchin
#

This looks very sub optimal

#

what is a task object even?

#

out of curiousity

#

Also, would you naturally check a quest by its UID ? Why does it have an UID ?

#

I would think any quest identifier would suffice?

#

Unless you can have several of the same quest, but as different instances ?

#

I would think if you needed the UID, it would be created internally, and returned as some handle

dark drum
gentle urchin
#

not sure i've ever seen duplicate tasks , ever

#

that was double ever

dark drum
gentle urchin
#

If you want to get into DM i could share some of my Quest system internals

#

, if that could be of any use

patent mango
dark drum
gentle urchin
#

Seen a few using the Flow Graph plugin and go that route

lost sky
#

Guys why does this not generate 5 cities and stop afterwards?

gentle urchin
#

only first one succeed

#

whats the minimumdistance?

lost sky
#

ops... 😄

#

I had distance too high

#

but why did it make infinite of the same city?

gentle urchin
#

can't say,

#

i'd expect it to be an infinite loop but apparently that didnt work either

narrow sentinel
visual ember
#

need to break out of current one

lost sky
visual ember
lost sky
visual ember
#

or rather a proper design since this wasn't a correct one anyway

lost sky
#

It was the best to my knowledge 🥲

visual ember
#

good attempt. imagine what you'll be able to do in a year

lost sky
#

Can you suggest a proper design please?

visual ember
#

I can suggest that you get pen and paper and try to think it through first

dark drum
lost sky
dark drum
visual ember
lost sky
dark drum
gentle urchin
#
while Cities.Num() < TargetCities OR Attempts < MaxAttempts do
lost sky
lost sky
gentle urchin
#

Ensure there's an out to the while loop, especially if you're working on something thats likely to be hard by randomness alone

visual ember
#

by "never" I meant "don't". not that this should be avoided at all cost. just wanted to point out that almost always there's another solution

gentle urchin
#

How hard this is depends on the bounding box , number of citites and the minimumDistance

visual ember
dark drum
rugged wigeon
obsidian tartan
#

Help me understand how references variables work.

I created a class called "BP_Wand" ( derives from pawn class );

On this BP_Wand I have 4 variables (spellSlot_A, spellSlot_B, spellSlot_C, spellSlot_D) and each of them is Actor Class Reference ( that derives from Pawn class );

My question being:
If I have multiples BP_Wand pawns, and if on each of them the spellSlot_A var refers to the same Actor Class ( BPA_SpellProto) would I have data duplication on memory? Will I have four times loaded into the memory the same data?

[ PS: I come from a art background, not IT so yup... I really dont understand how somethings that are basic really work... ]

rugged wigeon
#

your question doesn't make a ton of sense. If you have references to 4 different instances of a class, then yes, there will be 4 instances of it in memory. That's not a problem.

chilly geyser
rugged wigeon
#

If you have 4 actors holding a reference to one instance, it'll only be defined in memory one time. Your actors will just be storing pointers that tell them where in memory the actor is define

dark drum
rugged wigeon
#

but its pretty unlikely you need to think too hard about this

gentle urchin
#

Its 4 references to that 1 memory location of the actual instance

rugged wigeon
#

also your spell slots almost certainly should not be pawns

dark drum
rugged wigeon
#

surely not the slots are controllable

obsidian tartan
#

so what i ment is... This memory size will exist 4 times?

gentle urchin
#

Wiggle the slot - wiggle the projectile!?

gentle urchin
#

This is the memory cost of loading this single bp , which loads all the rest of the crap (referenced assets etc)

dark drum
gentle urchin
#

But!

#

If the grid material wasnt even needed, but is somehow referenced through a reference you hold in your bp, it will be loaded, even if its not actively used in the scene

#

If you hard reference the last boss in your bp, the last boss will exist at all times your actor exist, even purely in memory, because you hard referenced it

#

Same goes for your skills

#

If you hard ref them, they will be loaded into memory, Even if they're not in the game

dark drum
#

Adding to what Squize said, this is why good hierarchy and using base classes for just logic can be very powerful. Base class wouldn't have heavy assets in them such as materials, sounds etc... so even if they aren't being used at that movement, it being loaded wouldn't normally be an issue.

gentle urchin
#

That includes their referenced assets, vfx, sfx etc etc

obsidian tartan
#

so if i have multiples "wands" with the same spell class variable, the spell memory size will be loaded only on time ( it self size) and the "wands" will use something that i think its called "pointers"?

#

or should I use a SoftClass Reference?

iron zealot
#

Hi, I have two functions where I do the same thing, but have two different results:

  1. For all actors in the set except us, destroy the entire attached actors hierarchy of the actor, then destroy the actor
  2. Except it did not worked, so I created a ToDelete array of actors, and instead of destroying the actors immediately, I add them to the list, then delete everything at the end. It worked and I don't understand the difference.

Here is the two blueprints. It looks the same for me, but the behaviors are clearly different, I don't understand this at all.

#

(It's reversed, the failure is at the bottom)

rugged wigeon
#

doesn't destroy actor just destroy all attached actors to begin with

iron zealot
#

I just tested and no, it does destroy every components but not actors

gentle urchin
#

What you can do is latch on to the 'owning' actors on destroyed

#

So when you attatch to another actor, you bind to its OnDestroyed event

iron zealot
#

Oh I think I found out: I think destroy actor removes it from the array. It's REALLY weird, I thought it would result in an invalid actor or something else, so the underlying iterator is messed up. For reversed also work but it's conceptually the same. The edge effect is strong with DestroyActor.

Is that right ?

narrow sentinel
#

does anyone know why a breakpoint won't fire ?

#

even when the function/event being ran is being fired ?

dark drum
dark drum
narrow sentinel
#

so i need to make sure this is not debugging any specific

iron zealot
dark drum
dark drum
narrow sentinel
#

well fire the breakpoint when the filter matches the one where the breakpoint is hit ?

dark drum
narrow sentinel
steel star
#

Q: Does material graph have a node for adding or multiplying more than just two inputs? Like .. just needs a "add pin" option but doesnt have it .. ?

narrow sentinel
#

ALso if I want to do something like this but it be between -1 to 1 would I normalse both vectors first befor passing into the dot or only normalise one of them ?

dark drum
narrow sentinel
#

so odd thing happened, I just got a crash with Audio Device being the reason for the crash

#

anyone ever heard of that before

jovial sinew
#

I'm sending an event dispatcher from a widget called BPW_Grid. In the event graph of BP_Grid, I'm trying to bind to the event (shown). Why can't I set the object type?
When I try to cast to the parent class "User Widget" instead, and use the object "BPW_Grid", the logic forces me to cast again to BPW_Grid (instead of just inheriting?). I'm trying to learn casting without making a hard reference in Variables - does the User Widget have a different inheritance structure/protection?

narrow sentinel
#

can anyone help please with what could cause a stack overflow cause I'm getting it again for as far as i can see unkown reason

#

the crash log and generic log doesn't tell me anything specific that it's anything i've added

jovial sinew
#

Let me rephrase my question above: If I'm sending an event dispatch, why do I need a reference on the recieving end? I should just be listening for a call right, so why do I need to get an instance of the widget - what am I not understanding?

gentle urchin
#

Sender doesnt care about recievers

#

Reciever must care about sender

#

Its a one way decoupler

#

So you need a reference to the instance you wanna listen to

#

In most cases

#

You want the ui to know about your objects and instances

#

Not the other way around

jovial sinew
#

In this case I want it reverse since I'm controlling grid size based on a value change. But I think I get what you're saying about de-coupling in one direction.

gentle urchin
#

I doubt you want it opposit either way tbh.

#

Even with your grid

jovial sinew
#

Shouldn't the logic of what the grid is be on the grid object itself and only listen if the UI changes it?

gentle urchin
#

Yes

#

But ui can directly reference grid

#

And update it with public methods

jovial sinew
#

Oh, I see - I think I was using this as a case to test event dispatch where it sounds like it doesn't need to be (as it's pretty one to one on what controls the grid size so it might as well be direct). Thanks, I'll look into it more and just add the reference for now

gentle urchin
#

Dispatchers are great if you want others to latch on to an event where you dont care who listens

#

MatchStart could be one

#

GamePause

#

TimedEvents..

#

Inventory updates

#

Now inventory can notify ui that it updated without knowing anything about its existence

zinc flicker
#

I have a question about performance.

I got here 2 templates both are different.

One template had Master Blueprints for weapons so the code was mostly in the weapons themself.

Another blueprint did create everything in the Character it self, all the weapons are listed but hidden and unhidden depends on the call. All logic for each weapon is in the character.

The file lags slightly when opening it but i am curious how bad is the performance if you put all code for all weapons in the Main Character, compare to separate Weapon Blueprints?

rugged wigeon
#

doesn't really matter from a performance perspective. What matters is whether it makes sense from a code organization perspective.

#

if your characters are picking up and dropping a bunch of different weapons, you probably want well organized weapon classes

#

if they're only ever holding one character specific weapon then it probably doesn't make sense

gentle urchin
#

Not worth the overhead/boilerplate

#

Generally i lean towards the masterclass tho

#

Its just cleaner.

zinc flicker
#

Its a single player game where you pickup weapons on the way then you own it for the rest of the game.

So they never really will go away after picked up you can just scroll through them.

#

I have currently one code that allways destroys the weapon BP when switching and spawns a new weapon BP.

So i was just wondering since you own all weapons in the end if its mattering that much.

But thanks =)

haughty jolt
#

hey i have a render target with a scene catprue 2d

#

wanna only show a splinemesh

#

where can i make render custom depth

#

or stencil

#

to only show 1 mesh on render target

slender mural
#

How can I dubug/track memory used by blueprint objects?

gentle urchin
zinc flicker
# gentle urchin If its like half-life with 5 weapons, then nah

I see thanks was just not sure if i should go the simple way or do it properly with different blueprints.

Mostly i was scared of the performance hit, the Marketplace asset i check and played around worked well with everything stuffed in one BP but... i wasn't sure if i oversee something that i don't know of.

chrome dust
#

Hey here's a weird one for y'all. I've had this issue on and off for over a year that sometimes the attach track in sequencer would just mysteriously 'not work', maintaining the parent and child relationship outside of the duration of the track, and I figured out this morning that it consistently happens when 'run construction script in sequencer' is enabled on the child actor. Even if there's nothing in the construction script at all.

Any thoughts?

gentle urchin
#

Child actor component, say you?

ionic quiver
#

Is it possible to get overlapping actors of a box collision when it starts overlapping? For some reason I can't get the bounding box to sample the static mesh green floor in this scenario. I tried setting that box to overlap everything in the custom collision, so I'm not sure why it's not detecting more than 0 ever.

gentle urchin
#

OnOverlap? What

#

Theres delegates for when it begins and when it ends overlapping

chrome dust
# gentle urchin Child actor component, say you?

No. I have two different actor blueprints. For sake of example, we'll say Cube-BP and Sphere-BP. Both are in sequencer as spawnable objects. If I use an attach track on Sphere-BP targetting Cube-BP in the sequencer, it will work as expected, unless Sphere-BP has 'Run construction script in sequencer' enabled in it's class settings. If it does, Sphere will remain a child of Cube in the outliner, regardless of whether the playhead is over the attach track or not

ionic quiver
gentle urchin
#

Usually id do

MyEvent()
{
 CollisionComponent->GetOverlappingActors()
CollisionComponent->BindOnBeginOverlap()
CollisionComponent->BindOnEndOverlap
 
}
#

MyEvent 90% of the time being beginplay

iron zealot
#

In macros, is there a way to duplicate inputs to avoid links everywhere ?

ionic quiver
#

The really odd thing is it detects when the character is in, but not static mesh. Oh well, I'll fiddle with settings.

gentle urchin
#

Keep in mind collision/overlap is a two way street

ionic quiver
#

Damn it, that was it. I forgot to give the floor the collision check for overlap.

#

Always something small and stupid.

#

Thanks for that!

gentle urchin
#

Yepp😅

crude pike
# haughty jolt to only show 1 mesh on render target

IIRC the SceneCaptureComponent has arrays in the details panel (if it's an actor) or BP nodes if it's in a BP, to "Hide Actors" or "Show Only Actors".

I've been using it for creating a holographic projection volume, where I can choose which actors I want to render to the projection and which actors to hide.

#

When I get home I'll open UE and double-check my BP node setup for adding actors / the details panel. But it's luckily pretty straightforward.

merry ocean
#

Hello, I am very new to unreal engine 5 (started last week). i am working on a small game whereby the player can interact with a PC. The PC screen is basically a widget which the player can interact with. inside the widget there is a bunch of text and a couple buttons. when the player presses on of these buttons with the enter key it will change to a different screen. there is no mouse interaction. I am struggling to figure out how to use the arrows keys to select one of these buttons and how to make the screen change when pressing the enter key. Can anybody direct me in the right direction?

merry ocean
#

is that in the store?

tawdry walrus
#

no, try to search in plugins window common ui

merry ocean
#

where can i find this window?

tawdry walrus
#

in the unreal engine editor

#

Settings and plugins

#

or plugin

merry ocean
#

ah found it

#

so what does this plugin do 😂

tawdry walrus
#

it's like a layer widget with complex navigation such as menus with layers submenus or popups

#

Welcome to our UE5 Common UI crash course! If you're diving into game development or just curious about creating cool interfaces in Unreal Engine 5, you're in the right place.

Buy Me a Coffee: https://buymeacoffee.com/mrbutier
Join my Discord: https://discord.gg/xdvsmCPbf7
Xelu's FREE Controller Prompts: https://thoseawesomeguys.com/prom...

▶ Play video
merry ocean
#

ah thanks

#

i have been bashing my head in over this the last week. so lets hope this works for me xD

nova imp
#

Hi I have a bit of weird question. At least internet can't seem to understand me.
If I create an actor component to act as a parent class.
How can I turn a child of that class into a Scene component (in Blueprints) or is it not possible. Or do I have to make the parent a scene component and just work with that (Not to big of an issue just curious)

thin panther
#

The parent has to be a scene component

#

You can't link up like that. You've branched off from an actor component. You can't join back in down the line with your changes as well

nova imp
#

oh true I completly forgot how parenting works xD mb indeed a stupid question

ripe cypress
#

I have successfully setup a camera on a spline for a side scroll. Is there a way to get camera bounds in World Coords. I want to setup something similar to MK camera system were it meets between 2 players and when they are at the edge of the camera view it doesnt allow them to move back any further (For Reference).

mild ibex
#

quick performance question, would an interface returning a variable be better than get actor of class ?

gentle urchin
#

why wouldnt you just communicate directly

#

getActor is also unreliable if you got several instances of that class out there

#

neither have any noteworthy impact on performance

dry lynx
#

hello, does anyone know how to make a scaling mesh in real time generate overlap events? Scaling, not moving.

#

The goal is to make a growing torus apply damage to a character, like a shock wave

chilly geyser
#

Anyone Good with Vectors and/or line tracing? I'm trying to have a start vector at (0,0,-100k) and a midpoint of (mouse world location). Essentially making the line trace go though whatever object I point at. How do I get the trace to extend beyond what im pointing at?

versed sun
dry lynx
supple dome
#

sounds like a basic ray from camera + camera.forward * distance

#

(0,0,-100k)
Z is up, not sure if thats what u want @chilly geyser

versed sun
supple dome
chilly geyser
supple dome
#

if you want to extend up, just add a vector to the mouse cursor location

dry lynx
# versed sun

that doesn't work 😦 I will try another approach, like creating 2 capsules inner and outer ring

#

but I dont get why scaling doesn't generate overlapping events

versed sun
#

but moving it does ?

#

try moving it to where it already is , and see if that triggers

chilly geyser
chilly geyser
versed sun
#

forgot a bit

chilly geyser
versed sun
#

yah , I wish I took all the better math classes

chilly geyser
versed sun
versed sun
chilly geyser
dry lynx
dry lynx
chilly geyser
versed sun
#

seem like there has to be a better way...

dry lynx
versed sun
#

just to toggle the Is A

#

quick and dirty

dry lynx
#

too much time spend on this issue😵‍💫

wise ravine
#

Hey, how would I go about controlling events in a level? Toggling lights, doors opening/closing... What is the best way to go about that?

#

These events would be triggered but not controlled by the player

hushed fox
wise ravine
hushed fox
#

since the actor would always be loaded once in the level you can cast to it

hushed fox
wise ravine
#

Oh those

#

I see

hushed fox
#

just cast to the single delegate holder actor from the lights or whatever needs triggering and bind their event on begin play

wise ravine
#

So once central actor that triggers events all around the level? Is that right?

desert juniper
wise ravine
#

Right, so what sends out the 'signal'?

desert juniper
#

the light switch actor

wise ravine
#

the same actor?

desert juniper
#

uh. light switch actor sends signal
light actors listen to signal

wise ravine
#

oh I see

#

What if I need a program that controls the light actors seperate of the light switches

#

like a level blueprint

desert juniper
#

there's not a single answer to everything though. i wouldn't use the same setup on doors unless i had a compeling reason to.

wise ravine
#

inside of the same actor when the player overlaps

desert juniper
#

the light switch would just be one way to toggle them

wise ravine
desert juniper
#

in whatever other actor you want

wise ravine
#

Ahh, great. Thank you very much

desert juniper
#

Seems like a better use case for a component, or a interface

wise ravine
#

Why does it seem like a better option?

desert juniper
#

interface would be prefered by most

wise ravine
#

I forget my blueprint communication info

desert juniper
wise ravine
#

I would have to look back

#

Why interface over delegates or event dispatchers? Sender and Receiver wise?

desert juniper
#

because the light actors would specifically have to register to the light switch. but I'd personally rather have the light switch register the bulbs

It's basically "Should the light bulbs be responsible for all the objects that control it? or should the objects that are controlling be responsible?"

wise ravine
#

right

#

So not only in my light switch actor, but also In my other actor that controls bulbs + doors + etc... I would also have to register everything that it controls? Is that right?

desert juniper
#

again, no one size fits all solution, but for your use case I'd make a interface
IControllable
and define a function "Toggle"

now the light bulb actor implements the interface and would implement the function and define the logic
When toggle is called, toggle the light brightness / visibility

for the door I'd make it implement the same interface, and implement the same function
but the logic here is
When Toggle is called, open / close the door

#

of course you could also define functions to set on and off specifically

desert juniper
wise ravine
#

Thanks tho this is a huge help

wise ravine
wise ravine
#

And then another actor to actually trigger the interface function

desert juniper
#

apologies fixed wording to make it say implement instead

desert juniper
#

the controlling object doesn't have to care about what the object is, or how it behaves. it just has to know that it does have this interface

#

on the lightbulb actor, implement the Toggle method, and then toggle it's light intensity, or visibility when the method is called.

wise ravine
#

But then wouldn't the interface toggle all actors that I implement it in when I trigger the toggle function?

#

Or am I not understanding that right?

desert juniper
desert juniper
#

on the light switch create a variable of type BPI_Controllable

#

then when it's interacted, iterate through the array, and call the toggle method of the interface

#

you can do the same thing for like a control panel controlling those same lights

wise ravine
#

when what is interacted?

desert juniper
#

when the light switch is interacted with

wise ravine
#

oh I see

#

Ohh I see

#

I still have to make that actor

wise ravine
desert juniper
wise ravine
#

And why do I need an array for this ?

desert juniper
#

to reference the objects you want this to control

wise ravine
#

ahh

desert juniper
#

and just like that I'm all done with the 9-5. (time to drive home) gl
here's a good resource to getting your programming up to speed
http://rbwhitaker.wikidot.com/c-sharp-tutorials

it's c# but everything up to chapter 27 will be directly applicable in C++ or unreal blueprints

wise ravine
#

there is the light switch

wise ravine
#

and the resource

#

When you get the chance, what are your thoughts on the learncpp.com site opposed to the one you just sent?

frosty heron
#

C# if you are going to use unity, learncpp.com if you are going to use unreal

#

Or both eventually, c# used by 60% of dev in the world

thin panther
#

Directly applicable is a bit misleading because the languages have distinct differences. And not everything is directly applicable either, even conceptually.

#

Learning C# can be great if you don't think you're ready for CPP but want some programming essentials, but don't say it's directly applicable

nocturne fossil
#

whats the inverse of this> ==? how do i resume it?

thin panther
#

Set Movement Mode

nocturne fossil
#

restart movement worked

weary nimbus
#

Trying to make a line trace to the ground, what would the ObjectType be for the landscape?

#

Nevermind, I figured it out

frosty heron
#

Thanks for sharing

weary nimbus
#

You're welcome

high iris
#

I have an ability that's supposed to slow down the character's falling speed dramatically, but I don't want to activate it instantly by hard setting the velocity to a particular value.

My impression is that I have to on tick (or on timer) manually change the velocity over a desired period of time until it reaches a certain point, likely using a curve of some sorts.

Is there anything in blueprint that can help me perform this sort of operation across multiple frames or iterations, or is this something you just end up having to DIY?

warped juniper
#

Is there any way to use Editor Ticks within Animation Montages?

maiden wadi
high iris
#

My naive implementation here would be some kind of on tick process that checks how long it's got left to process the slow-down and how fast the player is going, and slow them down by the right amount until the time runs out. Or I could actually just look at a curve and apply that value to the player's velocity.

nocturne fossil
#

i want the platforms to keep moving from the position they were immediately stopped and not the beggining, is there any way to do this?

faint creek
#

Hello guys I have a big problem, I don'r understand why the only E key stop to work. But with the other keys it works.
Somebody could help me please to solve thi problem please?