#blueprint
1 messages · Page 163 of 1
But if i put the forLoop inside the timeline, i will execute the forLoop for each timeline tick.
That’s what you want no?
You're trying to move an array of actors, right?
array of instanced static mesh
On every update of the timeline, loop through all the elements in the array and apply whatever updates you're doing to them
thanks
that could work
Are we allowed to post forum links in here?
The one I found explains this in more detail
https://forums.unrealengine.com/t/how-to-apply-timeline-to-multiple-actors-at-the-same-time/612495/5
Thanks
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
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
it works, thanks
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.
Can anyone tell me why On Component Overlap and On End Component Overlap both go off when overlapping the corner of a box collider?
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
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 🦆
For that trick I expect it's rather rendering the weapon separately and compositing it unto the viewport.
Could otherwise always make an animation where the weapon is held up inside the player collider, when close to a wall
given I'm doing a medieval RPG and not a shooter this one won't really work. Do you know any tutorials on the whole compositing onto the viewport thing?
why sound 2d don't play? I mean I don't hear them...this is weird.. the rest of the code plays
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
How can I manually enter a value in that array? In this case I need a single value to enter in that array.
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
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.
uh, pure are good I think
😵💫 😵💫
hi i may be being stupid too, maybe you look at the parent class of this variable in C++, maybe it is "UPROPERTY(BlueprintReadonly)" ? I dont know...
yeah it was a pre-made framework by my university with variables set, but seems to be a bit broken maybe, thanks i’ll take a look
😺
There’s nothing wrong with pure functions you just need to be aware of how they work
First pin here explains it
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
ty 😺 I kind of understand, but I'm just a little confused...
Which part is confusing ?
you shoouldn't even care about that anyways
Why is it designed this way? Compared with ordinary functions, will pure functions bring performance improvements or other advantages?😵💫 😵💫
honestly it's probably mostly for graph cleanliness
Probably yes... I should study and practice
more deeply first
❤️
for timelines
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
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.
not really, just to know how they works
Pure nodes can bite you sometimes, in the cases of lerping or random numbers
We literally just said the same thing lol
"You need to know how they work"
"No, you just need to know how they work"
that's a really good question
😺 ❤️ Thank you both
It won’t hurt your perf much unless you start doing expensive checks without realizing but like Cuppa said, you can have unexpected results if you’re not aware of the pitfalls, and like I said read the first pin, and like Cat said… things
They should be in order yes.
What you could just do is make your barrier block the trace channel, which will still stop the multi trace
But I want to block it only if it is not a friendly barrier. Guess I could set up 2 channels and still do your method.
Probably not at all
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
cough Adriel, but also #game-math
Ah yeah I can see the predicament there
easy
Then yes, it should be fine, might want to just print the distance of each though to ensure it aligns with your expectations
Are you saying you pretty much just want the aspect ratio of the rectangle to drive the formation? Like if you had 8 dudes and drew a rectangle that's near 2 x 1 width to height, you'd want 4 x 2 dudes but more spread out for a bigger rectangle?
Exactly, more spread out evenly the bigger the rectangle is.
move it to game math right quick
Sorry one more thing. If I trigger/execute the "Break" input for the Loop node, will it then execute the "Completed" pin? Or just stop doing anything at that point?
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
definitely yes, but to do so just follow all steps and event order to understand what data is sent where and why
what is 's' item data, what does the 's' mean?
its an structure
@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?
do u refer to this?
no sorry. im just failing to grasp it, heh
@spring osprey are you trying to plug the 'item id' into the 'item'?
yes
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'
should I change it to item or the s item data structure i did?
@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'
here?
@spring osprey this is you item from the store?
@spring osprey you need to do that here
u mean the "get the struct, then pass it into the 'add item to inventory function' "
? how can I do that💀
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.
yes I use that data table to show an item in the shop ui
indeed, but when 'buttonclicked' is called, you are saying "take this item from the shop, and change it into the item i want in my inventory."
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)
firstly you should decide to have items either in an array like in your inventory array of 'Fitem' structs, or in a data table. Once uve decided change either or to have continuity across all inventories.
and which one do u think would be better?
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?
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.
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?
@spring osprey you can use both, but you are crossing into the complicated and daunting territory.
@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
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.
@stoic ledge so should I make that in the first pic or in the second or in both?
@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'
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?
this is the store I think
i think a dot value, although i have no idea how it works ;p
and this one is the inventory?
Open?
sounds right, but i have no clue either...
@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.
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.
and how can I do that?
im no expert, but i think its empty because you need to create it. what youve done is just pointed to an empty space.
Ive created the object library and added it to the blueprint.
Is there a step I am missing?
in .cpp
AMyClass::AMyClass() { // Initialize the object library TileLibraryReset = NewObject<UObjectLibrary>(this, TEXT("TileLibraryReset")); // Additional setup if needed... }
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?
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.
mmm okay
i think so, haha. try it?
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
Why can I not send a message using these interfaces specifically ?
Any idea on how I can create a rollerblade type movement?
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
how do I get a variable from a c++ blueprint?
It brings me to this btw
With the specifiers in the UPROPERTY(specifiers)
and How do I set a value of a c++ variable via blueprint?
the definition allows to edit the variable in BP in the class it was defined
The only different thing is the vandel uses burst fire which the code is here.
got it, thanks
how do I do this function in c++?
Should be pretty much the same way. MyComponentPointer->AddForceAtLocation(Vector, Vector, Name);
ok
and how about this?
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
Not sure about range specifically. But you could set a lifetime on it. Maybe based on it's intended velocity?
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
i guess the only way is to create a timer event on begin play to check whether a value surpassed the max travel speed
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.
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
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.
Ahh ok, Thanks for the info!!
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 );
}
}
}```
Ye looks like basically does what i was thinking about doing but why reinvent the wheel?? 😄
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.
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
You should tell ChatGPT that it's a moron and has it's shit backwards. The GameMode cannot access the level blueprint. The level blueprint can access the GameMode. Also what is calling the event in the top screenshot here?
nothing is calling it, somehow I was able to make it work in the character blueprint, and I just copied it in the level blueprint afterwards, but the even gets triggered when the number of collectibles in the level has been achieved
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.
in my character BP, when i test IsServer. it returns true, why is that?
Character and level shouldn't matter. Collectible and GameMode should have all of the logic it needs.
Depends on the event. Lots of events run on the server's instance of the character.
I have 20 levels, so I wanted to copy it in each level blueprint, and when I use "Open Level By name" I just change the name of the levels
like a button press?
Listenserver host is also a server, so possible.
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
Using ChatGPT if you are a beginner is a really bad idea
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. :/
You need to have a good understanding of UE to use ChatGPT with it
I think it's prett yfunny to recorrect GPt and then he's like, OH, I was wrong and you are right
Cause you gotta strip the shit it tells you away from the little good stuff
Followed by it doing the same mistake again
sometimes yes sometimes not, depending on what you said
@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
how do I get child component by class?
ChildComponent by class?
yeah
What child component
There's no such thing as a Child Component. Just a component.
like this but the target component is component
can I use a gate, then close it after a delay instead of this method (doesn't allow the player to spam a button)
Not sure that exists in Blueprints
But it will ultimately just loop over them anyway. Might as well do it by hand
Probably this? GetChildrenComponents
any help on why is this happening?
ConnectedActor is null. Not set to anything.
Do you want them to spam the button?
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?
nope
this is all i got on pausemenu
Your image should already not allow them to in theory
Cause the timer is reset every time
I got that off the internet. I'll just use a gate (very neat ik)
BackToMainMenu is going to be reset here because you're opening a level. Usually people who require this will put a boolean in the GameInstance and set it to true after the first time opening the main menu.
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.
so just create a gameinstance?
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.
Anybody know how this kind of smooth and natural camera shake achieved? Mine are always look unnatural.
https://www.youtube.com/watch?v=5fsORAJcPfo&lc=UgxMCYc4dWN-3EcPa3B4AaABAg.A31Y_sPGWwlA3KV3t2l5ud
Wanted to recreate the vintage camera style from the kane pixels videos, pretty happy with the result.
how to remove these lines please help
arent these editor grid lines?
so i created a bp_MainMenuInstance, and added it on the project settings. Now how can i access it on a BP_widget?
GetGameInstance and cast it.
tilemap lines 2D
the reason I wanted to do it in the LevelBlueprint is because the last node of the logic will always be different, based on the name of the level that comes up next
So then you're duplicating all the code in every level before calling that last node just because of the next level name?
This could just as easily be put into the game mode, game state, or any other actor for that matter.
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
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 ?
look good?
because my issue was always the fact that, if someone will open the main menu, in between levels, which is a level on its own, it breaks the "order" of the level1,2,3,etc...
it works fine for me so thank you, just checking if this was the route you were talking about
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..
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.
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 )
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
If you're using something similar to what I described in that you're tracking the current level number in the game instance, then when you go back to the main menu, you need to reset the level number back to 0.
If you want to jump to a specific level, then you'd have to set your game instance to the number before the particular level.
Hey guys, Is there any way to get clicked actor's interface?
You want to know if the actor has specific interface ?
Yeah I fixed it with tag instead interface but is there a way to get actor's interface?
Use the Does Implement Interface node
wow thank u uu
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
no
what do you think a fair price would be
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
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?
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
from the start
rest in peace I have literally zero idea how to do that
Each time what? They've finished collecting everything? That's to do with this part. My trigger was just an overlap pad, but in your case the trigger is collecting everything.
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.
if it's really simple prototype then yes, but if its a little bit more than complex, then its better to start with multiplayer from the start
idk if it's simple or complex, I've only been actively learning unreal for about 4-5 months so I don't really have a point of reference. Right now I'm working on making a minimum viable product, which in my case is some rooms with some hanging walls for wall running, some fun movement abilities, and a couple enemies that shoot at you, would that be considered complex or no?
if its literally what you are saying, then it's pretty simple, but anything more you add to it and it's not simple
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.
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
I'm trying to make a movement focused roguelike with coop
everything is dooable, just you have to have some things in mind when creating multiplayer and that's it
it's not much but can get complex depending on your systems
For movement it can be very difficult. One huge aspect of multiplayer games is client prediction and the built in Character Movement Component handles some of that for you for basic movement. Anything beyond this would require edits to the CMC or writing your own movement component from scratch.
is there a help forums channel here per chance?
that makes it sound a little less daunting thanks gamer
I have a friend that's also working on this project with me who is much better at math and he actually knows c++, and I just know blueprint so maybe that's something he can handle
check GameDevRaw multiplayer tutorial on yt, this guy explains everything and even makes whole game in multiplayer
together with lobby, starting menu etc
wait, is this the help channel lmao
I'm def more into the design part of game development
yes all these channels are help
thanks for the tip, I'll def do that
okee
it's a very long tutorial but the amount of info this guy gives is insane
it seems like there are plenty of resources out there for coding and unreal engine specifically, but if you need help with a niche thing there's like nothing. I tried for days to figure out how to implement a custom momentum system into my game and there is like barely any info online about it
if you know programming, in the worst case try to check tutorials for other engines, they may give you some hints, it's not perfect but sometimes it's enough
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
I don't have an answer for you but those wires are killing me
Accessed None always means the variable isn't populated when you're accessing it. It may be set to the right type you're expecting, but you also need to set a reference into that variable to the specific thing you're trying to access.
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,
You may want to have something that checks what is performing the overlaps. For example, casting "other actor" to your player's class.
it's an array tho
The thing throwing the error is the BPINVENTORY object that you're pulling the array from.
If BPINVENTORY isn't set with a value you get an "Accessed None" error, which means you can't read the array from it.
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
That's probably the way.
Cable component makes a pretty good looking line. You can create some kind of physics object that it attaches to as well.
Thats exactly what I want thank you
I notice you dont use projectile movement component
I figured out that its because im using an orthographic camera :/
Does anyone know how to prevent widgets from disappearing in such a scenario
Hello, my Blueprint Interface implemented Event call always change to a Custom Event after restart the project. Does anyone know how to fix this?
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.
quick question,
If I make a row structure in C++ can I use that to construct a data table blueprint in the editor?
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.
Yes
Are you overriding Begin Play in Fighter?
well
fighter's blueprint has no nodes at all
i tried adding begin play just sitting there solo, no change
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.
uh from the red box for delegate?
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.
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
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
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
You are spawning the sounds at 0,0,0
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
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
I would imagine it's down to playing the sound at 0,0,0. I would try playing the sound at the location the line trace hits. You're probably just too far away from the sound to hear it.
Didn't Adrien answer this yesterday? Probably not very expensive at all is the answer.
At any rate any alternative implementation will probably be equally slow.
ok
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
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
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
Can you show some pictures?
I don't recall to have any problem with vector
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
Show a picture of your blueprint
not much to show vector goes in with a value and comes out the other side as zero
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.
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?
This is some spaghetti, anyway u should be aware on how pure node works.
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
I've figured it out it was a timing thing...because of course it was
?
@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
probably a good shout, need to do weapons too
that, and perks, so definitely something to look into
Hi!
If I have a variable of an enum type, how can I compare to a value of that enum (==)?
Thanks
==
If don't work, Share picture
Don't compare the byte
I don't know what I have to pin in the 0
Compare the enum
Yes. I don't know how to do that: compare the enum.
Because I can't get the node. Which node is to compare the enum?
Drag from the enum and type equal
drag out from "puzzle state" and type =
oh, my bad
Sorry
Well I don't have editor on me
It's okay
I've found it:
nice
👍
everyone does sometimes
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
hey i have a question
i want to develop mobile game
that's not a question
https://www.youtube.com/watch?v=cFm4tZqgYvQ This tutorial has everything you need for that
Check out my Premium Courses:
https://smartpoly.teachable.com
DOWNLOAD THE PROJECT FILES HERE:
https://drive.google.com/file/d/13M_wBhxvs-7WbQoRpPbrSrQa-bsyA4cE/view?usp=sharing
Want To Learn Game Development?
Check out My Multiplayer Survival Game Course:
https://smartpoly.teachable.com/p/unreal-engine-5-multiplayer-steam-survival-game-cou...
I want the moment I open my game on the phone it will be landscape and not portrait
how to do that?
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
There's an orientation setting in the Project Settings, try that
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
by changing the setting to landscape ?
Don't use timeline, interpolate on tick using finterp instead.
Thanks, I'll try that!
listen
when i will open the app so that will automatic rotate to landscape
how to confirm that i did that?
bookmarked
I did it like this, but it is not moving. it does if i raise interp speed but it's not smooth
It's awesome, I love it
that math is not correct
you're like double interpolating here
how is building rotation rate set
i get the actor rotation and i add 90
sorry, it is set 90
you, listen, if you change the orientation setting to landscape, that means it'll open in landscape mode, that's the point
thanks for the tutorial, im 15 mins in but its already helping out a ton👍
Glad it's helping 🙂 He has 3 of those, beginner, intermediate and advanced, I highly recommend watching them all, incredibly helpful !
ok yeah. i already wathced the beginner one so after this its the advanced one
subscribed
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!
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
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.
This looks like you're building your level inside a blueprint.
Is that true?
yep
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
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.
OK, well if you need a component, you could try using 'On Component Begin Overlap'.
That will give you the component.
If you then need the actor from that, you can call 'Get Owning Actor' on the component.
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
It works now, but it casts on the entire BP. I just need a component of it.
You can get a component from a BP.
Yeah , the problem i dont understand how to do that lol
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.
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?
Oh gosh, really? There's a tutorial that suggests making a level inside one blueprint?
Wow.
Ok.
Choices were made!
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...
OK! Sure! I'm sure it's a fine tutorial and I'm being unnecessarily judgemental!
im a 3d modeller, not a programmer so im trying to figure out how to deal with it 🙂
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?
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.
For context I'm starting to have a little bit of spagetti (although I keep it clean)
Umm...Everything was working when i previously closed unreal now i get this compile error
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 😄
"not compatible with actor object reference"
so if I want something to happen only when Mouse + Shift, I create new Input Action and connect it there?
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'.
I watched various tutorials covering endless runners creatin and guys just make there a blueprint which endlessly spawn itself when character overlaps the component. I just dont know other ways to do that since im noob in blueprints.
You're fine. It's a simple game. This would not be a method I would choose for other kinds of games. An endless runner is a very specific scenario.
You're OK.
the error says only that ?
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
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.
This is definitely not how to do it.
@lofty rapids
Because they're all the same action.
If they were all different actions, and had different trigger conditions, then yes.
So I just have to kind of stick of using 1 and then separating it into different events based on branches?
what is your primary weapon variable type ?
Yeah they will be different actions but with the same button
its my "BP Test Master " Actor type
Entirely contextual and based on whether you're branching because of control related decisions, or because of other game events.
ya your trying to plug just an actor into a bp test master type
so thats the problem
you could cast and then set, or just make the variable an actor
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'.
what should i cast to?
You would have 'IA_ToggleCommandMode' or whatever it actually does.
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?
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.
and call them
IA_Select
IA_Command
IA_PlaceBuilding
It's rts game so you do everything with mouse clicks basically 😄
OK, so in that case, probably not. Because the difference between these things is fully contextual because of in-game state modifications.
Wait though, how do i have it connected then? IT was working before
I would maybe have a 'toggle multi-select' action for shift.
Ok, so I just have to use branches and try to make that logic?
I think that's probably the correct answer.
Ok, wanted to make sure I'm not goin into some rabbit hole.
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.
the error is on spawnactor node which is strange i would think it would be on the set but thats atleast what it looks like, try disconnecting and reconnecting it might not work, you may have changed the variable type ?
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
Hmm, now when Im trying to cast to the specific component it doesnt work. But when I cast to the whole BP it works instead. Looks like i made a mistake somewhere in that casting. Could you please help?
I didnt change a thing
What's truly bizarre about this, is that your graph appears the same.
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.
Im trying to get a component from the BP
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.
can't you use on component ?
That was my first suggestion.
and cast to the one you want ?
I don't know why they're not using that.
Nope, doesnt work. Looks like i do something wrong.
That's also not what I'm suggesting.
hmm
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.
your casting nothing
"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.
No, again sorry no.
damn
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.
oh
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
It should be somewhere here?
damn
But keep the Playform Spawn 01 one.
I think this node was in the list but further up. It should be at the top.
if put the logic inside the other actor it would be as simple as component overlap cast to player
I agree, there are easier ways of doing this. I think daniel just wants to get this to work for educational purposes.
Which is not a bad reason, because being able to access components of other actors is useful.
makes sense
right now it still cast to the whole blueprint and the printstring LALALALA appears wenever character overlaps the whole blueprint but not its component
OK, so. I'll say you didn't necessarily clearly define your terms.
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.
I just dont know other ways how to do that. I know only one only because i saw it in that tutorial. I assume i have a lack of understanding how casting works and the notion of inheritance. On youtube 90% answers how to solve such things is cast to 3rd person char or get player character. But its not what i need.
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.
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
This is another good way of doing it.
- 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 ?
We've already told you two ways.
Component Overlap, or doing the overlap inside of the map BP.
Both of those will work.
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
That is probably the easier way, but neither are hard.
how to make CharacterBP variables accessible in a threadsafe manner for the AnimationBP
i want to try both ways just for understanding
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
ok I made it, didn't know it was possible, lol so cool xd
Well - you have the platform.
And, in your event, you have the component that overlapped.
no
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.
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
(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)
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
i'm not sure you even "cast" to a component ?
probably get the reference and check if it equals the other component
Yeah, you'd be casting to the actor, then getting the reference to the component.
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.
wrking on it
I think the idea is that the smart objects are the smart part.
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.
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?"
I'm not sure what you mean. Sorry. Smart objects can filter for tags. They have other filter options.
Like - are you trying to do stuff like "If this character has a hammer, it can hammer nails"?
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
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.
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
Is it really soda related?
Like - what are you actually trying to do.
(context is always important)
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
what have i done wrong converting this from a material to a blueprint? it breaks as soon as i add wave rotation...
Smart objects are good for that.
That's what I was told
I think that's almost specifically what they were designed for.
Why do you want the character to override the smart object though?
guys thank you so much for your time, really. I didnt have any success. I will go and learn more.
Because I have a needs-based system that finds a object/action based on NPCs current needs. It has a scoring system, curves, etc
Good luck! It should have just been comparing the two components....
i wish i knew how to do that
The comparison operation is '=='.
So basically, my NPC won't find objects randomly, I have a whole system to find a specific object for him
OK, so yeah. That's fighting the system I think.
Damn
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.
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.
Right...
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
👍
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
Your animation blueprint is not, and can never be, your map blueprint.
They're completely different.
Which is why it isn't working.
hmm
Your animation blueprint can, hypothetically, contain a reference to your map blueprint, but it really really shouldn't.
so I should somehow bring that boolean variable from Map 01 bp to Character bp and then cast it in animation bp?
why are you casting self to anything?
Daniel is a little stuck on casting things.
When you see "Cast to XXXX" think "Is this an instance of class XXXX?"
I think you probably need to watch the Blueprint Communication video.
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
It's very important if you're going to use Blueprint.
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?
And it should show you how to make the different parts of your project communicate.
Thank you for this video. I will start watching it now
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."
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.
to add to this, when at 0.5 rotation, i get the exact opposite result i want. it gives me the highest point in the wave when i need the lowest and vice versa
I had a boolean variable in my character blueprint. Then i deleted it and made almost the same thing in my Map_01 blueprint. Basically in my platform bp which is overlapped by the player. And now my animation bp is broken. Becase it need the information which will let the engine know that overlapping event has happened
The animation BP should only ever care about the character it's a part of
Yeah, that's why they need to watch the video.
If you want the platform to make the character play an animation then it should do something to the character
Is it always completely flipped?
probably because you created a variable on the map and set it, and the anim bp is taking from the character, so when you set the variable set it on the character not the map bp
nope at zero rotation its correct
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?
Oh gosh. OK. Well... sorry, I dont' have time to pick through those graphs. Sorry!
if your state goes based on the boolean then switching the boolean should work, but your using a variable on the map bp, not the variable on the character. So after you cast, drag out from that and set the variable

Ok its time for blueprint communication video.
i think the only difference is here? a sine with period of 20000 vs that
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
it's weird it's all in one bp
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?
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 ?
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
yep
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
That can be fine
It's basically a level spawner
that collision box is basically a spawn point for platforms from platforms array
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
Any thoughts on prefixing replicated variables to make them stand out more. AllowThing -> Net_AllowThing
I do that if there's 2 versions of a variable
ThingLocal and ThingReplicated
Oh interesting!
It's just easier to create new bp, name it spawner, and add logic inside it and end topic, than to try create small component and do the same logic, when you have other code around that. It's basically like segregating things, and if you need them to communicate then** interfaces,** event dispatchers and at last, casting is way to go.
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
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.
There is no set order or preference.
Interfaces, event dispatcher then finally casting is not an order that makes sense, nor works
You use the one that's right for the situation
Spawner components are pretty common
They're all entirely different things for different scenarios
I agree
don't just make an interface to avoid a cast though. If your interface isn't meant to be implemented on multiple classes to do multiple things, then it has zero business being an interface.
I might be a standout on this, I see interfaces get overly used a lot
common misconception it replaces a cast
Overlap -> cast HitActor to YourBaseCharacterClass -> Do something
is totally fine. YourBaseCharacterClass will be loaded all the time anyway.
iirc certain message calls from interfaces cast in the background anyway
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
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
That's how you should have built it to begin with
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
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
i had "everything" just about in the character
sounds great to me
A stripped down base class will be better to cast too than the more detailed child
made a manager actor instead
assuming most of it is being used for all characters in the game that's fine
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
i had all my logic on the character
If its a networked game creating a spawn manager component in the gamemode is fitting
i'm still learning
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
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
so for my project which is small I cat stay without interfaces, right?
you should just watch tutorial videos about unreal for now
but you can just cast and call event as well
or you are gonna have bad time
Small or large you can avoid them, base it more on the scenario
you use what you need, or makes sense
youtube videos can bite you tho, so many bad practices from them
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
tick
Mouse wheel inputs -> adjust TargetRotation
Tick -> interpolate Current towards TargetRotation
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.
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)
i'll try this and post what i do, i'm not sure i will do it right. thnanks!
Anyway thats a great one
i would suggest before doing a targeted one, try a more intro to blueprints tutorial
so you get an idea of whats going on before you start getting into something
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.
i dont even know what oop is
object oriented programming
first time writing a "program" in any language ?
sorry, i'm very nooby, and i'm not working out how i should do it
yes
so every time it runs it is probably resetting and doing the 0to 90 ?
start with just the target, and setting rotation to the target on tick
that'll be instant, no interpolation, but it'll rotate
get that working, then add the interpolation
rinterp on tick ftw
you don't want a timeline here most likely, stuff like this isn't a great use case for a timeline
i don't think so, it just doesn't rotate anymore than that target rotation
dude, I'm a 3d modeller with 13 years experience. The only reason why i learn bps is that I'm bored with just modelling stuff and was told i can make games connecting those spaghetti . I dont know what programming is lol. Too difficult.
AddLocalActorRotation
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
interp on tick is pretty smooth
I thought im way too dumb for coding. Now looks like i overestimated myself with these blueprints lol
all you do is set the target variable, and interp on tick
Show what you got hooked up to mouse wheel right now
mouse wheel goes up -> TargetRotation gets updated
Is it just to rotate an actor for building or is a constant smooth rotation needed? InputAction -> AddLocalRotation works pretty well with minimum code
blueprints are fun to use, you get used to it and you can do a lot with them
he eventually wants it smooth
a lot of the concepts match basic programming stuff, variables, functions, events
have you tried rinterp on tick and setting a target variable ?
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?
right now i'm doing that with mouse wheel up and mouse wheel down since mouse wheel axis is used by zoom. i'll use a sequence on the mouse wheel axis
Its true tho. Your variable is of the same type its outputting. Its just that you can choose a subclass of it in the variable. All the variable knows is the base class tho.
But how do I change it so it's specifically outputting that ghost class?
Change the variable to be the ghost class
It is
Picture
Nevermind, just had to refresh the node
ohh 😆
sorry, i don't know how i should do that. can you tell me what nodes i should use?
has anyone had the issue with the Z offset on the procedural foliage spawner where the min and max z values do absolutely nothing?
@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
change the rotation to 45 degrees for testing and are you hitting the buttons. Your input actions are Num1 and 2. Not num2?
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 ?
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?
Print out whatever the hit result is. Your collision channels might not be setup correctly.
What do you mean by my collision channels? I check to see if the actor hit by the line trace is the object I'm interested in, and if it is, then proceed with printing "Hello."
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.
It seems like it isn't hitting anything, even objects I know are set up to generate begin/end overlap events.
Yeah but thats a line trace not an overlap event. Your collision must Block the channel you are tracing on.
And that would be a property I set up in the object that I am interested in the line trace overlapping?
The mesh component in the actor has collision settings. Could use a primitive or mesh.
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)
global illumination?
@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
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
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
sure, conceptually (i cannot validate the specific blueprint though)
you could also as one other idea, just have a base actor blueprint class
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.
Yea. You can also make bp library functions to be shared. Seems like about 100 ways tbh.
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?
I'm gonna stop you right there and ask you to compile and package your game to a shipping build and see if it works.
Unless you use a decorator that fetches the data for the blackboard, your values are going to be maxValue'd and break the BT
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
(noob here, and not the original poster) BB=? BT=?
so are interfaces bad or components in that case?
black board and behavior tree
i think this is a regular blueprint not a behavior tree
from the screen it's a BTT actually (behavior tree task)
I don't know, but you need a decorator. You typically use interfaces to avoid casting and send messages to whatever can receive it
I am just pointing out that you're calling a BB value; BTs don't work in packages like they do in PIE
Not bad advice in general though. Should usually try to package and do quick tests weekly. Specially with Shipping builds.
are you talking about the key?
either your material pass is set last instead of first or your LODs are collapsed
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.
either methods is valid, now that i look at it.
the component is limited to itself
This value is set by player when it clicks on the resource
so if you make another component, you need to change it
and this bt will run only when the target is actually set
ok, great 😄
that doesn't matter, the BB can only exist if the BT exists fiest
BB cannot exist on its own
for your interface, you need defaults
in case the value is null
Ok, if this approach with component is not invalid, then I will change into that
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
Makes sense, i think in this case it doesn't need to work outside itself
whats the interface issue? you need data not just functions?
can interfaces have variables? i assume not
they can but if the value returned is null, you run into issues
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
Is there a way of referencing an object in my world from the first person character blueprint ?
You need some way of getting that reference, like traces, overlaps, etc. How you get the reference really depends on what the object's relationship is with the player and the context of what triggers the logic that requires the reference.
Yeah nvm I used my brain for 1 second and just used the "get actor of class" thing
works fine not lol
All right. You want to do battle in your code base, that's your choice. Personally - I would build my own thing.
How to pass reference of the actor, when this code is in the component? Is it event possible? In a simple way ?
Get Owner?
get owner is that, yes
which you can call from within the component and not pass anything afaik
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
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
@dusky cobalt can you help me?
Is this widget? go to button in graph and go to events OnClicked(button)
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
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
you can make button look like image
ohhh
okay
i have last question
look at the position of the button
when i press play the postion moving
why
check in the settings for ''pressed''
yes you have to specify what happens to button when it's pressed
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?
You need to either make a save game system or temporarily store the values in the game instance before transitioning to the new level, and when entering the level, loading the values.
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?
okay thx
@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?
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)
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
Show code of how it determine who to follow
No. There's little benefit to using interfaces for objects that will always be loaded or share a common hierarchy.
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
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
just use ongoing
If not ongoing, one of those execution nodes on the input fires every frame it's held down. Use that
I showed you
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?
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 .. ?
I usually use Visible and had no problem yet but take it with grain of salt 😄
Is there a better way to do this? Some way to just pull out the arrays directly from the array of hit results?
depends on the component
cant answer that as a bp noob here, but cannot suppress this reaction: yuuuuck, people avoiding writing code are missing out ;D
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
Fairly certain this won't work as I think structure properties are usually retrieved by copy, not ref. You'd have to generate the arrays first then feed them into the structure once they're all created.
not to mention editing bp structs at runtime is asking for trouble 😄
The code would be doing the same thing
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
he's saying doing this in cpp would be equally pointless
This looks fine and is perfectly readable, assuming it's not finished (you're never saving that struct), and you're setting the size of that structs arrays before this loop
It'd be much much faster
but the same thing really
BP is basically boxes around C++ code really
yea it will be passed through a multicast event so Im trying not to pass the entire hit result to save bandwidth. Unfortunately it seems that means a lot of messy array making.
though the size can vary depending on the number of hits
so im not setting the size earlier
id definitely pass the whole thing, and maybe and index
that just takes an unneccesary amount of bandwidth
mandwidth to who?
passed from server to client