#blueprint

1 messages · Page 163 of 1

lunar sleet
#

Oh right, Update ticks duh 🤦‍♂️

barren tangle
#

But if i put the forLoop inside the timeline, i will execute the forLoop for each timeline tick.

lunar sleet
#

That’s what you want no?

rugged merlin
#

You're trying to move an array of actors, right?

barren tangle
#

array of instanced static mesh

rugged merlin
#

On every update of the timeline, loop through all the elements in the array and apply whatever updates you're doing to them

rugged merlin
#

Are we allowed to post forum links in here?

#

The one I found explains this in more detail

final quest
#

how can play sound on button press , and i having issue overllaping sound on multiple click on same button.
and i want stop sound of button one when pressend second buttton
it inside widget with simple 2 button
first track to stop when press on second button and vice versa

teal tendon
#

Hey I just want to ask something how expensive is it to change exposure compensation in Post Process volume in Realtime in unreal 5, I mean is it practical or find other alternatives in terms of performance

barren tangle
#

it works, thanks

final quest
#

everthing work now but error pop

dark drum
# final quest everthing work now but error pop

Only call 'Stop' on your 'Sound 2d' var if it's valid. You can right click on the variable and convert to a validated get. If not valid skip the stop and go straight to the spawn sound 2d node.

obtuse kraken
#

Can anyone tell me why On Component Overlap and On End Component Overlap both go off when overlapping the corner of a box collider?

hoary junco
#

how do you make it so that when you have items in your hands and they are out in front if you, they don't just clip through a wall when you run into it? I know there's the trick of putting an image of the weapons you're carrying onto the screen, but there's surely other ways around it considering there's games where light will react to the objects like they are 3d

real notch
#

I have 2 transforms and I want to know if they are more or less pointing at each other, with a max offset of some angle, I think 10 degrees. Any suggestions?

#

I have the dot product, I guess I could use that.

#

That works actually... Thanks 🦆

dry sleet
#

Could otherwise always make an animation where the weapon is held up inside the player collider, when close to a wall

hoary junco
modest monolith
#

why sound 2d don't play? I mean I don't hear them...this is weird.. the rest of the code plays

willow plover
#

I am trying to cast to a task in a behavior tree and get the "Is attacking?" variable I set there what do I plug into object

untold ivy
#

How can I manually enter a value in that array? In this case I need a single value to enter in that array.

echo tendon
#

Tiro here. I'm seeing Blueprint pure function, it seems like it only has troubles, why is it designed like this? Could it bring performance benefits?

#

😵‍💫

#

https://www.youtube.com/watch?v=H-dA7tGQnBc This video mentions many of its pitfalls…

In this episode of be a better game dev, we will be looking into the pure functions.

Be a better game dev playlist: https://www.youtube.com/playlist?list=PLNBX4kIrA68nX9tTCMbuBM8up9JVq29fv

Join the Discord server here: https://discord.gg/zBeebU7uv3

Support the work of LeafBranchGames on Patreon here: https://www.patreon.com/LeafBranchGames

▶ Play video
celest acorn
#

hi i may be being stupid but im in my player character and cant seem to set the health of my player, it will only let me get the variable.

echo tendon
echo tendon
celest acorn
lunar sleet
#

First pin here explains it

finite hearth
#

Under what conditions would a string be lowercase in a packaged build, but Title case in the editor?

The string is set in the widget construct, and comes from a data table

Left=editor, right=packaged

echo tendon
lunar sleet
trim matrix
#

you shoouldn't even care about that anyways

echo tendon
thin panther
#

honestly it's probably mostly for graph cleanliness

echo tendon
trim matrix
#

for timelines

thin panther
#

you know it's not doing anything that modifies the state of an object, but mostly it's just so you can make a graph without execution wires everywhere

#

As Neo said, it's essential to know how it works

young meteor
#

Hey guys
If I use a Multi Line Trace like this, will I get the actors in order from closest to furthest from "start point"?

Because I want to stop the loop if I hit a barrier.

trim matrix
thin panther
#

Pure nodes can bite you sometimes, in the cases of lerping or random numbers

thin panther
echo tendon
#

😺 ❤️ Thank you both

lunar sleet
thin panther
young meteor
dusky cobalt
#

Is someone good at math and looking for challenge? I'm trying to create dynamic formations, based on how big the square that we drew was.
Right now I have something like this, but this is only ''rectangle'' formation that is calculated based on where we clicked (it adds offset for each unit).

What I'm trying to make is to create dynamic rectangle that will automaticly put the locations based on how big it was.
Do you think this will be hard to achieve? I'm so bad at math xD

lunar sleet
thin panther
thin panther
#

Then yes, it should be fine, might want to just print the distance of each though to ensure it aligns with your expectations

faint pasture
dusky cobalt
faint pasture
#

move it to game math right quick

young meteor
spring osprey
#

hi, is there a way to make these work together? i use S item data to control the things I add to my inventory but a tutorial I was following for a store npc uses integer for that, is there any way to convert it to s item data

rose crest
stoic ledge
spring osprey
stoic ledge
#

@spring osprey ok its 'F' item data. any way ur gunna have to rework that int. im not sure what it represents, but when u choose an item you need to pass that struct 'item' from that point all the way into your inventory, instead of the int

#

i guess its money. and your money is an item same as any other item?

spring osprey
stoic ledge
#

no sorry. im just failing to grasp it, heh

#

@spring osprey are you trying to plug the 'item id' into the 'item'?

spring osprey
#

yes

stoic ledge
#

essentially, you have to click the 'ButtonClicked' event and chage the variable 'Item ID' to 'Item' which will break the inputs all the way back.

#

Then redesign the logic to pass in the 'Item' instead of the 'Item ID'

spring osprey
#

should I change it to item or the s item data structure i did?

stoic ledge
#

@spring osprey there maybe another solution, if the 'item id' is the index of the item in the store, that also has a 'Item' struct, you can reference the store point to the item with the index, get the struct, then pass it into the 'add item to inventory function'

stoic ledge
#

@spring osprey this is you item from the store?

#

@spring osprey you need to do that here

spring osprey
stoic ledge
#

you seem to have two definitions of what an item is. one from the 'ItemData Table', and one from your inventory 'FItem'

#

a data table is a static list of information, and a structure is a grouping of variables.

spring osprey
#

yes I use that data table to show an item in the shop ui

stoic ledge
spring osprey
#

mmm okay so what shoul I do? something like this?

#

(I know nothing about UE)

gritty palm
#

Hi, I am building a 3D main menu/Store/Options etc. I have one level named Main Menu. I also have a blueprint Named BP_MainMenu. I have my 3D objects and functionality nodes inside this blueprint. Initial I duplicated this blueprint, changed it a little and named it BP_Store. When you press Store button in the BP_mainMenu, BP_mainMenu will be destroyed and BP_Store spawns.

I was thinking to have all these blueprints(Main Menu, Store, Credits, etc) inside Main Menu level and add bunch of camera in front of each one and just shift the player camera.

My question is which approach is better performance-wise? (I think the first one is better)

stoic ledge
spring osprey
grand cedar
#

Hi Everyone, Hope you are having a wonderful day. Although I am not. I am working on a FPS game and I am fairly new to Unreal. I am trying to switch between AnimInstance class on runtime. I am able to do it just fine but if I play a montage before doing that the engine crashes and gives me this error "PostAnimEvaluation already in progress". Does anyone know whats wrong with my approach?

stoic ledge
# spring osprey and which one do u think would be better?

depends, structures in bp can be annoying. and if you want to use them for dynamic purposes becomes more complicated and daunting. but on the other hand data tables are static, and need to be defined. but tables are id say, the general approach.

spring osprey
#

and there is no way of using both? because the data table uses the s_itemstructure of the shop, i mean, changing it to s_itemdata shouldn't make both work?

stoic ledge
#

@spring osprey you can use both, but you are crossing into the complicated and daunting territory.

spring osprey
#

@stoic ledge mm so if I wanted to use both what should I do?

#

because when I try to change the interger to s_itemData a blank item appears when buying, no info or anything

stoic ledge
# spring osprey <@975482789392695307> mm so if I wanted to use both what should I do?

Let me describe the differences a little more. If your item was purely data table driven, well use a sword as an example. this sword would be: of a type, do x, y, z damage, have an actor, and a thumbnail etc. on the other hand, the sword built with the struct would be: of any type, could do x-z damage, have any actor, and any thumbnail. essentially the struct allows you to maniplate any aspect of any variable youve used to define the "item" and the data table is a predefined list of "items."
In most games, you have a weapon as in a data table and u can apply certain things like buffs that are also defined in data tables, thats why they are always like +1 +3 +5, and no variations.

#

@spring osprey your problem here is they arnt the same.

#

Now if you wanted to use both, id say that, what ever data doesnt change would sit in a data table, and what ever data does would be a variable in a struct. But the struct would also include the datatable "Item ID" to associate the two together.

#

@spring osprey

#

@spring osprey once youve done any of that this whole BP is going to get "eh hem" broken.

spring osprey
#

@stoic ledge so should I make that in the first pic or in the second or in both?

stoic ledge
#

@spring osprey show me how your store knows what items it has, and how you invenetory knows what items it has. Id guess ones an array of 'Fitems' for the character and the store is an array of 'Item ID's'

main flume
#

Hey. So I have a player pawn and an AI pawn. I want the AI to steer towards the player (a value between -1 and 1) how can I achieve that calculation of how much should be steered?

stoic ledge
spring osprey
stoic ledge
main flume
spring osprey
stoic ledge
#

@spring osprey OK, notice how the stores inventory is a data table with the predefined items listed in them, and your character inventory is a Map of Name:Items. Both inventories need to be the same. the easiest method for the game to compile would be to change the character inventory to the same style as the stores inventory.

normal ether
#

Hey Everyone,

Im struggling with integrating my C++ code with my Blueprints.

I created a field like so:

UPROPERTY(EditDefaultsOnly, Category = DataTables) UObjectLibrary* tileLibraryReset;

Which created the field in my Blueprint (screenshot below). I populated this field of an Object Library with one I created that contains basically a list of blueprints.

However when I run it through a debugger, it is showing this OBject Library as always being null. Is there some trick to this to get it to pick up what was set in the blueprint? I did compile and save the blueprint.

stoic ledge
normal ether
#

Ive created the object library and added it to the blueprint.

Is there a step I am missing?

stoic ledge
normal ether
#

Oh so not only do I need to create the library and add it to the blueprint. But initialize it like in your example in the BeginPlay() function?

stoic ledge
# spring osprey and how can I do that?

Well. the easiest method for the game to compile would be to change the character inventory to the same style as the stores inventory. the harder way is to create the same inventory your character has on the store actor / object, then rework the entire process of the characters interaction with the store to reflect the new inventory.

spring osprey
#

mmm okay

main flume
#

Hey. I have a player pawn and an AI pawn. I want the AI to steer towards the player (a value between -1 and 1) how can I achieve that calculation to steer towards the player/how strong to steer to the player?

#

Really cant seem to calculate it right, AI always does smth funky and doesn't steer towards the player

pale imp
#

Why can I not send a message using these interfaces specifically ?

inland walrus
#

Any idea on how I can create a rollerblade type movement?

ruby tendon
#

I am really struggeling with making a simple boat ocntroller. i am trying to attach the player actor to the boat actor with the socket. but for some dumb reason it doesnt recognise the socket placement. (last pic is the location where i get attached. which is way lower then the Socket i use)

#

i also tried adjusting the socket to a really different location, but nothing happens. it seems as if the socket doenst get recognized

#

anyone know this is a bug or something

tired tartan
#

how do I get a variable from a c++ blueprint?

drowsy kestrel
stoic ledge
tired tartan
stoic ledge
#

the definition allows to edit the variable in BP in the class it was defined

drowsy kestrel
tired tartan
#

how do I do this function in c++?

maiden wadi
crude dew
#

Hi, Can someone tell me the best way to auto destroy a actor after its travelled a distance ? I,m spawning a projectile but it keeps travelling if it hits nothing and doesnt auto destroy itself, So am looking for a way to do this. ,

I did think about using Tick to check distance travelled between player and projectile and once it reaches a distance it auto destroys but if they have a lot of projectiles on screen I think it could be quite costly having a tick running for each projectile on screen

Or maybe using a Set Timer By Event with a short duration (2.0) or somehting looping to check the distance travelled

maiden wadi
crude dew
#

Thanks for the reply, How would you go about setting a Lifetime value on the actor?

#

would this just be a variable which is increased over time on tick and then once surpasses a value destroy the actor or is it an actual function within the Actor class? 🙂

#

Ahh Initial Life Span

#

Hmm this says "Should NOT be modified during gameplay"

#

So if player collects a Range Increase I cant dynamically change this value from say 5s to 7s to get extra distance

lament iron
#

i guess the only way is to create a timer event on begin play to check whether a value surpassed the max travel speed

maiden wadi
#

You can just call SetLife..Span?Time?

#

I don't remember which one. All it does internally is exactly that, sets a timer. Kills the actor when done.

crude dew
#

I,ll have to check. 🙂

#

Ah can do that. 🙂

#

i was just worried from the warning "Should nto be changed at Gameplay" from the tooltip

maiden wadi
#

That warning might also be ancient. There's nothing wrong with it. It's literally a timer If you change it, it'll kill the timer and restart it with the new time.

crude dew
#

Ahh ok, Thanks for the info!!

maiden wadi
#
void AActor::SetLifeSpan( float InLifespan )
{
    // Store the new value
    InitialLifeSpan = InLifespan;
    // Initialize a timer for the actors lifespan if there is one. Otherwise clear any existing timer
    if ((GetLocalRole() == ROLE_Authority || GetTearOff()) && IsValidChecked(this) && GetWorld())
    {
        if( InLifespan > 0.0f)
        {
            GetWorldTimerManager().SetTimer( TimerHandle_LifeSpanExpired, this, &AActor::LifeSpanExpired, InLifespan );
        }
        else
        {
            GetWorldTimerManager().ClearTimer( TimerHandle_LifeSpanExpired );        
        }
    }
}```
crude dew
#

Ye looks like basically does what i was thinking about doing but why reinvent the wheel?? 😄

dawn gazelle
# crude dew Hmm this says "Should NOT be modified during gameplay"

That warning is in relation to "Initial Life Span" which isn't the same thing as "Life Span".
"Initial Life Span" is like pre-determining when an actor will be destroyed before it is spawned, so it doesn't really make sense to change it during run time, nor would it probably do what you want it to do.
"Life Span" however, can be set at run time, and additionally change the remaining Life Span of the actor.

dreamy sail
#

Hello.

Does anyone know what I'm doing wrong here ? this is a level blueprint, that it's supposed to transition to the next level once the collectibles in it are all collected.

I created an interface to access the game mode ( from what I understood, ChatGPT told me, the level blueprint cannot cast to the game mode, that's why I created the BPI )

but I still have the same issue, nothing happens once the collectibles are collected

#

this is what I'm grabbing from the game mode blueprint.

#

also, if I do this through the character blueprint, it works perfectly, with Cast To Game Mode

maiden wadi
dreamy sail
maiden wadi
#

Is there any reason your game mode isn't handling this itself? I feel like your game mode should just get all collectibles, bind an event to when they're collected. If CollectedAmount > Needed then open new level.

stoic ledge
#

in my character BP, when i test IsServer. it returns true, why is that?

maiden wadi
#

Character and level shouldn't matter. Collectible and GameMode should have all of the logic it needs.

maiden wadi
dreamy sail
maiden wadi
#

Listenserver host is also a server, so possible.

dreamy sail
#

I'm just getting a lot of wrong infomration from ChatGPT and I'm a noob myself, so yeah.. i don't really know what I'm doing tbh

surreal peak
#

Using ChatGPT if you are a beginner is a really bad idea

maiden wadi
#

I've used it to get very vague non UE specific implementation ideas out of, and even those you have to really rework. But I'd never trust it to get UE stuff correct. It repeats stuff other people say and other people say dumb things. Like that you can't cast to the game mode from the level blueprint. :/

surreal peak
#

You need to have a good understanding of UE to use ChatGPT with it

trim matrix
surreal peak
#

Cause you gotta strip the shit it tells you away from the little good stuff

surreal peak
trim matrix
surreal peak
#

@dreamy sail this code should not be in the LevelBlueprint to begin with

#

You should also almost never copy paste code

#

If you do that it's uuuuusually a sign for something being wrong

#

At least more complex code fwiw

#

The code should go into the GameMode or GameState

tired tartan
#

how do I get child component by class?

surreal peak
#

ChildComponent by class?

tired tartan
#

yeah

surreal peak
#

What child component

tired tartan
maiden wadi
#

There's no such thing as a Child Component. Just a component.

tired tartan
#

like this but the target component is component

wise ravine
#

can I use a gate, then close it after a delay instead of this method (doesn't allow the player to spam a button)

surreal peak
#

But it will ultimately just loop over them anyway. Might as well do it by hand

maiden wadi
#

Probably this? GetChildrenComponents

spring osprey
#

any help on why is this happening?

maiden wadi
#

ConnectedActor is null. Not set to anything.

surreal peak
topaz condor
#

Hey guys, i built a main menu that has a splash screen and it works fine, problem is i have a pause menu in game and when i click back to main menu it plays the splash screen over. any ideas?

wise ravine
topaz condor
#

this is all i got on pausemenu

surreal peak
#

Cause the timer is reset every time

wise ravine
maiden wadi
#

Anything in Actors/Components/World is tossed at every OpenLevel. Everything is torn down and destroyed. Engine and GameInstance, and Player along with a few other core things are all that really persist.

topaz condor
#

so just create a gameinstance?

maiden wadi
#

Sure. Get it in your widget and check if something like bPlayerHasVisitedMainMenuOnce is true. If false, show the splash screen and set it to true. Else do the other logic. Same as you were above, but pulling it from the GI.

tidal tendon
jade gorge
#

how to remove these lines please help

tidal tendon
#

arent these editor grid lines?

topaz condor
maiden wadi
#

GetGameInstance and cast it.

jade gorge
dreamy sail
dawn gazelle
dreamy sail
#

I tried to handle the level switch differently before, with an array and a different logic, but that breaks my save/load system because I also have a MainMenu that is a separate level by itself... long story short, those 2 systems didn't work properly together

dreamy sail
# dawn gazelle

so then, if I do it like this, in the game mode, what do i need to add for it to know what level I'm currently on, and what to switch to ?

topaz condor
dreamy sail
topaz condor
#

it works fine for me so thank you, just checking if this was the route you were talking about

dreamy sail
# dawn gazelle

sorry, I'll try to simplify my question. how can I make it so it does this :"If the current level is 2, then the level to open should be 3". and so on..

dawn gazelle
# dreamy sail so then, if I do it like this, in the game mode, what do i need to add for it to...

I would probably handle it different even from this, but it is an example that you don't need to use the level blueprint to have some logic based on the level itself.
You are in control of the level names and what order you want them to be in. The example I gave will check the current level name, and perform whatever action you want when it's on a level with that particular name. Try printing out the "Get Current Level Name" return value and you can see exactly what your level is named, and you'd enter those names into the switch and then have whatever logic you want.

What is not so great about this method is that you're tying logic to the name of a level. If you happen to change the names of levels, then it can throw this logic out the door and require you to find any instances of this kind of switch to correct it and makes it difficult to swap things around if need be.

A better approach may be to use an variable in the game instance that you increment on begin play of your actual gameplay Game Mode, then reads a data table row to know which level comes next. If you go back to your main menu, then your Game Mode should reset that incrementer variable back to 0.

#

Your data table row could store a soft reference to the level, perhaps its name, maybe a description, maybe a max score count to reach the next level or other variables that are level related that you can then easily tweak in the data table rather than having to open up the level to change the value.

dreamy sail
#

this is my previous logic , do you think I can use this to accomplish what you said here:

"If you go back to your main menu, then your Game Mode should reset that incrementer variable back to 0."

?

this was my only issue with this logic, the fact that if the player goes to MainMenu (which is not part of the array) in between levels, then the system will think I'm still in level 5 for example. Where it gets confused, it's when I open a New Game from the Main Menu, which is just a node to Open Level By Name ( level 1 ), then the system will jump to level 6 once level 1 is completed

#

so basically it will always remember whatever level I reached after the first time the system starts from scratch( level 1 )

haughty snow
#

Bit of a theory question here - if I have 20 spinboxes that I need to get the values of both (1) at a certain point and (2) in real-time, what is the best way to organize that? Right now they are grouped into 5 different vertical boxes, so I am making an array of the 5 vertical boxes, then iterating across each of them to eventually get the values of each spin box

#

Only other thing that is coming to mind is literally binding each one to a float variable

dawn gazelle
trim matrix
#

Hey guys, Is there any way to get clicked actor's interface?

odd kiln
trim matrix
odd kiln
trim matrix
trim matrix
#

this might be a weird question, but is 20 bucks a fair price for coding a movement system where the player can build momentum by doing certain actions (wall running, sliding, etc) and have this momentum decay when not doing any of those actions

thin panther
#

no

trim matrix
thin panther
#

depends on your skill level. A proper implementation of a system like that could be tens of thousands

#

depends if you're going barebones or full in depth in multiplayer with CMC extensions, and replication and prediction and the likes

trim matrix
#

that brings me to another question, does it make sense to code an initial prototype without worrying about all that multiplayer stuff, and then work on adding multiplayer after you have a working prototype, or should you code multiplayer stuff in from the start?

dreamy sail
# dawn gazelle

how can I trigger the proper Open Level event each time, since there will be only 1 "Collectibles Collected" event, sorry I'm a big noob

thin panther
#

from the start

trim matrix
#

rest in peace I have literally zero idea how to do that

dawn gazelle
#

If need be, have your collectables register with the gamestate or gamemode so that it knows the total amount, and signal again when they've been collected by the player and during that signal from the player you check if the total collected == total registered and if so, you can call to open the next level.

dusky cobalt
trim matrix
dusky cobalt
#

if its literally what you are saying, then it's pretty simple, but anything more you add to it and it's not simple

trim matrix
#

is coding things to work in multiplayer difficult? not really talking about the server aspect and stuff but like getting things to look as close to how they would look in singleplayer.

dusky cobalt
#

if you just starting with multiplayer check all pinned messages

#

and it's not that hard if you know blueprints

#

you just have to think what you want to be done only on client, what info you want to make sure goes trough server, and what things are multicasted

#

and some things you want to be done as all xD

#

it's getting complex when you are trying to make mmorgp for example

trim matrix
#

I'm trying to make a movement focused roguelike with coop

dusky cobalt
#

it's not much but can get complex depending on your systems

dawn gazelle
cyan berry
#

is there a help forums channel here per chance?

trim matrix
trim matrix
dusky cobalt
#

check GameDevRaw multiplayer tutorial on yt, this guy explains everything and even makes whole game in multiplayer

#

together with lobby, starting menu etc

cyan berry
trim matrix
#

I'm def more into the design part of game development

dusky cobalt
trim matrix
cyan berry
dusky cobalt
trim matrix
dusky cobalt
cyan berry
#

ive been at this for a little over an hour without avail, i started work on this inventory system and it looks like i got everything right, i just keep getting this error
nothing seems to be wrong with the generate slot widgets function, ive checked
also it seems to be because the branch thinks the array doesnt have anything in it, although this function in the inventory bp clearly adds stuff to it

#

here's the code for the generate slot widgets

trim matrix
dawn gazelle
austere ridge
#

I have a widget attached to an actor. This actor has a collider which when the player enters sets the value of the widget as visible. However as soon as this happens the widget briefly appears and then disappears once. Entering the collider again does not show the same behavior until the game is started again,

dawn gazelle
dawn gazelle
#

If BPINVENTORY isn't set with a value you get an "Accessed None" error, which means you can't read the array from it.

chrome crag
#

Im making a fishing game and need to make my fishing rod cast a line out to the lake (it doesnt need to float with a bobber) but I was trying to use a cable component.. not sure what the best way to do this is

dawn gazelle
chrome crag
#

Thats exactly what I want thank you

#

I notice you dont use projectile movement component

austere ridge
#

Does anyone know how to prevent widgets from disappearing in such a scenario

lament nacelle
#

Hello, my Blueprint Interface implemented Event call always change to a Custom Event after restart the project. Does anyone know how to fix this?

dawn gazelle
#

Any variables declared on the parent also exist on the children, so yes, if you want to access those variables even though the object could be a child of that parent class, you can still access them like this. If you had additional variables declared on child blueprints that you were trying to access then you'd need to cast to the child in order to access them.

normal ether
#

quick question,

If I make a row structure in C++ can I use that to construct a data table blueprint in the editor?

steel star
#

What am i doing wrong here..
It is possible to have two levels of inheritance, of just blueprint classes, and have the base one's beginplay get called, right?

#

As in, C++ class Ship (parent AActor) >> blueprint class BaseShip (sets up stuff they all need, in beginplay) >> blueprint class Fighter

#

Because i do not see BaseShip's begin play called.

dawn gazelle
steel star
dawn gazelle
#

Interesting, right click on the begin play node in Fighter and there should be an option on it to "add call to parent" or something like that.

steel star
#

uh from the red box for delegate?

dawn gazelle
#

just on the begin play event itself

#

That should give you a yellow node, just hook that up to Begin Play and try again.

#

Though i was under the impression if you didn't override Begin Play in blueprints it would automatically call the parent.

steel star
#

hmmm

#

that at least got it to show as being called in fighter

#

it does not 'show' as being called in baseship

#

despite simulate enabled

#

it logs text though

#

i guess the issue then is i just cant debug it for some reason in the editor

#

@dawn gazelle thanks i worked it out finally, i had no idea the dropdown for debug object was even there, for some reason it was assigned to what i expected for the fighter but not the base, which .. makes sense theres more than one of them

#

knowing that it was for sure occuring -somewhere- let me work it out

dawn gazelle
#

I definitely works in actual play mode - you can have the parent class selected and select the children from its list to see how they're executing in the parent.

#

Guess it's a limitation of simulation

topaz condor
#

If i connect the line trace straight to the play sound at location footsteps work but the way i have it in this blueprint it does not, does anyone see anything wrong in this blueprint?

#

i have physical materials set in the project settings and a physical material to each ground material

surreal peak
gloomy swift
#

The blueprint functions to save and apply game settings aren't persisting after the game restarts

#

The functions (apply settings, save settings) isn't updating GameUserSettings.ini in appdata in a shipping build

teal tendon
#

Hey I just want to ask something how expensive is it to change exposure compensation in Post Process volume in Realtime in unreal 5, I mean is it practical or find other alternatives in terms of performance

dark drum
dry sleet
#

At any rate any alternative implementation will probably be equally slow.

teal tendon
#

ok

dreamy mountain
#

Hey so I'm trying to make this text change, it's a widget blueprint, but idk how to make it work; it just doesn't, idk

#

Sorry for the bad camera quality, don't have discord on my college PCs

#

It just doesn't show on the screen, I'm guessing the text itself isn't showinf

manic vessel
#

I really need help, with this . I Am attaching picked up Actors to a player hand with a relative transform position so the grip pose fits the held item . But Now I want to do it the other way around and attach the character hand directly to a weapon attachment thats on a weapon, and possibly use that same transfrom, But Im having a hard time and getting all kinds of mixed results. here is where I am

small gyro
#

anyone else notice vector variables are weird, they always seem to zero out when passing them
the other day I couldn't transfer any data from a vector array via function or event and the only way I got it work was to create a struct with just a vector array and pass that

now I'm having the same issue with single vectors, not passing through spawn expose or through interface

frosty heron
#

I don't recall to have any problem with vector

small gyro
#

the line trace finds a potential location that's fine I pass it to either a exposed on spawn vector variable or through an interface and it zeroes out on the other end
it's weird
just a simple start location of a projectile

frosty heron
#

Show a picture of your blueprint

small gyro
#

not much to show vector goes in with a value and comes out the other side as zero

frosty heron
#

Well sometime people tend to make mistakes. I had discussion with someone previously whom don't want to share images and insisting it's bugs. After 30 mins he shared and straight away we noticed how he messed up.

#

If you give material for people to work on, your chance of getting help goes up.

small gyro
#

I tried with pass by on and off no difference

dreamy mountain
#

hey so im trying to make a buyable door, but for some reason i can buy doors from a while away, while having never been inside its collision; anyone know how to fix it?

frosty heron
#

Not gonna look thru everything but my advice now is to cache your result from the line trace

#

And use that variable when you want to pass it somewhere

small gyro
#

I've figured it out it was a timing thing...because of course it was

frosty heron
#

@dreamy mountain invest your time in making interaction system. I would scratch everything here

#

To buy something you shouldn't need to get a direct ref to the object like the door or wall in your player bp

#

Player interact-> hit object -> object is buyable -> attempt to buy

dreamy mountain
#

that, and perks, so definitely something to look into

lethal pollen
#

Hi!

#

If I have a variable of an enum type, how can I compare to a value of that enum (==)?

#

Thanks

frosty heron
lethal pollen
frosty heron
#

Don't compare the byte

lethal pollen
#

I don't know what I have to pin in the 0

frosty heron
#

Compare the enum

lethal pollen
#

Yes. I don't know how to do that: compare the enum.

frosty heron
#

Enum is integer with name

#

Drag from the enum and type equal then show picture

lethal pollen
#

Because I can't get the node. Which node is to compare the enum?

frosty heron
#

Drag from the enum and type equal

timid rock
#

drag out from "puzzle state" and type =

frosty heron
#

Type equal

#

The literar word

timid rock
#

oh, my bad

lethal pollen
#

Sorry

frosty heron
#

Well I don't have editor on me

timid rock
#

It's okay

lethal pollen
#

I've found it:

timid rock
#

nice

frosty heron
#

👍

lethal pollen
#

Thank you.

#

I always get blocked in the easiest things.

timid rock
#

everyone does sometimes

solemn folio
#

i created a new pickup system for my guns but i want all of the individual gun actors to have their own functionality, and be a able to shoot with them once equipped. i tried doing that with a Boolean IsEquipped and every time it is picked up , set it to true, and i created another branch statement that checks if IsEquipped is true and then shoots. nut for some reason its not working, can anybody help me with this

remote rapids
#

hey i have a question
i want to develop mobile game

sinful hinge
remote rapids
drowsy steppe
#

Hey guys, I'm trying to smoothly rotate a selected object with the mouse wheel, clockwise with the wheel down and the opposite with the wheel up. I did it like this but it works only the first time. With the value in the timeline being set to 90 it's a problem. How can i do it that it keeps rotating smoothly every time i scroll the mouse wheel? i know it should be simple but i'm still learning

sinful hinge
remote rapids
#

i know

#

but how can i make sure that i am in landscape

#

that when i will open the app so that will automatic rotate to landscape

sinful hinge
#

by changing the setting to landscape ?

frosty heron
drowsy steppe
remote rapids
#

when i will open the app so that will automatic rotate to landscape

#

how to confirm that i did that?

thin panther
#

by changing the setting to landscape, packaging then opening the app

faint pasture
drowsy steppe
thin panther
faint pasture
#

you're like double interpolating here

#

how is building rotation rate set

drowsy steppe
#

sorry, it is set 90

sinful hinge
solemn folio
sinful hinge
solemn folio
#

ok yeah. i already wathced the beginner one so after this its the advanced one

dusky cobalt
somber elbow
#

Guys, I m new here. I have a problem here and really need your help. I have a character blueprint and I want to make him jump if he overlaps a box collision component of another actor blueprint. The problem is i dont understand how to cast to that component properly. I know this topic appears very often, and i have watched related videos on YouTube. But for me its really a rocket science. Please help. Thank you so much!

faint pasture
# somber elbow

Start with getting the trigger actor to print something if a character overlaps it

#

do it from the trigger actor

#

the character doesn't have to detect the collision, the trigger actor can

somber elbow
#

Hey man. I already have that trigger actor inside my actor blueprint

#

so basically Im trying to call that platform box collision from the whole blueprint

#

and i have a capsule inside my character BP. So whenever character overlaps box collision of another BP it should jump. I successfully csted it to the whole platform BP. But i need to cast exactly to that component collision box.

heavy hemlock
#

Is that true?

somber elbow
#

yep

heavy hemlock
#

That's generally not where you build levels.

#

Usually you build levels in maps.

somber elbow
#

Its just a sample with platforms which endlessly appears

#

So its not kinda map. Its Just a mechanic. Im making a clone of doodle jump in educational purposess

civic ibex
#

Hi community. Any idea how to get convert to pure (purecast) back here? I installed 5.4, uninstalled it, and it seems I am no longer able to access convert to pure.

heavy hemlock
#

That will give you the component.

#

If you then need the actor from that, you can call 'Get Owning Actor' on the component.

somber elbow
#

It works basically but I need to trigger animation of jump ONLY when overlapping the specific platform collision box, not the whole blueprint like its happening righ now

#

I just dont understand how to cast to that component in another actor bp

heavy hemlock
#

So your map BP cast fails?

#

Or does it pass?

somber elbow
#

It works now, but it casts on the entire BP. I just need a component of it.

heavy hemlock
#

You can get a component from a BP.

somber elbow
#

Yeah , the problem i dont understand how to do that lol

heavy hemlock
#

So if you drag off of the Cast to BP_Map_01's result. The 'As BP Map 01' blue pin, and you type in 'Get', you should see a big list of stuff, but your component should be in that list.

#

To be clear - this is very much not really how you should do any of the things you're doing - but this does answer this specific question.

somber elbow
#

Thank you so much Squishy! Im trying to do what you said right now. I just started from the tutorials and guy there made it that way. I just trying to make it more complicated. What should i google or read to make things right?

heavy hemlock
#

Oh gosh, really? There's a tutorial that suggests making a level inside one blueprint?

#

Wow.

#

Ok.

#

Choices were made!

somber elbow
#

Im new in blueprints, so i have no idea how to make things right.

#

Step by step tutorial on how to create mobile game in UE4.
Unreal engine mobile game tutorial.
How to make Doodle Jump in unreal engine.

00:00 Intro
00:39 Preparing project
03:23 Creating walls with jumping mechanic
10:34 Gyroscope
12:27 Endless map generation
19:49 Camera
23:36 Materials
27:10 Teleporting from the side of the screen
33:03 Ki...

▶ Play video
heavy hemlock
#

OK! Sure! I'm sure it's a fine tutorial and I'm being unnecessarily judgemental!

somber elbow
#

im a 3d modeller, not a programmer so im trying to figure out how to deal with it 🙂

dusky cobalt
#

Should I change these ''is Shift Down'' to a Enhanced Input if I want this command to execute for example, when holding mouse + shift ?

#

or do I create another IA_MouseShift for example and go from there?

heavy hemlock
#

I think the idea with enhanced input is to create input actions for each specific kind of action, so yeah. IA_Mouseshift is, I think, the designed method.

#

Though - I would call it the name of the thing you're actually doing.

dusky cobalt
#

For context I'm starting to have a little bit of spagetti (although I keep it clean)

glass blade
#

Umm...Everything was working when i previously closed unreal now i get this compile error

dusky cobalt
#

and before every ''Issue or Handle'' inside is a branch that check if something is ok

#

it works without problems, but I wonder what future holds 😄

glass blade
#

"not compatible with actor object reference"

dusky cobalt
heavy hemlock
#

I am going to assume you know how to use input actions, how to connect them to action maps, and where to connect it when I say 'Yes'.

somber elbow
heavy hemlock
#

You're OK.

lofty rapids
dusky cobalt
# heavy hemlock I am going to assume you know how to use input actions, how to connect them to a...

Okay, yeah I more or less know.
The only thing I'm wondering is. I'm thinking about doing something a little bit different, because I kind of have let's say 1 button do something, but only if something.
So in the end. 1 button has 3 functions, based on 3 branches.

So 1 button > if if if > do do do

Is it valid to actually make it more separate like:
I take 1 button, copy paste it 3 times, and create 3 ''events''.
So like every ''function, event, sequence'' that is supposed to happen would have it's own line. Is it valid to do it like that?

#

to picture it

heavy hemlock
#

I think that's generally the idea, if the 'ifs' in your example, are control related. Like 'If you click this button and hold shift then do x'.

If they're gameplay related, like 'if you click this button while at low health' - then it's more vague.

#

I would strongly not do that.

heavy hemlock
glass blade
#

@lofty rapids

heavy hemlock
#

Because they're all the same action.

#

If they were all different actions, and had different trigger conditions, then yes.

dusky cobalt
lofty rapids
dusky cobalt
#

Yeah they will be different actions but with the same button

glass blade
heavy hemlock
lofty rapids
#

so thats the problem

#

you could cast and then set, or just make the variable an actor

heavy hemlock
#

You create an action when it is an action the player can do. Jump, fire a gun, move a unit.

#

The action is the important part, not the specific mapping of controls.

#

So, you would not have 'IA_LeftShift'.

glass blade
#

what should i cast to?

heavy hemlock
#

You would have 'IA_ToggleCommandMode' or whatever it actually does.

dusky cobalt
#

Yeah, for the input actions I try to name them what ever they do.

#

But then, does it mean, that I should create the same function (like Left Mouse Button) 3 times, as different InputActions?

heavy hemlock
#

Unless the character in the game that you're controlling is clicking with their left mouse button - no. I wouldn't make that an action, and I wouldn't set it up the way you're suggesting.

dusky cobalt
#

and call them
IA_Select
IA_Command
IA_PlaceBuilding

#

It's rts game so you do everything with mouse clicks basically 😄

heavy hemlock
glass blade
heavy hemlock
#

I would maybe have a 'toggle multi-select' action for shift.

dusky cobalt
#

Ok, so I just have to use branches and try to make that logic?

heavy hemlock
dusky cobalt
heavy hemlock
#

But yeah, I would not directly reference 'left shift' for the selection toggle.

#

But for clicking, yeah... it's all gameplay state stuff, and I don't think using the action system for that would help.

lofty rapids
trim matrix
#

Is there a way to have an event, that when fired, multiple actors subscribed to that event can see it?

#

Like not blueprint interface or custom event, where you fire the event or function on a specific actor

#

Fire one event, multiple actors react

somber elbow
heavy hemlock
#

In your 'cast to component' graph - you're not actually doing that.

#

Also - I didn't suggest that you cast to a component.

#

So...

#

I don't know what you're doing.

#

Oh, I have no idea what that variable you're using is.

#

It's almost certainly empty.

#

Unless you're filling it from somewhere else.

somber elbow
heavy hemlock
#

I don't know where you got it from, but that's not the way you do it.

#

Like I said - drag off of the pin.

#

Then type the name of the component you want.

#

It should be accessible.

#

I don't know how or why you have that variable in your blueprint, but it is almost certainly full of nothing, which is why it fails to cast.

#

And it wouldn't cast anyways, even if it did what you wanted, because you're trying to cast a component to an actor - which will not work.

lofty rapids
#

can't you use on component ?

heavy hemlock
lofty rapids
#

and cast to the one you want ?

heavy hemlock
#

I don't know why they're not using that.

somber elbow
#

Nope, doesnt work. Looks like i do something wrong.

heavy hemlock
#

That's also not what I'm suggesting.

lofty rapids
#

hmm

heavy hemlock
#

Now you're trying to cast an actor to a component.

#

Drag off the pin, and type in the name of your component.

#

It should be in the list.

#

Also - you need to connect 'Other Actor' back to the cast node.

lofty rapids
#

your casting nothing

somber elbow
#

yeah see now

#

Just want to clarify, what is pin here among these 5 pins

heavy hemlock
#

"As BP Map 01" contains, if the cast passes, an instance of your blueprint class. That blueprint class has, as a variable, all of it's components.

#

So, the component you're looking for, should be on that node.

somber elbow
heavy hemlock
#

No, again sorry no.

somber elbow
#

damn

heavy hemlock
#

For some reason you have a variable on whatever blueprint this is, with that name.

#

I don't know how or why that happened.

#

But it's not good.

somber elbow
#

oh

heavy hemlock
#

You don't want that one. You want the one from the BP Map 01 node.

#

I really do wish sometimes that Epic had maybe not decided to use visual scripting. I cannot help but think that this whole conversation in Godot would have been.

"Oh yeah, you just use a dot."

map_01.platform_spawn

somber elbow
#

It should be somewhere here?

heavy hemlock
#

It's Get Child Component, I think.

#

As components are children of their actors.

somber elbow
#

these nodes?

heavy hemlock
#

OK, no.

#

You can delete the 'Get Child Component' node I think.

somber elbow
#

damn

heavy hemlock
#

But keep the Playform Spawn 01 one.

#

I think this node was in the list but further up. It should be at the top.

lofty rapids
#

if put the logic inside the other actor it would be as simple as component overlap cast to player

heavy hemlock
#

Which is not a bad reason, because being able to access components of other actors is useful.

lofty rapids
#

makes sense

somber elbow
#

right now it still cast to the whole blueprint and the printstring LALALALA appears wenever character overlaps the whole blueprint but not its component

heavy hemlock
#

You asked how do I get this platform component?

#

And you have it.

#

If you want to only overlap with that component - then you need to use On Component Overlap as the event.

#

Which is the very first thing I suggested.

somber elbow
heavy hemlock
#

On your graph, you have an event called 'Actor Begins Overlap'. If you right click and type 'component overlap' you should see something like 'On Component Begins Overlap' or similar.

#

I can't remember the exact name.

#

That event is what you're looking for.

#

But it will trigger whenever the character overlaps any component.

#

So you will have to filter out to only the one you need.

lofty rapids
#

if you put it on the other actor when the component overlaps with something, then cast to player then call an event on the player that might work like you need

heavy hemlock
dusky cobalt
#
  1. I have HealthBar widget, with Progress Bar and Health Number. They are both binded and healthbar is used for unit over their head.

I also have Selected Unit widget (which is responsive, based on unit that is selected it changes image and reference to that unit).

Can I somehow add under that Thumbnail WB_HealthBar and bind it?
Like is there a way to actually access that Progress Bar and Health numbers ?

somber elbow
heavy hemlock
#

We've already told you two ways.

#

Component Overlap, or doing the overlap inside of the map BP.

#

Both of those will work.

lofty rapids
#

it would be pretty easy just to put the overlapping logic on the other bp

#

instead of the player, and just run an event on the player if you need the logic to be in there

heavy hemlock
#

That is probably the easier way, but neither are hard.

wise sorrel
#

how to make CharacterBP variables accessible in a threadsafe manner for the AnimationBP

somber elbow
#

i want to try both ways just for understanding

lofty rapids
#

you can find the on component overlap in the bottom right of the details when selected on capsule component

#

then try to cast other component to your thing you want to overlap

dusky cobalt
somber elbow
#

i might look like retarded, but i just really do not understand

heavy hemlock
#

Well - you have the platform.

#

And, in your event, you have the component that overlapped.

somber elbow
#

no

heavy hemlock
#

You don't have the component that overlapped?

#

I believe that you have the component that overlapped and the actor.

#

What you need to do is compare the component that overlapped to the component in the BP that is the one you want.

#

If they're the same thing, then you know that you have the specific component you want.

somber elbow
#

that is another method where i put component overlam event in BP_mp 01. I want to force it exactly in Character BP, I will later bring in in Map_01 BP but for now i just want to underrstand

heavy hemlock
#

(again, this is probably not the right way of doing this, the correct way probably doesn't involve physics, or if it does, involves using physics layers)

somber elbow
#

In my charracter BP i want to call a component from another BP Map 01. Just for understanding how to call things from other bp. I got the idea that the best option here to make an event in Map _01 and say ther e that if that platform overlaped by character then it should jump

#

i watched videos about casting the whole week. I want to make it work that way. Even if its not the best way. I want to understand how to cast that component

lofty rapids
#

i'm not sure you even "cast" to a component ?

#

probably get the reference and check if it equals the other component

heavy hemlock
#

Yeah, you'd be casting to the actor, then getting the reference to the component.

somber elbow
#

i brought it to the Map_01 blueprint and it works

heavy hemlock
#

You haven't tried this:

hidden mist
#

Hey guys, how can I find a specific smart object slot to use? I've seen many tutorials, but they all use the "FindSmartObjects", and let a NPC interact with any smart object. However, I want to find a specific smart object to use, as my NPC has a reference to the actor that contains the SmartObjectComponent. However, I can't seem to find a way to get a slot handle with a specific object reference.

somber elbow
heavy hemlock
#

They're the part with filters and requirements.

#

So the actor just goes 'Hey! What can I do!?' And the smart objects are the ones that say 'You can interact with me'.

#

That's... the whole point of the smart object system.

#

The Objects are ones that think.

#

Not the actors.

hidden mist
#

Right, but is it possible to filter a single actor for its slot? So like, I have the actor and its smart object. I want to go "hey actor, give me your interactions"

#

Or "Hey object, what can I do?"

heavy hemlock
#

Like - are you trying to do stuff like "If this character has a hammer, it can hammer nails"?

hidden mist
#

This is what I have: I have NPCs and objects. NPCs can interact with objects using smartobjects. Example: NPC A and Freezer. The Freezer has a smart object component with "drink soda" behavior. In my implementation, the NPC has a reference to the freezer, and wants to get its smart object slot so he can drink soda. I just can't find a way to do this

#

If I have a two freezer right next to the other, it may get both of them with the FindSmartObjects. I don't want that. I want the NPC to interact with a specific freezer

heavy hemlock
#

Then you shouldn't use smart objects.

#

The idea is that the character doesn't choose.

#

The character is not the decider with smart objects. The objects are the ones making decisions.

#

I think - I admit, I haven't used the system a lot, but my understanding is that the system is designed to give the objects control.

#

But, a lot of things like preferences and needs can be expressed in the smart objects and with tags.

#

So if you have two types of soda, and the character likes one of them more, and the character has a 'thirst need' then they can filter for those - I think.

hidden mist
#

Makes sense

#

It just seems too much workarround, but makes sense

#

Is there any alternatives for not using smart objects? I've tried level sequences but they are not flexible enough for this

heavy hemlock
#

Is it really soda related?

#

Like - what are you actually trying to do.

#

(context is always important)

hidden mist
#

NPCs needs to make actions, drink soda, use bathroom, sleep on bed, ... maybe just like The Sims

#

The action's should be on objects, for scalability sake

hollow cove
#

what have i done wrong converting this from a material to a blueprint? it breaks as soon as i add wave rotation...

heavy hemlock
#

Smart objects are good for that.

hidden mist
heavy hemlock
#

I think that's almost specifically what they were designed for.

#

Why do you want the character to override the smart object though?

somber elbow
#

guys thank you so much for your time, really. I didnt have any success. I will go and learn more.

hidden mist
#

Because I have a needs-based system that finds a object/action based on NPCs current needs. It has a scoring system, curves, etc

heavy hemlock
somber elbow
heavy hemlock
hidden mist
#

So basically, my NPC won't find objects randomly, I have a whole system to find a specific object for him

heavy hemlock
#

OK, so yeah. That's fighting the system I think.

hidden mist
#

Damn

heavy hemlock
#

You're going:

I am a character. I need a drink. Where is a drink? I will go drink it.

Whereas the smart object system is more:

I am a source of drinks. Are there thirsty people? Oh there is! Come drink from me.

#

They can do the same things, but it's flipped.

somber elbow
#

i made it through Map_01 bp. Almost the same nodes. Anyway it works and whenever the player capsule overlap that platform i got my boolean condition set to true.

hidden mist
#

Thanks anyway! I will see what I can do. Maybe implement my own smart objects system

#

Good to share some thoughts before commiting to it

heavy hemlock
#

👍

somber elbow
#

But now everything is broken in my animation blueprint. I have my bulean variable from that map01 and now i should say if its tru it runs the animation. And now i should link something to that cast node again

heavy hemlock
#

Your animation blueprint is not, and can never be, your map blueprint.

#

They're completely different.

#

Which is why it isn't working.

somber elbow
#

hmm

heavy hemlock
#

Your animation blueprint can, hypothetically, contain a reference to your map blueprint, but it really really shouldn't.

somber elbow
#

so I should somehow bring that boolean variable from Map 01 bp to Character bp and then cast it in animation bp?

faint pasture
heavy hemlock
#

Daniel is a little stuck on casting things.

somber elbow
#

because i do not understand what im doing

#

before it was like that and it worked

faint pasture
#

When you see "Cast to XXXX" think "Is this an instance of class XXXX?"

heavy hemlock
#

I think you probably need to watch the Blueprint Communication video.

#

It's very important if you're going to use Blueprint.

faint pasture
#

not the full picture but that's most of the usage of casting. You're asking a question, is this thing an instance of whatever class?

heavy hemlock
#

And it should show you how to make the different parts of your project communicate.

somber elbow
faint pasture
# somber elbow

Self and the result of Try Get pawn Owner are not the same thing

#

self is an anim BP

#

try get pawn owner is "Hey, get the thing that's owning this anim BP, if it's a pawn, return it as a pawn, thanks."

heavy hemlock
#

That's why I think they really need to do some of the foundation videos, because they seem like they're having trouble with what things are.

hollow cove
somber elbow
faint pasture
heavy hemlock
#

Yeah, that's why they need to watch the video.

faint pasture
#

If you want the platform to make the character play an animation then it should do something to the character

heavy hemlock
lofty rapids
hollow cove
somber elbow
#

so somehow the platform bp should say character bp that overapping has happened. And then character bp will tell animation bp like dude play that animation. Right?

heavy hemlock
lofty rapids
hollow cove
somber elbow
#

Ok its time for blueprint communication video.

hollow cove
#

i think the only difference is here? a sine with period of 20000 vs that

somber elbow
#

Thank you guys again. I wouldn't explain anything if I were you. It's super time-consuming. I appreciate it. You are like support center.

#

😍

#

btw

#

Just curious whats wrong with making such things with bp

lofty rapids
#

it's weird it's all in one bp

somber elbow
#

and what other ways to solve it?

#

so better split it?

#

like make a spawn point and separate bps for walls and platforms and all the stuff?

lofty rapids
#

the fact it's in one bp doesn't make it very modular, how are you spawning another one or something above it ?

#

just spawn another map on top ?

somber elbow
#

yep and after delay it will be deleted

#

lower platform after collision spawns another map bp in the spawn point - upper arrow

#

for sure i can cut it on separate bps

lofty rapids
#

you just have to use a bp for every level

#

does it randomize platforms atleast ?

somber elbow
#

yep

dusky cobalt
#

If you separate it with bps it's just easier to make certain things do certain things and they don't have to know about each other when not needed. but if your levels are small then it's dooable, just it's learning bad habbits for sure

faint pasture
#

It's basically a level spawner

somber elbow
#

that collision box is basically a spawn point for platforms from platforms array

lofty rapids
#

whatever works ig, if it's smooth and you can go infinite up/down should be fine
there are many ways to do something like that

waxen quarry
#

Any thoughts on prefixing replicated variables to make them stand out more. AllowThing -> Net_AllowThing

faint pasture
#

ThingLocal and ThingReplicated

waxen quarry
#

Oh interesting!

dusky cobalt
somber elbow
#

as Diyon said i will do that just in educational purposes not to create bad habits. I think i can keep it all separate. It will not be very convenient when i will change the background or add other things. I think i can jsut make a spawn point bp, bp for that platform spawn point and etc

dusky cobalt
#

The problem is starting, because if you make let's say level 1, and you specify what is spawner inside of it, then when you create level 2, you have to again specify what is spawner, (ofc you can copy and paste it, but imagine you have 54 levels, and you want to change 1 thing inside them, and you want it to take change into every level. If you had Spawner BP, you would edit it in one place and it would change in every other.

thin panther
#

You use the one that's right for the situation

waxen quarry
#

Spawner components are pretty common

thin panther
#

They're all entirely different things for different scenarios

faint pasture
waxen quarry
#

I might be a standout on this, I see interfaces get overly used a lot

lofty rapids
#

common misconception it replaces a cast

faint pasture
#

Overlap -> cast HitActor to YourBaseCharacterClass -> Do something
is totally fine. YourBaseCharacterClass will be loaded all the time anyway.

waxen quarry
#

iirc certain message calls from interfaces cast in the background anyway

faint pasture
#

exactly, what do people thing "does implement interface" or a random blind-fired message call does in the background?

#

I saw someone with
AI_JohnInterface
AI_JeffInterface
for their subclasses John and Jeff
sad

lofty rapids
#

i had to rework a project to have a parent character so all the casting worked and you can change characters if wanted.

#

i put too much on the character

faint pasture
#

That's how you should have built it to begin with

waxen quarry
#

Maybe you would need to setup a subsystem or the game instance to create a messaging system that can broadcast data only to avoid casting, but seems like a headache for most scenarios

faint pasture
#

Having a few base classes and casting to those is fine. It's when you start considering casting to Area3Boss or Weapon_Projectile_Shotgun that you have a problem

lofty rapids
#

i had "everything" just about in the character

faint pasture
#

sounds great to me

waxen quarry
#

A stripped down base class will be better to cast too than the more detailed child

lofty rapids
#

made a manager actor instead

faint pasture
#

assuming most of it is being used for all characters in the game that's fine

lofty rapids
#

i was even spawning the level stuff through the character

#

it was rediculous

faint pasture
#

It's the way to go IMO, especially for a systemic game. In my project, there is literally zero difference between a player or AI character.
Well yeah don't do that

lofty rapids
#

i had all my logic on the character

waxen quarry
#

If its a networked game creating a spawn manager component in the gamemode is fitting

lofty rapids
#

i'm still learning

faint pasture
#

Works great for testing too. Put an AI brain in your player character, and manually control the enemy for testing.

#

I wouldn't do that for every game but for something systemic it works out really well

lofty rapids
#

but parent classes is awesome for stuff like getting all of a certain type in the level

#

and casting to a less heavy thing

#

in my case it was real good because the logic can cast to the parent character and that means it can be any actual character that is a child

somber elbow
#

so for my project which is small I cat stay without interfaces, right?

lofty rapids
#

interfaces are pretty cool tho

#

usefull

dusky cobalt
lofty rapids
#

but you can just cast and call event as well

dusky cobalt
#

or you are gonna have bad time

waxen quarry
#

Small or large you can avoid them, base it more on the scenario

lofty rapids
#

you use what you need, or makes sense

waxen quarry
#

youtube videos can bite you tho, so many bad practices from them

drowsy steppe
#

Hey guys, I'm trying to smoothly rotate a selected object with the mouse wheel, clockwise with the wheel down and the opposite with the wheel up. I did it like this but it works only the first time. With the value in the timeline being set to 90 it's a problem. How can i do it that it keeps rotating smoothly every time i scroll the mouse wheel? i know it should be simple but i'm still learning

faint pasture
#

Mouse wheel inputs -> adjust TargetRotation

Tick -> interpolate Current towards TargetRotation

lofty rapids
#

smooth like butter

#

rinterp ftw

somber elbow
# dusky cobalt you should just watch tutorial videos about unreal for now

I do. The thing is that its quite easy to follow thye tutorial. The proplems appear when i try to do something personal. Especially keeping in mind that 90% of tutorials just show how to do things, but not why i should do it that way. For sure it depends on tutorials , but anyway. I believe thats the reason why people on reddit create post like how to escape tutorials hell.

faint pasture
#

btw don't break rotators into axes for any reason, you don't need to.
If you're actually working with rotators then the adjust target rotation would be like:

TargetRotation = CombineRotators(TargetRotation, SomeRotationForTheAmountPerClick)

drowsy steppe
somber elbow
lofty rapids
#

so you get an idea of whats going on before you start getting into something

faint pasture
#

Also make sure you understand the fundamentals of OOP. If you encounter ANYTHING you don't fully understand, stop and make sure you got it.

somber elbow
#

i dont even know what oop is

faint pasture
#

object oriented programming

somber elbow
#

oh

#

thanks

lofty rapids
drowsy steppe
lofty rapids
#

for one thing you timeline value is the z ?

#

so your timeline go from 0 to 90 ?

drowsy steppe
lofty rapids
faint pasture
#

that'll be instant, no interpolation, but it'll rotate

#

get that working, then add the interpolation

lofty rapids
#

rinterp on tick ftw

faint pasture
#

you don't want a timeline here most likely, stuff like this isn't a great use case for a timeline

drowsy steppe
somber elbow
waxen quarry
#

AddLocalActorRotation

faint pasture
#

don't add, then you're doing all this bookkeeping. Add to the TARGET rotation, then SET the things rotation to that target.

#

Once that works, then you can interpolate the setting part so it's buttery smooth

lofty rapids
#

interp on tick is pretty smooth

somber elbow
#

I thought im way too dumb for coding. Now looks like i overestimated myself with these blueprints lol

lofty rapids
#

all you do is set the target variable, and interp on tick

faint pasture
#

mouse wheel goes up -> TargetRotation gets updated

waxen quarry
#

Is it just to rotate an actor for building or is a constant smooth rotation needed? InputAction -> AddLocalRotation works pretty well with minimum code

lofty rapids
faint pasture
somber elbow
#

nah, i got the idea it will be quite painfull process

#

but I believe it's worth it.

lofty rapids
#

a lot of the concepts match basic programming stuff, variables, functions, events

lofty rapids
marsh pilot
#

It looks like the this spawn actor blueprint is outputting an object of a different base class as the input. The new spawn actor class I made on the right is outputting the correct class. Is there something I need to do to fix the left Spawn Actor, or do I just have to redo it?

drowsy steppe
waxen quarry
marsh pilot
waxen quarry
#

Change the variable to be the ghost class

marsh pilot
waxen quarry
#

Picture

marsh pilot
#

Nevermind, just had to refresh the node

waxen quarry
#

ohh 😆

drowsy steppe
heady pollen
#

has anyone had the issue with the Z offset on the procedural foliage spawner where the min and max z values do absolutely nothing?

lofty rapids
#

@drowsy steppe not exactly how you should do it you should use a reference but this is how you interp on tick to a target

waxen quarry
#

change the rotation to 45 degrees for testing and are you hitting the buttons. Your input actions are Num1 and 2. Not num2?

lofty rapids
#

hmm

#

ok i c your right

#

num 1, and 2

#

it works fine

steel shadow
#

Hello, I've been using the profiler to see why I have Stutters in my game but can't really pinpoint what those means ? Anyone got ideas where I could look ?

plucky ice
#

Hi, quick question. I am trying to trigger an event that occurs when a player is looking at a particular object on the screen (just using a print string for debugging at the moment) - I've looked at several tutorials and have this in my first person character blueprint where this custom event "Fixation" is getting called on Event Tick, but this doesn't seem to be working as I intended at all. Am I missing something obvious?

waxen quarry
plucky ice
waxen quarry
#

Not if you dont have collision enabled with the correct settings. Otherwise the line trace will ignore the actor.

#

Thats why I suggested you print out the actor to screen and see what its hitting or not.

plucky ice
waxen quarry
plucky ice
waxen quarry
signal bane
#

Anyone know why this flickering happens with double-sided foliage? I've tried numerous settings and can't get it to go away when multiple trees overlap. (It only happens with StaticMeshFoliage, not regular meshes within the level. Plus even happens when shadows are off, so it's not shadow related)

fickle granite
#

global illumination?

hidden mist
#

@heavy hemlock Dug into Unreal's code and found out that there's a FSmartObjectSlotHandle protected constructor that takes a SmartObjectHandle and a SlotIndex. Both can be accessed by the USmartObjectComponent on C++. I just had to define a "Proxy" struct to access this protected constructor. Seems really odd, but it works... By creating this struct, I can claim and use it

steel star
#

can i have light components on an actor only light that actor? related: can i change other parts of how this actor is affected by other global effects like the directional light, fogging, ..

#

the actor's geometry/rendering is two static mesh components, by the way . with pbr materials

dusky cobalt
#

Does it make sense what I'm trying to do? I realized I want other things in game to also be possible to be gathered (like dead actor unit for example). I'm gonna create GatherableComponent and attach it, will all the logic inside for gathering, stacks etc. so now, instead of calling by interface to the BP_Resource, I would just get Component By class from the actor and then get data directly from here as well as trigger events? So if I want to do anything with gathering, I don't care about main actor at all, but I go straight to the component?

#

example:

#

red is the 'old' way with interface, and green would be new way

steel star
#

sure, conceptually (i cannot validate the specific blueprint though)

#

you could also as one other idea, just have a base actor blueprint class

dusky cobalt
#

Yeah so the reason why I'm trying to reinvent it, is that I have BP_Resource as a main 'static'' class, but what happens if I want to create Animal that can be gathered after killing, that would be character, hence would actually use BP_Unit, as a base. Which would make me either program it individually so that character (animal) can do everything resource can, which makes it more complicated than it should. I was thinking about making GatherableSystem and you can attach it to every actor and it will work.

steel star
#

Yea. You can also make bp library functions to be shared. Seems like about 100 ways tbh.

dusky cobalt
#

And I'm just making sure this is right way to get info now, because I have other idea but I think it's more stupid, to have interfaces call to the actor, but GetResourceType on the actor is taking info from the Component

#

something like that to picture it

#

This might be bad?

zealous moth
#

in PIE, the BB and BT are instantiated at launch

#

so it works

#

in a packaged build, BB is called by the BT to be instantiated

#

so if your BT needs a value, it won't exist and will end up being a maxFloat

#

so it breaks the BT

#

you need a decorator to stop and instantiate and make the value

steel star
#

(noob here, and not the original poster) BB=? BT=?

dusky cobalt
#

so are interfaces bad or components in that case?

zealous moth
#

black board and behavior tree

steel star
#

i think this is a regular blueprint not a behavior tree

dusky cobalt
#

from the screen it's a BTT actually (behavior tree task)

zealous moth
#

I am just pointing out that you're calling a BB value; BTs don't work in packages like they do in PIE

maiden wadi
#

Not bad advice in general though. Should usually try to package and do quick tests weekly. Specially with Shipping builds.

dusky cobalt
#

are you talking about the key?

zealous moth
dusky cobalt
#

like can you point to me where to be carefull about?

#

is it about the blackboard key value as actor that will not be set on live build?

#

Currently I was using the red version and I'm thinking about making it with the green version.

zealous moth
#

either methods is valid, now that i look at it.

#

the component is limited to itself

dusky cobalt
#

This value is set by player when it clicks on the resource

zealous moth
#

so if you make another component, you need to change it

dusky cobalt
#

and this bt will run only when the target is actually set

dusky cobalt
zealous moth
#

BB cannot exist on its own

#

for your interface, you need defaults

#

in case the value is null

dusky cobalt
#

Ok, if this approach with component is not invalid, then I will change into that

zealous moth
#

it is valid, but there are 2 caveats: it doesn't work with any other component and if your component gets corrupted, you're screwed

#

mind you i am looking at this from an agnostic approach

dusky cobalt
#

Makes sense, i think in this case it doesn't need to work outside itself

steel star
#

whats the interface issue? you need data not just functions?

#

can interfaces have variables? i assume not

zealous moth
#

they can but if the value returned is null, you run into issues

steel star
#

well like anything would i assume? in code you null check when appropriate

#

anyway if in this case the interface can actually just be an implementation that different things share, yea it doesn't need to be an interface -- or it could stay an interface, but be implemented by a component even

pale imp
#

Is there a way of referencing an object in my world from the first person character blueprint ?

dawn gazelle
pale imp
#

Yeah nvm I used my brain for 1 second and just used the "get actor of class" thing

#

works fine not lol

steel star
#

break and make

#

if that made sense? the break 'struct' and make 'struct' nodes

heavy hemlock
dusky cobalt
#

How to pass reference of the actor, when this code is in the component? Is it event possible? In a simple way ?

#

Get Owner?

steel star
#

get owner is that, yes

#

which you can call from within the component and not pass anything afaik

remote rapids
#

i need help
i have an image and the image is play button
and i want that when i click on the image a new level begin and i start something and that didntwork

#

i want when i press on the image play button
a new level will show

dusky cobalt
# steel star get owner is that, yes

I had BP_Resource variable in that reference, just changed it that to BPC_Gatherable and can just reference ''self'' (self as component). Oh god, that changes everything

remote rapids
#

@dusky cobalt can you help me?

dusky cobalt
#

Is this widget? go to button in graph and go to events OnClicked(button)

remote rapids
#

what?

#

this is my screen

#

what to do

dusky cobalt
#

you have to add button instead of image

#

just add button as additional

#

you can keep image

#

and then go to Graph

#

and add that logic you had to this event

remote rapids
#

i know how to add the logic

#

the button work good

#

but i dont want the button

#

i want the image

#

that not helping me

#

i need to play button image

dusky cobalt
#

you can make button look like image

remote rapids
#

how

#

how to take the image and put it on the button or play like a button?

dusky cobalt
#

add button and edit it in the panel

#

you can add image there

remote rapids
#

ohhh

#

okay

#

i have last question

#

look at the position of the button

#

when i press play the postion moving

#

why

dusky cobalt
#

check in the settings for ''pressed''

remote rapids
#

?

dusky cobalt
#

yes you have to specify what happens to button when it's pressed

spring osprey
#

Hi, I have a inventory and battery system in my game but every time I change the level it reset itself and everything inside the inventory for example disappears, how could I make the game save what it had from the previous level?

dawn gazelle
idle moat
#

I'm creating a jump mechanic and everything is working except for the charge value. Once I start holding in the space bar the jump charge SHOULD be increasing but it only stays at the value it was on the first input frame. My guess is because the delta seconds aren't running through the do once node but I don't know how to set it up that way?

somber elbow
#

@dusky cobalt I made everything separate. Now I have a BP for spawning a tiled volume in which platforms should appear later and which tile endlessly by triggering by the player. What is the better approach for these platforms? Should I write some code inside this BP which will generate random spawnpoints for future platforms? Or it should be separate BP wich will just grab coordinates for volume spawning from that tile BP?

modest monolith
#

I have this actor that when he spawns, he follows the player based on if the players is looking at him or not.. when this actor dies or gets despawned, the next same actors who gets spawned don't follow the player unless I look at it for the first time. Why is this happening? (I can provide screenshots)

lament fox
#

Would it make sense to create interfaces for the important blueprints like Gamemode, Game Instance instead of simply casting it on begin play to get the reference? So for example I would have something like BPI_Gamemode for the interface. And in this interface for example I would have a function like "GetTime" instead of just getting the time from the reference itself.

idk if im overcomplicating things or not

dawn gazelle
dawn gazelle
dusky cobalt
#

You would create logic that ''spawns'' the random actors in the item that is getting triggered. So on the contact with platform, there is event that spawns these bricks. Bricks are bricks, and they dont need to know about other things. I would create it like that:

Triggering platform with event Spawn Bricks + Spawn Trigger Platform.

The trigger platform can be even invisible and set to be on equal distances, so you get layers

steel star
#

ummm where can i type in/see the exact size here instead of just dragging around that resize handle?

#

also i note that 'image size' does nothing

dusky cobalt
#

Check in the right corner

#

and set Desired size

faint pasture
#

If not ongoing, one of those execution nodes on the input fires every frame it's held down. Use that

modest monolith
wheat citrus
#

If I have an array of a certain structure is there a way to extract certain elements of that structure without using a for each loop? Say I have an array of HitResults. Can I somehow directly extract an array of the impact locations?

steel star
#

umm why can i not duplicate this? nor is 'paste' an option with the root selected

#

oh, i guess i need a panel or something as the root

#

if i have a component that has no ticking or blueprint or code, and i want to turn it on/off from elsewhere, is it better to activate/deactive the component or toggle 'visible' or .. ?

dusky cobalt
#

I usually use Visible and had no problem yet but take it with grain of salt 😄

wheat citrus
#

Is there a better way to do this? Some way to just pull out the arrays directly from the array of hit results?

steel star
lunar sleet
#

if it's a Niagara System for example, you would definitely want to deactivate. you can also add and remove components at will during runtime

dawn gazelle
lunar sleet
#

not to mention editing bp structs at runtime is asking for trouble 😄

faint pasture
#

you can't automagically get a structure of arrays from an array of structures, as much as that'd be cool

#

something somewhere is doing a loop

steel star
#

wrong person replied to

#

or. maybe not?

lunar sleet
#

he's saying doing this in cpp would be equally pointless

faint pasture
faint pasture
#

but the same thing really

steel star
#

and id be able to both read and write it

#

(being a bp noob)

faint pasture
#

BP is basically boxes around C++ code really

wheat citrus
#

though the size can vary depending on the number of hits

#

so im not setting the size earlier

steel star
#

id definitely pass the whole thing, and maybe and index

wheat citrus
#

that just takes an unneccesary amount of bandwidth

steel star
#

mandwidth to who?

wheat citrus
#

passed from server to client