#blueprint

1 messages Β· Page 217 of 1

spare hamlet
#

But before I get started on it, I thought I would first get the core of the game implemented and that is the landscape information and the mushroom spawner. ^^

maiden wadi
#

You should. πŸ˜„ We're using it in our latest project. It is amazing.

gentle urchin
#

Just heavy time constraints πŸ˜›

#

imagine one would like to take ones time once diving into that

maiden wadi
#

We have like little region areas and each region has it's own biome sort of thing, but the regions aren't exactly grids, they can be complex concave shapes. So it's hard to decorate with the right trees and such easily, but I wrapped the region in a simple cube volume and used it's edges to generate a closed spline around it. Then our environment artist uses a PCG graph to design the area, so that it works regardless of the shape. Can't say much more than that for another week though. πŸ˜„

gentle urchin
#

Yeah I've seen them work with closed splines for areas, and it looks really versatile

#

I assumme they're mostly used on larger things tho, not so much on something like a single fence, right ?

#

altho i'd think they'd equally handy there

spare hamlet
#

Ah okay, yea its very effective.

The First iteration of grids forced an Unreal Crash... xD I wish they had an protection for Infinited Loops. x D

spark steppe
#

they do!?

#

at least for BP infinite loops

maiden wadi
spare hamlet
#

oh, i thought an Infinite Loop forced the Crash like in Unity. ^^
Mhmh

static sequoia
#

That wasnt working how I intended but you gave me an idea. I set that "StartBugTimer" at begin play like you said but I made it so that the function "SpawnBug" that ran from the set timer by function name have the "StartBugTimer" event at the end so that everytime a bug is spawned it will set the new loop time for the next spawn. Your method was adding the time alive to the Looping time. Which you didnt have all the info so its more my fault

#

It works good now though

gentle urchin
#

Glad you figured it out !

gentle urchin
#

might not be applicable to your project ofcourse

#

just curious if there's a treshold before one starts with the PCG

maiden wadi
#

We are using it for visual stuff mostly. Trees, rocks, etc. Stuff that doesn't directly affect gameplay. Though there are a few gameplay affecting things in there like volumes spawned along certain things for the nav area modifiers. Gameplay critical stuff though we keep as basic actors spawned from gameplay code.

In a sense I would probably say something like... If you have a survival builder? I would make the gameplay code spawn housing parts. But PCG could handle spawning certain meshes or particles in places depending on the biome to make the housing feel more alive. Such as wind blowing snow or sand off of a roof, without actually hard coding that particle to the roof piece, because maybe someone made their roof out of floor pieces, or some other weird building piece.

PCG is usually very "On top" of gameplay stuff for our usage. There to add extra pizzazz.

cerulean cape
#

Hi everyone, it can be simple to solve, but how can I adjust the tangent programmatically to adjust such edge cases?
the end of the spline supposed to curve upwards but the tangent (I think?) is causing it to curve downwards instead?
Anyone? Thanks

proper flower
#

suggestion blueprint on a 3d rotational spaceship movement?

#

I'm having problems in understanding how to merge all the axis in local space and use different keyboard input for different axis

#

like roll, pitch and yaw

atomic pelican
#

Hey Guys,

I am thinking about creating a OTP Screen
Does anyone know a better way to do it.

At First I was thinking, adding a png and a text box as a overlay - that will give a perspective on entering the OTP, But this method is not immersive.

Secondly, I thought to make a array of Editable Text Box (Custom Widget) make a array, and switch the select to next text box if an number is inputted (Event on Text Changed).
but we can't directly change the selection via blueprint form One Editable Text Box to other?

vocal mirage
proper flower
#

i use 6 linear key movement and 6 angular movement for my spaceship

#

QE TG 13 are angular movement

#

for pitch yaw and roll

#

but i stumble across a problem in merging different inputs together, didn't work

#

or in other cases work strange

#

this is my setup actually

#

but whatever key I'm pressing, it rolls in one way only

#

not pitch or yaw

#

surely some logic incomprehension on my part

#

but just need the way to understand it, not a simple solution, wanna learn

#

cannot find a relevant answer online

#

and every flight tutorial are the same online

vocal mirage
#

Try clamping the value coming out of the multiply node, then adding it to the original world rotation

#

I think what's happening is you're clamping the actual rotation instead of the input, so when you hit a certain angle, it just locks

proper flower
#

but this does not solve the main logic

#

that other axis doesn't work

#

and the only axis that works, works only in one direction, not clockwise

#

surely need to rework the input for force

#

I notice a big error in my configuration

#

but my main question is only relevant to the joint axis in a rotator

#

how to create a matrix that works in local rotation for mesh?

#

i need some sort of mathematical matrix to mix together and get local variance when inputting on an axis

vocal mirage
#

This is the way I'm doing it - the rotator at the start just comes from my inputs, and is measured in degrees/second^2

#

So it's the target angular acceleration - i.e. the desired acceleration to produce from the ship's thrusters

proper flower
#

and where are the inputs in this?

vocal mirage
#

Hold on I'll get them, it's a kind of long chain to get there

proper flower
#

how do you choose to rotate on a local Z axis with a button?

#

and then, the editor calculate the world rotation if local is different

lost wolf
proper flower
#

? every axis on its own works good

#

my question is about a mathematical merging process

#

that blends on world position from local

vocal mirage
#

1 - the inputs happen on the player pawn, and they update the seat the player is in - as if manipulating a flight stick

#

2 - the ship the seat is in gets the inputs

#

3 - the ship uses them to add the forces

proper flower
#

okay so you recall other axis of that variable before assigning to it

#

in this case you will stacks the current manipulation on axis, without screwing the others

#

I think I got it

#

will try firstly to fix my input signal, then to use this method in order to have an outputted variable clean

#

will be back

#

thanks for the advice

vocal mirage
#

I just wanna add that you don't have to do all the casting if your ship is your pawn, it's just that in my case I have a ship with separate seats inside that can be occupied by a player

proper flower
#

sure

spark field
#

within my blueprint i have this sphere but i cant find when trying to generate force

#

something iam missing

bold phoenix
#

Hi everyone, I have a question on plugins. Let's say I'm trying to build a system for my game to select the desired actor. The system is intended to be seperate from the project, more like plug and play, this way it will be easier to update and I'm making sure not too have too many hard references. If I want to pass a variable to the Player Controller or the player pawn, what would be the best way to do this ? I could use an interface but it wouldn't be a separate system anymore as I would have to add an event to the core blueprints ( player controller, pawn... ) and if I have multiple systems intended to select an object, then I would need to create multiple interfaces. The other way around, if I put the interface inside the core element, then it won't be plug and play anymore as I won't be able to call the interface inside the plugin blueprints... How to work around that ?

spark field
#

how do i attach a sphere from my scene to the blueprint

atomic pelican
gentle urchin
#

Cant you set focus?

#

6 editable boxes -> auto focuses next one on input

#

Generally i never ever modify otp in the middle, it just wipes it if its wrong and we go again

#

That might just be me tho

glad silo
#

Hi guys, I'm new to UE5. I'm trying to implement a wall run and wall jump mechanic during the wall run, but I'm stuck on the jump part. I've tried different approaches, but every time I've had problems getting the character to jump away from all angles of the wall. Sometimes, instead of being launched away, the character gets pushed toward the wall.
this is the wall jump blueprint part

maiden wadi
maiden wadi
bold phoenix
proper flower
#

@vocal mirage didn't work for me

#

i copied and created the flow without calls since it's on one blueprint

#

double checked everything

#

my spaceship doesn't turn

#

print says 0 0 0

#

I'm wondering if there's some settings that can alter

woeful yoke
#

Is there a way to show a directional hint to the player?

visual ember
woeful yoke
#

I am very sorry, yeah that was too brief

#

I want to make a hint when player reaches near object, I can make the hint with collision sphere, but how do I create an arrow to show the player the direction of the objective?

visual ember
#

You can get object's position on screen

#

So that you can have the indicator purely in UI

#

Then it's a matter of drawing a line or sth

narrow sentinel
#

anyone able to help me with how I can find whats causing my Video mem to be over ?

#

I get little burst where it complains about it but I've already lower all my textures down in the scene

woeful yoke
#

I see, I am very new to BP. May i know what keyword should I search for to get a tutorial or some resource on how to get object's position on screen?

visual ember
woeful yoke
#

haha , no actually it hadn't occurred to me that getting the object position would help me here! Yeah guess I will do that

#

Thanks for the help πŸ˜„

visual ember
#

No problem. Ping me if you get stuck

woeful yoke
#

Yeah, I have a lot to learn about BP πŸ˜„

#

that is great! I will surely seek help here when I'm stuck. It's just a matter of when lol

dull hare
#

Does anyone know a good tutorial for advanced doors? I tried using this implementation "https://www.undeaddev.com/advanced-dd-doors-and-drawers" but it feels extremally outdated, and I think there is a better solution somewhere that requires less or none "Cast to" for example using Blueprint Interfaces

dry sleet
#

Are you worried about this cast?

#

Casting to a StaticMeshComponent is not a problem under any circumstances.

#

The only circumstance under which casting to a StaticMeshComponent would be an issue is if you're planning to make a game without a single mesh and don't want to incur that linker load.

#

Otherwise you can assume that the concept of a static mesh will already be present in Unreal Engine.

#

Casting, with regards to performance, is free.

#

Alright, it does one additional cast to the PC which is a bit redundant.

dull hare
#

ok, thanks for info, for now I was trying to reduce all cast to, because I heard that using many of them may kill performance

dry sleet
#

No, it is a beginner's misconception.

#

Casting is free, but it incurs linker load.

#

Which means that whatever you are casting to will require loading when that Blueprint is loaded.

#

If you're not careful with them it will cause dependencies which causes your size map to bloat.

#

If you're casting to a data only class, or something that is already guaranteed to be loaded (such as StaticMeshComponent), it is no problem at all.

crude pike
#

this might not be the best place to ask but it's sort of relevant to the topic I guess.

Can Animation Blueprints implement BP Interfaces? Or can they only use casting?

dry sleet
#

Casting is a part of programming, Interfaces are not a substitute for casting.

#

(in relation to the previous :)

dry sleet
dull hare
#

Alright, then I'm going back to project

dry sleet
#

Just checked, looks like ABP:s can implement interfaces just fine.

crude pike
#

ahhh sweet πŸ™‚ I'll look into setting it up then

#

I've recently started using AnimBPs as a hacky way of setting up "EditorTick" but right now I've just been casting directly to the BPs I want to tick, and handling some of the logic inside the AnimBP. Would be nice to just have a single, very simple AnimBP that ticks in the editor and then uses an Interface to make sure any BP that implements it will also tick in editor.

#

(fwiw it's for pre-rendered cine work not intended for a game, which is why I always try to avoid using BeginPlay/EventTick code and instead try to get it running in-editor as much as I can)

haughty snow
#

is there some trick im missing to adding children to horiztonal boxes at runtime? I'm trying to add a # of children depending on a length of an array, but it's only ever adding 1? or it keeps overwriting the first child somehow?

#

oh i see you have to add the 'create widget' to the loop, you cant make a reference to it at start and then populate that a bunch of times

#

ok interesting now this loop is adding 5 boxes despite the last index only being 2?

maiden wadi
#

I'm semi curious, what are you trying to make?

eager thicket
#

is there any issue with using this? (the context is a main menu). My worry is the "get player controller" may not always work for whatever reason

haughty snow
#

its a menu where you are selecting from a list of roles and when you select a role, you see the available advisors you can hire for that role, so i want to populate the advisors in the horizontal box when you select it

eager thicket
#

i've been relying on "get player controller 0" for most of my code

maiden wadi
#

Should use GetOwningPlayer instead.

haughty snow
#

when I have it print out the horizontal box children count, it shows this

#

so its doing it correctly, then running through it again?

eager thicket
#

no worries if not

maiden wadi
#

GetOwningPlayer instead of GetPlayerController.

haughty snow
#

oh

#

wait im dumb

#

got it

empty marten
#

Get Player Pawn
Get Player Controller
Get Player Character
They are common reference nodes designed to reference the player in some way. They're accessible in near enough all BP.

haughty snow
#

always make sure you continue your execution from here folks not during the loop

maiden wadi
visual ember
haughty snow
haughty snow
#

we did it

#

ty for being there during my difficult time

empty marten
haughty snow
gentle urchin
#

Select the node

grizzled roost
#

I hope this isn't a weird question, but is there any way to load or save SaveGames into another location other than the default location in the AppData folder?
Through blueprints of course.

gentle urchin
#

Dont think you can easily

#

So depends on how much you want it I guess

empty marten
gentle urchin
#

They each have their own

#

I mean

grizzled roost
gentle urchin
#

Its one datatable for each client

#

And all clients have all the necesaary meshes

#

Referenced by said datatable

#

No

#

Server has its set

#

Singular set

#

From the servers point of view they all reference the same asset

#

My mistake then

#

I would assume so

#

Anything else would be annoying, to say the least

#

Test it

#

Profile it

empty marten
gentle urchin
#

Throw more money at it

empty marten
#

This is a big might but you might be able to change the file locations by using the UE plugin blueprint file utilities but you'd have to see what nodes it gives you access to.

gentle urchin
#

Personally i wouldnt bother

#

Theres free plugins that write files to anywhere

empty marten
#

UE plugin for Blueprint File Utilities is free and comes disabled with the engine, You just need to enable it in plugins

gentle urchin
#

If you really want to. You can serialize manually (surely a bp plugin does this too)

empty marten
#

You could use this

grizzled roost
empty marten
#

Yeah

#

This is the plugin

#

And as I said, its free.

grizzled roost
empty marten
grizzled roost
empty marten
#

Why not make it so you reference that folder all the time when checking / save / load game files rather than checking / save / load in one folder than moving them.

grizzled roost
empty marten
#

Fair

empty marten
grizzled roost
grizzled roost
empty marten
#

Sorry I haven't seen all your messages. What are you trying to do?

lunar sleet
#

You should prly be using DAs

empty marten
lunar sleet
#

Data Assets

#

With softrefs

#

The docs are decent on them should give them a read

#

Idk that you need to soft ref a DA

#

Long as the second DA soft refs the actual class

dreamy sail
#

I'm trying to figure out why aren't my players at different PlayerStart(s). I have 2 of them in the level, and both players are spawning in the same one. I the screenshot is from the player controller BP

uneven charm
#

Hello everyone, I'm in need of a solution to a problem. I'm making a game where characters walk around a nav mesh and the player builds around them and detects if the path is blocked, if it is a spine is created with arrows showing the path traveled, however, I can't figure out how to identify which specific blueprint actor placed by the player caused the character to become blocked. Any suggestions?

lofty rapids
#

i would just use last index

#

but there is a reason your using 2 ?

empty marten
#

If playerstart has tag a, player a starts here.
If playerstart has tag b, player b starts here.

dreamy sail
#

thea actor has tag ?

#

I mean, what's the logic if I take this approach? I'm not that good at UE

empty marten
#

Component has tag

gentle urchin
#

You should use soft referencws for all assets in the DT

#

And only load what you use

#

Memory viewer includes all hard references to assets, as they must be loaded along with the class that references them ( this includes and is part of the cast conundrum)

#

Smart memory management is key

#

Which also.means smart asset management

#

Where it.makes sense you can hard ref them in a DA that you only soft ref to. Then when you need to load it, it includes all its internal assets

dreamy elm
#

How do i get rendering bounds of a skeletal mesh?

#

In-game taking into account the rotation

dusky maple
#

Hey everyone, I hopefully quick question. Why is it that I can pass a reference to an actor to an actor component, from the actor component create a widget making sure to pass a reference to the actor component to the newly created widget. But then when trying to reference the actor component from the widget i keep getting "Accessed None Trying to read property AC Volume". Any help would be greatly appreciated and thanks in advance!

gentle urchin
#

Order of operations

#

Add print strings that tells you what fires when, and it'll hopefully show you

#

Also, you can prob just do getOwner for the actual actor?

empty marten
uneven hedge
maiden wadi
#

Just to explicitly confirm this. No. Your other classes have a linker(pointer) to that table. There is only ever one single table in memory and multiple things have pointers to it's location in memory.

maiden wadi
#

No?

#

If the Sizemap says a character has 2gb linked to it. Then that 2gb needs loaded before that character class can be.

#

But if you have 2 character classes that all reference the same 2gb of content, you don't need to load 4gb. You load 2gb and both can load.

patent mango
#

i am facing lots of load errors on loading a level being imported from otherr project
CreateExport: Failed to load Outer for resource 'AssetImportData': CommonGenericInputActionDataTable /Game/ProMainMenuV3_Blue/Blueprints/CommonUI/DT_PMM_InputAction.DT_PMM_InputAction
lots like this

dusky maple
uneven hedge
quartz quest
#

Is there a standard way of getting the angle of the ground with respect to player direction and location?

uneven hedge
# maiden wadi How were they created?

Since im not sure what "they" is specifically referring to:
The 2 actors that have SceneCaptureComponent2D are in the level at all times, so they arent "spawned".
They each have their own render targets,
The materials are just texture (RT) to output, with domain as UI and alpha as one minus.
They are capturing a childactor that is a pawn.

covert swan
quartz quest
covert swan
quartz quest
chrome crag
#

trying to package a project... I get this error... I have IOS unchecked in supported builds.. just trying to do a windows build:

LogClass: Warning: In asset 'None', there is an enum property of type 'EIOSVersion' with an invalid value of 'IOS_12'

LogObj: Error: LoadConfig (/Script/IOSRuntimeSettings.Default__IOSRuntimeSettings): import failed for MinimumiOSVersion in: IOS_12

eager thicket
#

When making a main menu, do you have a bunch of different widget BP's working together or just a single one responsible for everything?

#

I can either keep everything on a single BP or seperate them and construct each section seperately (options, player select, etc)

empty marten
gentle urchin
#

You cant trust one beginplay to execute before another

#

So the bind might come to late

#

And if it suddenly works, it's just a lucky hit, unless you made your logic more explicit

quartz quest
#

Can you get race conditions in blueprints?

dire frost
#

well you can in the animation blueprint. but idk about regular bps. ig you can if you use async physics tick event?

finite hearth
#

Is it bad practice to cast to an actor component's owner, if I know for a fact the owner will always be a given class? I figure the owner would already be loaded to memory for the actor component to exist, but maybe I am wrong there?

If it's not bad practice, would I cast once on begin play and store that as a ref, or should I cast each time I need to access the owner's data?

I am familiar with interfaces and how to use them, I'm just wondering if it matters in this situation from an optimization point of view.

dire frost
gentle urchin
gray ingot
#

Hi, idk really what channel it is suitable the most, but i have a problem with "Capsule Component", i am working on q/e system and i need to expand Capsule Components radius, but if i do it near the wall, my capsule expends, but does not push player out of the wall, it pushes after any movement related button is pressed, how can i fix it?

eager thicket
#

like the options menu is a child class of the main menu bp

eager thicket
#

ah ok

empty marten
#

You can then drag the widget into the main widget and it does what you tell it to

eager thicket
#

hmmm. so like do the smaller widgets become one with the main widget or something?

#

or is it like you need to cast to the smaller widgets

#

sry for the stupid questions i'd check now but im away from my main computer

mild ice
# gray ingot Hi, idk really what channel it is suitable the most, but i have a problem with "...

idk for sure without knowing every event that affects control rotation but some ideas:

  1. Reverse is actually triggering an update and not play or vice versa
  2. you may be missing a setting in the capsule collision/physics preventing an update outside of input. Some older engine versions don't have the streamlined collision / physics settings. Could try manually calling it as part of your Update
  3. Depending on how play and reverse are configured, you may be getting only the final Set Capsule Radius
  4. I think you should try adding a push to the character to make sure they don't collide regardless because updating a collision like that could be problematic with complex geometry and this additional failsafe will also solve this issue
gray ingot
mild ibex
#

Am I dumb, in UE 5.2 do data assets just suck?

#

The PDA variable shows Data Assets, not PDA's

#

Trying to make a map of int to data assets and access the data on the asset. Not sure what I'm doing wrong

Edit: I'm an idiot and didnt set the key to target "PDA NAME" and instead just set it to literally primary data asset

violet bison
#

can anyone tell me what is the difference of actor component, interface?
and how do I get an actor's hitbox overlapping actors with that component -> triggering a function that reduces hp
I can't seem to cast to the interface but an component
and what simpler ways can I implement damage function?

thin panther
#

the point of interfaces is not casting.
it's a way to implement behaviour over classes to prevent needing a specific heirarchy. So common functionality for unrelated things.

you just check if it has the interface, and message said interface

indigo stratus
#

Hey guys,
I have a folder 'Localization' in which I have subfolders with different data tables for a custom solution for localization.
After not touching it for a while, I'm trying to add another folder to it, but I can't. I see this for the first time. Any tips?

grizzled roost
# empty marten

Hey so, I've been messing around with the nodes and, I can successfully find and round up all the files I need, in preparation for copying them, simply using the "Find Files" node, but it's the Move node itself I can't figure out.
What do I put in those string fields exactly? Any idea?
Is the Src Filename simply the file's path? I don't know because I can't get it to work.
Is the Dest Filename simply the destination folder? Why is it asking for a filename in that case and not a folder? I also don't know because it's not working.

lunar sleet
grizzled roost
#

The node specifically doesn't have a tooltip, and you know how bad Unreal's documentation is.

lunar sleet
#

Yeah, sadly

#

I would try path including file name.ext to start

grizzled roost
gentle urchin
#

Full path + filename

#

C:/MyFiles/MyThang/DontTouch.ext

grizzled roost
dense garnet
#

VHi all.
How are you?

So, I have been trying to figure this out for about 2hours now. I've tried as many "solutions" as ChatGPT and other AIs have suggested. Tried what I found on Google, still nope.

Problem: How do I prevent acceleration mid-air?

Observations:

  1. only when I hold down the Shift-key to Sprint then jump, does the acceleration in mid-air happen

  2. as this is happening, it feels as if the player-character is being push forward more or further than what it would.. ahh.. "naturally" ... ahh "'arch". Like, its velocity is increasing unnaturally compared to just sheer, ah, inertia.

  3. if I jump then hold down the Shift-key, nothing happens.

Here's a screenshot of the code:

proper flower
#

Hey guys and ladies, someone have a quick solution to limit the angular speed ?

#

this is the solution I tried but have problems

#

If I start spinning in Z axis for example, it suddently become unstable, being influenced in other axis as well and I don't understand why

#

instead without this limit, it works normally but cannot limit speed.

#

someone have a hint?

lime cairn
#

Question, why does the left image not work while the right one does? What's the exact difference between them?

#

Not work, as in the event does not trigger

hazy briar
#

Question
After Adding Motion Matching and chooser to my project and adding it to ABP
like shown in picture it perfectly works the movement and jumping everything beside the following
Anyting related to Anim Montage or montage and any animation that can be played through BP it doesnt work player just freezes and goes back to the Motion Matching/Movement/Idle i tried with differernt animations still same the character freezes for couple seconds and goes back to normal like the animation doesnt get to be played i dont know what is blocking it.

Btw i tried different animations and in different BP still doesnt work

maiden wadi
lime cairn
maiden wadi
hazy briar
maiden wadi
lime cairn
maiden wadi
# dense garnet Like this?

Maybe. If I understood you correctly, the air movement should never exceed the normal movement speed's max speed? As in it should ignore the sprint speed?

dense garnet
#

Does my (-sarcastic tone-) beautiful illustration makes sense?

dense garnet
#
  1. essentially, I'd like:
    ... to disable the Sprint
    ... as soon as the Play-Character
    ... is in the Air
#
  1. because, from what I have observed. When it is in the air, the player-character is still being pushed forward rather than its intial, ah, inertia / force.
empty marten
rare mortar
#

Can someone tell me if I'm making an obvious mistake? I guess my problem is somewhere else in my stamina system but gotta ask:)

Image 1:
BP_ThirdPersonCharacter
I try to set "CanRun?" to false when "Stamina" is <= 12, and I try to se"CanRun?" to true when "Stamina" >=13. And I try to print this to string.

Image 2:
Stamina is set to 100, print string message shows correct.

Image 3:
"Stamina" < 12, still no new print string message.

Image 4:
"Stamina" >13 , print string message shows correct.

#

Forgot to mention I'm new to Unreal and gamedev

#

And programming

obtuse kiln
#

Think can't run can't print because you have it checking the boolean for whether to print at all

#

so break the link to print to screen on both of those

#

maybe

rare mortar
#

That makes sense! I will try:)

gentle urchin
#

Hehe

#

Removing the string showing the cant value

#

Also yoi have a 1.0 gap there

#

Between 12 and 13

#

It should just be > 12 else

obtuse kiln
#

I constantly make similar mistakes with print string, where I'm trying to check the value of a float and accidentally end up with the float connected to the display time instead of converted to a string

gentle urchin
#

Also, CanRun() should be made a pure function

rare mortar
gentle urchin
#

And return stamina>=stamina_run_treshold

empty marten
#

@rare mortar

#

Simplified

gentle urchin
#

You can set the bool directly, no need to branch

#

Swap to >=

rare mortar
#

Thanks! I was thinking of this, but were so uncertain how to do it. Thanks alot to all of you!

empty marten
#

I would suggest as what Squize did to get it into a function at some point.

gentle urchin
#

The sooner the better

rare mortar
#

Now it's working as intended! THANK YOU!

#

Next problem is why can I run even when out of stamine, but have to look into that later xP

gentle urchin
#

If running and stamina <= 0 stop run

rare mortar
#

I mean it! Thank you so much for your quick responses! I allways try by myself + google, but get stuck very often:P

obtuse kiln
#

I just stumbled through my own stamina/sprint system recently without checking any guides or best practices, I'd be terrified to let people see the abomination I created tbh

but hey, I go when I should go, stop when i should stop, only consume stamina when I should. good enough for now.

gentle urchin
#

🀣

#

Its a start

#

We've all started somewhere

empty marten
#

You learn from your own mistakes and as Squize just said, we all started somewhere

gentle urchin
#

At some points in the process, getting things done can be more important thatn making them right

empty marten
#

I normally work with the process of
A) Get code working
B) Tidy code
C) Can I optimize code

rare mortar
#

I don't know why it's working now, compared to 30 min ago, but It's working!

empty marten
#

It's cos you changed that 1 thing that you forgot you changed and now you can't remember what you changed.

obtuse kiln
#

Might as well 'show it off'
even if I don't fix it now someone will tell me something useful for when I get around to it
probably faster than if I just asked for advice, good old Cunningham's Law

rare mortar
obtuse kiln
#

this is what happens when you just keep hammering down each problem one at a time, no hesitation

#

no planning

empty marten
#

I have to ask, do you comment your code?

obtuse kiln
#

when I'm afraid I'll forget how something worked or what it was doing
usually I'll go comment it if I'm going to ask someone about something, both to catch obvious problems on my own and to help with insight
this all makes perfect sense to me though and I mostly posted it because I'm sure it's a wreck

#

hold down the sprint button and when it first triggers it turns off stamina regen (used elsewhere and to tell other stamina-consuming actions that they can't occur) and starts a timer that fires off an event, assuming adequate stamina

event drains stamina and sets movement speed to the sprint speed every quarter second, as long as I have enough stamina and keep moving.

running out of stamina, stopping movement, or letting go of the sprint button kills the timer, turns regen (and other stamina-consuming actions) back on, and sets movement speed back to normal

gentle urchin
#

Sprint IA can give you the tick you need for sprint depletion fyi

#

No need for secondary timer

#

Using world delta * staminaDepletionRate and you're golden

obtuse kiln
#

I'm deathly afraid of putting anything on tick that doesn't really, really need to be on tick

gentle urchin
#

Sprinting = IASprint AND CanSprint()

#

Stamina depletion is tick worthy imo

#

Smooth UI update rate aswell

#

Simple delegate OnStaminaChanged which UI hooks up to

#

Used both when decreasing and increasing stamina

maiden wadi
#

@dense garnet I was messing around with that a bit. This might be a solve to your issue. Set the character's velocity directly. Limits it to what it would be if there was no sprint and they were moving in the same direction.

#

I get consistent jumps from sprinting and non sprinting like this. You just need to limit that clamp to whatever your non sprint speed is.

gentle urchin
#

Or reduce jump velocity while sprinting 🫣

#

More realism πŸ˜„

#

Or something

#

But for consistent jumps this makes sense

#

Might look strange with the sudden velocity reduction?

maiden wadi
#

It's odd feeling as a gamer, for sure.

maiden wadi
# obtuse kiln I'm deathly afraid of putting anything on tick that doesn't really, really need ...

You should really ignore people who cry about tick usage. Make you game. If it works, great. If not, fix it. But by the time you're in a position to care about the performance of something running on tick, you'll likely have the skills to understand why and find a solution for it.

Spending excess amounts of time avoiding tick is just going to prolong your dev time even more than fixing it later. At least you'll have a game to optimize at that point.

violet bison
#

I've finally got my damage function going
but its variables (hp depends on its own, not set by the actor's variables)

gentle urchin
mental trellis
#

Tick has its uses. It's just easier to "educate" people not to use it instead of teaching them when it's appropriate. 😦

gentle urchin
#

Stamina drain on timer is fine aswell in this case, just less... pure

obtuse kiln
#

In my head I know I can trample every single 'rule' of performance and probably still run the game on a toaster, since I'm not making anything too complicated in terms of programming.
But there's still a part of me that's like 'but what if, though'

maiden wadi
mental trellis
#

These people are idiots.

gentle urchin
#

Damage causers

maiden wadi
#

And all too common.

maiden wadi
# obtuse kiln In my head I know I can trample every single 'rule' of performance and probably ...

Stuff often scales beyond what you imagine. Little extra feature here and there adds up quick. I'm not advising you to throw everything on tick for the fun of it. πŸ˜„ Just simply that avoiding it for the sake of avoiding it is equally bad, and a lot of the "Fixes" like spamming timelines(which are an extra component that ticks anyhow) or the 0.0001 shit (which is actually less performant than tick since it runs the same function multiple times every frame) can be worse than a simple tick function. You should definitely be performance conscious when designing systems of course. But you have to have the understanding to be conscious of if first. This requires having profiled, and seen how certain code performs and understanding why. You have to hit the walls before you can learn to avoid or scale them.

lime cairn
#

I just looked at my relatively small project where I consciously checked with myself whether I need Tick

#

Instead of hanging everything on Tick, I now have several Rube Goldberg-esque systems that is somehow functioning

grizzled roost
empty marten
#

\ destinations are system paths where as / destinations are file management locations

grizzled roost
# empty marten Dest Filename is where you want to move the file to Src Filename is the file you...

The slash thing I know about from getting the package's file path in blueprints previously.
And the documentation tells me nothing as I said.

But again, assuming Src Filename is just the file's path, that's easy.
Dest Filename is probably where the problem is, is it just the destination folder? Why does it say "filename" then? Should a file already be there or something? I already tried everyway I can think of to type it, and nothing worked.

empty marten
#

So I did this and it works

#

Apparently it doesn't actually care about \ or /

#

I literally made 2 folders on my desktop. Test 1 and Test 2. Made a txt document called Test.txt and it successfully moved it.

#

@grizzled roost

#

You use the rank as a reference as to what info to pull from a variable. You could use a data table and pull all the info from that using the rank as the row name. If rank 1 use this row of data, If rank 2 use this row of data, etc.

grizzled roost
# empty marten

Sigh It turns out I messed up the order when appending the file name and it's path, that's what was messing everything up, now it works, but it's good to know the correct way to do things anyway.

Thanks again, and sorry for the inconvenience.

dense garnet
#

@maiden wadi
Okay, good news. After trying many different nodes, node setups, "tweaks" in Character Movement component.

This is the closest to what I am looking for.

Attaching a screenshot to the closest solution (so far).

Also, a uploading video after.

#

@maiden wadi
This is the video.

Information on [What is Being Tested] during Record:
... I try to explain this as simple as possible.

1st Jump = I have to jump then click Shift key (Sprint) to activate ... something

2nd Jump = Showing the initial problem meaning it is still there.

3rd Jump (and up) == Notice how I am "Sprinting" then I Jump, the Player-Character gradually stops (not immediately).

-->> [#3] = This is what I am looking for. <<

A slow-down, a reduction of "lateral movement force", a Tennis love/loob. . .
while Jumping.


Currently Problem:
~ Sprint must be active (hold Shift key) or player-character must be Sprinting then Jump and finally, let go / stop pressing Shift key

for the "Force reduction" to the "Lateral Movement. . . to be applied.


... after 4+ hours of trying to solve this. I am going to stop. I feel like this is very close.

empty marten
humble wigeon
#

I can't find a solution to this, if anyone has a better way to do this please feel free to advise.
I'm trying to build an equipment upgrade (think like attachments) modular system for my game. I'm testing my implementation using my already existing interaction system. I have a blueprint component that I want to reference inside my interactable actor (the idea being, when the player interacts with the attachment on the ground this will be "picked up" and the corresponding equipment on the player upgraded") and add that to one of the player character components (a static mesh), I know about the "Attach component to component" node but it's asking for an already existing component. I want to be able to create the component and pass that to the "Attach Component to Component" node using blueprints

I know there's also an "Add Component by Class" node but that will add the component to the Interactable actor, I thought about doing that and then passing that to the "Attach Component To Component" node and then destroying the newly created component from the Interactable actor, but for some reason when I try calling "Get Component By Class" on my Player Character, it's not there..

glad silo
#

hi guys, i'm hard stuck with the wall jump feature, it only work with a specific wall angulation, i'm working on this issue from 2 days and i still got nothing, someone can give me an int? here are my blueprint for the wall run feature and the wall jump

maiden wadi
# humble wigeon I can't find a solution to this, if anyone has a better way to do this please fe...

Because you're creating the component within the pickup and simply attaching it to the character.

You need the target of the AddComponent node to be the player character too. So that the character itself creates a new component for itself and then it can be attached.

The GetComponentsByClass does not care about things attached to the actor. It only cares about components which that actor manages.

brazen stirrup
#

so if I want to make logic to say if player gets x points he wins in a single player game , is game mode the preffered place to put the game win logic?

civic jay
#

I'm just throwing this out to see if this is the simplest way I can do this?

#

Any tips?

#

I know I could keep the cooldown bool in my main actor vars but I don't want to >:(

visual ember
civic jay
#

See I saw a thread about timer nodes but there were too many options when I right clicked

#

Would that go were the delay node is?

visual ember
#

yes

#

set timer by event. drag the red callback pin, create event, hook your boolean set to true there

civic jay
#

Okay, thanks :)

rotund harness
#

Does anyone know if theres a way of passing a function as a variable in a struct? I tried looking into blueprint function libraries but they seem to be intended for multiple functions and ideally I would like to have single functions not under the same library.

spark steppe
#

a Delegate might work

#

if you manage to get that into a BP struct

gentle urchin
#

You could do the ugly function ny name trick

#

Function by GameplayTag is better

#

Requires custom setup tho

visual ember
#

do you need it for any "dangling" function? @rotund harness

#

or for like a single known type of function like "Talk"

rotund harness
#

Im not sure i understand what you mean sorry

visual ember
#

what functions do you need to pass like that?

#

and from different angle: do you know about interfaces and if so are you positive you can't/don't want to use them?

rotund harness
#

Its basically functions that check various variables in the level, player and gamemode, and depending on each case modify some values in the struct.

rotund harness
rotund harness
#

Beacuse of this i dont think i can have inputs to the function for example, bacause they depend on the function

#

unless they all have the same input (which isnt the case)

visual ember
#

what if you put those functions on an object. and pass that object

rotund harness
#

Yeah i thought of that but wouldn't it be easier to use function lists in that case?

#

I havent done that much research on function lists btw

visual ember
#

I would prefer having objects with clear responsibilities and ease of management over some C-style programming

gentle urchin
#

Im inclined to agree

visual ember
#

but that's me. and don't know much about those functions to claim it would be better

gentle urchin
#

Altho the structure in general sounds ...

#

Different

visual ember
#

look from aside if refactoring is possible and whether it could bring benefits

tawdry walrus
#

Hi, I want to know if it's true that when I use the "remove widget" node, it really removes it, or not?

gentle urchin
#

Yes

rare mortar
#

Should I use something else tha "Event Tick" for this? I would also like to add some sounds when stamina is less than a certain value, but I don't know under which event, any ideas?:) (I'm new to kinda everything)

visual ember
#

cause remember that you need to call those functions with different parametrs anyway, right? so you have to have some context in which you will be doing that. and having a dynamic invocation feels wonky and is not suited if you don't know much about c++. source of way too many headaches to me

rotund harness
#

@visual ember @gentle urchin oh ok thanks for the advice, I'll see what is possible, otherwise ill try and find a way of obtaining something similar in some other way

gentle urchin
#

If anything you can compare the result to the state of the bool, and execute an event once it changes

rare mortar
#

@gentle urchin Thanks!
So using event tick is not bad?

#

let's say for performance

visual ember
#

yet another victim of "don't use tick", ehh...

rare mortar
#

Haha, yes:P

gentle urchin
#

I never said anything like that at all πŸ˜‚

#

I said i'd use tick for stamina depletion earlier ,

#

Valid candidate

#

How to translate that to a 'execute on change' event is just a memory state comparison

rare mortar
#

@gentle urchin Oh no, I didn't mean you have said so, I mean I've read and heard it elsewhere several times. If you meant me:P

visual ember
#

@rare mortar in short. use tick if it feels ok and makes you implement logic faster. keep in mind that spamming tick and putting heavy stuff there will affect performance. but don't be bothered initially. by the time you happen to get bottlenecked by it, you will know "ways of programming" to the point where you will know what to put there and when, and what not

gentle urchin
#

Ok good, πŸ˜‚

quartz quest
#

I avoid tick cause I hate refactoring

rare mortar
visual ember
#

and when you happen to have performance issues, first profile to see what is the cause, then start cursing at that thing

gentle urchin
#

I run tons of shit on tick

#

It is what it is, perfoms pretty well

quartz quest
#

My performance issue is my ego thinking I can make nanite and lumen work with VR on a large map.

gentle urchin
#

you gotta be a perfectionist at that point

quartz quest
#

Gonna make a slideshow game.

visual ember
dull hare
#

I'm trying to recreate the door physics from Amnesia. I'm using a physics constraint on the door mesh and the SetWorldRotation node to move it. How can I make the door move slightly in the opening direction after I release the mouse button?

gentle urchin
#

this works

visual ember
dull hare
gentle urchin
#

i'd lerp it untill released, then add force depending on last momentum before release

dull hare
#

ok, I try it, thanks

quartz quest
#

Gotta lerp your lerps

gentle urchin
#

just track delta rotation for the last frame or two , and use that as the base

rare mortar
kind willow
#

I'm trying to make a rich text field, but the styling isn't reckognized and if I try to input it into the text field directly (screenshot example done trough variable) styling will get removed

haughty axle
#

Question: is there any way to fix capsule component location after simple move to location, it stops at front of capsule but not at the center? (if you take top down template movement stops at front of capsule component). or i should do some math to accommodate capsule radius.

rotund harness
#

How hard is it to switch out movement, mesh, skeleton and animations from the default ue5 character, while maintaining all custom functionality? Is ti just easier to make a custom player calss and just copy paste what I can?

surreal peak
#

Also #umg for the future.

kind willow
#

I just kinda assumed it works the same as HTML

surreal peak
surreal peak
#

I'm not entirely sure what "all custom functionality" entails. Swapping out the Mesh, Skeleton and Animation(Blueprint) is relatively easy. Just open the Blueprint, click on the Mesh Component in the Components Hierarchy on the Top Left, and select your new SkeletalMesh Asset, as well as the matching new AnimationBlueprint.

kind willow
#

Sorry for that

surreal peak
#

Makes sense. Unreal Engine's UI systems are called "UMG (Unreal Motion Graphics)" and "Slate". With Slate being what drives the whole Editor. Slate is more or less to UMG what C++ is to Blueprints. Not 100%, but it's somewhat easier to picture it that way at the start. You can also write your Game UI in Slate. UMG is basically just wrapping Slate Widgets.

#

I wouldn't do that though, unless you 100% know what you can't do something in UMG, or you need the performance boost.

dusky maple
#

Hey everyone, can anyone see why i can create a widget from an actor component successfully but not add that widget to its parent widget? I can pass information from actor -> actor component -> widget -> actor component -> actor. but I cannot for the life of me figure out how to add the WB_SongControlSlot to WB_ActiveAudioControlUI. The error I am currently getting is "Accessed None trying to read property K2Node_CustomEvent_AC_Volume".

tight pollen
#

Hello, I have 100 folders called ex1-100
How can I rename them for 1st time with ex to T_Folder1-100?

#

I checked in the Editor Utility if it's possible, but I guess it's not possible

#

there is something like this for the Level Sequence Editor

#

but it doesn't work

#

when I select all folders

#

I need something similar for Get Selected Asset, but for folders

lunar sleet
surreal peak
# dusky maple Hey everyone, can anyone see why i can create a widget from an actor component s...

There is a lot wrong in your Code.

First Image:

  • GetActorOfClass is not an ideal setup. Why does whatever Blueprint you are in there need to spawn the SongControl Widget? Why can't the ASongChild not do that itself? And if you need to have something spawn it, use something that is easily accessible, like a Component on the PlayerController or GameState.
  • Why are you setting AC Volume to "self"? That makes no sense.
  • Why is your code littered with Interfaces? This looks a lot like you thinking that Interfaces are fixing something for you which they aren't. A lot of stuff you do there has no need for interface calls.

Second Image:

  • You are binding an Event to the AC Volume pin of the Event. That doesn't work or even make sense. You should also not use any pins of events that aren't even connected to the same node via the the exec line.
dusky maple
# lunar sleet Why would you set Self to a variable ?

solely because it wasnt working when i didnt have that and i was trying everything i possibly could to get the actor component to work with the widget. in the end i dont even know why the actor component and widget decided to start working togethter but they did

surreal peak
surreal peak
#

but I cannot for the life of me figure out how to add the WB_SongControlSlot to WB_ActiveAudioControlUI
Ensure that your WB_ActiveAudioControlUI is spawned by something that is easily accessible. E.g. let your PlayerController spawn it and save it to a Variable.
Then remove all that shitty GetActorOfClass stuff, and let your ASongChild Class, on BeginPlay, get the PlayerController, from that you get the AudioControlUI variable, and on that you call something along the lines of AddSongControl, while passing it the AudioComponent.

#

You are totally overcomplicating that setup.

#

The AddCOntrolSlotToControllingUI interface call seems redundant.

Interfaces are meant to bridge the gap between classes that have no common parent, as well as remove dependencies between classes and allow the actual implementation of the class to be swapped out (e.g. OnlineSubsystem changes, or a Test related version for AutomationTesting).

#

You shouldn't use Interfaces if you only add them to one Class, or if the Classes yo uadd them to share a parent. Then you can just call the methods directly.

#

Also, assuming "ActorSpawned" is called on BeginPlay of ASongChild, you can't guarantee that whatever the first image is from calls their BeginPlay before or after ASongChild.

#

Unless that is an event that calls "sometime later".

#

Which I can't know of course.

dusky maple
#

giving context in case this changes anything, I am trying to create a system where a user can click a button and it will spawn an actor playing the associated sound. then have a widget be able to individually control the volume of each spawned actor.

surreal peak
#

Ah wait, is AddControlSLotToControllingUI an EventDispatcher?

#

Or an Interface? I can't remember how the nodes look like.

dusky maple
#

everything is using event dispatchers

surreal peak
#

Right, then ignore the Interface part. I mixed up the node visuals.

#

The EventDispatchers are still only really meant as a way to notify something outside about something changing. E.g. "OnControlSlotAdded".

#

If you want to add a ControlSlot to the ACVolume, just call an event on it directly.

surreal peak
#

Instead, in that BeginPlay, you'd get (e.g.) the PlayerController, and from that the VolumeControlUI, which you'd have spawned in teh PlayerController too.

#

If you want to clean this up even more, you can of course have an EventDispatcher in some SongChild Manager. Maybe a Component on the GameState.
When the Player click the UI Button for the Song, you could get teh GameState (GetGameState), cast it to your custom version, grab the ManagerComponent and tell the ManagerComponent to spawn the SongChild Actor.

The ManagerComponent would then, after spawning, call an EventDispatcher "OnSongChildSpawned".

#

Your Audio Control stuff can also get the GameState on Construct, and bind to that.

#

And when it calls spawn the new Widget inside of itself.

surreal peak
dusky maple
#

bless, thank you. I just started trying to do this project about a week and a half ago and put close to 90 hours just watching videos and trying to make this into a working system. I only learned event dispatchers two days ago and have been trying my best to make things make sense both in an organization sense and just a comprehension sense. thanks again!

surreal peak
#

It's tricky to explain this to someone who just started out. A lot of this is learning by failing fwiw.

dusky maple
#

100% been coding for a while but blueprints are wonky to me for the time being

astral orchid
#

Question: Is this a good way to do a death system? If not, what would be a better way?

Note: The OnDeathDelegate is activated when a GameplayAttribute hits 0, it functions alright so there's nothing wrong with it. I'm really just looking into if this method of having the character send a ServerRPC for death is a good idea or now.

surreal peak
#

That might look rather unorganized, but give it a read.

#

That's one of the setups you can try.

quartz quest
#

Anyone have a super fancy wall running system?

surreal peak
# astral orchid Question: Is this a good way to do a death system? If not, what would be a bette...

Why is the Instance itself binding to its own Event? Wherever you are calling "OnDeathDelegate", is where you can just call "OnHeroDeath" directly.

if this method of having the character send a ServerRPC for death is a good idea or now.
In theory, really bad idea. But if you are doing a coop game, then it wouldn't matter too much. But in theory, it's the Server that will deal the damage, and thus will know that the Character died. The Client shouldn't handle this.

astral orchid
# surreal peak Why is the Instance itself binding to its own Event? Wherever you are calling "O...

Wherever you are calling "OnDeathDelegate", is where you can just call "OnHeroDeath" directly.
That's in C++, so that's why I'm binding it here.

But in theory, it's the Server that will deal the damage, and thus will know that the Character died. The Client shouldn't handle this.
Originally, my idea was that because the death involves the character, it should be contained within the character. Regardless, if it's a bad idea, should this delegate be on the GameMode or smth else? Or what would you suggest instead?

surreal peak
astral orchid
#

Sorry, you're gonna need to elaborate on that

surreal peak
surreal peak
# astral orchid Sorry, you're gonna need to elaborate on that

If you want to react to C++ code, you could just make this:

/// Header of AHero

/// General C++ only OnDeath event. Virtual in case AHeroChild wants to do things differently.
virtual void OnDeath(AHero* Hero, UAbilitySystemComponent* CauserASC);

/// Has no C++ implementation. Solely meant to be implemented in the BP Child Classes.
UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "OnDeath"))
void K2_OnDeath(AHero* Hero, UAbilitySystemComponent* CauserASC);

/// This requires the Delegate to be Dynamic, which is fine here, cause you only call that once in a while, but you should generally consider not making delegates Dynamic if Blueprints wouldn't need them. The cause in Performance is there.
UPROPERTY(BlueprintAssignable)
FOnDeathDelegate OnDeathEvent;
/// CPP of AHero


void AHero::OnDeath(AHero* Hero, UAbilitySystemComponent* CauserASC)
{
  /// Do C++ Death Logic

  /// Give Blueprint Child Class a chance to react to the Death
  K2_OnDeath(Hero, CauserASC);

  /// Notify outside Systems about the Death that need to know, e.g. UI.
  OnDeathEvent.Broadcast(Hero, CauserASC);
}
#

There is no need to bind to OnDeathEvent in AHero itself basically.

astral orchid
#

ok

#

And this works for a server scenario?

surreal peak
#

And I don't know why you need the RPC. If you are actually using GAS, which the ASC shortname would suggest, then the Attributes, which Health is probably one of, would already replicate, right?

#

So Server and Client would know already when the value falls to 0.0

#

If at all you want to bind to the Attribute changing on both sides, and limit the DestroyActor call to the Server.

#

I may also note that calling DestroyActor instantly is generally a bad idea (also you have logic behind your DestroyActor call. DestroyActor should be the last node!). Reason for that is that the Clients won't get any more updates that you might still want to send.

#

I would suggest you use the bIsDeath boolean as an OnRep/RepNotify boolean, and when that value is true, "turn" the character off, aka Hide it, set Collision Disabled, etc. and then either call DestroyActor delayed by 3 seconds, or make use of the Lifespan variable.

surreal peak
astral orchid
#

So it should work for a server multiplayer, or I need to do a bit more myself?

dreamy sail
#

I have this logic that spawns my players, it's from a template that I'm working in. I tried to change the spawn in the ChoosePlayerStart function of the Game Mode BP, but it doesn't seem to work, any clue what am I doing wrong ?

surreal peak
#

You can do things like these too:

/// Header of AHero

/// Struct holding Death related information.
USTRUCT(BlueprintType)
struct FDeathInfo
{
  GENERATED_BODY()

  UPROPERTY(Transient, BlueprintReadOnly)
  bool bIsDead = false;

  UPROPERTY(Transient, BlueprintReadOnly)
  UAbilitySystemComponent* DeathCauser = nullptr;
};

/// Callback for Clients to react to the Death
UFUNCTION()
virtual void OnRep_DeathInfo();

/// Replicated DeathInfo
UPROPERTY(ReplicatedUsing = "OnRep_DeathInfo")
FDeathInfo DeathInfo;

/// Server only function called when the Player died based on HealthAttribute being 0.0 on the Server
virtual void HandleDeath(UAbilitySystemComponent* DeathCauser);

/// Similar functions as before.
virtual void OnDeath(UAbilitySystemComponent* DeathCauser );

UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "OnDeath"))
void K2_OnDeath(UAbilitySystemComponent* DeathCauser );

UPROPERTY(BlueprintAssignable)
FOnDeathDelegate OnDeathEvent;
/// CPP of AHero

/// Server Only
void AHero::HandleDeath(UAbilitySystemComponent* DeathCauser)
{
  if (!HasAuthority()
  {
    return;
  }

  DeahtInfo.bIsDead = true;
  DeathInfo.DeathCauser = DeathCauser;

  /// Optional, cause Server doesn't call OnReps in C++.
  OnDeath(DeathCauser);
}

/// Client Only
void AHero::OnRep_DeathInfo()
{
  if (DeathInfo.bIsDead)
  {
    OnDeath(DeathInfo.DeathCauser);
  }
}

/// Calls on Everyone
void AHero::OnDeath(UAbilitySystemComponent* DeathCauser)
{
  /// Do C++ Death Logic

  /// Give Blueprint Child Class a chance to react to the Death
  K2_OnDeath(DeathCauser);

  /// Notify outside Systems about the Death that need to know, e.g. UI.
  OnDeathEvent.Broadcast(this, DeathCauser);
}
#

@astral orchid

#

Updated, pseudo code so fast is tricky :D

astral orchid
#

So from my understanding, this should work on a server implementation.

astral orchid
astral orchid
surreal peak
astral orchid
#

alright

surreal peak
#

Given it passes "Self" as an owner to the SpawnActor nodes, I guess that's in the PlayerController.

dreamy sail
surreal peak
#

ChoosePlayerStart is only used when you use RestartPlayer and let GameMode handle everything.

#

The first image clearly shows that it's using GetAllActorsOfClass to spawn the Actor, not your ChoosePlayerStart function.

#

This isn't compatible.

#

In other words: There isn't supposed to be any Spawn code in the PlayerController if you want to make use of the ChoosePlayerStart flow of the GameMode.

dreamy sail
mild ice
surreal peak
#

In theory yes. The GameMode uses the DefaultPawnClass for spawning when calling RestartPlayer (which will happen when joining the first time automatically).
You override functions like GetPawnClassForPlayer or whatever it is called to do that dynamically.

If you don't want do move all of that or there are reasons this won't work for oyu, then you need to write a custom function to get the PlayerStarts and call that where your first image calls those two GetAllActorsOfClass nodes.

#

@dreamy sail

astral orchid
surreal peak
mild ice
dreamy sail
surreal peak
# astral orchid But just to be clear, this would work for a server. I would need to extend it a ...

Yes, something has to call the HandleDeath function. Presumably the code that listens to the Health reachign 0.0. Idk how you currently trigger that stuff.
Some peeps call this from within the AttributeSets for example.

The K2_OnDeath and the OnDeathEvent have two different purposes.

K2_OnDeath (called K2_ cause we already have an OnDeath and K2_ is usually used by Epic to indicate that it's a Blueprint Version (K for Kismet)) is simply used to give any Blueprint Child Class of AHero a chance to also call some code.
You could also make OnDeath an BlueprintNativeEvent, but I usually don't do that as I fear that Blueprint users miss to call the Parent (Super) node and my C++ code own't be called. K2_OnDeath, as BlueprintImplementableEvent, has no C++ code and is only meant to execute in Blueprints.

OnDeathEvent is a Delegate. You usually use these so other Systems, outside of AHero, can listen to the Hero dying if they need to. E.g. your UMG Widgets that want to display something.

astral orchid
surreal peak
# dreamy sail Do you know if its "GetDefaultPawnClassForController"?

Yeah that's the one that allows you to dynamically specifiy the class to spawn based on the player that comes in. it's a bit tricky to use that if you want to decide this based on VR or not. You'd need to store that info in the PlayerController before connecting fwiw. This is all a lot easier in C++. I would suggest you stick to replacing the GetAllActorsOfClass logic that is in the PlayerController for now.

queen vault
#

Hey idk what happened but now my player is using different components from its parent. All I did was change the flipbook sprites. I can't even change the flipbook back in my player blueprint.

surreal peak
#

This doesn't look like you only changed the Sprites. The whole BP is called differently. All the functions are different too.

queen vault
#

Yea idk why it didn't that.

surreal peak
#

Top right corner shows the parent class of the BPs

queen vault
#

It still says my original parent

surreal peak
#

So BP_Player inherits from BP_ActionChar?

queen vault
#

Yes, the 2nd screenshot is BP_ActionChar

#

the 1st screenshot is BP_Player

surreal peak
#

Is there any C++ involved?

queen vault
#

Nope just blueprint

surreal peak
#

I would suggest you restart the editor.

queen vault
#

All I did was change the source flipbook and then it changed components of my player

#

Ok

surreal peak
#

Otherwise, revert your changes back to the working state.

#

And I don't want to read you telling me you aren't using Source Control.

#

Cause if you break your project and you aren't using Source Control, no one can help you anymore.

queen vault
#

I'm just wondering if there's a way to reverse this?

surreal peak
#

Yeah, undoing your changes using Source Control.

#

There are free setups with Perforce + Free Azure Instances iirc, so there is no argument against having Source Control setup to ensure projects don't full out die when something starts bugging around.

queen vault
#

Ok.

#

I will revert to last state

surreal peak
#

If you aren't using it, then not really. There is no "old version" of your setup. You can check the Auto Save or whatever it is called in the Saved folder, but that's about it.

queen vault
#

I was just wondering if there was anythign I could do before I do that

surreal peak
#

Idk why your Blueprint does this. The RootComponent is even renamed.

#

This is not normal. If there are no C++ changes involved and everything is Blueprint etc., then it's probably straight up a bug

queen vault
#

Ok. I will just revert the state

shrewd moss
#

I'm trying to set up an arcady kart controller using raycasts as the suspension, but I'm running into an issue where accelerating causes the vehicle to lift nose up, and reversing causes the vehicle to lift tail up, any ideas?

astral orchid
copper chasm
#

Why is my click event not registering when I click a character class? It registers when I click a static object (default cylinder or cube) but not my character (I have it set to printscreen hit actor) See below for code and collision preset on character

surreal peak
radiant wren
#

So... I'm trying to make a track following system, where the track will be split up into multiple separate splines (cause it'll be splitting, merging, and just overall going long distances, can't all be one spline) and I've got this code to notify the little test bed train I've got when the track is changing to a new spline which (I think) should work... but how would I go about initializing the spline component reference variables to a specific instance of the tracks (the one the train happens to be starting on)?

round elk
#

hey anyone know why when I retargeted an animation from ALS V4 to the UEFN mannuequin from motion matching sample it bugged out

eager thicket
#

Do events last perpetually? I.e they play as many times as needed

#

or is this bind event only going to fire once

empty marten
#

that bind only once

#

cos event begin play only executes once when you hit play

maiden wadi
eager thicket
#

I guess: what's the best way to continually rebind events so they fire everytime they are called

maiden wadi
#

This depends on the binding. Most only need bound a single time, and then can be ran an infinite amount of times until they are specifically unbound or their owner is destroyed.

#

Rare events like the character's jump apex one, specifically unregister all registered events after broadcasting them. So you're required to rebind them every time the event is ran.

radiant wren
#

for your issue that is

#

cause they would be able to fire whenever you needed them to, and collect any data you needed from any other actor or blueprint

eager thicket
#

i hate interfaces

#

i don't want anything to do with them

maiden wadi
#

Interfaces should literally be the last consideration you ever fall on when trying to communicate between things.

eager thicket
#

i will cast, i will do event dispatchers, i will create unnessecary bluepritns to liase between modular pieces

#

NEVER interfaces

radiant wren
#

...... really? Literally everything I've ever seen said "use interfaces when communicating between actors"

#

cause casting loads the whole blueprint which people have always said was a bad thing

maiden wadi
#

To be clear. I will happily use interfaces, if the situation requires it. That situation is insanely rare.

eager thicket
#

imo interfaces are like a malignant cancer on unreal tutorials but i'm dogmatic

radiant wren
#

So what's bad about them? Cause I've just started my project and the interface I've got is indispensable for my character interacting with stuff

maiden wadi
radiant wren
#

but it seems pointless to load a whole blueprint just to access a small part of it, if not just a couple variables

#

no?

maiden wadi
#

Er..

#

This is exactly what I mean about not understanding linkers.

#

That blueprint is already fully loaded.

eager thicket
maiden wadi
#

You aren't accessing a small part of it using an interface. It is fully loaded or the interface wouldn't work either.

radiant wren
#

huh... I mean I just started using Unreal like 2 months ago so I guess I don't have any background for what I'm saying other than you two are the first people to ever tell me interfaces were bad

eager thicket
#

Authaer isn't saying they're bad

#

i am

#

but it's personal

radiant wren
#

ah XD well alright

maiden wadi
#

I'm saying they're entirely overused. πŸ˜„

eager thicket
#

dropped

radiant wren
#

I see...

eager thicket
#

every tutorial and their mother seems to use interfaces is quite ridiculous

maiden wadi
#

To start with the basics. Do you understand what a pointer is? The blue variables you input into and get from a cast node?

radiant wren
#

Ok so if interfaces do actually load the whole blueprint, what would I use if I don't want to load the whole blueprint?

spark steppe
#

they don't

finite hearth
#

When trying to call child logic from a parent; is it better to use a function override or an interface?

maiden wadi
#

Ignore the loading thing, that is a bad phrasing.

spark steppe
#

but the moment something is there to respond to it, that thing will be loaded already

maiden wadi
radiant wren
finite hearth
spark steppe
hidden rampart
#

Guys I got some error but only when I played in New Editor Window (PIE) , when I play in Selected Wiewport or Simulate there's no errors.

#

This is weird, right?

torn kettleBOT
#

:question: is it weird?
:8ball: Signs point to yes.

hidden rampart
#

And I tried standalone and it worked, but I dont know if that's relevant.

spark steppe
#

we neither if you don't even tell us what error you get

hidden rampart
#

I went there and it seems fine idk

spark steppe
#

i guess it's not fine, because it clearly has an null access

hidden rampart
#

Why does it not give errors in viewport

maiden wadi
# radiant wren No I don't think so... but I'm also still learning terminology so I might "know"...

A pointer is a memory address. When you construct an object, it gets put in a specific place in memory. To access this object you use a pointer which is basically a number ID of where that object is. You pass this ID around like a phone number because this single ID is much smaller than the object it's pointing to.

A cast is the attempt to change a pointer's type.

Lets say something like a line trace. You line trace and get a hit actor back right? So you line trace and hit a MyPlayerCharacter. This is a child of Character, which is a child of Pawn, which is a child of Actor.

Your pointer from the line trace IS a MyPlayerCharacter, but it is stored in an Actor type pointer. For this reason you cannot access the variables and implementations within MyPlayerCharacter as the code understands this is an Actor. To change that, you attempt to cast it from Actor to MyPlayerCharacter.

You are not changing the object in any way, you are simply saying take this ID and try to access this extra functionality. If the cast succeeds, then this actor was a tyep of MyPlayerCharacter. If the cast fails then the original ID was null or the ID was not pointing to an instance of MyPlayerCharacter.

maiden wadi
finite hearth
# hidden rampart

I haven't tested much, but I don't think standalone will popup the failure point in your nodes. Your standalone is still probably failing, you just don't observe it.

Your issue itself is probably sequencing. I'd breakpoint that node while in PIE, you'll see that it's missing a reference that it is expecting. You can then work yourself backwards in the logic and find out where you need to set the ref.

radiant wren
# maiden wadi A pointer is a memory address. When you construct an object, it gets put in a sp...

Ok had to read this a couple times... but I think I might understand at least at a basic level (?)

So a pointer is the ID to an object, and so the actor that the line trace is coming from has a pointer, but also the line trace itself has a pointer, and the thing the line trace hits has a pointer... but because the line trace came from an actor, it's also an "actor" and therefore incompatible with a "MyPlayerCharacter" so casting takes the "actor" pointer that the line trace has, and turns it into a "MyPlayerCharacter" pointer?

maiden wadi
#

Kind of. It's an inheritance thing.

finite hearth
maiden wadi
# radiant wren Ok had to read this a couple times... but I think I might understand at least at...

You have a classes that are

Object
Actor
Pawn
Character
MyPlayerCharacter.

Object
Actor
MyCoolRifle

Your MyPlayerCharacter IS an actor. So it can be stored in a pointer of Actor types. MyCoolRife is not a MyPlayerCharacter. So it cannot be stored in pointer types of MyPlayerCharacter, but it can be stored in Actor type pointers.

For this reason you can store both of these in an ACtor pointer. And you can linetrace both of these actors and get them returned in the line trace as an Actor pointer.

If the line trace hit a MyCoolRifle. It will successfully cast to MyCoolRifle. It will fail if you cast to Pawn, Character, or MyPlayerCharacter.

If the line trace hit a MyCoolCharacter. It will successfully cast to Pawn, Character, or MyCoolCharacter. It will fail if you cast to MyCoolRifle

spark steppe
#

comparing the class will load the other class anyways (you can see that in the sizemap of your asset)

#

the real question is why the parent has to invoke the fire() method

#

sounds like messed up logic

maiden wadi
#

Can you call parent interface functions?

finite hearth
spark steppe
#

interface call to fire logic

#

sounds like IF_FireLogic should be separate

#

and only implemented on the child

finite hearth
#

Refactor needed, but I think I understand what needs to be done. Thanks all!

radiant wren
# maiden wadi Kind of. It's an inheritance thing.

So I want to try this then: let me explain how I'm using my interface and you tell me if there's a better way:

To start in, in my character, there's code to make a line trace and hit an object like so (Image 1) it has one interface with 3 separate functions in it: Click/Drag Done (image 2) which just fires as soon as I let go of LMB, Click/Drag Begin which is the total opposite, so it'll fire as soon as I click, and it'll take what the line trace hit along with it (image 3), and finally there's the main Click/Drag function that'll fire for every tick I'm holding LMB, it'll take two variables that contain floats to represent how my mouse is moving (image 4).

In, what is currently, the only blueprint that will use this interface (I intend to have many more, any and all actors that will have a control that needs to be clicked and dragged) there is the begin click drag where it'll take the hit component and compare it to all the controllers in the actor to see which one I am looking at (Image 5).

Once that is done it'll start taking the variables it's collecting from the main function of the Click/Drag interface and move the corresponding controller (Image 6)

where it'll then process the input given to it and act accordingly through this... monstrosity XD (Image 7)

then once I let go of LMB it'll basically just reset everything (image 8).

maiden wadi
# radiant wren So I want to try this then: let me explain how I'm using my interface and you te...

Will read that, but also posting this as well in the meantime.

So with casting understood. And knowing that it is practically a free function. It costs basically nothing to cast something at runtime. We move on to linkers.

Linkers are the real reasons people have trouble with casting, and I say that loosely because casting isn't to blame here. Cast nodes have an output of a type. That type is the linker. You can cause linkers either through the blue pointer variables or the purple class variables. When you use either of these types of a specific type in a blueprint, that type needs to be loaded before this blueprint can be.

Note that when I say loaded I mean their CDO, this is Class Default Object. Which I'll go on a tangent to explain. A CDO is an object which Unreal creates once for each class so that it can easily copy it to instantiate new instances of it, and access defaults of. There is one CDO for every single class. No more.

So if ActorA and ActorB both cast to ActorC. This means that when the game loads up, and a map uses ActorA and ActorB, it will load ActorC first, then ActorA or B. When these are fully loaded, a CDO will be created for each, and then long after that they'll be used to make instances of each of them for gameplay reasons. Even though A and B both link to C, C is not loaded or created twice. It is loaded once and has one CDO object.

The reason why this is "bad" is because people do not correctly separate their code and asset classes. You should be free to cast all you like to code classes. Because they're tiny. C++ does this. Literally every single C++ class in the engine and your game is loaded at all times with a CDO. But they're basically free because they're tiny. They link to no assets.

#

Trying to put this into useful info with some bad scenarios. Consider making a game where you can load into different levels to fight different things. You're on level 7. But your player character tries to cast to some boss on level 4 to do some specific function. That boss in level 4 will remain loaded and in memory in every other level you're in.

That boss likely has special materials/textures/sounds/etc. And these are all kept resident in memory because of that linker to it. There are three ways to break this linker correctly.

The first is to not break encapsulation by casting to the boss in the first place because you need a proper ability and event system... But hey we're short on time so refactors aren't going to happen. Scold the rookie and move on.

The second is an interface. Sure this works here. But interfaces are messy because you have to implement them in literally anything that needs to use them. Copy a ton of code cause usually the use cases are similar, but it can't have it's own state, so you're just copying a bunch of stuff, once per thing that uses this interface.

The last, is to simply move that code to a parent class of the boss and cast to that. The parent should have no linkers to meshes/sounds/textures/etc. The parent class of the boss will remain resident in all levels, sure. But that's okay cause we probably have a boss in most levels that inherit from it, and it's also miniscule in size, so it isn't going to affect our memory costs at all.

loud tree
radiant wren
#

So the best way to handle things is to have a parent blueprint that has all the common code inside it, then have child blueprints that will all have slight differences....

maiden wadi
#

Sometimes.

#

Composition is also a powerful tool to use in cases like this. Specially like your interaction above.

radiant wren
#

what's that?

maiden wadi
#

Use of actor components to compartmentalize logic.

spark steppe
#

wow, that word really exists...

mental trellis
#

Have you never heard it before?

maiden wadi
#

Interaction is one of my favorite topics for that case as well. Because there's a lot about interfaces that really limits you in regards to interaction.

radiant wren
#

Oh yes I did actually watch a video on components recently, had ideas of how to use them too, just haven't gotten that far yet XD

But yeah was totally gonna use them for instances where code was commonly repeated, but in the example I provided, that specific actor, sure there'll be a couple of them, but the differences between them would literally be the contents of a single array and nothing else would share the functionality it holds so I figured it'd be fine without components or child actors

maiden wadi
#

@radiant wren For a classic use case. Consider needing a set of logic that can work for most anything in your game. You need to be able to pick up an object. You need to be able to start using a medieval gate control. You need to be able to start riding a horse.

These three things all need to have varied base classes. You're not going to make a pickup actor be a pawn like a horse, and you're not going to make the gate control a pawn either. You probably don't want to pick up the gate control or horse into your inventory like the pickup actor. You do still need to do the basic job of interacting with every one of them.

You can use an interface. But lets take the gate control and it's gate for starts. What if you have a gate which requires two gate controls to be used at the same time? And you have two gate controls that could be used by up to three people each at a single time?

That is a lot of complex state to manage but it's all identical. Managing users with output. This means that the same interaction component can be used on the gate and it's controls. The gate limits itself to being interactable only by the gate controls, the controls are usable by character pawns, etc. A character interacts with each gate control, the gate control interacts with the gate.

GateActor has the same InteractionComponent as the GateControlActor, just with some different defined settings. Similarly the PickupActor has the same component. So does the HorseActor.

Horse, and Pickup are all instant. GateControl is a hold. Gate is timed to open from fully closed for 30 seconds. More people might speed this up for instance.

Horse and Pickup are single user. GateControl is 1-3 users, Gate is 1-HowManyEverControlsyouWant users.

More importantly, this component can house the states required for all of this interaction such as percentage completed and whatnot. And house generic delegates which it's owning actor can bind to. Which keeps your actor classes a little more clean.

radiant wren
#

The other interface I started to use might be a bit less necessary as an interface though, cause what the second one does (or is going to do) is, and probably important context for this, my current project is a train simulator, but it'll basically fire whenever the current track instance has ended and is notifying the train to switch to the next spline in the line basically

#

though still figuring out how I want it to handle doing that

#

@maiden wadi Would you happen to know a good way of doing that? Basically just as the train travels across the tracks make sure it will switch from one BP instance to the next instead of stopping? Cause I was following this tutorial which covers most of what I need, just with the exception they have just one spline for the whole loop but I'll need multiple for all the many diverging and merging tracks that will exist throughout thousands of miles of tracks: https://www.youtube.com/watch?v=fj66nCsloQY

#

As soon as I break through that wall, all of the train movement should run smoothly

lone garnet
#

Not entirely sure if this is the right channel but redirect me if necessary. I have a normal physics object with a box collision on the mesh (have also tried with complex) it falls through my terrain 60-70% of the time when I drop it or spawn it in some manner generally, or even just when the game begins and its in the air. If I move a mesh under it, it will not fall through it at all. Just terrain. Is there a setting somewhere people are aware of to sort this kind of issue?

maiden wadi
# radiant wren So is this a case for using interfaces, or for using castings? Cause this does s...

Technically neither. Composition largely requires simply getting the component from it's actor level pointer. Actor class tracks it's owned components. So there's rarely much casting involved except to the interaction component itself. The component notifies it's owners via delegates, the owner can use the component directly since it's within them, code accessing it usually relies on getting it from it's owner via GetComponentByClass or similar.

radiant wren
#

wait components can be used to communicate between two actors? I thought they just added a commonly used set of functionality to something

#

so you didn't have to copy and paste

maiden wadi
#

Kind of. Like your mouse interaction will get a hit actor from the trace. You already understand that you can either cast to this actor to call a function, or run an interface event which runs a function. Both run on the actor itself.

You could instead get a component on the actor and call a function on the component, which can do things internally based on the parameters you set on it and then it'll run delegates which it's owning actor can use to do things.

maiden wadi
lone garnet
#

@maiden wadi mmm. going by the scale in the mesh view, 4x27x34. Its an armour plate so whatever size that would be relative to the player. Not big at all. if thats not the measurement you want them im not sure πŸ˜†

radiant wren
#

that is helpful for simple things, but not for more complex things that can be interacted with in many different ways via the interface

maiden wadi
lone garnet
#

Yeh Im seeing the collision thickness posts but I cant find anything showing me where to find that setting. I cant find it anywhere

lone garnet
#

I should also mention for the sake of it that CCD is not an option in this case

radiant wren
#

idk if that screenshot will help... but I figured it might so I went ahead with it XD

lone garnet
#

this is all there is on landscape collision

radiant wren
#

ah :/

lone garnet
#

yeh 😭

radiant wren
#

expand the collision presets, see what that does

maiden wadi
#

I'm going to throw a fucking party if Epic ever actually deprecates that shit class and makes a real landscape alternative.

radiant wren
#

?

lone garnet
#

nothing new in the presets, just standard ticks all set to block

radiant wren
#

ah...

lone garnet
#

nightmare

trim matrix
#

Is it possible to set the curve tangent value manually ?

lone garnet
#

such a small but huge issue.

radiant wren
#

How accurate does the collision on the object that keeps falling through need to be?

#

Cause if you make the collision larger than the actual object, large enough to stop falling, it might work

lone garnet
#

Right now its just a box, ive tried more complex but still the same. its not a complicated object shape so accurate enough to stop it falling through is fine but a capsule isnt ideal

#

cant have a rolling armour plate

radiant wren
#

Try making the box collision bigger

#

start ridiculously big just to see if it'll ever stop falling to begin with, then if it doesn't fall, go back down to small, then start inching up until it stops falling

lone garnet
#

the size of the collision definitely helps. Seems to hardly if at all fall. I guess Ill have to inch down cos its floating a bit πŸ˜†

radiant wren
#

ye, there'll probably be some compromise with that solution.... but it works XD

#

at least for the time being

#

until a better solution can be found

lone garnet
#

yeh itll have to do, hopefully I dont have this issue with more complicated things but Im satisfied for a while πŸ˜†

#

Appreciate the help!

#

get it together Unreal with your damn landscapes

radiant wren
#

XD

lone garnet
#

πŸ‘€

maiden wadi
radiant wren
#

You don't like procedural generation?

maiden wadi
#

I love it. ALandscape doesn't.

radiant wren
#

hmmm.... what's that?

#

that just the name of the software UE uses for landscapes?

maiden wadi
#

It's the Actor which houses Landscape code, yeah.

radiant wren
#

oh so the landscape is also an actor huh XD?

maiden wadi
#

In code Actors names are prefixed with A. So Landscape. ALandscape.

radiant wren
#

I kinda figured landscapes were just their own thing

maiden wadi
#

Pretty much everything in unreal is an Actor and a Component of some kind.

radiant wren
#

I see...

mental trellis
#

UE is basically Shakespeare. Everything's an actor and all the world's a stage.

radiant wren
#

XD

maiden wadi
#

And the stage can have multiple stages too. Just for fun. πŸ˜‚

radiant wren
#

stage-ception

maiden wadi
#

But no. Landscape is great if you want a basic level that is handcrafted. Sure. But once you leave the editor, it's basically just another static mesh. It isn't really editable at runtime. All of it's edit code is editor only and compiled out in cooked builds.

radiant wren
#

Interesting.... so you can't add a digging mechanic to landscape? Meaning all the games that have such a feature don't use landscapes?

maiden wadi
#

You absolutely cannot.

radiant wren
marble tusk
maiden wadi
#

That tiling texture looks like Voxel

#

Yeah

radiant wren
#

ah

marble tusk
#

With how popular the voxel plugin is Epic should just pay those guys to make it an engine feature rudeDude

radiant wren
#

heh

#

everything should be a feature πŸ˜›

#

make Unreal the "do it all" engine XD

#

even more so than it already is that is...

maiden wadi
#

πŸ˜„ I've said multiple times that Epic should buy out Phy and make voxels the default.

hoary summit
#

anyone know a thread safe alternative?

finite hearth
#

Does anybody know why my print string text gets hidden until I restart the editor? Feels like this happens a few times per week and it's driving me nuts.

olive yarrow
#

hey folks, short and simple - how would i disable Mouse Inputs ONLY in a blueprint?

versed sun
#

unplug mouse

visual ember
frosty heron
#

Common way I find new people doing the wrong doing is like hanlding the input in the door blueprint

olive yarrow
#

Ah heard, I just wanna disable right and left click while an animation plays in blueprint!

empty marten
olive yarrow
visual ember
#

switch input mapping contexts

empty marten
#

I think its purely for mouse movement.

visual ember
#

assuming Enhanced Input. for the duration of animation, remove default context and put in one without mouse movement defined

empty marten
frosty heron
olive yarrow
#

Well, everyone but you know what I mean

empty marten
frosty heron
#

I think removing the whole mapping context is not of the best interest for not allowing input during animation states or other business

#

you can do what ever you want, it's your design. But I personally don't see the point.

empty marten
#

I do think that UE is still a bit limited in input controls. Wish they would add some more extra control over it but there is such a thing as too much control.

olive yarrow
#

I didn't even think about booling πŸ€¦β€β™‚οΈ
This is why we should take breaks during dev seshes.

empty marten
#

What's a break?

frosty heron
empty marten
#

Oh wait. It's that thing where you put on a node as you step through and you want to stop on it.

olive yarrow
#

I.. Yes. I think so c

empty marten
#

Red Pandas are awesome. I don't care what anyone says.

#

Are there any plugins that add extra functionality for inputs with blueprints?

olive yarrow
#

Cold summer do be rocking that panda

hallow compass
#

i have a building made of many modular bits, and I think that instancing the modular bits through instanced static meshes is the way to go, right? In that case, is there a way to convert hand placed meshes into an instance static mesh?

hallow compass
# visual ember

thanks a lot! and how would it work to then put that into a blueprint? Is the correct workflow to just copy and paste the newly created ism from the level into the blueprint, or is there a better way?

#

the buildings have interactable pieces so i would need to bring these isms into bps

heady lantern
#

Hey! Pretty new to Unreal. I'm having a hard time wrapping my head around this. It's a sprite based parallax background. Each layer needs a different speed (Layer Speed) that it ramps up to when a custom event triggers. (right now it's connected to BeginPlay for testing) How do I set specific values for the Layer Speed for each item in the array?

There are also several sets of sprites for each layer that need to change based on the value of a variable. How would I go about modifying those created Dynamic Parallax Mats individually? Do I create another array of the Dynamic Material Instances, and send them through another For Each Loop within that loop to change the sprites? Then how can I input the value of Layer Speed variable for each layer?

visual ember
hallow compass
#

but both residing in 1 blueprint

visual ember
#

maybe Merge Actor Settings can help with that

#

but copying might work too πŸ€”

#

as instances are just an array inside ISMC @hallow compass

empty marten
#

@heady lantern ignore my last message. Use a map instead of an array. It can hold 2 variables in each index.

#

1 variable is your instance, the other the speed.

heady lantern
#

@empty marten Can the For Each Loop accept maps? I haven't used them, so I'll have to figure that out.

empty marten
#

I don't think they can actually now that you've said that...

#

Let me get UE open. I'm working off corrupt memory atm XD

heady lantern
versed sun
#

Map>Get Keys>For Each

heady lantern
#

No worries!

heady lantern
empty marten
#

Top one is the instance, bottom one is value

empty marten
#

^^ This

empty marten
empty marten
heady lantern
#

Hmmm..

empty marten
#

I saw that message ColdSummer lol

frosty heron
#

nvm, I think iterating through keys are totally fine, I just don't get why we are iterating the values

empty marten
#

different material instances require different speeds.

#

To quote FairTech " It's a sprite based parallax background. Each layer needs a different speed (Layer Speed) that it ramps up to when a custom event triggers."

violet bison
#

how to make a component use variables of a parent, and call some functions at parent?

heady lantern
#

If I have a maximum of 10 layers, am I better off just making separate material instances for them?

#

I see what @versed sun is showing, but I'm not entirely sure how to implement it.

storm shale
violet bison
#

ok I will try to understand how to

versed sun
#

im not sure what you are doing , sound like changing a speed on a sprite/ texture/material?
If you have a list of Sprites, and want to change each one uniformly, i think this would be a good start

marble tusk
#

I think that last node just sets the entire map to that one key/value pair. I think ADD is what you want. Since there can only be one of each key it just overwrites the value

storm shale
# versed sun

that seems like the worst crime ever committed to a map XD

frosty heron
#

then cast if you must

warped juniper
#

Hey, what'd be the better way of adding a ! on top of an actor in game, Widgets or a flat plane that points to the player camera at all times?

#

Assuming I want it to become active within player proximity

frosty heron
#

the flat plane would be the same as showing 3D widget

warped juniper
#

Hm, so just making a widget that is just an image and assign it to the actor?

#

Thought that sounded so simple it was a trap

heady lantern
#

Ohh, okay. I think the added nodes helped me understand a bit better. The Layer Speed variable is hooked up to the texture coordinates for scrolling, it controls the speed of the scrolling texture. Each layer needs a different speed to appear further away. I initially set it up this way because I thought I could change it in the object settings of the sprite inside of a blueprint, but that only works if the object is a blueprint itself. So now I have to figure out Dynamic Material Instances

versed sun
#

i think widget is overkill

heady lantern
warped juniper
#

Anything that displays the image should work

versed sun
#

Make a material with the texture image , and put it on a plane
Make material 2 sided , or rotate it to camera

storm shale
versed sun
#

^ even better

violet bison
frosty heron
#

no

#

what is that?

warped juniper
#

Billboards? Never used them, seems like a good chance

frosty heron
#

don't use interface if you are using component

warped juniper
#

Thank you for the tips

frosty heron
#

you rarely need to use interface imo, most of the time component does the job

violet bison
#

okay
ty

warped juniper
frosty heron
#

what about it

#

you use interface when you want to communicate between classes that doesn't share the same base class

warped juniper
#

I used interfaces for stuff like... For example a montage notify setting variables and parameters of an actor's components for gameplay purposes.

storm shale
#

Interfaces are good to alternatives like this:

frosty heron
#

Not really, interface is not a replacement for casting

storm shale
#

u can just fire the interface and let each of them handle it their own way

frosty heron
#

this is myth that been prepetuated from youtube

warped juniper
#

Frankly I don't know enough to say I prefer interfaces

frosty heron
#

If you are replacing casting with interface you are shooting your self in the foot

warped juniper
#

For all I know, the mechanics I'm doing could be doable with casting and not interfaces

#

Interfaces just have the virtue of being cleaner, and occasionally doubling as actor tags if set up properly

storm shale
frosty heron
#

people that tries to avoid cast and replace it with interface, at the end of the day they will get a ref to the other blueprint when they need to pull the data from, so they still get loaded to memory.
Not to mention that this will make debugging a nightmare

frosty heron
#

you are casting an object, you should just cast to your target type

warped juniper
#

I should look more into casts then

#

A tutorial or read deeper into documentation

frosty heron
#

look into inheritance for more info I suppose

warped juniper
#

Yeah I know that, I mean how to do things with casts that I do with interfaces currently

storm shale
frosty heron
#

cast and interface is apple and orange, DO NOT replace casting with interface

warped juniper
#

For example I have a bomb in my game, which uses interfaces to make any valid actors it touches run an "explode" function.

frosty heron
#

might as well just create a base class at this point

#

it looks like design problem to me

warped juniper
#

I would feel lke this use case of interfaces is redundant from what you said

storm shale
frosty heron
#

They have their uses

warped juniper
#

In contrast, the Interface I made that connects Anim Notifies with Character class Actors IS indeed a valid use case for Interfaces, if I understood correctly?

frosty heron
#

It's used to communicate between classes that does not share the same base class

#

but personally if it gets anymore complex, I would use component instead

visual ember
storm shale
#

It can be used for many things; though the most preavalent imo is to be able to allow each object type to handle it differently.
You can also get that through parent classes but smtms it's not applicable.

violet bison
#

huh that may be useful
I want the bullets to destroy themselves after overlapping walls or people to not multi-hit someone with a single bullet

frosty heron
#

if that's a projectile you want to handle that in the bullet it self

warped juniper
#

Hm, I would like to know what's the right way to communicate between classes without interfaces

frosty heron
#

depend on the context really

violet bison
#

how do I get owner's variables and set them?

storm shale
storm shale
#

Among those that must always be loaded; there's no reason not to have hard references to the classes themselves and have communication be ez pz.

#

THe rest would just be having stuff be easier for you when it comes to making stuff.
Like making -making enemies- as easy as it can be, as intuitive, etc.
Stuff like having simply variables like -damage- -range-
Or simple functions like -attack- which you can use to make developing the game easier

frosty heron
violet bison
#

I might have to clarify things

frosty heron
#

what is your end goal here?

#

what is the component used for

violet bison
#

it is a damagesystem
both for calculating damage and notifying the bullet that it hit something destroyable
and when I try to get owner of the damagesystem it didn't work

frosty heron
#

as much as possible you don't want to couple the component with a specific actor, the more things you can decouple, the more flexible it can be

storm shale
#

it's what you get when you hover over an object reference

#

in that case -Timeline Component- is the class

storm shale
#

Anything you have created is exclusive to your custom class.

frosty heron
#

GetOwner returns the owner of the actor component

#

seeing the first picture I just think you are not understanding references

#

Suppose I have a component inside my Character.

If I have a code inside the TargetComponent that calls for GetOwner,
If PlayerCharacter->TargetingComponent initiated the call
The owner would be my PlayerCharacter

#

Get owner will return instance that OWNS the compoennt

storm shale
#

For example in the left there is my Missile reference but it's cast to the Actor Class, as it says there.
On the right I am using the cast node to cast it to my Missile class.
It's the same reference; but now I can access stuff that's exclusive to my Missile class.

violet bison
#

the getowner function when run under an instance's component, should return the instance right?

storm shale
#

When hovering over your custom class in the content browser you can see its hierarchy

#

I actually don't know how to see the full hieerarchy XD

#

did that hepp uwu?

violet bison
storm shale
violet bison
#

so should I have created a parent class from the start?

storm shale
storm shale
#

both children of Object so to speak

violet bison
#

parent actor then?

storm shale
#

You can get owner of ActorComponent as well; but that node is getting the owner of an actor; so you just need a different node

#

YOu can drag a variable and while dragging type what you are looking for

warped juniper
storm shale
#

All functions have that -target- thingy that lets you call them on any object you have a reference to;
As long as the reference is connected; and the class of the reference matches

frosty heron
#

Actor component is an entity you attach to actor

#

An actor is an object that can be placed to the world

#

Imo rather than trying to do your system right now, you better off learning the concept of inheritance and references.

#

Once it click you can apply that to all your other problem that would have arose from not understanding them.

warped juniper
#

Right. I'm not really an excellent programmer, I have a lot to learn...

#

Like the reference way is definetly ideal for this bomb thing I have

frosty heron
#

@violet bison My msg was to

warped juniper
#

Bombs are a player ability, so they will always be in the same level together

violet bison
warped juniper
storm shale
storm shale
warped juniper
#

Yeah it could be a bit tricky since I need the bomb to interact with 2 different classes

storm shale
#

Cuz if it's a thing like enemy and ally; they could have the same parent class

#

for example

warped juniper
#

They are both actors: One is a static, breakable obstacle, the other is a dynamic actor that may have a movement component or basic AI, or gets constantly moved around in specific ways and patterns by default without on the fly changes to it.

#

They are both actors, but one may be a pawn and they other may not.

storm shale