#blueprint

1 messages · Page 237 of 1

mild ibex
#

it seems like that's the case ye

#

even if the spline is closed this is the same

ripe sun
#

Am I understanding this correctly:
The player/object can travel on the spline, Point A and B are points on the spline. You want to find the shortest distance to get from point a to b? The spline can loop

mild ibex
#

Yes, and for the object to be able to go past the spline length and loop again if it needed to. For instance 0 to 720 in terms of degrees

ripe sun
#

ok here is some pseudocode:

float SplineLength
float A (Distance of PointA along spline).
float B (Distance of PointB along spline).

//Option 1. Clockwise
float Distance1=B-A

//Option 2. Counter Clockwise
float Distance2= SplineLength-B+A.

float Shortest=min(Distance1,Distance2)
mild ibex
#

right, that part is already sorted by the existing code. I dont have to explicityly get the min. I guess because it doesnt loop by nature, so when A is 180 and B is 90 it doesnt go to 360 then to 90 it just goes 180 -> 90

#

so it's picking the shortest path already. The problem is moreso not being able to move over the 0 point. so in the 25 to 260 example it goes linearly from 25 → 360 rather than 360 ← 25

ripe sun
#

hm my code presumes that a<b.

#

a>b might cause problems

#

for example, a = 260, b=25.
distance1=-235
distance2=595

mild ibex
#

its a problem I've been interested in solving for a while now. It sounds plausible but at the same time unreal doesnt lend itself well to the issue

gentle urchin
#

IF a>b then..

else

ripe sun
#

or you can just set the smaller number to a, and the bigger one to b

mild ibex
#

I also cant reverse the spline or set any sort of direction, its very strange

gentle urchin
#
local_b = a > b ? a : b;
local_a = a > b ? b : a;
ripe sun
#

does condition ? true : false exist in cpp? or is it only a java thing

gentle urchin
#

it does

ripe sun
#

oh

gentle urchin
#

im a bit confused about what the issue above really is tho

#

"move over the 0 point" , I'm unsure how to interpret that

ripe sun
#

Me too, at first.
Here is my guess.
The player/object can travel on the spline, Point A and B are points on the spline, the player can teleport from spline end to spline start and vice versa. You want to find the shortest distance to get from point a to b.

gentle urchin
#

if the spline can be anything but circular you'd need to check both distances

#

like you did

ripe sun
#

The player can only be on the spline

#

yea

gentle urchin
#
if A > B 
distForward = GetDistanceAtPoint(A) - GetDistanceAtPoint(B)
distReverse = GetdistanceAtPoint(B) + (SplineLength - GetDistanceAtPoint(A)
else
distForward = GetDistanceAtPoint(B) - GetDistanceAtPoint(A)
distReverse = GetDistanceAtPoint(A) + (SplineLength - GetDistanceAtPoint(B)
#

I think this would be correct

#

assuming teleport from Start<->End

#

seems the A,B swap would do the trick afterall

thin owl
#

good evening all.

  • i have 2 character actors, one parent and one child.
  • for the parent actor, I gave him directional hits and it works wonderfully. Once I compiled my parent, i compiled my child as well.
  • i think im missing some information, but it doesn't appear that my child actor has inherited any of the new damage code that i gave the parent today.
  • i deleted the child from the map and threw him back in there.
  • i am using 'event point damage'

is damage an inheritable feature?

gentle urchin
#

yes

#

but are you calling parent function or just overriding it in the child ?

thin owl
gentle urchin
#

it inherits the code from the parent, as long as you dont override the events in the child

#

if you override the events, you'd need to also call the parent function. This would allow you to extend the parent code

#

otherwise, leaving child with nothing, simply inherits parent code

thin owl
#

hm. i will try making a new child and see if anything happens

gentle urchin
#

Parent :

  • Has Damage event functionality

Child1

  • Has no new code what so ever.
  • Correctly Inherits parent Damage functionality

Child2

  • Has the Damage event in the event graph, with the regular damage calc.
  • Replaces Parent functionality and puts in place it's own

Child3

  • Has the damage event in the event graph, with a call to parent node along with some custom VFX/SFX.
  • Extends Parent functionality
#

(assuming you're using the damage event. It's true for whatever event you're using ofcourse)

thin owl
#

i think the reason why my hit reactions arent working is that the tutorial im using is using both UE4 and UE5 animations. the child is using UE4 Manny and i dont think that my UE5 anims are compatible. im checking.

gentle urchin
#

that could definetly be an issue

#

but you'd solve that by allowing the child to override the hit reaction animations

#

so, make them variables 😄

thin owl
#

yep! it was the incompatible animations that were the problem!!!

#

I have a new question and its the last bug that i have, which is awesome.

in my child actor that is working really well right now.

  • when his HP = 0, he ragdolls, 4 seconds of time passes, then I am calling, 'destroy actor,' which works perfectly
  • the issue that i am having is that he is wearing armor. when his HP = 0, he enters into a dead state. Once dead, i give a 4s delay and then destroy actor.
    -- but for whatever reason, it will not delete my Spawn Actor class where my armor is stored.
    -- I did a test that when i set a bool of 'HP= 0, then destroy actor' it still wont destroy my Spawn Actor, which is silly.
gentle urchin
#

No code suggests how you handle destroying them

#

All actors got on destroyed delegate tho

#

So equipment could just bind to instigators on destroyed ?

#

Or owners*

#

Beginplay -> GetOwner()->BindToOnDestroyed

thin owl
#

I apologize, i was working out my next screenshot

gentle urchin
#

Also, avoid == on floats

#

Do <=

thin owl
#

ok i will try that

#

i think i found a clue. my sword will delete, but not my armor.

gentle urchin
#

Is code just for testing or what?

#

Seem strange to check for hp right after you spawn them

#

Also

#

Delay in loop doesnt work

#

Only the first delay will activate, and the last index being used to destroy

#

You want to delay -> foreachloop -> destroy

#

If you want to destroy an array of things

thin owl
gentle urchin
#

Id just let the equipment bind to owner really

#

It would just work™️ for players and AI

teal trench
#

Hi, I can't remember if it was always like this, but often (though not always), when I use CTRL+D (the shortcut for duplicating) in a blueprint that hasn't been compiled, it doesn't actually duplicate the selected nodes. Instead, I just see a kind of weird refresh effect which does nothing. Anyone know if it's normal or if there is a fix for it?

ripe sun
spark steppe
gentle urchin
#

yeah that works too

#

<= , ~= , >=, != (or !~=)

teal trench
rotund prism
teal trench
#

Yes, it works as intended right after compiling the Blueprint. However, after some time, when I use CTRL+D, it only triggers a weird refresh effect without duplicating the nodes. Other shortcuts still work normally during this time. I suspect it might have something to do with using two monitors (laptop + external monitor), but I'm not sure.

rotund prism
teal trench
#

It's quite random and happens on the same blueprint window,

#

I don't have plugin related to managing blueprint or anything close.

rotund prism
#

ctrl c then ctrl v works?

teal trench
#

Yes

rotund prism
#

uh then there could be a lot of reasons. why not use ctrl c ctrl v instead?

teal trench
#

Duplicate is just so much faster, but either way, it's only a minor annoyance at most.

pliant pecan
#

I'm running into a really, really, annoying problem with replication on the stock character and character movement components. I'm just trying to set the rotation of the skeletal mesh on the character (separately from the controller or pawn rotation), and it's just not working even though technically it should be. The rep notify for the rotation change is firing and the rotation change variable is correct (printed it out to debug) but the actual relative rotation setting function does not appear to want to work. It's not inheriting any rotation from parents, and it works on the host, just not the clients.

Any help would be appreciated. Even if it's just to say that this is a limitation with the character class, that's fine.

young meteor
#

Hey folks

I'm trying to handle some collision settings so that I actually get a hit when I do a "Box Trace By Channel".

I have a specific channel and set the collision setting to "Block". This works fine for a simply cube I place in the level.
However this is for instanced meshes. What do I need to do in order to make that work as well?

(I add all these instanced meshes via a Construction script)

rotund prism
#

change "collision enabled"? You've set "Collision enabled" to no collision

dark drum
young meteor
dark drum
young meteor
dark drum
young meteor
#

What am I looking for there?

spark steppe
#

nothing

#

because it has 0 collision primitives

#

but uses complex collision as simple (so mesh geometry is used as collision)

#

maybe not a safe bet for instanced meshes? 🤷

young meteor
#

Hmm. So find another way around it is what you are saying?

#

as in, static meshes

rotund prism
#

try setting collision complexity to something other than "Use complex collision as simple"?

spark steppe
#

if no one here knows it for sure, just try to add a simple collision (e.g. box collision) and set the collision settings back to default

#

if collision for the instances works you know what's up...

#

tho with that shape, i guess you want kinda precise collision with a hole in it, which is a pita with primitives since you need a lot of them

young meteor
spark steppe
#

yes, in the main menu of the mesh viewer (last screenshot) there's a option to add a box collision

young meteor
spark steppe
#

which you should then see (assuming simple collision is still checked in the view settings)

#

you'll most likely still have to change the collision setting in the details to default, and/or figure out a way how to toggle it for placement

young meteor
#

Feel like I have to specifically set that channel to Block. And therefore can't use "Default" Collision Presets?

dark drum
# young meteor But if I set it to default and my custom trace channel ("Track") is set to ignor...

The collision preset would be defined on the instance static mesh component not the static mesh. As a reminder, the static mesh and the component are different. The static mesh contains all the vert, normal, collision and material data. (To name a few) while the component is what takes that data and handles the rendering of it.

You can define default collision channel behaviour in the static mesh but that can be override by the component using it.

spark steppe
#

by default i mean the setting which currently is set to complex as simple

#

i don't have UE open right now, might be named different collision complexity or smth like that?! :>

spark steppe
#

no

#

it's somewhere in the details panel (same editor window)

dark drum
young meteor
#

Don't even see a collision setting unless I'm way off 😄

rotund prism
#

Collision/CollisionComplexity

spark steppe
#

yea, it's further down

#

in the collision subcategory

young meteor
#

ah

#

my bad

#

Should be good

spark steppe
#

no

#

it's still set to complex as simple

#

you want project default or simple and complex

young meteor
#

That worked after restarting Editor. Seems a bit buggy. Might just be me not understanding something.

#

Big thanks though. 🙏

lethal nymph
#

Hey there. Noob question: i have a actor blueprint called bp_weapon with a float named damage. I also have a gameplay ability called ga_melee. The GA should now access the damage variable from the weapon to set the gameplayeffect by caller. How can i access this variable in the GA? I thougt about blueprint Interfaces, but i always get knots in my brain by understanding how those interfaces work. Inputs, Outputs, Messages, Events, etc. How would a simple implementation of getting a variable from another actor look like? I watched lots of videos but i can't get through it :/

lunar sleet
lethal nymph
#

Thank you, where can i find this Video? I will also try it in the GAS Channel.

keen sun
#

hey I want to implement killing enemy which spawns souls like vfx that tracks player once it touches player it gives us some currency (e.g souls)

#

what's the approch and how does that VFX tracking work

wintry imp
#

Sorry I keep popping up here with the same issue - pretty sure this is my 3rd attempt to ask for help, but all my other sources have been just as lost as me on this. Everything I try feels like one step forward and two steps back.

I'm trying to create a function that will accurately transform world position to screen position without using the current player camera. Right now I've got as far as mostly understanding the Matrix translation, and the odd thing is it accurately tracks the Y but not the X position!

I've added a second widget using the default node just to test the accuracy, and that's working, so it's something about the way I calculate things.

https://blueprintue.com/blueprint/o6012t2y/

#

If I plug the "Viewport Size" value directly into the Screen Position, then it correctly places the "X" marker right in the bottom-right corner, which tells me the Viewport Size is accurately read ... the only thing I can think is there's something in the Matrix calculation that needs to change.

I know when I was doing this via trigonometry before, I had to calculate the X and Y separately because the FOV is Horizontal - not sure if that's a clue as to why it's not working? Maybe the Matrix only works directly for the vertical and I have to do something with aspect ratio to correct the X? But at this point I'll just be stabbing values in and crossing my fingers, I'd really appreciate if someone has an explanation!

faint pasture
#

IF the bools are meant to be exclusive they shouldn't be bools, should be an enum

dark drum
wintry imp
# dark drum Why can't you use the project world to screen node?

I have a larger project where I have a working "photography" system where I used the Project node to mark/score tagged items that you've photographed.

https://x.com/alanjack/status/1836772327981224197

The problem is I want the player to hold an actual camera, and for the picture to be taken and scored from THAT camera's perspective. Again, I have that camera mechanic working just fine but I can't project the location of what is photographed to the photo because the Project node always assumes you're using the player camera.

I can't emphasise how much it'll improve your life in #gameDev to structure things sensibly and use functions properly.

Was all braced for a total rewrite of my @UnrealEngine photography prototype but it really was a breeze to port the logic to the new Phone_BP object!

wintry imp
# dark drum Why can't you use the project world to screen node?

It looks like it's working in that link, but the projection isn't accurate because it's still coming from the player camera ... and once I switch to "selfie mode" it's completely broken

https://x.com/alanjack/status/1837076551952667098

Big thanks to @Yaowzaa for helping me find the flag on the mesh that solved my problem ... "selfie mode" engaged on my photography prototype!

That moment when a 1st year student helps a seasoned design teacher with their work - that's what it's all about, people!

gentle urchin
#

sorta looks like it doesnt really care about the camera but rather the viewport

wintry imp
# gentle urchin sorta looks like it doesnt really care about the camera but rather the viewport

Right, but it has to use a camera of some kind to derive the matrix from translating the location, otherwise it would have no frame of reference. I'm assuming since it takes a player reference it's pulling the camera from the player view.

I did go down the road of trying to hack it by switching the player view target but the only applicable node (set view target) assumes its okay to take at least one frame to switch over.

And yes, it would be easier to switch to C++ and extend the node but that's kinda why I'm in this channel and not the programming one, I'd rather figure out why this isn't working.

gentle urchin
#

no delays if transition time is set to 0

#

atleast, this is not the reason for the delay

#

viewport might not be updated utnill the next frame tho

#

GetViewPoint does seem to use some cached data if the PCM exist

#

you could try and change the tick group for the camera manager playercontroller

#

There's an internal "UpdateCamera" function that seem to update the cache

#

Actually, it's called from the PlayerController now that im looking at it

#
void APlayerController::UpdateCameraManager(float DeltaSeconds)
{
    if (PlayerCameraManager != NULL)
    {
        PlayerCameraManager->UpdateCamera(DeltaSeconds);
    }
}
versed sun
wintry imp
#

I had this working just fine with the straight player camera but unfortunately I need to project from a camera that the player is holding - specifically so the player can take "selfies" as part of the gameplay.

maiden wadi
#

Does the person sitting behind the screen always see through the lens of the camera?

wintry imp
flint glacier
#

Does anyone know how I could make a BP (a puzzle) destroy an invisible wall actor in the level when completed?

hushed orchid
#

Like from level blueprint, u can send these actors references and when needed, u can destroy via character or controller too .. btw, that wall actor is also bp actor right?

gentle urchin
#

GetActorWithTag - GameplayMessageRouter - Hard linked reference

#

many roads to rome

#

the hard linked reference might be the easiest, assuming the BP and wall is spawned at editor time

wintry imp
flint glacier
#

Thanks guys!

steep heart
#

How to create this dropdown menu with the editor utility widget?

inland jolt
narrow sentinel
#

Anyone know when it comes to a screen space widget thats sits in world how I can stop it resizing based on distance from it to player ??

#

at the moment it's resizing and I'm not wanting it to do so but I prefer the benifits of screen space where it's infront of everything when visiable

gentle urchin
#

you mean its not resizing , and you want it to

#

as per default its a fixed size screen space widget

narrow sentinel
#

it is resizing but I don't want it to

narrow sentinel
#

like it would be if it was in world space but obvs I prefer screens space as it's on top of everything doing that where as world space it wouldn't be

gentle urchin
#

Being screen space you want them to resize

#

So they become smaller the further away you go

narrow sentinel
#

apologise on that one

#

guessing I would have to implement logic to do that ??

empty marten
#

Hey peeps,
Yesterday I posted asking about how I can get the distance between the mouse cursor and a widget. Someone did try and help but sadly their method they showed me didn't work. I'm trying to get it so if the cursor is x distance or closer, it affects the opacity of the button in the widget. Is anyone able to help at all? It would be really appreciated.

summer bolt
#

Can someone give me a general concept to how to make a mesh crushed/flattened (like a big boulder rolled over them)

severe valley
#

how can change projectile speed in runtime and dynamic...?

narrow sentinel
violet bison
#

I'm doing a moving platform, how to make it move up after activatrion (from blueprint)? towards a direction for a certain duration, retriggering will refresh the duration and then slowly returns to the starting place?

hushed orchid
stone grove
#

i'm sorry for asking this but if i'm having some trouble with some Blueprint code where can I go to request help?

thin panther
#

Here

stone grove
#

i.. really should of read that first before panicking

#

I wanted to ask about THIS, I think it's blueprint related since it's the only code I have but the problem I'm havin here for my little project is that the enemies bar doesn't go down till, I assume, it reaches 100 and then begins to update

hushed orchid
#

can't you just start out the enemy health by 100 ? or using timers that whenever health reduces, timer starts to fill health ?

stone grove
#

It's health is set to 100 I believe, I'm unsure about timers as it's my first time hearing about those

#

I begun unreal last month for the first time ever

hushed orchid
stone grove
#

gotcha!
I kinda just did a bit of stupid maths mistake and I fixed it.. my division node had the wrong numbers

#

i had 150, not 100

dark drum
#

Does anyone know how to have a chooser table as a variable so that it can be set/updated per instance?

narrow sentinel
#

So I don't seem to have Primary Data Asset ??

#

I'm trying to do it so I have a data asset which has inside a struct for terminal log entrys that I can have for my terminals in game, Reason I want to use data asset as it'll be easier and better as then everything that needs them specific logs can use the same data asset however i can't seem to find it

#

nevermind found it

dark drum
gentle urchin
#

Wth!?

#

Interesting!

dark drum
#

I don't think you can do what I'm trying to do though. Whilst you can have a chooser table variable, you can't seem to 'evaluate' it. :/

gentle urchin
#

Not in bp only, atleast

#

Looks like custom node already

dark drum
trim matrix
#

Hello I am using a Widget Component and I notice a quality difference between the 'Screen' and 'World' space types. The issue is that I want to use it as 'World' space, but in the game, the widget appears blurry and not sharp. I've tried many solutions, but I haven't been able to fix it. How can I resolve this.

waxen fog
#

What is the best way to do billboarded grass for a top down game? should I just slap a bunch of widgets or does a material make more sense? I dont need it to fce camera all the time just a specific direction

gentle urchin
#

DataTableRowHandle

#

gonna need some c++ for that im affraid

#

Guess I'd look into the tablerow picker, which kinda does this already

#

how about just using gameplaytags?

#

as row names ?

#

while it doesnt directly go from your filter , you can have neat , searchable nested names

#

you'd need to filter the list before pushing the slate dropdown

#

deep dive into the engine is the way to go, I think

#

Nvm, that wasnt it

#

people prefer using existing stuff i.g , unless their in some corp, where engineers just make it for you if its valuable

#

wild guess lol

steady night
#

hm ive got a few animations where when i put on root motion the character can still run aroun while doing them :/ ?

#

anyone got any info on this

#

yeah i have

#

when i enable it it still abels the character to move while :/

#

yeah

#

well nah, i have 4x chars on 3 of them it works on the 4th one it dosent

#

sec il lshow u

#

oh wait fixed it..

#

i had wron physic asset on the char

#

classic

#

solved that also lol

#

your helping out alot today

kind estuary
#

As is, my inputs control Up and Down and left and Right. Though i want also the diagonals.
How do i set input to move in the diagonal. So basically when you press W+A it should move in this direction ↖️

#

W+D should move in this direction ↗️

#

S+D ↘️

#

A+S↙️

#

How do i do this the official way? I was thinking checking if key is down when input in the controller. Though maybe there is a better way?

lunar sleet
#

There’s no “official way”, but in 5.0+ we use enhanced input

fluid lagoon
#

Hello all! Im trying to make my screw driver rotate from 0 to 360 in the Pitch axis, essentially doing a full pitch rotation, however, when printing the value to make sure its working, it weirdly, in quarters goes from 0 to 90, then from 90 to 0, then 0 to -90 and vice versa, instead of just doing 0 to 360. I was wondering if anyone could maybe point me in the right direction in what Ive done wrong here :)

woven pond
#

If I pass a DamageType Variable in a widget blueprint by expose onspawn is it possible to switch on DamageType or select? (Trying to change color based on the damage type but cant use this as the wildcard) should i just add the color as a variable on the damage type?

spark steppe
#

rotators are prone to gimbal lock at some point

prime fulcrum
#

currently this code gives me a fifty/fifty on the actor being turned the right way any improvements to make it one percent? I just want the charater to teleport in front of and face toward the player

violet bison
spark steppe
#

also you are using their old location to calculate the rotation

prime fulcrum
prime fulcrum
spark steppe
#

however i'm not sure about the lookAtRotation part

prime fulcrum
prime fulcrum
night osprey
#

Can anyone help me understand what is an object reference is? This might sound simple, but it is a fairly deep quesiton, so please answer if you are experienced with programming. Coming from c++. I always thought OR(Object reference) as a pointer, pointing to chunk of memory on the heap. So I let say I have an OR, A and B pointing to the same memory space. If I call destoryActor(A), both A, and B should be invalid, but I found out that is not the case, anyone can explain how OR work. Been using them for years but never really think about it until now.

rotund prism
#

For a blueprint Actor's object reference, the cpp equivelent would be "AActor* foo"

spark steppe
#

Object "references" in BP are actually pointers

#

references however in BP have diamond shaped pins (instead of the round ones)

autumn parrot
#

Hey for some reason i cant find a target for my variable

#

its like its not compatible with my third person whenever i try to connect for some reason why is this happening?

mortal star
#

Question about timers. I have 5 pistons, 1st, has 0.2 delay, next has 0.4 delay and so on. They are not synced up the way once would expect at lower frame rates. How would you fix this

spark steppe
#

i would use one timer (with the shortest duration, and trigger all pistons from there)

mortal star
#

Gotcha, i'll give that a shot

autumn parrot
#

anyone know why my enemy is just standing there, he wont move

zealous moth
#

what was that camera swapping node again?

#

set view target with blend, ty @gentle urchin

civic osprey
#

I've got a GameMaker code pattern I'm trying to use in Blueprints :o essentially, I'm trying to make a simple state machine, but I'm not entirely sure how to go about it...

#

Basically, with this I can really quickly set up code to play when states transition, or during them, and when the states run during an object's Step/Tick event

#

just by defining 'State_Menu = new State(); State_Menu.update = function(){//code}'

#

but I feel a bit disoriented looking at Blueprints-- I'm not sure about the timing of different events, especially when I set my player object to take input from the Game Mode to move, and I don't know exactly when the movement is decided and executed upon... and I don't know how to set up something like the above, unless I do something like set up an entire component for each individual state??

#

A lot of things I do in Unreal just seem to work without me understanding the logic or timing behind them, so I have no idea where to put things

#

Do I make input events, and then check to see if the player's in the appropriate state to respond to those inputs in those events? Or do I run state code in Tick, detect input in each individual state, and respond there?

maiden wadi
#

I've never personally used WWise, but from the few things I looked up, they call PostEvent to play a specific sound. And you should pass Self as the Actor when you do.

maiden wadi
maiden wadi
civic osprey
# maiden wadi What are you trying to do exactly? What do you need the state machine for? How d...

Say that I have a character who can be in the following states: idle, walk, dash, casting, attacking, and attack recovery

If I want the player to do a different attack while dashing, or be able to cast right out of attack recovery but not during the attack, then I need to be able to change how the player object receives inputs in each of those states

Rather than just putting a switch node after each input node, and hoping concurrent inputs or events are executing in the right order so as to not break anything, I was thinking of simply executing a 'run state' function in the Tick event which handles all possible inputs for that state so I can have full control over what the player is doing

#

Obviously I would also need to change how the player moves for each state-- idle would be no movement, walking would be typical, dash would be in a single direction without the ability to change direction, etc

#

like, for a crude example:

StateWalk.update = function(){


if input_check_pressed("Dash")
{
  state_machine.swap(State_Dash);
}

}

And then the next step would play State_Dash's update function instead

maiden wadi
#

Sounds like you need GAS. Or similar. You don't need crazy switches. For example with your attack thing and casting thing. If you have a special attack while dashing, then you make two abilities. NormalAttack, DashAttack.

DashAttack has a tag requirement of Dashing.
NormalAttack has a blocker while dashing.

Casting(not sure if this is like spells?) Have a block tag for Attacking.
Casting may have a requirement tag for the Recovery state.

It just becomes a basic system where you pick which ability to use based on the input, based on the current tags applied.

civic osprey
#

that makes sense, but also like... just generally, a system like this is useful in a lot of ways, when it comes to organizing behavior, theoretically I could swap out the code and use it to organize the game's states, like whether it's currently in dialogue or in a menu, paused or in gameplay, etc

#

To be more specific, what I'm trying to do is specifically replicate the basics of the game in GM that I learned the language with, to try and figure out how to do the same things in Unreal and get a foothold on understanding it

maiden wadi
#

You don't really do that in Unreal with the game's states usually. If you're in a special menu like dialogues, or an options menu or something where you want no gameplay inputs, you put the game in UIOnly input mode. If the game is supposed to pause in the menu you put that there too. CommonUI makes this a lot easier with their activatable widget trees so that you don't have to write a bunch of complex stuff like this just to manage it.

As the classic example, if I'm playing an FPS/TPS game and I'm running around I want GameOnly inputs with permanent mouse capture so that I can look around without holding the mouse down and so the mouse is invisible. If I open an inventory widget, I want my mouse back and I probably don't want gameplay inputs. So you put it in UIOnly. But then say you pop up an Options menu which is also UIOnly. Lets now give two ways this can back out. Normally backing out would go back to the inventory. But lets say something happened and the chest you opened was destroyed, dismissing the inventory widget underneath the options menu. You back out of the options menu. Based on these factors you have two input modes to pick from when backing out of the options menu. GameOnly or UIOnly. And there's no decently sane way to pick that from the options menu itself.

CommonUI simply reads the frontmost activated widget to determine this. So if the primary widget on screen wants UIOnly, it'll be that. If all of the UIOnly widgets are removed, it'll default back to the one that wanted GameOnly. Etc etc.

And on top of this it makes it easy to manage trying to pause based on which menu you're in as well.

#

You probably could write a state machine to manage this for you if you wanted. And if your game is small enough to warrant it without learning Unreal's intended ways, then it might be worth it. I would recommend the... StateTree or StateGraph I think it's called? It's an engine plugin. It's literally just a component that can go on any actor and run a state tree. But if you plan on staying in Unreal for a significant amount of time with a fairly scalable project I would recommend trying out some of the engine's intended methods for these problems. They've generally arisen due to the growing complexity that usually cripples projects when they try to write a monolithic thing to manage everything.

civic osprey
#

Gotcha XB

#

It's just really odd going from a system where you have to be really specific or else things will not happen or break, to a system where so many things are just... taken care of for you, but it's not always clear to what extent

maiden wadi
#

Haha. Yeah. Learning Unreal is a task. And on top of that recent things have been put on top of that to simplify some of those things, but it adds to the learning. GAS and CommonUI are two of those things.

trim matrix
main lake
#

I want to build a game about collecting / trading / buying / selling collectible items (stamps, action figures, cards, etc...) and I would like to know if first it's possible to have a lot of 3D items on the shelves without hitting performance ?

And second is there a tool to do that as I expect the answer to be that it would hit performance alot to display all the items on the shelves, so is there a tool to handle mass amount of 3D models spawned in a closed environement (here it's a a store) ?

#

Something like this for example

hushed hinge
#

is the correct way to path a player character over a path to use navigation and manually set goals and add input to get to that point? or is there built in functionality for this
i tried using moveto and moveto ai but this doesnt seem to work for multiplayer dedicated server

Trying to do moba style movement

hushed orchid
#

hi, i am using scene capture component 2d to load an object from scene onto a image inside widget. This is for android, I wanted to like zoom with two fingers so that this image zooms and resets when taken back.. is it best to do in widget itself based on touch location and gesture, zoom the image accordingly or any other ways ? thanks for answers

dark drum
main lake
sick sky
dark drum
sick sky
#

You dynamically load/unload depending on player position and view

main lake
sick sky
#

And yeah ISMC are better than SMC

main lake
main lake
tight moon
#

Nanite maybe.

main lake
tight moon
#

Can prove quite useful with multiple static meshes to increase perfomances. Just have to enable it.

dark drum
# tight moon Nanite maybe.

Meh... Nanites usually results is lower frames so unless you actually have the poly count that warrants it, it's not always worth it. Plus nanite does have some limitations.

tight moon
#

Otherwise, even if you have a lot of meshes, you'll have to make sure they're low enough with the polycount. You don't need them to have 10k polys each.

dark drum
# main lake that's it ? 🤔 Even if there are alot of different static meshes ?

You can have multiple instance static mesh components, one for each mesh type and then add instances to them. If you have 300 items, you can have 300 ISMC's and when you need to add a specific mesh for one of them, you find the relevant component and add an instance.

The foliage tools does this by creating a sudo actor and then adds ISMC's for each foliage mesh you paint in the enviroment.

tight moon
#

In the meantime @dark drum your pointer highlight works well, although if I stop the laser while it was highlighting something, said something stays highlighted until the laser is casted elsewhere. Any idea how to fix that ?

dark drum
tight moon
#

So, considering this, you're talking about the lowest part of the code, and that's where it needs to check for object, right ?

tight moon
#

Funny how I understand stuff better when I have them under the nose.

fallen glade
#

I'm using a slider to debug some points on value changed. Does anyone know why the points are rendered only after I release the slider all at the same time?

#

It's not even printing this but prints all when the mouse is released, I'm confused

wild crater
#

are there ways to make blueprints require less mouse usage? For instance if you've just placed a node it'd be nice to just start typing and it automatically pulls a line out of that node and you start searching nodes that are compatible with that line.

sick sky
#

since it would update a lo

#

how do you get the value of the slider ?

kind willow
#

Is there a way to check if a timeline is paused or not?

sick sky
#

probably

#

get the timeline ref and search for that

kind willow
#

Nothing I can see here

sick sky
#

without the get what can you see ?

#

might be somthing like Is Paused, Is Playing

kind willow
sick sky
#

the more you use UE the more you known the usually used keywords

kind willow
#

I guess it's my fault for not assuming the obvious and expecting it to be named weirdly

sick sky
#

np

patent wasp
#

Is there a way to get the play time of your app from steam?

frosty heron
#

look through their api docs

#

you probably need to be signed in to even look at it

patent wasp
#

I am there isn't anything on getting that global time played that is displayed on the steam app

exotic mesa
#

I need help with the unreal engine serial comms plugin, I want to have multiple variables across unreal engine and my arduino, which UE changes and arduino does other things with (not that important).
How can I access these variables with UE and the arduino?

drowsy anvil
#

hello, how could I make a sphere slowly scale up? here's my code so far. also how to make the size exactly the size I want?

zealous fog
# main lake Tell me more 🙂

Have you tried just adding that many objects to a scene and see what happens? From there you can see if you need to do something about it

charred vale
#

how do i set this actor reference currently its null

zealous fog
main lake
main lake
gentle urchin
#

can have different coloring on the same mesh ofc

zealous fog
zealous fog
gentle urchin
#

your imagination is the limitation

zealous fog
#

size of the store/ number of items / height of the shelves so players cant see whats behind it

gentle urchin
#

if to much is visible at the same time you can separate it with more walls

#

if its just an E-store you dont need duplicaites of anything

main lake
gentle urchin
#

spacing makes it less noisy

#

you contact nasa

#

or some supercomputer company

gentle urchin
#

or that lol

#

turn based

#

no problem

zealous fog
#

Whatever the question, its possible, but it depends on the limitations youd be ok with sweeney_activate

main lake
# zealous fog text based

No, I want 16k assets for each element with hyper realistic models and textures, 96k hertz sound design, with all the animals in the world in the game, and you can do whatever you want and if it's not there you can script that directly in game 👀

#

And of course the server must run at 128 hertz

zealous fog
#

theyll get it done

main lake
zealous fog
#

10 mins tops

main lake
#

Like I need all of that in 6 days

#

wow 😱

zealous fog
#

theyre that good

gentle urchin
#

just dont ask about the price

#

just pay it

main lake
gentle urchin
#

I'd focus on making it work smallscale first

#

if this is "player stores" you'd need to have a solution for that first , with whatever that entails (customized shelf and store layout?)

main lake
#

yeah I don't like that game idea anymore

#

I need to find a new one

#

but I hate 99% of the games, any good ideas ?

gentle urchin
#

Plague mobile game , where the task is to create worst spreading disease ever known to mankind

drowsy anvil
obtuse mulch
#

is your timeline done right?

drowsy anvil
#

looks like this

obtuse mulch
#

goes from 0 to 1 scale

#

maybe something there that makes it invisible or 0 scale?

gentle urchin
#

yeah if timeline doesnt start but the other event executes, it goes invisible

#

e.g. last value from timeline

obtuse mulch
#

timeline is on begin play

gentle urchin
#

good point lol

#

still whats the other event here

obtuse mulch
#

idk you tell me

gentle urchin
#

@drowsy anvil must share this info

drowsy anvil
#

the other white line is disabled node, it doesn't do anything

gentle urchin
#

are you manipulating the timeline from elsewhere?

drowsy anvil
#

no, I just made it for this thing

gentle urchin
#

start/stop ?

#

Im positive if i make this in my dumpster project, it just works

#

engine version?

obtuse mulch
#

ofc it works it goes from 0 to 1

gentle urchin
#

component hierarchy ?

obtuse mulch
#

it cant be invisible unless you do hidden in game or change visibility

drowsy anvil
#

yeah I think it might of been just too small, but I did scale it up and zoom in and saw nothing, but it works now that I put the timeline to 0 to 10000

#

and pressed autoplay

obtuse mulch
#

lol so just too small

#

thats what she said

gentle urchin
#

can always be awkward with relative scales that way

young meteor
#

It seems I'm always using interpolations wrong. I never get a good smooth result.
Could someone explain it to me like I'm a complete beginner? (which I pretty much am)

I have made what is shown in the Screenshot.
The bottom function "UpdateDpsGauge" is called externally once every second.

I simply have a progress bar (DPS meter) I would like to go up and down smoothly depending on the values.

gentle urchin
#

this seems broken

obtuse mulch
#

you cant use interp with a delay

#

must go every tick

gentle urchin
#

the Oldfill logic also doesnt make to much sense

young meteor
#

Haha, so a lot is wrong is what you are saying. 😄

gentle urchin
#

"every .95 seconds, set OldFill to whatever the Percent input currently is "

#

so if DPSGaugeFill updated 8 times in that Delay period, your OldFill will just pick up the very last update value

young meteor
#

Cause I only call it once every second. So figured that should become the old value

gentle urchin
#

then it should ~ish work,

#

you left out that info 😛

young meteor
#

No I didn't 😄

gentle urchin
#

oh shit, i just didnt read it

young meteor
#

haha

gentle urchin
#

my bad

young meteor
#

No worries. But anyways. How SHOULD the Interp be used for it to work?

obtuse mulch
#

every

#

tick

#

bro

young meteor
#

It is?

gentle urchin
#

the lerping is on tick

obtuse mulch
#

the delay is in the way

gentle urchin
#

just the target lerp value is updated at intervals

#

(altho, one usually dont need to track old fill, as oldfill is really just current fill percent)

young meteor
#

But what could I input into "current" value then?

#

Felt like I had to store the value somehow

#

You mean you would just get the progress bar and get the fill percent directly from it like this?

gentle urchin
obtuse mulch
#

you need to add something to something

#

i think

#

not storing you just set them

young meteor
gentle urchin
#

No problem,

young meteor
#

And thank you Nibiz too, even though I didn't quite understand it. Appreciate the effort anyways. 🙂

obtuse mulch
#

i tried 😄

young meteor
#

Thank you. hehe.

plush rose
#

Is there any way to expose components categories to their owning actor is pure Blueprint? It's doable in C++ with the ExposeFunctionCategories meta specifier; but I'm not sure if it can be done in BP.

stone grove
#

I'm making a 2D platformer-styled game but when I die & respawn once, It won't do it for the next time my health reaches 0

tight moon
#

Welp, I tested a few things but it didn't work :/ I don't really know how to make my highlight stops when the pointer gets deactivated while on the highlighted mesh...

dreamy mountain
#

hey, im trying to make a sniper scope, but i cant figure out how to change the camera to the scope. i have the gun and the player in 2 different bps, i need to change from the players camera to the guns sight camera

#

any help would be rgeat

dim geyser
#

can some one help im trying to get rid of a text like a delete button on a keyboard but it will not work

broken wadi
# dim geyser

you are modifying typed letters then setting text value from final string so it doesn't change anything because set final string happens out of order

jolly oracle
#

Got myself ina pickle...I have a node that's crashing the editor because it's in a construction script. Any way to break as I can't open the asset in the editor?

broken wadi
#

so all of those incoming white lines go to set final string first, then you settext (text) using final string after

#

or have separate settext (text) nodes for the other events

dim geyser
barren relic
#

the first SS detects a platform and changes my character's collision so it can be stood on, the second changes collision again so the character falls through the platform. However, if I'm standing on one platform I can't jump up through another. Is there a way to change collision against a specific platform instead of all platforms with that collision type? I had another platform that would change its own collision but it required it to be overlapping by default which won't work for enemy placement and such.

glacial notch
#

I have a large skeletal mesh with per poly collision - It significantly reduces performance as expected, however I only need it to collide perfectly only with the player - is there a way to enable per poly collision only on triangles that are close to the player?

faint pasture
narrow sentinel
#

anyone at all implemented fps and having characters body rotate to match camera rotation like up and down ?

faint pasture
#

then it's trivial to use it in the anim BP for looking up and down

narrow sentinel
#

as I have a base locomotion this then gets addition of the camera offset thing and then i layer blend on the holding weapon anim when player is holding a weapon

faint pasture
#

Start with looking at GetBaseAimRotation

narrow sentinel
#

my issue at moment is I can't seem to get the right values

faint pasture
#

start there

narrow sentinel
#

this is single player

#

no network etc involded

#

i'll get you example of what I mean

#

so at the moment I'm doing this logic to rotate the spine upper bones so when player is holding a weapon it lines up with where their roughly shooting

#

and i was dividing at first by 4 as thats the amount of bones being modified, two spine, one neck and head

high iris
#

How do I make sure that my BPs are no longer using a [CoreRedirects] entry?

Use Refresh All Nodes and then remove the redirect?

sick sky
#
  • selected a folder and use "fix up redirectors"
#

oh wait

#

CoreRedirects is for c++ decalred types

narrow sentinel
#

So this is my issue, if I put the camera offset thing before layer blend 0 it gets messed up

sick sky
#

so to keep it good in BPs and remove CoreRedirects entries in .ini files you need to manually rebind after clearing OR use a special tool/command that allows to "resave" with change

narrow sentinel
#

if I put it after so add a pin the holding weapon gets screwed up

#

im struggling to where there seems to be now way to win

faint pasture
narrow sentinel
#

yeah seems hardly anyone replies in there so i was getting no where

faint pasture
#

I'm guessing your additive final cam blend should be the last thing

#

or one of the last, certainly after the layered blend per bone I think

#

are you sure WithAdditiveCam even works?

narrow sentinel
faint pasture
#

We don't even know what you're working with, show the whole anim bp

#

gotta know where all these cached poses are coming from

narrow sentinel
#

best way I can do it so it's still readable haha

faint pasture
#

Why not put the blend before you cache BaseLoco

#

then everywhere you're using BaseLoco you will use the additive version if the bool is set

narrow sentinel
#

So I would layer blend prior to cache base locomotion and then do my slot stuff after it ??

#

But wouldn't I end up with same issue where the aim offset would not match up right as the weapon equip is being done after the camera aim offset rather then the offset being done after the weapon equip anim is being fed in ?

#

I think maybe my issue is I'm blending in a anim when maybe I do that within base locomotion

high iris
faint pasture
#

I didn't design your animation system, you should just put it where it makes sense

#

If you put it at the end your cached poses are wrong for the blend

#

the blend should be between TheWholeAnimationSystem and TheWholeAnimationSystemWithCameraOffset

#

Whatever is your last node, just cache that, then blend between the cache and the cache with offset

#

or don't even cache

narrow sentinel
#

What about how I'm doing the weapon equip anim as at moment I'm blending in a upper half anim for the weapon equip would you say maybe I'd be better doing that with base loco ?

faint pasture
#

no clue

#

just think about your graph and what poses are being used for the offset

#

if the offset is based on the pose before the weapon, then it won't take anything about the weapon stuff into account

narrow sentinel
#

So I did some reworking, I've changed to using anims for the offset

#

Anim offset thing with 3 anims a centre and down and up

#

I'll have to tinker with it some more tommorow but just don't seem to be wanting to work

pale obsidian
#

How to enable view MS timings on each node?

gaunt stirrup
#

anyway to find/regenerate 'defaultengine.ini' if its deleted?

violet bison
#

how to get interp movement to move up a certain distance when triggering another event, but slowly falls down if not moved?

#

I tried this but it just stopped moving altogether

ionic quiver
#

I'm trying to sort something by two different methods at the same time. For example first numerically from A, and then numerically from B. So for example it would be 1-1, 1-2, 1-3, 2-1, 3-1, etc. Where the first number is from the first sort, then the second number is from the second sort. Can anyone point me in the right direction on how to implement the second sort within the first?

lunar sleet
#

C++ FArray::Sort probably

ionic quiver
#

Unfortunately I'm looking for blueprints. 😅

frosty heron
#

are you looking into writing your own sort function?
If you are , you can look at a few sorting methods on the internet. One of them called bubble sorts

#

otherwise just scour blueprint plugin that sort arrays of ints. From memory I think rama's victory plugin does that.

ionic quiver
#

I basically want to sort it by two sorting systems. Sorry. It was difficult to explain.

#

So lets say I sort something by value, then I also want to sort it by the rarity. So if multiple things have the same value, then it then sorts by rarity.

frosty heron
#

Sure, so you just want to make a function for each of the sort function

#

Sort By Value
Sort By Rarity

#

So plugin your array to Sort By value, then you can plug the result to sort by rarity

#

You can get into the basic of sorting from bubble sort. It's not the fastest but the easiest one to understand afaik.

ionic quiver
#

But if I plug the result of the first sort into the second, won't it just sort it by the scond?

frosty heron
#

not the original array

#

Isn't that what you want? Grab a collection of something. Sort it by value first then sort it by rarity?

ionic quiver
#

So yeah, so in my example I'd have 1 - Copper, 1 - Silver, 1 - Gold, 2-Copper, 3-Silver. Something like that.

#

Where it's still in numerical order from the first sort, but if there's matching those are sorted by rarity.

frosty heron
#

Yeah, that's easily doable

Grab your item list -> Sort by Value ->
Grab the result above and plug it to Sort by Rarity Function -> Profit

desert juniper
#

^ learned this nifty trick when manipulating excel tables

ionic quiver
#

If I put the entire completed sorted array in, it'll just re-order it by the rarity I thought. I'll definitely give it a try though.

frosty heron
#

original can be 1 , 2 ,1 , 1

#

Sort by value will be 1 , 1, 1, 2

#

Then sort by rarity will swap the 1s by rarirty for example

ionic quiver
#

Yup

#

Oh I guess I need to do a specific kind of sort that swaps and checks the value.

frosty heron
#

From 1 Silver, 1 Gold, 1 Copper, 2 Copper
to
1 Gold, 1 Silver, 1 Copper, 2 Copper
depending on your rule.

#

yes, you will have to define the condition / rule.
If you just follow through with a sorting algorithm, it will be much easier to understand.

ionic quiver
#

Yeah, definitely. But I understood the basis for it. Makes sense. Thanks for explaining it. 🙂

small moat
#

anybody knows if there's a way from bp to get the current editor viewport size in pixels? regular Get Viewport Size always returns 1,1 in editor

mental trellis
#

I doubt it.

small moat
#

damn

#

I'm in a scriptable tool, trying to compare the distance between the spot somebody last clicked on vs where the mouse currently is in screen space but if I just compare pixel distances it won't be consistent across screen resolutions

mental trellis
#

The editor viewport is always in pixels. No matter the resolution. Unless you have your dpi scaled. DPI scale is the enemy!

#

Though I get what you're saying now. You want some kind of fractional difference or something?

pale obsidian
#

Cant find the tutorial again, but where & how can I set blueprint nodes to show the compute time MS above each node in the top corner?

pale obsidian
#

Thats not above each blueprint node, is it

dark drum
#

And damn, i've never seen my game thread around 4-5ms lol. normally around 8 haha.

pale obsidian
#

Where each individual node is notated with its compute time MS with a floating number above it in the corner.

dark drum
pale obsidian
#

There is, but I cannot remember exactly where it is contained. Maybe anim bp related. Scoured all my saved tutorials and cant find it.

#

If you dont know, feel free to not @ me

dark drum
kind estuary
#

i cant understand how this could be done

dark drum
tight moon
#

Still stuck with my highlight issue, I'm not sure how I'm supposed to check on the actors :/

iron idol
#

I'm having a really weird issue that I am now realizing is weirder than I originally had thought. I have a system in my game where a random party member is given a random item. The way the item is decided is via random int in range. A few RIIR hooked up to switch on int.

Now the system for the most part works fine. a random unit is given an item, I have something in the game that confirms which party unit recieved the item and when I look that is indeed the unit that recieved an item. BUT, the very first time this happens it also gives one of my party members (the same party member every time) an item (the same item every time). This only happens once. It will never repeat.

So at first I think, "oh well, I probably just have something hooked up weird somewhere, no big deal" Except, i just rebuilt the exact same system that is comepletely independent and does not run any code other than what I just wrote with BP. and the same bug occurs.

This is absolutely blowing my mind and i'm curious to know if anyone else has run into this problem?

hardy quartz
#

where to find the player controller property?

dark drum
iron idol
#

i can show, but its not the same approach for both

#

which is why i didnt bother

#

i actually do believe it is related to the random int in range or some other issue related to it and my reasoning for believing this is that the item is the very first option for one of the catagories but i'm open to help for sure so i will grab some code in a sec here

#

this is basically the code

#

the item in question is on the 0

#

the unit chosen is set here

#

but the approach is slightly different for both widgets i'm pulling from

dark drum
# iron idol

Try something like this. You have a lot of repeative branches that pretty much do the same thing. Create a variable to define the available weapons that can be randomally given and then use the random node that will randomally return one from the array. You'd probally be able to remove you're entire switch on int node. If this doesn't fix it, it'll probally make it easier to spot the issue.

iron idol
#

yea the way i'm doing it for now is not ideal for sure

#

and i fully plan on refactoring. I've already begun refactoring a lot of my code

#

the approach you are suggesting didnt work for me, probably due to how i set things up, but i did try your approach

#

but regardless this problem shouldnt be happening and i would jus tlike to know why it is

#

its firing correctly. so for example it will say "rogue recieved an item" and when i check rogue did indeed recieve an item. but every single time, the very first time i recieve an item, the priest will ALWAYS recieve the item i show in the screen

#

even if i put prints in between that item

dark drum
iron idol
#

there will be no prints

#

understandable which is why i didnt want to bother showing it at first

#

but i have very good reason to believe its not the code itself but the way its firing

#

as i've written this code twice and it plays out exactly the same with both code. the only code that is repeated in both these widgets is what I showed

#

i've had this problem for weeks and have walked through it multiple times with multiple debug approaches and the result is the same

dark drum
iron idol
#

so store the itme after its chosen at random?

#

this might work, i'll give it a try

dark drum
iron idol
#

oh interesting

#

this is an approach i would not have considered due to it not firing the prints

#

but i'll give that a try

#

thanks

hardy quartz
#

@dark drum hi, how you doin?

dark drum
hardy quartz
#

I did create a player controller but it had some problems so I deleted it later

iron idol
iron idol
#

the code is huge so its kinda hard to show

#

i'l try to line it up in one line

#

again sorry for not cleaning my room haha

#

that is the complete line from the item being set to the very end

#

again it runs fine. a random character is given a random item

#

but also another character that is the same one to get it every time, recieves an the item that runs straight through on the zeros

#

if i put a print on that line

#

i get nothing

dark drum
iron idol
#

the variable that is slotted is the same variable thats set

#

but i will try it

dark drum
iron idol
# dark drum That's fine, just print it.

yea, still happening. when i put a print in front of the item given (like say i just put a simple "hello" inbetween the code where this random item is given every time, it will not fire. its as if a ghost is just giving this unit the item. as far as prints are concerned its simply not happening.

#

at first i assumed it was some seperate code that was doing it

#

which is why i made a seperate instance independent of all other code

#

i mean its not the end of the world, its not like a game breaking bug and for some super bizare reason it only happens the very first time a unit is given an item and never happens again. I could probably even just "remove" the item from the game and just write something that says "if unit gets this item, delete the item". I'm just genuinly curious because I've never seen a problem like this before.

dark drum
iron idol
#

oh i got you

#

i'll give that a try too

#

i would still think if i put a print in front of the item it would still fire

#

even if it was running like two numbers at once

dark drum
iron idol
#

the first one is to decide which item type to receive which i set to red for print to distinguish. then i have 4 different item types all with a blue print

#

the very first time it runs and ONLY the first time it runs

#

all i get is the first in red which is 0 every time. This is odd because it still goes through the full thing and gives me a random item. But its not firing the other prints. then every other time after the first, it will print two numbers as intended and both are random

#

so it is something with the random numbers. or seemingly. and the prints sort of reflect this. but the other prints are not firing despite the fact that they should because the code clearly ran. and it NEVER happens again.

dark drum
iron idol
#

yea

#

i mean i would take a vid but my game is super alpha and have not been keen to show video yet

#

so much of my widgets and visuals are jank and place holder

#

lemme reset to a fresh save then i'll show some screens

iron idol
#

now its just printing normal but still getting the bug

#

now this last time i didnt get the bug

dark drum
iron idol
#

i have no clue whats going on. could this be something like firing too fast?

#

i keep getting random results

#

so i dont know what to send

#

i was actually considering sending a video in private message

#

but then the bug didnt happen...

dark drum
iron idol
#

yea i'm literally getting random results so i dont know what to send

#

sometimes it gives me 1 number

#

sometimes it gives me both

#

and the last two times i've checked the bug has not happened.

#

but i did do something in order to prove it in the video, and i wonder if that step is what is causing the bug to not happen

dark drum
#

For context, it's been 40 minutes and I've still not seen a single print string. 🤷‍♂️

iron idol
#

i'm sorry bud haha

#

fair

#

very fair

#

i dont mean to be a dick, i just dont want to look like a dumbass

#

i wouldnt blame you if you just said f this guy

#

i'll give you prints

#

it seems to be just working like every time now

#

i've had this happen before where the problem randomly went away for a few days then seemingly came back for no reason

dark drum
iron idol
#

well i was scrambling to get you prints fast so i dont know 😂

#

thats why i was taking a while. i started getting different results randomly and wanted to make sure i was thorough

dark drum
#

But either way, it looks like the random int in range is working fine.

iron idol
#

i swear on everything that after i changed it, the very first two times i tested it it ONLY printed a red 0

#

why that stopped i dont know

wild crater
#

so I have these text variables in data assets and they're not being picked up by the localization dashboard. Even though they're clearly marked for localization and have a key assigned to them. I tried make the data assets refer to a string table but the problem persists... Anything I'm missing here?

pine hatch
#

Hi .. i got a problem with my game logic that i cant figure out.. so i have two modes in my game, a freeroam and an on rail state. On freeroam the player would be able to go around freely with wasd and mouse. On rail mode i got a spline that the first player BP got attached to and goes aront till any of the key got pressed it goes back to freeroam. the on rail logic works fine

as seen on the picture. i also got a widget where the player can select the rail butto this is the event on is

The problem is on the third picture where i got the any key event if it got triggered i check if the previous gamemode was the on rail and if so it set it back to freeroam, unhide the crossair widget set the actor location to the player start location set the input mode to game only and stop the timeline.. it runs down, but when the player got back to the player start position , it doesnt move anymore.. the mouse look fine just the movement imput gets ignored somehow.. i set the debug view on and the EnhancedInputAction IA_Move gets triggered, but the character itself doesnt move.. I wonder if anybody here have any suggestion what could be the problem ??

narrow sentinel
#

Anyone know how I get rid off this cause it's super annoying

tight moon
#

Well I don't have much choice atm
Thanks to pattym I have this system to highlight an object with a laser pointer (the first branch is connected to a line trace channel return value node).
The problem now is that if I stop my pointer while highlighting an object, said object will stay highlighted until the laser gets activated and pointed elsewhere. I can only presume that bottom line is the one that needs a bit more to work, but I don't really know what to do to make it work.

dark drum
tight moon
#

That'd be this.

dark drum
tight moon
#

The logic above is located in the Activate Laser node.

dark drum
tight moon
#

Welp that was it. Thanks a lot 👍

narrow sentinel
#

Anyone know how to better this logic to have the arm not be screwed up like it is ?

narrow sentinel
#

Out of interest how do people do stuff like buttons etc? Do you make a designer choice if it should be actuslly button interacted with

#

visually or just one that does it stuff but visuall player doesn't do any animation to tit

#

it

open moth
#

What Im trying to do here is to add a new mapping context to player when they active this ability (Input for Confirm/Cancel Target actor part of Gameplay Ability System). But it only works on Host like when I hosting and press the ablitity I can point where I want to put down the turret and press left mouse to confirm it. But on the client side it doesnt work the ability do get triggered but the input doesnt get registered (Confirm/Cancel target actor). I checked the debug note and it show 2 differents controller and enhanced input local subsystem. One for server and 1 for Client. What can the bug be that Client cant confirm the target actor does anyone know?

Thank you for your help!

fierce valley
#

Hey, I'm trying to get UI showing an object location when it's off screen in first person view using the "Project World to Screen" node, but as soon as the object is slightly behind the player, it stops working, is there a way for me to circumvent that?

fierce valley
#

I generally get the positions properly on screen as long as it's in front of the player, but as soon as it's behind it, the values turn to (0, 0)

#

When I turn the player so the object gets closer and closer to the side, the values get really high

#

Turning towards infinity

dark drum
fierce valley
#

There's not really much to show

#

It's just this

pine hatch
#

Hi i am using anykey event to trigger an event, how can i make an exclusion for example to this if any key got pressed, but if i press tab bring up a widget instead of doing what the other heys doing?

fierce valley
#

And then this

rotund prism
narrow sentinel
rotund prism
#

does it only appear when you hover over it

pale mica
#

Guys, you know the google maps marker scales as you zoom. I'm trying to maintain my billboard component a constant size while zooming in and out.

#

How can I achieve that using blueprint? thx

rotund prism
pale mica
#

I tried doing that, but it didn’t work. Can you send a screenshot of your blueprint?

rotund prism
#

The idea is billboardsize/distance=constant

#

I didn't implement it in blueprints

maiden wadi
#

WidgetComponent, in screen space

rotund prism
pale mica
#

I'm still stuck on this, I want to achieve it using blueprint, it should be possible.

viscid pike
#

There's 4 or 5 drop downs and check boxes that have to be filled out

pine hatch
dark drum
inland jolt
ebon olive
#
Blueprint Runtime Error: "Accessed None trying to read property LockOn". Node:  Start Lockon Graph:```

just wondering, this is a common error yes? what should i do with this?
lunar sleet
#

It means that LockOn property is null at the time your code runs

#

So whatever ref owns it you probably didn’t set right

ebon olive
steady night
#

Hey m trying to set - 75(Y) to the target relative location

#

since theyre multiple wity different roattions

#

how would i redove 75 in the world location based on the rotation :/?

trim matrix
#

Hello, I have a question. I have a structure of an item that contains a data asset and the reference to the index where it is stored in the hotbar. What I want to do is that each item saves its reference to load and unload the hotbar every time I change the item. The reference to the index of the hotbar returns to its default value (-1). Since I am modifying it with "set members in..." what am I missing or am I doing wrong? I need the references to the index to be saved in the items until I want to unload them by removing them from the inventory.

narrow sentinel
#

So bit confused on this one as I would think this code would be setting the camera rotation to 0,0,0 however it doesn't seem to do that when the set relative rotation is being fired

#

what I wanted was the camera locks to the head bone of the player character forcing them to look where the animated head movement is

#

obvs other times they can look around freely but don't seem to be working like that and I'm bit confused

#

so i've found online unticking Use Pawn Control Rotation works to have camera lock to movement of the bone it's attached to, however is there a smoother way to being that in cause at minute it seems very kery movement to get into the position and then back out ?

trim matrix
#

hey im trying to make it so i can set a flag to true in a levels blueprint to change from the normal character blueprint to this other one i made that is meant to be like super monkey ball, i have tried this but when i do it the player has no movement

#

wow the screenshots didnt send

bitter tapir
#

I noticed that there is a (new?) Line Set Component in 5.5. Did anyone figure out how to use it? I'm adding lines to it but don't see anything on the screen.

trim matrix
# trim matrix

i got it to spawn, and then thats it i have no control and my life and coin counters are broken

lunar sleet
#

That means get player character is returning None

trim matrix
#

how do i fix that?

maiden wadi
#

Not directly. Make a new event. Call that from FireWeapon. Call that from where ever else you want.

faint pasture
#

If someone wanted pawns to be 100% agnostic as to if driven by a player or AIController, for example

maiden wadi
#

You don't really emulate AI like that though. Take an RTS for example. An AI doesn't have a cursor, doesn't aim abilities by moving a targeting indicator around around or click. It picks stuff based on target data very differently than a human.

faint pasture
maiden wadi
#

IMO this is an issue that GAS like ability systems solve and in a much better way than bothering to emulate controls.

#

Rather than trying to emulate a button press, you just run an ability based on it's class or tag.

sweet silo
#

hi i'm trying to ref a button to get the on click and to acess it from another widget

#

but i can't get it ... any idea ? thanks !

#

i can't find the event here

civic badge
#

So I am a bit at my wits end here
essentially I have these custom buttons I make that work once I fix them, then closing unreal and reopening, they suddenly do not work
I tried deleting intermediate, build, saved, etc... and doing it fresh to no avail
I also recreated the button widgets from scratch entirely, then I end up getting ref errors
Anybody have a potential solution?
It is replicateable

night osprey
#

hey, is there a way to change Timer inside of Timer's function?

#

Time, is the delay between each funtion(BoxTimer) call, basically I want change the delay(Time) in the BoxTimer function.

civic badge
#

You want to set the time left after it has already been executed and not finished?

night osprey
#

nah, I just want to control the Time (delay), inside the function

civic badge
#

I am not sure what you mean, it's already exposed for you there

#

you can promote it to a param and set that if you want to change it, or just call it in different ways

#

or make a wrapper function

night osprey
#

I want to change it while it is running

night osprey
civic badge
#

With what I mentioned and these various functions you can call on the return, you should be set to do what you want

civic badge
night osprey
#

Sigh....

maiden wadi
pallid oxide
#

Working on improving my footstep nodes handled in the characterBP, this is for first person so I'm not bothering with Animation Notifies, the logic for the bottom portion (checking if velocity is > 0 and stepped recently) seems sound to me but it always returns a false on that branch, The goal is to play a footstep sound after the player stops moving to simulate coming to a stop, am I over thinking this?

#

really the whole delay nodes idea is bad for when I re-add sprinting and slow walking but i'll cross that bridge when I get there

desert juniper
#

you can export and view them in excel

#

or google sheets. they export as a csv

#

got you. yeah building something yourself is probably the best option. a blueprint editor widget may be a good option

#

that may be something that a custom editor is a good use for.
but no, i don't think unreal comes with that functionality off the bat

pastel apex
#

is there a way to have a homing projectile follow the target up until a certain radius where it will stop moving?

I imagine one way would be to remove the homing target and set the projectile speed to 0 but was wondering any alternative and probably simpler way if any.

spark steppe
#

1.) can be worked around with some C++
2.) also C++
3.) also C++ with SQLite
4.) yea, also not a big fan of DA for everything
5.) never had the issue, so not sure what to do :>

#

but good tools help you keep your sanity and to be productive

#

and the gameplay tag to row name is kind of specific

#

even tho, i know that a lot of people do that

#

but how do you determine which tag to use in a struct with several GameplayTags?

#

they could add an additional flag like use as row name for anything that can be converted to string

#

go make it, make a PR, make people happy

#

maybe it's easier to make a more generic DT asset, which allows for different types as row name/key

pastel echo
#

Hello, I have an issue that's explained and answered here:

https://forums.unrealengine.com/t/sync-markers-issue/670140

But I don't understand Animation Blueprints. I'm using the Lyra project, so I'd like to know what specific action I need to take to arrive that this solution. I don't think I feel comfortable changing the lengths of the animations, so what does this person mean by "limit the time you can change the sequence to the shortest one"?

Epic Developer Community Forums

Hi, so I’m having this weird bug with the sync markers. 99% of the time it works perfectly fine, but after a few minutes the whole game freezes for a few seconds and then it resumes and then it doesn’t happen again until I restart. It’s hard to replicate the glitch, as it seems to happen at random, but every time I get this in the output log: L...

#

I'm thinking if I just set the sequence to loop that'll solve the breakpoint in the shipping build.

small moat
#

I guess normalized might be the word?

lunar sleet
#

The event will fire when the button is clicked. You can’t just pretend it was clicked by calling it directly

sweet silo
#

but maybe i don't need that list.. Hmmm

lunar sleet
#

That doesn’t explain why you’re trying to call the button’s onClicked event

#

Regardless, #umg can prly help further

sweet silo
#

thanks a lot 🙂 i'll see there 🙂

gentle urchin
#

You can ease the duo typing by using a dt row callback in c++, thats how i maintain it

#

Super easy to make

#

That and a bpfl with a function you specify to your DT, and call something like GetDTRowFromTag

#

GetItemInfoFromTag

mental trellis
gentle urchin
#

my setup got a tag as a column, so whenever a row changes, It just checks for a valid tag and updates the row name if it doesnt match

#
void FSocketInfo::OnDataTableChanged(const UDataTable* InDataTable, const FName InRowName)
{
    FSocketInfo* SocketRow = InDataTable->FindRow<FSocketInfo>(InRowName, "");
    // If our row name and tag dont match
    if (InRowName.ToString() != SocketRow->SocketID.ToString() && SocketRow->SocketID.IsValid())
    {
        // if our tag is valid, change the row name to match our tag
        UDataTable* DT = const_cast<UDataTable*>(InDataTable);
        FDataTableEditorUtils::RenameRow(DT,InRowName,SocketRow->SocketID.GetTagName());
    }
    Super::OnDataTableChanged(InDataTable, InRowName);
}
mild jacinth
#

is there any documentation about animbp property access

main lake
#

Anyone know a voxel plugin that support non-full block like stairs, slabs, etc... ? Like i wanted to use the Voxel Plugin but it doesn't support those kind of blocks 😬

rotund prism
main lake
rotund prism
#

lemme draw a picture

main lake
rotund prism
main lake
# rotund prism yes

How would you solve the breaking and the placing of blocks by the player ?

rotund prism
#

Remove 2x2x2?

#

Are you trying to make something like minecraft?

#

how precise does your terrain sculpting need to be

main lake
rotund prism
#

So every block has different properties?

main lake
rotund prism
#

I'm taking a look at the documentation

main lake
#

Does it apply all the optimization stuff to those special blocks too ?

rotund prism
#

Not sure, maybe you can ask in their discord or something.

main lake
#

I think their discord isn't in the description

rotund prism
main lake
dreamy mountain
#

hey, my camera when i aim only looks left and right, but not up and down. any idea how to fix it only going left and right?

#

the camera for the sniper has the same settings as the main player bp afaik

rotund prism
#

Can you show your code/blueprint?

cursive sequoia
#

Hello everyone

#

I have a tiny bit of a problem

#

I'm trying to setup a "jump" that increase the distance depending of the player velocity (like in titanfall 2)

#

But it's very random so far, sometime it will increase my jump distance and sometime not

#

i'm very confused to what i should do

#

Every tiny bit of help would be very much appreciated, thank you in advance ^^

#

isnt it normal to not see it ? Since you are in your character BP but it didnt spawn yet

#

even in runtime

#

It spawned but it won't show in your BP

#

are you sure it's attached to the player tho ?

#

Like it spawns on the player character but idk if it's attached

rotund prism
rotund prism
#

yes

cursive sequoia
#

i'll test it out 🙂 thx

rotund prism
#

You sure "Get player character" is returning the correct character?

cursive sequoia
#

have u tried to set it as parent

rotund prism
#

Does casting to thirdpersoncharacter work? If it doesn't, I have a theory.

#

Did you setup input correctly in your class settings or whatever it's called.

#

Wait so you solved your original problem, or your original problem didn't exist.

#

Please elaborate on visual it's position exactly

#

editor or character hierarchy

#

You have hidden it? as noted by the eye on the left of "PointLightComponent_0"

cursive sequoia
narrow sentinel
#

not sure if anyone has worked with IK stuff and knows what might help me in the animation channel

leaden grove
#

Hi! I am new to UE, I am following this tutorial (https://www.youtube.com/watch?v=ZrM_CfOy1sU&list=PLFYGCCDpMHmHJwhIRY6qNumAts--W8bTy&index=4&ab_channel=TheGameDevChannel) minute 21:36, but trying to make it all for Mobile instead! I am although having an issue I am not being able to solve, in the video, they use a ConvertMouseLocationToWorldSpace to keep track of where the object is when grabbing it (I believe). I am struggling on how to do this with touch controls. My attempt is on the screenshot, any suggestions? Thank you.

In this video I show you how to place objects in the world at run time using the mouse cursor and a ray trace into the game world. Sorry this one ran a little long, there was a lot to explain and get through!

00:00 - Building Test Asset
02:00 - Setting Line Trace and Collision
05:00 - Ploppable component
11:00 - Character Controller Updates
21:...

▶ Play video
pine hatch
#

Hi i have a problem in my game.. i got a widget attached in to a dest in world space ..(so not on the players viewport).. i want the ui to react if the player looks on it.. for example if the player look at the dest theres two button apear abowe it, so the player could clikck both of it.. My question is how could i achieve such thing.. so far i have a line trace from my firstPersonBP, i ask for the component if has widget tag, i cast to the widget and set the visibility, it works fine so the two button apears if i look at it, but i dont konow how could i make the buttons clickable ? how could i separate which button the player look at?

sick sky
#

this acts like a interactable widget in world

pine hatch
sick sky
#

if you spawn the actor and attach it on server, and the actor is replicated, it will be the sme on clients

sick sky
#

maybe try differed actor spawning

#

or use the SetReplicated function

cursive sequoia
#

Hello everyone,

I'm wondering if theirs a way to keep the velocity i gain on the wall while jumping out of it

#

Right now it does what it looks like in situation 1

#

and i'd like to have the situation 2

#

This is because i use Add Impulse, which only sends an impulse but then comes back to the original velocity

#

Anyone know any fix to that or any node that could help me ? thx in advance ^^ much love

left trench
#

Hello All - I am relatively new here. I have been on the serve lurking; but never really contributing.

I was wondering if anyone may have a hint on how I can make a BP (or animBlueprint) that will allow me to save a static mesh for every frame of an animated character. I know I can do this manually; but I am hoping to author something to help automate the process. I have tried a number of option; even setting something up in Sequencer in hope of getting the pose from there. Sadly, my blueprint skills are still in the early stages of growing.

Any hints would be deeply appreciated.

maiden wadi
cursive sequoia
#

i put it to zero

#

and clamp some values

trim matrix
#

is there a way to add a post process volume inside a blueprint and make it bounded? whenever i try and make sure unbounded isnt checked nothing changes

fiery moon
left trench
#

Thank you so much. I truly appreciate the insight and taking the time to reply.

narrow sentinel
#

is there a way to have this socket remain on that side of the lever even when the lever is in down position?

#

at the momet the socket ends op other side of the thing so

astral wyvern
#

I have an input that the player holds when they're under a certain condition, if that condition changes I want it to cancel. How would I handle that?

#

So imagine you have a gun you're charging, but you change weapons or get hit mid charge, it should cancel that action.

dreamy mountain
#

have a boolean which says like ischarging, and add that condition to whatever, so say someone attacks you, on the attack, run a check for is charging, and if true, cancel it

trim matrix
#

hey, im trying to make the switch blueprint i made, (even tho i want it to be customizeable) trying to make it control other actors when pressed, doing it like this works once, it opens the door and when the delay is over the door closes and the switch pops up again. but when i hit the trigger again the door dosnt respond anymore

faint pasture
#

that reference node being used after a bunch of latent actions is super sus

faint pasture
#

It can be this simple, give each switch a ref to a thing it controls

#

you want generic switches right?

#

same switch can tell many different things to do something?

trim matrix
#

yea

faint pasture
#

ok there's a few ways to do it.
This is a textbook example of where an interface can work

#

or, you can make a component. I'd make a component

trim matrix
#

i was confused on which direction to go w it

faint pasture
#

I'd do a component since you want a little bit of state (reset time, should auto reset, etc)

kind willow
#

I'm trying to get an actor to "jump", but if I try to interpolate the movement, it just stands still. It works perfectly fine if I teleport right away, but adding the interpolate just causes it to stand still

trim matrix
#

mainly the thing ig im trying to recreate is the cap switches from mario 64 while also giving them the ability of the ! and P switches in more recent mario games

#

but i want them to be able to be able to be used w many of the level objects ive made in other blueprints

faint pasture
#

@trim matrixYou familiar with dispatchers?

#

How many different things will need to be triggered by switches?

trim matrix
#

rn im mainly working on mechanics and this switch is just one ive been trying to figure out

#

like for example i have a blueprint thats a rotating platform, id wanna maybe place a switch to activate the spinning or deactivate the spinning etc

faint pasture
#

OK a simple method might be like this:

Switch:
MySwitchableComponentRef

BeginPlay -> bind event to MySwitchableComponentRef.StateChangedDispatcher
Event Triggered -> call SetNewState on MySwitchableComponentRef passing over a bool

SwitchableComponent:

SetNewState -> logic -> fire StateChangedDispatcher with a bool representing state

Any Actor
MySwitchableComponent

OnStateChanged -> do whatever in response to state changing and current bool

#

THere's a million ways to do it but the point is that you just make a component that contains the state (a bool or whatever), and the logic to do resetting etc, and use a dispatcher so the owning actor and the relevent switch can do stuff in reponse to the state changing

trim matrix
#

so im gna sound stupid, but im confused on the myswitchablecomponent

real tree
#

quick question, so I'm trying to get the total size of the world and then move this blueprint actor to the center of that location, but this doesn't seem right.

#

Is there anything I need to do to fix this?

mild jacinth
#

what can be other causes other than root lock when it comes to character snapping back to its initial position after animation has finished playing

faint pasture
#

then you can put it on any actor you want to be controlled by a switch, and be able to implement OnStateChanged

#

just like how you can implement OnHit for components

real tree
# trim matrix oh wow i love this theme

I'm using this, although I had to do some tweaks because it was missing some files.
https://forums.unrealengine.com/t/tokyo-night-editor-theme-for-unreal-engine-5/737151

trim matrix
#

so in the switch blueprint?

faint pasture
#

the switch only directly talks to the switchablecomponent

#

which talks to its owning actor (can be anything)

trim matrix
#

so make a new blueprint for switchablecomponent?

faint pasture
#

yes

#

it needs to be an actorcomponent base

#

not an actor

#

not a scene component

#

I'd back up though, do you want to have interaction in your game? Like press E to do thing?

trim matrix
#

yea its press e to open a door

faint pasture
trim matrix
#

?

faint pasture
#

Character:
Press E -> get overlapping actors or whatever -> if one has an InteractionComponent, call event on it

#

Same idea with the dispatcher and stuff but without the switch

trim matrix
#

put that in the character blueprint?

faint pasture
# trim matrix

Make an InteractionComponent just like this, then add a custom event called Interact and an event dispatcher called OnInteract

trim matrix
faint pasture
# trim matrix

ok now have Interact trigger the dispatcher when its called

#

just drag the dispatcher into the graph

trim matrix
faint pasture
#

something you'd press E to interact with

trim matrix
faint pasture
# trim matrix

Select the component and in the details all the way to the bottom is there a red button for the dispatcher?

trim matrix
faint pasture
#

OK we need to look at the dispatcher details in the component BP

trim matrix
faint pasture
#

One sec, doing it on my end. I've only done this in C++ never in BP yet but I'm poking around.

#

Works for me, did you compile?

trim matrix
#

im confused

faint pasture
#

compile the component bp

trim matrix
faint pasture
# trim matrix

K now go make sure On Interact is visible in the component properties in the door actor

faint pasture
trim matrix
faint pasture
#

that event that it makes will fire when the interactioncomponent gets Interact called on it

#

now all your character has to do is:
E button -> get whatever actors you want to consider -> choose one that has an InteractionComponent on it -> call Interact on that InteractionComponent

trim matrix
#

so drag off the on interact and call the door open function?

faint pasture
#

Assuming OnDoorOpen is what opens your door then yeah

#

but the main thing to consider is that your character no longer cares if its a door or whatever, it interacts with INTERACTIONCOMPONENTS which tell their owning actor to do whatever

trim matrix
#

?

faint pasture
#

It's more generic

trim matrix
#

thats fine

faint pasture
#

so the same idea applies to your buttons

#

except instead of character pressing E and calling an event on some InteractionComponent

#

the switch calls an event on its assigned SwitchableComponent

#

the rest is the same

trim matrix
#

how do i setup the event for it?

faint pasture
#

the same way

#

make sure you understand how this works

faint pasture
# trim matrix

This is what it'd look like in the things the switch is meant to control

trim matrix
#

so remove that one

#

or well ig all of that shit up there

#

id still like to keep the matching id thing bc thats how i have the doors and keys setup already and has been working fine im just not sure if it would stay here or in the interaction component?

faint pasture
#

you can basically just place a switch and tell it what SwitchableComponent it cares about

#

the SwitchableComponent ref will BE the ID

trim matrix
#

sry im still sorta confused lol

faint pasture
#

If you set it up like:
Switch:
Event Triggered -> tell MySwitchableCOmponent to do its thing

#

then you just set MySwitchableComponent in the editor, when you place the switch and the thing it cares about. You can directly set that ref

#

so instead of searching based on tags, it just knows who to talk to