#blueprint

402296 messages ยท Page 813 of 403

split orbit
#

@maiden wadi https://youtu.be/0JbgHwU2YY4?t=853

So I was basically trying to recreate/imitate what this person is doing. He seems to pull in a JSIContainer Widget and sets everything from that

Or is that NOT a widget and something else he pulls in...

grim peak
#

Hi all.. I'm new to BP... Does anyone know why its not playing my coin sound? Thanks .

gentle urchin
#

destroy actor, destroy actor

#

attached to a destroyed actor

#

Remove the first destroy actor

#

can you get lenght of the spawned sound?

#

if so use that to "set lifetime"

#

and set self to invisible and no collision ๐Ÿ™‚

#

you probably want overlap and not hit aswell.. i'd think

gritty elm
remote meteor
#

always destroy at the end
also do you need your sound to be attached? if not, use spawn sound at location instead

#

if you attach the sound, the destroying actor will also bring the attached sound down

maiden wadi
# split orbit <@!143471961723371520> https://youtu.be/0JbgHwU2YY4?t=853 So I was basically tr...

I'm not normally one to openly flame someone in public so directly, but this person does not understand OOP practices or how to use Unreal classes correctly. First, the tutorial you're following does not follow correct conventions. They're storing everything in a Widget. Which is terrible and not networkable. Even if you're doing a singleplayer game, this route is just simply wrong. They then made another tutorial about networked inventory and made it very easily hackable from the client side. I would not consider this person's tutorials valid in the slightest.

remote meteor
#

oof

maiden wadi
#

Put simply, I'm not at all surprised that you're lost.

umbral galleon
#

How does one remove an input from a Blueprint Interface... I don't see any way to remove it after having added one.

grim peak
remote meteor
umbral galleon
#

That's what I'm in

remote meteor
#

Hmm

split orbit
# maiden wadi I'm not normally one to openly flame someone in public so directly, but this per...

Well that atleast reassures me that I am not the problem in this situation XD

What would you suggest I do from this point forward then.

I would like for it to be "easy" for me to make new "Containers" going forward.

How would I get the Component, to change it size based on what is needed? And then store that within the Container itself.

Cause I need to differentiate the Containers from each other as well...

As it currently stands my "Inventory" is a Container with a set size of 12x5

remote meteor
#

Havent use ue5 yet, anyone else? Usually its just there in ue4's

umbral galleon
#

I found it - if you expand the window over to the right more there is an X you can click to clear

remote meteor
#

Oh..

umbral galleon
#

The window does not handle resizing well

remote meteor
#

๐Ÿคฆโ€โ™‚๏ธ

maiden wadi
# split orbit Well that atleast reassures me that I am not the problem in this situation XD W...

I dunno. Basically the issue is is that you need to understand how to correctly work with the data. The data itself should exist on the InventoryComponent. Then that component can exist on multiple things like the character, the chest, shelves, etc. The component itself can transfer data between itself and other components and everything else is just flavor. I do this by having a component on the character, and then having a base class that is an actor with the component on it. Line trace gets the actor, calls an interface message on it. The actor gets the local player character and passes the character's and it's own inventory component through to the HUD, which then spawns or initializes a widget with the two components. Widget allows transfer requests, but all of the code for moving and data is still on the components, widget is just a visual interface.

split orbit
maiden wadi
#

Well, for example. If your grid in that inventory is 12x5. Then put that in the Component. Make an IntPoint variable that has X and Y integers and set it to 12 x 5. Then get that when you send the inventory component into the InventoryWidget, the Widget can get that value from the component and set it's grid up.

split orbit
#

I have it storing and arraying and picking up/dropping items

#

I just broke it trying to make it "modular"

#

I just don't know how to handle using this to make another "Container"

dim robin
#

can i move static mesh vertex at runtime somehow?

maiden wadi
maiden wadi
split orbit
#

Currently, it "can" it just will always be the same size inventory of 12x5

maiden wadi
#

It might be easier to find examples of correct inventory container use with different inventory types like a normal grid or list inventory. Converting it to a spatial inventory style is fairly easy after that.

maiden wadi
maiden wadi
#

Should be. You should be able to pull that varaible from the inventory component and use it in the widget.

split orbit
#

Yeah thats what I do to make the Grid Widget

#

InventoryComponent only sets up the "Inventory Container" right now though

I need to figure out how to make InventoryComponent make just more than one container...

graceful holly
#

how can i write something with this logic? "during this time if colliding with that actor do this"
this is where i am now

grim peak
trim matrix
#

Just get horizontal and vertical then use input.

zealous fog
#

Set it to false when you stop colliding

#

Whatever you wanna do, have it check the bool

#

As soon as bool=false stop the function

#

Or you can have it running on a timer and then clear the timer

spice lynx
topaz plover
#

is there a way to dynamically pick which fields to update in a struct instead of ticking boxes in the editor like this?

split orbit
topaz plover
#

i'd love some node like this instead

spice lynx
# split orbit That and more technically

I mean high level speaking, without knowing more context that's pretty simple to do:
You have an inventory management system, that knows these things: InventoryID, Inventory Size ( 12x5 ), InventoryContents

gentle urchin
#

Could make a function for it

split orbit
spice lynx
#

As long as your inventory management system is built so you can customize it, you can store items that store a different inventory, and they know which it is by InventoryID, which is how you manage it

split orbit
spice lynx
#

It's easy on the data level if you have it setup with an ID and one handler for all, but this can be implemented in different ways, like having a separate BP/Class instance that handles a particular inventory

topaz plover
#

๐Ÿ˜ฎ whats the node called?

odd ember
#

I think there's a specific node in BP called SetStructMembers

topaz plover
#

so here's my struct ๐Ÿ˜„

#

i cant find anything on/off that node called "set" or "by reference" ๐Ÿ˜ญ

#

ohhh i found "set by-ref var", is that it?

near wolf
#

thanks, ill try to recreate this when im on my pc

topaz plover
#

doesn't exist exactly, "set members in struct_name" exists, but that doesn't have dynamic field setting

odd ember
remote meteor
#

why do you need a dynamic field setting

#

๐Ÿค”

topaz plover
#

yeh that's not dynamic though. sorry to clarify, i am recieving a bunch of data from an outside source. it could be {name:"bob", email:"blabla"} OR it could just be {age:27}. I'd like to take whatever input i get and dynamically set it in a struct

odd ember
#

generally structs in BP are meant to be static read only data

remote meteor
#

json?

odd ember
#

so you may be better off doing all of this in either cpp or use a different way of adding dynamic data

topaz plover
#

im making a moddable game with potentially hundreds of small modifiers, i would prefer not to map by hand each field to each member ๐Ÿ˜„

#

yeh i might just ditch structs and go with a map datatype instead

odd ember
#

with this level of generics

#

ditch BP

#

you'll get better mileage in cpp

open sedge
#

how can i tell a widget to play a sequence in the level?

odd ember
open sedge
#

why?

odd ember
#

because widgets are cosmetic

open sedge
#

i have a main menu when i click a button i want it to switch cameras and zoom in on an object

odd ember
#

the widget should let a controller know that a button has been pressed

remote meteor
#

perhaps using json plugins will be better for your usecase?

topaz plover
#

@odd ember please could you elaborate? are there struct methods that are not exposed via bp or something? otherwise im happy doing dumb loops in BP for now. VS gives me heebiegeebies ๐Ÿ˜ณ

remote meteor
#

since your structure itself has to be dynamic?

odd ember
#

structs in BP are extremely limited

#

because BP as a whole is extremely limited

topaz plover
#

๐Ÿคฏ

odd ember
#

in cpp you have access to generics

#

as well as struct functions

#

which give you much more leeway

topaz plover
#

ive never heard the term generics, will google

topaz plover
#

lots of cool advice so far, thanks

odd ember
#

basically what you're trying to do isn't really available in BP

open sedge
#

@peak wedge is there a tutorial for this?

odd ember
#

it's too low level

odd ember
open sedge
#

so use a bpi?

#

to trigger the event in the widget

odd ember
#

I said event dispatcher

#

what I mean was: event dispatcher

open sedge
#

okay you dont have to be a dick

odd ember
#

I'm not

open sedge
#

i assumed that is what a event dispatcher was

#

im learning still

odd ember
#

that's your assumption

#

not mine

open sedge
#

okay lmao

topaz plover
#

just to let you know and be disappointed, i am going with a map type full of strings even though input vals arent strings ๐Ÿ˜‚

odd ember
#

up to you

topaz plover
#

one day will get more into C++ for sure

remote meteor
#

technically its okay

#

๐Ÿคทโ€โ™‚๏ธ

odd ember
#

it's your fire to put out later ๐Ÿ™‚

topaz plover
#

i know what each field is supposed to be so should be fine ๐Ÿ˜„

remote meteor
#

not really a fire

odd ember
#

(yet)

remote meteor
#

you just need to know exactly what field you need

#

and have a default value on site

topaz plover
#

yeh

remote meteor
#

if it doesnt exist

topaz plover
#

i have another awful follow up question

#

is it possible to add fields dynamically to a map

remote meteor
#

the json type from varest will setle this just nice though

topaz plover
#

because now im regretting saying id do this if i gotta use this UI to add a million fields

odd ember
#

a map can be updated dynamically with a key, value pairing

#

as long as key and value are consistent

topaz plover
#

oh ๐Ÿ™ˆ right yeh thats right in front of me, thx

topaz plover
proud portal
#

I'm kind new to Unreal, so I don't know if I'm missing something obvious. Every time I spawn an enemy and damage it, only the first instance of the enemy is damageable, and all other enemies that get spawned also take the first enemies damage. Is there something special I need to do to make a separate instance of an enemy?

gentle urchin
#

Show how you do dmg :)

#

I smell get all actors of class

#

But my smell is off these days

proud portal
topaz plover
#

basically one dimensional csv i guess

proud portal
remote meteor
#

theres this string node call parse into array

#

with delimiter

#

technically you can split them into an array

topaz plover
#

that's exactly what im doing thanks @remote meteor ๐Ÿ˜„

proud portal
#

@gentle urchin I spawn enemies with SpawnAIFromClass. Is there a way around this?

gentle urchin
#

Not really seeing anything that would damage all enemies

#

:-/

proud portal
#

Wouldn't sphere trace let me deal damage to the specific enemy I want to deal damage to?

gentle urchin
#

With such a small radius yes

#

Should probably sweep trace but oh well

#

Can you see the trace sphere?

#

Is it correctly located?

proud portal
#

I hit the front one but it damages the back two too

topaz plover
#

its a mastapiece ๐Ÿคฉ

#

thx for help peeps

gentle urchin
#

Or rather

#

What happens when you kill it

#

Does all of them die?

proud portal
#

none of them die

gentle urchin
#

Gotnlogic for death?

proud portal
#

and I have destroy actor when health reaches 0

gentle urchin
#

If not just do a dirty branch and hp <= 0 -> destroy actor

#

Ah

dusky harbor
#

Hi, Does anybody know what executes nodes on the same time.
Right now i am using "Sequence", but this executes in the order.
I would like to know what i could use if i want the execution at the same time

gentle urchin
#

Cant

#

Bp cant parralell execute

dusky harbor
#

ok

gentle urchin
#

What wpuld you need that for anyways

dusky harbor
#

just i am using a OnComponentBeginOverlap and when the object overlaps it executes 3 different blueprints with sequence. I am not sure if it is the right way

gentle urchin
#

Whats the issue?

#

Doing them in sequence is your only option if thats what you need it to do

gentle urchin
dusky harbor
#

just i wanted to know. Thank you ๐Ÿ˜ƒ

remote meteor
#

technically theres no "at the same time" in computer world ever

#

๐Ÿค”

#

something needs to execute first

proud portal
#

Only the first enemy I drag and drop into the level gets destroyed when health goes to zero

remote meteor
#

unless we are talking about asynchronous, but then, there is no guarantee things will run at the same time

gentle urchin
#

Even in theory

proud portal
#

nvm it doesn't

remote meteor
#

i dont think you can control them ๐Ÿค” atleast not at unreal's level

proud portal
#

Is there a channel where I can stream to better show my issue?

gentle urchin
#

If i didnt have baby at my hands id watch lol

proud portal
#

Wait, I did a print string and health only goes down for one of the spawned enemies.

#

I guess it's a widget issue

gentle urchin
#

I would think so too

#

Print string is your best friend in bp debugging ๐Ÿ˜„

proud portal
#

So get all actors of class is bad if I'm trying to get a reference?

gentle urchin
#

Depends on the situation

#

Could be fine

#

But often there are other methods

#

In which case did you use it here tho? Or was it just a general question?

proud portal
#

I used it like this to get a ref to my enemy's health

gentle urchin
#

This is the issueee

#

Getting first ref

#

And no, you dont

#

Enemy can have a widget component

#

And on beginplay create the widget for said component

proud portal
#

Do I make a health var in widget and set the widget's health with my enemy's health in enemy bp?

gentle urchin
#

No,

#

Make healthvar in enemybp

#

Create healthbar widget in enemy

#

Input a referense to the enemy, or create a generic "updatehealth" function in the widget

#

Depending on which you select you can call the event update from the widget ref in the enemybp every time the enemy takes damage

#

Or you can bind the widgetsnupdate function to the event any damage

graceful holly
#

The event doesn't get called. Why? it looks like something stupid but ti can't solve it

proud portal
#

I got it. Thanks for helping out Squize.

gentle urchin
#

Np Squaids

odd ember
#

tag team duo

#

squize and squaids

lyric urchin
#

how would u set a vectors decimal precision? im trying to strip a vector down to hundredths

remote meteor
#

almost there ๐Ÿ˜†

#

split them into individual float and go from there i assume

gentle urchin
zealous fog
odd ember
#

float imprecision won't get you correct results

#

you need ToDecimal or equivalent

gentle urchin
#

depends on the size

#

but correct, it's not a very viable generic solution for any possible vector

prime stump
#

Hi, is the IsLocallyControlled node and IsLocalController node any different from eachother?

odd ember
#

I would assume so

#

only one of them points to a controller

remote meteor
#

i remember the things they check is slightly diff but i cant exactly remember IsLocallyControlled's method

#

IsLocalController only check if there is a LocalPlayer ref and valid in the Controller

prime stump
#

So the player character has the IsLocallyControlled node, but the player controller doesn't, would using HasAuthority be the equivalate to IsLocallyControlled?

odd ember
#

the controller is the local control

vagrant flicker
#

Hey guys. Can I get a little help?

I have 3 separate BP actors.
The first one is the chaos destructible mesh that I've made on actor.

The second one is my player and the third is a rock that I am spawning when my player cast a spell.

Now, since CHAOS destructed meshes cannot fade or despawn over time I need to access the actor and destroy it myself.

So, I am trying to do an event hit in the chaos mesh actor but then If I hit it with anything it will response.. I wanna to link somehow my rock actor (the mesh itself) with the mesh to the chaos actor and if they both collide then destroy the chaos actor.

odd ember
#

like you're trying to equate apples with oranges

vagrant flicker
#

I am experiencing troubles to link the rock actor with the chaos actor and get the information from there

#

I made a reference to the flying rock actor inside the chaos actor, but cannot find a way to access it

open sedge
#

i figured out how to play a sequence in the widget bp how do i stop one

#

idk what the target needs to be

#

i would think it would be get current sequence or something

gentle urchin
#

Yepp

open sedge
#

it doesnt let me do that tho

gentle urchin
#

No

#

Sequence player

#

๐Ÿ˜„

open sedge
#

?

#

this?

gentle urchin
#

I think you got the wrong stop node

#

Why stop on initialize btw

open sedge
#

so i have a main menu sequence palying

#

camera flying around the room

#

when i open this widget i want it to stop that sequence and play this other one

raw orbit
#

any way to swap keys in a map?

#

key 1 with key 3 or whatever

open sedge
#

it works perfect to play it

#

but i cant find out how to stop the previous one playing

odd ember
#

it doesn't make sense to "swap" them

open sedge
remote meteor
open sedge
#

no this is the right stop

#

thats what i cant figure out

#

it only gives you limited option

#

and there is no way to plug in "get sequence"

remote meteor
#

you need to make the returned reference a variable

#

and you stop it from the stored variable

wary shadow
#

Hi, why the custom event โ€œTrainingโ€ is not called without the AddToViewport block?

maiden wadi
#

How are you going to click on the button to call that without adding it to the viewport?

wary shadow
#

Iโ€™d like to access the variable start training set equal to True before the new level is loaded

wary shadow
#

But I cannot call the desired custom event once the new level is loaded

remote meteor
#

hm i dont think widgets can survive a open level doesnt it?

gentle urchin
#

Nah

#

It dies

maiden wadi
#

Not unless it's a seamless, which OpenLevel is not.

gentle urchin
#

Gameinstance can help you keep a variable set

remote meteor
#

you see the option thing there

wary shadow
#

Maybe the easy solution is to add a new widget once the level is loaded?

maiden wadi
#

When you call OpenLevel, pretty much everything is delete and removed. Then a whole new world with new actors is instantiated.

remote meteor
#

maybe you can use that to pass parameter between open levels

gentle urchin
#

Options is also a way yes

remote meteor
#

or use a game instance

#

i guess

maiden wadi
#

Personally, I'd just pass it as an Options parameter.

gentle urchin
#

Or even a savegame

#

Depends on amount imo

wary shadow
#

Itโ€™s just simple flag

#

However thank you all

gentle urchin
#

Is this when we say pass it as a gameplaytag

#

๐Ÿ˜‚

remote meteor
#

talking about seamless travel

maiden wadi
remote meteor
#

how would you do a seamless loading screen in a single player game?

maiden wadi
#

Seamless just means there's a persistent world always loaded. Nothing to do with multiplayer.

#

If you want a moving widget loading screen, the MoviePlayer is the best option in normal games. Needs a small amount of C++ though. Otherwise you can do the seamless travel add widget to viewport, change map, remove widget.

remote meteor
#

hmm, my current implementation is like have an empty persistent level, and use load level instance to load level i want, then i have a manager(game mode) to settle the loading and unloading of maps

wary shadow
#

Thank you for these advices

gentle urchin
#

Got any good pointers at organizing tags? ๐Ÿ˜…

maiden wadi
#

Organizing how?

maiden wadi
#

Also don't forget that you can put a category marker on tags to force it to a specific parent.

gentle urchin
#

How to structure them really. Currently its like
NPC.Occupation.X
NPC.Education.X
Item.Wood.Plank
Item.Wood.Log

#

Feels very inconsistent?

#

Or like digging a pit.. ๐Ÿ˜‚

odd ember
maiden wadi
# gentle urchin Got any good pointers at organizing tags? ๐Ÿ˜…

https://docs.unrealengine.com/4.27/en-US/API/Runtime/GameplayTags/FGameplayTag/ The Meta specifier here also works in the Blueprint Categories. Makes picking specific properties nice in Datatables, DataAssets, and child blueprints. Just hides all other tags.

A single gameplay tag, which represents a hierarchical name of the form x.y that is registered in the GameplayTagsManager You can filter the gameplay tags displayed in the editor using, meta = (Categories =

#

As for how to parent them, just depends. What you're doing looks relatively fine. Depends on your requirements.

gentle urchin
#

Ohh. Sweet, thanks !

#

Had some 'trouble' comparing them also, but guess i wont get around having another tag to check that thr incoming tag is part of the educations list

maiden wadi
viscid python
#

Can I change the the main camera the game is using to a different one while a certain menu widget is opened? Or can I change values of a post processing volume while a menu widget is opened? (What I want is to change the depth of field as long as my menu is open)

remote meteor
#

you can use a background blur instead

#

i think

viscid python
#

But I want to see my character in the center in the focus ๐Ÿ˜‰

#

If I do that, the whole screen gets blurred.

#

I would like to achieve the effect that everything in front of the character is out of focus while this screen is open.

remote meteor
#

hm then you can always get a reference to your camera and change its pp settings there

#

it will reflect realtime

viscid python
#

A reference to my camera?

remote meteor
#

the camera should be in your character

gentle urchin
#

So only childs of it get accepted

#

Same with occupation (for the SetOccupation())

remote meteor
#

MatchesTag does that i believe

gentle urchin
#

Also made a custom "getChildest" ๐Ÿ˜†

#

Yeah it does

#

But it requires a second tag to compare to (which obv is fine and expected )

dim robin
#

can anyone help me fixing this splinemesh at runtime? the mesh breaks somehow, and i can't debug it.. I can post the blueprints if needed but basically this is what i do:

  • set spline with 2 points at construction, adding the splinemesh component
  • at runtime at tick (1 sec) i set location at spline point moving the spline points according to a random int (if > 0 moves spline point index 0, else moves spline point index 1)
novel rock
#

Is there a more efficient way to check if vehicle has flapped over or not with out checking every frame?

gentle urchin
#

Not really

#

Its movement tho, a rotation check on tick should be fine

sturdy herald
novel rock
sturdy herald
viscid python
charred grove
#

hello guys

#

whenever i draw widget

#

to deploy a unit

#

it always spawns there to the left

#

where theres a warrior looking to the right

#

i cannot place it anywhere else

#

this is the bp

iron bobcat
#

Honestly don't know, if this is the right place, but I need my sanity back.
I am in the middle of fixing a few bugs and have to test how far in the code breaks. Unfortunately UE4 insists on stacking these messages up while I do that. Is there a way to (at least temporarily) turn these off or make them time out on their own? (I swear, they used to do that)

sturdy herald
iron bobcat
# sturdy herald U should check the message log

As mentioned in my text. I am bugfixing atm. I am aware of what the message log says, but I am simulating to test behaviours and every time I do that, these messages keep stacking up and I have to close them manually. If I don't do that every time, I end up with something like this.

#

I also can only fix one issue at a time and it's really irritating to see the other one blocking my outliner.

icy dragon
languid hemlock
#

how do i add a set command?

iron bobcat
trim matrix
#

Steam doing so much nitro give away lately

trim matrix
near wolf
#

guys how can I make a rotating wheel come back to it's original position with timer with minus value until relative rotation is zero?

#

when a button is released*

random plaza
#

how do i have a widget in a scenecapture2d window?

trim matrix
#

Are you using an event tick that adds rotations each frame? A timeline? Rotating movement componet?

near wolf
#

i added addrelativerotation function

#

and removed the x90 degree one

#

now it rotates, but just keeps spinning and doesnt come back

trim matrix
#

Is this rotating wheel an existing class within unreal?

#

You added something to it, and removed something else?

#

Sounds like your talking about an existing class that you modified?

#

Or did you make this rotating wheel class from scratch

near wolf
#

now I need to make it rotate to 90 degrees and make it come back on release button

#

im trying to figure out how

trim matrix
#

Oh ok

#

What I would do is use an Interp

#

Have you ever used an FInterp?

near wolf
#

nope

trim matrix
#

Interp means interpolation

#

To be honest just go look up a unreal tutorial for FInterps

#

Iโ€™m sure there is one

near wolf
#

but what is it doing

trim matrix
#

It transitions from one number to another

#

0-90

#

Each frame it adds a little bit more

#

Until 0 = 90

#

More like..

#

Each frame it adds a little bit more

#

Until Value = Target

#

You should really go learn about those. They are very important

near wolf
#

im just watching a tutorial

trim matrix
#

Ok

near wolf
#

but seems a bit confusing how to use this in my case

trim matrix
#

If you are steering right, set Target = 90

#

If steering left, set Target = -90

#

If not steering, set Target = 0

#

Then each frame,

#

Set SteeringWheelRotation to the Interp value

near wolf
#

so i need 3 Finterps?

#

for all values?

trim matrix
#

No only 1

#

All you are changing is the Target value

#

You can promote Target to a variable

near wolf
#

im a 3d artist, i don't usually deal with blueprints, so that's why im having a hard time lol

trim matrix
#

Make two variables

#

CurrentInterp (Float)

#

TargetInterp(Float)

near wolf
#

ok

trim matrix
#

Ok now

#

Plug TargetInterp into Target

#

GetTargetInterp -> FInterp Target

#

Same with CurrentInterp

#

GetCurrebtInterp -> FInterp Current

near wolf
#

ok

trim matrix
#

Ok

#

Now

near wolf
#

it actually converts them from boolean to float

#

if it matters

trim matrix
#

Oh yes

near wolf
trim matrix
#

You need to make CurrentInterp and TargetInterp float type variables

#

Not Boolean types

near wolf
#

when I click add new variable

#

it makes them booleans

#

I don't see option for floats

trim matrix
#

Oml then change the typeโ€ฆ..

#

F

languid hemlock
trim matrix
#

Click on the variable

#

Then in the Details Panel

#

You can change a variables type

near wolf
#

oh yes i found it

#

go on

trim matrix
#

Remember that

#

Itโ€™s blueprint 101

#

Ok tho

#

So get those plugged in correctly

#

Now

#

We want to get a SetCurrentInterp variable node

#

you are going to plug the ReturnValue on the FInterpTo node into SetCurrentInterp

brazen merlin
trim matrix
#

FInterpTo(ReturnValue) -> SetCurrentInterp

near wolf
#

ok

#

done

trim matrix
#

Make this SetCurrentInterp node run first thing after InputAxisMoveRight

brazen merlin
#

@near wolf @languid hemlock I think you've both jumped the gun with BPs and skipped some of the basics which is causing you more trouble than the task you are trying to achieve

trim matrix
#

Now

#

This is true lol

tidal wren
#

is bluerint easy?

#

and

brazen merlin
near wolf
#

yeah but as I said i don't usually deal with blueprints, it's just that case now

tidal wren
#

other prog. languages

near wolf
#

anyway, done that

#

what's next

trim matrix
tidal wren
#

for example c# java cpp

trim matrix
brazen merlin
# tidal wren other prog. languages

its a visual scripting language - you focus on the concepts behind programming, but you are interfacing with visual elements - you are not typing lines of text

near wolf
#

done

trim matrix
#

ok

#

So this should be all for the FInterp

#

Go ahead and SS the code for me

#

I will explain whats happening

brazen merlin
near wolf
trim matrix
#

Perfect

#

InputAxisMoveRight fires each frame

#

Each frame

tidal wren
trim matrix
#

We are updating the value of CurrentInterp

#

This FInterp node will take the value of CurrentInterp and move it closer to TargetInterp

#

The InterpSpeed is the speed in which CurrentInterp reaches TargetInterp

brazen merlin
near wolf
#

hmm

trim matrix
#

Next, you have to use the CurrentInterp value to set the SteeringWheelRotaion.

tidal wren
#

and i have one more question

trim matrix
#

So what you want todo, is get a SetRelativeRotation for the steering wheel.

#

And plug CurrentInterp into that

#

You dont want a AddRelativeRotation like you have, get a SetRelativeRotation.

near wolf
#

like this?

trim matrix
#

yep

#

Plug up the execution

#

The next step is to now determine the TargetInterp value.

#

We can use AxisValue to figure out TargetInterp.

#

Like I said before.
Steering Right = TargetInterp 90
Steering Left = TargetInterp -90
NotSteering = TargetInterp 0

#

That will translate into..

#

AxisValue(1.0) = TargetInterp(90)
AxisValue(-1.0) = TargetInterp(-90)
AxisValue(0) = TargetInterp(0)

#

The formula to turn AxisValue into TargetInterp is, AxisValue*90

near wolf
#

how do i set this axis value

trim matrix
#

You do not want to set AxisValue

#

You want to set TargetInterp

#

TargetInterp = AxisValue*90

#

like that

near wolf
#

so I just enter the numbers

#

got a bit confused here

trim matrix
#

one sec

#

TargetInterp = AxisValue * 90

#

and make this run BEFORE SetCurrentInterp.

near wolf
#

oh so what I was missing is

trim matrix
#

SetTargetInterp needs to happen first, right after InputAxisMoveRight.

languid hemlock
near wolf
#

that middle node

trim matrix
#

oml

#

its multiplication...

#

just right click anywhere

#

and type

#

float*float

#

Blueprint 101 xD

#

but its ok

brazen merlin
near wolf
#

yeah did that

trim matrix
#

ok good

#

So SS me your code.

#

Lets make sure everything is correct

#

but that should be about it

near wolf
#

where do i plug that

#

set targetinterp

trim matrix
#

In between InputAxisMoveRight and SetCurrrentInterp

near wolf
#

yes

trim matrix
#

ok try that in game

#

We may need to make some adjustments though.

near wolf
#

yeah, it's working but a bit odd

trim matrix
#

yep

near wolf
#

rotates slow and not really with the tires

trim matrix
#

A couple adjustments you can try are

#

number 1.

#

Changing the InterpSpeed

near wolf
#

yeah that's better

trim matrix
#

It will change the speed in which Value reaches Target

#

The other Adjustment you can make is using FInterpToConstant instead of FInterpTo

#

So

#

FInterpTo tries to smoothly transition Value -> Target

dire frigate
#

Is there any way to make a snippet of a blueprint reusable or generic so that I can just reference it in various other blueprints without having to copy and paste over and over?

near wolf
#

I see

trim matrix
#

FInterpConstant

#

will litteraly add the same amount each frame

#

so Value -> Target

#

is constantly increaseing at the same rate each frame

#

Instead of trying to smoothly incease

near wolf
#

ok let me try

trim matrix
#

Constant looks the exact same

#

so litteraly just swap it out

#

see which ones works better for you

near wolf
#

it's not working

#

with this

#

and i just plugged in the same way

trim matrix
#

will you SS the code?

near wolf
trim matrix
#

oh I wonder then

#

try inceaseing the InterpSpeed to something really high

#

just try like 1000

#

or something

near wolf
#

yes it works now

trim matrix
#

ok so Constant just needs a higher InterpSpeed

near wolf
#

can't really figure out the difference lol

trim matrix
#

you may have to play around to figure out exactly what it is

#

well the difference may not be to noticeable in this situation

#

In certian situations there is a major difference though.

#

Anyways that is another way to adjust it, so just play around with those nodes/values

#

and you can perfect it.

#

to your liking

flat coral
#

What's the difference between AddRelativeLocation and AddLocalOffset?

last abyss
near wolf
#

anyway, thank you very much for the help, i appreciate it

dire frigate
near wolf
#

i wouldn't have done that alone lol

trim matrix
#

If there is anything to take away, remember that you can change Variable types by clicking the variable and looking at it details

#

Also remember how to get those mathmatical nodes as well.

#

I would recommend looking into some gerneal blueprint tutorials as well.

brazen merlin
near wolf
#

yeah I will

#

thanks again

brazen merlin
flat coral
winter garnet
#

Hey, reading from datatable in runtime is bad? Should I read at game start and store the results in memory?

trim matrix
#

Nothing wrong with reading the data table at runtime

brazen merlin
languid hemlock
trim matrix
#

It is actualy advised to read things at runtime rather then having them as class defaults.

winter garnet
brazen merlin
brazen merlin
winter garnet
#

It's just a small shop with items; the DT itself has not more than 15 rows

trim matrix
#

thats perfectly ok

winter garnet
#

๐Ÿ‘ Thanks

fair magnet
#

in my blueprint function library I have a function parameter for an actor.
Can I default that to self? :o

#

I know I can do in cpp but idk about bp

trim matrix
#

I believe it does if itโ€™s not a pass by reference?

fair magnet
#

I mean... I can make it one... doesn't matter :o

trim matrix
#

I thought you could get self inside of a function library to

#

Like get a reference to self

fair magnet
#

Yea I just tried that but it's not allowed on static functions

#

Well I guess it's not possible then :o

trim matrix
#

Maybe not

#

Not sure

languid hemlock
last abyss
rancid quartz
#

Hello, I have a question about blueprint components.

If I'd like to make a custom child of SceneComponent, and give it an icon of any kind that the designer could use to visualize the component similar to the Arrow component, how might I do that?

The only solution I've thought of is using StaticMeshComponent, but is there a better way? Just a little dot would do, anything to show where the component is in the editor.

Any advice would be appreciated. Cheers.

odd ember
#

you can inherit from scenecomponent freely?

rancid quartz
#

Yeah, that's fine.

odd ember
#

oh wait I get it

#

you want a billboard

rancid quartz
#

Yeah, basically.

#

But I need to add some custom variables to it and I can't seem to inherit from Billboard.

odd ember
#

then you might need to expose that in cpp

#

I did that for one of the collision components

rancid quartz
#

I'm working in a pure blueprint project at the moment. ๐Ÿ˜…

odd ember
#

I don't know what the alternative is then

rancid quartz
#

I see. Well, thanks for your time anyways. It was a valid suggestion.

hexed glade
#

Just ran into a strange problem. I've set a branch to check if my inventory structure contains an item that is picked up and when the 3rd (and only the 3rd) of the item is picked up it counts as false. Any idea what might be happening here?

trim matrix
#

what does your inventory struct look like

#

contains is looking for an exact match off every property within the structure

hexed glade
#

The items in question is are duplicates using the same inventory structure. They will stack up to the current max of 8, but every 3rd will create a new stack instead of getting added to the current stack.

odd ember
#

not sure how struct equivalence happens in BP defined structs

#

usually you have to write your own operator for it to function properly

gentle urchin
#

Yeah not sure i'd count on a struct comparator like that ..

trim matrix
#

yes, you need to write your own way of finding the correct value within the inventory array.

gentle urchin
#

This to me looks like something that would fit nicely in a DB or data asset with gameplaytags ๐Ÿ˜„

#

but thats out of scope of the question

odd ember
#

you could also write your own Equals or FindStructInArray functions and put them in a function library

faint pasture
#

@hexed glade why does your struct not contain current stack size?

#

Would a stack of 8 apples be a single struct or 8 of them in your design?

hexed glade
#

Ah, yes. The tutorials I've been using led me to create a slot structure which contains the item structure and the stack quantity.

flat coral
faint pasture
#

Ok that should be aight. I wouldn't do a direct comparison tho or else apple and apple on cooldown would not be equal

odd ember
#

tutorials ๐Ÿ˜”

odd ember
faint pasture
#

@hexed glade you should find slot by item name or ID

hexed glade
#

Okay. Will give that an attempt. Thanks ๐Ÿ™‚

faint pasture
#

Or something else other than a full compare.

flat coral
soft peak
#

can i ask smbdy about "LineTraceByChannel"?

flat coral
#

You can ask, but you might not like the answer.

soft peak
#

๐Ÿ˜„ well ok....

#

i setup to "shoot" a trace line from center of cam to the world

faint pasture
odd ember
#

can I ask if I can ask about asking a question?

soft peak
#

now when i test it, it looks like its not quite the center somehow

runic parrot
faint pasture
soft peak
#

in the vid i shoot the upper left and right corner of the cube, but when i move you clearly see its not the postion where i aimed

odd ember
maiden wadi
soft peak
#

xD

dusk dust
#

is there a way to get the number of sections from an instanced static mesh/get the vertice and triangle arrays?

maiden wadi
#

To be less useless. Your trace and camera are fine. Your reticle is fucked.

odd ember
# soft peak

looking at the video the second shot seems correct

maiden wadi
#

Default template reticle isn't centered on screen. It's a little lower.

faint pasture
#

Specifically it's top left corner is centered on screen. They didn't account for the width of the texture

flat coral
#

Is there an equivalent to FInterpTo which moves with a constant speed, instead of relative to remaining distance? I know there's Lerp but that would require saving a bunch of context variables that FInterpTo doesn't.

maiden wadi
#

InterpToConstant

last abyss
#

how can I re-order map type elements?

soft peak
#

i used the default hud crosshair:

odd ember
faint pasture
#

@soft peak yes and you didn't account for the width of the crosshair texture

soft peak
#

ohhh....

faint pasture
#

The top left corner of that crosshair texture is centered on screen. Not the middle of it

soft peak
#

now i get what you mean ๐Ÿ˜„

last abyss
#

damn :/ that sucks.. I'm betting there's no way outside of c++ to make it fill the entire map with all available keys? (I'm using an enum key and float value)

odd ember
#

on something like beginplay

frank nest
#

Guys I am having a brain fart... What node makes all vectors or floats positive? like if z was -120 how do I make it 120? If i multiply everything by -1 then it will turn positive to negative

gentle urchin
#

Abs

last abyss
#

yeah but this is for a data asset ):

odd ember
maiden wadi
#

@soft peak
If screen is 1920 wide. Half of that is 960. +16 width is 976.
If screen is 1080 high, Half of that is 540. +16 height is 556.
Crosshair is drawing from 960 to 976 wide and 540 to 556 tall.
It should be drawing from 960-(16/2) to that +16 width and 540-(16/2) to that +16 height

sonic crescent
#

Hi there, i put my Vfx message here too, because it may be blueprint related:
#visual-fx message

last abyss
#

sorry, it's not in game it would be for editor I get OCD when I see this ordering

frank nest
soft peak
#

@maiden wadi oh wow thanks alot! i will have to reread it a couple of times until i get it xD

odd ember
#

that's why you need a key to access the value

last abyss
#

thanks anyways, I think I'll just dip my toes in c++ and attempt to get it how I want it

odd ember
#

good luck. the people over at #cpp are very friendly

maiden wadi
#

Haha. Yeah. No.

odd ember
#

well it depends

#

if you know dragonHell or have 32gb data tables or try to inherit from ALandscape you're fresh outta luck

maiden wadi
#

Wait. 32gb Datatables? The fuck?

#

Sounds like a prime candidate for a job at Studio Wildcard. ๐Ÿ˜„

odd ember
#

the #cpp lore is deep

lime fulcrum
#

Hi!
Anyone had the issue where holding "SHIFT" as a key, can't use another key like "F" to interact

maiden wadi
#

In PIE or Standalone?

lime fulcrum
#

PIE

#

is it a shortcur for something?

maiden wadi
#

Editor hotkeys are overriding your game's. Editor's slate takes precedence.

lime fulcrum
#

I imagined ๐Ÿ˜„

#

what is SHIFT + F for? ๐Ÿง

#

Find...

#

wait, no ๐Ÿ˜„

soft peak
#

@maiden wadi thanks a ton!
i ended up making a variable for the width/height of that crosshair and adjusted the blueprint, works perfect now

flat coral
# soft peak

FYI press Q when selecting nodes to straighten any lines between them

#

Or maybe that's just something I'm personally neurotic about?

maiden wadi
#

That would ruin half of my blueprints. ๐Ÿ˜„

crisp lance
#

There are so many different places where you can put a Day/Night cycle logic, it's hard to get a definitive answer on where is the best one to do it elegantly (and MP compatible). Every tutorial has a different take on this.

soft peak
flat coral
flat coral
maiden wadi
#

Okay. Maybe like DateTime or something. But either way. You can replicate something as simple as that and run everything else on it.

flat coral
#

Also depends if you want current time of day to be in save games

gentle urchin
#

GameState sounds very reasonable for something like TOD yes

odd ember
crisp lance
maiden wadi
#

That can just be an actor in the world. GameState has a global getter, so it's easy to get from anywhere. No need to make GameState directly responsible.

#

This also allows you to have other managers. Weather, Sunlight, Seasons, etc. You can split it up all you like and all you need to do is GetGameState to access the value they need to seed themselves.

gentle urchin
#

Is there a method for checking for child tag? I only want to accept tags that are children of a given parent gameplaytag

#
if (InEducation.MatchesTag(EducationTags) && !InEducation.MatchesTagExact(EducationTags))
``` Or is this the way
maiden wadi
#

If you want to know if it's an education child tag, but not the exact education tag parent, then yeah, that'd be the way to go.

gentle urchin
willow cedar
#

Is using Actor Components and Interfaces combined a good idea?

maiden wadi
#

Not sure of the correlation required for the two?

willow cedar
#

Like a Actor Component gets added to a Player, and an Interface from another actor can send events to the Actor Component?

maiden wadi
#

But why? Why not just call FindComponent on the actor and use it directly? Why do you need an interface?

willow cedar
#

That's why I'm asking

#

I don't know of other methods yet

maiden wadi
#

I've rarely found a valid use for interfaces. They're terrible disgusting things that people use way too liberally and pretty much never for the right reason.

willow cedar
#

Isn't it better than Casting though?

maiden wadi
#

NO I KEE U

willow cedar
#

?

#

Yeah, that's what I'm avoiding

lime fulcrum
#

I use interfaces a lot and it's so flexible

maiden wadi
#

The shortest answer is that if someone has told you that casting is bad, they do not in the slightest understand how Unreal handles default object instantiation and memory management, and they need their Youtube or Reddit rights revoked.

willow cedar
#

Nobody told me casting was bad. For my purpose, Interfaces would be better than a hard reference to something.

soft peak
#

is there a key i can press while adjusting values for a slider to "slow down" the speed of a slider?

#

(gif creating...)

maiden wadi
sturdy herald
odd ember
#

generally people overuse interfaces

willow cedar
#

People swap between different characters though, I want the same functionality for those other characters

sturdy herald
lime fulcrum
#

@willow cedar I usually use Casting for a few things in the level, like my custom gamemode stuff. Not something I keep casting all the time. I usually save the reference of such class to something I can always access, either game state or game mode

willow cedar
odd ember
#

you can still cast and save them

maiden wadi
#

@lime fulcrum Saving the reference is usually pointless upkeep unless you're using the pointer in a heavy tick function. Casting itself has nearly no cost, it's just converting a pointer type. In fact, you could remove that cast from your blueprint and just keep the blank reference there and you're still doing the same harm to your memory footprint that a cast does.

odd ember
#

like rarely do you actually ever need to use interfaces

lime fulcrum
#

I understand, but I only cast the player class once on a function I called "GetPlayer"

willow cedar
#

What about if you want to call an event from another BP

odd ember
willow cedar
#

Event Dispatchers are a bit tedious to setup imo, unless there is another way

cerulean fog
#

Is it possible to figure out how strong a GPU and CPU are so you can set a games Automatic Graphic Settings?

odd ember
maiden wadi
odd ember
#

oh yeah sure, genericize it

#

don't make 10 functions do what 1 can do

willow cedar
odd ember
#

dynamic dispatcher is the one you usually have to manually Bind

#

but let's say you have a setup of an actor with a component that does not change during the game, and the component has a dispatcher. you can right click the component and go to Add Event and find your dispatcher, which then covers all the bindings behind the scenes

#

but this only works for components where they start on the actor

willow cedar
#

I'm trying to figure stuff out for components that can be added and removed in game

odd ember
#

then you need dynamic dispatchers

willow cedar
#

I was thinking of using an BPI to do that instead. Which I have no clue if it would work, or be a good idea

odd ember
#

it wouldn't, no

maiden wadi
#

Dispatchers and Interfaces do not do the same thing.

willow cedar
#

But can't you interface call and set off an event that way?

#

Or is that bad?

sturdy herald
willow cedar
#

This

odd ember
#

an event dispatcher "listens" for certain things to happen and acts accordingly

willow cedar
#

Hm. I want to put my Movement System onto an Actor Component, but all the inputs need to get passed along because it will be dynamic if a player can have it or not.

#

It's an extension of movement, not base movement. Kind of like flying.

odd ember
#

sounds like #cpp territory

willow cedar
#

I can only use Blueprint though because I'm not knowledgeable in cpp.

odd ember
#

well then consider that you may be overscoping for your ability

#

try and see if you can repurpose the character movement component

willow cedar
#

It's nothing I don't already have created and working on one Character BP right now

#

What I want to do is take it off the Character BP, and put it into a component. It doesn't use Character Movement at all. It's all add force stuff.

#

The idea is that I want to easily reuse the code and put it on other things instead of re-writting the code. so I figured the Actor Component allows me to dynamically add it to other types of BPs. I just need to figure out an interaction method.

#

Would there be a way to check for Actor Component, and then change Variables on an Actor component?

#

It's an overlap event from a different BP

flat coral
#

I'm not sure what you're trying to accomplish but it kinda sounds like you're overcomplicating it?

#

Like is this "getting into a mech"? "Putting on a jetpack"? "Deploy parachute"? I wouldn't hesitate to do any of those with blueprints myself honestly

willow cedar
#

Yes, basically

#

I think this is kind of what I'm trying to do

#

But I need to find if Overlapping Actor has a component, and if they do, change a value of the component.

#

Would this be how to do it?

odd ember
willow cedar
#

Because its a pickup item

odd ember
#

why not just enable or disable it?

#

sounds like you're overthinking this

willow cedar
#

Like start the component on the actor and turn it on and off?

odd ember
#

yes

willow cedar
#

Because its not something always used. Could also be completely non existent in certain gamemodes

maiden wadi
#

I do that with custom UObjects added to an array in an actor component that acts as an abilities manager. But adding an actor component on the fly can be fine.

willow cedar
#

Yeah, same kind of idea as what I'm doing.

odd ember
#

if you really want to add it dynamically, you also have to specify behaviors dynamically

#

including event dispatchers

desert juniper
odd ember
#

these are default types available in the engine

willow cedar
desert juniper
#

I built something like it in unity and it worked so well to decouple my code

#

much harder to do it yourself in unreal

odd ember
#

do what?

desert juniper
willow cedar
#

What I have in place is an overlapped actor gives the player a component on the server for multiplayer, and it works fine.

desert juniper
#

yeah, I don't think I'd use anything complicated for that

#

you already have the actor you're interacting with, so why complicate it. cast to your actor or interface

maiden wadi
#

That is a lot of strings. So many strings. :/

#

All of the designer typos. The fire burns.

desert juniper
#

Yeah, that's why I didn't go with that one.
I'd rather have a 'type safe(?)' system
the one I'm using uses data assets for the events themselves, and an object for the payload

maiden wadi
#

O.o It uses data assets for events? Like Dispatchers, or?

desert juniper
#

though I've tried to implement it in cpp and having trouble since some of the classes aren't exposed.
reeeeallly don't want to make my own system.

desert juniper
#

it has the ability to instead pass a string as the event type, but the other is to use data assets

#

(there's a parent DA class that these are a child of)

maiden wadi
#

That is really odd. DataAssets aren't usually instantiated objects. They just exist as static data. Personally, I would really rather just make some form of GameState ActorComponent.

languid hemlock
#

i got an issue theres no X Y or Z button in the blueprints :(

topaz badger
#

maybe i misunderstood your question, let me know if that helps

#

is there a way to switch on class? this is an example outlining items off of a linetrace but i feel like its such a terrible way to do it. (this is just an example with two "items" but I will be using a lot more than two items, so casting like this will become a big issue, i think?)

#

Ignore the blatant bp error ;)

earnest tangle
#

You could probably use an interface

#

have the interface include a function which returns the mesh that needs to be assigned into the variable

soft peak
#

dumb question but:
when i have 2 Locations, "A" and "B"
how can i get the rotation value for "A" so it will rotate towards "B"?
(i hope that makes any sense at all)

topaz badger
maiden wadi
#

Or wait. My bad, read too fast.

#

I think.. Is that what you were after?

soft peak
#

i think it is that yeah, thanks i will give it a try

sturdy herald
#

hello. How can my actor draw a line in world with movement?

faint pasture
soft peak
#

@maiden wadi yes, FindLookAtRotationFunction was the key word here, thanks so much

viscid python
#

I have a menu widget that highlights when I move the mouse cursor over an element. How can I make a "copy" of that menu that "inherits" that highlight, so that when I show both menus ingame, both selected menu items will be highlighted?

versed sun
#

i would say and event dispatcher in the element and any widgets that you want to highlight will listen for it

willow cedar
#

So, you can't use Inputs/Keyboard Events in Actor Components. So what would be the best way to allow yourself to.

viscid python
viscid python
tawdry surge
#

Have the input event call a custom event inside the component

willow cedar
#

Is there a way to get components to send events to eachother?

faint pasture
willow cedar
#

Eachother

willow cedar
faint pasture
#

Just get a ref to the other component and call the event. What's the problem?

willow cedar
#

Sweet, that'll do.

faint pasture
thorny lily
#

sorry and thanks ๐Ÿ˜…

desert juniper
desert juniper
# faint pasture Wouldn't dispatchers on a global object do that?

I did think about that, but it just takes away from trying to decouple. every level has to have that replicated global object, and you have to find it on each object you want to dispatch, as well as looking for that object each time you want to register a listener
That's what I like about a global/static system instead. completely decoupled.

desert juniper
#

rooThink1 haven't yet learned of that

faint pasture
#

Look into it. They are incredible.

desert juniper
#

thanks! looking into it now

faint pasture
#

It's basically an object that has a managed lifetime and is globally getable

#

So you would just get the global message bus subsystem or whatever you call it and call some register function

timber otter
#

hi all, is it possible to edit splines in runtime? any tips? i want to make a wall that is deformable by the player using a pre-defined set of spline points. imagine a boundary they can reshape in the game. can't seem to find any solution... i know landscape splines cannot be edited at runtime, but normal ones..?

dire frigate
#

I'm building out a sample interaction prompt/dialogue box system in this sample project.
Can I share how my bp looks for this and get some input on if I've done it in a decent way?

umbral ginkgo
#

How would you call an event for as long as the player is in a collider if that makes any sense?

icy dragon
versed sun
#

would you call it on tick or call once when you enter and again when you leave ?

versed sun
#

then i would make a Timer by Function Name, Pause it, and unpause when you enter the area , and pause when you leave

umbral ginkgo
#

Thank you so much!

maiden wadi
#

You really need to be careful with timers like this. Do be aware that this is going to be called 100 times per second regardless of your framerate. Not the greatest design

icy dragon
umbral ginkgo
#

I think gate control makes more sense to me in this use case

icy dragon
#

Some might consider this evil hack, but this doesn't resort to heresy overcoming with timers.

#

Now to think about it, how many people actually abuse Timers just because "Event Tick is bad no matter what" stigma? ๐Ÿค”

maiden wadi
#

Way too many.

icy dragon
#

Oh, the ironic misinformation on Event Tick spreading around

"Don't use Event Tick at all cost! Use looping Timers with 1/1000 second duration instead!"

maiden wadi
#

Yeah. Which if you know how timers works translates directly to "Don't do this overbearing function 60-120 times a second, do it 1,000 times a second!" ๐Ÿ˜„

#

I vaguely understand the tick issue. Designers are bad at programming. Much easier just to check things on tick, cause it works. But an actual programmer should know better.

#

When you're working in a team of 20+ people messing with tick in objects that don't need it, I can see it being a problem, but in a personal project? Nah.

flat coral
#

People hear that tick is often overused, and it is. But among people who have heard that, it's often underused too

#

A big part of programming, in any sense, is recognizing when the thing you're trying to build is pretty similar to a thing that exists

maiden wadi
#

Some people would lose their minds if they saw some of my UserWidget tick functions. ๐Ÿ˜„ But I'm wholly aware that those widgets remain on screen for about 2-20 seconds and not during complex gameplay. I have a few progressbars that tick constantly, never stop, on screen all game long. But they move often. The few seconds they don't move isn't worth bothering with the complexity of messing with UMG animations when the tick works beautifully and never breaks. It's constantly in use and lightweight math. Like, we have tick functions at work that are super branchy and complex. AI ticks. Every time you add an animated character, it ticks. The engine ticks to see if it should split the viewport for a second local player. The engine literally runs on tick.

flat coral
#

Tick function I have on an automated turret that attacks the player. This thing is HUGE, it's got multiple branches and some of those functions are massive and contain nested functions in themselves.

#

But like, this is a living, dynamic thing. It's going to need to do a fair bit of thinking all the time just to function, even if all it's doing is "point and shoot"

#

And also? I can set that IsAlive to false and suddenly this thing does not exist as far as optimization is concerned.

willow cedar
#

Is there a way to get Character Movement inside an Actor Component without using Casting?

flat coral
#

What's wrong with using casting?

willow cedar
#

I want to be able to get Character Movement from other Blueprints

#

Not just one type of character

flat coral
#

But like, it has to be a Character to have Character Movement right?

maiden wadi
#

You don't have to cast to the other types. You can cast anything that inherits from Character to Character.

faint pasture
flat coral
willow cedar
maiden wadi
#

They're still characters. Cast to Character.

flat coral
flat coral
willow cedar
#

I didn't know you could cast to just character

#

I thought it had to be a specific Blueprint

#

That fixes my issue

maiden wadi
#

This is what I was saying about base classes earlier.

#

You do the important logic or at least the calls in a base class. Then you make other classes inherit from it. And now you can interact with every one of those other classes by casting to the base class.

#

In this case, Character is your base class, since it's the first in the line of inheritance that has the CharacterMovementComponent. So you can freely cast to Character to get it, if the cast fails, it won't have that component anyhow.

willow cedar
#

And how would you make a class inherit from it too?

#

I think I've been trying to do this, but with components

maiden wadi
#

That is an extremely complex question that has to be semi tailored to the program it needs to fit in. But in short, anything you can. It's okay to have multiple inheritances of base classes as well.

trim matrix
#

Hi, does someone know how to separate the camera rotation from the mesh rotation ? i'm using this setting from CMC so my character move to the rotation when its reached, the problem i got is i don't want my character mesh to move with the camera until it needs to with the rotation rate, smth like fortnite does (and no it's not attached to the camera.)

umbral ginkgo
#

This worked the first time I tried it but now it doesn't. Any idea why?

umbral ginkgo
trim matrix
#

it doesn't, fortnite mesh don't move with the camera

umbral ginkgo
#

Ohh you mean the lower body

trim matrix
#

i'll try to show u

#

i'm starting the game

umbral ginkgo
#

Oh I see now

trim matrix
#

that's like bUseControllerDesiredRotation and bOrientRotationToMovement combined

chilly geyser
#

How do I prevent a spring arm from getting twisted? (I.E. spring arm is only inheriting the yaw, but it gets twisted sometimes)
{camera component}

maiden wadi
# willow cedar And how would you make a class inherit from it too?

A good example might be Affects. I have a status affect system that basically boils down to an ActorComponent that instantiates Objects and holds them in an array. These Objects are the Affects on that actor component and affect that component's owner actor. I have a base class that the actor component interacts with. Say UMyAffectsBase. MyAffectsBase has a bool on it that says whether it is instant. And child class can change this. If it is instant, the component just calls an event on MyAffectsBase called StartAffect. Instant abilities use this to do things immediately and are discarded. But I have a subclass that I use for ticking affects, I toggle the bool here so that anything inheriting from this new UMyTickingAffectsClass can tick. The tick is ran from the actor component, it places this object in an array of objects and iterates through them in it's own tick and calls TickAffect in UMyAffectsBase that UMyTickingAffectsClass overrides and uses. Subclasses of UMyTickingAffectsClass can override that from UMyTickingAffectsClass and do things. So like.. UAbilityDamageOvertime inherits from UMyTickingAffectsClass and will tick and deal a damage type to the owner actor of the component. It gets that damage type from a datatable via a GameplayTag that is specified on UMyAffectsBase and set on instantiation from a function call. Meanwhile the entire time, my ActorComponent which instantiates all of these, calls starting functions on them and ticks them doesn't use a single pointer type other than UMyAffectsBase. It has no idea that UMyTickingAffectsClass or UAffectsDamageOvertime exist.

trim matrix
#

definitely not

#

I know all their camera logic is on PCM, they have nothing like spring arm comp

#

it's all on the pcm

#

just wondering if THIS thing i showed is smth custom or can be achieved with what CMC/PCM provides

#

and also this is only effective when idle, if moving and rotating that's acting like UseControllerRotationYaw is enabled (so mesh following the rotation)

willow cedar
pallid axle
#

how do you get a variable from another blueprint

trim matrix
worthy frost
#

turn in place?

grim heath
#

Hi:) I'm new to UE and trying to implement a hint system with SFX. The sounds should play a certain amount of time after the player finds an object. For example, the player finds an book in a safe, if the player doesn't do what he's supposed to within 5 minutes, he should hear "Try reading the book you found in the safe". I don't understand how to do this or where where in the BPs I should add the sound... Any solutions? I'm a total beginner, so please explain as if I'm the most stupid person on the planet

trim matrix
trim matrix
chilly geyser
#

the game doesnt know that the spring arm is twisted. it still thinks its right

trim matrix
#

Fortnite doesn't have spring arm at all

#

so that might be why..

chilly geyser
#

what alternatives can i use?

#

so that camera only inherits yaw

trim matrix
#

what ??

#

oh i thought u was answering me lol x)

trim matrix
chilly geyser
#

spring arms yaw is getting twisted

trim matrix
#

send code or/and video ?

chilly geyser
#

and the game thinks its still right

#

it works on some of them, but some it gets twisted like that

worthy frost
#

@trim matrix the capsule always rotates, camera always follows the capsule rotation (so pawn forward is always forward). Then you counter rotate the root bone in the animinstance, with the yaw offset, when you hit the limits, you interp the root bone back to 0, and use AimOffset to handle the upper body rotating

chilly geyser
#

so use a capsule component instead of spring arm?

worthy frost
#

?

chilly geyser
#

whops wrong person,

trim matrix
#

so it don't rotate at all

worthy frost
#

i mentioned that

#

you counter rotate the root bone

#

in the anim instance

pallid axle
#

how the f do you access a variable from another blueprint

trim matrix
worthy frost
#

do you understand or need more help?

faint pasture
trim matrix
faint pasture
trim matrix
#

link it in case anyone want it

worthy frost
#

not a fan of that

#

but it will work

trim matrix
#

nice

faint pasture
#

@trim matrixStart by visualizing the yaws that are in play. For turn in place you'll have at least 2 yaws to keep track of.

worthy frost
#

thats not TIP though

trim matrix
#

well in the thing i linked they keep the mesh attached to the capsule.

#

there is just different ways

faint pasture
#

Doesn't need to be detached from anything, there just has to be a yaw offset somewhere in the rotation chain from capsule to feet/head

trim matrix
faint pasture
#

Start by having 2 static meshes pointing in the facing and foot directions and get the mechanics right regarding them. Then just make the anim BP translate that state into its pose.

worthy frost
#

when you hit the limit (how ever you define that)

#

you just need to interp the RootYawOffset back to 0

trim matrix
worthy frost
trim matrix