Hello, I've been trying to design my ammo system for my tank game, but I'm stuck on how to come up with an implementation that works without having to program hard references into the Player pawn BP, I have a tank the player controls to shoot different types of Ammo, I have explosive rounds and sticky charges so far. in my BP_Tank pawn I perform a line trace after getting input from the player, currently there's a shoot function that checks using a boolean flag if the tank should shoot explosive rounds or sticky charges, this is toggled using another input action but you can see how this can get messy.
The type of ammo changes the recoil of the tank barrel and the fire rate (both of which at the moment are computed and executed inside the Tank Pawn BP).
What's the recommended way to go go about designing this? interfaces? Enums? Strucs? Something else? 🤔
#blueprint
1 messages · Page 125 of 1
I think it's just a common misconception -- on the other hand I don't know for certain either, but signs point towards it just being good ol' nodes! :)
Yepp, surely it does (altho that could have been made on the go just to guide blueprinters. While it still did a native thing )
Insofar as it is a pure function with no execution, it should be performant. Beyond that I'm not sure how the bytecode is compiled by the BP but it should be more-or-less equivalent. though I have also heard (perhaps here) that it was more perfomant....
I'm sorry, I lost the thread of the question with all the details about implementation. What exactly is your question about?
for one thing instead of a bunch of booleans maybe an enum for current state so you can add others and maybe do a switch
something like a shooting mode enum
I'm trying to understand what's the best way to go about designing an ammo types system, at the moment the pawn tank performs a line trace and spawns a different bullet type depending on a bool the player can change, but I feel like this is bad system design as it can lead to messy spaghetti code and duplicated nodes,
sorry forgot to tag with a reply my previous message 😅
Ammo is a seperate class, so might tank head be?
Do you prefer this to be pure Blueprint? :)
right, but what happens if on different parts of the tank graph I have to check what's the active ammo? For instance, different ammo creates different recoil, so now I have two places where I have to check which type is the ammo type, 1 for when I spawn the bullet, and the other when I add recoil to the tank mesh
For something like this I would probably make a DataAsset containing the ammo details (such as recoil force).
Then you can have a variable containing such a DataAsset, and when firing, simply query it for the required properties.
datasetAsset you say 🤔
What is a Data Asset in Unreal Engine 4.
Followup video showing how use Blueprints Only for Data Assets using the Primary Data Asset type: https://youtu.be/hcwo5m8E_1o
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/CPP-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these exampl...
Whole project is blueprint based
I don't know how good that explanation is (haven't seen it recently), but Mathew's videos are usually good!
DataAssets are very powerful.
You can create them in Blueprint but some things are nicer to do in C++.
I'll look into this, thanks 👍🏻
Anytime! Honestly it's a Unreal powerup!
I thought interfaces was going to be it, but then I realized how I don't really have blueprints to implement them with
if that makes any sense..
Got a tricky one for y'all this morning. I have this actor that's meant to attach a physics constraint to any actor that passes through a collider. Simple enough. Except it just doesn't work the FIRST time an actor passes through. Works as expected every time since then.
But here's where it gets weird. If I disconnect the pin to that ProjectPointOnPlane node, it all starts working first time, as expected. And the really weird part is, if I then manually set the plane normal to 1,0,0 then the bug reproduces.
Is there a simple and cheap way to get the z height pos of the floor an actor is on? For my prototype, I was just manually entering the z height because I wanted to avoid running a line trace every time I wanted to get the floor height or having a scene component at the actor's feet to get floor height.
Do you have a Character Movement Component?
Yes
it automatically traces for floor every tick regardless
you can get the latest one, it's just a hit result
called something like Floor... CurrentFloor, something like that
This made me suspicious that ProjectPointOnPlane was somehow divide-by-zeroing that first time? So I printed out both a working and non-working shot, and it's not.
tyvm! this is exactly what I was searching for. I figured there had to be something like this built into the character.
haha yeah it's nice not to do double work!
question - I am working on a spawn system and wanted to know what is better - having all the enemies already spawned but deactivated until the player runs by. Or creating the enemies and later destroying them? My big issue is that I want to customize variables for a good number of my enemies, so like if I have 2 turrets, the range of both of them can be different despite both using the same blueprint. This is fine and easy when I just deactivate them, but I don't know if this might lead to memory leaks or slow down in the future, or if just creating and destroying is a better option?
*and in terms of creating / destroying, I don't know an easy way of having custom changes to variables persist to the newly made enemies
Hi all, so I have a vector math/rotation question.
I'm working on a Valheim inspired building system and I'm trying to get the building pieces to offset from walls based on the piece's size and rotation. The system I have so far clips into walls and generally doesn't offset correctly at certain rotations but I cannot figure out how to get this to work correctly.
Any help or advice would be appreciated. 😁
Blueprints and video demonstrating the issue:
https://blueprintue.com/render/ay94hq53/
ok
so lets say i have a heavy attack binded to a key, if i want it to also be linked to charge stun attack where if you hold the key down it charges how would i make the same key know which attack to use based on how long you press a key
an integer that represents a count of how long you have held the key down ?
is there any better way to use events that need to activate same function but with a different variable, rather than stacking them like this?
Definitely create them when you need them, don’t have them all spawn at the beginning. You can set any variable to Instance Editable and Expose on Spawn to set variables programmatically as you spawn an enemy
create a custom event with inputs, and then call that instead
or a function
i am calling that i first have the on hovered event for button A to call a custom event and then same for button B and C and so on
hard to see exactly what you're doing so hard to advice anything really
Yeah image is too blurry
hovered function for a button
gotcha
not much else to do but bind them up
either like that or procedurally
somehow iterate all children in the container, grab all buttons, bind to their hovered etc
usually requires custom button as default ones dont have any decent delegates for this
commonbutton does however
will just keep it this way then
hopefully this doesn't somehow impact performance
if its only these 6 then yeah for sure
or you know, create your own button base
and edit the settings in the actual button once
instead of having to call this function 🙂
pro-tip of the day
cant
have to call it cause it has to change on click
hehe
Ofcourse you can
6 buttons with clicked, hover and unhover events
this could all be handled inside the custom button widget
no problem
no need to 6x anything ^^
wdym
i cant bind a function directly
without making an event
You'd just setup the event once inside the button
then use the same buitton for all buttons
how would i know which one is which then
in which context
buttonbase comes with an event dispatcher
if you neede it outside for some reason
i have to know which button to change the "inventory filter" to
does that have any performance benefit besides being clean
no
haha, me in 2 years wondering wtf i did here trying to track where everything leads lol
yeah spaghetti dont age well
thats why imma put it in the freezer and never touch it again
thats a tiny image, can't see anything
Still trying to figure out the issue where this physics constraint fails to apply but ONLY the first time it's triggered. I'm pretty sure it's something to do with the position it's attached from, but no idea why.
I've got a boolean now that switches the bug on and off. Screenshot shows the position of those two points in space, relative to the collider. Green works every time, red is bugged.
What's interesting is it's not about distance. I can try to go through this thing as far as possible from the green point, but it still works.
Odd behavior with component overlap....
I want my bayonet to deal damage when it overlaps the other tank (named Kaiser), but it usually does not trigger an overlap event. That could make sense to me by itself, but more confusingly it often triggers an overlap event when the bayonet is nowhere near the other tank. Am I missing something obvious? Lmk if more info is needed.
Tank bayonet?! I LOVE IT XD
Lol thanks ❤️
But to respond to your question, the overlap is triggering based on the collision settings you have set up for the bayonet component. So if it overlaps with say the ground or walls, then an overlap can occur.
It's only overlapping with the tank, that part is fine. What confuses me is that the bayonet will be in the middle of nothing, yet will trigger an overlap event when my tank body bumps into the other one.
I'm trying to figure out why my stop movement event is not working the way I expect. I would think that I should be first calling "Stop Move Forward" and then use a "Move to Location" node and call what I want with "On Move Finished", but if I call it in that order, my enemy char seems to still move forward after it reaches the goal location. Only way I got it to work is if I called "Stop Move Forward" after "On Move Finished"
EDIT: Further testing, for some reason when I call StopMoveForward, it does not seem to clear the timer for move forward for some reason. Gonna keep bashing my head against this issue
Also, is there a way to use the AI "Move to Location or Actor" to make it move to the exact location? I tried messing with the acceptance radius values, but it seems to base that radius with the edges of the characters collision capsule instead of the center position of the character, so I can never get it to move to the exact spot I desire
forgot how to set a collision mesh on a dynamic mesh component to be what it was pre-boolean. I was able to do it before but that project corrupted and now I don't remember what I did.
I have an instance of a blueprint on my stage. BP_Controller. Whenever I edit the blueprint itself, compile and save, the instance in the outliner is renamed with a 1 at the end BP_Controller1. If I rename it to remove the 1 it sticks until the next time I edit that blueprint. What's the deal? It hasn't happened to any of my other blueprints on stage....?
I'm not a big fan of this self-referencing event loop. That doesn't seem right.
If you want to execute that event once per tick, then just hook it off the tick. There's no need to use a timer on top of that.
Or if it's on an animation BP, you can also use onUpdateAnimation event
I wanted to avoid having a branch check on my event tick since I am only calling move forward during a short specific section of the fight.
Okay, so, see the BeginPlay block here? Basically a no-op right, since that same component will be moved again in the OnComponentBeginOverlap code?
Except, that BeginPlay block makes the lower block work. Why? And why does it have to be to the edge of the collider? What is HAPPENING here?
Hello,
I have a BP that creates a few components, this components have a BP of a car.
is it possible to "extract" the BP of the car from the parent BP as an actor in the scene?
What are you actually trying to do?
what effect in the game world
Replicating the feeling of a fly flying into a spiderweb.
On overlap I move the AttachTarget to the closest location on the web to the pawn, then apply a constraint between it and the pawn.
I think I managed to get it to work. This is the solution I came up with for my problem if anybody was interested.
So what doesn't work about the overlap code if you lose the BeginPlay?
what is attach target area? A scenecomponent or primitive or what
I'm guessing you got some self-overlap stuff going on
If I lose the beginplay, then this fails to capture the pawn the FIRST time it goes through. It'll work reliably the second time.
print overlapped actor and component
you really oughta be using a physics handle though
First I"ve heard of this physics handle?
Physics Handle
you're fucking right about the self overlap!
Working version:
LogBlueprintUserMessages: [BP_NetBase_C_1] OverlappedComponent=BP_NetBase.CaptureArea OtherActor=BPI_BaseShip_C_0 OtherComp=BPI_BaseShip_C_0.BaseCollider
Bugged version:
LogBlueprintUserMessages: [BP_NetBase_C_1] OverlappedComponent=BP_NetBase.CaptureArea OtherActor=BPI_BaseShip_C_0 OtherComp=BPI_BaseShip_C_0.BaseCollider
LogBlueprintUserMessages: [BP_NetBase_C_1] OverlappedComponent=BP_NetBase.CaptureArea OtherActor=BP_NetBase OtherComp=BP_NetBase.AttachTargetArea
This ALSO explains why none of my breakpoint debugging found the problem. The bugged version IS setting it up correctly, but then immediately ruining itself.
Fixed it. As simple as turning off overlap events in the attach target.
I'll give some thought to physics handle. This is feeling pretty good right now and I like how configurable the physics constraint is, the handle doesn't seem to offer as many options.
If anyone knows about vector math or rotating vectors any help would be appreciated
#blueprint message
There might also be a simpler way of doing this so any suggestions are appreciated
you will need to change the pivot of your construction meshes accordingly, then its easy to rotate and place them
I think the handle is just a wrapper on constraint
with an interface like SetTargetLocation etc
The thing is I'm not actually using the main "linear limits" part of the constraint, I'm getting a better feel with "linear motor" and I don't see those options here.
yeah i'm not sure which one they use
if constraint works use it
but I think you can go without the 2nd component
just constrain pawn to nothingness
If I'm understanding you correctly, I am already doing this with snapping building pieces to each other, moving the mesh in local space to change the pivot point relative to the blueprint, but I'm not exactly sure how this would help with this current issue. I'll give it a try though and see if this changes anything.
Do you want it to offset at predetermined distances or just where the colliders touch?
do you have a strict grid or is it freeform
How do I make an object move by holding a key?
by creating an input action and setting the objects position when its triggered
However you want
Start with printing something when you press the key
It's freeform, and just where the colliders touch, I'm doing a trace specifically to get the location and hit normal
How is the placed object oriented?
90 degree rotations from the hit normal?
A quick and dirty way would be to move the object to some offset then move it to the hit location with sweep turned on
but I would really suggest some sort of grid system if you want your constructions to not look like bird nests
Well I'm trying to recreate the Valheim building system, which I would call "freeform" but maybe I'm misunderstanding you.
Here's how it works so far...
https://youtu.be/It8qxZKFayE?si=fPf_S7dLhbxS5njs
valheim uses snapping points...
yes, so does my system, but it's not "on a grid" therefore I said freeform 😅
if you're snapping you're on a grid, just the grid can be dynamic
grid =/= aligned with the world's grid
it jsut means consistent with connected objects
ok, just a misunderstanding then
I have this right now, but you have to press multiple times for the input to work.
I feel like there has to be a math solution that will work dynamically as I add objects, I feel like I'm close to a solution but I've just hit a wall.
I'll just have to try something different and hope it clicks.
i think you should watch some tutorials on construction systems
wouldn't it work with collisions?
How do you do that? I’m a beginner.
i suggest reading the documentation about input actions
what would you do for that kind of building system?
would you use collisions? or a grid or idk
I had looked for tutorials prior to starting the project but they were all very basic and not really what I had in mind
Collisions snapped to grid
Line trace -> get point -> snap it to ThingTheLineTraceHit.GridReferenceFrame
that's how Space Engineers etc do it
Ohh, because I used another way for my system, I don't know if that's correct:
There's no grid, you are free to build wherever you want, just the first one must touch the ground, I used collision on all builds, then the others build around can snap correctly together with collisions...
@faint pasture
probably a timer on press, clear and invalidate on release
I think as SourceControl suggested the new Enhanced Input Actions system effectively does this by default
right it's built in
I only learned to use it recently but it's really useful and easy to set up
enhanced input is much more difficult to use than the old way
you changed it lol
lol i realized pretty quickly
It require a small amount of set up but once that's done I think it's relatively easy to use
Git or perforce for version control ?
git
If I use the enhanced input system wouldn’t that limit me to using only one character? I want to be able to control 2 characters using different keys like WASD for character 1 and Arrow keys for character 2. So, how would I go about making the inputs work for both characters?
Git is way easier to use imo, specifically Github Desktop
by making separate input actions for each character
After I make the separate input actions for each, how do I implement them? Because the only way I’ve learned so far was to change the game mode of the level and set the pawn as a single character.
try watching some tutorials
literally like you'd do normally
I have been for the past 4 hours but I’m still stuck, which is why I came here. 😭
if you were watching a tutorial you would know how to add an input action
What is normally? 😅
The game mode pawn only lets you select one actor, as far as I know. So I’m quite confused.
No no I know how to add it, my problem is implementing it with 2 characters and not one. The tutorials only show how to do it with one character.
you can set an actor to receive input from player
but you can add as many input actions/ mapping context as you want
on 1 pawn
I think they're talking about having multiple pawns in a local multiplayer game
"the tutorials shows"........
Really could use some help with a trace.
I am tracing to the ground on my vehicle from a socket on the skeletal mesh down to the ground, I need the trace to always be in that direction, I mean when the vehicle is flipped over I need those traces to be pointing to the sky, meaning I need the trace to al ways go in the direction of where the ground is expected to be in contact with the wheel. You can see in the photos the socket, the trace setup, the correct results when not flipped over, then the incorrect result when flipped over. I would really appreciate helping me understand how I can achieve this.
guess ur socket is not rotating with the car?
yeah why would your soekct not rotate with the wheels?
er with the chassis
or suspension
print socket.Up and see if it ever changes
Maybe because even though X is pointing down, I am still getting up vector in the trace setup, so thats always up in world space ... IDK
print socket.up on tick while flipping over
Not sure, socket is parented to wheel bone
I hate to say it but I think you just need to look for tutorials on local multiplayer, hopefully that should give you the info you need to combine that with the Enhanced Input system
Will do and reply
I may have found a possible solution… I’m gonna try it and also look up more tutorials to watch hehe https://forums.unrealengine.com/t/how-can-i-control-2-pawns-with-1-controller/291756
I’m trying to control 2 pawns with each thumbstick on my 360 gamepad. I’ve managed to setup inputs correctly when pawns are in scene by themselves. However, when I spawn first one via player spawn and spawn other pawn through level blueprint I can’t control one I spawn through level blueprint. It is stuck in air and won’t listen to any...
Hello!
Does anyone know why when simulating/recording with the take recorder physics are working ok but as soon as I render the physics on the output video are messed up?
This is a video with the steps I follow and the final resut: https://youtu.be/wslYK55Ilq8
Happy to provide more details if needed 🙂
Flipped over
At begin play (not flipped over)
your vector math is wrong
Hey, dumb question. What does ' Other Actor ' and 'Other Component' mean exactly?
Seems odd to be adding the up vector to the location of the socket, and then subtracting the wheel radius.
You probably want the up vector inverted and then multiplied by the wheel radius, and adding the socket location.
They are the actor that overlapped with the hitbox and the component within that actor, usually a mesh or other collider
So it's the ' Other Overlapped Actor ' ?
yes
Interesting, okay ty
np, you can also check them using a print string
So why do we use Other Actor when casting instead of Overlapped COmponent?
Because what were casting to isn't a component?
I think overlapped component will be the hitbox itself?
Correct. Your character is an actor and it does have components. A component could also be something like a skeletal mesh or static mesh.
or did you mean other component?
Is there anyway I can attach a target point to a moving object so that my enemies can spawn on moving platforms?
Are you just trying to use the target points to get the spawn location?
yes
I have a wave spawn system and it spawns enemies on target points
Attach actor to actor
Dang didnt know that was a thing. Thanks!
or make a spawn component
That is definitely one solution, components are also very useful if you've never used them before, definitely worth learning about
Quick Q: Have a map gen, it creates and stores a lot of data, makes a lot of ISMs. When I open level to the same level, it seems to make a new map as expected. Its clearing all that data and ISMs and GC'ing any memory and such right?
the cool thing about having spawn actors is you can just get actors of class
you can't just get all components of class in the world I don't think
Hi, what is going on here?
if it is from -0.4 to 1 it wont work
if it is from 1 to -0.4 it works
this make no sense what so ever
Note that -0.4 means visible, 1 means invisible
I get scalar parameter value then print string it, it shows the numbers are indeed being updated
is it a bug in the engine?
has anyone seen this crash before? it only happens when i try opening a map by double clicking it. doesnt matter what map. but I can load into these maps just fine in game, I checked the log and its equally enigmatic.
Ive tried opening a blank map and it does the same thing, the only thing the engine will open is the map it loads into.
ive tried verifying the engine files, deleting saved and intermediate, but no luck. kind of at a loss here because it started happening out of the blue
looks to be something to do with the content browser but I have no idea what I could do to fix that lol
this is in 5.3.2 btw
heres the log as well
have you attempted to verify engine files?
I have yes, everything validated successfully, but just to be sure you mean in the launcher under the engine select verify?
if there is another way I am unaware
correct,
I can simply create a new level in the content browser, save it, and then open it by double clicking and I get that crash. doesnt seem to matter what map it is 🫠
what if you try to open it from here?
i imagine the same thing but just for the sake of it
yea same thing just tried. lol
like the odd thing
is that when my default level opens up which is a forest, I can open my developer menu while playing in editor and then load into any of those maps, just not through the content browser
very odd indeed. it seems like an engine bug but not one i've seen before in 5.3 and verifying the engine should usually fix like random corruptions or some such.
have you tried in a brand new project?
let me try! if it breaks there I suppose I can just assume its an engine bug, uninstall and reinstall and see if that helps
if it happens in a brand new project with a verified engine it could also be a driver or windows issue of some sorts
i know one of the most recent nvidia drivers has some performance issues
hmm new project seems fine
ok so interesting, I backed up my config folder, deleted it, and then re-opened the project and now I can open those levels. something must have gotten borked lol
good to know
Is it typically best practice in a game with multiple controlled pawns to put Input Actions shared by all pawns into somewhere more global like a Game Mode base? It feels strange having my "inventory open and close" input actions duplicated in both my player character and the boat pawn you can also control.
further inspection comes back to nanite being enabled if you are curious
not gamemode for sure
put them in PlayerController if you want to
Hi
it can go like:
Input -> get MyPawn -> get InventoryComponent -> show it
Ahhh yeah that's smart
I typically put common inputs in PlayerController and specific ones in Pawns
if you were making GTA you'd put walking etc in the pawns but you'd put pause and ShowMap in the playercontroller
I'm going to migrate the common controls now, thank you!
I am trying to load in a large map (world partition) but I keep getting this weird transition part (the arm part) in between the loads, I've tried all sorts of things like AsyncLoadAsset first but can't seam to find any answers on Google.. can anyone help? This is what I am doing to load the map.
Is there any easy way to get the final level name of a gameplay tag?
For example: Player.Stats.Health --> I just want "Health", not the whole thing. 🤔
Yo quick question, does someone here know how to make a spline path but with actors?
add a spline component to the actor.
does it make it curve and stuff?
im keep finding tutorials how to do it with static meshes where they do roads and stuff, but my "road" got lights wich are made in an actor
You attach actors to it
there's a node called attach to actor or something like that
There’s also attach actor to component
Hi I was having an issue with code similar to the one below, where the door was only rotating once, and then snapping when I interacted with it after. By using Print Strings, I saw that during the first execution it was outputting multiple repetitive executions after the timeline, however after the first execution if you interacted with the door, there was only one singular execution after the timeline node. Does anyone know what the issue could be. (This is not my exact code, but basically the same nodes)
why are you adding
no
set
A timeline is basically a temporary tick
with animation tracks
you want the door to be in a different position every frame as it's rotating. Thats the update path
A simple door might be like:
Event -> branch on isOpen -> Play -> Update -> set angle
->Reverse -> Complete -> IsOpen = !IsOpen
if it's open, it'll shut. If it's shut, it'll open
ahh okay thanks im gonna go try it out ❤️
Hello, my name is Raj Oswal. From San Diego, California.
I am looking for a solid freelance unreal developer that has experience with building games for Meta Quest devices. I have launched a children’s immersive educational program and working with three international schools in Shenzhen China. For that program, I have built an astronomy app on unreal engine for MetaQuest devices. Unfortunately ,the developer I was working with is no longer available so I’m looking for somebody to take over.
Ideally somebody’s with 4-5 years experience with particles effect’s, some animations and mainly blueprints.
This is a part-time contract opportunity.
If anybody is interested, please contact me in a private message and I will share more about our app and we can discuss more..
Here is a TEDTalk I gave on, the power of immersive education : https://youtu.be/uRMjJhPUPCM?si=j0g4nlq5ahDPIs5l
Here is a recent Ted Speech on the Power Of Immersive Education
Could anyone tell me what I should be looking at to fix this? I never touched or changed anything in this blueprint for that interface and all of a sudden its claiming it as an issue
The parent is not touching or doing with it either
Compile parent class
Parent combiles fine. Maybe I need to reparent? Maybe something is stuck
oh, its an issue with the interface I think. I just realized the one its calling out is different than the interaction one
Looks like I made a duplicate Function on two interfaces name wise. Time to see what all that messed up for me in the other work I was doing earlier 😄
Your interface functions have duplicate names
yup, just noticed that as well. Now to figure out WHY I did this and what other errors are in the other things I was working in cuz of that
hiya, relatively new UE5 user. I've been using the Actor Forward Vector to create a line trace, but I'd like to angle it up by 30 degrees. I can sort of do it, but I assume it's only angling it by world rotation, because when I face forward in the world it works fine, but when I face the opposite direction it's angling down. How do I rotate the forward vector up by 30 degrees regardless of the direction the actor is facing?
can you show the code you are using
it's probably an error in it
Offset is (0, 0, 0) so it's just in the center of my actor and rotation is set to (0, 30, 0)
Probably Rotate Vector Around Axis. Something like this
yea maybe, I dont know much about Rotate Vector node.. sry
so then the whole thing could be like this
Guys quick question, should i build maps on unreal or on blender? i feel like when i build them with cubes on unreal its much easier to handle the collision or what do yall think?
Ive built some rooms now with blender today but it feels like the collision is insanely terrible every time
depends
Specially with round objects
then create custom collisions
it works as well
isnt it better to do in unreal?
if your map is a cube (probably not) then you can use ue
but blender for better shapes or any other 3d apps
For example i want floating rooms in my level that randomly spawn, should i set them up in blender?
I mean i dont need allot of complicated shapes
im gonna keep trying arround, still thanks !
1 for collision
1 for the mesh
works like a charm, ty 🩷
The level itself should be made in Unreal
you'd use blender to make your meshes etc
yea but the whole room, should i do it in blender or in unreal?
either a whole room in blender or i line up 4 walls and make the room in ue5
You'd make the things that make up your rooms in blender. You'd place your pieces in Unreal.
OKayy thanks 🙂
An example: You wouldn't want to import a mesh that has 1000000000 vertices and much of that geometry is reusable or could be made modular as Unreal could instead "instance" a lot of the meshes if they were in pieces rather than 1 gigantic mesh file.
yo gang, I need some camera help in my pawn BP.
I have a pawn BP with a camera attached to a train, that moves on a seperate circular spline.
I want the player to be able to move the camera around (look around) when I possess this camera, so I have enabled 'Use pawn Control Rotation'
But in doing so, now the camera doesn't rotate with the train. (if train turns 90 degrees right, the camera stays at 0 degrees ahead in world space)
How do I have it so the camera turns with the train but the player can also look around?
Instead of use pawn control rotation, you can:
Tick -> get control rotation -> set camera RELATIVE rotation
works perfectly, thank you for your time 🙂
Trying to change the value of a ,,date time,, variable. For testing I just want to set the hour to 2, but it keeps printing 0 ( for both approaches )
What am I missing here :/
Probably can't represent year 0, month 0 and day 0.
You may want to use a "Timespan" instead?
That did the trick, thank you ^^
Either that or take a "Now" and add 2 hours to it.
hello there does anyone know how can i make gap/hole in wall in real time in game like i want that my walls each time they appear they should have diffrent type of gap/hole in ther so that my player can adjust accordingly and can go further
Start looking at what unreal can offer for what you need
Eg fracture system
It depends how complex you want to go, you could just do something as simple as using cubes in a grid and removing them where you want the hole to be, or use a masking material to visually put a hole in the wall and use blocking volumes around it for the collisions.
yes i want cubes in a grid that remove from specific place each time the wall spawn
is there any specific documentation or video which can tell me about this by the way thanks i never heard this before i will check it
There are videos, im not sure about documentation.
Give searching a go
yeah
but i think this is mainly for destruction but i want to remove specific part like each wall come with specific shape drawn and the area which space is drawn it is empty and the next wall automaticly come with diffrent shape and my player have just to move it from that space i just want this type of system basically
I can't visually picture that
You can always get crafty with animating your own wall and cut parts of it
Using 3d modelling tool
A bool operator will do the trick
i see on video but it is using unreal engien 5 and in my laptop unreal engine 5 does not work
At least that's what it's called in 3d max
Doesn't matter what ue version, just do it in 3d modelling program. I was talking about fracture anyway which isn't what you want
You want a hole with specific shape, then you have to do the manual work. There is no such system
no there is some blueprint class called dynamic mesh that is not there in ue4
random generated hole i want
in a wall in a shape of cubes
There is a type of mesh that can be sliced
I think you're overcomplicating it 😅
I prefer the simplest way. Make some holes in 3d Max, have a set of them. Then import all of them and just get a random one from what you export
You can just make a wall out of cubes in a blueprint and set up different states where certain cubes are removed, or you could use some sort of collision or trace to get certain components (cubes) from the BP. That's how I'd do it anyway.
Using blocking volume suggest that it's not randomised at run time but placed in editor time manually
ist there any way liek i make a wall using cube then in construction script some cube randomly dissaper based ona logic and create some holes so that my player can pass
You can , just translate what you want to logic and operator
And implement it
Randomly dissapear doesn't scream making shapes tho
Also I don't get why u want to use cubes. What kind of shapes and how many cubes do u need to represent a round hole?
Imo just cut out some set of walls, randomise it in bp. Call it a day
ohhh instaed of dissaper can i sue spawn actor from class and place 9 arrow and randomly cube will spawn on those arrow not all arrow and in which cube is not spawn i have to pass through that
i didnt say i need a round hole i just need a hole it can be of any shape
My statement is still valid. You said any shape but what about round shape? How many cubes do u need to represent that hole and how many you have to delete and what algorithm do you need to create the round shape?
I can only suggest simpler approach, wish you the best on exploring alternate way tho
Just don't see how it can be done with cubes
ohh i guess i am unable to explain you let me share the video of which type og thing i want to create than you understand why i am going with cubes
The Walls is an exciting endless runner game in which you find the gap in the wall, roll over the terrain and try to fit inside, avoid the crazy walls coming and try to collect coin to unlock new wall’s type. The game is ready to release straight out of the box, and it can also be easily customized to make it even more engaging to your players. ...
i just need to make somethign like this
Would been easier if u said something like Lego to begin with
That's not really any shape
In that case just use grids to represent the boxes
ohh sorry i think it was
And just remove the one you don't want
okay but can you tell me how can i remove is there any function which cna help me
You can do that in bp easily
Represent the walls as grids
Make some function that define the shape
Do a series of those functions as needed
And just pick one at random when you want to spawn the wall
Spawn wall-> cutMyWall
Cut Myall just pick the shape randomly
okay i think i am getting it let me try this once
Hey All! I'm teaching myself blueprints, im trying to use a branch node or something on event begin play so I can have it do multiple things, for some reason the branch doesn't work, and there's no else if or anything, I remember using one once but I can't remember what it's called, could anyone tell me please?
Kind of depends on what you're trying to do, the most basic answer is a sequence
That's the one! 🙂
I am just adding a UI to my Character Blueprint and can't use 2 event begin plays, but I can use sequence so it adds the input mapping THEN adds the uI ❤️ 🙂
thanks
Quick question whilst I have someones attention 😄 if I want to tab into the inventory menu etc, would I:
use an action map to remove in-game widget and create tab menu, then once I finish in the tab menu flip flop, would be, add the in-game menu and remove the tab menu?
would that be how everyone does it?
If you're moving through multiple menus you could use a Widget Switcher, then you only need to load one widget
I'm still learning the widget switcher thing for the canvas right?
I will use the Tab Menu where I can use canvas switchers between them but one is for the in-game UI and the other is for the menu system?
or is it all one?
Yeah I would probably have a separate widget for the HUD and then just hide it while the menu is open and then unhide once the menu is removed.
I'm far from an expert on UI though, I'd suggest maybe watching one of Ryan Laley's many videos on UI/Widgets, that's where I learned most things
I use common UI stacks. Pushing a new widget to the stack hides the old one. When the new one is deactivated, it shows the widget below it.
ah yeah, I only heard about Common UI recently but still haven't looked at it
Why common UI force enter key to be not handled as a accept button reeeeeeeeee
I'm pretty sure you have to setup accept and back handlers lol. (Not that I know how)
They utilize commonanalogcursor to morph all gamepad accept clicks to mouse left click, but they dint do for keyboard, so you can never use Enter key for accept, because in SCommonButton, its if key = enter, return unhandled
Fair enough. Good to keep in mind.
Ouch
But cant you simply override this?
Try Event Construct > Delay Until Next Tick> Get Actors
Widget might load before variants spawn
Did you try this?
#blueprint message
you chech here i have use it
before
Ahh, alright thanks mate that explains it.
You're doing this on construct so is the actor even loaded? is there a reason you're not doing this on begin play?
i'm doing it in Widget BP
ah I see
So why does Setting work but not Adding?
im doing this tutorial and its asking for a float - float and i cant find it?
A float variable?
he just says float - float
just type the - symbol in the search bar and it should show up
it dosent for some reason
are you dragging off of an int or something?
im tryna make a gun shoot and dmg enemy
there is a newer system defaults to Wildcard, just plug a float in
Btw that isn't my code, I found it on Unreal forums to use as an example. This is my actual code
I just loaded up unreal to check haha, forgot about this
did you add Enemy Tag ?
put a Print after Event Any Damage to see if it is firing
you might not have collisions set
ok
so like
im still new how do i check if collions are set
i fixed it
ive been on this for 12h im a happy bean
im unsure what to add to stop this error
there's no input to the cast node
you have to Get Player Character first
is their a way that would let me end game after players health reaches 0
Has anyone had issues with this node disappearing on engine restart in 5.3?
Is there some LoadingPhase wrong on the plugin that contains this?
wtf is this node even?
what is your logic for end game?
tbh i just check on tick if the health is <= 0, then if so i switch dead boolean and run death
but depending on your game there is probably a better way
Just grabs the inner Struct from the InstanceStruct that is passed in.
Funny u should ask that idk
but how does it validate the struct?
the thing just disappears your wires are disconnected and it's just gone ? every time you restart ?
i would take a guess it's the plugin something wrong with it ?
have any other nodes mysteriously disappeared ?
Yop
Usually a sign that it loads the in the wrong order
By checking the Struct Class
cool didnt know that was a thing in bp
Yeah we use it a lot when we want to have one function but pass in different data.
The receiver and sender have to agree on the struct of course, but at least one doesn't need to write one function per data
I am working on Utility Widgets. I wonder that do i need to "unload" or do something after loading an asset and done with it? Will it occupy memory?
if nothing uses it unreal will unload it for you
which in the editor however might behave a bit different than in a packaged project (the editor likes to keep things in memory)
Since its an utility widget, i'll use it only on editor
Hi! Is there a way to draw an ellipse without using Debug lines? I have found something called Blueprint Spline, but I don't know if I use it would be good for the performance. I looking for something like this:
someone can help?
rather, I need something like this to set transform the World Location of actor 2 to the relative position in actor 1
like a minimap?
i mean what you are literally asking for is just to take relative position of actor 2 and input it as world position for actor 1
that can be done quite easily
but im not sure it would do much
I just need to transform world location to local location but in actor number 1
what are you trying to accomplish?
so get the relative position of actor 2 compared to actor 1?
@tight pollen Take the WorldLocation you want Point to be at. Subtract the WorldLocation of Actor1 from it. That's the value you want for the Point then.
it doesn't work well
it must also take into account the rotation of the capsule to which it is attached
Then rotate the result by the Actor 1 Rotation afterwards fwiw
splines are not particularly expensive, the main concern afaik is spline meshes. debug lines are editor only, but UMG comes with functionality to draw lines
really though I'd definitely use splines, they should be easiest to work with and I cannot imagine them being a serious performance impact when used to depict orbits
hm, mine stays when restart, 5.3.2 too
tested on a level blueprint tho
Yeah it's loading too early. The Object is in a DataAsset which is loaded in DeveloperSettings
That'S probably too early
Will see if I can delay that
gotta go fast ♿
Please help, i have a Grid actor and a GridCell actor. GridCells are constructed in Grid. I want to get their parent (Grid), but the cast fails. Why?
Why are you casting self->parent and where is this parent being set
can't you still get units from the child ? or you control it in the parent ? i thought it's inherited
Yeah, I mean if the parent has it, the child has it
what do you need the parent for ?
i can't imagine changing things on the parent or using that data
i just use the inherited stuff on the child
Eh most of that code doesn’t make sense 😀
what are interchange base nodes
can't almost find anything about them
Trying to get the unique ID of an asset
So I recently had to Google Interchange because it was listed under someone’s plugins as part of the crash log and Google said it’s UE’s import/export framework
interesting, any idea how to utilize it in blueprints? Casting would need an object input
Thank you. I need to draw a ellipse. I think it shouldn't be too difficult to draw an ellipse with a spline, isn't it?
Hi! Im looking to create a doted line between two points on a 3d interactive map. I've done a lot of digging but not sure which is the best way to go about this. Any ideas what method I should be using to create this line? I already have the two points and their world locations. I just need a good method to render a line in game to showcase the distance.
No idea sry. You could drag from the target and see if anything sticks out but 🤷♂️
im not actually sure about that node, but try looking into GUID. that will give you a unique ID from each asset
Someone will probably tell me I'm an idiot, but I use GetObjectName to get an ID by which to save an actor's data, and I have NOT had any issues with collisions even on fairly complex levels with many spawned actors and actors of the same type.
I guess via c++ because I couldn'T find a node for this in bp
but the "getobjectname" gives you the assets name and not an ID, doesn't it?
for example if the actor is a static mesh called blueChair, the return value of this node would be blueChair, right?
Runtime unique name tho
Yes, but crucially, if the level had a second blueChair, that would be blueChair1
BlueChair_0
^ or that yeah
It's returning the level's name for an asset, which I think is necessarily unique.
Plus, in my case the fact that it's usually human-readable is a bonus, in case I ever need to manually debug save data
oh its a blueprint thing, there should be a node called Generate new GUID and then you can simply create a variable from it, or you can straight up create a GUID variable in your blueprint
First a bit of context, I am trying to replicate a pak mounted chair which was mounted by server and client. It is the same pak file so if references were built upon asset names, then it would have worked but apparently each asset has a serialization ID and a GUID? Now when mounting the pak on server and client the assets apparently have different IDs and thus the engine doesn't know that these are actually the same assets. Right now, the chair does get spawned on the server but is NOT visible to the client. The client does recognize that there was a blueprint spawned and sees it's other functionalities but the assets inside the pak which were mounted like the static mesh, textures etc are invisible to him although he mounted it as well.
yea but that's a new GUID, not the one of a specific asset
I need to get and assign guids of specific assets
thats why you promote it to a variable 😉
Ah yeah, I'm offline-only so that sort of replication problem isn't something I can comment on
or just make a variable of a GUID
it would be a variable then of a newly created GUID. Not containing the GUID of the asset and also not referencing that asset at all. Just a random own GUID
even outside of multiplayer unreal handles it the same way. It's just not as needed to know or implement functions on an ID base then
I guess theres no perfect way to do that unless you create a custom system with GUID or any unique identifier. I dont think theres any out of the box way to do this, I use it for save games and populating containers and inventories. but maybe im just misunderstanding what you want to do lol
Even for when saving a game. How do you assign that newly created GUID to the game instance you want to save?
do you make it a map? with guid string as the key and the instance as the value?
so you can generate a new GUID by hand, OR whenever the item is spawned into the world you can generate a new GUID. Personally I simply expose the GUID variable on spawn and then generate a new one and make sure to use a master actor class that allows me to do all this on its own as long as it inherits the master class.
I use a struct to store my save data, its all arbitrary as to allow saving of any variable or object, and I just create an array of this struct. I get all of the information from the actor using an interface when the game is saved. but it gets a little more complex than that.
where can you see this generate guid window
so to answer this question Im using the struct above, saving its actor class, its unique identifier, and all of its variables into the struct
you have to select your GUID variable that you create in your BP and it should be in your details panel
Ah yea now I see it
yea honestly I don't think a GUID is what I need
shouldn't all players have the same guids for all actors in the level anyways
I thought the GUID was a unique ID for an asset as in a static mesh or so. For example this static mesh asset called blueChair has the ID "xxxxxxxxxxx..."
not an instance in a level
GUID is for anything you need to identify, its globally unique so there can never be one like it. unless you create a GUID and never generate a new one and duplicated it everywhere. it just has some extra setup but its a pretty awesome tool
what are you trying to do exactly?
So, to simulate a spider web that can catch pawns, I've got this pretty simple code. Attaches a physics constraint to an actor as it passes through a collider.
Problem is, I realized last night that I don't need to capture 1 actor, I need to capture N actors. What's the cleanest way to duplicate a physics constraint with a LOT of custom configuration?
Wouldnt you just apply a slow effect on them ?
Nah, goal is for them to get fully trapped and not be able to escape easily. You can only get out the way you came too.
Is there a particular reason you wanna do physics on them ?
Well, two reasons. First, most of the actors that can get caught in this are just loose static mesh objects. If a barrel flies into the web it needs to stick.
But second, the player pawn moves with physics
Gotcha
How would one go about making a fog of war system for an rts or moba?
I think i can figure out how to do the logic for vision, just draw line traces to actors in vision range and figure out if something is blocking, but no idea how to do actual clearing of the fog dynamically to objects.
All tutorials i can find are on simple drawing a circle around a character, but i want it to dynamically respond to obstacles in the game.
https://www.youtube.com/watch?v=u-0vdEt4XvM&ab_channel=Allshar
something a little like this
WIP of a fog of war / line of sight system for Unreal Engine 4.
All done in blueprints with very little impact on performance.
You can follow the project on Unreal Engine Forums :
https://forums.unrealengine.com/showthread.php?84832-Fog-of-war-Line-of-sight
Usable in both 2d and 3d. Test 2, 28-09-2015
i guess something with a sphere trace on the visiblity channel?
Oh whoa so THIS is interesting, the AddPhysicsConstraintComponent node exposes ALL the same options as you get when clicking on a regular component?
so i have a health and damage system already
but at the moment its a simplet health pool that gets detucted from when hit, i want to transition to a hit percent where everytime you get hit you increase percent like smash
how would i approach doing that
It seems that the "GetPlayerCharacter" function returns nothing for me after possessing a new pawn (in my case a sailboat). Is that expected if you're using possess / unpossess to switch pawns? I'm switching between the main character and a sailboat, but I'd like to be able to get the player character while possessing the sailboat. Maybe I'm switching pawns in a janky way.
Dont they all do that 😅
you'd just predict the trajectory of the orbit using whatever means you do to achieve the movement to begin with and then draw a spline along those points
Thanks.
I want to stand from a knockdown based on input IE player gets hit, enters knockdown and then waits for player input to stand up, what node allows me to identify if a certain key is pressed to notify the stand up
I mean is key down works but why not just do it on the actual enhanced input node
you can do that on an input node itself? i didnt know that
Do what, call functions?
it looks like your setting to the original mesh, wouldn't you want to set the "spline mesh" mesh variables material ?
yea i thought enhanced input was just a binding to the key press
I mean, it does. It allows you to do things when a key is pressed, which is what you’re looking for from what you’ve described
ill do that instead then
Remove the index connection to setMaterial
You only have one material, material index should be 0 on all spline mesh components
Hello! I'm fairly new to UE so I need help finding the right tutorial for some things. Does anyone know a tutorial that shows how to make a selectable object that moves the camera to face the puzzle and changes it to UI controls? Similar to this example
I know it's used in a lot of games, but I can't figure out the keywords to look up a tutorial for it
removed the index, thanks dawg.
I assumed by connecting the index it'd set it for each material but i guess not.
Don't ask me why I am making Windows98 idk either. Small issue, whenever I click elsewhere other than a button the mouse disapears, probably because in a 3d game it is supposed to control camera rotation so it makes the mouse disapear, how do I disable this?
I think this should work
sorry it's been a while since I did any UI stuff
No problem
is there a node that allows the character to be negated in hit collision?
i know there is invincibility but if a character has dot i want that to be active while they cant be targeted for another attackj
Do I make that variable?
How do I use it?
get player controller, set show mouse cursor
Hi guys maybe some one know, about a Videogame or software or pluggin or blueprint that let me connect one or more virtual reality device to a PC, the PC is the server and VR are the clients?
That's what I was forgetting! 😅
How do I change the position of a widget when I click it
so question on the function of sequence node
i have this
it runs sequentially correct?
would a sequence node allow it to run in paralell or would it not really matter
The sequence node still runs things in order
anyone able to help me with gameplay tags and interfaces? im trying to create a tag in character bp when pause menu opens and removes it when it closes. the issue im haivng is getting the pause menus "resume" button to remove that tag and ahve the charcter bp see that. im trying to avoid casting for when i make other menus
Hello, Can Someone assist me please, I am very new to unreal, What I am trying to do is, My character have health, And it decreases X every X, I want to create a actor with overlap event that restores X of health, And as soon as the character leaves that overlap collision he must start to lose health again.
There is really no paralell in bp
gotcha
Use a gameplaytag interface
Grant and revoke tags
thats what im trying to do. im not certain on how to set it up. every vid ive watched on interfaces over the alst couple days leaves me more confused than the previous
In the char you simply have a gameplaytag containee
Create the healing actor and use a bool to see if the player is still inside the healing area.
On Overlap Begin set the bool to true
On Overlap exit set it to false again
And whole it's true heal.
have that
what do i ened for the bpi?
(Id actually do this in a component instead, as it lets younkeep everything in a single place)
see i see a lot of vids doing taht but its for my pause menu
can i add a component to my widget?
Where youd just do in the UI:
GetOwningPlayer->GetPawn->GetComponentOfClass[MyGameplaytagComponent]
No, but to thenpawn.
Menu just need to access it
no it doesn't
It does
but the second can run before the first
Untill any latent
is this casting tho?
Not without latent stuff going on
sure
Dont get hung up on it
Seen from a plugin pov, using a component or an interface serves the same purpose. You've decoupled yourself from the owner
Yes, interfaces are commonly 1 to many unrelated classes , but nothing stops you from using components the same way. Pro's being that they can contain their own state, and comes supplied with whatever code and vars you put in the comp, compared to theninterface who only brings the events to the table.
But yes, this creates a hard reference between that specific component and your widget.
today I learned!
ill use components for when i start building on functionality but right now im just figuring out UI. i want to have a couple different screens
and isnt casting for every ui screen considered bad?
Guess you wont take my word for the benefit then
im just not understanding i tihnk
No, if its reasonable to cast, you cast
let me try to udnerstand casting then, why is casting deemed bad sometimes?
You can usually safely cast to the basic player classes without much worry, As they're usually already loaded anywaus
Casting is bad when you dont know if what you're casting to is loaded , as this creates a hard ref and forces it to be loaded regardless
Casting to MySpecificEnemyInLevel3 is bad.
Casting to MyCharacter has very little impact
oh so if i cast to a chest and theres no chest in the area the character is in, what happens?
does it cause lag?
ahhhhhhh
Now imagine a chain of these. You cast to chest -> chest is loaded
Chest casted to Boss -> Bossnis loaded
Boss casted to soøe enviroment prop -> this gets loaded
Cast in cpp is less laggy right
And all of these has a bunch of assets related to them, with hardpointers, so those are also loaded.
so ui to character causes character to stay in memory but not the ui
That 8k texture on the bosses weapon, yupp, loaded.
Also by knowing this, you can work around it
So instead of vasting to MySpecificEnemy which has textures and anims and whatnot
You instead cast to the very lightweight MyMasterEnemy
so then i really dont need to wrory about gptags until i get to functionality and add in swords and items and magic etc
Which strictly acts as an interface, with no direct asset references whatsoever
you are mostly right but just as a tip, textures are the only exception to that, because of streaming
and then specific enemy pulls from generic masterenemy
right? @gentle urchin
So close 🫤
Didnt know they were an exception to it
Thought all hard ref'ed assets would be loaded
textures will only load if you have "never stream" checked (automatically checked if you have a texture not power of two)
Is child of, and can have whatever they need to have for that smashing look and killer walks
there is a reason for calling you the second coming of the gaming lord
Lol, im jon snow in all of this
Ty for pointing that out 🙂 any reason one wouldnt stream non-^2 textures ?
so then this looks right for casting and changing the var?
I would check out the concept of encapsulation
Avoid manipulating other objects properties directly
Encapsulate the logic to be within the owning object of that property
Keeps the code clean(er)
Thumbs on a phone..
it streams via the mipmaps, 2x2, 4x4, and so on, when you got a texture non power of two, the engine wont know how to create the mipmaps
Ah i see
Hi guys
When Im possessing a controller into character it takes controller's rotation
Is there a good way of possessing without taking this rotation?
Like, a character is already placed as I want and I down want him to turn on possess
is there a capsule component thats a box? or can i change it inheriently
Box Collision
i mean.... i woulda said the same
i saw the reaction squize and i thought you were flipping off the reply XD not pointing to it
I deleted a variable in C++, and for some reason the inheriting blueprint I have doesn't update, and still acts like the variable exists. Only after I press the Compile button on the blueprint (but not actually changing anything), will it realize that the variable doesn't exist anymore and act as expected. Does anyone know whats going on or how to fix this
the issue returns if I start the editor again
x)
Hellow there, I cannot find the proper way to cast a variable from an actor component to an animation blueprint. It seems to work, but I always got warning message about "Accessed None..."
looks like you don't have component of that class ? the cast is likely succeeding
This 5 second timeline only prints 0.0 once and never continues to update or print finished. I'm calling the function from the editor at runtime and the function is on a pawn. What's going on?
I don't think timelines work with Call in Editor
but you can set the play mode to Simulate , and then it should run
Thank you!
Is Capsule Trace By Channel expensive?
why would it be
mine was included with ue5
Traces are not expensive themselves but drawing debug on tick might slow you down a bit
the question is which trace is more expensive? by channel? or by object?
Editor-only tho so doesn’t matter for game perf
Heya, does anyone know what mistake might cause this? I've tried adding various IsValid's to the array, and before the branch but the error still occurs when I stop playing.
Nothing seems be be broken, my quest log widget opens fine with the child added after the quest is accepted
I am looking at a project where has a function on a timer every .1 second and it calls the capsule trace
That’s fine. Traces are pretty cheap
That’s the wrong code
Did you hit the magnifying glass?
Where’s this UIQuestLog
something is wrong --> from 1 element to an array?
Oh that’s the widget you’re creating ?
you aren't removing item from array in the loop, are you ?
whats wrong with getting an array from an actor?
hey i was wondering if anyone could help me with an error i keep get. im new to unreal so i appreciate all the help
Blueprint Runtime Error: "Accessed None trying to read property Hud Widget". Node: Set Percent Graph: EventGraph Function: Execute Ubergraph BPC Player Stats Blueprint: BPC_PlayerStats
it's fine if ht gets the arrayt
I thought he was setting the array or smt
I'm as cpp master (i.e. a beginner in bp)
So in the create widget it's creating the 'Quest Log Entry', which is the quest that's been accepted, and adds it to the section depending on the bool value
Although it doesn't seem to be getting the bool value properly because it should be getting true from the story quest bool
im the opposite xD
Add an isvalid check inside your for each loop before plugging the target into the widget
like this?
index will always be valid if you made a good system
yeah unfortunately im quite new so it's not good 😓
adding one like this doesn't add the widget; maybe i need to revisit how i've done things
do you change that bool somewhere?
Hey i was wondering if anyone could help me with an error i keep getting. I’m new to unreal so i appreciate all the help
Blueprint Runtime Error: "Accessed None trying to read property Hud Widget". Node: Set Percent Graph: EventGraph Function: Execute Ubergraph BPC Player Stats Blueprint: BPC_PlayerStats
first I can't see
second, where is the widget variable?
so i have it set up where the child BP_Quest is attached to the npc, and inside that child it stores an array including information on the quest type, description and whether it's a story quest
it doesn't get changed anywhere
then Is Story Quest will always be true so only one part of the branch will execute
hey someone, how can i add an input to an event dispatcher?
i forget okay
leave me alone
actually dont i need a reply XD
Ill create a child quest for each quest, so sometimes i'll have them set to side quests
It's just parsing through the information of the quest to see where to add it to the quest log widget
it means ure trying to access your widget when it was not created yet
lel
casue we can answer that its in the Details panel
I swear I have though. I’ll double check. Thank as well
event dispatcher. i was inside the dispatcher
thats why
its a slow day today for me
got it ?
yup gracias
wut, that was a dispatcher??? isn't that an interface
im setting up an interactable component
its if you dbl click a Event Dispatcher
squize helped me last week make it
oh ok
I am using the event tick to do a line trace to detect if an actor implements an interface and if it does it shows my interaction UI but I was wondering if there is a way to remove the UI after the interaction has taken place
Keep track of what you detected that triggered the UI
once the line trace detects something Different , remove the UI
but the interaction UI stays there when I am accessing a work bench for example
and like overlaps the workbench UI
Remove the interactUI when you open workbench UI
yeah I tried that but because I am using the event tick to do a line trace to detect if the actor implements an interface when I use the workbench and remove the interact UI the event tick puts it back
do u think I just scrap the event tick and use collision boxes for the interaction UI? when overlapped
oh , branch your Tick part with a Bool var, when you open bench Bool=False
omg I am such an idiot ur right
and that bool var can be used for all benches etc
ty
I am building a widget that appears when you look at items in the game that you can interact with. This widget will display a few different options like "Pickup, Use, Inspect, etc". Which would be a better way for handling the menu?
- Create the widget and destroy the widget each time.
- Create the widget, hide when not looking at item, update the widget options and display again when looking at new item.
i ahve 2 cameras on my character, first person adn thrid person. if im trying to recreate this line trace, what should i select so that it works for both??
just extend the length for third person
but how do i know which camera is active?
with a bool
ist ehre a way to compare the 2 cameras and output goes depending on the result?
why would you compare them? everytime you switch view, a bool value changes and on that bool you can change the line trace and other thing
this si the swap for tp to fp
well, you can get active camera from the camera manager
camera manager?
just make a bool though
it'll make it easier to have different behaviour per perspective
ill just add in a bool
Not on the array itself, on the item but looks like you figured it out
Yeah it still gives the error 😓 I think it's just straight up not getting the info from the array for some reason
Maybe you have stuff in the array that’s not valid
Mhm, I think I've messed up somewhere
It's probably a bit too much to ask for help with so I'll try and think on it 🙂 ty
Drag from Array Element, isValid check, if successful, then branch
Basically the cost goes up the more stuff it has to consider, and the higher the complexity of the trace shape
Longer trace -> more expensive
Fancier geo within the collision channel -> more expensive
Capsule vs line -> more expensive
but as to whether or not it IS expensive, it depends. I regularly do over 1k per tick no problem
Keep in mind isValid only masks the symptom so it’ll work if only some items are invalid but if the whole array has nullptrs, you’ll need to fix that too
Alrighty, thanks 
I believe it's a blueprint issue but you're right, I'm going to post it in Niagara a well
maybe some one know, about a VR Videogame or software or pluggin or blueprint that let me connect one or more virtual reality device to a PC? , the PC is the server and VR de ices are the clients
Hello, the Third Player controller is C++ -is there a simple way to convert it to a blueprint? I want to add the ability to open a menu (level) hitting the esc key.
https://forums.unrealengine.com/t/ai-not-walking-running-animation-when-given-aimoveto/550624
I am getting this issue but none of the solutions provided fixed my issue.
Issue Steps to reproduce Start a thirdperson character with UE 5 (5.0.1) in my case and follow this tutorial: AI Random Roam |AI Move To/Basic Roaming - Unreal Engine 4 Tutorial - YouTube You will end up with something like this into your AI character Question How can i enable the walking/running animation when ai is moving to ...
Unreal Engine should technically be able to do that if you say, had Meta Quest devices and packaged for them, and have a server executable running on the PC.
Create a child of it in blueprint, and add whatever functionality you want to it, then in your game mode settings, set it to use your new blueprint player controller.
But how? Or does there already exist a game like this today? Using that way
I'm sure there are hundreds of games already like this.
The "simple" how is "Create a multiplayer game in Unreal Engine and package it for Meta Quest devices, create a server executable and run it on the PC, and set up what is needed for sessions and get your devices to connect to the server".
But please, give some names of this video games or blueprint or some reference :cc
Fortnite
that worked perfectly- thank you!
I'm trying to use the Enhanced Input Mappings in my Player Blueprint but the casting to the PlayerController fails. Does anyone know why it's doing that? I already checked the level game mode and it's using the player controller.
ok this is weird now, even though it says the casting failed my input control still works on the player character... I can still move it
I don't do VR stuff myself, but it's no different creating a multiplayer game for VR than it is for PC, the only difference is handling how those devices interact with the game.... User interfaces need to be significantly different for VR, inputs for movement and tracking are different, and hardware specs are usually lower spec than desktop PCs. So technically, if you can create a multiplayer game in Unreal for PC, then you're already a good portion of the way to having a multiplayer VR game.
I can guarantee you there is not going to be "a blueprint", "a tutorial" or "a plugin" that will get some multiplayer VR system all working for you that you can build off of - you'll need to search for topics like "VR" with "Unreal Multiplayer w/ Sessions" and the type of VR devices you are targetting, and based on your description, using a dedicated server build and search for things based on these topics, try them out and see if they're what you're looking for and build off of those and try to combine them.
Based on your question, I'm not even sure if you've even attempted to use Unreal at all - it's not something that is going to be "easy" nor will you likely find a quick solution to what you're trying to do, and you'll likely need to find out information about lots of different things, and piece them together to get something that works how you want it to.
so i set it as a variable and create it in begin play but it still doesn't work
Print out the "Get Controller" return value. If it's None then that means you're calling the logic before the pawn has a controller to reference.
its made in event begin play. Are theses photos better?
Quick question if anyone is willing to take a shot for me. I'm setting up a simple line trace Infront of my player character to test if an enemy in Infront of them to be able to damage. I currently am checking for the parent class of my NPCS, but i also tried the direct enemy actor yet its still not working. I changed the set to do on false to ensure its working correctly and it worked fine in enabling on hitting anything. Thank you for any advice in advance
It's none. How do I fix it?
how does get owner can be the player AND the dummy?
The "Get Actor of Class" node attempts to return a spawned instance of an actor of the defined class. If you haven't spawned an actual "BP Mob Parent" then nothing would be returned, and it wouldn't necessarily be the exact "Hit Actor" that was detected. If you want to check the class of the actor, you can cast "Hit Actor" to "BP Mob Parent" and if the cast succeeds, then you know it's the right thing to work with.
Run the code you have there off of "On Possess"?
Not sure of the exact event to use that's in Pawn, but it's one of the possession ones
Ohhh, so i just need to cast the hit actor to the parent and check if from there?
You shouldn't need to check it - the cast itself is the check
If the cast succeeds, then the top path would execute. If the cast fails, then the hit actor isn't a BP Mob Parent or child of it.
Alternatively, you can use "Get Class" of the Hit Actor and compare that with the BP Mob Parent class (it'd be a purple pin rather than the blue pin)
if you use begin play on different actors, one might load before the other
Tried both, neither worked. Trying to fiddle around more. If i can't figure it out i'll do what i usually do. Dick around for an hour or so until an idea pops up lol
@dawn gazelle Lookin like this works Thanks mate
This would only be checking if the hit actor is exactly the same actor that you've stored in the "Hostile NPC" reference. Not sure if that's what you actually want.
Actually "Get Parent Actor?" I'm not even sure that's doing what you think its doing.
ayyy, it works.....
hostile npc is set as child and it works so fk it xD
spegetti code ftw
@bold cypress what are you trying to do exactly because there could be better ways to go about it
Just a simple forward check to test if its an npc or not. I'm brand new to coding so i don't know much. Hence spegetti
This is what the alternative is I was describing (I didn't mention the is class child of, but would be required)
ohhh, i grabbed the wrong function then. Let me go back and test
There is a simpler way: just tag the npcs with the tag NPC and make a branch with the bool actor has tag with the hit actor
I have no idea what the tag is
Yea tags are alright, but not necessary if using a heirarchy.
Ya, that didn't work i think maybe some of my initial creating everything coding is fked maybe?
Maybe thats why my spegetti worked and this isn't
Probably has something to do with your trace - it may not be hitting what you're hoping it is.
I pan my camera around for a good while to make sure
End result of this is that - you have a hit result, you're getting the Class of that hit result, and checking if that class is a child of BP Mob Parent.
There can only be two issues:
- You're hitting something before your trace is actually reaching your intended target, therefore, it won't be the right thing (or nothing at all)
- The trace is hitting the thing you're expecting but that thing doesn't inherit from BP Mob Parent.
Can you show us the code of the line trace?
Looks good but for me I sometimes need to use line trace for objects and for the object types make array and put pawn
I don’t know but it worked for me
I even tried class is child of using the spawned mob itself as the parent class and it dosn't work
Print out "Hit Actor" see what it is.
And with the previous code i was hitting something before you were right
I completely forgot about that AAAAANNNNNDDDDDDD turns out the hitbox is way above the mob that was the problem
No idea how that happened
Wow
<--- kinda retarded
now i just gotta figure out why tf the hitbox for it is half a mile in the sky'
Thanks guys
np
Bro same
OHHHH the healthbar widget is coming out as the mob name while the collision box is being hit from the vertex
just gotta make the collision box smaller i guess and presto bango
huh, that wasn't it
the mesh is coming back as cube?
oh nm its not even seeing the mesh
and only seeing the hp widget as the character
in my project i have a fpcamera and a tpcamera and im trying to setup crouch, how can i make it affect the fpcamera as well? rn its only affecting tpcamera
Is your FP camera attached to your character’s head?
Show the hierarchy
springarmcomponent?
gracias
ue5.3
its the default name in ue5
it auto sets the spring arm name to camera boom
idk why
did nto work tho
is there a way to se the boom arm in the playineditor?
im curious if the crouch is affecting the boom or the camera itself
any one knows what is spring state, or how to edit or even get it ?
Thanks a lot! Bro
is there a way to change which camera is gettign affected by crouching?
Its the capsule which is getting affected, so as well each camera below the capsule
i have my camera attached to the mesh which is attached to the capsule, shouldnt that affect it?
yeah
sadly the mesh isnt moving when i jump into fp
what is fp?
so movement stops when you change to fp?
the movement should still working, check if you have anyother code that affects that
i dont. idk if it was just a bug
but once i moved the camera to just be under the capsule it fixed it
putting it back on causes no issue
Hey there. I need some help to work on my character movement...
oh wait. its because i added in the animation now
I'm currently struggling to make the jump feel less floaty, and adding Coyote time.
since camera is set to the head its changing it
which movment you mean, camera or character?
so i made the crouch key and it was working in third person but not the first person. but the fpcamera was set to be attached to he head and because i didnt ahve the animation live yet, it wasnt moving
now i just need to remove the half height so the 3p camera doesnt move at all. know a magical value by chance?
crouching means to scale the capsule to a smaller half height
i see that now. is there a way to not have the 3pcamera be affected by that?
It's just a variable you create which stores the spring's state. The function input is by ref, so it directly updates the spring state every time it's run.
no, either you cheat, so you add the delta location the moves the camera down, to move it up as it was never moved
delta location? ive never heard of that
how would i go about doing that?
from what i found i need to move the camera up 30cm
you need to calculate that by your self
set relative location
you need to read more about that
would it be this?
yeah
you need to make an equation based on the different variables you have by now
but let me help you with a short path
On Crouch -> set relative location: in the new location (CameraRelativeLocation + (0,0,30))
On UnCrouch -> set relative location: in the new location (CameraRelativeLocation - (0,0,30))
yup
beat ya to it :p lol ty tho appreciate it
hell yea, just what my game was missing! the ability to tbag
XD
figure i should ask this here too, how can i make it to when the prompt in the middle appears, the buttons on the right arent clickable?
ive come across a bug where i can hit resume and the middle screen prompt stays on screen
Hey... I need help to override the CanJump event on the CMC.
I just need it to have the same behaviour as it does by default, but also implement Coyote Time
An easy way would be to have the "Are you sure you want to quit" widget have an invisible background that expands to cover everything and make it hit testable, thus preventing you from clicking on anything else.
hit testable?
how do i set that up?
Set the background to "visible" rather than not-hit testable in its visibility settings.
just put a blank image there?
Sure
How can I limit mouse position in viewport in circle, in square is easy viewport/2 -mouse position/by desire size, but how can i make it to circle? i am not smartest at math
thank you my friend
does interp nodes differ between diffrenct PCes ? i gave my project to a freind to test and this exact thing with the same values run very very fast on his pc and runs slow (as i want it ) on mine this is what controls the speed the movement speed is set to .1
What is the Get World Delta Seconds Node in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
diferent frame rates on pc's i asume?
iam using this to inc the time since movement , and yea thats what iam thinking but how do i fix it multiplying the speed with delta seconds didnt fix it
Anyone have any idea why when i print log in simulation at a frount vector the hp bar widget is logged as the actor and the mesh dosn't appear at all in log?
been stuck on this for almost 2 hours
I made a weapon that's basically a clone of the FP template pickup rifle and then placed it very far away from my player start. Copied the blueprint and the mesh setup and everything, but rebuilt from scratch. Then when I start the game, the On Component Begin Overlap event of the new weapon is casting to BP_FirstPersonCharacter even when I'm not colliding with it. What's going on here?
i think ue5 removed the delay node, so does anyone know how i can make a print string fire off every 5 seconds?
i've tried many other suggested methods but none has been better than the delay node. i am using sequence nodes in my bps btw
i want to be able to have multiple variables printed to the screen and be able to watch their values change in real-time depending on how long ive set the delay/timer
uncheck "context sensitive" on the top right when you go to place a node and it will show EVERY possible node You will get it from the search from there @ornate laurel
thanks this seems to work. btw what if i want to use this within a function?
Cant
Bp Functions are expected /required to instantly return
Cant have any latent nodes there. It must be om the outside(in the event graph)
Or in a macro