#blueprint
1 messages · Page 329 of 1
hey guys, I think I'm starting to go a little crazy haha 😆 **I can't set an HDPI resolution (Retina, I'm on Mac) that works in the packaged project. ** 🖥️
It works fine in Unreal's Play in Editor, but not in the packaged game.
👉 I've tried all the methods I've found on the forums and youtube (putting code in DefaultGameUserSettings, using the “Set Resolution” nodes) but either it doesn't work, or it crashes the project on launch in the editor....
How do you get the resolution of the packaged game to adapt to the player's screen (Retina or normal)?
This kind of thing is super simple on other engines, but super frustrating on Unreal....
What do you mean by adapt to the player's screen here?
Generally speaking, you shouldn't use SetResolution calls in PIE. It functions differently as an editor window than as a standalone window. Always test your resolution stuff in packaged or at least Standalone mode.
But GameUserSettings should have most of what you need to deal with setting the windowed mode as well as the resolution setting.
I struggle to make it compatible with my retina display (high DPI)... i tried everything but i can't make the packaged project displayed correctly, it is pixelated... which is not the case in the project editor
What is pixelated? 3D or UI? Or Both?
both
• I enabled NSHighResolutionCapable and confirmed it’s present in the final Info.plist inside the .app.
• I tried setting r.ScreenPercentage and setres via console and Blueprints — no effect.
• I added proper resolution and screen percentage settings to DefaultGame.ini and DefaultEngine.ini.
• I launched the app from Terminal with --args -EnableHighDPI.
• I deleted Saved, Intermediate, and DerivedDataCache to repackage cleanly.
• I tested bEnableHighDPIAwareness=True in DefaultEngine.ini under MacTargetSettings.
• The .app runs fine, but it’s still blurry — not true Retina.
[EDIT - nevermind, I fixed it after long battle] Hey guys. I have an issue with a simple feature. I'm trying to create a coin that falls down to the ground and after hitting it, disables movement/physics. It aslo should be pickable by player character. My setup is two colliders. One that detects hit with the ground and a 2nd one much larger that detects collision with player character. I've made two extra collision presets called "items" and "floor". Now for some reason i don't get any results on contact (im trying to print name of an actor that is hit) with the floor nor player. I would appreciate any help 🙂
how would one go about world items being able to be picked up and added to an inventory? would you create a centralized actor that has all the requirements and then add that to each actor item? or would you set up a class or something and then each individual item references the class?
simplest approach is to subclass an ItemBaseClass which all items are subclasses of
to create this it would be Blueprints -> Class?
You'd basically want a base class for your items, and every individual item type would be a subclass of it
yes you'd want to make BaseItem be a subclass of Actor
Whats the best way to do this menu system. I know how to customize the gun and all that. I have the logic. I just dont know how to get the gun to show up like that. Its part of the widget but still changes
are you by chance able to give me reference images? i have always struggled with understanding classes and i dont know if im following compeltely
Wdym get the gun to show up?
Store it as a variable in your controller
No i know that but
i know how to spawn the gun in and everything. idk how to describe it. I have a widget that covers the full screen. I dont know if there is any way to spawn the weapon into the widget almost, so that it keeps the same background as the widget
thats just a drawup of what i want
Could make the widget 3d?
And have the camera face it
Attach to camera
And attach gun to camera
i understand classes now. now i just need to plan out inventory in an actor component and try to understand the importance of a blueprint interface
One thing at a time champ
question out of the blue, is it possible to have widget be attached to a face of a 3d model? im thinking it would be cool to see a book open up and on one page of the open book you see the inventory UI but as the book open and moves around the widget remains firmly planted on that one page of the model
Yes, the widget would be rendered to a render target which gets used in the material of the thing
might need C++ for it though
that would be so cool so i think when the time comes ill be learning C++ again lol
Could probably do something hacky with WidgetComponent by using its material or something
wait a second I've done it, sec
sure 🙂
yeah exactly that
yeet the render target out of the widget component and use it in some other material
thats a nice hacky BP way to do it
thats sick. and you can just use layered textures right? like set it to be texture #2 and apply it to just overlap or overlay?
is there a better way to check what type a data table is? this feels really wrong
id assume i should be using an actual == object node, but i dont know how to reference the type im looking for
I would first ask why you are doing this in the first place.
any ideas on how to code in blueprints:
If NewItem: Name matches item in {Array}, check quantity.
If Quantity == maxStackSize, continue on
If Quantity != maxStackSize, add to until quantity == maxStackSize and subtract from quantity of NewItem then add to array
Else If NewItem: Name doesnt match item in {Array}, add to array
Also I'm unsure if GetObjectName is even guaranteed to be the same across all compiled targets.
I mean, you basically do what you wrote.
Like, what stops from just coding that in Blueprints?
the checking of name matching and continuing in the array
It's like asking "can someone tell me how to pick up a hammer, then a nail, then hold the nail in front of a wall, then hit it with the hammer until it's in the wall."
Right. There are equal operators for names
i guess a for each loop with break would work
Yop
In Blueprints you won't have a lot of choice
In C++ this becomes a lot more straightforward
dope ty for helping me figure this out
If you have specific trouble feel free to post screenshots
But atm I would suggest to get started
yea i liked C++ when i was coding in it in highschool but now i want to learn blueprints cause its more fun to use then to stare at text all day. colour == fun
Sure, just make sure to pick the right language for the job. They aren't exclusive and some things really suck in Blueprints
yea thats why i dont wana use this solution, but anyway my game uses data tables for loading gameplay segments, and depending on the struct type, itll use a different type of gameplay segment. i could just add an enum along with the DT to determine what type of segment i want, but itd be easier if i could just rely on the DT struct type instead
If you are 100% sure you won't be using a struct twice, then you could check if you can grab the class itself.
But honestly, whenever you have a growing Switch node that could potentially get bigger and bigger, you have a faulty setup to begin with
Gameplay segments could be created as DataAssets. They can hold all relevant data, including your DataTable. The DataAssets can be referenced via the AssetManager and conveniently queried and loaded by it too via a combination of Type:ID. I think the primary data asset that is exposed to blueprints uses the name of BP class for the ID. You can also hook that up to a GameplayTag but that requires c++.
You can then map the DataAsset to the Gameplay sections directly or via the Type:ID format.
And grab the DataTable and other information from it when needed.
fair enough, ill look into it 👍
if i wanted to set a quantity from the NewItem when adding to my inventory, how would i do that? im imagining the item i picked up has quantity 27 but the max stack size is 5. I need to add to player inventory with quantity of 5 instead of 27 and then take the 5 away from quantity of NewItem and circle through that until the quantity is less than 5. the NewItem is a data structure so im not certain how to set that change
Thats alot, and im not sure which part you need help with exactly. If you want to voice call, I can help you easily.
i asked chatgpt to see if it had an idea and it said i cant edit a dat structure directly using code so im going to do a round about way which i think will actually make the code be a ltitle less
Yes you can edit the value of structure varaibles using code.
I dont understand what your issue really is
Other then being confused
im trying to future proof my code. if i were to drop an item from a mob that is 8 consumables and the palyer picks that up, i need the inventory to look at said item and see if anything it has matches (by name). if it does its going to check the quantity it has already in inventory, for example, 3 of said item already in inventory. i then want it to add 2 of those to its already existing spot in the array and subtract 2 from the dropped item. dropped item should now have 6. then it needs to create a new stack by adding 5 of those to inventory leaving the dropped item with 1. then add that single dropped item to inventory. this should leave the inventory with 3 stacks of the dropped item (only 2 of them are full stacks)
So do you need a personal tutorial on how to program this function? Or do you have a specific technical question you can ask here.
how do i subtract fromt he quantity of the NewItem that is a data structure?
What is the newitem
Does this exist on the dropped item actor?
Ok its a data structure
Just add this logic, bit by bit
the only part im missing is being able to subtract from the quantity of the data structure
You can use the SetMembersIn<StructName> node to change edit certian feilds of a data structure
so in theory this should work?
This also works, but I wouldnt recommend it, as if you add new feilds to the structure in the future, you will have to return to this spot in the code to connect the new pins.
This code would remove one quanitiy from the NewItem struct
yes
were close i can feel it but how do i fix this?
I dont know why its read only.
Did you create the NewItem varialbe in CPP?
I dont have much experience marking variables as read only, I wouldnt know
this is all in a function with the input being the NewItem. I set it up so that when i hit "E" it adds an item and passes taht info into the function
and then that variable is what im using
If you set the readable blueprint in .h, you cannot set it
I see, since NewItem is a standerd function input, you cannot set its value.
Case Cannot set in the blueprint
so i need to take NewItem and create a var off of it?
You can however mark the NewItem function input as a pass by reference, this will allow you to actualy change its value.
Or you could redesign how this works in general.
still says read only property. ill just turn it into a var and then use taht
I typically have a function output called remaining items, or something along those lines. This output would then be used inside the dropped item blueprint so that it could know how many items it needs to have after the inventory componet was done interacting with it.
This would do nothing to solve the issue
why not? then i can edit it and then continue fromt ehre
A variable on what?
How would this variable translate over to the dropped item
And let the dropped item know how much more it should have left
NewItem input becomes the new variable and then i can edit the quantity. once its fully added how it should be then i can work on the next item i pickup
i cant atm since its super late but tomorrow if youre free id love to hop in a call.
my theory is that since the input is not directly editable, i can just promote to variable and edit the variable. once the function is done and the next item is to be added it starts all over
Just dm me whenever tommorow
gracias sir
hey @lofty rapids I found out the Problem so it was Use cursor as touch that caused the problem with the Actor not being selected once I disabled it everything worked as it should
Hello , If I have many conditions and many functions, what is the correct way to organize them so that they can be easily reused? Currently, I merge the code into a single event and end up not benefiting from reusing the conditions and functions again
Hierarchy and good class structure. Adding to that, breaking code into smaller reusable functions. This also allows you to not only reuse the code but override them in a child class if you want to change the behavior slightly.
Plus your code would be significantly more readable.
If you have some code to show, we might be able to offer relevant examples.
glad to hear it works
how can I make sure a timer runs instantly, it doesn't seem to work with time 0 but works with a really low value like 0.01. Needs to run only once
I am facing an issue is rotation the trace. It is following the main mesh but i want it to follow the arms? How can I do so?
arms are rotated in 2 different directions, try placing a socket on the arm you want to run the trace off eventually with an arrow to be able to check it's rotation, rotate it to the desired way and trace from the socket location/rotation
or use the camera instead of the actor itself
do once ? why the delay ?
because it depends if it has a delay or not, it can be 0 or another value and it takes values from a data table. So I wanna run the same code if it's either 0 or a higher value and just apply the delay if it's the case. As a workaround I'm using 0.01 default value instead of 0 and it runs, but i'm curious how to actually run it with 0
theres no sense in having a timer set to 0
imo
well, to ignore it, obviously, i tried to skip the timer but the skill doesn't fire that way even if I call the event directly, bypassing the timer.
so the idea is if it's zero don't set the timer ? just branch it ?
I did but the skill doesn't fire lol
it doesn't fire if I set it to 0 either, but if I don't branch or bypass the timer and set the delay to 0.01 it fires
so you want the event to fire if its zero ?
yes
branch it, run the custom event if zero
i did but it doesn't fire lol, that's the weird part
just call the event directly on the zero branch
show code
it should work
this was it's set to 0 in the data table, and it should run off the spawn skill event since it's not higher than 0 but it doesn't. If I do like in the second picture and it's set to 0 it's the same. In both cases if I set the variable to 0.01 it runs both ways
your using get actor location, instead of that, drag out skarms and get location of that, and possibly forward of arms as well
weird i would assume this work, unless the targeting state is making it so it can't cast
the state only changes to casting delay if the delay is > 0. otherwise it's idle by default and it should run
right but it only works when you change that state
as a test, change the state before the > 0 check
well it's fine anyways as I won't have any instant casts without previous animations but was really curios how to run a timer with time 0
you don't run a timer with zero, you do the check and run the function or event seperate
a zero timer makes no logical sense
Is there a lesson somewhere that provides this information in more detail?
Quick rundown, I have a melee trace system.
It fetches all sockets on the equipped weapon, and sets a counter, while looping over that number. It constructs a socket name from the index, and search for it, checks it's valid, and proceeds to a trace if it is, then checks if hit, checks the correct characters where hit, then checks if that particular point has already hit the hit actor. If not, it adds that actor to the list, and does what it needs, then subtracts 1 from the counter. If it is in the list, it just skips & subtacts 1 from the counter. When the counter reaches 0 it sets a var to true again, allowing the timer event to fire off a new trace sequence. However, sometimes certain traces seem to finish before the one set before it. I don't think that needs to be an issue for my given system?
@lofty rapids if I want to make that my character not pick up that exact box but spawn the box from zero on the hand make lots of difference from my last nodes?
does anyone can help me fix this errors?
i mean when i get close to a box Type,she doesnt pick up that box but generate one of that type in the hand
right so the original is still there ?
yea, i just want that the original box stays there is just like a ''reference'' to what we picking up once we get close
but maybe i should keep this method and once we cooked the product, the box pop out
but for instance
for the ingredtients its better is i dont pick up the singualr bottles, but spawn and use the one static in the space as ''reference'' of what we dropping
you get what i mean?
just the bottles stay there on the table as a ''reference'' of what we picking up'' and once i click E near the bottle, it spawn on my hand but not pick up that one. like if the bottle on the table is a storage item
What r you trying to do here?
I just take all the players location x value (with array) and from there i take biggest value, when one of them has the biggest value then the camera goes to him...
It's a camera manager but for multiplayer
Game
And when I play the game it gives me this errors
In multiplayer game, everyone is running their own instance.
Each player have their own world.
So an instance may be valid in one computer but not the other.
this code is on game state btw
Don't matter and calling rpc on game state is weird.
and run every tick
true but it works
So step outside from unreal,
When is the function triggered? Who do you want to call it?
Only for server. Client cant do rpc there as they dont have authority over game state actor.
Why is your function need to be networked BTW?
Is this a server initiated event?
Otherwise what's the point of asking or communicating with others when you want the camera to go to the closest player.
This is where it is coming, idk why
What is x values
the location of all players
How should I make it follow the camera
the x location value
Arnt you just checking the closest player
This is soo simple
It make no sense to have any sort of communication what so ever.
Run function -> get closest player -> do w.e with the camera
No RPC needed. Why do I need to tell the server or any other player if I am switching my cam to the closest player.?
Think of a spectator mode in multiplayer game.
Get out from game state.
Do the logic in your controller
ok
Understand that every player run their own instance, they run their own code.
Your job is to sync everyone world so it feel they share the same world.
No
You need to understand how everyone have their own world.
Instance may be valid on a machine may not be valid on mine.
You probably should look at the pinned material.
And see how actor replicates.
pinned material?
What validation
i mean the error says one value is not valid
Access none means you are trying to access null instance
If you dont have the variable readily available on the machine that is calling the code when it's expected, then that's your problem.
Read the pinned material over and over.
you mean the pinned message?
Wizard tips and tricks and exi guide is a must read imo
And replication is actually just the basic of multiplayer.
It is unfortunately a beast.
OnRep_PawnWeAreAllLookingAt is fine in Gamestate, that's how I'd do it.
And multicasting it instead could make sense if you don't want to have to design around the potential race condition
hi, is it difficult to find devs as revenue share based projects?
maybe on reddit i can find some proper section? do you know any?
Hey everyone, I'm not sure why my enemy AI wont die when my enemy's health hits 0 or lower. When health hits 0 or -2 for example, then I'll have to shoot it one time for it to die.. This is my current blueprint
To elaborate more on this issue :
So If I did 25 damage per hit for example, I would have to shoot it 5 times.. instead of 4 times .
4 hits should bring it to 0, but it wont die, It'd have to hit it one more time and then it'll die.
I've also tried changing the "less or equal to" node to "equal to", but it doesn't fix the issue.
Okay will do that, thank you so much!
Hey!
I have ABP and Control Rig node.
In my Control Rig I have Vector var with some data.
How I can transfer vector's data to my ABP ?
what is CR ?
Control Rig 🙂
is it instance editable and exposed ?
Sure things
I want to tether a player so he can't leave a certain distance from the anchor point
how to accomplish it? I think it's using physic constraint
I enable i/o pin but I have just input pin in rig node...
Is it possible to add out pin ?
What patty said + Actor components
search for expose, what options does it give you ?
That I can set it as CR spawns or edit it in sequencer and nothing else
i wonder everyday too lol
i watch tutorials, followed a pick up and drop and i was like, how can he start to think this logic his own...
Ye
even if i study how programming works im sure BP is all another world to discover.
Could you help me get into coding or 3d modelling
i wish i could make games my own, even simple stuff tbh but everything in UE seems like sooo difficult for begginers
im totally new to coding im in 3D modelling for 2 years
Could you help me with modelling
what you need to know?
#animation might know more about it ?
that's alot of works, especially on UVs, the best advices as people give me here too about coding is the same, watching tutorials mostly
I don’t want to watch tutorials
Ahh. Thanks!
They mean
and do simple stuff at first, i started doing 3D with a lowpoly bottle, i suggest the same, model it, place seams UV, texture it. the process is always the same
How do I even do that
watch UVs tutorials, and PBR materials how it works
K
also baking from High mesh to Lopoly mesh, with retopoly, and I suggest when u get to Retopology to use an addon that is named ''quadremsher if you're on blender'' also remmeber to work on Symmetry.
Btw how do I make weapons everyone says it is easy but I feel like it’s Albert one styles theories
you mean rifles or sword? knifes?
you wanna start modelling rifles or like swords and stuff like that?
rifles are hard to do. anyway i suggest you to check out ''Hyper 3D'' its an AI mesh generator, it gives a real good base mesh to start with. for instance if i have to make a coat, i start with hyper 3d then i retouch it my own and retopology
K
anyway this has nothing to do with #blueprint so is wrong talking here
Hi everyone, I'm not a programmer, but I'm working on a Blueprint in Unreal Engine to arrange my book meshes side by side in an array.
Right now, I'm using a fixed spacing value to place each book, but this causes problems sometimes the books overlap, and other times there's too much space between them.
What I want is for the spacing to be calculated automatically based on each book mesh's width, so that the books align properly side by side without gaps or overlaps.
In my Blueprint, I currently use a "spacing" variable that affects the X value of the transform location. Instead of using a fixed spacing, I’d like it to dynamically use the width of each mesh.
Can anyone help me figure out how to do this?
probably this would good for bounds
make a point called current position
get the bounds of the new mesh to add
and use that to position it, might work
set the current point to half the distance
or the extent i think is half
then when you go to spawn it, add half the new one, spawn it, add another half
and your at the new point
I think this is going over my head hahah. can you explain a bit more please
is there a way to get the camera of player controller 0?
put another way: is there a way to get the camera from the player controller?
theres a node called Get Actor Bounds
is this you mean?
you want the actor bounds of the current selected books
Yeah my bad, should be actor bound.
I have a varibale called current position. type vector. is it right?
float
since your moving in a line you can just adjust the x
or y depending on your rotations
the idea is the first you do is move the currentx + the last box extent
which is half of whatever box was last
so you'll need another variable, lastExtent
i just looped over all of them instead of getting randoms
but this is the idea
I kinda get it, lets see me trying. thank you man.
how do i get the location of the flying camera you pilot when there's no pawn in the level?
does anyone know the node?
You can get the current camera location/rotation from the player controller, iirc.
Or its camera manager at the very least.
Hi!
I have a 3D and 2D character in one level. Using a laptop that displays a 2D character projection by using Scene Capture Component 2D.
I am currently trying to get the player to start controlling the 2D character after interacting with the laptop, but his view stays in place of the 3D character. Unfortunately, the 2D character, despite getting input as planned, does not move on the screen.
Any ideas what I am doing wrong?
I though I understant, but I guess I'm too dumb to understand whats going on here. I did it, but doesnt work. the books are separated from each other far way ahhahaha
well your getting actor bounds of self
you want to get the random element, and then get the bounds of that
try get component bounds
yeah I'm using mesh array component.
ya get component bounds should work
but save the mesh as a variable
so you can resuse it at the end when you add the mesh
because if you pull of a pure node each time the random will run
so you only want that to run once
What setting do I change to lock a shadow in place for a mesh (regardless of its rotation)?
So the shadow doesn't move, it's basically static
I think you’d have to lock the lighting in place
is this a setting on the mesh itself or..?
i guess you have to render it twice
once for shadow only (without rotation) and once without shadow
Good suggestion, but then how do I hide the shadow mesh while retaining the shadow?
is there a setting to do the question above
no
there's likely no way around rendering it twice
because some vertexes might just be hidden from the renderer when they got culled by e.g. Nanite
ok, thanks
this is how you mean I guess? but now its overlap again.
this is another problem I'm having but not thinking now, as I have to fix this problem hahaha
your order of operations is wrong and your variable naming is confusing, LastPosition seems to be LastOffset...
get the static mesh component earlier in the execution, and save it as a variable
and each extend is only applied once, while it should be twice
[Extend, BookPos, Extend], [Extend, BookPos, Extend], [Extend, BookPos, Extend], ...
it's missing the add the half at the end
for reference, notice the set after i set actor location
fix those issues and it should be good to go
i don't think this would work because you don't set the static mesh untill after you are getting the bounds
as far as the blue line that goes backward
cache the value, or store it in a variable in other words
yeah well this kinda works , but still have some overlaps
I see
getting close, whats it look like ?
hi, im practing on a new example very simple thing. i want to spawn an object getting close to a box collision BP. i managed to do it but i only want to make the spawn a little bit forward of my character
is it possible to spawn a copy of a mesh from blueprints?
or spawn a copy of a blueprint from itself?
its the same, just ad the end value as you said. but my little brain not understant how to connect that get component bounds after set satic mesh xD
ya that weird way you have the blue line isn't going to work
this is all so messed up 😄
you see where you get the static mesh and set it ?
yeah
move the red, and comming out that get, do promote to variable, and then put that set in the green between the two other sets
then use that variable for you get component bounds, and also for your set static mesh
right now the problem is your getting the component before you even set the static mesh, so it's possible it's the last ones value i'm not even sure
you want to have the value at the green spot in execution, not draw a line backwards
i wouldn't be surprised if you got an access none with that setup and im surprised it even worked
ignore the weird y offset, it's because they have different pivots
leavea a lot to be desired, but just to show you how to do the basic math right
i have the problem that now when i spawn an object with Input key E the other things with E like picking up box or start anim stops working
show what the e press event looks like
i added this
i added on the going outside disable input and seems like works, is ok?
is this on collision ?
yes
so when i get out of my box colision spawn
input of that logic disable
is right?
you are disabling input on end overlap ?
yes
in this case only on the box collision
i did this on the bp mesh
no my character
do i even need a player controller on that disable input?
read what it says when you hover it
it says what it does if left blank
is this one player ?
the player controller?
''get player controller'' u talking about?
yes one player
the input that your asking about if you need
but reading the description is not understandable at all
aah
because i already have ''self on the enbale/disable input right?
since i've already ''self'' on these i dont need to make clear what player again
right?
no ... if you leave it empty you just disable ALL instead of selected
is this the way i should read this?
except your casting to nadine so what is that, if that is successfull the rest runs, so basically it only runs if overlapping nadine
casting nadine is my character nadine
means that when my box collision overlap with my caspule of nadine event starts
no?
ya it should be if the thing overlaps with your character
sorry to bother you by having another question, but why my random doesnt have an executio pin?
Any ideas on this? I'm literally loosing my mind over it
doesn't matter in that case, if you are on 5.5 you can rightclick it and pick "show execution pins"
so it switches to the second player at all ?
is this multiplayer ?
thanks so much. was frustrated for 3 days with this. Not a blueprint guy, never used that much. Needed to do this for the project I'm working for automate the proccess.
thanks to @lofty rapids aswell for all the help.
Nope, I'm trying to make 2D minigame inside the 3D world.
Trying to see the minigame through laptop screen, when playing as the 2D character
ok, and what happens exactly, can you see the character, but it just doesn't move ?
I have 2D Character on the map and can't make him move, even if the input works
so your character is actually firing off the input events ?
I have print string on the end of the movement 2D, and I can see that it responds
Yet the character still stands in place
I'm unpossesing the 3D character, possesing the 2D character on map, enabling the input, and loads the IA_Move2D for inputs for 2D Character
show the movement event
In Character 2D Blueprint
print string your values
make sure the axis values are comming back correct
Values are correct
is this character or a pawn ?
PaperZDCharacter
It's plugin for making 2D games in UE
ya i've heard of it, i just don't know what the character has and doesn't
what do the components look like in this character ? is there a movement component ?
Yep
It's a normal character that uses a sprite instead of 3D mesh.
as a test lift him up off the ground to be sure he's not in the floor at all ?
does he fall like normal on to the floor ?
Yeah, makes perfect sense, I just didn't think of that
how would one reccommend setting a mesh? i want to have a couple items drop from a monster upon its death but im not certain how to set its mesh. I know i can set static mesh but to choose the correct one for each automatically im not sure of. should i just store the static mesh with the item data in my data structure? or is there a much more efficient way?
@lofty rapids Thank you very much for that journey 🧡
you could store the static mesh with the item data that would make the most sense, but i always like a map of uniqueID as string, to static mesh
it's fast lookup time
and you can get the keys, shuffle, and spawn them
Map of uniqueID?
ya, uniqueID key, value is a static mesh
so if i wanted an RNG setpu of say leather, bones, earth crystal, each word would be a uniqueID and then it could set all of that into my fsitemdata?
"should i just store the static mesh with the item data in my data structure" ? what data structure are you using, if your getting a random item from this then just use the same structure you already have the item
ignore the bottom 2 i just set them for testing. im planning of different monsters to fight. each monster has a chance of dropping 1-4 items of specific types but i dont want to hard code the FSItemData ehre into each of those for every monster. id like to input just a single string and then it will auto set all of the info autimatically into the fsitemdata
so i would probably make a function that builds the structure based on the string
what about if i could set every item ahead of time except for quantity and then select that and it will autofill everything i need?
just have an array of structs
and get a random one
you can edit the struct after you retrieve it
either an array or a map of structs
and build it out either randomly or manually
whats the difference between array, set and map?
an array is just a list of the type of variable, so an array of string, or an array of numbers
something you can iterate through and access based on index
index 0 is the first, index 1 second, etc...
so theres no real id there other then the index
what about set and map?
as far as map goes its a key valye pair set, so it's basically a list of key/value pairs, if your key is a string, and your value is a static mash, you can find based on the key say "some item"
and that would retrieve the static mesh
assigned in the same key/value pair
idk much about a set, but it's something to do with a list of unique items
tbh i never need it
so if i were to set the key to be a string say "SwordOfAwesomeness", could i set the value to be the FSItemData?
yes for sure
and i can set all of that info inside the map?
yep
icon, static mesh, itemtype etc?
try it out
i tihnk a map is exactly what im looking for
i usually prefer it for a lookup because it's O(1)
Altho "accessing an element by its index in an array is indeed O(1)"
it's easier to remember and look up with uniqueids
plus you can get the keys, and get only things with a certain prefix
stuff like that is cool
you can get the keys, get a random element from that array, then find that string in the map for a random item
where would you store the map? inventory actor ocmponent on firstpersoncharacter?
or just like another actor taht i place in the world so everything can access it?
also it would be more like a sequence with each pin having a chance to spawn set item and with quantity range of X
if you wanted a good random you could do weighted sum, i don't know the chances with the random node probably 1 in however many there is for each one
are you going to be loading an unloading levels ?
you could make a item manager actor, thats not a bad idea
and just drop it into the level
this way you can have things like the random function you can run as well
but i put most of the stuff i want to persist in the game instance
im not certain yet to the scope of that portion, it might just all be one level. a openworld actor that i pop into the level should be fine right? then i can pull from that and affect the inventory component and not worry about casting
this looks correct right?
as long as it's all base stats and your not modifying it on the fly
yes thats correct
wont be modified at all. do i need to click instance editable or blueprintreadonly at all?
probs not instance editable
and expose on spawn?
i mean i don't think you need them, should you need them they are there
begin play -> get actor of class -> promote to variable
use the variable to access the itemmanager
and in my enemy bp should i have a special function for choosing the drop chance? im thiking in the parent of it all atm
ItemDropChance() function that has you input up to 4 strings and then for each string, runs RNG then sets quantity in another RNG and outputs the strings and quantity to be used in EnemyDeath() which will take that info and spawn droppeditem with stated info
random number generator. i want to set each additional item to be less and less. 100% for first option, 50% for second option, 15% for third option and 5% for 4th option. each run separately
so i could have 1-4 drops. if i get 2 drops it could be the first and 4th option or the first and third option etc
#game-math might be better for this theory of random numbers
ill check out tehre after for the RNG. i just need to get the rest setup to correctly find the info
ya maps are pretty simple to use, find the key, get the value
if you add the same key, it overwrites the previous
can i switch on string from array?
i ahve Items array for testing and its a string
im thinking something like this where i set the items in the child which will be the physical enemy and then it inputs into the drop chance. then on each string it runs to do its RNG stuff and output quantity and string for each item
i guess if i throw a ofr each loop in there
Comparing strings is nasty imo
Use gameplay tags
ItemRarity.Common
ItemRarity.UnCommon
ItemRarity.Rare
Etc.
something like this. but how do i set the storagedata adn then pop that into droppeditem?
can anyone spot whats wrong? ive been debugging for a while but idk what im doing
it selects the last item each time, its a random number generator with probabilites
you want a foreach with break
then break on true
so that when you hit true, set the response value, then break, it doesn't do anymore checks you have found the value
hi, where can I try to propose my game project idea as revenue share project?
this works better but it selects the same one a suspiciously high amount of times... might just be that all my probabilities are the same though
ill do a bit more debugging rq
hmm...
make sure total is set to zero before you start
i see the #rev-share-jobs but how can i add mine?
it is
i got it now
thanks a lot for the help, you got me in the right direction :)
was doing this subtraction wrong
its working now, thanks a lot
ok it i would not pull from the setter all the way to the other side, i would use a fresh getter
yeah thats a good idea, ill do that
oh right i c you had them flipped
i managed to post mine
fresh getter gang
every getter is fresh
Is someone able to point me in the right direction? I'm trying to get this crate to explode on impact I want to be able to hit it just once and have it fully explode but I cant seem to get the desired effect It also moves when shot at which I don't want. I followed this tutorial "Introduction to Chaos Destructible Mesh in Unreal Engine 5 - Learn The Basics in 7 Minutes!" but cant figure out how to make it how I want it to be. I tried to find other tutorials but to no avail.
First follow tutorial exactly, then fiddle with settings. Noob guess is that whatever threshold of 'damage' you need to destroy the mesh you have set way too high.
Are you adding a transient field at some point to affect the physics of the geometry collection?
What do I need to add to my door logic to make it auto close if I leave it open?
possibly set a timer to fire off the event again within a certain time, set the timer handle to a variable, then invalidate it when you close ?
Finished -> delay -> switch on Direction -> reverse would do it in a pinch
assuming direction is valid long after finished, not sure if it is
careful though, you have 2 states representing what the next interaction with the door should do when you should have 1
assuming direction is persistent you should use that as your state. It's the last direction the door went, either opening or closing
then you can lose the flip flop and the do onces
no
When projectile hits box add a transient field so it does physics stuff. Alternatively you can just make a new BP with only the transient field(s) in it then spawn it in at the impact location so it can be used with other explodeable actors too.
So I am getting lost. It should look like this?
All I want is for when my character opens a door and walks through it closes after 3 seconds automatically. I feel like it should be easy but am unsure.
it is pretty easy you just need a timer set to 3 secs
I am still new. Where do I place the timer in my logic?
Basically. When I open the door It will either close after walking through it after 3 seconds. So I imagine I would place it after my timeline
Seems lik a good idea, so after the timeline you create a timer by event set it to 3 secs and connect a custom event to it
Now you just do your entire code to open the door inverted
So essentially flip the sequences?
How can I make a loop action without using the event tick? I put this but it only appear once, I don't know if I need to triggering again since I checked loop on the set timer by event, pls help this is the first time using ue xD
You need to connect the 'event' pin to the event
And define an event by right clicking and type 'add custom event' and select what comes up. You can name it what you want
Ah so basically the script runs when the begin event is happening, but the loop itself is an event
There are a few ways, what are you doing in your timeline? on update you get a value out of your timeline track and set the rotation of your door to it
You could just multiply that with -1 and play the timeline from start
The loop is not an event, it calls an event on repeat
Connect logic to your event you named 'loop' and that logic will run every 3 seconds unless you manually stop it
This is working
That is an infinite loop
That would work if you unticked "looping".
Yeah
But if I put something on false it should stop, right? But will check constantly if it's true or false..
Will that be hard on cpu or smth like that?
You'd need to check before re-entering the set timer node.
Its probably the dirtiest way of how you can create a loop
How could I do it without breaking my computer cpu? xD
There's nothing cpu breaking in that blueprint... if you untick looping.
You wont break your computer but what are you doing is
You start the game
you set a timer- the timer triggers the event loop then the timer gets destroyed and you instantly create a new timer that triggers the loop after x amount of seconds
Oh yeah I forgot that about resetting timers
Otherwise it would just hang
Eventually lol (actually still think it would hang eventually right with 2^n calls at 3n seconds)
Ok so, if I uncheck looping, they will only to the timer once, so I can let it check so I have something that is constantly checking a variable
Checking a variable is fine.
I basically wanted a tick event but after a delay time, not every frame, I don't know how good it is
event begin play - set timer by event 0.1 sec, looping, connect that timer to the loop event and there you go
now the logic in your loop event gets triggered every 0.1 secs
Is this looping event hard on usage? I was thinking I could use this to check if there is something in a certain hitbox area
Well its cheaper than tick ...
Like, if any objects are in this cube hitbox area they get instantly destroy
Actually I think there are blueprints made for that
How long is a piece of string
Doing it per 0.1 seconds is better than tick whatever it is
Exceptions are things like animations, you need them on tick
For now I want to understand how to properly use blueprints, I watched a 1 hour tutorial and I only got some basics
Now as a normal person I will start practicing by creating elden ring 2
Ye, timelines and timers are one of the first things you want to learn
Do you have any coding experience whatsoever?
timelines being the order of the blueprints?
I code a bit in GML, I had to learn Unity for college but I am bad at programming, I understand the logic but I don't know the language, I only focus on Game Design and 3D Modeling
And by "learn Unity" I mean I mostly copy and modify what chatgpt was cooking 💀
You need to know the different datatypes, that should be number 1
What is
A bool, integer, string, vector, float
Then absolute basics, build a blueprint that prints hello world to the screen as soon as the game starts
Then how to create timelines and timers, what your doing right now
Blueprint communication, how and when to use casts, interfaces and components, what are references and pointers
Create a second blueprint that prints hello world to the screen when the player presses e, keep all the printing logic in bp2
I made a game in block coding on a website called Thunkable, I understand the logic of the coding, I know about the variables and stuff, it's like I know the gramar and the time articulation but I don't know the word itself, I don't know what bp should I use and when, as you said I need to learn more about it
Also, I put the bool on false, it display the good text, and I uncheck the looping, but the event is still looping in the game
can you explain from event begin play what happening in the code with your own words ?
The game start - A timer of 3 second start - At the end of the timer it's an if branch, if the variable attached to the branch is true, will display the top text that is true, if it's false, then it's the bottom text, and the whole timer/check/display is a function that I called Loop
Ah, I know
It's because I link the function with the.. function
ye dont do this
loop shouldnt be connected to the timer
it should be connected to your branch
You mean the if branch? But on the if branch it's the variable that is checked
ah, you mean the white wire
But in that case the loop function won't have the timer inside it
Connect your node called 'branch' to your node called 'loop'
Disconnect the branch coming off the set timer
Or tbh does not really matter but I think you still don't quite understand
You mean like this?
Yes
Ah, it's working, but in that case, when I reffer the loop function somewhere, it won't have the timer included
Now your 'loop' event that your timer calls every 3 seconds, will perform the check at seconds 3,6,9,12 and so on forever unless you end it
So you would create another custom function and call it set timer, then you connect it to your Set timer by event node
The timer is not contained in the event. The timer calls the event
Yeah, but could I add it in the event so when I call the function, it will have the timer (with the loop), the check and the display
It's good that you are avoiding tick when it's not needed, that's good coding practice
We made a game in Game Maker, it was something small but we got fps problems because we made almost everything in tick xD
You can set actor tick in settings
If you run everything on tick, you can adjust tick rates per actor
Save you redesigning everything
I will try to avoid using it, and only keep it for things that need to go very smooth or stuff that I don't know how to set up otherwise
Ok, the timer is not something hard to add in front of the function, thanks for helping me guys, I understood a bit more how the event call works
Tick is basically an event that calls every frame
So if you have 100 frames per second, it's like a 'set timer by event' triggering every 0.01 seconds
An event that calls every 0.1 seconds is 10 times more performant than that
Its bad practice almost always because it also makes your code framerate dependant
Yeah, I hate that all the games in this days have bad performance, so I will try to optimize them how I can xD
Same with my blender models
Well, not if you have custom tick rate @last peak
It's usually just 'hero' units you run per frame (or animations ig),a lot of stuff you can get away with 0.1 second ticks or 0.5 seconds if they don't have anims
How can I fast delete a link without right clicking on the node?
Alt click the link
Is it a good idea to create an actor with a lot of code in it and put it in the scene as a main "data base", or is better to split the code on multiple actors, like some on the character, some on the mobs, etc (more for random stuff not for basic functionality like character walking or anything like that)
Put the code where it belongs to
you should encapsulate as much as you can
and use a lot oomponents
I was thinking to make a actor with functions, and then on the other actors call upon the functions
The actor would act as a functions library xD
Thats dirty
Probably better to organise things to try and minimise unnecessary cross actor referencing
Unless your game is huge probably won't matter performance or memory wise, but might get confusing
For that you have components
Ah ok
A component is like a backpack with code that you can strap to any actor
So you will do less cross referencing because all the actors you're working with have the functions ready in their own script?
Well, thanks for the help again, I will go to sleep for now, good night 😅
I prefer my 'moms spaghetti' method of code organisation
Hello, I can't get my enemy AI to spawn on my locations. Maybe I'm overlooking something but I cant seem to find the error in my blueprints. I've also deleted and re-added the navigation mesh, but the result remains the same, my enemy AI don't seem to spawn on the given location. Here are my nodes from my Game Mode Blueprint.
In the world settings, I've also selected the correct Game Mode that I created for the level
Where are you setting your spawn locations
Also the right screenshot, can you show a larger version?
I've placed 2 enemies in the map, copied their location as a reference, and pasted that into both variables SpawnLocation1 and SpawnLocation2, as shown on the right picture node.
Sure, I'll try to take a larger picture, I'll have to split it up prob. Wont fit my whole screen 😆
Try adding say 50 units to the zombie z spawn. Could be they spawn too low clip the ground and it gets ignored.
I'll try this, Z axis is currently 15
If those zombies are there already and they collide with each other, the spawn might also get ignored
Well I deleted them after setting the location, only used them as an indication
Larger version of the node, I have to split it up as it's too long 😄
I just checked the scale and its the same too
Well that should spawn at least one zombie
What situation is this occurring
You have it in game mode begin play
But that can trigger before you load the level
Do you travel to the level from somewhere else? Eg a menu level
Well, I'm supposed to head into a main menu first, before actually loading in the level where the zombies are supposed to spawn
so maybe that's causing potentially issues
Well yes if that menu level uses the same game mode
Pretty sure begin play will call in the menu level
The main menu level does have a different game mode blueprint that I created
But you can call your 'start game' from inside the level blueprint
And it uses it as default?
my default game mode is set to the Main Menu one, as I want to load into that first before the level starts
Put some print strings in your spawn code, might help you see what is going wrong
How does the menu > zombie level transition occur?
I set up a Widget blueprint for the start/main menu, and then I created the following node for start game :
The thing is, even during the editor the zombies wont spawn, it's not in the packaged game but even in the editor
Ok well put some print strings to see what's happening
Btw I just realised if you have current wave = 0 that won't spawn anything
Ill try changed them to 1 and 2 instead of 0 and 1
I thought UE used a zero index?
I tried with other index but same result unfortunately
Well 0 will never work, now add some print strings or breakpoints
Where do you set 'current wave'
You actually ask all the right question, thank you so much. I found the issue
The current wave was set to 0, so I changed it to 1 and that solved it. Took me hours and hours, should ve asked here sooner
No worries, I am very bored tonight
I am using Unreal Engine's Default ABP_Manny animation. I am trying to designate the mannequin to "look at" a pawn. Right now I cast to Unreal's Default BP_FirstPersonCharacter (I installed both first and 3rd person start up files) and looks only at the player.
There are many things that I want to do, but what I want to do first is to identify how to set an instance editable variable for an array of pawns (that I designate to look at). I can figure out the rest.
You'll need to have an overlap sphere in your Character that registers overlapping Pawns. And on Begin and End Overlap of this Sphere you'd want to add and remove the overlapping actor to and from an array (after casting it to Pawn or Character!). That array would be a variable you have to create inside your character class. Presumably of type pawn.
Then you can get that array inside your AnimBP. Or you add a function to your character that loops over the array and returns the closest entry and call that in the AnimBP.
Player Index and GetPlayerCharacter aren't the right thing for that.
That's a local coop thing for player controlled characters only.
I do have a trigger zone for that type of thing and I was also thinking of using pawn Sensing instead (yes I am working with AI, but it is irrelevant atm). I was thinking I could use "On See Pawn" and threshold rather than on enter and on exit.
But yeah, I was asking about how to replace the cast and allow for an instance editable variable array of pawns.
From what I'm reading, I should just use an interface.
I suck at math, can someone please tell me how to make the mouse actually move the widget interaction component all the way to both sides of the screen? (Its clamped but it is allowed to go all the way. The mouse itelf is also clamped and can not go all the way, also preferibly please tell me how to start the widget interaction component in the middle of the screen weather then in front of the mouse https://blueprintue.com/blueprint/4bqztord/
So. I'm having an enum problem. I have a gun that can fire different types of shots. I was planning to use an enum to switch between the shot types, for ease of use. But uh....when I try to use this, the enum won't switch what's it in. This screenshot shows something to fire the earth shot, then switch back to basic bullet. This never happens. Instead, the earth shot keeps firing. Is there something I'm doing wrong here? I am on 5.4 if it makes a difference.
Im prob wrong but it looks like right after you call the event you set the bullet type instantly so nothing happens
What do you have controlling or directing the enum selection on play?
This too
At the moment, nothing. I have functionality for that, but it doesn't work, due to this. I'm trying to isolate what's causing this first.
Can you try to put the set enum in your function
Did that. It never triggers. I put a print statement in to make sure the statement was being reached. It was.
Cuz you set it back to default one instantly so if you have any checks with the enum its not going to work
It just says "Nah, I don't feel like it."
Are you able to call in pm?
Hmmmm? Call in PM?
Call in personal messages
so like a 1 on 1 call
so we dont bother the people already in the calls
Instance Editable Variable makes no sense here.
Sure thing.
Ok ill priv message you call when you want and we will fix your issue
If you need to address multiple actors that do this share a parent class then you can just keep an arrays of actors and ensure they have the interface to retrieve the look at location.
Otherwise it's enough to have an array of the Pawns/Characters
But you need to construct the list/array runtime. Either via overlaps or pawn sensing or whatever else you want to use. Instance Editable is for selecting already existing actors in the scene. That doesn't scale well at all.
You gotta connect the enum variable to the switch node :P
That's probably all there is to it
You currently set the switch to always be the same value
It's an input after all
Everything here is edited and changes before the game plays. On play, things change.
Yeah but that's not what you use for sensing other Pawns and looking at them
That's a nightmare to keep updated by hand and won't take into account runtime spawned actors
I need to change only once and it's permanent.
Anyone know a good guide where I can try to replicate the Xenoblade battle system?
Preferably using PaperZD?
I'm having issues with Attach Actor to Component node.
Using my interact system I want to "grab" an item from the floor, attach it to a scene component in my player BP so it's visible in my fpp view.
The attach node returns "true" so apparently the attach worked, but it has no effect on the item - it stays on the ground.
What am I missing here?
You have no socket specfied
I don't need a socket 🙂
it's difficult to make a siystem where my character clicking key E on the door teleport on a nother room?
it's not
as a begginer is accessible?
you need an interaction system (even basic)
i guess i just need to set up a different spawn zone on an input with box collision?
first step - learn how to interact with the door actor
can be based on overlapping collision boxes
got it, i will try again as a spawned the money on the box collision with Gemini goolge
yes
there's a ton of tutorials on this and it should give you an idea on what to do next
gemini managed to help me to understand fully the process of spawing an object with my character on a box collision
when overlap
and swap clothing of my actual character when teleport too is hard?
i guess it requires to make another BP character
nothing is hard, some things just take more time. you can do it
because rig is diff
i can't help with clothing/animations, it's something I'm terrible at
got it ty anyway
skip that for now and make sure the player teleports to the right place
Chances are the static mesh component in your item isn't the root of the actor meaning it was simulating inside itself.
i dont understand why my movement in UE5 with click right and wasd became soo slow
try set the actors location
it was an issue with the child actor, it overwrote the masters function
silly mistake
is the game lagging ? or your just moving slow ?
i fixed restarting, but i dont know what was causing it
waasnt lagging
probably just a bug, if a restart fixes it thats usually the case, unless you didn't save and something you changed got reverted
Maybe I'm understanding the logic incorrectly but my zombie spawn logic doesnt want to spawn 20 zombies total, divided over 4 different locations, so should be 5 per location.. It never matches and is always incorrect. My blueprint below, I split it up in different pictures as it's pretty long
It only seems to spawn 15 total
what is current wave ?
its set to value 1, when I set it to 0 they wont spawn
makes sense
guess ill just leave it broken like that, no idea why its acting like that
it works but it doesnt seem to spawn the even, correct amount
one sec... i'll show you what i would do instead of this multi loop thing
kk, thank you for the help btw. You guys are awesome
this will spawn 20 items with 4 different transforms
just set the array of transforms index 0,1,2,3
to be the four transforms you want
but this spawns the same item
this works for the same item, if you want different items per spawn, make an array of class names and pick the corresponding index
so you basically link the two up
get the transform, get the classname
from the two seperate arrays
or you can use an array of structs which hold the transform, and class reference
either way works
an array of structs is easier to maintain, but the two seperate arrays with matching index works as well
then you can use last index as your total spawn, and the amount in the % is the amount of spaces
just make sure you have the proper stuff in the array, which i would probably do some valid index checks or something but this is the basic idea much simpler then the multiple loops solution and it works
i've heard structures in blueprint could break the project
so two arrays might be better, if this wasn't an issue i would use a struct instead because it seems most fitting
I'm pretty new to blueprints so it's a bit confusing rn tbh, I'm also not sure on how to get those orange and purple "GET" array nodes
they are arrays, it's a good type of variable you can use i use it pretty often
Orange is normally a variable type of 'Transform' and the purple indicates a variable type that is an object class. (This could be any class but in this context it'll be an actor class). The dotted grid just indicates that its an array of that type. (list that can hold multiple of the var type)
How to use arrays? How do arrays work? How to do a queue?
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley
PRIVATE 1-2-1 SESSIONS
Email me at support@ryanlaley.com for more information and rates, or visit http://www.ryanlaley.com/sessions
JOIN THE COMMUNITY
Dis...
Hello everyone 👋 does anybody know how to package a project with Retina compatibility for Mac ? I'm on M1 Pro but when I package the project it is blurry like it doesn't apply retina resolution...
have you tried any of these options:
https://forums.unrealengine.com/t/how-to-properly-build-for-mac-app-and-retina-compatibility/2584686
Hi everyone, I’m packaging a project for Mac using Unreal Engine 5.5, and I’m facing two persistent issues: The game looks blurry on Retina displays Despite setting r.ScreenPercentage=100 and adding NSHighResolutionCapable in the Additional Plist Data, the game still runs at a lower logical resolution (not matching Retina sharpness). wh...
What are the Modulus/Modulo/% Nodes in Unreal Engine 4
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/WTF-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these examples files.
but i think as to your original problem, your increasing the starting index, if you set the indexes to start at 1, and goto to total/4 on each loop it should be fine
just loop 1 to total/4 four times
i need to make gate passible through for one team and not passible for another
but changing collisions response dont look like a good idea, bcz in the middle of action characters of a different teams can be close enough to enter, when collisions response is changed
how to do it in a right way?
"teams can be close enough to enter, when collisions response is changed" <-- i'm not sure what this means
"i need to make gate passible through for one team and not passible for another" probably custom collision channels
I've tried changing the indexes as well but it remains broken.. Thank you for all the information, will have a look at it and let it sink it. I'm new to this and it's still confusing me honestly. I'll try to find different methods in the mean time, this one wont work for me at all sadly
thanks tho guys, really appreciate you taking the time to help me and create blueprints to show alternatives
Also english isnt my native language so certain objects/topics are a bit hard to understand with specific terms. I guess I need more time and practice
situation: character 1 from the team1 near the gate. character 2 from the team2 following character 1
collision response changed to let char 1 enter, end char 2 also enter, bcz collisions dont switch back yet
why would you do that, you should use two custom channels
one for team A, one for team B
and set the gate to block for the proper team
so im importing 2 blueprints from a colleague
we have a common code/blueprint base, so it should just work
it finds the references to most other BPs correctly, but there is 1 it doesnt find. its another blueprint, it exists with the same name in both our projects.
but because its not found on the first loading attempt it just gets deleted immediately without me being able to fix the reference or anything, so now i get errors that the components are missing
anybody know how i can fix this?
create two custom channels, one for Team A, and one for Team B
default it to ignore, and set the opposite team players to block
or default it to block, and set the aligned team to ignore
are all your characters have a parent class ? do you have two seperate parents classes for the seperate teams ? or are all your characters seperated ?
you may want to set the channels on load get all your characters and do it automated
depending on how you have your characters setup
wdym "deleted immediately" ? the actual component, or the reference ?
are you getting accessed none ?
and it disappeared from the component overview
as soon as i load/open the relevant Bp
so you have broken stuff that use the component ?
its broken because it doesnt find the components blueprint for some reason
the class/blueprint it should be using exists, but it doesnt use it for some reason
Hi, all. I feel kinda silly asking this, but is there a comprehensive guide for integrating Steamworks API? Stuff like detecting the Steam overlay and adding achievements? I've found a lot of guides and info, but a lot of it seems to be outdated or missing information. I'm also a first-time game developer, so some of it is going over my head. Halp?
I have enhanced input setting and am setting up a key binding menu for the player.
As an example I have an input maping context that has a confirm action.
The inputs for this action are the enter key on the keyboard and circle button on the gamepad.
When updating the binding for these keys using map player key, all actions that have multiple keys get rebound to the last input in the action set.
So if the confirm action has the enter key and circle button, both inputs are now set on the circle button and not the game pad.
this is creating the buttons and setting the button text correctly, however the map value is only printing 1 value doesnt matter which button is pressed.
i think because the event runs later your not getting the current value like you want
I'm not sure I follow
you want when you click the event runs and pulls the proper map value correct ?
unfortunately that event is running "later"
and pulling from that value when it runs
which is not the current one in the loop
well everything is ok, this is a classic misunderstanding of execution flow
the loop body runs
but the click event doesn't happen untill you click
and when you do that, is when it pulls from that pin
I see
its not really a map issue
Is there a way I can still use this method or should I find a new one?
I was thinking about the whole systems of cooking the "product" picking up every singular reagent/bottles... is gonna be impossible to me. I tried to follow Gemini to help me with the first pick up the first product (not really picking it up but spwaning the dame type once overlapping collision) i totally got blocked when i have to set up the animstion in the ABP.... i dont even know how to do it
I did that following a tutorial about picking up snd dropping, now i have that system with a different holding animation on the dame BP chsracter i dont even know how I could implement a new one there
Why it all had to be so difficult in.UE
probably a new one, this is a tough way to i'm trying to get it to work but its tough one, or maybe someone knows the way but i can't see because clicked doesn't have any inputs or outputs you can set
So took a little break and watched some videos and managed to create this exact node now without issues, but still wont work. The zombies only spawn at one location and wont spawn at the other one's added to the arrays. It will only spawn 5 zombies at one location, not at the other locations.
because your spawn classes array only has 1 item
do all four
if you want to spawn the same thing just set them to the same
it was probably throwing a accessed none or something
kk makes sense now,, will try it
thats why a structure would be better, but blueprints structures can be quite a hassle
but this way you just have to keep the indexes matching up
or you could say if there was no valid index in that array, set it to a default as well
to make up for mismatches
damn okay
its fine, I was actually planning on making 3 more other child classes from my enemy AI to add to the arrays. It works now too, thanks a lot!!!
they do bounce slightly on each other when spawing, prob have to check the collision presets
but thank you so much man!!!
i think you can actually fix that in the spawn node
where it says always spawn ignore collision
thats what it's probably doing
try, try to adjust position but always spawn
and they will group hopefully
might work, might be shitty idk
i would probably set a value on the widget, and use the widgets click event in the widget bp, when you spawn set the value on the specific widget, and when you do the event on the widget just get that variable
it's one way to do it i think, you could then call a custom event with the proper inputs on your original bp
so it would look like loop -> create widget, set variable, in the widget click -> get variable -> call custom event
ye that sorted it, legend
mvp
how do i fix this? what do i need to call? inventory component is inside BP_FristPersonCharacter
get component of class ? @hasty merlin
doesnt seem to be that
like this?
no thats not it, goto your character bp
and click on the component
at the top right is variable checked ?
drag out of the return value here, and search for get inventory
it should be there
ahh i ahve to cast to bp_firstpersoncahracter first then i can get the component then get variablearray
i made it like that late last night when my brain was mush
Ah nice I get you, I actually thought of something like that but didn't know if it'd work with maybe putting the same set on each widget
which one is better for better performance, toggling widget with visibility or adding to viewport and removing it?
so like, i know im messing something up but im not actually getting a difference in the spawn amount. what am i doing wrong?
because the array element in the for each isn't a reference it's a copy
you have to set it back at that index
if your doing that a lot with a widget, probably visibility is probably better because your not constructing deconstructing the stuff each time
it's like inventory UI, player will use this widget a lot but it needs to be changed every time when it is opened. i have created a manager to control all widgets, which creates all widgets when the level has been started. do you think it is logical?
i have developed the system based on visibility route
Ok so i tracked down the issue.
Its not that the button remappings are being overwritten, its just that the name of the input is set to the first input in a slot.
How do I get what slot is being used from the current action/ button?
hello! arent we able to scale the Sphere Radius of a Sphere Collision Component at Runtime? Nothing seems to work scaling the value up with a Timeline and SetSphereRadius
Hey, I have a projectile and I want to draw a laser to show the player where he is aiming. Currently, I have a gizmo doing it so it only works in dev mode but not in shipping mode. I'v added a spline and added the spline points. But how do you give some style ? I want a laser that will be stopped by other actors in the scene like walls.
Check screen shot to see what I currently have
Thank you in advance for any tip or help
i guess you have to call something to update the body instance (which is the actual physics mesh of the sphere)
no idea if there's a method for it tho
Hey everyone, I'm back with another issue ofc.. 😄 I believe its a setting or issue with the collision preset of my enemy AI or my character. When I try to kill my AI, the bullets sometimes get blocked by other enemy their collision sphere I believe, as shown in the picture. Which prevents me from shooting multiple AI sometimes.
In the enemy blueprint I did set a node to disable the collision for corpses on the floor, but it still seems to be causing issues somehow.. Or maybe it's the line trace collision not set up properly.
On the side note, I tried setting different point damages for when I hit the head and body but the collision sphere seems to mess it up, and I'll hit the collision sphere instead of the head or body. I tried changing the collision presets too but no succes...
Thanks for your help.
So you want your trace line to only hit the skeletal mesh and ignores the capsule ? If so, you need to show us a screenshot of your line trace node so we can see what channel is used, then in your ennemy show use the collisions details from the capsule.
its a function is what updates it which runs every tick and is supposed to add to the Sphere Radius, the value increases but the radius remains the same
might be easier to just scale it with it's component scale
I've got a function which has a name, but the name doesn't appear? You can see in the tooltip it's named CreateSlotSave but in the details and nodes, the name is empty
The wild part is that if I duplicate it, the duplicate function inherits that error?
And yes, I've restarted the editor
what happen if you give it a random name?
Spooky, I'd nuke it and remake
Oh now THIS is funky. This is what happens if I try to reference that function in another class
Correct, I've currently removed the specific point damages for headshot and bodyshots as it wouldnt work, but i'll show you a screenshot of my line trace set up.
I feel like the enemy collision sphere causes issues as it will sometimes block me or the other AI, and it will take damage instead of the actual mesh. Here a picture of my line trace, the last 2 pictures of the node are prob irrelevant as it's for the particle effect and sound.
Check this shit out. Brand new function, lookin fine. But what happens if rename that input param like I want?
Somehow, having a single input named DisplayName causes the function itself to lose its display name?! It must be colliding with some invisible parameter that determines that
Thanks for the screenshots, I can see that you use the camera channel for your line trace, but if you look, at your capsule the response to camera it is ‘block’, so your capsule stops the trace line.
I would suggest to simply change the collision preset to custom, then simply make the response to camera be ‘ignore’ then you should be good to go 😉
Is there a better way to do this, or is this good?
I want to set the enum based of whether the fall time reaches a certain threshold.
I feel like it might be possible with some sort of select node instead of two branches
Hey guys, If i could have some help on this id appreciate it! been trying to get this working for 4 days now. So i have a Widget BP it has a base image its just a simple circle with some color, then i made an arrow too both made in Figma, took those into UE5 added in a canvas panel then added in 2 images one for the base circle and one for the arrow i got the arrow spinning in a circle with mouse movement but controller on the other hand is not working well. For controller i overrided the On Analog Value Changed Function within the widget used a Get Analog Value out of Return made a vector 2D set that then passed it into a custom function. Now inside here i took the value used a break Vector 2D took the X&Y plugged them into an Atan2 (Radians) Converted that R2D added 360 then did % Float node using the returned value out of the add for the top pin and for the bottom pin i put in 360 then set the final angle and plugged that into a set render transform angle, target being the arrow Image. But all the arrow does is flip flop from 45 (Top RIght of the base Image) to 225 (Bottom Left of the base image) Also the pivot point of the Arrow IMG is Y=1 X=.5 that makes it so the arrow rotates around the center of the base image. okay i can get some images but if you ever have played mass effect or something with a dialouge wheel thats what i'm trying to make so i'm making a radial menu with choices to choose from for npcs now my arrow is gonna rotate 360 degrees around a center point these pictures should help visualize what i mean:
Thank you, will give it a try now. Also, maybe a bit of a "dumb" question but I noticed that there are 2 sections for collision presets, do I change it in the top one (the character mesh)?
I changed it but my line trace still doesnt seem accurate, I can shoot next to the mesh and the collision sphere will still pick it up as a hit and count damage to the enemy
really been havin a hard time with collision presets, clueless. Ill keep digging
Is it possible using blueprints to get the color of an object under the mouse courser?
thats a bingo i think
define color of the object
Maybe maybe possible, pretty hard to do I'd think
"Color of the object" is a thing very late in the rendering path
You probably need to go through a render target and post process material
I want to make a UI color wheel
and color pick from the render?
so I need to get the current widgets color and save it
you need to do the same math in your code as the material does
that's infinitely easier
You presumably have some math somewhere that goes from position to color, in a material probably? Do that same thing in the code
ok so its not just as easy as haveing an image and hovering a mouse over it lol. No I have no math or any thing yet Just a color wheel as an image lol
So where do I start?
basically anything that involves data going from the gpu to the cpu can be a right bastard
right click in BP and type get pixel color, what are your options?
turn off context sensitive
That's probably the best tree to bark up
I'd start by figure out what it wants for Image and in what format
figure out some way to plug your color wheel image into Image
ok
I could not figure out what goes into that image so I asked chat gpt and it said it wont work for what I want and it said the only pure blueprint option is to convert to HSV to RGB and gave me this function.
Input: UV (0–1 range)
→ UVOffset = UV – (0.5, 0.5)
→ HueRadians = Atan2(Y, X)
→ Hue = HueRadians / (2π) + 0.5
→ Saturation = Clamp(Length(UVOffset)2, 0, 1)
→ Value = 1.0
→ HSVtoRGB(Hue360, Sat, Value, A=1)
→ Output: RGBColor (LinearColor)
Before I even try to make it I need your opinion on wither or not this will work GPT likes to tell lies! And I have no desire to spend hours making BS that don't work
In the editor, how can I determine the distance between two actors? Not through blueprint, but with a tool.
Apologies on the delay, just got round to trying it but still the same issue
There is a measuring tool you can use in the non-perspective view modes. So switch to top down view or w/e and then measure. I don't know why it isn't usable in perspective mode.
Yeah, really wish it worked in perspective mode
Has anyone here done some profiling in regards to the performance of events vs functions in BPs, or have some insight to this matter? Are functions generally faster than events?
You're in BP - it legitimately doesn't matter.
The main differences between an event and a function in BP is that functions can have return values and they cannot have latent actions.
Events cannot have return values but they can have latent actions
I wouldn't think there is actually a measurable difference between the two however (perf wise).
i was wondering
in the main blueprint window where u add ur meshes and such
is it possible to parent a skeletal mesh to another skeletal mesh's bone?
I have a question about saving data, im trying to save an inventory component's sots that are apart of a crafting bench, the problem is how do i tell the bench at spawn to find the right data, in other terms if i try storing an id, the id for the bench will be destroyed on end play but not in the save game, so all of a sudden we have an id thats just sitting there. I thought about getting the bench location and hashing it which would work because the location remains consistent, so i would be able to use the location has to look up an id. Im not sure how to approach this, but at the end of the day the main issue is how does the bench know which data to load
yes
attach at socket or bone
thats the thing, its not letting me do that in the blueprint area
it lets me do it outside of it just not inside
show what you're trying to do
Does any one know how to make a color picker for runtime? I have spent many hours and tried several things and nothing works.
Wow thanks Ill try it right away!
you need to create a rendertarget for it to work
wait thats for things in the world I need for UI 😦
Thanks though.. Is it posible to make it capture UI?
Yea I need to make a color wheel for my character creation
I can't belive there is not a built in widget
Can some one tell me what I am doing wrong? The print string should be returning 0 to 1 but it giving 1 to 2
Wow thank you!