#blueprint
1 messages · Page 79 of 1
I'm using a blueprint with a skeletal mesh as the root component (it's a rifle). I'm attaching that blueprint as a Child Actor Component to another blueprint (the character). I can't seem to find a way to access the blueprint's variables (rate of fire, damage, etc) since it's being referenced as a Child Actor Component instead of as an Actor.
You can use the built-in friend or foe system, I believe it’s called IGenericTeamInterface but you’ll need a bit of cpp to do so. Same with gameplay tags. Also use #gameplay-ai for these questions next time.
Oh thx a lot! Noted for the tag sorry for that!
Np, only to say that you’ll get answers from more specialized people
Is there an existing function in blueprint that can convert rotator degrees to be 0-360, instead of -180 to 180?
I can add one easy enough, but if there is an existing one that'd be preferred
Clamp axis iirc
ah! clamp! thanks that looks to be what I need
hey devs . i have downloaded asset from marketplace and starting to notice this type of strange variables , what is this ?
Child actor components are broken af. Just use regular actor components
Need it as a skeletal mesh component, just trying to compartmentalize information where it makes sense. Might as well put information about the rifle where I'm using it to attach to the actor.
"Get Child Actor" and casting it works.
how do I make it grab once it will +1 the SpeedCount variable? I'm doing a ship throttle, so when I grab once it will move the throttle to speed no 1, if grab again it will move to speed no 2, etc. For now without the SpeedCount variable, the throttle only move to turn on and off
I don’t rly understand your question but I only see a Set SpeedCount to 0, no +1
yea I want it to add up everytime the throttle is grabbed
idk how make the + counter that would change the speed count
Set counter to counter +1
In other words, GetCounter, add node with 1, SetCounter with the result
Hey guys, is there any way to get the instance static mesh that is spawn by an actor using line trace?
So i have BP_Room actor that spawn in the walls which is instance static mesh and i want to detect the specific wall the line trace hit.
Currently it just return the room actor
like this?
You can also clamp it so it doesn’t go past a certain number if you want
nicee thank you
Check if you have set up the collision in the static mesh correctly
Or if something has already blocked it before it hits the static mesh since it’s green
Also you have two traces running (two red lines) spit is kinda hard to tell if it’s resulting from the line trace behind your character
This is the current collision box. And the line behind the character is the same thing but just spawn by another actor. And the result is the one from the front which is expected
Try playing around with these
I would also get the name of the source of line trace just to be absolutely sure as well.
Why are you using Get Class if you want the specific wall it's colliding with?
was just following tutorial but it still return the room itself without class
Do you want the mesh that's being used or the wall that it's hitting
the actual wall it hit
This is the wall that get spawn by the room actor
ahh nvm im dumb. I forget to remove the collision on the wall themself. Im actually spawning in the wallCollision at the wall location
fyi im just following tutorial. Not sure if this is the best way
Easy to overlook.
thx anyway guys
Do bound events always execute in the order they were bound? So if you need one to execute before the other you'd need to bind them in a different order or have more events to distinguish more points in execution flow?
For some reason when I capture the scene on all my SceneCapture2Ds using the Capture Scene node, my FPS drop really low and stay at around 10-20 FPS and the console gives me the following warning even though none of my SceneCapture2Ds capture every frame
Hi, I'm making something like a cctv using render target. But when I attach it as material to a static mesh it becomes blurry/zoom in
It should probably triggered based on order of trigger event
So say if you bind event A and event B
But if you triggered EVent B then A then it should follow the latter
Yea but I mean I bind several events to one dispatcher. Then I would guess they always execute in the order the bindings were defined?
I guess I'll have to test it. Would be cool if you could set a priority though. Ah well
"Event Dispatchers in Unreal Engine use a multicast delegate, and the order of execution is determined by the internal implementation of the delegate system. Each bound function (event handler) is added to a list, and when the dispatcher is triggered, the bound functions are called in an order that might not be predictable based on the order of binding."
If you need to ensure a specific order of execution for multiple events, you may want to consider alternative approaches:
Sequential Dispatching:
Instead of binding multiple events to a single dispatcher, you could create a sequence of dispatchers where one dispatcher triggers the next. This way, you have control over the order of execution.
Custom Logic Inside a Single Event:
If possible, you might combine the logic of multiple events into a single event handler and then trigger that single event. This approach allows you to control the order of execution within the event handler function.
Dependency Management:
If the events are dependent on each other, you might implement a system where each event handler checks for dependencies before executing its logic. This way, you ensure that certain events only run after others have completed.
Remember that Event Dispatchers are often used to decouple systems and provide a way for different parts of the code to communicate without direct dependencies. If the order of execution is crucial, consider using other mechanisms like function calls or custom signaling systems where you have more explicit control over the flow of execution.
Courtesy of ChatGPT
Anyone happen to know how I can "suck" the player towards a special point?
I want to create a projectile that stops at a location and then start pulling the player towards it.
May I butt in with quick question?
Say, I have a ActorComponent that needs to perform a procedure at set intervals - what would be more performant way of implementing that, having the object tick with a reduced, manually set, tick rate, or have the object's ticks disabled and regularly setting timers for, say, 1s intervals?
Timers are typically used. That way you can set a handle and invalidate it at any time
Also allows you to use tick in the future for something else
Sure, but assuming I am sure that this object does not need tick for any other reason, and thinking of performance only - is there any impact to either solution that should be kept in mind? I feel like being able to set the object as canEverTick=false is a gain, but then again the timer manager has to measure the time anyway somehow...
This may help
Hey guys, in today's video, I'm going to be showing you how to switch the gravity in your game to create a simple, very customisable, puzzle and/or minigame.
Unreal Engine 4 Tutorials Playlist: https://www.youtube.com/playlist?list=PLQN3U_-lMANOnnjfvEEVeAPE8mfrGr_VH
Ble...
has anyone dabbed with making sliding fps mechanic like the slash from quake champions ? would love to be pointed to a tutorial or guide for anything remotely similar
hey mates,i want to make the character hit the simple block and to turn his phisics on and when he hits it again to destroy it,how can i do this?
Thanks!
now he hits the block and it simulates physics but how can i check it one more time?
Anyone good with vectors?
I've made a spiral spline going upwards, but I want it to follow the main spline. Do I have to change the vector's direction at distance along the main spline? Or how is this done?
I think I just need to change the up vector to forward at every point in the spline
I tried to use BPI if the right throttle is grabbed/activated. Then I tried to call it in Propeller blueprint where if the throttle is activated it would spin. But I'm confused on how to use the bpi
The BPI has to be implemented somewhere, I'm guessing in your propeller BP. If you add the interface to that BP you'll then get the functions associated with "Throttle Activated" & "Throttle Deactivated" where you can implement your propeller specific logic like spinning or whatever
so the bpi should not be implemented in the throttle? or I should add set in the class setting for the propeller too?
Looks like inside an ABP, I'm assuming those are nested values inside structs? So in this case I'd assume the struct is "Swimming" and that struct contains a location variable or float variable named "Delta Location"
Sort of, the BPI defines the concept of throttle. The BP (likely propeller) sets what the functionality of Throttle does. The BPI is like an outline, no actual logic happens there. On the blueprints you want to do something with that behavior is where you'll implement the interface.
Here is an example from my own project. I have an interface "Glowable" that says an actor can glow and get it's color. It's up to each actor to implement how that happens.
What's the point of multiple event graphs? To organize stuff, mostly?
Pretty much, same with a "collapsed graph"
Alright, I will try playing around with it, thank you
how do you create a variable inside your class of type function?
so when I create the actor I can pass a function as callback
cant find a way
or maybe there is a different way to do it
guys how to make collisions for skeletal mesh which will copy its surface? like it s possible on static mesh but I have to use skeletal mesh because I had to animate it
hey here comes what might be a daft question. how do i rotate my lyra character from blueprint/code?
i've tried setting world rotation and using teleport
context: i possess another pawn and attach my lyra character to this pawn.
i then repossess the lyra character and want to have it face the same direction as the pawn.
Hey, got a conceptual question: Does it make sense to split core game functionality over multiple BPs? Say I have a strategy game, do I want a ResourceManagerBP, a UpgradesManagerBP, etc. that handles only that, or is it better to consolidate functionality in as few BPs as possible?
Hello, I'm trying to apply a simple 0/120/0 rotation but Unreal recalculates the rotator to 180/60/180
Is there a way to avoid this ? I wanted to do an "animation" where it gradually rotates by an angle when triggered
I tried with both World and Relative rotation
Hi, not entirely sure where to post this.
Does anyone know of a way to avoid having to rotate decals by -90 degrees on the Y axis to align with meshes that have Z up? (the floor)
It's really frustrating having to deal with this when scaling blueprints with decals non-uniformly 😦
most likely, no since rotation is stored as rotator which may do weird things
also is your initial rotation really 0,0,0?
If I am not mistakened, if you repeatedly set Relative rotation on the same value it will rotate constantly.
yes it is 0,0,0
So it wouldn't matter if Unreal recalculates it
they are setting the rotation, so there isn't even interpolation going on here
Breaking it up is more scalable.
You can either manually input a combination of box, capsule, and sphere collisions in the skeletal mesh's physics asset that roughly conform to the skeletal mesh, or turn on the "Enable Per Poly Collision" box under Skeletal Mesh -> Advanced. Per poly collisions are very expensive, though, so I would only recommend it for low poly assets.
Input/Outputs on the function
ideally I want to use a lerp to have a smooth rotation, but applying 120 again would not make it rotate
apparently it only recalulates for X/Y , incrementing on Z is fine,
I think i'll just rotate my initial mesh and use Z 🤔 , weird but might work
no I mean, to create an actor and as a one of the exposed variables to have one of type function that I can use as a callback later on conditionally.
I’m not understanding you. Give an example scenario?
Sure, in my game there is a tile system where some actors would exert influence on them, meaning, the tiles will be marked in a way that when other actors exist inside such tiles, something should happen.
Sort of, the actors would listen for other actors when they put a foot on specific tiles.
Sounds like Binding and Event Dispatcher
Yeah I've read a bit about that, it sounded a bit convoluted, passing a function as a parameter looks cleaner. At least thats how I implemented it in my previous engine.
So I was surprised when I didnt find a way to have a variable as type function.
maybe in C++ is possible?
Never heard of a variable with such a Type before
its very common to have variables of type function.
Well personally I have never came across one, can’t help you there
The closest I could think of is having a dispatcher call and trigger the event on the other side
yeah Im not very familiar with how dispatchers work, maybe I should look into it
are they related to delegates in any way?
The Dispatcher can always carry an input to pass itself over to the Binding side
Delegates like in Unity? Yeah probably similar
no in-engine.
I did a bit of reading up on Delegates, it may sounds like what you were actually looking for
quick question, i realised counting every tick up by 1 makes the result vary, but if i have:
every tick: variable = variable + delta time
will it count the same in every device? (like after 10 seconds the value will be the same not depending on frame rate)
yeh
Yes, DeltaTime is meant to take out the tick differences
alright thx
I'm making a game where you play as a mosquito and I want the player to be able to land on various AI creatures (humans, ground animals, birds, etc). I want all creature types to be able to move around the environment and change their behavior if they become aware of the player.
I tried making the first AI creature a Character BP to take advantage of CharacterMovement, but the mosquito was unable to walk on it... I think this because of the properties that Characters come with by default? I also tried making a basic Pawn BP with the same skeletal mesh and was able to walk on it, but I can only use FloatingPawnMovement on that BP, which is much more limited in functionality.
Is there a way to make it so my mosquito can land on a Character BP, or do I have to find a workaround with the Pawn BP?
try the "Can Character Step up on" setting in the actor blueprint of your character
set it to "yes"
why my while crashes my game?
so do i need to connect something to the complete?
I tried that, no luck 😦 I set it so the capsule isn't blocking the player pawn at all, and the mesh can be stepped up on, but I just keep bouncing off of it
hey guys why would loading game from slot cause unreal to freeze. doesnt crash just freezes up.
The mesh has properly configured collisions from a physics asset btw
Are you async loading or sync loading?
sync loading, but it should be fast to load this is the totality of the stored variables
It does sound like something is holding up the load time
maybe you got to change it in your mosquito, too
Maybe try with a async load
But if it freezes the blocking load entirely then async will just hide that issue, probably
I assume you mean it freezes completely, not just hitches?
yeah, cant click or do anything. havent tested past a minute if it unfreezes
Ah okay then its an entirely different issue, I assumed you mean a minor hitch
im checking if it exists to see if thats the issue, made sure all the variables have default values...
You're sure it's the loading operation, not some processing you do afterwards?
absolutely just the load game from slot node. removed everything else
huh!
And you're not opening a new level or anything in the process?
Sounds strange
Neither the Load from Slot nor any casting done afterwards should cause it to freeze.
Is everything pure Blueprint?
Could it be I/O?
just checked nothing in the widget was causing it, not that either
If something is preventing unreal from accessing the object on disk I guess that could result in some strange behavior.
i did move some files around recently, could be that i guess but i cleared all the saves and made a new test one since then
Hm, sorry, beats me -- sounds like nothing I've encountered before.
Maybe try remaking your SaveGame object from scratch and making sure a new copy exists on disk.
where would it be stored in saved folder?
SaveGames, I believe?
yo guys, how do i make it so it restarts the level whenever the character falls into the void?
Easiest way I can think of is to a) Teleport the player back to spawn, or b) Open the level again.
Depends if you want it to be fully from scratch or persist some of the level state.
yeah i wanna open the level again, how do i do that...
Open Level (by Name)
I have a character BP and a gun BP - I want to keep all the shooting logic of the weapon in the gun BP. The gun BP is a child actor component of the character BP. When I put the IA shoot event in my character BP, it works fine. But when I move it to the gun BP it does nothing. I tried to create a "shoot" function in the gun BP so that I can call that in the character BP, but it's not showing up. What am I missing?
I would advice against using the Child Actor Component for starters. That is the general recommendation.
For ex-Unity developers it often feels like a "prefab" substitute, but it's janky and causes issues.
The reason being that it's not really a blueprint in a blueprint -- rather a component that spawns an actor and attaches it at some point.
It is much better to spawn the actor yourself using the Spawn Actor from Class node and attach it any way you want.
The reason the "shoot" function doesn't show up may be related -- when you get a reference to the Child Actor Component, you're not actually referencing the Actor it has spawned -- only the component itself.
You need to use some node to actually retrieve the Child Actor. I believe it's called something like GetChildActor or the likes -- it's been a while, I don't use it anymore.
Yeah it’s get child actor but like you said, CAC is caca
Also the FPS template shows you how to use a regular actor component for a gun
It seems I needed to set both the capsule collider and the mesh of the human AI to "Can Step Up On," even though I'd told the capsule collider to ignore pawns so you can fly onto the mesh. Thanks for the help!
goddammit i didnt think to check there. thanks!
does loading from a slot crash if you do it within a function?
did it directly from the widget and it works
It certainly shouldn't!
Where did you do it previously?
Hey peeps,
Need help with something that I honestly can't explain at this point. I have a cube (test object) which has a tag of 1 on it (for testing) and has collision of block all. I have a pawn camera actor that I posses (unposses thirdpersoncharacter and then posses camera). Whenever the line trace from the camera hits the cube, even though it has the tag of 1, it doesn't set the text in my UMG and I've no idea why. Might it have something to do with the fact that it is casting to the UMG on an event tick through the line tract code and its just crapping out or am I missing something here?
Something I've just noticed as well, if I leave it for a minute or so it does set the text but there is a delay for some reason even though there is no delay node. It takes a few minutes but will then set the text. WTH is this code doing XD
No idea, you didn’t show all the relevant code, you’re talking about “casting to UMG” and I don’t see any casts
Sorry. Should have set "get all widgets of class" instead. 2nd image.
Use breakpoints and step through the code to see exactly what’s happening
did that. everything gets executed and it still doesn't set
i just re-did it incase and noticed that it gets stuck between 2 nodes
it switchs back and fourth i'm assuming cos its on event tick
so its not actually getting a chance to proceed forward now
Stuck between which nodes?
Unless you're doing async logic, which I don't think you are, there's no possibility that the code "doesn't have time" to finish.
Code and Blueprint graphs always finish.
between Character Details execution node from the get all widgets of class and the character details custom event.
So last node in 2nd image and 1st node in 3rd image.
Then that would seem to imply the Get Widgets of Class node returns nothing.
Are you sure the array isn't empty?
Would a cast to the UMG widget be more suitable in this situation over the get all widgets node?
Honestly I don't know where this code is running.
Image 2 is a pawn actor. Image 3 is a UMG Widget
Then you should definitely retain the UMG widget you created previously (as a variable), rather than attempt to fetch it with that node.
OK. I will try that then and see if I get a different result.
No difference.
This is so weird
Is this the only place you're updating the widget text?
Or have you used Binds or something?
There's a SetText function.
Better to use SetText in this case, because binds update every tick, which is unnecessary if you have a good entry point (like your CharacterDetails event), and don't need it to update every frame.
Might not be the issue, though.
Again, step through your code and see if everything is valid.
Add some DebugPrints to see if the various parts are even reached.
Anything in the Output log?
Nothing in Output log.
I'll keep playing and hope for the best
I might just create a new widget with just a simple text in it and just see if that pings. If not then i'll try some other things
Good luck!
Might it have something to do with text being text and the variables I'm setting being strings?
Probably not, but I would replace the mysterious Bind functions with intuitive SetText calls if I were you.
Then I would also suggest having those character details be text instead of strings, because pretty much all user-facing text should be Text.
Has anyone set an animation blueprint in a datatable and then pull it from that datatable and set it to the skeletal mesh in a character blueprint?
I will make the changes then
Hey guys. I’m trying to get the enemy to chase me when it sees me, and keep roaming around when I hide from it’s sight and it stops seeing me. However, it’ll only do one or the other. If I leave the End Overlap(LineOfSight) connected and the BeginOverlap (LineOfSight) connected, it’ll completely ignore me even if I’m on it’s line of sight, however it DOES detect me as the “I see it” print string shows up, it just doesn’t chase me. If I break the pin link from the End Overlap, it detects me and chases me, but it won’t ever stop chasing me even if I’m out of its vision (line of sight). The behaviour tree also won’t switch branches. I’m still very new to unreal and I have no clue of how to fix it, I’m kind of going insane! if anyone knows what’s going on and how to solve it please lmk.
guys how can i make a simple zoom effect on my camera changing the fov?
a gradual transition
I made the following changes as suggested (stopped for dinner so took a while XD) and now I get this in the log so there is defo something wrong when it tries to get the info from the data table lol
What do I use for this since my begin play is already being used for something else?
Heard of the sequence node?
Very useful
I haven't
It's useful for splitting off events from 1 event but make sure you put things in the right order when using it.
So it splits it in 2?
Thank you
When overlapped with another actor, the StaticMesh fires off, but the Box Collision does not. Anyone able to shed some lights?
anyone know how to get an autoscroll to do the extra bump at the bottom so it doesnt cut off in a chat window?
like it auto scrolls down but its like the offset is wrong
how to set up invulnerability?
when character is hit
this is from my character
and this from enemy
i tried the bool but how do i change the flow
what flow
where do i set the bool to false and where to true?
yeah but where do i set them manually?
how does your character get invulnerability?
its a skill or smth?
you set it when casting a skill
on button press or custom event
he doesnt have anything,thats why im asking
so first you have to make a way for it
or just do it on button press or smth
its up to you
ok,i have an idea to,disable enemy collision and after x time to enable it
i changed my mind,i will disable player collision
holy shit ,character fell throw the floor😂
How can you set a variable of a child actor in a BP?
For my example I have a blueprint called "BP_floor" and that bp has a child actor component called "LavaFloor" , I want to set the variable called "LavaDamage" .
I want to set a variable that resides on the child actor component in game via nodes , but unsure how to access that setter.
cant find the right thing to plug into the target of the set node
when i try to plug in the child component i get this incompatibility message
omg,its so simle ,just disable and enable collision channel
thats it
lmao
no need of branches
guys is there a way to make the mouse cursor exit the screen?
or like make it move infinitely?
set show mouse cursor disable
not really what i need, have you ever seen the amnesia game item system?
where you can rotate the item in front of you
when you need the cursor
set game mode to ui or game and ui and show the cursor
when you dont need it
set game only and hide the cursor
my cursor is always hidden
the main problem is that it stops spinning when the cursor reaches the limit of the screen
solution
well i am not that good to help you,hope others will help
no problem, thanks anyway
Why in the world is this not working? Works fine on every other blueprint
That's the solution! But I wonder if you won't encounter issues if you continue working with Child Actor Components!
Unfortunately it's not very good
A lot of people end up using it to replicate Unity's prefabs, but Unreal's CAC is a very janky thing.
The reason is that it's not really a matter of nested blueprints -- a CAC is a special component that spawns a Actor and attaches it automatically.
I'm aware of an actively using GameInstance and GameMode, but is there a way to create effectively "sub game instances" that can house grouped bits of logic? E.g. a specific game instance manager for certain bits of logic, rather than dumping it all into one massive game instance?
I could throw XManager actors into each level, but its just a bit annoying to have to do that
But because you don't handle the spawning yourself you're at the engine's mercy for a lot of things. The spawning template thingy is very strange, for instance -- and if you want a SaveGame system further down the line, it's very common to run into issues with your CAC:s (because they're not persistent).
Subsystems, I suppose.
I've never created one myself (used a fair few though) -- and it's C++ only.
how can i move a pawn from within my level blueprint? I've tried making a reference to the pawn but it isn't responding
Yeah I was worried it'd be C++ only :/ - any other alternatives you can think of?
I was thinking of making actors and just spawning them at runtime through my gameinstance
Using the GameInstance and not worrying about logic grouping!
Create some categories and be merry!
fair enough, I will throw my worries aside!
you've given me the confidence I needed to thrive haha
Haha I'm the same way, I love the idea of some managers -- but I surrendered to convenience.
Yeah. I guess one thing that's nice about distinct managers is that I could have some little helper BPs that say getFunkyManager, or getCheekyManager, and then only be able to call specific bits of logic on each
this way anything is possible, but alas categories is probs fine
You can use actor components and place them on the game instance or game state.
The game instance can't have components, can it?
How?
At least not via the BP editor -- maybe again C++?
The component route was my first idea but I could not work out how to (assumed it wasn't possible)
When you create a new BP select actor component. Then just add it as a component as you would in any other BP.
Edit: it might just be on the game state though.
But I don't believe the GI editor has the components field?
I'm talking about the game instance here though, which isn't a typical actor/BP which lets you add components
no matter to what value i set the move speed variable, my newly created cube on this blueprint moves at the same speed, can someone tell me why?
what nodes do i need to connect in play and reverse?i want this lerp to repeat in loop
i thought about tick and 2 custom nodes
but i think thats not it
You can probably get away with using the game state which you can add an AC too.
Just a little extra unsolicited advice! It looks like you're maybe creating a whole boss arena in one Blueprint? In a Unity prefab that'd be a good approach but Unreal's Blueprints are meant for smaller (single-purpose) things. Many interconnected systems like that are better suited to place in the level directly and reference together instead. If you want to be able to duplicate the Arena (drag 'n' drop style) you could look into the new Level Instances system, it's a little closer to Unity prefabs IMO, although still has some annoying limitations.
is game state persistent between levels, like GI?
No, its created when the map loads.
go on, give into using the game instance
not enjoying the scrolling though 😂
this does not work
What are you needing to persist between levels that can't just be stored in a save game object?
haha ouch but you can at least collapse the categories!
@dark drum how can i play this timeline constantly?what play and reverse events i need?
I don't see any reason that shouldn't work.
cuz i used to make timelines with triggers but now i dont need triggers
Make the curve so it goes from 0 to 1 and back to 0 again in the timeline itself so there's no need to reverse and then just set it to loop inside the timeline
it does not loop
Tick the diamond with the line next to it and call play on the timeline.
Nothing seems to want to fit in task owner, so I'm really confused right now
also no
Hi all -I have a simple one that I'm sure I am making way harder than it needs to be. I have a float value (call it health) that is being set by a for loop every second. So at second 1 , Health = 0.1, and second 2, Health =0.2 and so on. I have this linked to a widget, with a progress bar displaying the float value. How would I smooth out the progress bar, so even though I am only calculating the float value every second, it is being displaying every tick, with the values interpolating smoothly over the duration. I assume It has something to do with every tick @ 30 fps will mean need to update the value 30 times per second, or there is a function that will achieve this?
Use the finterp node to set the percent on the progress bar.
Thanks for the quick response. This is what I was trying, but clearly I am doing something wrong... 😄
It looks ok but if the target does change, you might need to use the constant version for the finterp.
What are these managers?
I'd make components on GameState probably
is there any way to change post processing of a camera with blueprints?
like depth of field
Just bits n bobs. Sound manager, manager for specific groupings of stuff that I have in my game, etc.
Yeah a component on GameState or GameMode is what I'd do if Subsystems are out of the question
Well... now you put it like that, thanks 😄
and put the speed to something non zero
the speed is in percent per second
er
it would be if this was finterptoconstant
the speed will be faster the further away it is with FInterpTo
FInterpTo = Constant Time to get there, goes faster the further away it is.
FInterpToConstant = Constant SPEED
Ok - this make much more sense. I thought it was "how many ticks to get from A to B"
It's how many ticks to get halfway from A to B or something like that. If A and B are further apart, it'll take the same amount of time
the constant version will change Current towards Target at up to Speed
Awesome - thanks for clarifying
FInterpTo = Ease In
FInterpToConstant = Linear
Hello, I needed help with this blueprint related to player stats. I was following the tutorial linked below and he started using a Dynamic Material for his HUD images, like the health, thirst, and hunger. But I was just using a background and filler image for my HUD. So I got to the part of 31:42 / 38:07 in the video, but I was not sure what to connect (me not having a dynamic material). What should I do here so that it updates? He puts Update with Value, but I don't have access to that node because I'm not using a dynamic material. Any ideas? If it's a complex process, is there a tutorial out there that allows me to create stats, via a component?
https://youtu.be/M6feAf2Qh1o
Part 1 of creating a component for Character Stats. Displaying HP, Stamina, Food and Water
!!! NOTE: This is not a begginer tutorial. I expect you to know the basics of Unreal Engine 5 and will not describe every step of creating a system.
!!! NOTE 2: Character Stats system is a complex system, that's why we can have some issues and bugs, and ...
Hey guys! I've been looking around for a while for making a randomly generated map, with premade meshes for the rooms (to make the generation more strict), but the tutorial landscape for this is non existing it feels like, any advice?
Anyone knows about smart objects?
guys i moved playerstart around and now this happens, what do i do
Would anyone know how to create a dynamic widget that looks something similar to this? Intent would be to input from a blueprint a start date and end date and the widget would automatically size, show each month etc
For stats what better; To put stats in functions in the characters BP, or to put them in a component?
What if its just for stamina, hunger, thirst, and health?
I probably wouldn't bother making those components unless other things need those
If this was for something like a survival rpg, i would be handling all of those through GAS
otherwise on the character
What if its for a survival type game?
there's a difference between a general game with survival mechanics, and a survival rpg
the latter being incredibly more complex, and something you'd likely want to use GAS for anyway
Whats GAS if you don't mind me asking?
Gameplay Ability System
it's the engine's framework for using abilities, which often affect things like health and whatnot
as to whether you use it or not, it depends on how in depth you want to go with things, and whether you plan on shipping the game
In what scenarios would I use functions for stats and components for stats? (Sry im kinda new with the stats stuff in UE)
Components are really for when you want reusable behaviour.
If you weren't using GAS, but has other things using health, you could slap a health component on whatever, and have it handle health related things for you without needing to remake it. having them tied to the thing itself as just variables is more for just occasions where you don't need to repeat anything. I.e. I know for me, only the character would have thirst, so I wouldn't bother doing anything component based
Just to clarify the part toward the end, you mean if I only want those stats to effect one thing I should use functions?
You'd be using functions in any case. The important thing here is making it modular or not.
If it's only affecting one thing, just tie it directly to the class. If it's going to be used in many places, you may want to consider extracting it into something like a component
What would you recommend for a beginner with stats and survival aspects (stamina, hunger, thirst, health)?
Either are fairly simple and good to learn..
Id start really basic and play with them on the character while you're learning the ropes. but for a game you want to release and have a chance at doing well, look into better design practices
You won't be making anything complex at this stage, so go with the simplest route of just making each of them variables, and adding the functionality in the character
Awesome, thank you! Also does adding lots of functions within a character affect performance?
Not really, there's far easier performance gains than that.
Always make sure to profile your game though. That will let you identify the main problems slowing you down.
(Also remember if a function gets too slow in your game and you've done as much as you can to optimise it in bp land, c++ is much much faster)
The main issue with adding tons of functions is readability
It can be quite hard to alter things and find what you want
You think in UE5.4 they'll fix this? Or add better performance?
Thats not an engine issue, it's an issue with the way you've made things
Ohhhh, I see!
yo when op fixes his problem can yall adress me then for a sec
Thank you for your help!
Imagine it like covering your desk with 10,000 pieces of paper. It wouldn't be the desk's fault you can't find the piece you're looking for :P
XD Thats a good way to put it!
Do you recommend any good ways to learn BPs in UE5?
The pins in #ue5-general, after that just keep making things
Awesome, thank you!!
(and avoid bp structs)
You'll know what that means when you come across it
hey can you help a extremelly noob fellow for a sec
Only thing I can suggest is delete and re-add it.
There is little reason that should be doing that, and it might be a case of a somewhat rare engine bug
Alternatively ensure basic things like a valid game mode setup, the player start is in a good place etc.
Ok, thank you so much for your help!
Failing that, give the engine a verify
ok thx a lot imma try that
No problem! Good luck on your journey
Thank you!
yeah this is embarassing but may i ask how you re-add stuff??
This currently works with pickup interaction, how would I add physics though
Simulated physics on the world model didn't work nor does it really make sense since it'd probably just fall out of the origin of Pistol_Pickup anyway
Unless blueprints themselves actually have no transform or any locational data which seems to be the case and I feel extremely stupid for not thinking about it until now
But my point still stands, "Invalid Simulate Options: Body (Pistol_Pickup_C_0.ItemMesh PistolCombined) is set to simulate physics but Collision Enabled is incompatible"
I have a pretty advanced question. Is it possible to live update the numbers this blueprint displays? https://blueprintue.com/blueprint/iszyq3h7/ I want it to add any numbers added together as long as the particle system is still active. If I was using plain text such a thing be easy but this setup is a bit beyond me, tho I really love the looks of it compared to normal text.
What do you mean, re-add stuff?
Did you delete something and want to undo that?
You're talking about a rolling total, like damage over time but continuously updated as damage is applied, yes?
like you take damage right on top of each other while particle is still active. Instead of spawning a whole new system I want to update the current one with the new total of the old and new added together
Yes basicly
Could someone help me with my objective system i followed a few tutorials and then tried to have a crack at it myself its not updating it?
Is there any more to it? Like, what feeds into this? It's taking values from somewhere. I have an idea but not sure
What's it's doing vs what you expect it to do?
This is my current setup. As you can see the numbers overlap two 12s right on top of eachother
Just the numbers
You'd need to manipulate how it's called. Cause each call is gonna display new numbers. Perhaps have the total collected and then fed into the function after a half second delay.
Can you record a short clip showing me how they spawn?
I'm on Mobile so can't recreate it right now
Yea thats what I thought I'd have to do
Was hoping to update it live because I think that be cooler
its not updatin the text
Naw I have it auto destroy
What is that little note on the cast node?
Right, but what if you had it destroy on receiving new input and the new input be the new total
its just saying im already casting to the object
Well, try removing it if it's a redundant node
Then it be the same as what I have already
Didnt work and got this error
do you need the numbers and Niagra systems?
perhaps
most of the time, when I see issues where on screen text or prompts arent updating as expected, it has to do with the desired value either not being captured/stored/called correctly or not being passed at all.
any suggestions?
what you can do troubleshoot this is either recreate the BP from the tut you followed and look at whats different or start using print nodes to see where it breaks
personally, I have multiple monitors, so I just put the editor on one screen and put the player on another and watch the nodes fire in real time while I play
i think my puzzel isnt calling the update correctly
try what I suggested if you have two screens. otherwise just put the windows side by side on one screen
when the text is supposed to update, you can watch the nodes to see if they are being called and firing correctly at all
wait did you upload the project?
eh not really sure I can use this but let me see. I dont have a dummy project. one sec
would there be a way to connect an actor with a connection point to another actors connection point after the game starts?
or what would be the best way to do this
For somereason this works?
I understand if you have a fast internet 😛 https://github.com/LordMaddog/DarkSouls-Like_CombatSystem-UE5
oh ive got gig speeds. fast aint an issue lol
im recreating it
ok
straight forward and simple
sockets?
alright
should i just add that to the puzzels code
hey, I'm messing around with the starter content. I deleted the C++ parent class of a BP, created a new C++ class, and decided to reparent it, but the BP with the original class can't find my new C++ class
the weirdest thing is that, if I create a new BP class, I can see my C++ class just fine
(name of the new C++ class is FirstPersonController)
yes. Once you have the system working and functional, then you can expand on it.
I've also noticed that list is a different size (~200 items on my new BP, and ~400 items on the old BP that can't find the new C++ class)
careful doing this. you can brick your project. for some reason, I get the feeling you copied code you found online, am I right?
I didn't copy code online. I'm copying code from the starter project if that makes sense (I'm just re-writing to see what the functions are)
okay, yeah makes sense. there is probably something thats tying them together. why do you wanna use the default bp with your new c class? if you can create a new bp, then why not just use that?
yeah, I can always make a new BP. I wanted to see how easy it was to recover from stuff like this
to me, it isnt. rooting around with default classes and stuff, esp the c++ stuff, I usually leave alone.
Or at least, create children of it to play around with and leave the default base stuff alone.
that way if I mess up, i just create another child class
It gets right there at the red then it stops working?
something to do with the cast then.
where does this code live? is it inside the FirstPerson BP? or somewhere else?
yes but the thing that calls it is in a seperate thing
got it, so it's generally not easy to recover.
I'll commit my changes before messing with it next time so I can revert if things go bad
lol yup thats the safest thing to do. good thing about the starter content is you can just reimport it into the project without messing much up.
alright, i got it working like you have it. slick system. so the numbers just spawn to the right of the original numbers. lemme try getting it to update
Cool
alright, I got a solution, but I dont know if youll like it
you basically need to split your niagara effect into two systems. one to spawn the number and the other to do the floaty thingy
then plug them both into a sequence node.
the first fires and puts the number on screen, totalling up and all that jazz. after a set delay (pause between attack), the system destroys and the second node fires making it spawn the numbers and floating them away
how good does it look?
if you time it right, you can make it seamless
oh i didnt make it lol thats just what I came up with. its based on how the niagara system is set up. it handles spawning the numbers and making them float. I cant interupt it and change the number since it all happens together.
at least, not that I can see how to.
sorry, ui and effects arent my thing really.
Im more about mechanics and getting events to trigger and stuff.
but i gave it a crack
Ah I see you use text then convert to efects
sure, just spawn the numbers like you do right now, but as soon as its destroyed, spawn the same numbers with the floaty effect
that way, you can have it show the total damage (rolling or static) first, and then it floats away, regardless of the number
and if the player attacks just after the delay lapses, its treated as a 'new' attack, adn a fresh cycle begins
I see
thats how it works in my head
to me, splitting the effect into two should be okay since you got this far
could you post the code to past bin?
lol
i need to put a number system into my game eventually, but I leave UI stuff for later. working on my map and design atm.
I understand the principle of what your saying but it would likely take me two + hours to do lol
the effect or the code?
the code
I went and made it a event in bp_firstperson still not working though?
Well both
that means that nothing it being passed to the function when its called
How do i fix that?
Put it before the destroy maybe
ok
but its not destroying the actor though?
still didnt work?
What that event look like? and do a isvalid on the player before you pipe it in and put a print string on the false to see if your player is even valid to begin with
Yea your reference to the player is not valid
how do i make it valid?
how are you getting and setting it?
im getting mission widget and then getting player and then starting the event
no how are you setting the player in the picture where you are destroying stuff
the destroying the actor isnt part of player bp thats part of a differnt blueprint il show you i remove the destroy
that player reference is not valid. Also for future ref show as much code as possible if you are asking for help.
so should i just remake it?
No that different blueprint you refer to that is calling the event can't call the event because the player variable you are using is not valid.
so how would i make it valid?
I am working on a project due in 48 hours and need to build a plugin interface for Unreal Engine. I don’t need the plugin to have any functionality, but ideally I would be able to use drop down menus, radio buttons, and sliders.
I understand that programming something built into the interface of Unreal is an endeavor that can’t be done in a few hours. But a better solution might be to use Unreal Menu Widgets, build the menu, then simply open it in a game level.
The problem is, I can’t get the menu to show in the viewport when everything is compiled correctly. Here’s a screenshot of my node graph (is that the right term?) and of the test menu.
I understand you probably think I know next to nothing, which is true, but any help is appreciated.
Cast to the player and set it or pass the ref through to it when you spawn it then set it
you see here I am setting my character/player
you have to get that reference and set it on any BP that is not your player if you want to use the player in that blueprint
?
is the owner of that blue print the player? if not then you need to use get player node
ok
it works
thank you brother
That node will work fine if you aren't using multiplayer but if you use multiplayer you will have to get an exact ref to the player you want
Yeah i havent taciled multiplayer yet
I made a variable with the type as an actor blueprint, I can't seem to edit its default value.
It is best to start with multiplayer and not try to implement later or you will hate yourself. You can ask in #multiplayer chat they will all tell you if you make a game it is like 10 times worse to make it multiplayer then to make it from the start as multiplayer.
not in the project
this
i just meant i havent made a project with multiplayer
Oh okay, I was just giving a heads up. So you don't screw yourself.
all good
Im having an Issue, where I want to check if the mesh is on the Ground or not
and when the game starts its working perfectly. But as I apply Force to the mesh to move it, the endoverlap event still gets triggered, even tho its still on the ground
anyone knows whats up ?
Isn't there a IsMovingOnGround function built into the character movement component? Does that not suit your needs for this type of thing?
technically yes, but this aint no character
Maybe run a linetrace from the feet of said actor for like 5 units and if it touches something then set Is Touching ground?
I'm trying to study the FP template - it says that the BP_Weapon_Component is supposed to be used by the BP_FirstPersonCharacter and BP_Pickup_Rifle but I don't see it in the component list of either BPs...?
line trace would be too thin for my taste, I want the Character to be able to jump even if hes a bit too far from the ledge
So shape trace
but why is begin and end overlapping not working tho ? 😄
Are you spawning this guy inside the overlap zone?
thing is he IS colliding
but after a bit of movement hes not anymore
except for the place where he started falling
wait a sec
BeginOverlap fires once
Not on tick
If you want to check he’s still overlapping getOverlappingActors on tick or on a timer, after begin overlap fires
thats a good point !
imma try that one out thanks
Thanks, that does work !
but now im checking and setting every frame...
Best case for me would be to make this event based
and heres the issue that i was having with the event based system
it is kinda off, cause the end overlap gets triggered, even when moving on the platform and not ending the overlap
Hey guys! I've been looking around for a while for making a randomly generated map, with premade meshes for the rooms (to make the generation more strict), but the tutorial landscape for this is non existing it feels like, any advice?
Can you play anim montage on AnimationShared Character?
hi guys, where do you guys look for information about something you want to implement?? is there any specific good sites for this? for BP of course. Do you just search up on youtube or? Like say for example i want a BP_Character to jump. do i just search up on youtube or do you guys have other good websites?
youtube
asking here is also a great way to learn things
well where does youtubers get their info? do you get me?
pretty much youtube and any discord/forums for unreal
they got it from someone else who taught them. From what I can tell 95% of the tutorials you'll find online are written by someone who is still learning themselves. Expert programmers are most likely too busy to be making actually good tutorials. That includes Udemy courses.
But there are lots of documents posted by unreal as well as unreal programmers
This is where you'll find a lot of helpful unreal engine related documentation. Finally, many things that aren't documented on the website (and there a lot of things that aren't documented on the website) can be found in the actual c++ code of unreal engine
Epic games does a pretty good job of commenting on the code and systems built in unreal
After a while of practice, trial and error, etc. You just start to learn how to do things on your own.
I'm not sure if you can have a randomly generated landscape. However it sounds like the term your looking for is "procedurally generated" levels. I'd recommend searching from there
I have tried that, but someone on reddit said I should look up wave function collapse
never heard of it, are you trying to procedurally generate a landscape, or the contents of the landscape?
like the tree's, where houses spawn, etc.
not landscape, but more like a dungeon
yeah, in that case, I would recommend a sort of tile system for randomness similar to the way dead by daylight does it
You'd make a bunch of different standalone actors or something called a tile, and each tile could have it's own layout, as well as things that spawn inside of it. For example you could have one tile which contains, a chest, an enemy, and some dust particles, a different tile might contain something else... In the code you'd pull a random integer from stream to figure out which tile should spawn in the location you designated.
do they know if they overlap and stuff etc? or is that something I'll have to blueprint in? I saw someone say they do, but not sure haha
Does what know? Usually when making something procedurally generated there's an algorithm you create to ensure what is, and isn't possible, as well as what must be present
yeah realised that it was a stupid question haha
haha, it's up to you to create an algorithm with a strong set of rules to ensure things play out the way you'd expect
goodluck
thats good to hear haha
Unreal has an experimental plugin for WFC just so you know!
Fully blueprint capable, too.
You can enable it from the plugins manager, and there's a demo scene as well to show the setup
np!
It's a little janky but overall pretty neat
I'll try it when I get home, thanks again!
Good luck! If nothing else it's really fun to play around with :)
here's a little city I got out of it
I created buildings with CubeGrid and "taught" it how to assemble them.
The intriguing part here is that it managed to create the road forming a continuous loop around the city just from the simple constraint "a road must be connected to another road"
But the main downside with WFC is that it's not guaranteed to succeed and also is slow. It can fail and then you have to try again until it does succeed.
Might be good to create a large assortment of predefined chunks of map instead of trying to do it live!
ah, found a pic from somewhat later experiments
I keep having quite "unreliable" hit events when being sucked into something. Has anyone else seen this? I have added a video to see if anyone can help.
is there a way to set how many "loops" before turning off or do i need to do my own logic ?
Own logic
ok
What is "Shield"?
Just a static mesh to show the shield
And if the player gets sucked into it, I want to hurt them, but unless I actually forcefully run into the shield, they don't get hurt.
Yeah where is this "Shield" on? The ball?
It just a normal BP Actor, that I have two static meshes on.
Ok I see what you mean now
And do some logic, so the player get stucked towards it and when getting "into" the shield part it should hurt, and but if they shoot the ball they will destroy the shield (None of this is final art if that isn't obvious). 😄
The entire thing is the "shield"
Yeah
With just two components, one that can take damage and destroy it, and one that should hurt the player.
It's probably in the calculation of what defines the "Hit" event
Unfortunately I'm not familiar with this
Okay, but thanks for trying! And I wonder if I should use something else to define it...
Hey guys i have a classic spring arm + camera in my bp caracter to control the camera, and i would like to as in the viewport when i press the midlemousebutton make it that the camera detach from the spring arm and u can move the camera in 2D lik u no longuer orbit around the character but u can move in the 2D space with ur mouse movement any suggestion ?
i just asked chat gpt3.5 he gave me a good answer lmao thats insane
You can have a bool to determine how your inputs are handled. When true, update the spring arm location to move it around. When false, snap back to the starting location.
does anyone know how to make a slow mechanic ive been at it for 2 days and cant figure it out in the slightest
what do you mean by slow mechanic?
like ive got this slime and ive put a trigger box around it and have been trying to make it so when the player enters this trigger area they will be slowed
but only for while they are in the area
howdy! I'm learning to make editor utility widgets. The first goal: a slider that controls the time of day parameter for the UltraDynamicSky which is in the current level. I did the Designer part, but I dont get the concept of how I can access the UDS value. Something with casting I assume?
any help appreciated 🙂
You can trigger a modifier (a buff preferably) that lowers the player movement speed
how would i go about doing this ( Im still somewhat new to blueprints )
In simple term, you just want to reduce the Player movement speed. But how you are applying and removing the effect will depend on how you design your game.
If I'm in your shoes, I would use GamePlay effect from GameplayAbilitySystem
would i find these in the world blueprint or create one in the content browser
GameplayAbilitySystem is what Epic uses for Fortnite game
it's available as plugin but it's not blueprint only add-ons
Are you having problem incorporating the system or you are not able to set the player movement speed to start with?
is it on the marketplace? tho with setting the move speed ive tried using the one already in the base blueprint but it wouldnt let me bring the trigger box into that blueprint
Not marketplace, it's available as plugin in the engine by default. You will need some C++ to set it up tho
Simplest form
- OnPlayerEnter Trigger Box -> Get CharacterMovement Component -> Set MaxWalkspeed to X
- OnPlayerLeave Trigger Box -> Get Character Movement Component -> Set MaxWalkSpeed to NormalWalkingSpeed
this is what ive been attempting but i cant seem to get the trigger box and player move speed into the same blueprint
You will need to get reference to the character in your Trigger Box blueprint
On Component Overlap or End Overlap have a REFERENCE to the actor that overlaps with the trigger box
Cast it to your PlayerCharacter and then you can access the movement component from there
@sharp solar freebie
if you want to make sure only your player character get it's movement speed modified, then cast it to your player blueprint instead of character
ah okay thank you so much ill give it a try now
where would you find the set max walk speed im struggling to find it
MaxWalkSpeed is a variable in the CharacterMovementComponent
ive got these
from other Actor -> Cast it to your Player BP- > From there you can get it's character movement component
Drag from the cast to get the class charactermovementcomponent
if i drag it out i can only set it the get is only one box
not sure what you mean by that
If you create those variable then you are not doing it right
you want the character movement component FROM your Character Class
You should learn references and casting before going further to do any gameplay stuff
- From Other Actor -> Drag and Type Cast (Find Your Player Blueprint Class)
- From the cast return value, drag from the blueprint and type Get CharacterMovement component
the rest is this #blueprint message
What's the best way to rotate something if I don't want it to "snap" to a given rotation, but move to a target rotation at a fixed rate over a set period of time?
interpolate to the target rotation
Sweet, thank you!
hey, is it possible to make blueprint save the content of a variable in editor even if it's not public? I have blueprints that in editor create other actors and keep a reference to them to avoid recreating them, but they only keep the reference if I set it instance editable (which I don't want to since it shouldn't show up in the details panel)
Has anyone ever tried loading a JSON file from Blueprints? I tried using both of these nodes and the result is empty. When investigating the value of the Success boolean output, the result is False. I wish to mention that the JSON is 100% correct because: a) it was exported from a Data Table from UE and b) importing the same JSON back into the Data Table via the editor interface works perfectly, therefore I can't understand why these nodes are failing to load it...
make sure the path is correct
Any particular reasons for not wanting them to show up in the Editor?
they're being modified internally by the blueprint & editing them would break the blueprint's behaviour
it's not really possible to do that
I ended up figuring out how to do it actually
You are sharing the project with someone else?
you figured out how to save actors in the editor on the next startup?
the variables weren't just being cleared when closing the editor btw they were being cleared every time the construction script reran
now it's fine
nvm the variables are still visible, at least they're in a subcategory
The closest thing I can think of is like maybe use a proxy
ty ❤️
Like set another public variable to its value and save that variable instead? iono
not sure what you mean, that public variable would have to be visible too
Yep, but you can probably communicate with the team to not touch anything on that blueprint or something
Wasn’t InstanceEditable and Public two separate settings?
it is, that's why I said I managed to import it in a Data Table via the Editor, using the exact same path, but the BP nodes don't want to do it for some reason...
does anyone know how to get this to work? I want to assign each level a set value of an number, inegter prob, and then when in a certain radius of the sphere collision of the pawn it would play the music of the value the level has assigned (for example Fog Forest = value 0) essentually im trying to get battle music to play when in a certain distance near the enemy and have whatever battle music plays diferentiate depending on the level. Can someone please help lol im so close to figuring it out but im stuck
Hey peeps,
I created a pawn actor called BP_Camera and its intent is to act as a security camera. You possess it, look around and then possess the main character again. I got the camera movement and all that sorted but for some reason it is starting possessed and initiating the following code even though I'm not possessing it. Am I using the wrong code here or missing a tick box somewhere?
hi, is there a way to render only one actor? I'm trying to make an in world jumpscare and want to have the monster do it's animation with a black background
but i dont want to use a video to keep the lighting the same
hi, do anyone know any tutorial or documentation that explain on how to make trivia or quiz question game but through 3d widget not by HUD? i do really need it for my final year project
or do anyone know how to implement this into actor? i tried manually change from HUD to Actor BP but seems function not work well.. but if through HUD its work well
Project Files : https://www.patreon.com/posts/54919594
Today, I am going to implement a simple quiz game in unreal engine. So, this would be able to use for any type of a quiz or trivia style game where player has to select one of the answers from available multiple choices. When an answer is selected, the next button will be activated and playe...
Hey! I was just wondering how I can call a function from a player controller blueprint to a widget blueprint.
hello, how can i do an ai to stop moving when i see it? like scp173 or the colihead from lethal company, they told me to use the:Was Component Recently Rendered but i don't know where to start
I'm attempting to create a platform that periodically rotates towards a random rotation (within a given range). This is the code I'm using to achieve that and it works almost exactly how I want it to but the rotating movement is really choppy, and the speed changes depending on if I'm simulating, playing in the editor, or playing as a standalone game. Particularly interested in solving the choppy movement.
hello. i just have a question if someone could please answer. if you create a variable array that's an object reference to e.g. a pawn blueprint, is the pawn it's referencing automatically added to the array as the first entry?
You need a reference to the widget in order to call a function on it from your player controller. You get the reference in the return value when you use the "Create Widget" node.
I meant ThirdPersonCharacter instead of controller mb
No different. You need a reference to that widget in your player character if you want to a call a function on the widget from it.
Generally speaking, you're better off not having your game logic call into your UI. Your UI can be separate and just read from the actors it cares about, but this takes a bit of thought into how your widgets are associated to anything in the game. So your widget then would somehow need a reference to the character instead, and could bind to event dispatchers that you create in your character.
Check the pins of this channel and look at the "Blueprint Communications" video near the bottom - it's a long one but it outlines how to get references and how you can communicate between different objects in unreal.
You're sort of going backwards - the "Current" value should be getting updated every frame, not the "Target".
Not sure if that'll fix the choppiness.... Also a bit odd that you would use a branch with == 10 in there as that surely would almost never hit due to how floating point math works.
.
That fixed all of my issues, thank you so much. I can't believe I made such a stupid mistake 🤦♂️ 😅
No. When you are creating a variable of any "object" type, then what you're doing is creating an empty bucket that can contain references to multiple objects of that particular type. If you're referencing assets, those can be added to the array in the editor, but anything that needs to be spawned, like actors, need to be added during runtime.
thank you
Very simplified, and probably not your end goal...
On your SCP actor's Event Tick > Was Recently Rendered (plugged into a branch) [true] > halt all movement (set a bool)
Movement Logic > Halt All Movement [false] > Proceed with movement code
thank you
I have this camera that is placed in the world.
And i make it the player camera by using this node Set View Target With Blend.
What if i have more players? Will this still work?
It seems it wont work because its Get Player Controller 0
If you have more than one player, whether in online multiplayer or local multiplayer, this wouldn't be the way. Online multiplayer you almost never want to use the Player Index getters as there's no reliable way to know which player is which.
If these camera actors are replicated, then you may want to consider changing them into pawns, and having the player controller possess them.
so make the camera inside the player pawn itself?
but then thats hard to move the camera
need to move the pawn itself
oh well
The HUD works pretty much just like any other actor, and the only potential difference I can think of is how you call to reference it - if you wanted to use an actor instead of HUD for example, you lose the easy "Get HUD" function, and that means you have to use something else to get the reference to your actor, like "Get Actor of Class".
If you're making an RTS, usually your units are all AI controlled. The camera is your pawn instead.
exactly
so in multiplayer as you said get player controller 0 is not good
so we do by ID?
No, there's no need for IDs. Your GameMode will spawn the default pawn and possess it with the player controller joining the game.
So in your gamemode if you set your pawn to your camera, and have your camera pawn replicated, it should work.
Hi all.
I’m trying to find a way to detect the rate of change with a thumbstick/joystick, similar to unreals built in GetInputMouseDelta.
I’ve tried a method that came really close to working, but it produced unreliable results.
- I created a Vector2D out of the joystick axis’s.
- I got the Length of the new Vector2D.
- Set the Length to a variable(CurrentJS)
- Used a Delay node
- After Delaying, calculate the same Vector2D Length again, and then Subtract it from CurrentJS.
I DO get a result sometimes, but only if I set my Delay value to something between .19 and .1
Even then, it’s not a true reflection of the rate of change, it’s just a subtraction of position values.
Is there some kind of math I could look into? Am I going to have to brush up on my Calculus to solve this?? Am I just missing some critical node that would make this easier?
(I have done an embarrassing amount of web searching trying to find a solution to this lmao)
got it. thanks @dawn gazelle
I need a little push in the back, I've done vehicles before but I'm stuck on an idea.
I want to make a mech that is not a Pawn/Character but a "Vehicle/Actor" so not using the Character Movement because of some reasons but I have no idea how I'd make it move forward/backwards/sideways (input only, rest I can figure out)
i can't find halt all moment, @dawn gazelle sorry for bother you, im making this right? (im seeing a tutorial cuz im new on unreal)
Halt all movement is something you'd need to build
Whatever code you're using to move, you'd make it stop, and prevent it from moving.
oh, ehm... how?😅
First you'd build something where the actor moves towards the player.
Then you'd throw in some code so it stops and prevents moving towards the player when it is recently rendered.
ok ill try, thx
Gonna keep working on this later this evening.
May have found a solution, not sure, we’ll see.
If it ends up working I’ll reply to the post here.
The fuck?
Any more info than that?
- What is teleporting you?
- What do you do when it teleports you? (code)
- How are controls set up? (proper screenshot)
- How are the controls actively applied (code)
how i can make the ai stop when i see it? @dawn gazelle
shiiit @surreal peak i played around VR camera some time ago thats the problem 100 %
i'm pretty sure this is the problem
hello can someone explain me why my character falls from the map and dosent start at the player start when i die before i reach a checkpoint?
when i reach a checkpoint and die everything is ok
Interface question:
I understand at a high level that an interface is just a shared function and in general is more performant than a "cast to". But I'm curious on best practices - specifically, when is it okay to use a cast?
Should I just be writing interfaces whenever I'd cast or is there some general rule that I can follow to determine if and when an interface is more appropriate?
anyone know what i have to do here
nvm got it fixed
well now i have a second problem
i can only die once for some reason
you just created an hardcore mode
lul
ik
it reminds me of my little sister
i honestly think it's dumb not to know how to change minecraft gamemodes
ahahha
Don't use delay
just compare the vector with the vector from last frame (save it)
(Current - Old) / DeltaTime = YourInputVelocity
Don't worry about performance WRT casting, worry about dependencies and general code structure
using an interface implies casting behind the scenes anyway
Anyone have any idea how to calculate the bounds for the OPP bounding box? It doest seem like unreal gives us any nodes to get that
What’s OPP?
Like the local bounding box of an actor. When you use the get bouding box node it gives you AABB box which usually shows up as blue and resises when you rotate the actor to fit because the box itself does not rotate. I need the local box that will rotate with the object.
can you use bp to mass edit a data table? not during runtime just in engine to update the names or another value in a data table in mass
Can someone explain why I dont have a focus part on my node?
packaging a game starts compiling shaders, is it normal?
isn't that 5.x UI? :>
4.26
anyways i wouldn't be too concerned
it may depend on what render piplines you have enabled support for
and eventually shaders for packaged are more optimized 🤷
i also have no clue about it
all the shaders were compiled when i was playing the game in the editor
starting packaging, it starts compiling shaders again 🤷♀️
"focus part" ?
What would be the best way to send which Collision is being overlapped for Apply Damage? I need what happens to be different per what is overlapped (Damaged)?
I figured out the issue
Use the overlap nodes and cast to the class of object you want to check for
But I have a "Power generator" that makes noise when "E" is pressed, but how do i make it when E is pressed again that it will turn off
this is for my third person bp and the first ss is from my static mesh bp
There’s prly a stop #audio node
That was a hint for you to ask in that channel
lol ok
As for the on/off, you can prototype with a flip flop, but switch to a bool w/ branch to make sure it works properly every time
ok thanks bro :)
I'm trying to draw a grid on my UI for an inventory system using OnPaint Override in a widget, but for some reason the grid isn't being drawn. I've done some troubleshooting and can confirm that all the needed information is getting passed into my Draw Line node, but it just doesn't do anything with the information. Any idea what could be causing this issue? Here's a screenshot of my OnPaint Override if that helps!
im probably dumb but i have a widget blueprint and i want to set view target with blend and how can i reference the character actor?
its late and i cant find anything and help would be aprecciated
it was so simple 😭
ive spent hours searching youtube and other sites
then i find some small looking forum that had all the answers i needed hahaha
Im spawning these buildings randomly in the map. Though its not very uniform. Is there a way to make them spawn uniformly?
Hi everyone, I have some lights that I'd like to convert to spawnable but during playtime (not with the sequencer). I can achieve this with Blueprints, but it's quite cumbersome. I have to manually position the lights, adjust the intensity to nice values, and in the end, to make these lights spawnable, I essentially have to recreate the lights in Blueprint from scratch and pass position, rotation coordinates, adjust intensity in Blueprint, which is very slow and time-consuming. Is there any function similar to Sequencer that converts an existing actor into spawnable? If this doesn't make sense, could you please explain why? Thank you.
there's an editor feature for that, but i guess you still have to position them when spawning them again
but at least it would save the settings of the existing light
Creating Blueprint Classes in Unreal Engine | Unreal Engine 5.1 Documentation
https://docs.unrealengine.com/5.1/en-US/creating-blueprint-classes-in-unreal-engine/
get sure to pick harvest components instead of child actors
i think even the first one uses child actors (which are a recipe for disaster)
Thanks a lot Ben, will look into that.
I just saw the video, maybe what I was asking doesn't make sense but the idea was to have less clutter in the Outliner, so image I have a bunch of lights, if I convert them to spawnable, they will go away and only show in play.
I'm not sure entirely what you're after, but Level Instances might be a good option.
You can convert a selection of actors in the scene into an LVI, which you can then clone out into the scene just by dragging it.
I think there's an option to collapse the instanced actors when viewed in the outliner, if de-cluttering is key.
happens after i playtest the game, should i be worried?
absolutely. That would be a crash to desktop outside of the editor
Red = Bad, always fix immediately
Hey helping heroes, Quick question: How do I get to the PlayerState from the actor pawn. Always struggeling with this
Hey all. I am trying to get the red/orange bounding box that is the local bounding box from this object, but the only node that unreal seems to have is to get the blue world space one. Any idea how I can get the local bounds of an actor?
So i want to spawn some instanced static meshes into the world (tiles)
the first is the test,
but when i spawn the tiles in they appear, but i cant find the instanced static mesh component
are they stored somewhere else ? the tooltip says it assigns ownership to the actor this is called for, so shouldn't it appear underneath ?
the only way for me to delete the instanced static mesh once i create it is to delete the entire actor.
(i am createing these in the editor)
from a character or an actor? how is the actor spawned? if its a pawn you should be able to get player state node and then cast to it
Just rmbr to switch that flip flop to a bool eventually
Has anyone set an animation blueprint in a datatable and then pull it from that datatable and set it to the skeletal mesh in a character blueprint?
can i delete the collision of this
so i can walk through it if the tree is upside down
ahhhh found it found it
1 Image: Programming reference to the Collision Sphere in Metahuman
2. Image: Output
3. Image: The same programming, only directly in the Metahuman with direct access to Collision Component
4. Image: Output
2 Questions:
Why is BP_ThePoliceman missing in example image 2?
And why is it duplicated in image 4?
Context:
The variable Conversation Sphere is set via Instance Editable & Exposed on Spawn
The variable GroupNPCConversation is a component added on the Metahuman
It seems that some references get lost during the set of the reference variable ConversationSphere
Simple question, I want to set off code in a default blueprint object class from another class. I got a blueprint interface, but I need a reference to the other class. How do I get that reference? I feel like I should know this but my brain is dead rn.
how to make this string appear as long as i am in this box?
You can probably use the "actor end overlap" event to set a boolean to false
ok thx
I have this flickering issue in my game when I set this actor to hidden
Anyone know if I can fix that?
is it double sided?
what i would do is make it disintegrate slowly instead of flashing it
it's a static mesh
it's either there or not there
and either way i'd have the same issue, the problem here is that the meshes that are out of vision are culled, and they don't reappear quick enough when they suddenly become visible
anyone know how to create a loading screen until level load is done when streaming levels? Prefreable with blueprints only no c+
If it's just streaming levels and not actually traveling you can just show a widget until the callback for when the level is loaded comes back. Pretty sure the nodes and classes involved have pins and callbacks for that
for this part which is get HUD as you mention, what should i replace it with to get input and references of everything from actor class?
can anyone help?
Assuming you've properly implemented that interface in your actor, then you need a reference to the actor that you want to call that interface on.
something like this?
or is there another ways to get references from actor
ok so what node would check for level load completion?
I dont do lot of programming
Something like this, yes... But what you have here is setting a reference to itself, and I doubt that you've actually got a reference to the actor. Look in the pins on this channel - near the bottom there is a "blueprint communications" video - it's a long one but it teaches you how to get and use references and communicate between blueprints.
Is there any function in UE that checks for corrupted blueprint?
Last time I had a corrupted blueprint the only reason i caught on as soon as it happened was because the light settings were bright as hell (it was a custom light BP)
couldnt imagine how i wouldve known if it was a none visual BP
Has anyone set an animation blueprint in a datatable and then pull it from that datatable and set it to the skeletal mesh in a character blueprint?
yes
You are just reading data from data table, what's stopping you from assigning the Anim blueprint
My DT
Could someone tell me why this code produces a "None" value even if I used a validated Get and also how to fix the first error please ?
if you're doing this on a dedicated server, then that's why
dedicated servers don't create UI
I'm not, the netmode is set to "Standalone". What's the proper way to do that then please ?
it literally says "is not local player controller" bud
you sure you doing it in standalone?
I wrote the code in my PlayerController, could that be the reason ?
no, listen servers are allowed to have widgets.
Are you like, joining a game and then creating this hud?
because even if you start the game as standalone, and then join a session, immediately it is no longer standalone
yes
how to properly write my code then please ? Becaues my game won't be on dedicated servers I think but rather on player hosting a game for everyone
check that the controller is local before running the code
should be some node called "is local controller"
or something
wouldn't that make the host of the game not having UI ?
but I need the host to also have the UI
my mans
the host will locally spawn it's own UI on it's own controller, and so will clients
then I'm confused by the error
just check if the controller is local before running the code
local just means it's not networked to someone else
think of local sort of as "does this belong to me?"
which one should I choose ?
is local controller should be fine
player controller is just a child of controller
Like this ?
You can't get the owning player of a UI that doesn't exist
assuming you're doing this inside of a controller class
the true branch will only fire for the person who owns that controller
everyone else, including the server (if the server doesn't own that controller) will return false
so like this ?
yes
thank you 🙏
I have another problem with my "Refresh" button, it always needs to be pressed twice before showing the available session, do you know why please?
well first off all you aren't even using the "On success" pin
that's a delayed node, it could return the results sooner or later
so you need to wait for it to succeed first
You're the GOAT 🙏
lol
Are you good a bit with stuff regarding "Character" rigging ? Because I need help on how to properly set up a character before importing it to unreal 😄
sorry buddy I'm done with unreal source for now. my league of legends game is starting
Could somebody please help me to debug an issue with my movement system? I'm using Set Actor Location with the sweep option enabled. The issue is that the behaviour is quite strange as the player is unable to move through a corridor even though it shouldn't be colliding with anything?
Alright, thank you 🙏
i see, alright i try check it
Hi!
I have a Blueprint class which inherits from a C++ class:
I want to re-parent the Hand Right and Hand Left components with another blueprint class (which inherits from Skeletal Mesh Component). Hand Right and Hand Left inherit from USkeletalMeshComponent.
How can I do it?
Thanks!
Hey , i can't call cast my tool in object class.
I'm trying to make a quest system here, but I can't reach what I collect with the tool in the object class.
I don’t rly understand what you mean. Is the cast failing or what’s the problem
It's not calling this hatchet cast
Wdym it’s not calling it, why are you saying “call cast”
because i want to reach this bool at the left picture
A cast is a type check. It checks if the ref you fed it is the right class and if so lets you access its insides. It doesn’t call anything
So, is the Cast Failed pin firing?
yes it's stop on cast
Then whatever ref you’re feeding it is not the right object. Where are you setting that ref?
You can use breakpoints and hover over the input and output pins to see what object the ref is pointing at btw
i used object parent class of hatchet
I did not set anywhere on that object class
Where is Tpequipref being Set ?
Nowhere
Good, now you know what the problem is.
It doesn’t matter if it’s the parent or the child, provided that the variable you’re searching for exists in both. But you need to get an actual ref to that instance and set Tpequipref to it. You can’t just create a variable of class X and try to cast to it, that’s now how it works
Usually you can get a ref by interacting with the object using line traces, overlaps, hits, etc.. There are other ways but some form of interaction is your safest option
That’s fine, just get a ref to the hatchet and then you can cast
The 2nd to last pin in this channel teaches you how casting and other bp comms work btw, worth a watch
Thank you so much man
Can someone help? I am making an objective system from scratch.
engine saying you dont need to cast using already this ref with this way
With which way?
Define the problem, can’t read the spaghetti 😀
of course. if your ref is already of the type you're casting to, then a cast isn't necessary
i didnt even call the object event
lol
it's like saying
"Hey could you tell me if this car is a car?"
"......"
yeah i now but we just talk this
anyway it does not work man
i set that in event
let me try parent class to set
and then cast from that
I still see no interaction, how are you getting the ref
So far you just used Get and Set together which does nothing
Why this part of my blueprint keeps printing 9 when the value of "MaxHealth" is 19, while "ceil" is supposed to round upward and not downward ? 🤔
I have had this problem for every single time i have made an interaction system with objects?