#blueprint
1 messages ยท Page 143 of 1
"Blueprint Runtime Error: "Accessed None trying to read property Player Character Pawn". Node: Print String Graph: EventGraph Function: Execute Ubergraph BP Camera Pawn Controller Blueprint: BP_CameraPawnController"
This means while you have a variable named "Player Character Pawn" within your BP_CameraPawn actor, you have not assigned it a value before attempting to access it at this point.
i used isvalid to control this mechanism and now its working thanks for your recommendation sir
the player pawn is spawned in athe camerapawn blueprint, and the error is in the camera pawn controller blueprint, is this an issue with the player character pawn not existing yet?
It could be, yes.
The error comes in the controller blueprint, but you're trying to get the value from the BP_CameraPawn blueprint. That value is not set by the time you're accessing it here.
that might work on small things , but generally you don't want to have return values going from one exec line to another
I could move the entire code into the camera pawn to avoid this, however is there a logic for when something initializes? I assumed it was ok because I checked if the camerapawn cast worked
You'd build that logic yourself.
Begin Play for everything doesn't start at the same time for everything. So that means you need to check if the value is valid, and if it isn't, then you'd need to know when it is, which would mean using something like an event dispatcher that signals when the value is set so the other actor can bind to that dispatcher and then do what it needs to with that new value.
What's the best approach to make a book that the player can draw symbols in a grid pattern and give a meaning to that symbol they wrote ?
huh ?
do event dispatches work as a method to call code on one blueprint on another blueprint?
They work as a Twitter account who you've decided to follow
The twitter account is the owner of that delegate
You are the other blueprint(s)
So they can set themself up to be notified whenever that delegate broadcasts .
Could I also use interfaces for that?
Interfaces require you have a reference to everything that needs to know about it. So they'd be more like a mailing list ๐
If I only would use it from one class to another in one direction would that not be better with an interface?
I started a new project with the top down template and I created a camera pawn so the player can move his camera anywhere while the character that is controlled is a detached pawn to whom orders to move are sent.
the twitter account would be the camera pawn in this case, and it would trigger an event on the other blueprint?
Not really, because then you can run into the same problem where the other object may not be valid and you need to get a reference to it before you can send the interface call to it.
here is what I dont get:
- I spawn the player character inside the camerapawn.
- Then in the controller of the player character it fails to get a reference to its own pawn in the camera pawn variables.
Why? camerapawn exists before player character, and player character controller should only exist if its pawn exists
Begin Play doesn't fire at the same time for everything.
Begin Play of the controller could be firing before the Begin Play of your CameraPawn, therefore, your CameraPawn hasn't had a chance to spawn the Player Character yet.
How is that possible?
How is it not?
I can spawn things later on and their begin play fires at that point.
How can the controller of the player character exist before the player character is spawned in the camera pawn blueprint?
Because you are assigned a Player Controller before anything else.
anyone ? โ๏ธ
However the controller for the player character pawn is an ai controller.
am I seeing this right: A controller would only start existing when its pawn exists?
You're confusing different controllers and characters.
When you start the game, you are assigned a Player Controller. You are normally also assigned the Default Pawn. (In your case it would be your Camera Pawn)
Your Camera Pawn is spawning your Player Character that you want AI Controlled. This happens after your Player Controller and Camera Pawn has already begun play, but you're attempting to access the Player Character that you've spawned on Begin Play in your Camera Pawn on Begin Play of the Player Controller. Player Controller always exists before the default pawn.
Player Controller > Default Pawn > Attempting to spawn AI Controlled Player Character
oh now I get it, I made a mistake of assuming the error is happening in the player character controller, not in the camera pawn controller
Thanks for explaining that
So, if you must spawn that AI character in your camera pawn, and you want your player controller to know about it, ideally you would do something like this to prevent errors:
in the first picture, what is the get node? I have never seen this one before
It's a get node converted to validated get
You can right click on get nodes and convert them.
this someone know how i can make my own character like this? so the meshes are not connected to each other?
not sure if I am following
Read again and try to apply it
oh now I get it, thanks
This isn't really #blueprint related, but from what I know, you'd split up parts of your meshes in 3D Modelling software, import them and then use them as separate static mesh components.
alright, thanks ๐
its been a minute
but i got most of my characters made im struggling on two things
the command throw and character transformation
This isn't an easy question without more specific context. What do you mean by grid pattern? As in a pixelated rune? What does meaning mean? What needs to be connected to the rune? Is this a password? A way to cast a specific spell? A language letter?
anyone have any ideas on how to approach a command throw
I've been following a blueprint to help me set up my own video game, and I'm stumped on how the people who made this got theses. I had hoped to get it quickly, so that I can get rid of the compiling errors, but it hasn't showed up yet. Anyone got any tips for this?
They're control values from the old input system. Not sure if you can still get them in Enhanced Input. But I'd really be careful following whatever that is if the person is willing to != a float. They live a dangerous life.
If it's depreciated, is there a workaround to this then? I want to be able to test to see if it works, before changing up too much of the code to make it more my own style with my own sense of design, more or less. And yes, that might mean getting rid of the Not Equals, considering that might be where the template I'm looking through crashed when I 'died' in it.
on the validated get how did you create the input pin?
That was from dragging the get from the cast, from the get, you right click and convert to validated get.
Not equal won't cause a crash. But it will return differently depending on the person's machine and the cycle of the moon. If the value is somehow set at 0.00000001, and your != 0.0 takes that value as 0.0000000, the not equal can return true even though they equal enough for most cases and it should return false. When dealing with floats, there is basically never a reason to use == or !=. You should always prefer NearlyEqual that has a comparison amount.
I think that when using the input value of X / Y, it's always 0 or 1...
How does the system decide which is an Enhanced Action Values as opposed to a regular function? It doesn't seem to pick up the values I need for it.
did you set up some Enhanced Input Actions?
I have not, no
he's following a tutorial that prob shows the old input system
thats the part you need , once you set one up, you will see it in Context Menu
How do I set it up? I want to be able to replicate it so that I don't run into this issue again
Hello guys, in this quick and simple tutorial we are going to learn how to use the new Enhanced Input system in Unreal Engine 5.1
โช๏ธCheck out awesome Unreal Engine courses: https://bit.ly/GorkaGamesWingfoxCombat
Check out my Steam Game! https://bit.ly/3rVlXU1
Follow me on Twitter: https://twitter.com/GorkaGames
Subscribe to the channel: https:/...
this one seems decent tut
Dumb question maybe but how do I point this BP variable at an actual float curve?
Thank you so much! I'll look into this right now
noo
Hey guys, in today's video I'm going to be showing you how to use the enhanced input mappings system in Unreal Engine 5.1 that replaced the now deprecated input actions system.
#UE5 #UnrealEngine5 #UE5Tutorial
00:00 - Intro
00:12 - Overview
00:58 - Tutorial
10:23 - Fina...
Err.. those were gamepad analog and mouse inputs. O.o
No that I know, I mean like, how do I make that value reference a float curve
I was sort of expecting "Default Value" to be editable, but it isnt
There's a different type.
Did that but like how do I connect those two things
Did you compile the BP?
Cause you should see something similar to this. This is 4.27, but mostly the same on 5.+
Oh you're referencing the CLASS
Hmm? No that's an instance.
Weird, now it's working
It's an asset, so you reference the instance.
Once you make it and compile/save , you should see it as an option
Yeah that's how I expected it to work. For some reason even though I'd compiled it wasn't giving me the option. Or maybe I hadn't compiled but it wasn't giving me the warning? odd.
I have a set of lots of lights in my level and i want them to flicker so i made this actor blueprint to make them flicker at random times but i was wondering if i could make all the different lights flicker separately since right now they all flicker simultaneously
Here is what I mean. So the player will have a book where there are squares to draw symbols he saw in the map, and on the right of it he can write the meaning of it he thinks is the correct one. I'm still in doubt if I should do a check if it's the right symbol first and if it's the correct meaning confirm it by a sound and change the color of the symbol so he can understand that this symbol has been correctly guessed or not.
Of course there will be multiple pages.
I'll also look into this one when I'm done with the first! Thank you both!
Instead of tick , use a timer
you can set a start variance , so they flicker at different times
and , i think random float is 0 to 1
try Random Float in Range
and and, making the Material flicker might be better
so something like this maybe?
like this?
now ,put your Visibility code in the Light Fire
Figure out how large of a grid you want to use. If the example you give here is 8x8, so that would be 64 total pixels, which could be represented by a boolean array.
A fully false array would = empty image. A fully true array would = a black image.
You could use an editor widget to generate the required "image" data using checkboxes and specifying any other details you want about the image and store it in a data table or some data assets.
it works thank you so much for the help
does anyone know how to load a separate scene inside of a viewport widget like this: https://www.linkedin.com/posts/dani-marti_gamedev-ue5-indiegame-activity-7115459542066360321-N982
at least it looks like it's a separate scene.
do not cross post
you talking about the player and rocks ? thats probably a Render Target/ Scene Capture Component
Yeah. I've seen it done that way before but doesn't that mean setting up that scene somewhere in the current level? For reference, I'm trying to display a small scene similar to that in the main menu whenever the player presses escape, no matter what level they're currently on
There's a way to spawn actors in a separate world using viewport widget, I think this might just be a character mesh and another mesh for the ground
yup, you just locate it far away from view
I was hoping to load a second level and display it in that viewport. I've seen it done before but it's not clear how to set it up
I would set up everything in 1 actor , then position it in your level out of the way
I'll see if I can get the right result that way, ty
I spawn mine 100k x,y,z and i never see it
yeah that may work fine
Here's an example of what you could get your editor widget to look like... You'd probably want to make it a bit more fancy, like being able to load runes from the data table or assets, and display them which would be using something like Get Data Table Rows, putting them in a drop down box, and having a load button that then populates the values of the checkboxes.
From there, when you present a player with their own UI, it would act somewhat similarly - you could have buttons that change an image from light to dark in the UI based on their clicks and change a boolean value in those buttons. You gather all the buttons and check whether they were clicked or not into an array, and you can now compare that boolean array to the one in your data table or assets.
Could even use the same widget from the game where the user is drawing.
Oh, can you instantiate the user widget within the editor widget?
Oh neato, you can ๐
Hey folks, any of you get this message and if so, how did you fix it?
Assertion failed: IsValidCoord(InRenderCoord) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Landscape\Public\LandscapeRender.h] [Line: 510]
anyone got an idea for a method to implement collision on a cable component in ue4?
Guys I am losing my mind. What is the node called that is like string append but for text?
Where you can type like blah blah {APPEND1} blah blah {APPEND2}
format text
Bennn
Thank you! lol
my guy
you steal here lmao
i spoke to you 2 yeaars ago about something
i think it was also cables lmfao
you're stuck on cables for 2 years?
Announce post: https://forums.unrealengine.com/showthread.php?129989
Alan Willard is back in action with instructions on how to use the new 4.14 cable component and some of the new rendering features. A ton of new features have arrived with the release of 4.14, so Alan is going to dive right in and explain how to use them in-game. With his usua...
๐
i came back recently and immietaly had the same issue
Ill watch this at some point. Hopefully helps to figure out collisions
it's old but good (and still relevant for newer versions)
wait, why?
if they really improved it in 4.14 you may lack features in 4.13 (which i would avoid at all costs...)
The stuff i already built there. Its a rare thing, then ill be messing around in ue5
becuz my pc b4 was a bit bad
gotta love the live trainings โค๏ธโ๐ฅ
so helpful
sometimes yea...
The only hints in there is "Assertion Failed" "InRenderCoord" and "LandscapeRender" which basically means the engine is checking to ensure something is valid with a render coordinate likely to do with a landscape, but it's not valid, so it ends up crashing. None of which is really blueprint related.
A google search on these terms gives a thread that mentions Nanite having problems.
https://forums.unrealengine.com/t/assertion-failed-isvalidcoord-inrendercoord-landscape-public-landscaperender-h-line-510/1310537/6
sometimes?
they are 8 years old... Some videos are newer and better
old = might have changed
Thanks for the second set of eyes on it. I already checked that forum post. Had some interesting fixes. On my end, what worked was I had a single target point actor in the world and it didn't have a world partition grid name associated with it. That seemed to fix it for me.
true
Ugh. Landscape code. ๐ฆ
Got sick of that class pretty quick. The amount of walls you run into trying to use it are atrocious. DynamicMesh component landscape is literally better if you have a vague sense of materials to manage it.
Attempting to add movement to a kayak using the enhanced input system. I was getting Blueprint Runtime Error: "Accessed None trying to read property Kayak".
The kayak itself is a pawn that auto posses on level load. I created a variable that is an object reference of the kayak pawn that is used throughout my movement nodes, which is the cause of my errors. I don't understand the proper way to reference the pawn the player is possessing. I've tried adding Is Valid calls before my input actions but it's always reading that the input is not valid so it looks like the kayak that does spawn on level load and is auto possessed by the player is not being properly referenced?
The screenshot are the nodes I use to set the mapping context for the kayak. Thank you.
Accessed None errors mean you have a variable that you may have set to the appropriate type, but you haven't actually set the value of. It would be like defining the variable type as "Integer" but not giving it actual value to work with. However, if you're possessing the Kayak, then you should be able to put your input nodes for your movement into the Kayak itself and not need to keep a reference to the kayak anywhere.
It's also not great to add the input mapping context on begin play as the controller may not yet be possessing it by the time begin play fires. Instead, use the "On Possess" event which gives you a reference to the controller that is possessing it when it actually gets possessed, which you can then cast to player controller and add your IMC like you're doing in your screenshot.
Thank you for replying. When you say put the input nodes for movement into the kayak and not refence, are you saying to rely on the self parameter the nodes sometimes do when nothing is connected to the input?
Is "On Possess" the same as Event Possessed the node? Sorry, new to blueprints.
U r doing single player right?
yes
Where exactly do you get accessed none for the kayak variable? Because Ur screen shoot is not showing that
An object reference is a pointer to a type. It points at an instance of kayak in this case.
Accesses none means u never set the variable to point at the kayak in the world. Therefore you are trying to access "none"
Sorry, here's an example of movement
What is kayak floating
Don't use the drop down
Drag the variable and connect it to the is valid input
If the kayak is never set then you will have access none, it's Ur responsibility to set the variable before trying to access it
In the variable list I set the kayak as the object reference to the self possessing pawn. Then this is the log error. Kayak floating is the name of the pawn.
Yes, you wouldn't need to reference the kayak and could just use "self" if you move the movement code to within the Kayak pawn and possess it.
And yes, the Possessed event on a Pawn should be the one.
Sorry, that was from an attempt when I was trying to make everything use self. It no longer outputs accessed none errors(woo!) but for some reason the is valid always defaults to not valid.
What's the proper way to handle the add force node with self? The error it throws is This blueprint (self) is not a PrimitiveComponent, therefore ' Target ' must have a connection.
Whereas if I add the kayak variable to it it casts it to a static mesh then inputs it add force.
The component hierarchy:
So this is what you had before. So if you've moved to the Kayak, you no longer need the kayak reference, but in this case, you still need a reference to "Static Mesh".
Do you mean static mesh -> target like this?
Is there a checkbox to make it so I can utilize my main menu from a controller instead of keyboard or do I have to do some remapping? I'm using enhanced input mapping if that helps
Thank you for explaining it so well @dawn gazelle and @frosty heron .
You can just add the controller buttons to each input in the IMC
Alternatively, if you use CommonUI, it has platform dependent input routing
I'll check this out, thank you!
I want the ray to be cast from the camera
and I think i need to update the cameras position after the game starts but I dont know how
I usually get a direction by minusing off one vector from the direction I don't want
So camera position, minus behind camera position, it makes a vector that points directly forward
If you put an object behind the camera that's stuck to the camera you could just use that object as the coord
Also using line trace by channel uses both positions for the line trace I think
So start pos being camera pos and end pos being in the direction its facing somewhere
The start is the camera position, not 0,0,0.
End is camera position plus camera forward vector multiplied by distance
^sounds about right to me
sorry im slow but ty, that fixed it
Does anyone see why this cast would be failing? Specifically the one to chase parent
The object being checked is not derived from bp chaseparent
Print string to see the value of the pawn you are passing
its printing the flying enemy one
Right then if flying enemy is not derived from bp chase parent, the cast would fail
gotcha
Something is inheritetly wrong there, the sequence doesn't look it belong there
what do you mean?
I would make characters share the same base class and just have an attack function so any class derived from the base can call attack function without nested cast
ok. The only reason i havent done that so far is because i origanllay created a default pawn for the enemy and then pivoted to a character bp bc i needed the rotation. I wanted to keep the flying enemy bp as a referal of sort tho
I will do what you are saying instead
Imo it's worth it to utilise inheritance if the pawns, enemy or friend like share common functions (eg attack)
Im kinda new so im sorry if this is a stupid question but could i make a charcter a child of a pawn class
The built in Character class is already a child of Pawn.
yeah sorry i meant so that it would the character movement component but idk if thats possible or if it even makes sense to do that
Make it derived from the character then?
I'm trying to create a possession system. I have this for now. So when the parent class character is in the level it works fine but as soon as I put the child of the parent character, it doesn't possess the parent character at all and most of the time throws me this error. Only workaround I found for this is to set the spirt reference private and then uncheck and compile and it sometimes work. And also it only possess just one child character and doesn't possess the parent character at all
Does anyone know why my sun (directional light) always gets stuck at 90*.
The only way to stop it from stopping is to drastically speed up the rotation.
I've spent days on this and cant find a solution online, wondering if anyone has overcome a similar issue?
Accessed None errors mean you have a variable that you may have set to the appropriate type, but you haven't actually set the value of. It would be like defining the variable type as "Integer" but not giving it actual value to work with. In your case, the error being thrown names "As BP Spirit" as being the empty variable, so you haven't set a reference to the particular spirit you want to use when you're trying to use it.
But I have set the reference 'As BP Spirit' in my parent character blueprint
Probably has to do with Gimbal Lock.
And this error is very random. Sometimes it doesn't throw any error and runs and sometimes it does
Regardless, that's what that error means. Your variable is empty when you're trying to access. You can try doing an IsValid check before accessing it which should prevent the error from appearing, but that doesn't necessarily mean the logic will still work how you're hoping.
Alright!
It's working now out of nowhere. I can't seem to find the issue. I changed nothing and it randomly started working again
And this is my second issue, the possession is only working for the child character and only one child character. It doesn't work on the parent class or the other child present
Based on your code you provided, that's because you're not actually determining which actor to possess. You are using Get All Actors of Class and looping through and effectively trying to possess all of them , which you'll always end up possessing the last one in the array.
This is also likely the cause of your accessed none error, as you're eventually calling the "To Possess" interface on an actor you may not have overlapped yet, so they wouldn't have the reference set.
I did not know this was a thing, I'll look into it, thanks for the reply
Oh I see!
Thank you for pointing it out!
Can you let me know how do I scan for characters I can possess ? What I thought was that I'll create a character class for characters I can possess and make variants out of it and other classes which I can't posses.
I apologize if I'm not making any sense, I'm very new to all this
As you seem to be using overlaps to begin with, you can utilize that overlap on your spirit as well. When you press your input, you should be able to use "Get Overlapping Actors". This still gives you an array, but it would be a much smaller list and would only contain actors you're near to. You'd need to loop through the list, and determine if it's a proper possessable actor, by checking if it implements the posessable interface you appear to be using, and if so, start your possessing code on that particular actor, and break your loop.
This will mean it always possesses at least an actor you are overlapping with, and that it's a possessable actor, but if you have two possessable actors near to eachother that have intersecting overlap boxes, it'll be basically a coin flip that the engine decides which one you're possessing.
Thank you so much for this direction!
I'll try to figure this out and see how it goes
I'm getting my hands dirty on common UI but I can't seem to make it work. The common action widget is disappearing when I hit play, I set my accept button to a different one instead of face down but face down still works to click the buttons while I want it to be face top and I don't know if navigation work as intended, I do see blue rectangle border around my common button base widget when I navigate with my gamepad. How can I debug what are the problem?
Thank you so much! It's working without throwing any errors now
hello i done the keyboard inputs in vr but it only goes side to side now i don't know how to fix it here are my blueprint
I've updated some blueprints with meshes in them via the blueprint, but the ones in my world do not show changes in the details, do I need to reload or replace them?
i have a sphere trace but if i collisde somewhere the impact point is always on (0, 0, 0) Why is that. The sphere has collision profile sphere in project settings i set the sphere profile that i created to overlap. Can someone tell me why this happens?
Never mind i actually found the problem! It seems it returns 0,0,0 when start and end is the same location so just add a little offset to end like 0.001 in z and that will fix it :D
Is there a simple way to check if the player is falling, disable their movement controls?
i believe it is 0,0,0 when Return Value = False (Didn't hit anything)
i got it to work. It did hitsoemthing otherwise it would turn green and make a red marker
Is there a way to have the editor unload something? With me working with soft references, if I've already opened it in the editor then it's already loaded in the game. (PIE) I'm not fancying having to restart the editor each time lol.
does it unload when you change level ?
That would probably take longer than just restarting the editor lol.
It doesn't look like it unloads the things I'm wanting to test are actually being loaded correctly. Was worth a try though. It probably unloads some stuff though.
Does Standalone start with everything unloaded ?
Doesn't, I faced the same issue
Ends up testing in packages
I end up testing in shipping build and reading the log to confirm that assets do get unloaded on level change
Does anyone know of a work around for not being able to async load classes in uobjects? I would imagine I would need to have it's outer (assuming it has world context) do it for it.
And yes I know I could create the base class in C++ and give it world context. (BP Only project)
If I have 2 arrays of Enums, can I sort them and compare them with an equality operation?
Is there some edge case this might not cover?
You could but UE doesn't come with any built in sorting algorithms afaik so you would have to handle the sorting yourself. Why are you needing to sort them?
uuuh
i just want to sort because my two arrays might not be ordered, and I dont care about the order
I want 1, 2, 3 to return true when compared with 1, 3, 2
I don't think that's a built in function. (I can't find it) Also, if you don't care about the order, why sort it?
im on 5.4 fwiw
Ahh ok, could be new to 5.4 then. Good to know.
anyways, this is the reason why I need them to be ordered
so I can do a == comparison
i want to know if, for every item in array A, there's exactly one like it in array B
code can get unnecessarily convoluted if I dont order the arrays
I would just use array contains.
Alternatively l, if it doesn't need to be an array, you could use a set. (Assuming you don't want duplicates) They have functions for doing these types of checks which are very quick.
I'll look into that, thanks
Identical
i think order still matters
ah. so it's just the equality operator
in the widget I have WidgetSwitcher which has 3 other widgets underneath it, after changing the version from 5.0 to 5.1, or even from 5.1 to 5.2 etc., it gives me such errors. If WidgetSwitcher doesn't have any widget, and I change versions and then add these widgets back, everything is fine, but when changing versions it happens, can anyone help?
am I doing something wrong?
I don't want to delete the content in widget switcher every time when changing the version
i have a question; i created a slider but im trying to connect that slider to my ultra dynamics sky, i try to cast to ultra dynamic sky but i cant grab the time of day float from UDS, what the issue?
You'll need to show how you're trying to do it.
the slider is the following: and the float is this oneand i think this is the float i need to change to get the number desired
sorry the UDS is super complex
I can't see where you've tried to update the time on the UDS.
changing a value wont do anything unless the value is being used in Construction script, or Begin Play with Simulate or something similar
If you want it in a widget , use PreConstruct
apparently doesnt work properly yet ๐ญ
so much time debugging, I sort both arrays with the same inputs, one of them ends up as 1, 2, 2, 2, the other as 2, 1, 1, 1
but with enum values
What are the enums for?
ingredients.
I have a kitchen/cooking game.
I wanna make sure that what I'm delivering has been ordered.
for example
bread, burger, lettuce == burger, breat, lettuce
I guess you could create some actor you place in the world and communicate for that to do the async ops instead.
Either via a soft ref, get actor by class, etc.
Its ok, I ended up getting my quest manager to handle the loading. ๐ (images for those that might be interested in how i did it)
Would I be safe to assume there might be duplicate ingredients?
Something like this will work and should account for duplicates.
Pattym is asking for what is on your ValueChanged event. And I also feel like I've had a similar conversation before about this same content. If memory serves you have to copy all of the stuff in the UDS thing's ConstructionScript or at least parts of it to another function. Then when you alter a value you have to call that update function as well and also call it from ConstructionScript.
hi guys why is the magnets count reach 16 even if i set the number of waves to 2 and why are they in the same position in the three lanes even if i multiplied y by 10000
my game postprocess and nav mesh and landscape all these always get unloaded with me after i delete them and put them again they get unloaded again the rest of stuff is working great please help
honestly thats a tough one to read, lines all over the place
Guys I need tip, I am using RInterp to in my project to move with actor, but the closer it is to target the slower it is I would like to have always same speed problem is when I used lerp my actor was moving very weird, only good result I get with rinterp to when I use rinterp to constant movement is very laggy :/ any tips?
i think this is much better
whats hitting 16 ?
the number of newblueprint2 (themagnet)
what is sizex set to ?
is it because number of for loops
and also what is the number of waves set to ?
its get from new var2 array which is one 740 two 840 and three 940 as of size x its 3 lanes so its 2
two
Are you caching start rotation?
nope
I have never seen this before but "disable input" is not working for some reason
but it works in another instance
ok... it works if all later logic is removed
odd
ok......................
SetActorTransform gives you back input
wow
never seen that
What? No way
There we go ๐
i still cant figure out how to fix this : (
how many times are you running this ?
This used to work as expected, but for some reason today it's acting differently. on begin overlap, this BP adds 1 to a variable and sets it. on end overlap, it subtracts 1 from the variable and sets it.
For whatever reason, it seems to run it 5 times each way.. so when I begin overlap, it prints the message 5 times (1,2,3,4,5), and on end overlap again (4,3,2,1,0).. Any idea why?
i see 2 * 2, maybe * 3 max for each loop but you should get somewhere between 4 and 12 i think
your sure theres only one copy of the bp in that place ?
I have another copy of the BP nearby on the level, but they dont overlap at all
same behaviour from that one too though
are all your overlaps 5 times ? or just that bp ?
all of them. i just placed another one and same thing, but this time i inched closer and i noticed that if i go slow enough, it actually does 1 at a time
so its almost like 5 components are overlapping
is that a parent bp ?
thats weird if it happens on all i'm guessing it's your character
you only have one character ?
sorry im new to this. it says the parent is static mesh actor, so there shouldnt be any other logic thats duplicating it if thats what oyu mean
I only have one character, but im thinking its my character as well.. im thinking each component of my character is triggering it and counting as my char
odd
try on actor overlap not component
see if it triggers 5 times
Does anyone know how can I make this work?
solved.. it was some dumb boots i added to the model lol, it had generate overlap events turned on (two boots of 2 parts each for a total of 4 components overlapping, plus my character for 5)
sorry about that, and thank you! Im going to try re-enabling overlap events and your suggestion
i'm surprised the cast succeeded
looks like your enemy dead is not there ?
hmm, this is supposed to be a door.. how would actor overlap work in this case? I added a collision box to set the radius for interacting and displaying the interact message... if its overlap actor, would that be for any component of the door (frame, door, collision)?
just on event begin play
no it's fine what you have i was just wondering as a test
yea it should be this
oh never mind, missed a pin
so wait
and actually with the weighted boold it could be even less, but your saying you get 16 ?
yes even without the bool
just tested it, actor overlap would have been a clean solution regardless of the boots generating overlap events or not.. probably better they dont though. Thanks again!
first pictuure is from my enemy blueprint I want to use that event dispatcher when he dies, to open the doors, but it gives me an error from BP_Enemy_C I don`t know where iis it getting that BP_Enemy_C
Hi all ! I have a problem with my "Lock-On Target" system.
When my Character and my "Target" Actor are too close, both of them are not centered in the camera (TPS) anymore
Both are in the left of the screen
Does anyone know how can I "clamp" this rotation so they can't exceed the middle of the camera ?
I use a simple "Set Control Rotation" for the Lock
it sometimes be 12 really but just sometimes which is not good for a magnet and still in same position in the same three lanes
why did you use a for loop instead of a for each, where you just get from the array anyway ?
carefully using outside variables you may get accessed none for index out of bounds
because i used this for spawn coins but ill try for each loop and see if it works
i just wonder about the sizex number and accessing the indexes
if your numbers are correct it shouldn't be an issue
size x is 2 because its 3 lanes
I need to clamp the cursor position in UI inside of the screen but the GetViewportSize is different than the actual size, anyone know how to do it? I see people get the resolution in c++ but I cant find a way in blueprint
wait for each loop dont work in here because i dont have array to check
your getting from new var 2
just in the beginning loop not the rest
the original one that you get the index from
oh ok
you really need to name your variables better
new var 2 means nothing
but you can just use what you have if your numbers are correct it will be fine
the same code with a different bp ?
what does the error look like ?
so when I kill an enemy, it says this : Blueprint Runtime Error: "Attempted to access BP_Enemy_C_0 via property none, but BP_Enemy_C_0 is not valid (pending kill or garbage)". Node: Call Enemy Dead Graph: EventGraph Function: Execute Ubergraph BP Enemy Blueprint: BP_Enemy
click on the first link it gives you, where does it take you ?
but is strange, basically when I spawn An enemy, I add it to an array in orde to after to add them to a custom event
still not fixed
i dont know what to name it
ah there is no link, no where
hmm
"via property none," ? what is this all about ?
yea i can do this but i prefer to do all things in spawnable
I have literally no idea
honestly i would use one code to spawn all things and just pass a class to the event
oh, destroy at the end of the code
your using self, but you just destroyed it
i cant do this this is hard for me + ok i named it lane positions
oh you are right, thank you
thats not how you use a foreach usually you don't get again, just use array element
ok
like this right
ya, what are your errors ?
nothing because i play in simulate
and on selected viewport no errors
do the magnets do anything on beginplay ?
yea they pull up coins obivouslly
my magent logic is good but the issue is the number of magnets and that they are in the same position
are you setting the position anywhere in that logic ?
or anywhere else ?
set your collision handle override to default
see if there are not spawning because they got a collision
no i move the coin basically not the magnet and i destroy the magnet and i set it to default but still
it was just a suggestin while you test
so your y is off ?
i dont really know the y is spawn in same position no matter how far is it
you may want to put the for loop back if you want to control the size, or you can use the size of the array just be careful with that with variable you don't go out of bounds of the array
ok
try to hardcode the y, see if that actual moves it
just disconnect the pin at the end, try a couple y position
see if it moves
if it's your maths, or if it's not setting correctly for whatever reason
debugging ftw
it moves but its the y not the x maybe this is the proplem
its actually not too hard to add an input to an event
and in this case all you would need to do is plug the input class into the spawn class
and you can spawn anything
so you could resuse your other logic that works
how can i show assets in tile view, in Editor Utility Widget?
yea but its endless runner thats why its hard and seems like reducing it made the magnets appear like this
like this
someone can help?
i think you can click on settings and set them to list
diffrent basically just 3 instead of this and randomly so the first one in the start lane 2 and the second one in lane 1 and third in lane 3 this is my spawn coins logic that work
ya you could also set those as variables that you pass as well to make one custom event
so they are spawning correctly on x, y ? or there too far spread out is the problem now ?
they are just too close
and if i made the y bigger its fixed but its in the same 3 lanes as you can see
idk which way is x, y i'm assuming x is forward ?
no x is left and right
ok so the x is fine then, just adjust the numbers on the y
yea but they will still be in the same position
Hello, I am creating a blueprint with option to pick different shapes and have specific settings for the one that is picked
I used an Enum to create a dropdown to pick the shape, but the problem is that all the variables are public and not specific for an actor that i picked on the enum list.
How can I change this so that every actor picked from dropdown has different variables exposed?
its hard to know what the proplem is
how do you want them to spawn ?
if everything fails i will try this logic
just 3 or 4 and randomly so the first one in the start lane 2 and the second one in middle lane 1 and third in last lane 3
you want them in waves ?
na just the coins in waves
so it looks like you have that
it looks like you have one in each lane
but you want them in a random lane ?
no i want them in a position thats not the same in the lane that it is the basically in the same position
i just want them to have diffrent position
Have you tried using for loop?
This might help for the position
yea
its three for loops
it's much easier way to what your wanting
you may want to add some padding at the ends, or make sure your spawn when collision is off
so you don't get overlaps
but what should be the section length
so basically it spawns them in waves of the x location
so the x location is the same for each one, but the y is a random
the section length is the distance on the y that each set of 3 are spawned
so shorter would make them all together
longer would seperate them a bit more
hi guys, i have my arms with a bone which in blender is attached to the camera, so i can make camera movements, but here how can i parent the camera to a bone in my arms if my arms are already parented to the camera?
you can also do some more maths and add a spacer between them so they don't overlap ever but this should work for now
you could also get the total distance / number of sections, and this would be the sectionlength if that makes sense
hi, in Editor Utility Widget I want get assets in selected folder
how can i do it?
i put the section length to 10000 and they still seems close a little bit to each other why
it's possible that one will spawn at the end of a section, and one will spawn at the beginning bringing them close together, in this case you can add a spacer to the code
ok where to add it
you could just do the random instead of 0, start it off at like sectionlength / 3 or something
but also use multiplication instead of division because it's faster
its already 5000 will this solve it
setting the start random will give you a spacer
instead of 0, just put a number ig but i would make it depend on sectionlength
so you can just change that and it works with it
play around with some combinations
when it gets the random value it's relative to current section
yea i changed it but still the first two too close the others are not too close
not *3.0
maybe 0.3 is what you wanted
still too close
too close on the y ?
yea y
are you saying they are in seperate lanes but too close to each other considering forward and back ?
thats going to take some more maths
you'll need to check if the difference in the y from the others
yea basically y is forward and back
i c, because i made it completely random for each section, some may do that
do you always have 3 lanes or you'll want more/less later on ?
just three
Does anyone have an idea about how to make an "Auto-Zoom" of my TPS Camera so I can see my 2 Actors on the camera all the time ?
I guess I have to play with the "Spring Arm Length"
with blocks being an array like this, and you would change this if you changes the section division, but it's more complicated but it looks like what you want
https://blueprintue.com/blueprint/vhu7usjv/
wdym auto zoom ? does the zoom need to be smooth ? or can you just zoom in real fast ?
what your looking for is "target arm length" most likely
from the spring arm
I can smooth it with a a Finterp I guess
ya so what you can do is finterp on tick the target arm length to the length you want as a float
I thought so but I don't know where to look to begin (the math)
there isn't much math to you interp from the current target arm length to the desired arm length as a variable float
on tick
are the blocks mean the lanes index
Yes but how can I know what is the value of this float ?
i just used the lane index so it gets the first through from a shuffle
so that it's random, but you don't choose the same spot for the other lane
the blocks is in the picture i showed you it's an array that has the different numbers in there so that you get random from that, you add to it if you make more divisions
ok i hope it works
Using editor scripting is there a way to cyle a mesh by mouse scroll?
ok this works finally but only after i put the section length to 40000 i really dont know why
guys is it normal that when I play my game on pc where is FPS 60 , speed and timer in game are same like when I play game on laptop with 20 fps everything is equal but , video sequence from laptop with 20 FPS which is recording player to get from A to B is longer like from 60 fps, even their speed is same and timer in game is same , game on laptop which has 20 FPS is way slower maybe 3x How I can solve this?
hey,when i enable the vSync checkbox it raises the scalability setttings to medium
its so strange
you may want something else all together because of the size, i was shooting examples, but i think i see what would be a problem with that or how to fix it
maybe i made a mistake somewhere?
thats simple i just dont have to spawn if it reaches the end of the lanes
or just increase the loop count, and keep the sectionlength low they will be more grouped together
and you can you can lower the sectionlength
because your looping more times
basically the first loop is how many sections
ok ill try that tomorrow thank you so much you really helped me today โค๏ธ
Sorry for the repost Using editor scripting is there a way to cyle a mesh by mouse scroll?
Sadly, this is something you'll need to figure out. It would be highly dependent on what angles you're using for your camera, how your world is designed and the positions of the 2 actors.
An example:
If you had an overhead camera and your level was just a flat plane (basically nothing that can obstruct the view of the camera to one of your actors) then it would just be a matter of figuring out how "high" you need the camera in order to have both the actors in view. It would be a matter of calculating a triangle....
You want to know "a" as that would be your distance your camera needs to be.
You can calculate angle Beta, which would probably be the FoV of your camera divided by 2.
"b" would be the distance between the two actors divided by 2.
and because you know there is a 90* angle heading from the base to your camera, it can be solved by some trigonometry.
The problem is that the angle of the camera changes because it is based on a "Lock-On" target system
So if I jump my Camera is rotating to point the "Target" Actor so the angle changes
And I imagine you're not using a flat plane either so there can be things obstructing the view between the two actors.
Yes but I guess this does not matter because event if there are things I can still calculate where are the two actors related to the Camera, right ?
But you don't really care where the two actors are in relation to the camera. The camera needs to know where to be in relation to the two actors.
You're right
And in a non-flat map, with varying camera angles, that gets into math that I wouldn't be good at ๐
I see.. ^^
guys is it normal that when I play my game on pc where is FPS 60 , speed and timer in game are same like when I play game on laptop with 20 fps everything is equal but , video sequence from laptop with 20 FPS which is recording player to get from A to B is longer like from 60 fps, even their speed is same and timer in game is same , game on laptop which has 20 FPS is way slower maybe 3x How I can solve this? I am normally using delta time to multiply speed to have it not connected to FPS ,
might work to just center it and zoom in/out untill so you can see them
so your running something on tick and it's slower on 20fps than 60fps ?
what does that look like ?
So I have to find a method to check when I see both actors, right ?
or zoom based on distance between them ?
That would basically be a visibility trace from camera position to actor position, and if something is blocking the trace that isn't the actor, then for sure you don't have a view of them.
But then how do you know how to zoom in?
Just constantly adjust forward and backward? o_o
That's the problem.. maybe like @engage said a zoom based on distance between them
I had feeling that on laptop is game slower so I took 2 same versions and tried on Computer with 60fps and on laptop
I did scenario where I Flew from point A to point B at same speed
at 60 FPS it took 9seconds from in-game timer and , video record from OBS was +- 10sec long
then I did same scenario at laptop on 15-20 FPS plane flew from A to B in 9 seconds in-game timer but OBS video record of this was like 27sec long, which was weird if it was longer even in-game timer should show more time
I have no idea if this is clear explanation
is your timer a timer or based on tick ?
Hi im following this tutorial but when im at the last step of building the zone graphs and clicking play i get this error
https://www.youtube.com/watch?v=aEny4oCdGP8
Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\ArrayView.h] [Line: 313] Array index out of bounds: -1 from an array of size 0
Hello guys, in this quick and simple tutorial we are going to begin with my UE5 GTA 6 Tutorial Series in Unreal Engine 5! In today's episode we will setup the mass ai entity configuration.
โช๏ธProject Files: https://bit.ly/GorkaGames_Patreon
๐My New Unreal Course: https://bit.ly/UE5_StealthCourse_GameDevTv_GorkaGames
๐ฅDiscord: https://bit.ly/Gorka...
i dono't think any timer is perfect
In game timer should be made by "function by timer " I need check it and speed of plane is multiplied by delta world seconds so it should not depends on FPS.. I am shocked
yea but fact video is 30sec long is weird af
All this is telling you is that something is attempting to access an invalid array index of -1. Nothing anyone here could help you determine what the problem is. Check anywhere you may be using and attempting to get values from arrays.
are you using timer by function and delta ?
give me one minute going to check how timer works
Yea but the only thing is it only seems to happen when i build my zonegraph
Hello, I'm trying to make a 2.5D sidescroller in Unreal. One issue that I'm facing is the 'one-tap rotation.' Simply put, I can't find any tutorials on this subject. I want, when I press A or D, for my character to change sides which it is looking towards. I don't want to increase rotation speed, as it will mess with the animation, and there is always a chance in which the character can look towards or away from the camera. If someone had experience with this i would be gratefull to dm. Thank you in advance.
2.5d, is that like 3d but from a side perspective ?
Yes.
how to check if the player is in game ,what is the node?
so when you move back and forth you rotate and you just want to quick go back and forth right ?
this is my countdown = aka in game timer
in GameState
Yes, i have controler setup working , and im palying around for couple of month. This is only issue im facing. So i want when i click once to imidiatly swithc side. Now if i click fast there is always chance that my character look to the camera
right so what you can do is set the rotation when you press a or d
this should be good heh
ya it's weird the seconds are off but maybe the calculations at 20fps makes it skip a bunch is a guess
i am trying to find out what is correct behaviour for game but imo both videos should be same long like is same in game timer
if video on laptop is longer means game runs slower and in multiplayer i would see player slower
even he had same speed
which is baad
Amazing, so simple. I can see now it's rotating correctly. Now I just need to fix the movement a little bit. Thank you!
Should I use a while loop or should I use an artifical while loop by having an if node? Then at the end of the body point back to the if node
a while loop makes sense in some cases
what are you looping untill something is true or something ?
or false
yea, im doing:
while currRooms != numRooms AND currRoomLevel != MaxLevel
so until both of those are true
just watch out for infinite loop but i don't know which one is more performant
either way it's the same really
show the loop ?
im just prototyping atm https://blueprintue.com/blueprint/voakvays/
i think my increment level chance is messed up
oh wait
im not setting the min in my clamp
Sounds like you movement may not be frame rate independent.
but also timer should show longer time, speed which is in finish point B match with speed in 60fps version at point B
๐ idk I m hella confused
now thinking how I can upgrade my timer countdown with delta seconds
maybe its wrong
i don't see where you update the variables in the while
i fixed it dw, thank you though
but idk how implement delta time here to make it frame rate independent
Timers are already supposed to be framerate independent. They work by adding the amount of time that has elapsed per frame and then trigger the timer event if the amount of time is >= the desired time.
So on the 20FPS version, it'd be adding 0.05 per tick.
On the 60FPS it'd be adding 0.016 per tick.
just red it on google they are dependent on framerates but now I have no idea how update my code so I will make game running equaly on all fps ๐ i am using many timers
makes sense but found some info on google they are actually dependent how I can test it ?
they will probably fire on the next tick which happens when their timer delay ran out
if you have to do something every tick a timer is often the wrong approach imho
The SetTimerByEvent node uses the World TimerManager which updates its timers on tick using DeltaTime.
A timer will always fire on the tick, so it'll average to be a constant time between them
you won't get the timer firing between ticks
but it could be off with slower ticks by a small amount
It'll all add up at the end once the aliasing catches up
It wouldn't matter - 20 FPS = Ticks firing every 0.05 seconds. 60 FPS = ticks firing every 0.016 seconds. That means it would take 60 ticks to reach 1 at 60FPS and it woudl take 20 ticks to reach 1 at 20FPS.
like this time when I want make "count down" which is same on every FPS , at every client I want make sure that set timer by event will be everywhere same ๐
say your framerate is 1 and your timer is set to 0.9, you'll get"
1 1 1 1 1 1 1 1 1 2
but seems you telling me it is
It'll be within +- one frame
If you find yourself reaching for a timer anywhere near the tick time then don't
timer is called via function and cast from client when I pass some "start" point
its in GameState
I mean how long is the delay on this timer?
1 sec
i am counting 30 minutes down
29:59 --
here it is
but you want the displayed time to be valid every frame right? What precision are you going for here?
1 sec +-
okay
gonna look in to speed then there must be something wrong
one more maybe dumb question can I somehow measure speed in UE ? when I am not sure if my equation is fine and if I am getting good km/h
why tf do you use a timer for a countdown?
make a DateTime variable of when the "timer" expires
because I want execute it at certain point
so Now + 30 minutes
then calculate the difference in the widget or wherever you display it
so it's just firing once after 30 minutes?
imagine you fly in game you hit invisible gate and countdown is executed at that point, then it runs just once when its done game over
How would I go about getting a variable that I can enter multi line text into? When hitting shift enter it just completes the variable
String and Text variables can take multiline.
Looks like Name could too
are you pressing shift+enter to do that?
Yep
what version of UE?
This one is 5.3.2
so weird, I cant seem to be able to?
shift+enter for me does the same as enter
its not my keyboard since I can do shift+enter here or capitalize LOL
I can do it just fine on a 3D text component but not on a variable I create
Copy Paste the space between
< these for a Shift+Enter
wth, it works
either that fixed it or restarting my editor fixed the issue, either way thankyou!!
its weird but when I now launched it at laptop with 15 fps , i stoped it with watch on mobile one sec in in-game timer took like 2 normal sec i dont understand it anymore
Did you mark the property multi-line?
I wan't to cry, I knew that was an option but couldnt remember where. Thankyou...
๐ Yeah, I wish I'd have known about it quite a while before I found out and was abusing the copy paste trick.
Never knew about the copy paste trick but it's rare that I have to do a lot with multi line
you just had a keyboard glitch that wasnt letting you do it ?
Anyone know the best way to make collectables that are very optimized and dont have a big impact on performance?
What is a collectable and what behaviour is it that you want it to have?
just some static mesh that i can have floating and rotating in place in different points around levels and when the player walks into it, itll get collected
Instanced Static Mesh are nice, you can make them float and spin in the material
Static Mesh actor with an overlap. Disable tick. Use a material that does the rotation for you rather than using game logic.
https://www.youtube.com/watch?v=BLpQHHOg6Qc
thanks!
512 rotating Coins in the scene, 0 slowdown from 60FPS on a 6 year old laptop with a GTX1070.
ooh cool ty!
Hello, can anyone help me why my inventory item filter doesn't work on certain category/type? I have already set the category/type of the item correctly in the data table since I add the item data there.
It looks ok. Check what your values are in your inventory by using print strings or break points.
It didn't seems anything wrong? Maybe I'm wrong since I'm new at UE
In function parameters for Blueprint, what does it mean to pass an Actor Pointer by reference?
I get it for structs but not for pointers.
I guess it's if you want to re-assign the value of the entire pointer so something upstream changes?
when you clear the childrem, you might also want to remove the windgets from parent
also, for your own sake, your visual spaghetti is really hard to read. consider neatly organizing your BP nodes, instead of trying to reuse cables, and vertically stacking
its handy to Pass a Pointer by ref in a function if you want to change that value
I used to do it when I still saved widget references. GetOrCreateWidgetByClass(UUserWidget*& WidgetPointer, TSubclassOf<UUserWidget> WidgetClass)
Sorry, it just I can't get a full screenshot of this... I don't know... and thanks for the advice
It let me keep a pointer to it and use it, but I could pass it through that to test it's validity or create it if it wasn't already created. Can pretty much do the same with any pointer type.
These days I just push widgets to stacks. ๐คทโโ๏ธ Lost it's usefulness.
iterate through this, and remove from parent on each child.
Clearing just clears the array, but doesn't destroy the children
??? Clear Children removes them from the parent. That's a widget, not an array.
Um, so... should I iterate that or what I should remove?
๐ One of those days
Authaers right. No need. My mistake
Struct based inventories always hurt. :/ Requires so much more work to work with them.
The rest of the logic looks correct to me ๐คทโโ๏ธ
Yeah I prefer data assets.
And a tiny item stack struct to wrap but I do that in c++.
Well, for my item info I did use data table... I was told it easier to organize?
UObjects with mutable data, in a component related to the actor the inventory belongs to, with a pointer to the data asset with all of the static data that never changes. ๐
Iโve done that before too, and honestly itโs a solid choice. Along with jambals replicated uobject article
UObjects for items are very superior to structs in many ways. For starts you wouldn't be creating and destroying so many widgets, you could make a simple TileView/ListView and just throw the pointers to your UObjects into it after filtering them.
Insanely less amounts of data copied too as you're just passing around a pointer.
It is easier to organize your right. But the tradeoff is itโs harder to manage
I see... so which do you think that can be easier to organize and manage?
You get the same benefits in data assets as you do with a datatable. You can do the same thing as a datatable with the property matrix.
And if you write your own plugins to interpret the data, you can do it off engine too. But that tradeoff is obvious
If youโre willing to invest a bit of time, data assets or uobjects
Do you require multiplayer and are you using strictly BP Only?
(Please say c++ is an option)
It's single player that based on Persona x Atelier series and for now, since I don't know much about programming, I rely on BP only until I got, maybe, some people that good or skilled at c++ join my team then I wouldn't mind to switch it on c++
Single player is good enough a reason ๐ no need to get into the nitty gritty of replicating uobjects
I crave for turn based JRPG like Persona since it's rare ;_;
Hereโs a good resource btw https://benui.ca/unreal/data-driven-design/
Ooh, okay thanks
Thanks so much
Make the Data Asset class. Make a UObject class. Make a new data asset like DA_Apple, or DA_Pear
Open the class blueprint and make some properties.
Whoops. I put those in the item. Those were supposed to be in the DA
If you go with PDAs just know unreal gets really mad if you try to modify them. You have to modify copies. Or you can treat them as just data objects. Honestly with BP only Uobjects may be easier.
Now the data assets have these fields.
Wait, how so? Have never seen issues with modifying the data assets?
Really? Then, maybe I should use Uobjects?
Sorry I meant editing them at runtime
Oh. ๐ Haven't done that personally. I used the objects for the runtime data.
Hm... tough decision.
Can you register uobjects to the asset registry?
No, but you shouldn't need to. You use the UObject as the runtime data that would change and serialize. EG Current Stack size, active tags, durability, etc. The UObject also houses a pointer to a data asset that has all of the static and non changing data.
I threw together a quick example. Start with the ItemData with very basic data. Item Name, Description, Icon, MaxStackSize, etc.
Then make a Uobject for the item itself that has a pointer to the data type.
Make an actor component that houses an array of the inventory item. This goes on your character, or on chests, or crafting tables, etc. You instantiate objects within this inventory to maintain your gameplay data on them, similar to having an array of structs.
Once you have the component housing the items. You can make an inventory widget with a TileView or Listview. Can literally show your items this easy in it.
The Tileview or listview needs to have a specific second widget override the UserObjectListEntry interface. And then do this code.
And kaboom. You have a fully working, expandable inventory system that can be easily displayed.
The filter for instance turns into this.
Apple here is a Item.Type.Food.Fruit. Which is a subtype of Item.Type.Food. So it'll show in this filter.
Is there a way to access an anim_notify event on the pawn blueprint?
trying to make some footstep sounds, but have specific points in the animation they get triggered
Man went above and beyond. Look above since you werenโt tagged. ๐
@autumn pulsarNot sure if there's an easier way but I think usually you can just throw delegates in the AnimBP, and bind them in the character, or whatever references the character.
Oh right, thanks
The way I kind of know how to do it is that you can create a custom notify class, override the receive notify function, gives you the owning mesh, you can get the owner, cast that to your pawn class or use an interface to then call an event.
Wait, is this a fully functionable inventory that can be ListView or TileView and complete with the filter by category?
I need to actually read on how to use inferaces and stuff lol
Mostly. It's missing some boilerplate, like whatever you need to handle your items, delete them, transfer them to other inventories, etc. But I could put that component on a character right now. Call AddItem a couple times, put a widget on screen and see a few apple items with what I put above.
Well... JRPG mostly didn't need delete or transfer item in their inventory
if I cast to my pawn class, how would I fire the event?
I'd like to keep the actual logic in the pawn class
err
fire an event in the pawn class
You create the event in your pawn class, after casting, you can use your casted reference to then call the event.
well, I'll figured it out at some point lol
Does anyone know of a way I can change the shape of the landscape during runtime?
Yeah. Don't use the Landscape class.
Sorry I am quite new to Unreal Engine what do you mean?
TLDR Landscape cannot be edited at runtime. Most of it's code is locked behind the editor. So when you ship the game you lose a lot of generation functionality like importing heightmaps and such.
The closest you'll ever get to runtime generated landscape is doing a WPO in the landscape material. Which doesn't work for gameplay, because WPO is purely visual. So your characters and line traces won't hit what you see, but the flat landscape you started with before the WPO.
There are only two generally decent ways to get a runtime landscape. Use the DynamicMesh or ProceduralMesh components and generate the geometry and UVs etc yourself. Or invest in something like Voxel Plugin.
Alright thanks a lot I'll probably just buy the voxel plugin then
If you don't want to spend money immediately and want examples of runtime generation code. Download and check out the Cropout example in the Samples tab of the launcher.
Oh ok I'll check it out
They prodecurally generate islands with the dynamic mesh component. There are also some examples running around for "infinite world" landscapes using it too.
Once again thanks a lot
Does anyone know a way to take a snapshot of the pixels and their world location on screen? I'd like to take a photo and apply an outline to only the stuff that is visible in the image and then have that outline in the 3d space so that you have a sort of memory of the photo. So far I've only been able to cut a cube at the view angle, remove the hidden part and then apply an outline to the remaining cube. But it would be better if I could just do the points that were visible in the photo.
Look into runtime virtual textures
I thought those voxel nodes theyโre using are built-in
Not sure what you mean?
The nodes theyโre using to generate the landscape in Cropout sample
Those are. That's the Dynamic Mesh component.
So Voxel plug-in just gives you more bells and whistles?
Or is it that it lets you actually affect the landscape rather than a mesh
Two separate things. I was making multiple recommendations. The Voxel Plugin is a lot more powerful. Probably better for huge worlds. Definitely a lot easier to get into. But the dynamic mesh has the benefit of being free.
Yeah, ik, I was just curious as to the diff, since those nodes they use have the word Voxel in them
Voxels are largely just the idea of point data with a runtime mesh generated over them. So I wouldn't be surprised if the dynamic mesh could manage that to some degree. Semi surprised no one's started building a system on top of it in a plugin yet. I would if I knew how to use it better. Normal Landscape is absolutely terrible.
๐๐
why adriel 
Sorry, what do you mean with moving forward a little when standing?
I didn't even know threads were enabled. That's how great Discord's interface for threads is 
ya don't blame you, especially since it's only in this channel atm
i was under the impression cropout used PCG
Nah it was Dynamic Mesh all along ๐
pretty simple , really
seems i need to look more into Dynamic Mesh, seem pretty flexible
some tweaking and it's suddenly far more dynamic
Ah, I think you need to change the deacceleration setting in the charactermovement component, if I understood the question correctly
You will need to implement your own logic for it. It is quite simple. Then you need to inside of the jump logic say that either is grounded or coyote time is active.
This is just for activating the "ability" to jump after walking off a ledge
Since I have done custom jump logic and not using the built in jump, I don't have that inside of my function.,
Which function? Like I wrote you have to implement the logic your self. There is an event (you see it in the screenshot) "Walking of Ledge" that is there, the rest you need to add yourself.
After you added this logic (the walking of ledge), you also need to change the jump function that is built in, in Unreal:
Hi everyone. I was wondering can anyone point me in the right direction.
How to do shooting off components simillar to Horizon Zero Dawn?
Any help appreciated.
Glad to hear you got it working! ๐
I would make a custom static mesh component that has a var such as durability. When it's hit/damaged, it reduces the durability of the component. When it reaches 0, it then destroys the component (Itself) and spawns an item BP, seperating it from the original actor.
Which node to use when destroying/detaching components from the asset?
Any idea how they are implemented into skeleton? Sockets? Or each part is extension of the sketon?
Thanks
You can just use the destroy component node.
You can attach components to sockets on a skeletal mesh.
Aight, thank you brother.
hi guys why is my magnet coins be in back and not like endless runner games where it comes just to the charcter
is there something wrong with my logic in here
Why are you adding locations together?
Make a float track that goes from 0 to 1
Have that drive a lerp between coin location on begin play (save that) and current character location
ok that worked thanks
https://astricx.is-from.space/2024-04-19_22-29-55.mp4
Could anyone point out what I could have done wrong?
I'm trying to find a way to make the async load stream level work in Multiplayer. I have a large "closed area" map where two players can play online co-op and go through the story. However, almost every room is separated into sub-levels for optimization.
When a player enters another room, we have a BP trigger to unload the previous one. The problem occurs when there are two players (host and client). It also unloads it for the client.
How do we approach this issue when one player is on one side of the map in a sublevel and the other player is in another sublevel?
We need both server and client to be able to load/unload levels each for themselves (since they won't always be together).
Generally speaking, you need to leave the level loaded on the server if the client is there. Or at least anything that would be related to networking. Like the floor, any networked actors, etc. This is a common reason why a few UE4 coop game styles force clients to remain within a range of the host player, it's a hacky way to avoid this issue.
Yeah thought of the same thing. My worries are since this is host & client, what if the host has a lower-end PC, it might heavily impact gameplay.. Oh sorry, forgot to mention, it's UE 5.2
it looks like you only set the variable on beginplay, you may want to used updated and set the variable there so it updates when you change it
can't help shitty listen server
๐คทโโ๏ธ Not much you can do about that on PC. On a different platform you would just try to target it and make sure it runs. You can't really stop people from playing on a 10 year old laptop even if the minimum specs say otherwise.
Thank you! I'll try that
Okay well, it still doesn't set the variable... If I print a string after it, it does go through
so you have on anim update, set the variable ?
Yeah
I'd maybe start by seeing where your bottlenecks are with some profiles on a listenserver.
If it's GPU chances are that it'll be visibility culling code, you can maybe split your levels and hide away a lot of the "visual" stuff. Specially if it's like occlusion checking code trying to determine if it can see static meshes. Just hide that stuff away on the host. Thankfully it's a host only issue. Client gets the free pass of not having to care about the host's stuff since at most it'll just cause the client to see the host's pawn stuttering around in midair which they shouldn't see if they're not close anyhow.
If it's CPU, and the load is that there's just too much going on on the host, you likely have to start looking into simplifying your gameplay systems, actor ticks, less physics stuff etc etc.
If you can reliably have a client in a bad area and a host in a bad area, but still maintain okay framerates on the host and it maintains it on your minimum target hardware then ๐คทโโ๏ธ
I do have other variables of course, so I set the bool after them
you should be able to set the variable in your anim update, and when you switch it it will switch the boolean
what does the update look like ?
Not really sure about this, maybe it's a stupid question, but does Culling Distance Volume works with Nanite? It doesn't seem to work for me
Like this:
I'm not sure why nanite would affect that. Maybe it's weird like that but I wouldn't expect it to.
Yeah, I tried it out and when I test it with freezerender, it doesn't cull anything around me. I remember using it back in UE4 and it worked as it should.
How would you get the Boolean from the animbp though? Would you create a new Boolean in the character bp?
Okay it does link because I tried to delete it and it said it's in use, I'm so confused
normally i set a boolean somewhere, i used the character since i cast to it on update anyway, just get the variable from the character and set it in the anim bp
that's how i do it and it seems to work
it looks like you may have set it correctly and it's printing true/false
so it must be updating
when do you turn the boolean true ?
not in the anim bp, but the original boolean that you are using for can sniff
are you turning that to true anywhere ?
hey im trying to create a telekenitic effect in top down - i want to cast a line tract from mouse location so i can hover over a physics object and be able to pick it up; can you guys see something wrong with the code?
yes, when I press q i set the boolean to true, and when q is released its set to false
if i set in to true by default in the charbp it doesn't do anything
so it must be my charbp, right?
if you default it to true in your bp and it doesn't switch, then theres something in how you set the animbp one, because if you default that to true it works right ?
in the animation blueprint, yes
so your transitions actually work
but for some reason it's not picking up what the character boolean is set to
yeah
which is weird because it logs true and you set it
are you sure your in idle ? atleast it should be your just sitting there
im not sure
i simulated the from the state machine and it didn't update the state to show that it's active when i walked around
i've heard that can be unrealiable, watching the flow of the anim bp
yeah
if your animations are changing, then it's going into it
i do want to see it though, lol
makes sense, i do the same sort of thing with a boolean and it seems to work fine
idk what couuld be the problem if you set it on the character, and update you update the animbp boolean to the character boolean, it should switch to true
as long as your in idle, it should transition
i don't see where you update the boolean in here
like this one
you also removed the part where you set the boolean
you still want to set the anim bps boolean on update to what you have on the character
so that when you switch it, it updates
you don't need the print string, but you for sure need to set it
notice how like you did is falling
hi is there a way to make them farer beside setting the section length to 100000 https://blueprintue.com/blueprint/vhu7usjv/ because after the magnet is done its delay i see the other magnet not even when done its half of the way i see the other magnet which is 5 seconds or maybe more
when you set the block size, divide by a higher number like 8 or 10, then in your blocks array use numbers that are farther apart, instead of 0,1,2,3,4, something like 1,3,5,7
has anyone used the mover plugin,i want to make a projectile using it,but i can't get the actor to move,when i make it a pawn it seems to move,but moves to 0,0,0
hi doing a basic zoom with blurrr around crosshair
how can i exclude the bliurr from center ?
You don't with the background blur.
You'll have to make a blur material that you can then apply to a masked image or something
You can make custom background blurs. There was also some mentions that post processing data might be included in UI materials soon too. That'll be really nice.
Hey, I'm trying to fire the 'on mouse button down' and 'on clicked' events with a gamepad button, I thought adding the gamepad buttons here in the player controller would do the trick, but it doesn't work, any idea why?
(in a widget)
These controls have nothing to do with widgets. And probably might not work with gamepad either. They're for which button tries to trace and click on actors/components in the world.
If you want click events in a widget with gamepad, you rely on focus.
Hello, i have a small problem regarding a loading screen i pretty much ported over from lyra. When starting to play in standalone or a packaged game there is a black screen with 3 white dots in the bottom right corner for just about a second that covers up my own loading screen. Does any one know where this loading screen has it's origin and how i could remove it?
Weird question, is there a way to edit the DEFAULT properties for StaticMeshActor? So that all new instances have the edits
yeah in the project settings there is a default static mesh actor class
Oh hell yeah
(Deriving from my own class doesn't have the functionality of being able to create these objects by drag and dropping static meshes into level)
this can also be done with an actor factory (but requires c++)
Wait, where?
dunno let me open unreal
nvm its in the ini only, not in the project settings,
open your DefaultEditor.ini
NewActorClassName=YourGame.YourGameStaticMeshActor```
Aaaaah I see
Do you have a semi large project?
@maiden wadisomewhat, why? i think it's probably just some sort of default loading screen when using the open level node in bp?
If you do have a larger project I'm 99% sure it isn't covering your screen. CommonLoadingScreen has two phases. The first of which exists before many assets have been loaded and the game can correctly display the better screen. If I had to guess, you're loading way too many assets on your main level. Main menus are normally designed to be extremely lightweight and faster to load by not allowing them to be linked to heavier data assets and such.
okay, but according to the log it does not show twice. And apart from a landscape there is not much in the levels yet ^^
The normal loading screen probably does only show once. Sec
for some reason the first load from the menu into the map does not shop that loading widget
It won't, sec I have an older engine version open atm.
Common Loading screen has two phases. Startup and it's normal stuff.
ah yeah but i think startup is only for the initial start of the game ... i tinted it green to make sure that is not the problem
Startup is a very basic screen applied at the engine startup. Because it's super early. It's mostly to avoid a blank black screen while waiting for initial assets to load.
anyone know are more efficient way to do interaction with individual components on an actor and then have them do separate actions when interacted with? This is the current system i have at the moment but it doesn't seem very scalable if i want to have a bunch of interactable components on one single actor
but thanks anyway
Not sure what you mean by you tinted it green? Did you alter the actual slate code in the plugin?
yes
You could maybe check FPreLoadScreenManager::RegisterPreLoadScreen to see if anything else tries to put them up.
Put the interface code in the component itself
this is what appears for a split second when traversing maps
wdym by interface code?
Like this interface event. You can put this on the component itself. The component can have delegates if you still need the actor to manage some of their code but you would be avoiding large branching sets of code like this.
do i need to change anything with the line trace i have for interaction? And how would i put it in the component itself?
Your components would need a subclass with that interface on them. And instead of calling the Interact event on the hit actor, you call it on the hit component.
Is the 'Remove From Parent' node for widgets equal to the destroy actor node for actors? The hover over description in UE is a little bit ambiguous about it
I'm still not sure I'm understanding correctly, would a tutorial on making a keypad help cover this topic?
Simiar but not quite. Unlike Actors, Widgets aren't marked for garbage when removed from parent. They're simply removed from the hierarchy of widgets. If you have not stored that widget in a pointer anywhere garbage collection will collect it else it will just hang around and exist as long as that pointer is set to it.
Gotcha, so if it is not saved as a variable somewhere, it will get collected. Otherwise it will continue to exist?
Correct. Same as most any UObject. Actor and ActorComponents just have special handling around that.
Alright that is clear. Thanks for the help
Interacting with components instead of actors
Hi guys and gals. This will be my very first game so this may be a really dumb question or wrong section. Im making a 2.5d downwell clone and I need a way to procedurally generate levels. For testing Im just using default unreal primative cubes. The levels are pretty simple just a vertical shaft with some blocks for the player to land on and some enemies but I have no idea where to start. Has anyone here done something similar that can point me the right direction? Screenshot for an example
so you fall down ?
Yeah basically. get combos by bouncing off enemies, lost it by taking damage
im going with a post void/mullet madjack style life timer though rather than health
you want to procedurally generate so that it's not all loaded at once ?
or you also want the levels to be designed procedurally ig ?
Hey there
i have a really wonky situation with palying audio
the audio plays, but only when my game is pausing
Designed procedurally in game
so one way is to divide it up into sections, and load sections based on your location
i would start from 0 z, generate all the stuff up stuck on x or y
then start at the top
but you can use your current z to figure out with some maths what section you need to have loaded
and load ahead one so theres no flicker
this is how i did it horizontally but vertical could be similar
Cool! Thank you I think Ive got an idea. I might be back if I run into trouble!
if you want it endless put the kill z real low and just keep generating untill the number gets too big
but if you keep track of what section your on it's nice you can load the next just make a load function and you can just keep generating
the way i did i generated all the sections first
then i use the data i stored to actually spawn the actors, and destroy ones that are in a section that nots within the displayable amount, currentsection +- 1
but in theory you can generate on the fly np, since your not going backward there would be no problem
i used a parent class for my spawnables, i would definately do that, so you can have common variables and casts to parent
it makes it easier for doing loops on the current things to you can get all of the parent class, check a variable like section, or event a tag, and just remove ones not in the correct view
this the only way i know how to do it it was my first try so maybe there is a better way i didn't use a tutorial i just came up with it
you may want to use c++ as well to make it faster if you run into problems, but most of the code i used is blueprints to create/destroy
Hello here. I have a blueprint, and a for loop. Is it normal that I cannot watch nor the index value, nor other values that depends on it ?
wdym "watch" ?
right click, watch value
i mean the index will go from start to finish
theres really not anything else that can happen
that i know of atleast
I am in a breakpoint, and I would like to access the current value of the index
I know how a for loop works, thanks
hmm, did you try to promote it to variable ?
i'm guessing your breaking in the loop ?
hi guys how to spawn the floors here endlessly is for loop can work here
for loop can work but i wouldn't do it "endlessly" adjust it based on the size of your level the smaller the loop the better
big loops perform like crap in bp
use an offset to get each one to be in the proper place offset*index
as long as it's a straight shot it's pretty simple just adjust the one axis
ok and how to spawn not in the same position but the next actor location that is after the end of current one
spacer*index
the spacer will be the uniform amount each one is seperated by
just mess with the spacer value untill it's centered correct and also you can adjust the floor itself as well sometimes might be easier
oh ok is the index mean the next location
An endless runner type game, you usually move the world rather than moving the character and the world is composed of pre-made "tiles" that may have a bit of proc-gen in them.
One part of the tiles of your level can have an overlap near the end that triggers the creation of a new tile on the end.
i cant do tiles in here because its train yard its so big that it lag sometimes
the index is the current current number in the loop, if you have a size like say 10, then 10 times 0 is 0, thats the first one, 10 times 1 is 10, thats the second one, 10*2 is 20, see it's a pattern ?
oh ok so next index mean second location right
It's probably lagging because you're using game logic to spin your coins.
Apart from that, tiles would increase performance as you only need a few loaded at a time vs. having a large map loaded all at once.
each index is a location spread out by the variable amount
so you set your y to index*spacer
because maths