#blueprint
1 messages ยท Page 182 of 1
so then it's not set up correctly
you can test it with just the b key
right and search key b
scroll to the key b
and use that event just to test if it works
you'll have to fix your input setup if that works, because your keys are firing but the event not working
still nothing
^
well if you b key isn't firing off
then it's not the setting
it's the fact it's probabl in the wrong bp
because if you set the event b key
and used pressed
and it doesn't fire then for some reason your inputs are not firing
not really a matter of how your context is all set up
using the b key by itself didnt work
no didnt print at all
the events are in the same blueprint as the rest of the doors code in the door blueprint
am i just completely oblivious lol
Anyone know how to add bullet trail effect for bullet?
they need to be in the player bp
or the controller
so just copy them over?
i would just delete and remake
but this time you don't need to get player
and cast, because now those variables are local your in the player bp
look in to the niagara system for doing that
ok so i got that to work so for the unlocking how would i do that? just get the doorblueprint then destroy actor?
so you want to unlock it and the next time the collision happens don't show anything right ?
yes and save it like that so if the player comes back to the level later the doors still unlocked
well thats a bit harder to do, so you want to save it on the actor and save that across levels
for one thing you'll be most likely using game instance
save it on the placed version of it bc i plan on placing multiple making them possibly for a hub world, or alternate paths in levels
you want this unlocks to save when close and re open the game ?
yea if the game has saved, i was planning to impliment autosaving
but saving the game from a menu
YE but i know nothing about ๐ฆ
one way might be to give each of them an id, and then you can check an array of say UnlockedIDs
where you would just add to the array an id and it would be unlocked
but also a boolean on the actual actor
unlocked
what i like to do when i know nothing about an area of unreal engine is go through the documentation, page by page, making my own thing while going through their examples. i also take notes in obsidian so i can refer back and refresh myself if i get stuck. https://dev.epicgames.com/documentation/en-us/unreal-engine/creating-visual-effects-in-niagara-for-unreal-engine
Use Unreal Engine's Niagara visual effects system to create and preview particle effects in real time.
i have a bool to check if its unlocked or not
so it works but you just want to save it across levels ?
^
how do i do that
i dont have that bool set up
im guessing id do it like this?
no, im wrong ๐
id add that after making the unlock happen?
right once you unlock it flip the bool
and then run a branch on the overlap or you could event turn collision off
If you're modifying the index if you've found an item, and using the "First Empty Slot Index" if you didn't find the item on pickup then that part should be set up right. Your problem now probably has something to do with your dropping logic.
you may even want to use the actual player collision for that where you can use other actor and cast to the item saving it in a variable and checking if it's valid so you have a reference, otherwise you'll need get actor of class and try to find the exact one wouldn't really work with multiples
I have a game instance subsystem which only exists on the servers game instance. Then i have an actor placed in the world that trys to use a function in the subsystem, but it claimes it cannot find it. Is there an obvious reason that this happens?
i need help
i wanted to keep music between levels so i did that
this is a game instance blueprints
and in my main menu i did that
all works good
if now i go to another level the music is keep going all good
the problem is that for example lets say
main menu is A level
and the other level is B level
so i go from A level to B all good the music is good
but i have a return button to A level.
so When i am on B level and i want to go back to A level so the music, its sound like it duplicate it self and that not sound good.
how to fix that?
someone try to help me
We already discussed this.#blueprint message
You check if your "Audio" variable is valid.
i stuck here
That was answered for you too by someone else.. Use a branch.
it's fine, since the variable is still valid on that 1 frame, it's marked to be deleted to the GC
he should just set it and not get it afterward but yea I see that it's solved
If valid, don't create and check if "Audio" is playing, if it is, don't play, otherwise, play.
If it's not valid, create and play.
that good?
That is a branch yes.
he doesnt create it, he play it
the variable is prob set at compile time
not sure if you need to create the Sound 2d if you already have it, btw
so how to set it if is valid so dont play it
so you just want to create it and play it once ?
You do understand the concept of something being true or false, yes?
If valid (ie. TRUE), don't create it. Check if it is playing, if not, then play.
If not valid (ie. FALSE), create it and play it.
okay, i have the main menu level
and i have the other menu level
i want the music to start when the game begin and continue when i move to the other level.
all work good like i did.
but the problem is if i go back from the other level to the main so that not good its like the music is duplicate
yes
well unfortunately that variable will reset anyway
main menu
if your loading a level
No, it'll stick.
game instance
i understand what @dawn gazelle but i dont know how to translate it to blueprints
It's a literal translation....
don't create. Check if it is playing instead.
if it is not valid, create and play.
You have the check to see if its valid.
You have the nodes you need for creating and playing
The only thing you might be missing is checking if "Audio" is playing, which should be pretty self explanatory.
i think its good now
Right on ๐
What the IsValid does is basically seeing if the object contained in the "Audio" reference actually exists. When it's null, or pointing to nothing, then the reference is not valid, thereby you go ahead and create it, and then you're populating the variable with the return value from the Create Sound 2D, thereby making the reference valid, so in the future when you enter that function again and check if it is valid, it should be valid since you already set the value once before ๐
The extra bit of checking if it is playing if it is valid is just to make sure in case you stopped it for some reason that if you do happen to return to the main menu it will automatically start playing again.
how would i set up the unlock?
^
inside the door blueprint or the player blueprint?
you want when you press a key right ?
yea when u press a key
so one thing you may want to do is on your player when you overlap set the interaction actor to what ever you overlap, and on end just clear the variable, other than that i'm not sure how you would pull the variable on key press
i don't think get actor of class would work since you may have multiple
so i would set an interaction actor on overlap
where then when you press the key, you can get it's reference from the variable
so, add clear variable to the end of the door blueprint?
one thing i probably already mentioned is you probably want a parent class for all these
and you can put variables on that
it makes casts a lot easier
its in a class of its own already tho i think
Anyone know how I would automatically load all Blueprints within a content folder into an array. BUT without using the Asset Registry (because that apparently doesn't work in a packaged project...)
This is what I have now
so in your case this would be on the player, and you would cast to you actor that your using with these doors
and then have your normal stuff on key press
but then also use the interaction actor reference so you can set it's variable
so move the code thats already on the overlap?
but what is the new overlap from? or is it the one from the other bp
its just so you can get the reference to that item
so you can set it's variable
because when you press the key the event is on the player
you need a reference to that specific item so you can set it's variable
but what am i doing to get the new overlap nodes in my player blueprint?
found it
so make a new variable thats interaction actor?
or promote to variable
or you can promote to variable on the begin, then just do an empty set on the end
or you can just create an actor object reference
so now you just gotta check if stardoor is valid when you unluck, and if so set it's variable
right because you want you unluck to set that variable so the next time you over it doesn't set ui and run
ok now at the end use a stardoor variable, and drag out and set the variable
definately not
do a get not a set, then drag out ans do "set is open"
there ya go, are you using that variable in a branch on the other actor ?
i need to be, i hadent had it set up
make sure it's still working the way it should be
it's just that it won't be unlocked yet
and will just keep popping up
so where am i putting that branch in the other actor?
do you only want this to work on this particular actor ?
or is it going to be reusable ?
i wanted to be able to place multiple in levels and have some of them be different values
think about it for a minute, you set the variable to is open, now when you goto overlap you want to stop execution based on that boolean because you set it to true now, so use a branch and run it on false so when it is true it doesn't run
similar to when you did the movements
when that event fires
run it based on a boolean value
hmm
you want it not pop up so add the branch before the code that pops up the message
what does dismiss prompt look like ?
should work ig
when you change levels it will go back so you'll need a way to save that and load them up again
like i said probably give each one an id, and have an array that is all the open id's
it involves a loop but if you don't have a ton then your fine
how do i give them ids?
bc i may use some for a hubworld that may have a few, and will have some with different values needed for stars,
the different values need i think you covered with the required stars variable thats on the door bp right ?
yea
you can just create a variable on it called id and name them unique names
even use a count lik item1, item2 etc...
and require stars is expose on spawm, instance editable ?
this way when you put them in the world, you just edit the variable for each one if it's set correctly
it is set w those now
ok, so now place another one down
and when you do that, check in the details if it has required stars
you should be able to change that and then it will unlock with that amount of stars
Is it possible to set Param and then use it like that?
yea it worked
so now all i need is the door to become hidden and the collision set to disabled once unlocked?
maybe #materials ?
I can't find this on the damn graph to disable, clicking on it does nothing
The blueprint won't compile and is being a dickhead - nothing was broken I've been using this MC for the past day fine
I have a character blueprint in map as my main character , how do i swap it with a child actor of it
are you spawning the character or did you set it in override ? you should be able to set your game mode override pawn
Can anyone explain to me shortly how a drag system is made? with the mouse clicking and dropping an image..
is this the right node to replace with?
Assuming a first person view, what happens when I rotate my currently possessed character? It doesn't look like the camera itself gets rotated with the character, so I assume the camera and the mesh are now out of sync, pointing in different directions?
how might you shoot a ray in the direction the gamepad stick is facing? e.g. if I push the joystick up, it shoots directly above the player and if it's facing left the ray also shoots left and if the joystick is facing diagonal the ray also shoots in that direction.
how can i make another prompt pop up when the player dosnt have enough stars but tells them how many they need, i made the widget and a reference to it,
i would probably set text like you did with the stars required, but do it for the actual prompt, then set it before you add each time
This are my dropping logic
I'm in a process of swapping my entire communication from casting to interfaces. And I wanted to know, is there any other known issue with a large amount of functions in one blueprint interface other than potentially less clarity? As far as I know performance impact is minimal.
Not really, add as many as you need.
This sounds like a bad move. There is nothing specifically wrong with casting and interfaces are less performant and make it harder to trace your code. There is a time and place for interfaces but just outright not wanting to cast is not one of them.
What's the right place for a "singleton" style reference, for something that there's exactly one of per level?
Specifically, in this case, a map camera pawn
Actually wait I'm dumb I can just flip it and have the pawn populate itself into the gamemode or whatever
I will be casting sometimes, I unnecessarily said "entire communication". Now I want to avoid casting to the player which I've done a ton and made a lot of the BP's ~300mb when they should've been in kb's. When there was something that would be accessed by a couple of scripts, I would place it on the player, eventually I got to this massive memory issue.
I'm trying to set up a ladder climb mechanic and all of the tutorials on YouTube show how to swap from walking to flying when within the collision box of the ladder.
This is fine although it prevents jumping off the ladder. Is there any way to enable jumping while in flying movement mode?
That could potentially be fixed by changing your player to have few asset references in it (like no sounds, no meshes, no materials, no vfx, etc.) but create a child class that has the assets in it that you actually use for spawning. This way you can pass around your player class reference that has few assets with minimal impact to other blueprints.
What's the best way to let designers using blueprint know which of the variables are internal state which they shouldn't need to worry about, and which ones are variables they should tweak to their heart's content in order to modify the gameplay as they see fit?
don't let them see the ones they aren't meant to care about
Does that typically mean to not make them instance editable?
I didnt find an override pawn , where do i find that option
world settings, game mode override, then you have to pick a game mode, you can create an empty on for now if you don't have on or not using it, then you can change the pawn
default pawn class
Yes but then how do i change that pawn at runtime using bp
I want to be able to change it to a bp_child version of it
ok so at runtime
then you want to possess it
you can possess any pawn i'm pretty sure
Even if its not spawned yet
no, it's needs to spawned then you possess it
But would it override the existing pawn I'm using or destroy it
For example the main character is Superhero pawn and i want to be able to switch between batman and superman at runtime
it won't destroy it
but you won't be possessing it or moving it
so if you want them to stick together thats a whole other thing
Nvm thank you so much i used an array variable with different pawns and i am switching based on index
why are you using two widgets ?
and the second one you added is an invalid reference based on the error
so make it apart of the other widget?
so make the text that appears a variable like you did the last, and set its text the same way
but this time set to the proper one for the proper branch
so that you have a text in the widget, and when you cancel and want to show the other message you just change the text
you may want to empty out the required text as well
Am I doing something wrong here? This event IS setting the arm length to radically different things, but the camera never moves
Oh of course I figured it out the moment I asked... Needed "Tick while paused"
What a stypid game engine - you can't even restart a streaming level without manually deleting everything in it
@dawn gazelle Can u help me with this?
Editable, visible, whatever you need.
This whole series is concerning.
- You're calling to spawn the actor from the inventory component but later on you're running something on the server.
- Your widgets should not be updating themselves based on the drop, instead, the drop should signal to the inventory component that something is requested to be happening, and then the inventory component manages what happens and the widgets can update themselves based on the new state of the inventory. You're clearing the item info of the slot, again before running on the server to actually modify the inventory. You should only be updating the widgets based on their actual state.
- You're allowing clients to send the "item info" for the item to remove - your clients could potentially spoof this and doesn't actually indicate to the server the actual index of the slot that should be removed, so then you don't know what the server may be doing.
Your widgets should have a reference to the index of the slot of the inventory they care about.
You can have an event dispatcher on your inventory component that your widgets can bind to in order to and call it when the inventory array gets modified so the widgets then know when they should update themselves based on when the inventory is changed.
Again, just because you requested to drop the item, you shouldn't have the widget assume everything is good and visually remove the item info
Don't rely on the passing the item info around. If you're using a slot based inventory based around an array, then use the array indexes to refer to the slot in the array that the widget cares about, this allows you to notify the inventory component of the specific slot you're trying to manipulate. You shouldn't need to store the item info in the widget at all - you just read the info in the array of your inventory component.
Basically.....
On Drop > Notify Inventory component the index of the slot that was dropped > Inventory Component can RPC that to the server to request the drop with the index of the slot that was dropped > Server validates what is in the slot and spawns the actor and removes the item from the slot > OnRep of the inventory array should trigger which you would then use to call the event dispatcher > Widgets that are bound to the event dispatcher would fire and can then read the inventory array at their assigned index and refresh what they shoul be displaying, if there's nothing in the slot then it can clear the visual, otherwise, display what is now contained in it.
I have a value that I interpolate but it's not linear.. most of the effect happens between 0. and 1... but I need to go all the way up to 20.. how can I change that curve? to make the transition more linear?
aka: i suck at math
oh that might be a good one for ai
i don't ask ai about unreal stuff usually because it's so misleading
but this is basic math
More #game-math than #gameplay-ai
ah i didn't know about game math
i meant asking literally chat gpt about the problem
You can make curve assets
oh that's a good idea...
I'm sure there's a node with a basic math function that can get me close though.. but yeah custom curve is more intuitive for me to do as I don't know much about math
i can count, and i tilt my head.
Hello, I'm trying to make a procedural Dungeon generator but I keep on getting an infinite loop with the following function and I'm not sure how to fix it.
This function simply creates a new collision box that should spawn where a new tile would spawn and check if another tile exists in that space. If a tile does exist, then it will append it to an array. The array is later checked to see if it is empty or not and will generate a new tile based off of that information.
Currently, from testing, it seems like the spawned collision box keeps colliding with one particular room infinitely for some reason and I'm not sure how to fix it.
The log print statements prints the box that it spawned and any members that it collides with and the latter is always constant before crashing from an infinite loop.
Here is the function that calls the function above
i dont get it
what
I managed to generate this much and paused before crashing
I think it's claiming that there's something it's overlapping with when there shouldn't be any
is the next spawn trying to fill the middle space at the top?
I don't know where the next spawn is trying to place as the collision box actor for some reason doesn't appear in the outliner
im just guessing, it might not like being wedged in. seems it works to a point
what does this mean?
is the box too big?
is your collision box set to the maximum area size?
collision box is slightly smaller than the actual tile size
i donno, make it small enough to see iftheres an issue there?
I added a cube to the collision box actor and it looks like the reason it's crashing is because the actor isn't being properly destroyed?
What does it mean!
There should only be 1 cube at a time, yet there exists 3 here
It crashes right after multiple are spawned at the same time
are you having an infinite loop?
it says it's an infinite loop
because the previous actor isn't being destroyed
despite having a destroy actor node
the loops do everything in one tick
so actor needs to be destroyed
it is being destroyed
and then the loop starts?
it's being destroyed after it's finished being used within the loop
it's created and destroyed once per loop
Less blurry version
i dont see the loop here
loop is here
too big to put in 1 picture
recursive loop
looping without forloop nodes?
it's a recursive loop
think of it as a while loop but as a function with conditions to stop it
you have 2 delays there. loops and delays are very prone to crashes
theoretically the loop shouldn't cause an issue? which it doesn't seem like it is? but the main issue I'm seeing right now are the actors not being properly destroyed
crashing due to infinite loop
add a breakpoint to the destroy actor node
I added the delays so I could see what was going on before it instantly crashed
see if its firing
it seems like the main issue
try to narrow down with some prints to see the destruction happening.?
does the editor crash or just ingame?
yea
now im getting nullptr exception (I think?) for some reason
now u did it
wait, why are you appending a room if there's a room there already?
"If a tile does exist, then it will append it to an array" do you mean empty tile?
No
If the array is empty, it indicates that there is nothing overlapping, therefore it can generate a new tile
ok and when do you need to destroy actors?
so if I append it to the array if it exists, then it inidicates that there is an existing tile there, so you should not generate a new tile
I'm creating a new collision box to check if the tile it wants to generate already is overlapped by another tile
so after it finishes checking, it is no longer needed so it should be destroyed
why not line trace ?
...
im working on similar dungeon myself but there's no need to create a new actor just to check for collision
was following this tutorial and was trying to optimize it
"so after it finishes checking, it is no longer needed so it should be destroyed" so it should create them until it satisfied, then destroyes the boxes?
tutorial was suggesting creating an entire new tileset and then checking, and then destroying the entire tile again, which would prove tragic on larger tilesets
also i can see those boxes phasing through the wall..
it should create one box, check if it is being overlapped, if so, append to array, if not, do nothing, and then whether or not it did anything the actor should be destroyed
look at this loop. the actor checks if there's no collision in 4 directions (grid movement)
you can do the same logic
ok so it's much better to linetrace
how many units away is the center of the tile to the next one?
uh
1000?
ok, so what you do is you Line Trace from the center of your current tile, to adjacent directions with 1000 units away
and return the line trace bool true or false
if true, create a room
you can use a vector array for 4 different directions like this
im assuming you want to create rooms in 4 directions (grid based)
Hello, how do I make a blueprint that copies my player's rotation for another character?
i think you would just apply the rotation from one to the other.
GetActorRotation
What if I want to append another room to the existing room that is larger than my current size?
the main reason why I'm using the overlap boxes is so that I can create a bigger room using more tiles and just append it on there
you mean you have a bigger room and you want to create a smaller room next to it?
or vice versa if the space allows
ok then you just change the line trace distance
instead of 1000, you trace the center of the bigger/smaller room
is line tracing more efficient that overlap boxes?
so if you're in a small room, and the big room's center would be say 5000 units awya, you do 5000 trace
absolutely
but also, use more For(Each)Loop
since you're dealing with many arrays
Hey yall im using UE5 and followed a tutorial for inventory and items, I made a health item that restores the players health when used from the inventory however I want the item to not be consumed if the players health is full any idea on how to do this? I tried creating a branch with the condition of if the players health is less than 100 then true into the heal effect
got any screenshot
where's the branch for if player full hp
one sec
how would I get the direction to spawn the line trace from the exit point? would it be the get world rotation node?
yes
i assume you want to trace in 4 directions?
just 1 direction
I'm generating 1 room at a time
because I am blocking off some rooms
yes but does it know in which direction to spawn?
originally I put the branch here but that wouldnt make sense cause the player could still consume
yes
there is an arrow pointing in the direction
red arrow
then put GetActorLocation on Start and add 400 units to the End
400 units depends on X or Y
you're not using Z i assume cause you're not building vertically
run a print string on FALSE and see if its firing with player max hp
wait
yuh
your checking to see if its LESS than 100, which means it has to be 101 hp
replace that with <= node instead of just <
how do I get it to do it automatically figure it out?
it's giving me all 3
axis
lemme try that
make a vector array like this:
this checks all 4 directions
leave Z 0, dont touch it
but how does it know when to use which index?
it will use all of them
and give you true/false for every item in the array
and them, you use only the one that returns true
it says I accessed none tho the variabe is set as the bp of the character๐ค
How did you โsetโ it ?
object ref as a single
In details panel?
Right click and make it float single
wdym exactly?
This is not how you get a ref. Youโve taken an empty bottle and stuck a 7UP label on it, now youโre trying to drink from it.
If you want to get your player char ref, use get player character function
gotcha
At some point you may wanna watch bp comms live training pinned here
๐ซก
Would something like this work?
im new to bp stuff but im tryin
Ik, but that is a very good resource to understand this stuff
Basically what you were doing is just saying this empty variable will be of this type, but you need the actual instance of the player
lemme try getting player and see if that works
Not sure why you need actor scale
So get player char -> cast to the player char bp, and SET that as the variable you created, to save the ref in it
The cast will also ensure your player is actually there and loaded so you wonโt get that error, itโll just fail silently if it must
so I can automatically determine the size of the tile through its scale and multiply it by 100 to get the distance i need to trace on bigger/smaller tiles
i need a clearer picture. are you making a randomly procedurally generated room tiles adjacent from a single room?
yes
ok and whether the next room is small or big, is also random?
does the set need to be before the ref is called in the branch? cause this doesnt want to work either
I'd say finish the small one first. then you can add a variable in the bigger rooms that stores the distance. then in the loop, you use that distance instead
would multiplying by actor scale not work?
im sorry if this is babys first bp and im just dumb lmao๐ญ
theoretically yes not sure if it's the best practice
is this multiplayer
no
why these nodes
tried this and immediately crashed for infinite loop
the forloop isnt connected
oops
Exec>Loop body
Still crashed for infinite loop
make sure the Exit Point is at dead center
exit point is dead center on the edge
this means your code is going wrong elsewhere
So the video I was watching was setting as server and stuff for multiplayer I just kept the name sake for ease of following along
this loop only fires 4 times since there are only 4 items in the array
It's complaining about the function
yeah absolutely not, leave multiplayer alone, its a completely different ballgame, especially for beginners
i cant stress that enough
yeah I wasnt trying to do multiplayer but the "best" tutorial or one of the most popular one is of a guy setting that up I tried to do most of the same stuff just not doing the multiplayer stuff he did
most tutorials are not that reliable
they usually show "bandaid" solutions,
and they dont scale well
but in your case, i would suggest blueprint interface
It still crashes for infinite loop after generating ~2 rooms
A brothers gotta learn some how and its usually youtube tutorials for me, I started learning unreal towards the beginning of this year
try to refactor most of your code, try to simplify it with this ForLoop method i showed you
my biggest personal advice would be to stay away from multiplayer. that shit is hard even for intermediate developers. but it's your choice
Im really not trying to do multiplayer rn not until I understand a lot more, it just so happened I needed to code an inventory and the tutorial had some multiplayer elements
inventory is also hard with blueprints. try making a simpler inventory with arrays
I have done three inventory's now and god damn it is the worst. I dont mind coding with bp but yeah this one seems to work the best so far. Idek where I would start with arrays๐ตโ๐ซ
it is indeed hard
I wanted to do it first tho with this project im working on because I knew I was gonna need to do it at some point and would rather get most of it out of the way now
i'd say to do the other way around. finish your fundamental mechanics of your game
your problem with doing inventory now is that you don't know how it will scale later on with your other stuff
you might end up refactoring everything
modularity is key to good "code"
Does anyone know how to deal with this I've tried everything.
In use pin <Unnamed> no longer exists on node
Its an error that causes packaging to fail. I've tried refreshing nodes, deleting and remaking entire blueprints, validating/fixing redirectors. No idea what else to try at this point
find the node, post a screenshot
very true, I just wanted it to be simple use item, item does thing with hotbar that lets you equip said items but idrk what im doing
know anything about blueprint interface?
I would like to think I know some yes
im kinda just picking things up here and there as I go on
interface is good, because you just build the logic on the item itself and it does stuff whenever you use that item
like "this item will heal for 27 hp whenever its used".
are you also making multiplayer?
I have it set up rn so I can pick up item go into the inventory use item and then according nto what effect bp I have made and set for that item it will do different things
yeah but its not related to packaging
I use milk it heal player but I dont want player to be able to consume milk if players health is full
one simple way would be to have a MaxHealth variable and use a boolean to fire false if HP is already at max
ill give that a shot
HP var and MaxHP var, if HP => MaxHP, do nothing
else, heal
and then on your player BP, whenever you get healed, check to see if your healing has exceeded your MaxHP
so you dont want to get healed say from 97 to 122 or something
you just reset the HP to current MaxHP
sorry friend, i dont do multiplayer, maybe someone else can chime in
so i have 1 WidgetComponent that does not save parameters.. specifically i need to reset it from world to screen space every time i restart the editor regardless how many times i try to save it.. is it a corrupted blueprint or like.. how can i fix this? its driving me crazy
What would be the best way to hide and show items from a hotbar inventory? I already have actor references to the inventory, but I'm trying to decide if I should just set them as "invisible" or spawn new ones
like imagine you're using the scroll wheel to switchbetween items
ok now that i read from text, probably just hide them
After my whole character mesh broke and caused my game to shit the bed I have fixed the health thing kinda
the player still consumes the item but the effect is not working when the players hp is full which is good
can anyone help im trying to set a certain item effect as the condition for the true on the left branch but im not sure how to get it
second picture is kinda shitty but its the last row whihc is item effect which is a class
idek if its possible to put a ref to an item class into a true false but I would assume so?
this looks like a mess but is working๐ญ I can not use a consumable with the "heal player" effect if my health is greater than or = to my max
so im making a random pickup system using an array, randomly select an int and use a select node to select which class. i wanna make it so once a class is picked up, if that class has already been picked up, make the ammo count to be max ammo. whats the best way to do that?
Hey guys I'm having a bit of an issue: I'm having the aiming animation play whenever the player zooms in or ADS but when the zoom goes away I can't get him to go back to the regular animation blueprint behaviors
I believe for things like that the choice is usually "Play Montage".
Montages stack on top of your existing ABP.
I think I figured that part out actually. It ended up being that I needed to set the animation mode to animation bleuprint at the end of my break aim
I really appreciate the help
I'm still trying to figure out how to get the character to follow the crosshair when I'm aiming down the sights. As of now, when I ADS the character won't follow the camera's vertical movement
I still think it's worth looking into Montages :)
Will make it easier to combine animations such as crouch aiming, walking while aiming, etc.
But maybe for a later day!
Yeah I think I've tried it out for my first cutscene but I didn't think to do that here. It's probably a lot more efficient
How can I make the material changes driven by this actor component immediately visible in the editor viewport without having to guess and click the function button in order to see them applied?
Hello, how do I enable custom depth pass using the console command?
This is a custom component from some plugin?
an actor component I am putting together myself. Blueprints only
But that adjust material button you clicked, I never seen it.
Is that something that is added on latest version?
If you check Call in Editor in the function details panel you get the button
BP only no as actor components don't have a construction script type event we can override. If adding the component to an actor, you could have the actor call the function from the component on the construction script but this would mean you can't just drop it onto any actor and have it work.
Call in editor functions have been in for a few version now. They're pretty useful. ๐
Pretty sure I know how to do this in cpp with PostEditChangeProperty
Don't know if you can in bp tho
What a pity. It looked like a clean way to add simple extra features with ease.
So another option to have non distructive material instance parameter changes on a static mesh actor basis could be to create an actual bp actor to drag and drop in the scene, bind an SM to it and control dynamic material instance parameters from there?
the goal here is to create the easiest possible way for arhcitects to adjust material offset and base color adjustments witohut messing with the original master material or material instances
There might be a way using editor utilities BP. I've not used it but from my understanding, it allows you more control with this sorts of changes in the editor. It allows you to create you're own custom UI (editor only) for stuff as well.
Hey, I have problems when I run my game in standalone with array not initialized which doesn't happen to me when I debug with the viewport, it's as if my initialization instructions didn't go fast enough in the initializing my gamemode. Is there a way for everything to be done step by step?
Where is the array?
@dark drum He's in the gamemode, but my gamemode calls all my spawners of my map to init this array
Show you're code.
@dark drum The first pic is what my gamemode is calling and the second and third one is what my spawner are doing ( sorry for the wire it's still my test environment , i didn't include all my spawners logic because it's really long).
FGM is my gamemode
@dark drum This is what i have in my viewport on simulating vs this what i have when i launch in standalone ( i'm suppose to be in front of a 3dmodel
So the normal order things load is the game mode is created before things start to load in the level. This means when you use the get all actors of class node, what you're looking for don't exist yet.
When you play in the editor, the level is already loaded (assuming you're not using level streaming) which can give slightly different results.
You could probably just add a tick delay between begin play and the function you call.
So right after the begin play i setup a short delay so everything has enough time to spawn and are ready to be setup correctly ( this is the first time i work with such a big map so i never had this issue ! Thanks @dark drum ! Everything works perfectly
is there any way to save the result of a BlueprintPure function without using Variable ?
I want my node to be called once
something as temporary variable
check blend in times. If using blendspaces, check target weight interpolation speed
No, the point of a pure node is exactly the opposite of that
ohk
@thin panther
yea but i want to store the result of that pure function, or what ever but not as a memver variable
like wht was the best value you think
A pure function should only be used to **get **values (the result of passing variables through a function or retrieving private variables from outside an actor for example)
Again, you don't have a choice, unless you're in a function
You want to store the result of something in the context of the graph. That is by definition a member
Setting non local variables inside a pure function is a very bad practice.
can we make a pure function to non pure ?
its not my function
wixz ?
It depends on how fast you want the change in animation states to be. I usually opt for something towards 4 for my movement animation blend spaces. But something like 10 would work better for a snappy animation response.
ohk
The higher, the faster
ohhk๐ซก
man i mean its native function from Engine like RandomRange and ...
hey i need help with a formula
so it always spawn in the arc depending on arrows
(doing a multishot obviously)
should be on the loop body
then using forward vector just add some rotation
clamp i guess
yeah but thats the formulathingi im looking for help with
how would i clamp it
or rather
depending on arrows lets say 6
needs to be divided with the -45/+45 angle
each time
somehow
ah ok let me think
Anyone know what I'm missing here with data tables? Every tutorial I've double checked with shows that the blank headed column (A) in Excel should be hidden on import, but it always appears as "Row Name" for some reason...
(Not sure if there's a better room to ask this)
Hi! does anyone knows if SetFont in UE5 is working? because I want to create a text and set font/color on runtime and is not working for me L:(
I do this and I keep getting same Arial size 18 white
@obtuse mulch any ideas ๐
maybe this , but i dont have a chance to test
Ok i can test
but multishot arrows should be always even
wait ill send again, this one aint right
this better but still not 100% sure
okok
hm well it causes infinit loop
yeah cuz setting arros before loop and then extensing it
the eternal multishoot
epwpewpepwpepwwpewp
@obtuse mulch
@obtuse mulch works like a charm!
just had to add the character yaw roation also but yeah works
Here's an alternative solution for you.
@dark drum thanks abit to late X ) but ill save it for later so i can se if it works elsewhere
I don't believe the other method would give an even spread. And mine missed a bit haha
He's my version fixed. In case you need it. (Just needed to divide the spread angle by one less the number of shots)
perfect
did you handle mixed blueprint and c++ defined components?
anyone able to help with saving variable to a save game object
when the player changes the audio sliders on the options menu I call this
which adds the new value their setting into the map overwriting the corrosponding value
However when I end session and start a new play session it seems the values some how have not actually been set
How are you saving it to the save game blueprint?
I call across to my game instance a function which saves the save game object to a slot
I presume you've already checked that SaveVolumePos is correctly calling the save function?
I can't actually see you setting the new map in the save game anywhere
yeah
there is a function that is called when the slider pos changes and the new value for that slider overwrites the value in the save game object
Is it supposed to be automatically saving every time the slider moves?
so I was going to do that but then decided I set the values in the save game object and then the save game button does the save game to slot
unless I'm not understanding how it works
At the moment, it looks like you're assigning the new variable with the Add node, but you aren't updating that in the save blueprint that I can see
would that not be the same
that Volumes data save game is the save game object I get the sound volumes from it and add to the map which overwrites the values in this case as designed
No, so what you're doing at the moment seems to be:
- Loading the stored Map out of the save game
- Updating it to the new setting (locally).
And that's it. You aren't then saving the new variable back into your save game blueprint.
So every time you load the game, it's just going to reset to the default value
thats what the save game button does
The SaveAudioSettings event?
the save audio settings event is called when the save settings button is pressed
feel like i'm doing stuff in wrong way here but not sure how
i'm doing what I believe is correct from what I've looked at online etc
I feel like it's to do with the Add node, I don't think it's actually writing the new amount back into the save blueprint. Try dragging out from your VolumeSaveGame and use a Set node for the map instead of Add,
thats all I have when I look up Set
so I've also just tried removing the specific element and readding it obvs with new values
something isn't working right as I've just done a check where after pressing save button the values printed are those
which are wrong cause the slider for master is at 1.0 and player_SFX is near 0.0
actually thats correct image but still wrong, they are 1.0 and don't seem to change
so your adding the volumes to a map ? are maps keys unique ?
so in theory if the key is the same, adding should update the the value ?
yeah
i'm bassically adding to the map with the keys matching what I'm wanting to update
my thinking and what the tip thing says is if a key already exists it will be overwriten rather then a new one being create
makes sense
check the values before you save
pull out from the saved thing and try to print the values
well i've checked after saving and the screenshot for that is above
both values for both keys sit at 1.0
even though the value going through to the map isn't 1.0
interesting
so what your seeing there is the bottom before save
and top after values save game to slot etc is all called
so the value is updating, it's just not saving correctly ?
it's like they are being altered but when I go through calling the save to slot etc their being reset back to 1.0 which is the default for both values in the save game object
appears so
are you using the right variable i see one says Data and one doesn't
Thats the save code
where sorry
your isvalid says data in the name
idk why that would be just added
i feel like they are two different variables
it's on the game instance thats why
the W_Menu has a ref to the save game object and the game instance has it's own ref to it
If I want to destroy an actor, but theres a possibility that the actor is not always in the level, how do I avoid an error message?
isvalid
what I don't get is why the value is correct before the save to slot is done but after it's going back to 1.0
ya thats a bit odd
up to this bit on the game instance things are okay
just like that right?
looks legit
aight thanks
rightclick the current back train output pin, and click "convert to validated get"
that makes it a little more organized
is that code correct cause that seems to be where things are going wrong
Hi, i am working on save/load system for options widget, and when i save to slot, ue5 gives issue whet i am setting value MainVolume as "None", what can be the issue?
something your accessing is null void
you'll need to trace through until you find the thing that is null and then correct that
it's your code so
the erros usually say acces none trying to access whatever is empty
click on set main volume link in the error
It get's me to here
save game here is empty most likely
this is frustrating me now on why when I do the save to slot thing it's giving me back same values
is this the right way to do it cause I've checked
everything up to that event in the game instance is correct
after it completed that event is when I do another check on the values and I seem to get the 1.0 for both keys
How do I make a script that 'fills up' this array randomly with different blueprints of my choosing?
you want it to be at runtime ? or in editor, idk much about in editor haven't even tried it yet
if I have a bunch of all UPPERCASE strings, and i want to format them to be Capital Case, do I have to basically split the string into an array, to toLower on 0< index and then recombine?
out of interest are you able to even save to slot from the game instance ?
makes sense, i would doubt thats a built in function
rip alright thats what i figured
maybe better to just change the original values in my package then to avoid unnecessary shit like that
ty
a function could do the trick
since string manipulation can be slow i've heard, i would probably make it in c just to have be faster
at runtime
something defo not right
yeah im honestly just gonna change the original values to be the case i want, save time lol
for one thing this array is classnames right ?
even when loading a new session the values for are their default 1.0
not what they were saved as in the last game session
i save all my stuff manually so idk much about the save system
but its weird that your values print correctly, you save it, and the values are reset
you want to create a list of class names ? you may want to use a list of all that can be used, and then keep getting randoms from it, will there multiple of same class name ?
Anyone know why this would be happening right ?
if I add a break point the break point never gets hit
the flow is running though if I put a print string for instance
i usually trust a print string over break point
I want to get a collection of BP_Stations and randomly fill up the array with them at runtime
E.g.
- BP_Station6
- BP_Station2
- BP_Station1
- BP_Station6
well i'm trying to get this issue fixed with the save thing
so there can be multiples of the same one ?
I've narrowed it down to regardless if I've saved on previous play session this seems to always load the default values for the map
yes
Or would it be easier to set the stations (array values) in the editor and then just use random int in range?
like i mentioned, create an array with all the ones available, then just pull random ones from it in a loop to create the new array
ya you could have just the list and pull randoms, either way you would probably need a list of available stations
that you can pull from
okay
and your printing in this part those values and they are incorrect ?
There is one thing actually, I want repeats of 1 type of station (the default station) but not repeats of the other types
how would I do that?
so the values are correct
Could i not include that 'default station' in the array, and then randomly select between using the array and just a variable with that default station, would that work?
it's when the new play session is done the values reset back to the default 1.0 rather then the saved values which are pulled in that screenshot above
you could also have a temp array that you pull from, and if you pull that class remove it from the array, so the next pulls won't have it, i only say temp array because you want it to be there afterward for the next pull
maybe even a local array that is in the function that is all the ones you want to pull from
so it resets when you run it again
but you don't want to remove while looping
so thats a problem, you can also use a count variable
but that involves checking each one and the count
where you would have another map of your max counts
and if that class was in there that amount of times then goto next one
but that will make the list different sizes which you would have to probably compensate for
so it's a little tough to do
Blue is values when saved from the map within the save game object
Say I'm grabbing physics objects in the world. Is there any benefit for me to dynamicyally create and delete the physics handle when I do, or can I just keep the Physics Handle Component on my player character actor and use it when convenient? I ran into this blueprint that someone recommended, where the dev dynamically creates / deletes the component, and I'm not sure if this is somehow a better approach?
In the past I'd just leave components on the player actor and not bother creating and destroying them.
I've noticed a odd
when I've changing the volume slider for Player SFX the master volume is showing
so your save is actually working, it's resetting somewhere else ?
I might be tracing it down cause when I move player SFX slider obvs I shouldn't be getting master volume
ugly but she works lol
so question is why am I
gotta wait for my c++ eng to wake up to change the actual package but wanted to see if this would actually work
Is there a node that checks whether an integer is even or odd?
Modulo it by 2
this don't make sense as to why I've getting Master_Volume being passed through
if the result is 0, it's even, if it's 1, it's odd
when going into this function i'm passing Player_SFX
so you only want to uppercase the first word ?
this is actually getting me vexed now, how am I getting something different being passed through to what I'm actually doing
this just lowercases the first word ? where is the capitalize part ?
it lowercases the entire word besides the first letter
So blue is after saved
if the index is 0, i just add it as-is to the temp array since it's already capitalized
the rest i do toLower
orange is when i've stopped and started play session
is this right, only other thing I could think is causing issue
ignore the logic in middle but the map on left and the values of it on right is that all correct for it to be correctly set etc
can you even set values that are on a save game object from outside of the save game object or does it need to be done on the save game object ?
So, i figured my Async Load Game from Slot gives me bool type named "Success" = "false", what does it mean?
heres one way without a loop
https://blueprintue.com/blueprint/0om6njmr/
theres an extra to lower in it, but it's just to show how i would go about it then you wouldn't have to worry how the sentence was formed it would just lowercase and uppercase the first word
ooooooo this is nice thank you!
This should work right? Assuming index 0 on the array is the default station
i dont know where to ask, but did anyone know a great tutorial to make a gun system? I found MizzoFrizzo, but dont know where to start. and yes, i not new at developping, im a old Unity user
what are you trying to do here ?
if it's even set it to zero ?
and your resetting anomoly# ?
I forgot something. basically I'm trying to randomly switch between spawning the default station and any of the others
rather then doing the value alteration on the specific key I was finding the key and adding that was messing up the flow
now because I make the change to the map to the specific key at the point it finds the matching key from the one currently being looked at it's loading and saving fine
I need to spawn 500 actors, but it's crashing my engine. Is it possible to put some kind of delay inside function, so every 20 actors there is a small delay? Or how would I start optimizing something like that? Or If it cannot spawn 500 actors then my whole function is bad?
are you using a loop ? and what is the error ?
Yes, not really errror, just it lags and level doesn't start
The loop is quite heavy, i'm trying to put some of it's parts to be calculated once
This is the loop, it ''creates'' location for each cell size.
and then what is making lagg is probably the fact, that every cell is shoting line trace by channel
and then if it hits ground, it gets location, and if Z <1 then it's places itself on that location
Made it a little bit easier to read, sorry for mess
If it's not possible I will try other approach to create grid but I need to populate huge landscape and will probably need to spawn thousands of these
so your making a grid and linetracing, and dropping the grid cells if the hit is below a certain height
whats grid size here ?
Grid size is like the Whole Array Size 10x10 for example
right but if it's a big number you'll get way more performance in c++
loops are just slow in bp
and if you got a huge grid it's just a tragedy
I need to spawn like 60000 elements lol xD
and on a large grid it says infinite loop ?
when you close it, it's not throwing any errors ?
I deleted line trace and it spawned 10k elements now
i'm suprised the line trace is heavy like that
i thought it was a pretty lightweight feature
yeah, now it spawned 20k after like 20seconds
right you'll notice a significant boost with c++
and it will handle it, worse thing that will happen it will hang like that
but bp usually craps out i'm surprised it's hanging
After the actors are spawned and if they are just spheres, they will cause perfomance issues ? If I have like 30k small actors on the map?
did you up your max iterations ? so that it would go that high ?
What does stream do? ๐ค
A 'Stream' is a way of having random but deterministic number through the use of a seed.
I didn''t change anything but you can see grid is populated here. Maybe if I there was a way to spawn them before the game starts it would be better.
wait so does a 'Random int in range' without a stream use the same stream/seed every time it executes?
- and If I were to input seed 5 for example, does that mean that the numbers generated will always be in the same order? (unless i change the seed)
You have to connect a stream, and yes, if the seed is the same, it will pull the same set of numbers in order. (assuming you don't reset the stream)
What does the 'BP Grid Cell' do?
I mean for this node, does it use a stream?
and has events on overlap but I guess these don't work until they are started
I don't believe so.
Yes. It gets any scene component whether it was added on a C++ class or BP class and copies them and their attachment hierarchy. Then I just iterated over them to set their materials to a see through kind of preview ghost.
What's there purpose? I can see your setting the scale and material but why?
The purpose of cell?
Yes.
So basically I want it later to hold some informations like what is the type of cell, if it's empty etc. so then I can let player do something on some cells and not allow on others.
Personally, I wouldn't be spawning 10's of thousands of actors for this. Actors can be pretty heavy to be used as just data containers. It sounds like you'd probably want to use uobjects. Create one for each grid section and store it in an array or a map.
Depending on the case, even multiple maps of FIntPoint to Data can be better in a TMap
I'm still brainstorming that. I have 1 more approach to test with creating grid, but I just need easy clean access to each tile so I can set it's type, and also let's player even click on it so they get to see tooltips etc for each tile.
By Create one for each grid section, do you mean that instead of spawning ''cell'' actor, I just spawn UObject instead?
uobjects don't exist in the world so you construct them as apposed to spawning them. When dealing with this sort of scale, you need to try keep things as data and then use static mesh instances to display it appropriately. You can then spawn actors based on proximity if needed to allow specific functionality.
The uobject would act as the data container that you would have a manager type class query when needed.
Hello everyone, i'd like to open a webbrower page from the game, and retrieve a json response ( it's for an authentication ), i've seen un blue print that i can use "open url" and what to use to wait the answer ?
Can I create UObjects with blueprints? It's this one?
The top one. 'Object' As an FYI, it's pretty bare bones.
Ok I see Construct as well. Can I treat it as Cell Actor I had before, just different ''type'' of actor? But it can hold the same logic and is lighter?
It would be cool to use these UObjects and spawn them, and they would hold DA_Cell (Data Asset), and then they would randomly choose from array of Data Assets if it's DA_ResourceCell or DA_TerrainCell, could generate some cool things I guess.
hi guys.
I render with mrq, deferred rendering,4k, 16 temporal, 10 spatial.
What is this ghosting? How can I reduce this?
License plate ghosting
No, you can't treat them as just an actor unfortunatly. They don't have any context to the world so they are limited in what they have access too.
As an FYI, my machine can handle just over 7k actors before the frames dip to around 30 fps and that's with 16 cores at 3.5ghz. That is will collision, (which was you're intended use) I can have about 21K with no collision.
That looks damn good
the only thing that makes me think it's cgi is the road
Would it be more flexible to make "activation logic" using an actor component's even graph, function library, or something else?
Example: I have a door blueprint, a light blueprint, and a lever blueprint. I want to line trace to them and trigger their appropriate animations/movement when I press a specific interact key. I don't want to redo the triggering logic for every type of item like this.
why is this code removing a different element than the one it returns?
I've tried it without the local variables as well, that was actually the first way I tried it, and the local vars were an attempt at a fix
you can try to cache the random value
Pure nodes execute each time you pull a value from them.
that's what I was trying to do with the local variables
so pull from that the other two times you use it
i c it's already there lol
because random is pure, it's getting rolled twice
just remove the saved one, not another random one
fixed, thank you
But it looks a lot cleaner to just use the variable get nodes instead of dragging pins all over
Just a heads up too, this won't work as you expect if the input boolof the function is false.
You'd need to set the value before the branch
how would I repopulate an array at runtime?
Set the array with values
If your array is something that isn't object based, you can have a "Default" array that you don't touch but use only to SET back into an array that you do modify.
how would i randomize the repopulation or 'shuffle' the items in an array?
There is a "Shuffle" command you can run on an array.
What is your actual issue, what is the final end result you're after?
nvm I think I'll figure it out
You have an array of things. You want what from it?
Basically each item in the array is a level, and there are 2 types. 1 is the default level, and the 2nd type has some type of anomaly. There are multiple BP's of the 2nd type. Rn I have a script that randomly shuffles between an array of the 2nd type. However I realized I want a sort of difficulty system, where as the player progresses through the # of levels each level gets more 'eerie' (this is for a horror game)
So I think I'll just have to make a bunch of arrays manually without randomization
to achieve that result
^
There's nothing wrong with the code (that i know of) I just might want to change the goal of the script
im confused
Random Bool
You can even do "Random Bool with Weight" if you want it to be true more or less often.
Does anyone know how to get world settings in BP? There's a node in UWorld, but no way to get it from.
really? Thats a big help actually
that cleared a lot of code. thanks ๐
i tried to set text but its still not showing
is there a node that gets multiple items from an array? or do I just have to use multiple Get nodes
For Each loop
whats actually happening, and what is it supposed to do ?
i want it to have this other widget pop up when the player dosnt have enough stars, telling them how many they need still, but it dosnt do that, and the set text thing just dosnt show as an option in my event graph
did you create the other one and promote to variable ?
yea
so that you can use it
are you adding it to the viewport based on a bool
show the code
just like that?
this is where im at
Just use normal For Each node, and put the number of Last Index to be the last item of array you want, so like from 0 to 3 for example will take all items from array from 0 and 1.
Are you trying to append your array, (ie. keep current items, but add several more) or are you wanting to overwrite your array with the contents of another array?
overwrite
Try to rewrite all the steps that you want to happen into a generic language. First understand clearly what you want to happen step by step, and then try to change this into code. I know the blueprints can look messy, but there is happening too much for sure.
I would but I only want a limited number of the items in the other array
The 'total stations' array has every possible station
im just using it to store info basically
huh?
If you're trying to randomize things, then you could still set it, shuffle, then resize it to the size you want.
So lets say I only want 7 items from the 'Total stations' array, how would I do that? Should i still use a 'for each loop'?
I was gonna shuffle the items after
2 randomizations
How are you calling that function to happen?
this 1 ^ to ranomdize which stations im getting from the total, and a shuffle to shuffle the order
so it looks like you have another reference i'm guessing i'm thats the new widget you want to show and you have created it somewhere like begin play
yea
Hey Yall!
I have an issue with overlap checking.
I have a mesh actor that grows it's scale via a timeline , while that actor is growing I want to check if it overlaps a player.
The issue is that it only triggers the overlap if the overlapping player is moving , it will not trigger if the overlapping player is standing still.
Here's the code , and a video example. I know a workaround is to just slightly move the player back and forth via tick and location set and the overlap will work fine but I think that will present future issues.
Any one know why this happening or how to fix it?
so you want it to appear when ?
when the player hits the doors box collsion im using as a trigger, but i dont want this one to freeze the player
i got the ui to appear now, but it dosnt go away when i leave the trigger
and the text binding isnt setup correctly, but its showing now
If you want to remove widget on overlap end, just get that widget and call Remove From Parent
ohhh sick
so does the resize node simply remove the unwanted items form the array?
ok yea i forgot ab that lol
