#blueprint
1 messages · Page 394 of 1
why do you need to call remove all widgets?
you haven't set show mouse cursor here.
also ofc, get rid of the previous logic in your controller class.
Mind you though, at this level I strongly advice not doing multiplayer.
get rid of remove all widgets, you shouldn't be getting any widgets when a level is loaded in.
then add the node set Show Mouse cursor.
You just made a new var named the var
You gotta actually set the correct/ actual one on the controller
drag this pin and type show mouse cursor.
btw yeah, you are totally new at unreal. Don't do multiplayer, advice given at best interest to help.
i understand
would you have any advice on ways to learn? watching videos or reading documentation?
Getting into the fundementals first, like reading / watching "your first hour in unreal".
After that you go after the specifics of what you want to do.
If you are trying to work on gameplay programming, then learn Object oriented programming, get familiar with variables, functions, events, loops, containers.
Once you understand those, you can look at some tutorial. Then try to make your own. When stuck, ask questions / direction. Then research further,
in the end it's all about your problem solving skills.
but I don't have a good problem solving skills so I do end up with a lot of grinding and errors.
thats usually what i do, ive been fixing issues for a week now
and i resorted to finally asking for help haha
To show the mouse cursor, that is the method inside the player controller.
So you need to get a reference to the player controller and call set show mouse cursor.
(Drag from the blue pin).
thats where it got me, i thought it was just a node you can create
you are just creating a boolean variable.
it just a true or false value sitting somewhere in memory.
so ill take you up on your advice and watch some videos, try to understand how it works further.
if you have some breaks, go over the pinned material too.
coldsummer already gave you some really good tips, so here are some sources that talk about those fundamentals in detail:
https://youtu.be/i_7p8-DE15g?si=xisTc0FpifRl3ssV
https://youtube.com/playlist?list=PL2A3wMhmbeAq3WOT7kQ0EGby1YMb0zj5_&si=Ws6KZbhBsR858vZR
Survey: https://forms.gle/9sTgyNA1MMA4Z1No6
This tutorial was made as part of a college project, and I’d greatly appreciate your feedback. After finishing the tutorial, click the link above for a short, anonymous survey that only takes a few minutes to complete. Thank you for your time and feedback.
The goal of this tutorial is to introduce y...
familiarize yourself with these concepts before swan diving in big projects
Hi. Does anyone have good resources on how to do HTTP requests and testing them out locally?
You can just download some plugin from FAB.
Rest API or the like.
Does anyone know a good way to go about making a stationary endless runner? its a minigame and im trying to avoid having it move too much so im trying to use constrain to plane, but it feels like because of that collisions dont trigger properly when hitting something
@frosty heron and @glad schooner Thank you so much for letting me know these mistakes!! I thought it was the way to go not knowing there are better approaches, tysm guys
not a mistake but journey. Most of us have re-done our own system dozens and dozens of times.
np dude! its literally cannon for everyone :) i made the same mistakes too
took me years to get me where i am now and i still learn things as i go
yeee brothers XD i just started and trying to make fun kids game, glad to have you guys correcting/letting me know the better <3
absolutely man. the worst thing any person can experience is technical debt, which is the means of having unscalable and spaghettified code, making it impossible to iterate and make easy changes to your code/design.
learning best practices will make this a thing of the past:)
I want the first person viewmodels to move around depending of where the player is moving towards when sprinting, therefore I need to get "local" velocity, and not world velocity, how can I do that?
you can use the inverse transform node
this will convert world to local
in this video i'm holding only W and the viewmodel still snaps to world coordinates, I feel like I'm doing something wrong or this is not the correct way to approach it
Hey everyone, I'm a begginer and after some time with chatgpt and absolutely no results I decided to join this server 
Can someone tell me what I did wrong?
its probably something small and stupid lol
you should have 2 separated branches for>400 and <=400
Can you explain what you're trying to do? Because your logic here looks like you're trying to clamp something within 800 units of space?
thanks, it moves now at least but doesnt stop at -400
just a simple platform that moves back and forth
from 400 to -400 y
Ah, ping pong. While you could do this with math like this. It might be worth doing this in a timeline where you can affect the curve and duration, even if it's linear.
On top of this, you need to save it's starting point in beginplay, and setactorlocation based on the intended local offset plus savedstartinglocation.
Last part is true whether you timeline or do manual math. Timeline just makes your math handling simpler.
Thank you for help, I'll try to make this using timeline (I have no idea what is is for now lol)
Hi everyone, I've been running into a loading warning in my project that's causing a DataTable's reference to a DataAsset to be nullified on project load. I've tried to pass this by Claude AI but I'm not really getting anywhere with it, so thought I'd come to the experts.
The warning I get in the output log is:
[0078.49][ 0]LogProperty: Warning: Serialized BlueprintGeneratedClass /Game/Blueprints/DataTypes/DataAssets/Ships/DA_ShipBase.DA_ShipBase_C for a property of LinkerPlaceholderClass /Game/Blueprints/DataTypes/Structs/F_ShipSpawnEntry.PLACEHOLDER-CLASS__DA_ShipBase_C_1. Reference will be nulled. ReferencingObject = DataTable /Game/Blueprints/DataTypes/DataTables/DT_ShipSpawnData.DT_ShipSpawnData Property = SoftObjectProperty /Game/Blueprints/DataTypes/Structs/F_ShipSpawnEntry.F_ShipSpawnEntry:DA_ShipBase_59_D43BE50A49110C0EE9FBB28E1695B51C Item = DA_ShipBase_C /Game/Blueprints/DataTypes/DataAssets/Ships/DA_ShipBaseSloop.DA_ShipBaseSloop
I've attached a screenshot of the dataTable setup, and the struct it's based off. I've also attached the ReferenceViewer of the DA_ShipBase data asset
The struct uses a soft references to DA_ShipBase.
DA_ShipBase is a Data Asset with an interface implemented which has functions to get each part of the DataAsset, which avoids me having hard references in many places.
I'm really not sure where to go from here to solve it, can anyone help?
using interface to avoid hard reference only to end up with hard reference.
Thank you - how do you suggest I structure that properly? Should I change those all to Soft Object references or should I change them to PrimaryDataAsset types instead and go deeper with my interfaces?
Would this set of hard references also be the cause of the error I'm seeing?
you can find plenty of tutorials on YouTube. the general consensus is that its something that allows you to smoothly lerp between keyframes, which is perfect for doors, moving platforms, etc
The hard reference is not the issue with your warning. I never come across that so I am not sure.
As for the structure, interface is not replacement for casting. When one object need to communicate with another object, a hard ref is needed.
And hard reference is harmless, the one that cause memory overhead is a hard reference to Blueprint Asset.
So the solution is to create a native C++ class as having a reference to a blueprint asset will cause dependency (e.g loading object X that have a hard ref to blueprint Y, will load Y forcefully).
If your game is small scale, perhaps you don't need to worry soo much about it.
For big project with tons of assets where you need to load them at will. Then you will need native class and work with Primary data asset and asset manager.
also blueprint struct is actually really broken.
Super helpful, thank you and thanks for the link to the blog. It's more what I'm referencing not how - gotcha!
So creating a custom C++ parent class with the specific functions/properties framework that I can then override in BP if needed is the best route it seems.
Declare variables in C++ parent class.
AMyCustomClass->B_MyCustomClass
e.g
Cast / hard ref to AMyCustomClass 👌
Cast / hard ref to B_MyCustomClass 🙅
you don't need to learn cpp thoroughly, just declaring your data type and your blueprint struct in cpp already gives you a head start.
interface isn't a workaround especially as your project scale, you will have one hell of impossible debugging nightmare.
or make a BP parent class
AMyCPPBase -> AMYBPBase -> ASomeChild
myBPBase doesnt have any assets, etc
but can have BP events/properties
so you dont have EVERYTHING in c++
good for adding things trivilally
Just adding to what Cold said, you don't need to strictly create the base class in C++. You can achieve the same thing in BP but doing in C++ reduces the chance of accidentally referencing a large asset such as mesh, materials, sounds etc...
then your BPS only cast to myC++base/myBP Base
same principle without c++ base, make a parent BP with no assets, nothing set
just events/functions you can override
in your children
if the data declared in bp, won't that still cause dependency as you still need to have a ref to the blueprint?
no cause if you use a parent bp
with nothing linking to it
then theres no deps
you can cast all you want to it
lets say
Native->B_Parent->B_Child
B_Child has bool property.
then you need to cast to child cause thats specific, thats no different
if some blueprint need to access B_Child bool property, then a hard ref to B_Child is required. Casting to parent won't do much as it doesn't have the property.
but if you want to not cast child, you cast to parent and put the bool there
for example, ihave MyPawn -> MyPawnGenericParent -> MyTitanParent-> MyTitan
imagine those are all bps
your put shared logic in mypawngenericparent
mytitanparent has titan logic, still no assets, etc
ohhh.
mytitan is where you link all the assets, but you dont ever cast to MyTitan
nor do you access MyTitan
you cast to MyTitanParent
for its specific stuff
this is how you remove huge dependencies and loading 100s of megs of textures/materials
if you never actually use MyTitan
Put all gameplay logic in parent classes, and keep the final blueprint only for assets (meshes, materials, etc).
This avoids forcing Unreal to load huge assets (textures, meshes) just to check type or run logic, which keeps memory usage and load times low 👍``` in a summary
they can override logic
etc, thats not an issue
It does seem there's a misconception that you can't create hard references in C++. You can, it's just not as simple as adding a ref like in BP.
you just never say from your X or Y cast to MyTitan
but you have no assets to load casting to C++, etc
or holding a C++ ref
thats the main issue here
BP's can hold all assets, meshes, textures, sounds, etc
if one BP casts to that, when you open that BP it will load all those meshes, sounds, etc
my old game, loading the main menu = loading the entire game.
thats a very common beginner issue
I think we've all been there. 😅
My player needed in the main menu. then it links to inventory, then link to data table with all the items in the game (no soft ref what so ever).
but i always make a C++ class, then a BP parent class
took like 45 seconds to load, I gave up X_X.
then enforce that casts only go to parents
this is done using our custom validator..
but its a bit "hardcoded"
ie you have to explicity put what casts you want to disallow
at the moment, I've been doing lazy load.
You can do that? 😱
with c++, you can do anything
One of those, if you can dream it you can make it kinda things lol.
we have validators for lots of things
when is the validator enforced? when the blueprint is compiled?
Do these validators on apply to BP when you compile?
I feel like I might need some of these in my life lol.
even as a solo programmer, I end up with some validator.
Anything critical I will need to prompt some warning.
Yea, as systems get big it can be difficult to keep track of all the different aspects so any reminder is good.
required property validator is pretty good
Any sources for making validitors? I assume they're editor only classes that run some checks.
though i think UE has required now?
I used to think I don't need automation either. But I found out I have to manually change like 200 assets scalar param value.
End up with scripted action and everything can be done in one button.
why you no use curve tables
im trying to get epic to take FScalableFloat out of GAS dependencies
Could you not do that with the property matrix? Even if you select different assets i'm pretty sure if its the same name and type it shows up so you can bulk change them.
I don't know about any K2 Nodes,
but if you are making editor utilities stuff and need to prompt warning, e.g when something is null.
void AMeleeDataBakeActor::DisplayNotification(FText& NotificationText, bool Success = true)
{
#if WITH_EDITOR
FNotificationInfo Info(NotificationText);
Info.ExpireDuration = 3.f;
const FName Icons = Success ? FName("Icons.SuccessWithColor") : FName("Icons.Warning");
Info.Image = FCoreStyle::Get().GetBrush(Icons);
FSlateNotificationManager::Get().AddNotification(Info);
#endif
}
Not sure if that can be done for DynamicMaterial.
Do you want to get them to expose the gameplay tag interface to BP while you're at it. 😅
yeah i dont know why thats c++ only
performance i assume
cause calling BPIE or BPNE is a bit more costly
True but I end up having to create my own BP interface anyway to do the same thing. (assuming im in a BP only project)
Thanks for the great conversation. It's made me look more into my references and....
I wish I hadn't 🫠
so rn im working with the 3rd person template. What would be the best way to make my player ignore input commands/ not move and look? Would it be to assign an empty imc?
Disconnect the input events in the controller 🤷♂️
thanks
just call the functions on the controller?
SetIgnoreMoveInput
SetIgnoreLookInput.
dont need to disconnect anything
/**
* Locks or unlocks look input, consecutive calls stack up and require the same amount of calls to undo, or can all be undone using ResetIgnoreLookInput.
* @param bNewLookInput If true, look input is ignored. If false, input is not ignored.
*/
UFUNCTION(BlueprintCallable, Category=Input)
ENGINE_API virtual void SetIgnoreLookInput(bool bNewLookInput);
/**
* Locks or unlocks movement input, consecutive calls stack up and require the same amount of calls to undo, or can all be undone using ResetIgnoreMoveInput.
* @param bNewMoveInput If true, move input is ignored. If false, input is not ignored.
*/
UFUNCTION(BlueprintCallable, Category=Input)
ENGINE_API virtual void SetIgnoreMoveInput(bool bNewMoveInput);```
^
ty!
hey guys I'm making a custom material expression that I followed a YT tutorial for. is there a way to make these circled values adjustable the in node form without coming back and changing the code each time?
i'm not familiar with coding so idk if this is an extremely simple fix lol
Make them parameters on the custom node with the same names as what they are in code, and connect Constants to them.
I'm having an event trigger at unexpected times. Is there a way to stack trace it to figure out where it's coming from if I break on it?
Yes there is a blueprint debugger that shows you the entire callstack
Excellent, thank you.
If you're living in BP and interacting with this simulation API I'm making, how much worse is the bottom approach than the top?
Top approach just wraps the getting of the subsystem on the C++ side.
I'm partial to the top for two reasons. First is that less nodes is always better for simplicify. Second is that as a dev, you should assume your system can change from under your API. If for some reason you ever needed that subsystem changed or removed, your API doesn't need to change, no blueprints change, you simply handle it behind the API. On the bottom, you have to replace a lot of things in any BP that uses this.
Do you know if there's a way to ban C++ from calling top version? Or should I just make everyone route everything through an implicit if world if subsystem tree?
Not fully following why you'd make C++ ban the top?
Just to enforce 1 way of doing things from the C++ side
I'll probably just leave it and maybe comment that it's meant to be the BP API and it's better to just call the wrapped function directly on the subsystem. I'll also have components for convenience so direct calls into the subsystem at all should be rare for most users I think.
I more mean that I'd use the same API in C++. Consumers should always go through the same API.
If I were to trim to just 1 access point in total I'd go with the lower approach then. There might be 1,000 things reading per frame and I'd rather not do that much wasted work so BP has a cleaner experience. Aren't there a lot of systems that have a layer of wrappers just for BP?
Why is the struct data deleted when a new player joins?
I made it based on a reference from an Unreal Engine co-op tutorial video.
You need to use OnRep / RepNotify my dude
What are you trying to do here?
each player to store their own private data
if character class is empty character then player is not ready if its different class than make ready but this works all player slote on check box and selected character image
I want it to stay in its own designated slot.
If you do know widget don't replicate, why are you using RPC in the widget?
use RepNotify as Adriel says.
OnRep_PlayerInfo -> Do Stuff.
I'm not 100% familiar with the program. That's how they did it in the tutorial I watched, so I followed that method.
which tutorial does that? either misunderstanding or another bp multiplayer tutorial that should be nuked.
Unreal Engine multiplayer co-op video. It's from 9 years ago, but it still works; I'm just making a mistake.
I know you can't learn without making mistakes, but I'm really stuck on this point.
Unreal networking communicates through actor channel. Meaning for communication to be established, a server needs to create the object and then have a client to spawn a copy of it.
In the case of widget, widget do not replicate. Meaning the widget only exist locally (in the machine that spawns it).
So it make no sense to send RPC to a widget object as it will never reach the intended target.
@patent zodiac have you went through exi compedium in #multiplayer and wizard tips and trick?
read it at least a dozen times with practices. Then do some small experiment.
once it click, it clicks.
in my experience trying to brute force a system without knowing how networking works will just stall more time in the end.
at the very least, understand RPC, variable replication and what objects get replicated.
<@&213101288538374145>
Hi all, I’m trying to change the streaming method of sublevels in a Master level (always loaded/blueprint) using an Editor Utility Widget blueprint. But I am just not able to get it to work. Can someone tell me if it’s even possible and how/what node to use. I will greatly appreciate your help.
Wait, I can't assign a data asset to blueprint variables?
Or do I have do implement PrimaryDataAsset instead of just DataAsset?
Should be able to just fine. Make sure PIE isn't open. If it is, try reloading the blueprint or restarting the editor, sometimes that gets stuck in recent versions.
restarted editor, still the same. Can't promote to variable and the data asset isn't showing up in selection list for variables
do you have BlueprintType in your UCLASS specifiers?
assuming you've implemented the DA in C++ like you should...
that was it, thanks. Forgot about that
Hi all, I’m trying to change the streaming method of sublevels in a Master level (always loaded/blueprint) using an Editor Utility Widget blueprint. But I am just not able to get it to work. Can someone tell me if it’s even possible and how/what node to use. I will greatly appreciate your help.
Hi everyone. I am an artist trying to learn blueprints more and can't figure out why this is failing.
I have a bunch of blueprints in the specified folder( Package Path). They are all children of BP_TowerSection_Master. I am trying to read those in, pick one then spawn it in a map. The cast always fails. I can print out all the BP names fine so it is reading them in. Or at least a reference to them.
The class of the asset is something else than the Blueprint itself
I think its because you're using 'GetAsset', there should be a 'GetClass' you can call from Asset Data Struct.
Basically every asset in your content browser is also a UObject, similar to what you deal with during gameplay. That UObject, however is a UBlueprint which is more of an editor-related class. The underlying generated class you want for spawning is something else
Ok that makes sense. I think I may need to come up with a different way to do this
It's not necessary wrong the way you do it. Try what pattym suggested for example
Although I think you may want to look into the AssetManager instead of the Asset Registry
That can be set up via the project settings and works similar.
You can probably find docs about it
Reading up on that now. Thanks for the pointers
hey guys! does anyone know a quick and easy workflow for modifying a class default variable via editor utility widgets? I'm just trying to make a button for my team that can switch on a boolean and set an integer variable in a blueprint, but it has to happen before the game is launched
is there a simple way to implement a slide mechanic (including hitbox size change) in 1st person blueprint? all the videos on YT are like 30+ minutes which seems longer than it should be
maybe sliding is more complex than I'm imagining idk
hello, is this how we are supposed to unbind an event emitter ? When my AI senses an ennemy, I add it to a knownTargets array and bind an event emitter to "On Target Death ", and when it dies, it calls the event "On Target Death" and this fonction that is supposed to unbind the event emitter but I get those errors
the BPC_DamageSystem is implemented by all NPCs and the player
If death is called with destroy actor
Then, thats the cause of the error.
and, it'll just clean itself up (unbind wise)
If you wanna play it safe, then call that death BEFORE destroy actor, so that the data is still valid.
Hello everyone. I'm having trouble putting my blackboard key name into Set Value As nodes. Does this look correct?
are you intending for execution to never hit that node?
Yeah, you're not hitting the exec pin it requires.
Ah I did overlook that while debugging something else. So the set value as enum part is working, so make literal name is what I was missing before.
Hey everyone. I did post this on the subreddit, but I'll ask here instead for a more in-depth possible answer:
I’m working on a project where multiple different types of characters inherit from a default character BP.
I also have a skill tree where players (multiplayer option) can skill up their character and unlock new skills. (Like attack A does 20% more damage). Players can effectively change their loadout of attacks as well, which would carry with it its own upgrades via the skill tree.
Initially I was going to make a data table and structures that held the attack data (current attack, base attack, etc) and have that be accessed by the individual player.
However I’ve heard mixed opinions now on it being better to tie the attack data to the actual attack BP? And I’ve also thought about possibly adding an actor component to the default class that handles the skill tree and any calculations based off skills acquired.
In a game like this where players skill are saved and profiles can be used in multiplayer or solo, what is the best/most optimal and efficient way to handle this??
Thank you in advance!
Now it seems like the blackboard keys have been assigned correctly, and the BT very briefly goes into the "Suspicious" branch but exits out again right away?
Oh it's failing to Move To? Probably due to nav mesh
I couldn't figure this out earlier how to make it extend beneath this Character instead of treating it as like the pillars
Hey guys, can someone help me . I want to know if it’s even possible to change streaming method (to always load when it was set to Blueprint in the levels window) from an editor utility widget? I have been trying and not seeing any success. Please help!
Something on that has "CanAffectNavigation" turned on. Go through your primitive components and disable that.
You can, but not entirely with BP only unless there is another way to get the CDO object of a class. If I were you I would check out how to do some editor python scripting to get you the rest of the way there. An AI can usually help you with it if you're clear about your needs. Which is that you need to pass in a UClass and get it's CDO, and set an editor property on it.
ahhh okay, good to know! I was beginning to think it was a python level need. I managed a quick fix for now (directing someone to the sublevel housing the actor in question to use an editor utility widget to modify it's settings) but it's nice to know what the expected workflow is to make this tool operate on CDOs
hii guys i am trying to recreate something close to titanfall2 movement system and i found myself with a problem.
When i slide i want my character use the momentum he gained from the slide when jumping so he could go further but rn for some reason my character kinda stops mid air when i click on the jump. here is a video of that:
Ive been sitting on this problem for like 2h so it would be amazing if anyone could know a fix for that ;3
I am using a physics based slide system that i made myself and the build in unreal jump
If the issue is that you jump too far, I'm assuming that you just need to clamp your linear velocity before the jump call.
Probably just the air friction?
Or, like air braking.
i checked that and the air braking is set to 0 so it should not effect it as much as it does
same with air friction i did check thoes and they are not the problem for what i understand
Oh, you waaaant it to go further. Jump itself might already do some sort of clamp like this maybe that you need to remove.
hmmm maybe how can i remove it tho? i am using the base jump that is built in unreal
Looks like its actually braking friction causing the stop when in the air.
From a quick test in UE.
making it 0 means I loss no speed while falling/ jumping.
hmm yeah it does kinda work! tho its a general setting so it effects everything else
Yeah, sadly.
But, you should be able to just make it 0, while in the unique slide jump state.
(if jump + sliding make it 0
When you start walking again, reset.)
true it is a way to fix it
hmmmmm i will try this thx! tho you think there is another way to do it by any chance?
Could also use the 0 friction, and just use the braking deceleration walking
But, that may mess with the feel of the game too much.
uh yeah i already used the braking deceleration walking haha
that was my first thing i checked ;3
thx again for the help i will try to do a check when doing the slide jump
having an issue with Actor components that I have personally never run into. I have a component on a Text3D and just a begin play and log / print string node that has known text.
I've tried using breakpoints and copy pasting the text to the output log and nothing seems to work as if the begin play isnt firing at all??
The same thing happens for tick, with start tick enabled in the class defaults. I've put the component on other actors as well and nothing. The only thing left I can see is to make an empty project and see if the same thing happens there but anyone have any ideas?
edit: begin play appears to be broken everywhere...
edit2: new empty project does work, probably some stale c++ code in the existing project that broke things? Not too sure at all but it was a testing environment thankfully so nothing lost
SOLUTION promise
edit3: I had a game mode override and the game state parent class was not game state base which apparently breaks initialization
is there something i have to do to be able to set the default value for a vector curve?
i have compiled the blueprint
and also have vector curve asset already made
You're looking for RuntimeVectorCurve, not VectorCurve.
huh, ok
Hi I'm working on an dls(dynamic light system) for my pinball game and I'm having this issue where I'm trying to get all actors individual object names so I can then manage them in my system, so basically when an actor is hit it needs to print only the name of the hitted actor but this is what happens, I use tags for this so I can later easily assign a different score or event to them
There's a few things wrong with you're current setup.
You have a reference (not sure of the type but its an object based one) and you set it to null on tick.
Also, you bind to an event dispatcher on tick. This isn't necessary, you only need to bind once.
You have the branch that checks if the previous property is null but because it'll always be null the branch isn't needed.
Getting all actors with tag isn't very scalable.
In terms of what you can do going forward, you can use the OnHit event on either the ball or the score bumper. If you put the logic on the ball, you can check if the hit actor is a bumper actor and if it is do something.
However, the better approach would be to do it on the bumper instead. When it's hit, it can check if it was the ball that hit it and update the score or what ever else you want to do. This would be more scalable if you decide you want different types of bumbers.
hey guys! any idea why this sound isnt persisting across levels
this is a function in my game instance
it plays the sound until levels switch
and yes, this is set to my game instance in Maps & Modes
Uncertain, I did the same thing in Atre early on for our ambient music which persisted through all of our levels. Only difference here is I unchecked AutoDestroy. And I'm using SpawnSound2D, which is the same thing. SpawnSound2D calls CreateSound2D and calls Play. I did also save it into a pointer. Maybe that's doing something? If it keeps it from collection.
what does your blueprint look like for your slide? I'm trying to make one myself and I tried making a custom one that just sets all friction/ deceleration to zero, and another one that uses the existing crouch + some other logic
but I found that the default crouch system prevents you from jumping while crouched unless you rip its insides out, so I'll probably have to go back to a fully custom one after all
Hey, when continues goal tracking is enabled, the on move finished doesn't work anymore. How can it be solved best? With a timer checking the distance with a threshold?
Got it
With the MoveCompleted Event in the Aicontroller
Hello everyone, Pixel Streaming > Runtime download model > Runtime download texture and materialize.
I'm having some doubts about how to interact with my model to materialize it.
Frontend. User register > controlPanel > upload textures/fbx/glb to S3(StorageCloud)
In game, selectable models and textures
[
{modelURL:URL} > url to download from cloudfront and import in the app
[
(array for many textures, first tell it the id and construct it)
{textureID:#} > to tell unreal where i'm goint to place the material
{textureURL:URL} > cloudflare.url.texture
]
]
At the moment models goes well. the issue cames when i want to work with textures downloaded, works in the 20% of the tries. I think that the issue could came from the download waiting time giving some... overload of many trigger events accumulated duse the amount of sended emmits from the web.
Like a chain of events could be >
model 1
ID 1
Texture A
ID 2
Texture B
{modelURL: 'https://x.cloudfront.net/Model01.fbx'%7D
{textureID: '0'}
{textureURL: 'https://x.cloudfront.net/Texture01.png'%7D
{scaleMesh: '1.00'}
And in my suspicious could be in the contructuion of the materials.
I can't get the player to jump while crouched, is there any way to fix this?
in your characterBP->CharacterMovementComponent->Details->Can Walk Off Ledges when Crouching
That won't solve not being able to jump while crouched. That solves being able to walk off of ledges while crouched.
You can't solve this in BP cleanly, cause the overrides are not good.
Just Uncrouch. Works fine.
Out of curiosity, are you able to test if this also functions on a client?
is this a macro? how do you get the purple return node?
works just fine as client.
This is my ability check... just dragged it there to test (would not keep it there). It's just doing a normal jump afterwards (if char is not dead or not stunned or not, ...).
I made it now, I didn't know about custom functions the first time when I asked lol
for some reason when I hit space with it hooked up like this, it just uncrouches me without jumping
would you know why its doing this?
Ok, so if I use Delay Until Next Tick node it works properly. (*in a macro instead of function)
real question, is this scuffed or good?
I'm not sure. You don't need "Allow Jump" as function or macro (just for that). I just placed it there to do a quick test. You probably even would check your anim BP if it's somehow blending the crouch/jump or if the transition happens quickly.
Greeting. I am going to make a function where you have a flying companion following you, and you will command it to fly to specific destinations on the map. Which solution would be the one to go for? AI, Lerp character, something else? Maybe a projectile?
How do you picture the thing moving, is it effectively walking but up in the air, or actually 3d flying (able to cross cliffs etc)?
Anyone know how to fix this? basically i'm trying to play a sound cue which has random wave files, and i'm running into this issue where the sounds are different for each player, for example while a sound is playing the server and client hear different sounds, and it also seems to change whenever i walk outside of the attenuation zone and reenter, is there a way to fix this or is this just a limitation with unreal? if so should i just switch to fmod or wwise?
The random number that gets generated is not the same for all clients unless you set get and set the random int on the server. Im assuming it also works the same when you leave and reenter the area
That is, Im just assuming the way you call it so idk the backend
ok yeah ill try
Also, doing this as a multicast means if another player enters relevancy or joins after this alarm starts it will not be playing for them.
so should i be using just a server rpc?
you're already doing this as an rpc- a multicast is an rpc that gets sent to everyone. the server is calling a function on every client currently in the game (that is relevant) to play a sound cue. it's a one off though, if anyone misses that command (too far away outside relevancy, not joined yet) they'll never get it. for something that is an going state you could replicate a variable for example; a bool bAlarmPlaying and use that to trigger the sound. players that join or enter relevancy will receive the current state. in terms of design, you should also think about how this is implemented in a game. if this alarm is triggered by some other gameplay event that all players are already aware of- maybe a new replicated variable/state is not necessary and it could be triggered on the clients by that other event- but that depends on your game.
ok thanks
Hi, I was wondering if anyone could help me. I need step-by-step guidance for a game I’m making in Unreal. I have a 3D main menu with a level blueprint, and in that world, there’s a TV playing a looping video. To do this, I’m using a media player, and the TV is its own pawn, with the media player code located in the level blueprint. I also have it set so that when you hit play, the camera zooms in using a level sequencer, which is triggered from the widget blueprint I used to make the play button. After it zooms, I want the TV to switch to another video im really new at this so i dont know if i doing this rigrh if someone can work me through it it would help a lot
this i something i want to do. I haven't figured out yet how to do any of it if someone could help me, I've been stuck on it for days now
Linear, flying. Nothing fancy.
3d navigation is pretty fancy. What should it do if there isn't a straight shot path to the goal?
So not that. I want to make it simple. 3d navigation is a pain the the butt
If you already have walkign just make it be walking but look like flying
on navmesh just up in the air, visually
Just to understand your question correctly, You want to play a different video on your TV when you hit play?
If the main thing that you are stuck on is playing a new video at the end of the level sequence. All you need to do is get a callback on when the sequence is complete and the change the video there.
Check this out https://forums.unrealengine.com/t/how-to-know-when-a-level-sequence-has-finished-playing/360470/8
Hi i got a quick question about line trace issues i am using this logic on tick for a camera to trace a certain component with a tag.. it it finds it it runs a logic. The logic works fine , but after i stop the program i got this error in the editor and i dont know why..
nevermind had to add a is valid node on hit component
Probably because you are using the component without checking if anything was even hit
I need to check two line traces, one for 200f distance and the other for 100f distance, can i make it one? For performance saving reasons
@surreal wagon line trace are cheap. Even if you do it on tick.
Dont micro optimize where things dont matter.
You can also use a Multi Line Trace - but it is a little confusing, because it still stops on first blocking hit. Piercing works only if the other actors have the collision on overlap, not blocking.
Although I always forget the exact result and need to retest them when I try to use it
But yeah, performance between a single trace and two traces doesn't really matter unless you do it on hundreds of actors at once
that's pretty much it. The trace stops at the first blocking hit.
Yes, but it returns overlap hits in the array as well. I remember there was an example for this with a window and blocking object behind it.
yes but stops at the first blocking hit.
Although I myself never found any applicable situation to use it
I did a custom cone trace for that
sure but its just one example
Hello im fairly new to blueprints and I currently trying to experiment with Data Tables. I was wondering if anyone here knows how to set up a system where when I click an object with a specific material it can show the cost of the item as well as the material name. I've set up my data tables and I'm just stuck on trying to get that data to print on a mouse click.
Any help would be greatly appreciated
Where you planning to do a line trace?
Then a modal pops up?
I basically want to build a simple system where I have a cube and if I apply a "Steel" material and if I click the cube it displays my data table information such as the material name and cost of material. All of that information is correspondent with a specific material of course.
If it has to work with absolutely every surface that might have that Steel material, then I'm not sure if that data table is really the right solution.
I mean you can keep it but you need a way to map the row name to the material
Or rather the material to the row name.
Somewhere you'd need a Map where the key is the material and the value is the row name (or rather a DataTableRowHandle)
Might also be worth thinking about using a physics material "Steel" instead of an actual material. Depends on if this is per unique material or generally for all materials that are supposed to represent steel
If it only needs to work for the specific cube, then you could also just make a custom actor that has the DataTableRowHandle and you initialize the material of the mesh from the row
I added a shader variable to my structure not sure of that is what you are referencing.
but I guess more or less the idea is that the shader holds the information, so I can apply the shader to multiple objects and lets say the "cost" depending on shader will be displayed
Be careful with materials and textures in data tables. If you will have a few of them and it is a small project it isn't important.
But DataTables load EVERYTHING they have inside whenever a single row is accessed or the data table is referenced by any blueprint in the game. Materials (or more like the textures in them) are heavy assets. If you end up with tens of materials in the data table, you risk loading hundreds of MB of data that might not be needed - for example when only a handful of the materials are actually active in the level.
So if you plan to have a lot of materials/textures there, look into soft references - but it makes everything slightly more complicated so if you are new maybe just mark it as something to learn in the future.
What the hell is a roundabout doing in a blueprint
are ue4 and ue5 different? (in terms of distances) am i missing something?
right click and write roundabout sequence
it should find it
Distances should be the same. But the hierarchy on the screenshots is different. And since the position you show is relative - some of the components higher in heirarchy might affect it too
did you find it
lmao nice april fools 
😂 u got me
it took me a minute there, i thought I was going crazy lol
I just assumed it is some weird plugin like the electronic nodes 
ehehehe
european bp
they're both 0 at 0
Is anything scaled in the hierarchy the slot is the end of?
no
Then I have no idea
I can say though that the UE5 one looks correct. Assuming default character height is around 180 units. By correct I mean, it looks like 200 units, unaffected by anything else
I have to revive this topic yet again but 💀 when I have crouch/slide bound to LShift and I hold W and try to jump (with the jump override code working), it doesnt jump, but if I do the same while holding A, S, D, it jumps as expected
AND when I switch the crouch/slide keybind to CTRL instead of Shift while holding W, it jumps as expected
So it only fails to jump when holding Shift + W + attempting to jump, no other key combination
??? is this just a keyboard problem at this point bc this is getting increasingly wack 💀 💀
my solution rn is to just bind slide to CTRL instead, but ehh
guys can anyone help me out with ik left hand blue prints my character just reaches doown to the ground instead of holding the hanguard
this is the output
along with this error Blueprint Runtime Error: "Accessed None trying to read (real) property CurrentWeapon in ABP_Unarmed_C". Node: GetLeftHandIK Graph: Gun Handle Function: Execute Ubergraph ABP Unarmed Blueprint: ABP_Unarmed
figure out the position manually suitable to you and then store it and when u equip u can apply that ik values in ABP
For using the get attached actors, it appears that it doesn't respect item label and actually works based off the ID name is that correct? And is there a way around it outside of sorting an array
Do you know what that error means?
Thank you for this advice! I’ll look into a better system. But I still want to experiment with data tables. The idea is I’m trying to translate this in a civil engineering project where I can show the cost of materials coordinated to it corresponding material on a model.
It’s suppose to be a demo idea
Soft references would be just slightly harder to work with but will solve all the performance concerns
And you can use them in a data table too
I dont know if you already made your system
But what you have there is correct
Now you want to add that data table to your cube bp
does anyone know a better way to do this? I'm trying to make it so that, for a short time after jumping, the player continues in the direction & speed they were going before jumping. (I also have 2 variables that store the player's current speed & direction each tick)
Problem is that I can't figure out how to get Set Velocity to use both speed & direction, and i can never get Launch Character to work in general, so I avoided using it
the purpose of this is to prevent the player from losing too much speed if they bump into a corner when jumping, also it triggers on each hit so it catapults them, but thats a separate issue
Can I dm you a bit more about the process if that’s okay? Im such a beginner in blueprints…
hey, the View Pitch Min/Max variables on my camera manager are not clamping my camera's movement at all. it's a third-person game, the camera is on a spring arm with Use Pawn Control Rotation on but Inherit Pitch/Yaw/Roll off. I've tried setting the view pitch min/max after a second of delay as per somebody's weird recommendation online and it made no difference. my camera manager is definitely being used by the player controller class, I can see them in the outliner at runtime
figured it out. the pawn wasn't using control rotation to affect the rotation of the camera boom at all (for other reasons)
just going to clamp the rotation manually
2 General curiosities about anim BP
Given my extremely limited experience with how other devs make there game. 😛
and my general new-ness to the 2 things.
-
When using an anim BP, why would devs essentially make a copy/ duplicate of each var, just for the anim bp?
Is there something bad about just pulling the value directly from the actor/ owner ref? (since I know with threads and stuff that may be the case) -
When using an anim BP, what was the like "planned" purpose for the
asset override editor, to change the anims?
It seems so much nicer, and easier to go set instance editable variables?
Not sure on 2. But on 1. It's because if you manage to fastpath everything, the ABP runs on a separate thread.
Oh, didn’t know that about #1
I just thought function calls messed with the separate thread stuff.
I don't 100% remember but I think any pointer use will too?
Oh, ok.
Yeah, I didn't know that.
I had just assumed, only function calls messed with it.
I'm kinda sure it runs on a separate thread either way.
You could try to change the Dampening and Air Control of the movement component for a while, instead of directly setting the velocity. But I'm not sure if it would work better or not.
For pulling the variables you can override built in function in ABP called "blueprint thread safe update animation" which let's you use node "property access" to get value directly from, for example, your character and set it in abp
hi im trying to add a fallback font due to my original font dont have + - / symbokls
but how do i get it working :/ ?
so you are basically tring to get symbols on your font if I'm correct?
have you tried using this website? it allows for custom fonts for your projects been using it myself https://www.dafont.com/
Archive of freely downloadable fonts. Browse by alphabetical listing, by style, by author or by popularity.
yeah thatrs where i gpot it
oh okay well maybe you could make a custom one in canva and then convert it to a font? that tends to work
you can also do it in different programs
hm bit that sub font tool in unreal isent that suppose to be avble to replace null characters with another font ?
is it for a ui? because if so you can use a font in an overlay and fill in the symbols in the text field
okay good luck
HI so I have this issue I've been trying to fix about having a list of actor refs but only selecting 1 actor based on hit detection. because I like every individual actor to do something different. like for example bumper 1, does a light flicker, bumper 2 something else and so on. any suggestions?
Not sure if I understand correctly. You want to have bumpers with slightly different behavior but work in the same way?
If it is a difference of strength for example - you could just have a struct or a data asset with different settings. And assign them to each bumper depending on which settings you want for them.
If it is more than just number changes - you should have a Bumper class with all of the default behavior. And then make child classes of the Bumper that can override or add functionality to the parent functions/events.
Then you can still refer to them as the Bumper parent class, but they will have their own functionality in the overriden functions
it's for a pinball game and I basically want each bumper to do different things like irl hope that makes it easier to understand 🙂
I would use the second method then. Since they could share a lot of behavior - detecting what hit them, at what angle, adding points etc
The child classes could override a function responsible for the actual bumping if you want them to do it in a different way
gonna share the code with you for this
basically this
Well, why do you have a list of them in the first place?
What you should put in the second screenshot - it depends what is triggering this code. It's chopped into pieces so I don't have a clear picture
this code is triggered by a event dispatch from the main bumper actor
it then goes into the main controller which is for controlling the lights of each separate bumper
If it is calling the dispatcher when it was hit - you should have an input in the dispatcher, and the bumper will pass Self to it. Then you have a reference to the bumper that was triggered, no list of them needed
Also the bumper should control it's own lights, why does it need a controller for it?
since otherwise they all get the same function for each bumper and I want to have different fuction for each one
yeah it's adifficult system to explain I know
maybe you got a better idea for this?
that isn't that complicated?
Sounds like the composition thing I mentioned, with the screenshot above
You make a parent Bumper that handles most interactions. And child classes of it that change what you want - like how they react to hits or use lights
omg why didn't I think of that before of coures :/
In the game you place the child classes depending on where you want each one. But since they inherit from main BP_Bumper class and only override functions, you can cast all of them to BP_Bumper and call functions through that
yess and then you can do different light settings for each one am I correct?
Yup
okay gonna try that thanks
Light settings could be done with a data asset/struct if they are only data changes and not behavior changes
In this case you wouldn't need separate classes. You can set the settings as Instance Editible in the details of the variables. And change them on each actor placed in the level individually
If I'm not mistaken, been a while since I've messed with fonts, you need Support to be named Default
nah that dident do it, but its ok ive solved it with a workaround
I have a skeletal mesh component in a blank blueprint actor, and I do Hide Bone by Name, but nothing happens.
The function only works for Character Mesh in the Character class.
Have you tried calling it on BeginPlay instead of the construction script?
no
Hey folks. My head is wrecked trying to get a double door to open and close on pushing F key. Using U5.6 .
If anyone can spot whats wrong with my BP stack please let me know
Need context of what the problem is. Is nothing working, or is something woeking incorrectly?
If nothing is working, the first go to is to ask if you've enabled input on this door actor.
As in checking if those overlaps are running.
Well I have a few problems, First thing is regardless where I am when I push "F" on the keyboard it opens the doors instead of when I am near it.
Second issue is the roation of the doors. They open wide but not the same as seen in the attached photo. Also they dont close when I push F again
Lets start with the easy ones. For a start, you want to set the IsOpen before the timeline.
Cause you want that to toggle right after checking it, then trigger the right timeline direction.
For the door rotation, you'll probably want to make two SetRelativeRotation nodes, and affect the other door on the correct rotation for it's relative state.
Thanks a mill, I will give that a go and see what results I get
Hello guys👋. Do you know how to create a loading screen using with progress bar? Like there is a %100 (text) vsync
Map is loading/shadows are being created/characters are being placed. I'm talking about the loading screen, which is just a little bit of information.
How can i get the input id from all my activatable abilities
Is there an easier way to calculate bowling scores. I've been using a pretty jank setup of branches and switch on ints, but trying to keep it simplified has been difficult.
How does bowling scoring system work?
O.o Bowling scoring is easy.
FrameEntry
{
int32 Pins = 0;
}
Frame
{
Array<FrameEntry>
}
PlayerScorePad
{
Array<Frame>
}
int32 TotalPins = 0
for (Frame PlayerFrame : PlayerScorePad)
{
for (FrameEntry Entry : PlayerFrame)
{
TotalPins += Entry.Pins;
}
}```
You've forgot the rules for strike and the spare
On strike it's whatever your next frame rolls are plus 10 points. For multiple strikes in a row, I think it stacks?
Stacks for two next rolls after the strike
Apparently
You need to read the scoring rules exactly, then write some pseudo code to plan it out
Wait, it would be easier if you just had an array of integers actually. But that would be annoying for UI, so I'd keep the other structs for display.. But for score, it's easier to flatten the array I think.
I'm currently using a custom structured array to store data like roll scores, frame score, and whether the roll is a strike or spare via two booleans.
<@&213101288538374145>
Do I have to stop camera shakes before I start another, or does starting one override any others currently running?
I'm not 100% sure. But I think they'll either override, or blend with each other.
Okay, thank you!
Just checking for my own sanity but this node is Modulo right?
Looks like the modulo, yeah.
Yeah. It is.
/** Modulo (A % B) */
UFUNCTION(BlueprintPure, CustomThunk, meta = (DisplayName = "% (Float)", CompactNodeTitle = "%", Keywords = "% modulus"), Category = "Math|Float")
static ENGINE_API double Percent_FloatFloat(double A, double B = 1.f);```
Thanks, I was slightly mislead by the tooltip there
I’m having a really weird scenario happen and I can’t quite figure out why. So I’ve made a homing asteroid for my asteroid remake project. According to my print screen it’s acquiring “BP_Player_C_0”, and chases until the end of time lol. But when I have it spawn off of my Boss Asteroid, it won’t chase. It acquires “BP_Player0”. I’ve even tried to manually pass it in via expose on spawn in my boss asteroid BP, and it still prints “BP_Player0” as the TargetActor. This is really weird behavior. It seems to really only acquire the right target when I manually drag in the homing asteroid BP and start the editor.. but spawning it off the boss directly it gets that weird target. Any ideas?
I might be overthinking this but. Check current frame > check current roll (either first or second roll) > If first roll, check is Strike or not > check if second roll is spare. Other things like checking if the 10th frame is a strike or spare to allow for a third roll. Or checking if this is the frame after a strike to add bonus points. It's these additional rules that caused my code to turn into branch hell.
Unless I condense these rules into functions?
hi. ive recently noticed that sounds arent played for clients in my game, well certain sounds. for some reason when a player is attacked, they dont hear the "hit" sound, but when a player dies they hear the death sound. I've been using "Play sound at location" to do this, using server > multicast events in my player bp, but i cant figure out why it's not replicating for the client. I've read things online about GAS being used for this, or recommended, but I can't find any documentation based on implenting sound effects, purely health, damage or spells weirdly enough
Show code. And make sure to include who is calling the RPCs, since some RPCs fail silently if called from a wrong place
But why would you use RPC to play the sound?
it should just be tied to the montage or the gameplay effect and played there.
I was using "Play sound at Location" originally but Spawn Sound Attached seems to be recommended for multiplayer. but it doesnt seem to work for either. The server event is called from event anydamage
Because my game is multiplayer and I'd like the players involved in the fighting to hear when they hit each other or when one of them dies. If I dont replicate it just plays for one
Yeah, I am talking about multiplayer aspect.
have you done any debugging btw?
what if you get option 0 for the client.
check the value first then work your way up.
ColdSummer is probably correct - because it is not a functional thing, clients shouldn't need the server to tell them when to play this sort of audio
well RPC part can be the bits where the player get attacked. It's fine like this I suppose, I was under the impression that GAS was used since he mentioned it.
because if you use GAS, you should just play the sound on the Gameplay Effect.
GE_Hit
-> PlaySoundAtLocation.
Nothing use GAS here.
I know, I'm not using GAS. I just said I read things about it being used or recommended. I was trying to get it to work using what I knew but everywhere I looked online pointed at GAS being the option for replicated audio
Your code right now implies the client have authority of the hit btw, so it's fairly easy for client to cheat.
Reporting death from the client side is also wild. Server should be the sole entity that decide if something died or not.
e.g (Server)->Damage-> If hp <= 0 -> Kill player
anyway, you want to debug on your end first.
check the sound output for the problematic client.
I've got my vehicle which has rotate able components that are rotating only in one given axis (it's a tank so turret rotates with yaw, main gun with pitch).
Under those constraints I want to always try and aim at a spot x units in front of camera center - this all works great on flat ground but as soon as I get my vehicle onto a slope and aim high or low the aiming sorta breaks cause the components can't rotate exactly
How would you approach that compensation? So if you're on a slope the turret would rotate in yaw a bit more, cannon in pitch a bit less etc
I've been at it for some time now and rotators are so annoying 😅
This is pretty much the setup for calculating rotation, it loops over the rotating components and the rotate component function interpolates to reach target and sets relative rotation of the component
https://blueprintue.com/blueprint/fcmri0v3/
Would encourage you to print the result of that map lookup, where you have the damage type and need to get the index in the map.
Option 0 is blank, but this doesn’t specify a default either (such as the value when the damage isn’t found, -1)
Hello guys, I’m trying to make the health bar flashes with emissive red flickering when it is low, something similar to Halo just as an example.
https://youtu.be/V3Vx9zvQFKk?is=0rT7PkYaSiGvDj6y
My issue is how can I make it glowing? More emissive and with an highlighted effect? Do you know ho to do it?
Thank you 😭
Hi, I have some issues here with widget creation
Im doing this... slot as canvas slot variable will always be invalid... I tried also to use "canvas" and "overlay", but that failed also.
This is an animated widget which im trying to get it to spawn exactly at the mouse location, the mouse click should be the origin point where its created
You can just switch in the enum, why the table lookup?
add a delay until next tick as workaround at the beginning
construction happens before it is added to any slot
actually add the delay after getting the mouse position, should be fine to cache that already
do you guys know if there are visible equations for stuff like lerp and finterpto that you can view
[[nodiscard]] static constexpr FORCEINLINE_DEBUGGABLE T Lerp( const T& A, const T& B, const U& Alpha )
{
return (T)(A + Alpha * (B-A));
}
So A + Alpha * (B-A)
from source code.
thank you very much
to what i understand, default variables are still copied to every instance of an object, so even if left default, the objects variables will still consume memory. i get this is fine in most cases, but when dealing with 100s of objects with large structs it can eat memory inefficiently.
im aware of data tables but manually updating the table and keeping it consistent with every class added, removed, or changed gets logistically heavy.
so to simplify my question, is there a way to store a static set of large values directly on a class without it being instantiated across every object inheriting from it?
Store them as a soft references to data assets. THen load the assets only when needed
This way you store only a single string containing a path to the asset, no matter how big the data in the asset is
Oh wait, I think I misunderstood the quesiton a little
But I think data assets would work here too if this is static data. All of the actors could reference the same data asset. Data assets are static, I don't think they make "copies" in the memory
But I'm not 100% sure about that
if I understand the question, I think you are referring to the size of the object that get instantiated?
They don't make copies. Each one in the content browser is an instance. So if you have 20 of them in the content browser, you'll only have 20 instantiated. (21 if you include the CDO)
Hey, so i made a player stats system for my project, most of the functionality is inside a component, which is added to my player BP, it has health, stamina, thirst, and hunger, and hunger and thirst drains starts draining as soon as the game starts, and stamina drains when sprinting, and regens if not sprinting, All the variables are set to replicated (except for the timers). My game is multiplayer and i tested it in both PIE and standalone and it seems to work fine, but i'd like to get feedback on if this is the most efficient way to do this and if there are any better methods or if there are any things i should know about, thanks
@ancient dagger not to sound mean or rude but you are doing it in one of the worse possible way.
Do you follow some bp mp tutorial like ryan something? His mp video should be nuked.
First of all, you shouldnt update your variables with rpc.
Simply mark them as replicated.
Client shouldnt be telling server their health change.
Instead server should be the one to set it, then replicate the changes to everyone.
E.g client request to eat apppe (server rpc) -> server get health attribute + 5.
Client will get the updated value eventually if the variable marked as replicated.
For your hunger. Have the timer runs on server. And server update the stamina.
I'd also strongly recommend not doing loose floats. A struct with some sort of key and a float is going to make your math functions and data handling a lot easier.
It's fine, i had a feeling it was lol, and no im not following any tutorials right now, thanks for your tips im still kinda new to unreal
@ancient dagger client receive update via OnRep. Start to get familiar with OnRep and event delegates.
Tldr. For stateful data, you dont ever want to use rpc.
Rpc are event based. This mean that if you use rpc to update your variables, late joiners or any player that didnt get to execute the rpc (from packet lost or w.e) will not sync.
You use rpc when you need to trigger an event.
E.g broadcast announcement that the round is over.
alright thanks, btw do you know any resources that i could use to do stuff like this? or am i just better off learning myself?
100% recommend reading the pinned material in #multiplayer
the 2 bibles are Exi compedium and Wizard tips and trick.
if I can give advice to my self again, I would read them a dozen times followed by some very basic practices.
start by giving the ability to a player to change a color of a sphere and have that change replicate to everyone.
then you can try to tackle a door.
if you can do those 2, that should give you solid foundation imo.
ok thanks
I don’t understand what’s going on. The weapon I picked up off the floor has an emitter, but the one I started with at the beginning of the game doesn’t. Please help! - https://gyazo.com/997809a701c5d86db5c2615d83abf14f
so in this setting, i have a set of static data that will never change at runtime. it looks something like this
Data: {
Volume: (float),
Mass: (float),
GridSize: (vector2d),
Slots: (JSON array of Objects, usually quite large in size)
Sockets: (JSON array of Objects)
Aliases: (Array of Texts)
Bounds: (Vector2d)
Origin: (Vector2d)
}
if i understand correctly, setting these as class default variables will mean: every object spawned from this class will have its own copy of these variables stored in memory
which in this case, will mean all of that data up there, will be recreated possibly hundereds of times per session
since this data will never change at runtime, i wanted to know if theres a way for me to store this data in a way its not copied to every spawned actor but i can still access it via a class reference
i elaborated here ^ sorry to you both that the question was confusing
Yeah, I'm fairly sure you're after data assets.
I vote for data asset too
The way I originally wrapped my head around them is to think of them similar to StaticMeshes. thousands of StaticMeshComponents can display a single StaticMesh, and that one StaticMesh holds all of the vertex/material data for it.
Data assets are similar, they're a single asset with a set of data that multiple things can read from, and you can have multiple of the same type with different data in it.
my main concern with data assets and data tables is its need to be created and stored separately, which creates a bit of a logistical mess when dealing with lots of classes or additions/removals, especially since im not the only one working on this project, i would like to streamline adding new items
If you have C++ ability, my first thought is validators.
Disallows compiling a BP successfully if the field isn't set, so they have to put some sort of data asset there when making a new instance of the class that needs to reference one.
my Item initialize its default value from Data asset.
DA_Potion, DA_RustySword, etc.
that sounds totally worth it even for a solo dev. There are many times I hit exception because i forgot to set them.
Validators are nice. I swear at them constantly, but I wouldn't want to live without them. They fix too many mistakes. 😄
When are they executed? any example of it?
ive just made a dirty solution in the base item actors construction script that throws a warning if the data asset isnt set
soo far my validator runs on a button press lol.
which just send some editor notification.
would be nice to press compile on bp and get some error log.
final question, what is the tradeoff in using a data table instead of separate data assets for each class?
There's two main paths. The one here would be overriding IsDataValid in a C++ parent. AActor has an example of this. In your class you could essentially check if a thing is invalid, if yes, pass back fail with a message.
{
bool bSuccess = CheckDefaultSubobjects();
if (!bSuccess)
{
FText ErrorMsg = FText::Format(LOCTEXT("IsDataValid_Failed_CheckDefaultSubobjectsInternal", "{0} failed CheckDefaultSubobjectsInternal()"), FText::FromString(GetName()));
Context.AddError(ErrorMsg);
}
EDataValidationResult Result = bSuccess ? EDataValidationResult::Valid : EDataValidationResult::Invalid;
// check the components
for (const UActorComponent* Component : GetComponents())
{
if (Component)
{
// if any component is invalid, our result is invalid
// in the future we may want to update this to say that the actor was not validated if any of its components returns EDataValidationResult::NotValidated
EDataValidationResult ComponentResult = Component->IsDataValid(Context);
if (ComponentResult == EDataValidationResult::Invalid)
{
Result = EDataValidationResult::Invalid;
}
}
}
return Result;
}```
The second is more generic. Usually meant for detecting things like nodes you don't want used, or similar which is creating a child of UEditorValidatorBase
In general?
Datatable is nothing but a wrapper for essentially a map of data that is FName/SomeStruct. It's all loaded when the datatable is loaded, every single entry. And your data cannot be dynamic, it has to fit within the struct which means you can't have dynamic child objects with dynamic data.
Data assets on the other hand can exist separately. All together they would take more memory than a datatable probably if they were all 100% loaded at all times. But the other side of this is that you don't NEED to load all of them all the time, only the ones you reference in things being used. On top of this they can have instanced children with dynamic data, and if you make them into primary data assets, you can also do bundle loading of other objects from them.
Theres like an actual bug with data table? From memory, laura went as far as having 0 DT in her work.
okay perfect, data asset definitely the way to go then, thanks a bunch you two
Data table is good when you need to view a large ammount of data from a single source.
It also have the pros of export and import. (JSON)
What to use depends on what you are doing.
In the case of items though afaik, everyone uses data assets.
I don't know that there are bugs with them. I also do 0 data tables.
I just think they're much less flexible than a collection of data assets (or primary data assets) to use and reference.
I get that the table makes it easier to do certain types of bulk work, but I think it's a mistake to architect your data around UI issues.
You can solve Editor UI issues with Editor UI or other tooling if it's really a problem.
We use them to bundle small specific sets of data for things. Like in Atre, our unit morphs are a datatable of a struct that is a list of inputs and outputs, basically a crafting recipe.
If I was making a survival game with crafting tables, I'd probably have the crafting recipes be the identical same thing with one datatable per table type. It essentially allows me to input anything and output anything. Anything that can be defined as a primary asset. And since all of our "things" are primary assets, you can input anything. Global currency types, item types, necessary attributes for the crafter, necessary perks unlocked, etc etc.
anyone knows why GetComponentsByClass is unable to find a SkeletalMeshComponent but GetComponentByClass yields a valid result?
Breakpoints don't work with BP loops
When debugging something in a loop, use a print
Also I believe a breakpoint on a node means this node was not executed yet. So pure nodes attached to it did not execute either
thx a lot
I have a question about Execute Console Command. I've never used this node, but reading on it, it seems like some console commands will not work in shipping builds. Is there a way to look up if a command will work in a shipping build or not?
For context, I'm using "r.Water.OverrideWavesTime [float value]" to manually drive the timing of the water plugin.
I could be mistaken, but I'm 99% sure that you can still execute console commands in shipping. It's the input console that gets stripped out I think?
I believe you're correct, however you can do a shipping build that still includes the input console.
@still trail There are some graphics settings that can only be changed with console commands and I've not had any issues with these in a shipping build.
awesome, thanks y'all
Hey, sorry for late come back 🙂
I've tried to tweak it cause I wasn't casting before but it seems to have no effect
Here's the loading snippet
Works without any issue in PIE or a standalone launch from editor, doesn't work after packaging the project
Out of the "Output" I'm going pretty much directly into spawning sounds and vfx at location
Enum metadata is stripped in non editor builds.
As in I'm assuming you're not finding the right datatable row.
Oh, okay
So how could I go about extracting data from DT then?
If you want an easy replace solution, make yourself a library static or something that has a map of Enum/String in it that you can call from anywhere. Pass in the two enums, look up your strings for their names in a map, append those and return the appended string or Name.
I'm also just assuming this is the problem. So worth testing before you replace a lot of stuff. But your other logic looks fine.
Wait, I'm not sure where this has anything different relating to DT losing metadata
How does that change help?
Not the datatable. Enums.
Your EnumToString nodes there. They eventually call down into this.
FText UEnum::GetDisplayNameTextByIndex(int32 NameIndex) const
{
FString RawName = GetNameStringByIndex(NameIndex);
if (RawName.IsEmpty())
{
return FText::GetEmpty();
}
#if WITH_EDITOR
// In the editor, use metadata and localization to look up names
static const FTextKey Namespace = TEXT("UObjectDisplayNames");
const FString Key = GetFullGroupName(false) + TEXT(".") + RawName;
FString NativeDisplayName;
if (HasMetaData(TEXT("DisplayName"), NameIndex))
{
NativeDisplayName = GetMetaData(TEXT("DisplayName"), NameIndex);
}
else
{
NativeDisplayName = FName::NameToDisplayString(RawName, false);
}
if (!NativeDisplayName.IsEmpty())
{
return FText::AsLocalizable_Advanced(Namespace, Key, MoveTemp(NativeDisplayName));
}
#endif
if (EnumDisplayNameFn)
{
return (*EnumDisplayNameFn)(NameIndex);
}
return FText::FromString(GetNameStringByIndex(NameIndex));
}```
Oh, I've misread you lol
That huge chunk in the middle there in the #if WITH_EDITOR section can only run in PIE or Standalone. As it's compiled with that as true. Anything packaged will have that as false. Which leads to this returning different values in cooked/editor
I get it now. Thank you!
Is there a way to link/goto/call a function inside a function in Unreal with Blueprints? This would be in a custom function where it generally won't allow you to create a new custom function.
I'm trying to add a ready up system to my lobby and I'm complete loss on how to do it
Not sure what the first screenshot is for. The only thing I can see being slightly wrong is the GetPlayerState node. You need to use the function of the PlayerController itself and not the static one. Otherwise you'll always grab the same PlayerState.
ok
The kick function has a similar "issue". You are already in the PlayerController. Just pass "self" into the DestroySession node.
Since you execute this on the client and you probably have no splitscreen it works either way, but more correct would be to use the PC you are in via self.
same as me
Is there anyone who can help with this? The player slot system affects everyone when making their character choice.
I use structure
Is this a good idea or proper use for tags? This is a basic example of direct integer variables.
This a game tag/map version
This is a mapping of the variables into a single variable. For the convience of reference and saving.
In the first example you simply access the variable "Strength". One main concern is in the game tag map it would search every time through the array to find the Strength value. Essentially creating a loop to check for a match?
And what happens if you do this in a UMG widget bind. Won't it search through the array every frame to find the "Strength" game tag? Or does is cache or use some effecient system where this isn't an issue?
sweet any tips or anything
i have my lobby in different level/map
are you using the Advanced Sessions Plugin?
yes, im using it
I recommend using structure.
I don't think its great. You could've just used pre-defined variables and make functions that take the variable reference and modify them as needed.
Thanks. I'll stay with that for now. This method would make organizing easier, consolidate 30-50 variables into a single variable. And make things like saving data much easier. It also has the advantage of visibility from game tags.
However, if it's looping through an array every instance just to find the variable it seems to be a performance issue.
If I recall right, maps use a hash lookup, so it's faster than an array checking each value, but its still slightly less performant than using dedicated variables.
Hi, Recall my memory please,
Dose this clear all other inputs or just change the one ?
It only changes this one
Has anyone ever gotten child actor components to work? Made a multi character actor with direct components but wanted to try child actor components to see if I could make it scale better by having lots of the character building logic in the child. However after loading the first one the second seems to just never work correctly.
Just forget that child actor components exist.
It is a broken feature that even epic says to not use outside a few very specific situations
Good to know, thanks. Any other similar options possible?
A component cant own another comp.
Soo CAC will be broken
Epic is developing scene graph but not sure if thats even already accesiable.
Just adding to whats already been said. This can be a good method for attribute type systems. Pop it into an actor component with a getter functions and you can make systems that work with the attribute system. There can be a little overhead but the trade off can normally be worth it.
The alternative is to use an interface to get attribute values but if you have a lot of attributes, it'll be a nightmare to manage and maintain.
As another level you can go is to use a custom attribute object (uobject), that has a value and defines min/max of said value. You can then add various functions for getting the current value, modifying it and more. One nice advantage to this is you can have an event dispatcher for when the attribute is modified.
Again there can be trade offs but I personally think its worth it if you have a lot of attributes.
Part of the complexity is additional systems that work alongside the attributes. For example you can upgrade each stat individually by spending xp. Thus instead of 10 variables it's 20. An equipment variable is used for each stat so 30, then a spent tracking variable 40+ etc.
The Bonus attribute variable does need it's own value to keep track of the bonus to apply and upgrade cost.
It all works, but when it comes to things like saving, it's lists every single variable to save/load instead of something more like a database structure.
It does sound like you'd benefit from a robust attribute system. I'd lean towards using a custom uobject. You can even utilise some hierarchy and have a child of the attribute that's specific for upgradable attributes that include a modifier amount, xp base, level ect...
I was reading up on that, but some of the examples provided split it off into other blue prints. So it's not clustering the 3rd party BP. However, that doesn't really solve many of the other issues.
i have a question about this, how can you use uobjects with savegames?
serializing them with bp is not easy
There's a few ways. One method I've used a lot is to have a 'GetSerializedData' where you can setup logic for dumping the relevant values (dynamic) into a string. When saving you'd create an array strict that contains the class and this string.
When loading, you'd use the class to recreate the uobject and have another function that takes the string and extras the data and reapplies to the relevant properties.
Another method is to use instanced struts. My initial tests have been nice using this but not used them enough to comment on which method is better.
Yes, you'd have an attribute system (most likely an actor component) and then your attribute objects. The system would manage the attributes.
What are the other issues?
Is that what you mean?
im having similar get serialized data function, but if i want to save array with text data i have to deal with escaped char for string parsing
which isn't really cheap performance wise
That's specific to GAS but I believe it works a similar way to what I've described.
Check out instanced structs then. You have it return an array of instanced structs which you can save inside a SGO.
im modding a game that uses 4.27, so instanced struct doesn't exist : (
thanks a lot tho
Ahhh, that's unfortunate. :/
You can just save a specific struct in the SGO instead but it doesn't always work well with hierarchy, especially if you have a child that has additional data to save.
Sometimes I'll use combination. A struct for core data and then a string for additional data for any child classes.
It sounds like it's a bit of a circular trade off issue that may not be feasible to resolve. Any time the variables are packaged together they need to be unpacked which has an associated cost.
Essentially negating the benefits of packing.
In the original example I put 31 variables into a MAP that held int values. When it came to storing these a single variable would store all of them instead of 31 cases.
Because it used the game play tag system they could be found in organized lists. And the actual variable count was only 1 instead of 31.
However, the unpacking process of pulling the variable each time seems to make it essentially pointless. It's also much harder to read.
The original Calc Strength nodes are clean and easy to read. The other versions include more nodes and are harder to read as there is more going on.
I recommend just exploring GAS.
I'm looking over it a bit. I'll probably stay where I'm at. It's all functional just cleaning up and improving the UI. This is in a transition state, but it all works.
The top half is revised.
I'm not sure what you mean.
Meaning if the data is put into a Struct, MAP, or combined in any way it needs to be pulled out to be used.
Instead of just "Player Strength" variable.
It's get Player Strength from (Packaged data like a map/table/struct)
I get that but I'm struggling to understand the problem.
It would be nice to put 60 variables for example into a single container. Especially for things like saving. 1 reference vs 60. It can also lead to a few hundred variables on the 3rd person BP. It's still manageable. I don't think it would get excessive enough to really cause issues.
It just seems in these cases there are better ways. Kind of like creating a function instead of re writing code multiple times.
The variables are searchable and generally hidden anyway. As long as the descriptions are good enough it's probably fine.
I can't even wrap my head around wanting loose attributes. I'd lose my shit over that if someone made me work with that.
Attribute sets :3
I mentioned the better way. It requires using uobjects. If you don't mind a little c++ you can even make the attribute object self instancing.
You would definitely benefit from looking at how GAS handles it.
An attribute is just a number, often with a min/max value. The name for the most part is irrelevant.
I couldn't imagine working with a system where I have all of them individually.
Max health
Min health
Current health
Max health modifier
Do that again with stamina and you're up to 8 with only really 2 attributes.
Grouping them together normally makes it easier to work.
A get attribute function would just get the value from the map based on a gameplay tag. If you're using uobjects, you'd find the attribute about and then get the value from it.
You can add additional functions for GetAttributeMax or GetAttributeAsPercentage
ModifyAttribute/SetAtteibute functions can be nice because these can be setup on the attribute object itself and handle clamping for min/max. If you have modifiers they can then account for this as well.
It's less about having to write each attribute, for me. Even GAS kind of does this. You'd have a Health, MaxHealth at the least with your modifiers being effects.
But the one thing that was said that would set me off so bad is the "Calc Strength." Absolutely not. Strength is an attribute, it should be buffed by effects same as any other attribute. If I as a designer decide I want to make a new special thing in the game that does something neat with strength I need to be able to do that with effects and not have to beg a Programmer to modify the hard coded calc function. And as the programmer, I don't want people constantly asking me to do things like that. And even if I'm both, I don't want to be modifying a Calc Strength, a Calc Agillity, Calc etc etc etc constantly. That's what effects and attribute mods are for.
I'm looking more into the uobject from video example. It's probably easier since I used this system for decades so I'm very familiar with how it works and what variables are needed.
Most of them are self evident in the code and just passed into functions. For example when a skill is used it uses that skills mastery level as part of the damage calculation. Thus it's the same for all skills uses.
Using a skill increases it's own individual exp (which is what's used to level it up). So it all follows simple formula's. Despite how the variables are organized.
There is a player current health and player max health. As that's required to clamp the value in healing/damage. Most other attributes ultimately come down to a single value (that is calculated in the original function example).
Thus even though player strength is comprised of your character level, equipment, base, upgrades, etc that's just done on the update function for strength.
So I simply reference player strength for the UI menu, combat calculations, etc.
Here's my primary question though. You have CharacterLevel and Equipment, and Upgrades here. Lets pretend I want to add a new perk system to the game or something similar. Whole new feature set. And one or a few of these are going to affect strength with some buffs. Probably all of the attributes in some way.
Do I need to edit your Calc Strength function to achieve this?
Yes. Events such as level up, training a stat point, equipping an item all use the force stat update functions to recalculate and update their value.
But why do I need to edit your calc strength function? I'm just granting a couple of buffs to the player.
That's more specific to temporary vs permanent or "long term" such as equipment. So the update calucation only occurs when necessary.
I have a debuff armor skill for example that will just reduce a mobs def or when a skill is used it can be modified at that point.
I also avoid the POE/Diablo 140 timer effects. There are plenty of change AOE range, element type, or other game changing skills that don't require tossing around stats all the time.
It's all buffs though. Nothing shouldn't be. Your permanent and your temporary.
You character's base stats? A infinite buff that isn't shown in the UI buff list and sets the attribute's base value.
Your equipment? An infinite buff that isn't shown in the UI but sets your attributes non base attribute to show it's buffed.
Your upgrades? Buffs.
My new perk system? Buffs.
A Potion Of Strength that buffs strength for 5m, Buff but timed.
Nothing here needs a calc function. They're just buffs being applied or updated. When I say buff in this regard, for GAS this is a GameplayEffect.
I mean it needs a calc function, sure. But it's done generically based on the attribute. There aren't any Calc Strength. It's just Calc Attribute. Which is ran on anything that gets a buff of any kind from any source.
The calculations have to be performed in some manner regardless of the system. It's also very transparent to the player. Especially in cases where they initiate it such as equipment or training a stat point.
The function is merely to not have to calculate it on every instance.
Such as player damage = buff stat + char level + trained stat + equipment stat. This is already preloaded when the force update is called. Essentially your strength is already pre calculated and known for physical damage.
GAS does the same thing. It only updates the attributes when their buffs change. Anything using it like damage code pulls the calculated attribute directly in a simple getter.
Then yes. I'm just using a system I created like 20 years ago for a multiplayer web based game. The functionality remains the same. It was just a way to track and minimize the calculations on the server in that environment.
Adding new features is fine, altering the HP so it scales more at higher player levels etc.
I finished the update. Minus adding other stats.
not sure if this is the right place for this, but:
when should I be using functions vs spinning something off into a separate actor component?
in my specific case, I'm implementing a flight control system for a spaceship. my previous (working) implementation of this dumped all that into one pawn blueprint and separated with functions. the various logic of my pawn likely needs to be serialized, so in all likelihood i'd just be manually calling the functions of my various components (including the flight control component) in the owning pawn.
it seems like the primary advantage at this point would be that it would make it easy to substitute a different flight control system is, as long as they go through a common base class.
am i thinking about this the right way?
I would do it as a separate comp personally.
Even if you only ever plan to have 1 flight control. (which like you said, if you had multiple could then easily be swapped out)
Its nice to have everything entirely split away.
(Thats how I've been designing my game)
It also removes the need of extra casting, when no needed.
(not a crazy issue, if you do inheritance correctly)
(No need to cast to the whole spaceship class, when you can just get it as a generic actor, and gets its flight control component.)
In the exact case like this, casting really doesn't matter, cuz if your entire game has this spaceship, then you won't be wasting time loading it, from a direct cast.
yeah splitting things up is also just nice. alright, i'll go with components
Hi all ! Do you think there is a way to "crush" grass where I have a spline ? I want to create "grass trails" crushed where my Player is walking on grass
You can, but I'm not directly sure of the best thing to use. Essentially your shader needs told which is crushed. Grass is likely an ISM. So my immediate go to is to say draw the path on a rendertarget. But you can't feasibly do this for an entire world without a rendertarget that is just too massive. So... I'm wondering if you could make a moving rendertarget? Redraw an RT gridded to an area or something and move it every few seconds, and redraw it by grabbing the spines, you've mentioned and maybe also store the player's or other NPCs movements recently and add those as lines in it as well? Essentially just redraw it around the player. Then read that in your foliage shader.
https://celdevs.com/creating-render-targets-for-shaders-without-a-camera/
Maybe something like this. It's using C++ though.
I know she solved the whole "large world" problem for our game, but not sure if this tutorial addressed that
Thank you @surreal peak & @maiden wadi ! I think I will start to generate the "splines" and then try to "redraw" those splines into a Render Target
I have another question
I just discovered the "Editor Apply Spline" node. I'm trying to paint my Landscape inside a "closed loop" Spline. Any idea ?
Actually it just "paint" under the spline, not inside
Not sure. What you describe is basically painting a convex shape. Almost like a stencil. Haven't used the landscape and painting tools much.
Exactly. I also tried to do that with "PCG" but no success.
I'm not sure if there are built in tools for that. Last time I did that I wrote a function that sampled along the spline and then took those vertices, triangulated them, and then drew the triangles.
Hello, I have a problem with input using UE4. I made a action mapping (flashlight toogle) using the "F" key and it works fine but when I hold shift and then press F, it doesn't get triggered. And I'm not using any modifiers
Weird that this works fine in UE5 doing it the same way
You're using the old, not EnhancedInput in UE4?
Is there a way within Blueprints to get something akin to a static class variable?
And if not, I'd love suggestions for something to replace that functionality.
not really
You can abuse the game instance or gamemode for that
Or create a manager bp
is it possible to define a manual getter for a blueprint variable? In my case, I want to have a value defined on the scale of 0-10 in the editor, but when gotten in blueprint, multiplied by 1000
i know i could just define a function for this, but i mean something built in that i can override
get variable * 1000 🤷
yes, i just dont want to have to be doing that in 50 different places in the code, and also risk forgetting
Rigt click collapse to macro 🤷
Can't override macros. I think function is the only way to get the behavior desired.
I'm pretty sure function is the only way to get that, but to make it a little bit better you can make it a Pure function, which will make it act exactly like a variable in the graph.
You dont need to override anything
you just create a macro
He specifically asked for the ability to override.
He asked if there is a built in function that he can override
you dont need to override anything if you create one yourself
Macros don't inherit though for reasons I wish I knew. So you'll be doing it in every subclass. Which is why I assumed an override was desired. I dunno, maybe I interpreted the question wrong.
Global Macro Libraries are also an option.
If you want it to inherit you can just create a function lol
I like those.
this is such a non problem ^^
Oh yeah, speaking of problems. Is there something I don't know about this node that I need to get it to work?
It's hitting this node, and that is the exact name of a function.
Is there a reason why you need it next tick ?
It's gonna get called multiple times on this frame if I just do it here and that seems inefficient. Timers reset every time you set one, right?
Yes
Yeah, I only want to get it called once, and this seemed like by far the simplest way to do that. It's entirely possible there's a better way though, and I would be happy to use a better way.
you could put a do once infront of it
Does that work when it's being called from multiple places?
I never used this one but i would assume it works exactly the same as the other set timers
NearestInteractable will be the same in all of them, but multiple actors will be calling the same thing for NearestInteractable.
I think the do once resets for every call
not 100% sure
but in that case you can add a bool and a branch
I guess I could always put a wrapper around FadeInPrompt that has its own Do Once, and call that.
only execute the timer when bool is false
That's probably easier honestly.
set bool to true after first execution
I'm bemused; doesn't multiLineTrace get all objects in the path? Not just one hit? I'm doing this but it's only returning one hit. The cube is set to block all.
It is using by channel, and not by profile which only returns the first hit
Read the description
In short, it returns the first BLOCKING hit, and any other overlapping hit on the way. I'm not sure about your example though, where does the trace start?
Anyone know if there's a way to call an editor menu item from a Blutility or via console command?
That's confusing. What's it mean, overlapping?
In my example it started at the leftmost end of the red line, and ends at the rightmost green line.
Maybe differently, it gathers everything that responds - when you set your collision, you can set it to Overlap or Block. Overlap is a response.
Red square means it hits a blocking hit, and stops there.
Multiline trace does not pierce through Blocking responses
Ah
What causes waking and sleeping for actors?
I'm trying to figure out if I can use those events rather than slapping something else onto Event Tick.
I have a collider that needs to determine what actors of a certain class within its bounds are closest to it. Constantly adding things like that onto Event Tick gets messy.
Looking like no.
Yeah. No doubt. So you're trying to do it on Sleep?
Yeah.
I can't just use on overlaps because the stuff it's detecting are not static, so they can move within it and potentially get closer.
Hmmm. Maybe when it stops, if it's inside it, do an overlap box? Is it a box you're testing it with? Got a pic, maybe?
Yeah, it's a box. There's nothing to look at right now, I'm still working on assembling an approach.
Alright. Well. I'd do a box overlap all when it sleeps then and use that.
I think ticking on wake event does it, it apparently is just what sleep uses too.
It's attached to a player, and it does not seem to go to sleep.
Oh. Hmmmm. What kind of player movement are you using? Character?
Yeah.
Maybe on the end of the input functions call what you would on sleep?
Are you using Enhanced input?
Yes.
It's multiplayer though. That won't work.
Someone else could shove something into range.
I might have to use Event Tick.
A multi sphere trace would probably work better for this
Or you change the responses to overlap instead of block like Verael said
It's alright. I have an idea how to work around it.
I could potentially do a really janky thing with dispatchers in the interactable objects.
Hello guys i dont know where to post my problems but i need help. the problem is that i have my firstpersonmesh , you can see the hands and yeah, the problemn is that theres a huge thing in front of it connected to my first person mesh and i dont know how to remove it. Can someone help me with this please
It looks like your mesh included some geometry for a "background". You can see it in the materials on the right hand side of that image. You probably want to remove that from the mesh itself and reimport to unreal. A simple and dirty fix would by setting the material to None.
What exactly is the design problem you have? Like, in game terms, what you want to happen
Popup appears above the thing I'm closest to that I can interact with.
Yes. What's the thought behind the mesh and stuff?
I'd say something like this you should test first. Clear the doubts fast.
If it is for players only, I wouldn't bother that much with it. Depending on the number of entities you predict, either do a sphere overlap around the player every given interval. Or add a constant collision box and OnOverlapBegin add references you want to keep to an array and use the FindNearestActor with the array
Maybe this user widget variable is causing the problem.
i downloaded this firstpersonmesh from sketchfab and it downloaded in a zip file, then i imported it in my project and now that i selected it it just has the backround with the mesh.
should i delete it?
Maybe disable it, deleting might cause more breakage.
Try importing in blender and see if any extra planes added in the files
I think this is it.
Maybe it's an "aim" mesh for ui or something.
i cant really disable it, and can't import it to blender its a source / scene- I think i found something imma let you know real quick
yeah nothing , i cant import it to blender so i cant even remove the backround. the file is gltf
would you like me to give some more informations?
you are right , but for some reason blender says that theres no item to import
im sorry im such a beginner i just tryna learn
Can u send the file?
yeah sure
its a winrar / zip file
i cant really send it in dc. do u have some other platforms maybe?
how can i give you access amd where do you need access
right-click the file/folder, select Share or Get link, adjust General Access to "Anyone with the link," set permissions (Viewer, Commenter, or Editor), and click "Copy link"
https://drive.google.com/file/d/1wsX7YSbvEofHxsUD8cPB0Rusa1eyigZX/view?usp=sharing maybe is it good now?
which one of these bad boys can I use as a virtual texture e.g. UDIM (for the cliff faces I am modeling) rather than individual textures per material. Seeems a bit goofy and not working properly with Meshblend currently.
Do you have more infos on how to do that please ?
I don't find anything on UE Docs or Google for that
I have a "spline" closed loop
i can see some purple mesh here lemme figure out a way to eleiminate it
okay thank you man
turned it off lemme delete this file and send u back
Alright
Can also make it a compact node to look a bit more like a Getter/Setter too
hello, I have a weird problem with physics. I'm trying to move an actor and it moves fine, but if I enable physics but then disable them back I cant move the actor in any way. Can someone help
I'm doing this in a pickup/drop item system and turning on/off simulate physics does not let me set the actor's location to the place I want (it works fine picking it up the first time tho, since simulate physics boolean was not toggled yet)
im still re-doing my project imma let you know the results
it works perfectly thank you so much man
@hot star
Im genuinely glad it worked. Have fun creating!
can someone explain to me wtf is going on here
first time ive seen something like that happen
the blueprint just corrupts itself when i try to do this
try adding a scene component as root
might be doing funky stuff and fails to replace the root component correct 🤷
Unnamed component?
How could I change the mouse sensitivity in a top-down project? Just the mouse speed across the screen. Tried to add a float value to the mouse position everyframe but doesnt work
Is there any info on setting up view targets/look at rotation using gameplay cameras? It seems like it'd be possible to do but hard to find any resources/basic info in 5.7
How do I control the rotation of a spring arm+camera around an object via the mouse? Does anyone know the requisite nodes to do this?
Set control rotation
control rotation is on the controller for the pawn, i wouldn't use it for the camera?!
rather get current world location, add delta, clamp/wrap, set world rotation
Im under the impression he just wants to rotate the view.
A camera is uselsss unless its viewed. I might just guess incorrectly though.
What he says sounds something like a turn table.
fair enough, for a stationary pawn you could use control rotation
i have an actor component that's responsible for the SFX of my spaceship. it has references to several audio components. my intent was to include this on the ship, and then be able to set these to reference audio components that belong to the parent ship class.
however, i cannot select anything in the audio section of my component:
is it just expected that you cannot actually set a reference to an audio component in the editor?
Yes. Because I'm not sure you're looking for the component. You're trying to set which sounds play, based on those variable names. You should have made that property a SoundBase type.
to be clear, i have added and placed an audio-component into the actual ship that owns the SFX manager. but in the defaults for the SFX manager, i cannot select my audio component.
You don't want the audio components on the ship. You want the sfx manager to spawn or play the sounds itself. You made a manager for the sounds, let it manage them and just pass in the data it needs to do that, which are the sounds picked. Or don't use a manager if it's just a flimsy redirection.
i can probably do that, but the intent here was that i can place the audio component in the viewport of various ships that may want that audio played from different locations based on engine location, etc. so i do want to be able to place the audio components on the ship itself.
in general it looks like adding a reference to another component in an actor in the details panel isn't possible
seems like this may add the functionality: https://github.com/aquanox/BlueprintComponentReferencePlugin
Hi everyone! I can't figure out how to open the window: https://gyazo.com/36c769e89b8b2389fa851a13a37b9da2
You can dynamically spawn the components at runtime. Alternatively, you can use the get components by class to get and set at runtime. You can add a tag to them to distinguish them if needed.
I usually make an Initialize function on the component with inputs for what needs to be passed. And fill it in the actor begin play. I rarely use actor tags for this, since you need to manualy type them in each time.
It is kind of annoying that you can't use the vector display helpers from a component it seems. I might dig into engine later tonight and see if I can find how hard that would be to make work.
Cause realistically this system should be an array of vectors for each type and a soundbase. So that you can play the sound at each location. Maybe not necessary for some games, but like if you're up close to the vehicle, you expect to hear a thrust sound closer to each thruster.
just put sockets on the mesh?!
that's what i do for lights, exhausts, sounds on vehicles
hello ! I'm just trying to Print something in the console pressing a key using the enhanced input system but it seems just impossible
I don't know what I'm doing wrong
It just feel impossible
If someone can help, really it's so frustrating
is input enabled on that actor?
Is it in the details when clicking on the actor ?
i think only for pawns/characters/etc
there's also a node to enable it for normal actors (just can't recall the exact name)
e.g. you could do that after adding your mapping context
does your input work now?
This was on disabled instead of player 0
yes it seems to work
Thank you. I'm new to unreal and there is some info that seems impossible to find
Thank you so much !
Hi. I am using UE 5.7. I am trying to implementing Interaction PRO that i bought on FAB. It works fine if i want one mesh to get the Highlight Material. But i cannot add more than one mesh to "Static Mesh". Kind of frustrating when it works fine with for example the "Set Overlay Material" node. I thought that "Pawn root" would do the trick, that all the Static Mesh Components would highlight, but no.
Do you have an idea how to cheat this? I have a light switch with several parts that i want to highlight at the same time. Not just one part at the time.
What can i do? Is there a node that i could use for this? Like a sequence node but for these kind of nodes? All these mesh nodes connected to one node, and from that one into "Static Mesh"?
Bare with me, i am a newbie and asking newbie questions 🙂
You'll need to contact the author of the plugin. It's unlikely anyone here will know how the system works.
Thank you for the answer. You are probably right. I did that yesterday, but no answer yet. I guess i need more patience 🙂
For sure, I was just hoping for a solution that let me select the components in the editor
Hi in a delivery game scenario when there's one Character + one object to deliver + one client actor to receive the delivery, so these actors will always be loaded into the scene, is a good thing to use casting between actors? I'm using a BP interface at moment and I'm trying to reduce castings but in a simple scenario like that seems overkill and if I'm not mistaken a direct cast is faster than a soft reference, so I feel a bit lost here 🙂
The main purpose of an interface is when you have different classes that don't share a common parent but need to implement the same set of functions.
What is a deliverable? Do they have a common parent? If not, does making them have a base class make sense?
my own way of doing this is by having a structure like
{
reference to an actor
component name
}
and have a function to convert the structure to reference to component, by
get object path of the actor
append .component name after the string
convert the string to soft reference and resolve it
it's not the best solution since it's based on component name
Is there only ever one actor class that is the deliverable, one actor class that can recieve the deliverable, and one actor class that can carry / deliver it?
In that case don't overthink it, just do the thing with those classes. If it gets to where you want many different things that are deliverable I'd reach to a component first. Component can do almost anything an interface can, with the addition of being able to hold state.
You'd go for a component or interface if you wanted to be able to add "deliverability" to ARBITRARY classes. Like if you wanted to make a dog deliverable, or a vehicle.
Hi @dark drum @faint pasture The delivered is just a single actor and it only change the mesh and the type of mesh using a SM and a enum variable inside the client actor
If it's simple:
Base class of deliverer (Character probably) -> other subclasses (Jim, Jeff, Fido)
Base class of Deliverable -> other subclasses (pizza, box, drugs)
Base class of RecieveThingy -> other subclasses (mailbox, slot, PO box)
If it's more complex:
DelivererComponent -> add to any actor
DeliverableComponent -> add to any actor
RecieveDeliveryComponent -> add to any actor
Thanks, yeah is the first one very simple 🙂
I was looking into the character size map and I saw more than 600 MB occupied by the BP interface.. not sure why
I always prefer using event dispatcher but this time I wanted to try something different 🙂 but looks like using interfaces it's the correct way to do stuff, still learning this basic stuff, is not encouraging 😄
Yea, if you use a specific object type as an input/output on a function, anything that implements the interfaces loads them as well, even if they don't implement the specific functions with the specific input/output.
Interfaces and dispatchers and casting are not interchangeable. They cannot be replaced with each other.
I rarely use interfaces. They're often over used by many people.
Nice to hear that!
Inheritance gives you identity. This is a type of thing.
Composition(Components) give you capability that is reusable despite the type of thing. A lockbox and a character both have a mesh, and they both have an inventory. A mesh component is reusable despite the type. An inventory component is reusable despite the type.
An interface is a contract between things that cannot be compositional or typed.
If your system uses composition, you don't need to cast, you can pull the component off of any level of actor pointer with find component functions.
If you're trying to do something with a type, that type should have a code only parent class that defined the type with functions implemented for the type, so that you can cast to that which is practically free for memory linkers because it won't drag along meshes and sounds and whatnot.
An interface is not a fix for not understanding or not using the previous two points correctly.
Thanks @maiden wadi
What can an interface do that a component + dispatcher can't do? I suppose return.
Yea returning a value is one. You can also put them on non actors.
I'll be honest I have exactly zero interfaces in my entire set of projects
Oh yeah. I have an interface that when a custom mesh component gets an interaction it passes it to it's parent with it's index.
But I don't use them that much, interaction is the only thing that I use them for. And I don't even have a reason for it, I just started it like this
I like interaction with a component, then you can have interaction state like CurrentInteractingPawn or if it's a scene component, where the interaction should take place
I'm with you on this one. It allows for more complex interactions in my opinion.
What is the approach to debugging issues that only appear in release builds?
Not a workflow I've developed yet.
By issue, I specifically mean crashes.
TLDR, hope you get symbols, and use them to look at the crashing code and or logs
Where do I see symbols?
I'm not sure how that works on a packaged build. If it's same as editor, you get them from compiling source. If you're using a launcher engine there's a setting for them in the engine install settings.
All I get is a windows popup that says "Fatal Error!"
What build type? Development, or Shipping?
Shipping.
You don't get the crash in a dev cooked build?
Haven't tried (I did not make the build I'm testing). How do I do that?
Alternately, is there a way to make play-in-editor closer to what happens when you build?
Yes/No. You can use Standalone mode. Which launches a separate process and functions closer to what you expect in cooked.
But a cooked build cuts out a Looooot of code behind WITH_EDITOR checks. So Dev cooked build is your closest chance to being close to shipping.
Standalone does not throw errors, unfortunately.
would have thought I'm doing that right
sorted it, I believe I had a random space after the _ which I didn't see
Well, I managed to get a development build, but it throws this.
Shipping build does not do this.
I made the player be able to jump in this cart but it constantly jitters while they are inside, anyone know how to fix it?
Looks like collision maybe?
What about the collision though?
Is this a BP only project?
Is the character attached to the cart or just placed inside?
They have free will to jump inside at any time, they're not attached
There's a physics setting to do with if it can be used as a base. I can't remember the exact name but it's to help allow things to move with the things they are on. It might be worth checking out.
No.
Although the problem is almost definitely occuring in a blueprint.
Is there a way to get information out of something built for shipping?
Like, echo to system console or something?
I'm not sure to be honest. Have you reparented any classes recently?
No.
During the build, do you get any warnings?
It might be worth taking a closer look at some of them. Sometimes it might detect a mismatch that can cause this type of error. Particually for BP based issues.
I don't think that's likely. By making many builds and changing materials at different points in the code, I've narrowed down the issue to be happening somewhere here.
GetButton goes in here.
I had one issue once where I had duplicated some functions (and modified) in a FuncLib and all the world context nodes broke but only in a build. I had to replace them but it flagged something was up in the build logs.
The error definitely occurs when this is called.
It MIGHT be when it gets called multiple times on the same frame, but I'm having trouble confirming that. It seems to be any time this is called.
But it runs flawlessly in editor.
And the project won't build properly in anything other than Shipping mode.
So I can't test those.
I am wondering if Player ID is accessing an invalid number somehow, but I need a way to check.
How do you know? The assertion failed is from the 'EventDrivenCreateExport' function and is referrering to a class type mismatch.
I made a function that changes the material on my players and slapped it around the code until I found roughly where the error was happening.
Oh wait.
We might be misunderstanding each other. That assertion error was for building in Development or Debug Mode.
The REAL problem is that my game crashes in a Shipping Build in a way that it doesn't in-editor.
Because of the assertion error, I can't check Development or Debug.
And in the meantime, I've been making a bunch of Release builds to try and nail down the problem.
This could be related. Assertions is just a forced crash during development if something you expect to be a particular way but isn't. During a shipping build, you wouldn't get the assertion but that actual crash it was warning you about.
So the assertion is warning of a class mismatch. During a shipping build, if it actually attempts to do something with said class, because of the mismatch would cause the crash.
The assertion occurs at startup and never gets further than that. The crash happens at a very specific point in a specific level.
Specifically, that assertion leaves you on a black screen.
What's supposed to happen? Loading a level or something like that?
Is the start screen a unique level?
Why are you telling me about it then? Im struggling to understand at what point the crash is happening.
You said it was at a specific point when you try to load the start screen.
No, it's a specific point in a minigame, in Shipping Mode. There is a different, and as far as I can tell unrelated issue that happens when I try to make a Development or Debug build. That's the black screen assertion error.
I can see how I've been confusing, sorry.
Shipping Mode builds and runs properly but crashes at one specific spot. Debug and Development will build but immidiately cause that assertion error and forever remain a black screen.
Sometimes they don't even have the courtesy of displaying the assertion error, but remain a black screen all the same.
So in the shipping build, at what point does it crash? What should happen?
It's a rhythm game. It crashes when players miss an input.
It should kill them.
The error is not in the kill function, because it can also be triggered by entering a wrong input and that works.
So missing or entering the wrong input should do the same thing? Entering the wrong one works fine but missing one crashes the game?
Can you show the logic chain for both missing and wrong input?
Yea, shipping only bugs can be a pain. 😅 I had one a few years ago where NPC's just randomally got destroyed. Turned out they were falling through the world when they were first spawned lol.
This is Missed. It runs every beat. If a player pressed a button recently, they're tagged as having done so. This only returns false if a player has not pressed a button this beat, and they have a button assigned to them. The error only occurs when GetButton returns not None as far as I can tell.
Oh I had that too. I just disabled their gravity since they don't move in this game.
This is the missed logic. It's also the correct logic. Whenever a player presses a button, they get tagged as pressed, (the Tag array is depreciated, it's the "Add Tag" message function that matters), and a signal is dispatched to the game mode saying who pressed it, when they pressed it, what they pressed, and if it was correct.
This is the receiver for that dispatcher.
This is the receiver for the Missed dispatcher.
How is 'OnMissedInput' called?
OnWindowClosedBar is from a Harmonix clock.
The inputs for the game scroll down from the top of the screen, and CheckMissedInput is called multiple times during that time period.
Without crashing.
It only crashes when it should be returning true, although I think it crashes before it actually does.
Have you checked the log?
The easiest way to debug shipping mode is by including pdb and attaching debugger.
That sounds perfect. Could you elaborate?
You will need to make it a cpp project and have IDE ready.
When packaging theres option to include pdb. I forgot where but you can ask aroubd.
What's pdb?
Then you can attach debugger when you run the shipped.exe
Basically whats needed to debug the game.