#blueprint
1 messages · Page 111 of 1
no because it's pretty much impossible. you could fake it, maybe add a little effect to hide the hard cut-off between perspective and orthographic views
how can i keep a simmilar size for every child actor, so if a child actor is big then scale it down and if it's really small then scale it up
its written there
use vs2022 not 2019 for msvc version
I'm switching over some menus to CommonUI but I found that the "expose on spawn" variables aren't showing up in the Push Widget like they did in Create Widget.
Is there a way to fix this?
add them manually
otherwise no
hide it like how?
as i mentioned add a little effect. like small flash to black or some screen-space confetti or something
you can go crazy with it if you want
Anyone know why IsA wouldn't be working in a Blutility?
Printing the Class of these assets just returns Blueprint and not the child class
It's messy, to say the least
also i think you can get more help in #editor-scripting
I'll check there. Blutilities are weird sometimes
im working on a top down retro space shooter for a college project and i've hit a bit of a roadblock
Im probably missing something simple but coding isnt exactly my strong suit. Anyways, the issue is whatever state the enemy blueprint with this pawn sensing node starts with in terms of seeing the player, it will stay that way forever. So if it starts out seeing the player, it will constantly print the string (even if I leave its sight). But if starts out NOT seeing the player, nothing will happen (even if I enter its sight). Of course, i want the sight to be dynamic to where its always checking if it sees the player and does actions accordingly.
Any ideas on how to fix this?
When I open my project, how can I make it so that it loads automaticaly a specific level?
edit, project settings
thanks mate
this is all the code ?
Just for stuff related to the pawn sensing component, yes
whats with the condition it's kind of pointless
your printing on pawn sensing ?
and thats what keeps showing up all the time ?
At this stage, yes
I've tried using other nodes like while loops and sequences, but I seem to get the same result, most likely with how i've been implimenting them
I know im missing something but im unsure what
hey guys I have a skill bar on my game, where the player can drag the skills on it, and I wanted to bind the text inside the skill widget to the key mapped into the InputAction, how can I get the value of the key mapped
I've tried with this node but without success yet
maybe #multiplayer
alright
OMG I need a utility to show the difference between two BP's ... copied a file, made some changes, now I need to see what's changed so that I can undo things that aren't working.
which vcs are you using
vcs?
Oh, version control - I use git
But git sees the files as binary and doesn't show changes to BP
If you commited theres a diff tool on right click -> revision control -> diff
Inside the UE editor?
oh neat - I didn't know that
knowing is half the cattle
Does anyone know why this doesn't work? Does it have to have something prior? Shift doesn't recognize me when I press it (it doesn't really recognize any key)
is it running ? if you just print string hello does it show up ?
Why you dont use enhanced input system?
What do you mean if it is active? The widget is created when pressing shift, but do I have to call that keydown function from somewhere?
Can I use it to recognize if you are touching the key with an active widget?
i think yes you just make a branch with check if your widget is in viewport
but i am not sure i never use it for this
hmmmmm but I need to add the split items function with the shift, I need the logic to be purely within the widget D:
i mean is this function even running ?
hmmm i think yes(?
if you just put hello in the print string does it show up ?
just put some text in there
for now to see if it's running
hmm doesnt show up
then it's probably not running
usually like mentioned you would something like enhanced input
if you wanted to run some code on the widget you could make a custom event or function
and use the reference to the widget and call it
ok so, I believe something may be wrong with my pawn sensing component itself.
I reduced it to just On See Pawn -> Print String, and i've run into the same issue. Player starts in sight of enemy, infinitely print that string forever, no matter whatever and vise versa
But I can't use the On Key Down in the widget to know when the shift is pressed?
Does anyone know if it's better to use my character blueprint in sequencer or to use a generic skeletal mesh and hide my blueprint? Any preference?
I have a value that needs to update on my ui but its not working. When I have it print string, it shows the correct value, but it is not changing it on my ui.
Dumb question, is the text component that shows the 33 set to a value in the UMG or an event binding?
UMG, I just added the event tick node and it works now???
Not ideal, but gets you going in the right direction 🙂 Good luck!
I dont know what else to do. Its weird that I had it working just fine the other day and then it stopped. I didnt mess with that code at all.
So tick executes every frame. If you go to the text component and go to it's value you can assign a specific variable, or an event binding. That's a better way to do it
The UMG itself has to have Tick enabled, that's the default setting so it should unless you changed it
I have it set up like Ive always done it where it works, but for some reason its not, its driving me insane, ive been stuck on it for 2 days. I have the text set as a variable and have a function to update it when the value changes
That's not the way to set the text
You want to store it into a Text Variable. Then bind the component to that variable
Don't directly set the text
What do you have in the binding?
Binding doesnt allow inputs in the function
Right, you have to design for that. That's why it's better to create a variable, likely a "Text" variable. Then bind to that
Im bad at UI, my set up is all wrong
This binding works, but Ill have to make an individual binding for each text variable and I know there is a more efficient way of doing it but it escapes me.
you can make ur current logistics expose on spawn, then u dont have to keep a reference to ur gamemode
also, instead of doing a foreach loop, you can use the "contains" node from your array
Without the ref to gm, i cant pull up my current logistics
you can, if you expose it on spawn and pass that variable on spawning the widget
This is what i have
Folks, anyone knows how to make top down camera controllable by the player, and then make a "true first person camera" with them?
Create a binding by clicking here. In that function, do GM -> Current Logistics -> MapFind -> Sustence -> toText -> Return
That looks good to me! Hopefully that works
it does, thank you, but now ill have to set up 6 more bindings for each variable
Yep, could make it a different way with a custom widget, or event driven from the game mode with an event binding, or creating a function that takes in the logistic enum (like sustenance or whatever) then THAT is called by the TextBlock's content binding. You can even select those 4 nodes in your image and "create function" as a shortcut
#umg will have way more help there
Thanks
Any suggestions how I detect if a click is within a closed spline, if the spline is to act as a shape?
That seems like a hard one, I wouldn't attempt that unless its really important
It kind of is. I'm making a 4x strat game and I was going to do that to tell if players are clicking within a territory's bounds.
I'm open to counter suggestions
is the territory a spline, or is it made up of cells or grid or smth
if it was planar i would suggest doing a line-plane intersection then even-odd intersection algorithm https://en.wikipedia.org/wiki/Line–plane_intersection / https://en.wikipedia.org/wiki/Even–odd_rule
but in a sphere it makes it even harder
and how is the spline shape decided?
like what is the 'enemy territory'
The spline shape is determined pre-runtime, I manually change the borders I had planned.
Could you pre setup that too, by placing some spheres or something?
Map territories tend to be rather non-uniform
Jagged with a lot of turns and all that.
I'm making a 3d object of the earth and kind of doing a 2d project and that.
It is a use case for others possibly as well though
It truly is a mystery what the best route will be.
For one since the spline actors themselves don't have direct collision, I guess I'd need to route through a list of all of them to find which is closest, which is even applicable, etc.
Hey guys, I am doing Gorka Mannequin look at me video but I got my character and animation from Mixamo, Now there is an issue where the mannequin is looking away at me, How do i resolve this? Someone mention its cause Mixamo and UE axis arent the same
https://www.youtube.com/watch?v=8skq8t_Fffk
Hello guys, in this quick and simple tutorial we are going to learn how to make a the AI look with its head at the player in Unreal Engine 5.
↪️Join my Discord Server, NOW: https://bit.ly/GorkaGamesYouTubeDiscordServer
👉Awesome Unreal Engine courses on Wingfox: https://bit.ly/GorkaGamesWingfoxHorrorGame
Check out my Steam Game! https://bit.ly/3...
@idle crescent Not sure how much you can improve that in Blueprints, but in CPP you could put the spline shapes into a grid map and reduce the amount of tests upfront.
Checking if the click is inside is probably gonna be a 2D Is point in Polygon check
Cant you do a trace and pick up the face index of the material or smth?
Id think each country had a separate index for easy lookups ...
If it's only a spline then there is no face to trace I guess
I have problem that my BP doesn't set character variable. Anim BP set to correct character
Does anyone know why the first blueprint doesnt work but the second one does?
Ingame the first one takes one second of input and then just doesnt continue further while the second is the usual unreal engine default but modified for clarity
Update I fixed it by toggling looping but the multigate switching between the two causes really jittery movement
Is there any other way for organization or do I just have to use a lot of node locking?
The usual default? I’ve never seen a template with multi-gate in it, what’s this for
Im trying to make a Turnbased/Free roam system
This will involve two sets of controls depending on state
The usual system is this
I just moved it and rearranged it to make things slightly clearer
The multigate is because of the sequential nature of this
Instead of making things longer
I want to make them taller
Im still cleaning things up here but its an example
Both things need the player controller but if I kept it horizontal it would be a continuous chain of stuff getting added into each other
When Instead I can better view things by having things seperated
The Initial Variable Chain
The Controller chain
The Event chain
Here the multigate works fine since it only runs once and the order doesnt matter
Well the main difference between your first 2 screenshots is that the gate’s first out can access the Y value in the 2nd screenshot but not in the first one. A good way to debug these things is to right click watch value on the pin, select a debugging object and observe it live
Wdym it cant access the Y value?
I mean your 2nd screenshot connects both movement input nodes on the first out of the gate, one for X and one for Y. The 1st one does not. You were asking what the difference is between the 2, that’s it
Ohhh
So it has to be the first out only
Because Yes thats the difference but I wanted to understand why that mattered
Having radialForceComponent, I want it to use its Constant Force the whole time (not fire impulse) when something is in the radius, how to do that?
These nodes get called but my crosshair UI doesn't fade in/out? Just does nothing? (I was able to get it to work on begin play, just not on these events for some reason, UE5.3)
To clarify, the print strings are called correctly, the animation is just not doing anything, am I using the correct nodes?
Hey, can you please help me?
Client Widgets are NOT showing in the packaged build. How can I fix it?
you'll probably get an answer if you give more information.
You've given people basically nothing to work off
I think I need a server. But I don't have one yet.
But I want to package my game and have the UI visible. Which it currently is not since its events are not running without a server.
Hey guys !
So I'm using Find Path to Location Synchronously into an AI move to to make a simple betting race game. The pawns are using a Floating Pawn Movement Component to leverage the Use Acceleration for Paths feature.
I works fine excepts for the turning of my pawns. They move straight towards the first point of the path, then snap turn instantly toward the next path point and so on until the reach the endpoint.
Is there a way to either make path smoother (curve instead of linear?), of affect the turning of the pawn perhaps?
Thanks
Hi guys,
i have a problem, i don't know is this normal or not. I have a object in a world and i trigger this with a mouse "On Clicked" and after 10 or 15 clicks isn't that more cosntant and he doesn't accept the click anymore.
i couldn't find anything about this on the internet, can anyone tell me if this is normal and i need to look for another solution?
Is your object "falling to sleep"? Physics turns itself off after a while by default to save on computing
this is a good questen, i dont know. But that's a good approach that I can follow up on, I didn't know that objects can fall asleep. but it makes sense
That would explain the inconsistency in the amount of times you can click it before you can't. The time for it to fall asleep is the same, but during this window you might not have clicked as many times as you did in the previous one.
Eh?
Have a target direction on the spline somewhat up ahead
Somewhat like this
Thing is they're not following a spline but just the basic path returned from the find path node. Though I have a spline, that I've used to figure out which pawn's first, don't know I you remember helping me earlier this week.
So it should go something along the lines of:
make em follow the spline instead of the path
use their distance along the spline to get a point slightly further than they are
use this point to rotate my actor
?
I can't figure out a way to query where they're at along the path, though
Using ai moveTo was it ?
yup
Not sure if you need to make your own for this tbh
It should be not to complicated
this is what I have so far
But
To help you out
Each ai can spawn a target actor which does follow the spline
And follow that
Have that as their target in the moveto
Dynamic target
Yepp
Otherwise, what was your previous suggestion, using maths to get a smoother tangent?
Well it doesnt work that well if you dont control the location/rotation along the wayb
Which kinda counters the ai moveto
Oh okay, yeah I need the AI move to so that the actuals stat of my racers are used, ie the accel, max speed, etc.
thank you very much for your solution's approach, unfortunately this was not the problem. I could solve the problem now by reducing trace distance. I don't know why this helps but now onClick is more constant
Glad you found something either way
Youd have far more control doing that yourself ofc^^
I don't know how to fix the error I have in the picture, the error code we told me is PIE: Error: Blueprint Runtime Error: "Accessed None trying to read property MainWidgetRef". Node: Set Inventory Vis Graph: EventGraph Function: Execute Ubergraph Survival Game PC Blueprint: SurvivalGame_PC and what can be seen in the picture, the error code shows me and I don't know how to fix it
How do you mean?
accessed none is pretty common error, MainWidgetRef is empty
Mainwidgetrwf is nullptr
Its just an empty variable
where do you set mainwidgetref ?
Custom component doing the driving logic
Guess its sort of redundant but a car without advanced nothing is pretty straight forward to setup
Seems like a lot of work for something that is just a mini-game inside the "real" game
I suppose 🙂
and the widget gets created, and added to viewport ?
what bp is this ?
and on what event ?
no i mean where you create and promote to variable, is it the same bp ?
and on what event are you creating the widget ?
because your variables null, so your execution order might be off
again, when does the creation run ?
i can see it's in the same bp, but when is it running and setting the variable ?
because it's most likely out of order, meaning it's not set before you try to use it
and where does Validate have to go for me?
i mean i guess you can use validated get
but i would try to figure out why it's not set yet
so it's basically checking if its valid and taking whichever execution path it is, valid or invalid
so if your going to use this as a fix, just put where you want to use the variable or somewhere before you want to use it
but it's just going to not work when you run it and it's not valid
but might be an easy fix, still i would see why your reference is empty by checking when you set the reference
Probably not set
i'm thinking its not on beginplay and the event hasn't run yet, but idk if it even added to viewport
but in this case i feel like that validated get is just a patch that isn't going to work properly
unless you looping the event or something and it's just null of the first go
Does anybody know if there is a node to create a variable that can be piped into the Geometry Collection?
I want to make the Rest Collection Parameter, so I can make this a parent BP
Nevermind, I think I found it
thanks anyway!
Hey all
Is it possible to know if an actor has been completely overlapped by another actor. I can think of some complicated ways of detecting this using traces and such but maybe there is an easier way?
I never heard of such a setting, but also never needed to know that
=== Overlap 🙂
Perhaps not
If they share the same collision primitive, it could be some simple math
^
Such as checking distance between center points of a sphere and then checking if the radius of the smaller ones still fully fits into the bigger one
But that requries either every shape to be handled or only using a given shape that you have the math for
a hacky solution could be just doing distance from centers
If they are both capsuls, that could mean a lot
so...the situation is that in my top down RTS, I am defining a playable area using a irregularly shaped mesh. I want to check if the buildings that I want to plop are within the mesh fully
or...and I just realised this...I could create a inversion of the playable area
If both are defined by a 2D polygon so to speak, you could google for "How to check if pol A is to pol B"
Which is probably gonna be "if all points of Polygon A are withing Polygon B"
Means you'd need to figure out how to check if a given point is in a polygon
yeah...but I think I just realised a better method. Since I just want to prevent the assets from being plopped in non playable areas, I can check of any overlapping in the non playable areas which will be a far more easier implementation
tough maths polygons
Interesting, so when I add set Geometry Collection, it crashes, no matter what
looks like an engine bug
Well, thanks for helping me clear off some mental blocks
I tried to set rest collection in the construction script, on a variable, but it just crashes, as long as the setRestCollection node is used, it results in a crash
even when I create an component, in the BP base, and then try to modify it. I wonder if anybody else get the same situation?
Interesting idea
What are the colliders?
The plopable actors will have cuboid colliders, maybe with the pawn preset. The idea was to have an invisible wall collider in the static mesh which defines the play surface
If they're cuboid you can check if all corners of A are within B like a bounding box test. That'll be easy.
It'll just be a transform location -> bounding box test problem.
I think I have simplified the problem I had from needing to check if my actor is always fully inside the playable area to checking if my actor overlaps, even partially, to the area outside my playable area.
Defining the playable area is a challene I am working on though...
As I want the playable area to be based on a heightmask I have
Hi, I'm actually doing a level based on directed graphs, where, on load, the level activate and desactivate some bridges or doors, here is a simple version of this idea, where I set the paths manually in code (On the screen capture). I would like to use an algorithm, to find all the possible paths, in a larger graphs, to go from spawn to end of the level, then, activating only the bridges/doors of this path, I'm searching how to do that, can someone maybe help me ? I dont know if I'm clear, sorry for my average english
Unrelated to your question, but switch on int exist ^^
I'm still new to unreal, I will edit that, ty xD
probably one of the hardest algorithms to do, theres brute force way
Yooo, why there's no convert to pure cast here
oh ok, i c
there is no simple way to do it ?
a brute force way is fairly simple just check all paths and get the shortest
but you want a specific path ? or the shortest ?
the traveling salesman problem is essentially unsolved
i feel like this is similar
I dont want the shortest or a specific one, i want all the paths, then, randomly using one
ok so that's not as bad, you'll need some way to store the paths
maybe some sort of array ?
you may need multiple arrays idk or there could be better structure for it
Yeah probably an array would do the thing with a random int selecting one inside of the array
well you would need a few arrays for different paths, and just select one
or you could store the connections in a string and make use of parsing to have like a 2d array
still a bummer no 2d array in bp
Imma restart my unreal engine to see if my Good old unreal is freaking out 😄
yep good old unreal engine 😄
For now, I have something like this, but, if my level had like 20 rooms instead of 2, I would be dead before having listed all the possible paths with my hands, so, I dont know how to make an algorithm doing it for me
just generate a random path if you can
why generate a few and pick one ?
just generate one
wouldnt it be easier to proc gen the entire thing instead of premade
this looks premade + LevelBP
procedural generation ftw
drop a block, then drop a bridge, drop another block, drop a bridge and have them set to specific offsets
depending on the bridge
All the path will already be existing, the doors will only open randomly making a path, but I need the path to go from A to B without looping or those kind of things
I think You should use the GameState Blueprint and create an empty nested array (There will be an array of rooms, the rooms themselves are also an array which are contains the doors) and in the begin Play of each room cast to level blueprint and add themselves to that array (Assuming that you can create a representative blueprint for them in the level)
you can cast to level bp ?
i didn't think so
Nah you cant access levelbp in bo
Oh then GameState can be used for the same purpose
the doors being the blue things ?
i don't see doors
yes, or, wait a second I'm searching an old drawing I did for this thing
here, blue things are doors
this looks like a maze
I checked my own project and I use Game instance for controlling Global Variables I want to pass and manage around on my inventory system.
i like to use game instance
I dont want to generate the level, I will literally generate nothing
It's the way to avoid hand selecting variables 😄
so you just want to open the doors in a path ? or they will open randomly ?
my bad mine also called Game Instance
you can hard code the paths in an array of bools, so the index would be the door and the bool would be open/closed
With code, using a random path, in all the possible paths, that is not looping and have the right start and the right end, open all the doors of this paths, and let the other one's closed, so the player, on each restart of the level, will have a different path
^
then have multiple arrays, one for each path
and pick an array and loop through and set the doors based on the bools
But, that means defining myself all the paths ?
yes, defining a path may be as easy as just testing some random paths
or you could just open them in a random sequence
but defining a path, that would involve have some constraints or variables that tell it a particular type of way
other than random
No question on this one but just wanted to share, looks kinda scary 😄
beautifull
you can definately generate random ones, but you'll need a bit of code to do it
you'll need to know what room your currently on, and then pick a door that wasn't what you came from
since theres only a few options of door you could generate a bunch of paths pretty quickly
but choosing the "best" one, that's all in how you want it to be structured
it's pretty difficult to pick the best one, i would just generate it based on some variables
like favor down, stuff like that
the "doors" are the blue things ?
or what is a door that your saying about
yup
i mean your floors can have an array that has the state of the doors around it, might be a bit tricky blending them together like matching doors but should be doable
then just loop through your floors and switch some state around
to change the doors
use the index for north,south,east,west
0,1,2,3
I will take a bit of time to present the problem more clearly, I need to see it in a mathematical way to explain it I guess
so the floors are premade ?
but your generating the doors ?
or the doors are premade too ?
everything is premade
ok so you just want to make visible the right path
yes
i would find a way to attach the surrounding doors to each floor
so you can make a path
if it was me each floor would have four doors around it
that can be on/off
so you can loop through the floors and set the doors properly
to create a path
I've for now, thought that, assigning a number/letter to each door and segments of the paths, would let me say : choose a path starting from the Spawn to the End, like [S> AEHGF >E] opening doors between A-E E-H H-G G-F (for example) and, for each door, an associated numbers to simplify that in the code, I can define all the paths manually like that, but, to have a wide list of path, I need to calculate all the possible path, so I will have a list of path, (so for each path, a list of doors), then activate each
like in maths graphs
euler algorithm etc...
but I dont know how the engine can make the list of possible paths by itself
without me precalculating and defining everything in the code before
because, I dont want to make a list of 150 paths and doors myself
i mean you have all the doors premade ?
why not just generate random paths ?
if you want 150 paths it's probably close to randomizing
and you could put some variables in that say favor down like i mentioned
then you would just need the path you can take from each one, pick a random one, move to next
i doubt thats possible
that it would be able to do that
because you made this up yourself, so how would the engine know about it ?
The base idea is this : https://www.youtube.com/watch?v=TrEloQBv7WQ&t=447s
In this video I have shown how to find all possible simple paths from one source vertex to destination vertex using a simple Depth First Search, something which will be very useful in competitive programming.
Algorithms Playlist:https://www.youtube.com/playlist?list=PL6tQsxnnBiDivAKpD2sy-PHOevJtFuGOR
Placement Preparation Playlist:https://www....
but I dont understand the guy in the video clearly, and dont know how to properly use C++ and affect that to the level after
c++ would be more performant
but finding all the paths could be like i said
loop through the floors and pick a door
goto the next room
pick a door
go to that room, pick a door
if you hit a wall it's not a valid path or you want to try another way
Okay, ty, will work on that and see If I can do that
usually pathfinding algorithms can be quite a task
i feel like you would need to open random doors check path, open random doors check path
how would you use the navmesh to find a path when doors are just there to begin with ?
just make sure to check the door you pick is not the one you went in, or it's f'd
you can make a NavMesh ignore doors
or , turn off door collision when calculating path , and collision back on after
won't it just give you the best path like a straight line ?
you wouldn't even be going through doors
You would if it had to for turns?
any pros here? why actor spawned during runtime in world partitioned map not getting unloaded? Just empty actor with mesh. Same thing with this actor placed during runtime manualy. If placed in editor before simulation it behave normaly and gets unloaded at distance
https://www.reddit.com/r/unrealengine/comments/13dkeol/world_partition_not_working_properly/
this says something about references and how they are still loaded
not sure if that means "loaded" in the level or "loaded" memory
Hey guys. I wanna make a system where a dynamic Float variable is input into a timer that finterps a float value from 0-1. I would love to use a Timeline as I've done before with similar setups, but the length of a Timeline cant be adjusted realtime, or am I wrong?
Can this be done with a Timer, if so how? 😅
you can adjust the Rate the timeline plays
Set PlayRate
So if the timeline is 1 sec, and you want it over 10 sec... 1/10 = 0.1 playrate
yo how do i keep a constant size for all objects, like if something is big how do i scale it down and if something's too big how do i scale it up
im trying to make a pickup system and i want to keep a constant size for every object
good idea thanks
maybe something like a loop the scale up or down depending on the actual size
once you get some numbers in there you should have a close approx
Hi guys!
In my project I retrieve some data from the database (from a server), but can anyone explain me how to save this data inside the server to keep it available for clients connecting to the UE server?
Let me explain: the logic is that of an MMORPG, where the database contains in the table the objects and their standard values, as I think it works in every game. So, taking via an API call the data from the object table, I should save it in the Unreal Engine server, right?
If the reasoning is correct:
- How and where to save this data within the UE server to keep it available to people who log in without making a per-client call each time?
- How do I connect a possible icon and 3D model to the data received from the database?
i feel like your data storage should be done with your api
and kept on your server
it's an api that gets data ? but you can't save with it ?
doesnt help much, idk, why is there so little info about wp
its like nobody ever spawn actors during runtime
with world partition enabled atleast
ya i have not used it much, only in one project it just turned on and i'm forced to select a region every time now
Do I adjust the Time outputted, or are you refering to the New Time float?
The builded server from source with ue
Get a reference to the timeline
I take the all data from table with API from UE Authority, and with matched data table, i take all info correctly, but idk where i can save that for replicate to all client
Thats how you access the playrate
That's just an instance for ppl to run as server isn't it? Dedicated or listen
Not soo much about where one would store their save file
Dedicated server
You can save the .sav anywhere but an mmorpg would probably not use any of the save file by unreal
They would handle storing and loading from their own server (actual physical one) somewhere
Not soo much about where one would store their save file
Yes it's not the file issue, in my head I thought about saving the data in an array with structure and make it replicated, but I don't think that's the correct way to do something like this
if you just use an array, then when the server shuts off your f'd
unless you can serialize an array ?
maybe just save it every so often or on change
You gotta decide whos saving what. An mmo obviously doesn't save anything on the client.
And an mmo won't even use unreal replication system
Yes of course the server doesn't even allow users to log in, but if it is restarted it takes the new info from the database and shares it back with the connected clients, and to do it via a variable seems really unfair to me
Software engineers would develop their own system
if you can read from the db, why can't you write to it ?
No mmo in unreal I know use unreal replication system, it is not cut out for mass players
there is thing called savegame object in unreal
This could work aswell I guess? Thanks for pointing that out! 🙂
Why not? I think its a cool system
its not even cut out for small scale stuff 🤡
I can, but store them in the server and not in the database so as not to have clients repeat calls to the database
i'm not sure what that means
you can store them in the server, but not the db ?
or that's just what you prefer ?
because saving to the db every so often will make it persist
he caches the database in the server
that makes sense
Oh, yes. That gotta be new ? I bet it does the same under the hood (adjusting rate)
but you still need to save for it to persist or the thing crashes all your data is gone
Because it's network system isn't built for it.
You're gonna end up writing a lot of custom code in C++ for an mmo
Oh, and the millions of dollars and the network engineers, make that easier of course
Why did u say that?
Id imagine you could optimize it quite a bit for each player, but the server would still have quite the workload if theres some people playin
I have object data in the database that I call via an API, the call should be made from the dedicated server and not from the individual clients, so the object data should be made persistent in the server so that not X calls are made but only 1 from the server and then replicate the data on the connected clients
because its true, you can only do the most basic of things in blueprint with the replication provided by unreal
Open doors etc
and the problem is ?
it doesn't work ?
My problem was that it doesn't seem like a right choice to save the data in a variable by the server and then replicate it to the clients
That make me sad
This more D:
well yeah, its kinda limiting
the unreal replication already fails at something simple as changing ur movement speed
any multiplayer game is not suitable for bp only really.
C++ is mandatory the larger in scope you get.
A bp only MMO is impossible
though i saw this plugin...
If it was just a matter of C++ it's not a problem, the problem is that UE's C++ code is very custom and it's not enough to know the programming language, but the whole structure and how UE thinks, that's the real problem
You can absolutely get by, just from knowing C++
Source: I am getting by, just by knowing C++
Once you know C++ you know how to find information that you want
In this video I will explain the new Hub World MMO series: What is it? How is it going to work? And how can you leverage it in your game project.
Open World Server 2 & Hub World MMO Discord: https://discord.gg/qZ76Cmxcgp
OWS 2 Installation Instructions: https://www.openworldserver.com/
OWS 2 Source Code: https://github.com/Dartanlla/OWS
however, i think we will get new multiplayer system in unreal soon
i think beta is already available? what was it called?
Iris you mean?
yes
Nothing that would allow an MMO
The only person I know of in this server that's done an unreal MMO would be Sukebi, and they rolled completely custom replication.
well i dont know c++ lol
but i think i can make coop game in blueprint for 8-16 players
I wonder how that'd perform with 16
Depends om the complexity of the game ofc
16 ppl open doors with keys shouldnt be much trouble
I shall quote nothing more than #blueprint message
Anyone has idea of how to create this spear throw attacks?
it can work out if you are aware of what needs to be replaced by c++ eventually xD
So ultimately it is virtually impossible to create an MMO with UE, unless you have a team or so much money, that you can pay someone to recreate the system behind UE users' connections?
that or ure some sort of savant
Any larger scale multiplayer game needs an experienced network engineer on your payroll
For an MMO, you need many of them
Whats the biggest bottleneck with ue tho? Is it how the replication system works?
For an MMO, that is
For blueprints, it's the fact that they're just too slow
For large scale, it's just that unreal isn't really designed for that
@valid oyster apologies for the ping, but what did you find were the largest issues with Unreal's built in system
Depends on how you do the MMO part
The one thing that annoys me with unreal is it has no amazing way for large data streaming built in 😆
i wonder if bohemia studios realized that already or if they are still trying to recruit here for arma 4 🤡
But most of the time UE replication system is built for shorter sessions
Without RepGraph or potentially Iris, you can't even run more than 64 or so players on the servers
And that is already a lot
do you really class arma as an mmo though? 🤔
well with what they want to do it kinda becomes an MMO
but yeah, if you want a good reference of what large scale multiplayer in unreal engine looks like, check ATLAS or ARK
Tbh it doesn't matter what you call it. As soon as you do something else than what UEs replication system is for you gonna have that issue
it lets u put 300 players into a map, but its a lag hell
And the limitations are pretty straightforward.
- Roughly 100 players per server if properly optimized
- No seamless switch of servers
And with that most MMO stuff somewhat dies and you gonna want to run your own system outside of UE where UE is only the client
So really no commercial engine is good for games with more than 100 players. The only solution is to create a proprietary engine with its own system behind
One would think someone made the MMO Engine
Guys, but still I read around that TERA was produced with UE 🤔
yeah, but probably not in blueprint
for an MMO? the biggest issue is how slow the communication / replication actually is (when using BP), one of the second issues is that unreal's system doesn't scale, for example 1 server can barely hold 100 players, and that's with basic* logic, anything more complex and you're going to have to come down to 40-50 players max, and basically have some kind of hub world connector, and instance those 40-50 players so they are never on the same server.
So tat's not true
there is an mmo engine, but you wouldn't understand the code
10 years old though, no successful mmo's from it
each of our servers can hold a max of 5,000 players
we can't show that many on screen of course as the client will lag, but that's our current capacity per physical server
we made a custom "server" and implemented a custom socket derived from unreals FSocket class
that's how you start with an MMO, then you have to figure out how to keep the socket persistent
after that you can control all of UEs functions however you please, if you know how to communicate between server/client and implement functions that occur on certain messages from the server etc
Unreal is already one of the most MMO friendly game engines out there due to the actor system, you just have to understand how unreal does it and think in the unreal way
But still, not in blueprint 😀
Right, not in blueprint
there used to be an unreal MMO discord
was really cool, someone created a whole MMO framework in UE
i think minimal C++ was required
there, again, haven't seen any success with this either, but the developer showcased some decent performance, no getting around the 40-50 player limit though
i believe there was a way to use one of the external cloud services that offer unreal dedi hosting to allow you to overcome some of the limits
is it because he already has an animation and im playing another one?
no it's freezing because you're causing an infinite loop
That looks like an infinite loop to me. Should you be setting CanAttack to false again at some point? Because you set it to True, then loop when it's True, which is always
so should it be when false instead?
The Output Exec pin of Play Anim Montage isn't fired when the Anim is finished (which based on your code is what I'm assuming you thought would happen). I think the setup could work but you want to fire the Attack anim again after the previous one is finished, your current code would just infinitely play the same animation over and over again every frame
don't do janky loops like that, use a proper for loop when you need it
an infinite loop with a delay won't crash your game so that's a good start lmao
why is it not smoothe
it is smooth?
when going from idle to walking
You need a blendspace for the Idle anim and the Attack anim
i did
of course
- Version du moteur 4.26
Download Content :
Download Animations : https://mega.nz/file/ReRmHb6L#bw62S5FGppwHtMUQZIurQJWrSNmK3rukJy3YpvjTpmU
Download the project : https://www.patreon.com/posts/89285229
Marketplace UE : https://www.unrealengine.com/marketplace/en-US/profile/Mat+developp?count=20&sortBy=effectiveDate&sortDir=DESC&start=0
Mon P...
how to fix?
he's using skeletalmeshcomponent's play montage instead of the character one
it has an event for on completed
it's still horrible jank (and you have a wire going backwards)
but at least it's not an uncontrolled loop
if you hold ctrl and move along it, does it look right ?
what does the anim look like that runs the blendspace @stuck sentinel
the animation blueprint?
and it's probably getting to the walk speed too fast
move the walk farther toward 400
but i need the character to be slow
I think I found what I wanted is a blocking volume.
maybe turn the max acceleration way down
did you ask in #animation ?
bro
the problem is that he is calling the animation on an event and not as he should be doing it
Can I make a complex, non primitive shape of a blocking volume somehow besides copying it off a mesh directly?
You can use UE5's Modeling Mode to shape a volume
Yes, I saw. Can I copy that volume's shape to another actor's?
Another blocking volume
Hmm, I'm not sure. I'm used to working with something bespoke in the studio, so I've not needed to do that with out-the-box Unreal
What's your use case, exactly?
I think I can just attach the blocking volume to the actor and go from there.
I'm making clickable map territories, and this should do it.
I'm trying to save an array of actors, however whenever I try to load (2nd image) the array as a data line but no data on it, however when I am saving (1st image) all the data is there, everything else saves fine, just the array seems to empty? Can anyone help?
Afaik you cant really save actor refs
Without some trickery anyways
Runtime spawned i would assume?
Ahh okay, that makes me feel better because I couldn't work it out, I just need to spawn actors back in their locations so can figure a work around just annoying me I couldn'y figure out why it wasn't working
With my current GameUI, I have dialogues like Quest and Inventory which are created in the beginning and just have their visibility toggled as needed. This means I can bind events to buttons and I use event dispatchers to pass things along.
I now want to switch over to using CommonUI with Enhanced Input so that I have "better?" control and design for console controllers. This is proving interesting though. The CommonUI widgets methodology is that you treat widgets as non-persistent (loose term here). So you update the contents every time you pop the widget onto the view stack. So I'm thinking of switching over from the current bind-event method to a pub-sub method. Click a button, and it sends a message via a channel to anyone who is listening. Have another subscriber react to any messages etc.
So 2 questions: 1 - is this a bad idea? and 2 - what to use for the pub-sub messaging mechanism?
lyra has a build in messaging system like that afaik
How to have the white squares organized properly like this and having 10 of them in each row automatically ? because in this case I used the Grid Panel but after the 10th one I had to manually place them otherwise it would continue to the right side of the panel forever. Like I want later to fill it dynamically and have this 10 items per row.
Yes - the Gameplay Messaging system in Lyra is what I was looking for - thanks.
Can you set a fixed width on your vertical box, so that the horizontal box remains with it's limits?
Otherwise use a "Wrap Box" instead of Horizontal Box
Wrap Box lets you set an explicit wrap size.
Thanks 🙏
Another question, is it possible to make that white square modifiable manually because I made a widget called "WB_AbilityIcon" containing an image + a text for the name of the ability, and I want to expose it in the details panel so I can modify it to put each image I want, is that possible ?
Set your wrap box to a variable, then you can programmatically (in BP) create and add the WB_AbilityIcon as needed. - yes
But my question was about how to do it in a non programmatically way
Then I'm not sure 🙂
I mean the answer is definitely yes - I'm just not sure what steps you would need to take.
On second thoughts, I got it. Open your WB_AbilityIcon and make the image and the text into a variable. Set the Variable to "public" and check "instance editable". Then it will show up in the details panel on WB_GameSettings
In the sub wbp
Gives me this in the parent wbp
Where do I set it to "public" ?
beccause I don't have that option, and it doesn't let me press the eye
Click on "Graph" in the top right corner, then on the left list click the "closed eye" icon and change it to an open eye icon.
it doesn't let me click on the closed eye, like clicking it doesn't open it
like it flickers for a sec but that's it
I'm not sure to understand what it means but I simply created a simple Widget Blueprint for it
and it's not a child to a base class
Maybe it doesn't need the public - let me check
Well shoot - I guess you can't on a widget object as a variable, only on normal variables.
snif
You expose the variables of the widget
Not the widget itself
So an icon and a text variable
Which are instance editable.
@main lake
I can't expose the variables themselves either
when I press the eye it doesn't let me do that
I restarted and still can't do it
Clicking the right eye?
yeah it flickers but it doesn't open the eye
Show me
show you what exactly ?
The variable in the bp
Tjis ?
You need a new text variable
why ?
Because
I'm not sure to understand
You cant expose the components a widget is composed of.
Like I'm trying to make my Txt_AbilityName instance editable so I can modify it manually in my WB_GameSettings here
So I can give each icon an image and where it's written "Ability" give it a name
And im saying , to do that you need another variable
So I create a simple text variable ?
You camt expose the elements directly. You need to go through regular variables
Yes.
Then on Pre Construct you update the txt_AbilityName
Pre construct allows you to see it at editor time.
Same with icon
What's the equivalent of "SetText" but for the icon (so Texture2D) ?
So like this ?
Test it
my bad
Accuracy matters
indeed, thank you so much 🙏
Another question, is it possible to make that number 4 be centered, because I didn't find the option to do that as pressing "Horizontal Center" it shrinks the size of the comboBox and I want it to keep that size
already set to Fill
Im sure theres a text setting for itn
In the combo box details
Under the font settings
oops
Nothing
Seems you are corect
no setting for it
you can make your own, but thats.. troublesome 🙂
How ? 🤔
Also how to apply a filter on top of my image so it shows the image in a grayscale (I want that to make the player understand that it's disabled) 🙂 ?
So for this, I would have 3 variables, each to store a different image. 1 image is pre-grayed for disabled. 1 for "enabled" and 1 for "mouse over". Then you use the various mechanices in the graph to swap which image is being displayed at any time.
So by default you have the grayed one, then onActivate you have the enabled one, and onMouseHover you have the third.
It is made for small scale competitive shooter game
I wanted to avoid having multiple images for this, so there's no way to just apply a filter on top of the image ?
Not for mmo
And like exi said, unreal doesn't even support multiple world out of the box
by desaturating it
You could also place a 2nd image(just a grey box) on top of the first image with a low alpha and just enable/disable that image.
this will make it greyscale
@keen kernel tera and blade and soul are made with unreal engine. They certainly roll out their own multiplayer implementation. Not with unreal replication system.
Each player is a client and they just communicate directly to their backend if I must guess
But that's in a material 🤔 How does materials work with Widgets ?
🤷♂️
UI material?
Check UI lab for samples
bruh
How did you do that mister the Wizard ? 🤔
Could you show me what Slate looks like please ? 👀
Is it C++ stuff ?
yes
[
SAssignNew(ComboBoxContent, SBox)
.HAlign(HorizontalAlignment)
];
the original ComboBoxString doesnt have allignment parameters exposed
for the ComboBoxContent
both HAlign and VAlign exist..
the actual dropdown is still left alligned
They should make that part of the default unreal for people to use
no, because it terrifies me
If you really want this, I'd say this is the least you can do 😄
subclass the comboBox
.h
UPROPERTY(EditAnywhere)
TEnumAsByte<ETextJustify::Type> TextAllignment;
virtual TSharedRef<SWidget> HandleGenerateWidget(TSharedPtr<FString> Item) const override;
.cpp
return SNew(STextBlock)
.Text(FText::FromString(StringItem))
.Justification(TextAllignment)
.Font(Font);
Weird that this isnt in the default ComboBox tho
could easily expose the text justification
I agree, is it possible to bring that info to Epîc Games so they can add that in the next versions ?
I just learned that I can put materials where the "Image" property of the Image widget is, and I'm wondering how to do the gray thing from the example he showed above
Why ? 🤦♂️
sometimes forum suggestions work, though if you want something done it's usually better to make a pull request to UE's github page
with a suggested fix
the fix would be in ComboBoxString.h and .cpp
.h to expose the setting
UPROPERTY(EditAnywhere)
TEnumAsByte<ETextJustify::Type> TextAllignment;
and the .cpp to push the setting to the Textblock used under neath
Line 450..
return SNew(STextBlock)
.Justification(TextAllignment) // This is new
.Text(FText::FromString(StringItem))
.Font(Font);
...
No clue how one would do that in a PR
I'm trying to calling an integer value from another blueprint to spawn something at a value. Pretty new to blueprinting, this made sense with what I know but it's not working.
When I clear and invalidate a timer, if I call the event that is setting the timer and the timer handle later, it never runs the event. Is there something else I have to do before I can use the same Set Timer by Event node?
If I never clear and invalidate the timer handle it works fine
But I should be clearing it every time I am done with that specific instance of the timer before I start a new one right?
Clearing and Invalidating is only really needed if you want to stop the timer before it calls or if you want to stop a looping timer.
Probably Accessed None errors?
Okay thank you
Which would mean you made a Variable but never actually filled it with a ref to something
Hmm
When using FInterp To, is there any way to get delta time without using on tick? I want to interp between current and a new value inside of an event without binding to tick event
Another multicast users >_>
Just using it for quick testing, going to change it to an event binding later
In an onRep
Is that better?
Your CountRef variable is basically a container @coarse condor
In CPP you would call it a pointer that points to data in the memory. By default a fresh pointer points to nothing. The container is basically empty.
You can have lots of Counter Instances in your level. UE doesn't magically know which one you mean.
There is a video pinned to this channel, it's a bit older, which explains BlueprintCommunication
dela time = time between last frame and current frame
it's different on each machine depending on their hardware
Is there a better way to smooth transition between something then? I've only seen FInterp To
You could use a Timeline that goes from 0 to 1 and a Lerp node
@surreal peak Here's more of the blueprint. It is calling to another blueprint. Well I think it is anyways. I'll look at the video as well.
Gives you also more control via the curve you can freely customize
You better do so. The get all actors of class node shouldn't be used for every little thing hehe
Is it possible to do something like that in a widget graph? I am using FInterp To there as well. I don't see an option to create a timeline in those
Timeline is a component, so that's Actor only I guess
Widget Timeline can be used as subtitute
I don't see that. Does it work differently than just adding a timeline like you can in an actor?
Oh okay so it's an animation thing. Thank you 😄
And in regards to the multicast? Is this what you suggest instead or is this still bad?
not a multiplayer expert, exi is
but imo 98% of the time u don't use multicast
seen youtube tutorials spamming it a lot, you can unlearn that if you watch them
Some rare case I would use multicast is like special effects
like gun fire
it won't matter if they get dropped so just use multicast
Wouldn't that go in a rep notify?
I agree, I rather think you need a RepNotify
That makes sense. I don't plan on using multicast, just using it for fast testing replication before I do a full implementation. I am not fully sure what is best for what I am currently doing though, so I'll probably ask in multiplayer when I get to that point
basically you dont need to network this at all
just run it on client and server
It’s on game state and I am calling it from game mode. How would I go about that?
well yeah, in that case u cant run it on client
Yeah that’s why I’m not sure what the best solution is. I’ll ask in multiplayer tomorrow
probably the correct solution is to implement that function somewhere else
I would still be calling it from game mode so I would need to notify the clients regardless of where it is
there isnt much of a point in putting stuff into gamemode except making it server only
but yeah, using a multicast should be fine for this
Hmmm okay. Im using gamemode for checking and initiating stuff relating to the modes and then calling delegates to notify when something needs to be done. Checking score and ending round if it’s a winner, Determining when a full team is eliminated, etc. is this bad practice?
but u will have to network everything to the client
instead of the client just running the same code as the server
Would you be willing to elaborate on this a bit more? Where should these things be running then? I don’t want a client to determine if a player was killed or if a teams score should increase. The server should handle all that I thought
well yeah, but the server will run its own copy
and ideally everything will be in sync
Where is the best place to put stuff like this relating to the mode and game loop then?
i would just make a new actor
they can run where you want, and are replicated
you can ignore gamemode and gamestate completely
Okay thank you for the advice. I’ll do some more research 🙂
I appreciate the explanations!
Hey guys, I'm having trouble implementing my interaction blueprint interface so that I can display notes in-game. I currently have the Blueprint interface setup and my character blueprint implements the interface with a line-trace when things are interacted with. In my notepickup BP I have the interaction event from the bp interface toggling the pickup which leads to pickup and put down events nodes in a branch
None of it is working currently though and I can't even get a debeug print string to appear when I interact with the note
maybe u want to make sure ure actually hitting the actor you want before calling the interface
In the note blueprint or the player blueprint?
player
I thought I was doing that with the line trace to branch and break hit result checking for actors that implement the interact blueprint interface
i mean check if it ever even produces a result
It works on these doors I have
I'm using the same line trace and break hit result to check if these doors are unlocked
but maybe u dont have proper collision on that item
I think that's what it is maybe
I didn't change anything with the default collision from the object I imported
Should I regenerate the collision in the mesh or would it be something in the note blueprint?
you can add a collider with a custom collision group for interactions
Like a box collision in the note bp?
yes
So I made the box collision and added the on component begin and end overlap events
Should I connect it to the blue interact node that comes from the interact blueprint interface and then to the toggle pickup event?
you dont need any overlap events, you just have to set the collision channel to the same as your line trace
I'm a little confused by that. What do you mean set the collision channel?
I went back to the details of the box collision on the note bp and I dont see collision channels but I did change the collision preset to custom instead of overlap all dynamic which was what it was set at
this
Okay Im there and I checked simulation generates hit
you give it same object type you used in ur line trace
I was able to get it to display the print string but it's not activating the toggle pickup custom event
You give what exactly? In the details of the box collision I'm guessing I should make sure it hits all actors?
If you don't have ANY previous knowledge with line traces in Unreal Engine or if you want to learn about them in GREATER DETAIL then this tutorial Was Made For You.
▶ Cheat Sheet: https://bit.ly/CheatSheetLT
In this tutorial we will go over everything about line traces. Then at the end, to put your new line Trace knowledge to use, we will creat...
I'm noticing now that it's displaying the print string twice for some reason
It's interacting twice
Hi guys. I have a question
I figured it out
I got the text to popup
I was checking for interaction and interacting twice in my player bp
Cast to impact on performance so if I use get all actors of class and promote to variable then it's soft reference?? Or impact on performance??
@limber parcel
if you get all actors of class, it will be hard reference
please dont ping me with random questions
So i can only use the interface for soft reference
Can you help me figure out why I'm getting this weird behavior where it looks like the text is popping in from the left side of the screen?
Nevermind, since my game is in the square aspect ratio anyway you can't even notice it in the actual simulation
I am having this issue where when I pull up my menu, which pauses the game, sometimes when I am using a button that is also mapped to something with a montage or sequence on it to unpause it will lock up the game where everything looks like it's working, but there isn't any input anymore...
Morning! Is there a way to make a box that grabs everything inside of it on Begin Play? I want to make a enemy respawn system that is tied to a certain area of the map, so once the player has reached Checkpoint X, it turns off the previous area and on the new area. So it would be:
- Add enemies to the level
- Add enemy respawn box to the level
- On begin play the "active" box or the one being turned on grabs all enemies and places them into an array
- If the player dies, all enemies in the active array gets destroyed and respawned at their inital position again
I want to do this, so that I don't need to reset per enemy when the player dies and change all the variables back, but rather just destroy them and respawn them with their inital values.
And the reason I want a box or something more size controlable is that the Switch isn't at all powerful to store all enemies from one level and respawn them... So i need to dividie it somehow into areas.
I tried the "OnBeginOverlap", but is the enemies are already inside the box, it's not working properly, so trying to figure out a better way for doing this.
Get overlapping actors
Oh, didn't know there was something like that. Thank you will give it a go and see!
It even has the "Class filter" so I can avoid a cast! Thank you for this tip!'
Hmm, I'm a bit confused, it seems to grab everything that is an actor except for my enemies. It grabs everything in blueish, and ignores anything that is red (which is the enemies)
They are Characters and it seems to ignore those, and as far as I can see there is no "Grab Overlapping Characters", and I thought Characters was just a type of actor?
Actor is parent of Pawn is parent of Character
yeah, that's what I thought. So it "should" grab them, but for some reason it just ignores those.
So it will grab every character unless you didn’t set its collision to overlap properly
Or the more obvious, not actually overlapping
Select a class filter
Yeah, I double checked that one. and they are inside the box.
Sorry, I had a class filter set, but it gave me a result of 0, so wanted to see if it grabbed anything. 🙂
Change your collision presets on the mesh too not necessarily the capsule
And make sure the box is set to overlap all as well
Or at least overlap those chars
Set all to collision presets (mesh, capsule and overlapping box), to OverlapAll and no change. I'm confused. I will look more into this and see what I might be doing wrong... Because it must be sometjhing since it grabs anything that isn't a character.
Also, where is this event being run, on begin play?
Yeah, on jbegin play
Right so that could occur before your chars are loaded in
Oh, that miught be it.
Add a 1s delay to test
That was it. :d
😄
Is there a "level fully loaded" event I can use?
Or is a delay the best solution
Delay is rarely the best solution but it works here. Idk about level fully loaded, there are some cpp functions that fire when something is loaded but I think you’d need to do that from the char side
Okay, thank you! And yeah, I try to avoid delay as much as I can since I'm a bit scared of it breaking. I always feel like the "Event Timer" is more secure, but also not ideal.
But for now I will go with this, and look into a more elegant solution if I find issues with this.
Thanks for the help with this and figuring out the issue!
Timer by event is good in most cases, there’s also Laura’s coroutines but that’s a bit more advanced
anyone knows why is this happpening..
its working fine most of the time but sometime this happens
Hey guys
Anyone has an approach to break down a complex task into simpler steps?
I'm somewhat comfortable with BP, but have not been programming previously.
Right now I'm trying to think through how I make a flexible setup for various buffs/debuffs in my game.
It will most certainly include timers.
But I would like to make it modular/flexible to be able to do the following:
The variable to buff varies from a quite long list (20 stats maybe)
The way it is buffed can be both additive or multiplicative (the math I think I can do no problem)
The actual value to buff with (additive or multiplicative) can depend on different criteria's (how many monsters nearby, distance to monster, how many times monster has been hit, time since it was hit, etc.)
Some maybe do a flow diagram first?
I have done comment layout for simpler things in the past like in screenshot
Just scratched that idea yesterday. Looked into setting it up. Will have to learn C++ for sure to get anything out of it.
I don't think so. Already set up a boiler plate GAS that worked. Had to get into custom Execution methods right away.
Which meant a bunch of C++
other than that, my only idea is probably looking into some marketplace stuff.
I'm using Dynamic Combat System for my old project, it have buffs that can be stacked, removed, applied, with timer etc
all in blueprint
but it goes without saying that is many times less useful than GAS
I honestly did not feel there was much to gain from GAS in my case. I have very limited knowledge with it though.
It can do some timers/tag checks for me. Rest was not that useful for me as far as I could tell. And those 2 should be fine in BP?
I mean it could also do complicated calculations and such, but just not without going deep into C++
From what I see buff isn't really that simple and it's really tied to each project if you are not using Gas.
I can only recommend Dynamic Combat System from marketplace to look at as alternative
Okay. Thank you.
Just to ask BP specific things. Is there a way to have an input for a custom function be a variable?
(not a value, but actually input the name of a value or something + a value and it will add/subtract etc. from the correct variable?)
in Anim Graph, is there an equivalent to Soft Pointers? I don't want all animations to be loaded immediately as soon as I use the AnimBP on my character, instead I want it to only load animations only when it's about to use them.
this would require some c++ ... 😛
this buff system sounds like it'll contain quite a few loops aswell, so it would probably benefit from being native code aswell..
I looked into using uobjects for the buffs/debuffs. I never finished the system but it showed potential. The buff/debuff object would then specify the stat/s it affects and the logic required to apply it.
In your stats manager you would then add and remove the objects when needed.
I only have 2 main classes to change variables on (towers and monsters)
If I check class first (or do 1 for each class) then:
If I do a struct of all that classes variables (20 ish) and just only set the one I need to a value and leave the rest at 0 with some checks to ignore it if so, would that sound like a performance issue down the line in your eyes?
Is using UObjects the same as Data Assets? Is that what you mean?
Adding and removing objects sounds reasonable
just let your manager tick them
I'd say
20-30 buffs is nothing to write home about in iterms of performance
Just remembered I actually already do kind of what I'm talking about for my item system. Just using Enums. It's a bit messy, but seems to work.
Data assets are children of uObjects (as is everything in UE lol) but I'm not familiar with their pros and cons so I don't know if you would be able to use them instead.
uObjects are just the simpliest of class you can make which can be great for mostly data related objects. (Nothing stopping you implementing your own complex logic within them though)
My eyes!!! 🤮 That needs a warning label lol. 😛
Using pass by ref and a select node probally.
That's the simplified version. Quite happy with it considering what it is reduced from 😄
that would go atleast 80% of the way it seems
bunch of + and some custom function
i would guess it's like 3 variations
seems liek some functions have 3 vs others have 2 inputs
this "ref" thing is when you turn an input into that diamond shape instead of round right?
That allows it to do what? (can probably watch some videos on it)
When you start making games, no one ever says how important data management is. Stats systems can get messy very quickly if you're not careful.
Yea, it allows you to change a variable dynamically. It's how the ++ node works. So regardless of the var you plug in, it'll increment it.
Sounds like exactly what I need? If I can just do my own calculation instead of increment
Yea, you can do the same sort of thing in your own macros/functions. You just have to use the set by ref node.
you can't quite use by ref in a struct where you store it though right?
Asking because I'm looking for some way to remove/revert the buff again at X seconds later.
Was thinking to do a Map with time stamps and a struct to check every so often to see if it has expired.
Otherwise I need to be able to create an "instance" of a Timer or something? (to not override it later if another buff is added)
Uobjects
With a duration variablen
Manager ticks them and they subtract from this (or add to another comparison variable)
Can you even SetLifespan on Uobjects ?
I seem to be missing something over here
right now my issue is that if I move the mouse on X too quickly, the spring arm won't be able to keep up and doesn't rotate nicely
Yea i would use uObject base for this type of stuff. Trying to heavily manipulate structures just becomes a pain when you a lot of data in them.
Don't ask me. I don't even know what "Manager" is 😄
And adding new types with custom calculations
Its just a actor or component that "owns" and controls these Uobjects
Its a class you make to manage the uobjects. (Stats Manager)
Sounds like I need to understand UObjects better at the very least to make the right decision.
do I like add a Clamp float node after the input mouse delta node?
Does anyone know how to move gameplay tags to a custom ini?
Edit: I just copied the tags to the new ini and then removed them from the default one using notepad haha. (Editor was closed) When relauching, they still show up in the list and doesn't seem to have broken anything. 😄
As a guess you have lag enabled on the spring arm. As it always takes the shortest path, if you move to quickly it'll start moving one way before quickly switching directions. I over came this by clamping the actual axis value thats used.
I've printed out the float result of the mouse delta x
and as expected
if I slide my mouse fast enough horizontally, the value quickly interpolates to 0
or the oposite value
which creates this smooth screen shake
Sounds like a very limited bug to me
Call it a feature
Add achievement for triggering it
clamp angle may have fixed it?
its what I added after it
not seeing any misbehaviour with the camera movement anymore
but I'll see if it does still happen
I have weapon pickups as a blueprint actor that I place manually in my level. How do I create a blueprint actors that spawns one of these at random each time the level starts?
Create a blueprint that spawn a random weapon on begin play
How the setup look like+
Anyone ??
Buggy code ?
Without seeing any code
The guesses and answers you will get holds close to 0 value
how would I smooth out the movement input so that the character doesn't drift after letting go of the forward button and quickly turning to a different direction?
I think I would need the Event Tick for a stable behaviour?
hey I have a building system where I attach parts like planks to a ship but I wanted to be able to fly the ship once the player adds like a steering wheel would I just have to simulate physics and add force and torque etc? if so would I need to add that to each individual part that the player attaches to the ship?
ya I am scratching my head its basically like how atlas does their ships
they have a ship yard with a frame u put in the planks and design ur ship then u release the ship and it can sail
I mean it's an mmo.
It will have a big budget, and a custom system dedicated entirely to this
2 days in a row lol
Is it not possible to have a timer "instance"?
I want to run multiple timers in parallel that don't override/reset each other.
Delay node ignores input until done. Timer resets if you call it again before it is done.
There must be a standard way to keep track of time for multiple things at the same time?
Wrap the timer in a component or object
doing it otherwise will override your existing timer
hmm, component might work. I need access to variables from the actor I use it in, so I don't think Object can do it.
why are you needing to have multiple timers calling the same function?
It will be the same with Component or object
just different method
Can I just have a standard component with logic + timer in, and create as many instances of it I want?
Have delegates in the component or object
you can bind that to the function where you spawn them
yes
Because I want to change a unique variable. Same issue as you tried to help me with above. Just haven't found a good solution yet.
Are you going down the route of using uObjects for your buffs/debuffs?
I tried. Unless I'm wrong I understand what I can do with UObjects/Data assets now. But I still can't pass in the variable (not value) I want to change.
I could have all of them in there and either switch on Enum, or branch away variables with value 0 but that seems a bit much.
Don't see a simpler solution yet.
Not sure how you were going about it though. You might very well have a much bigger brain than mine. 😛
You would create a uObject for each buff/debuff you have. The base uobject you create would have a base function to initialize it.
If it's a poison debuff, the logic inside the object would handle reducing the health when needed.
A protection buff would handle the logic needed to increase the players armor stats (or however you want to do it)
Because each buff/debuff would be it's own object, they can create their own timer instance. (All though an external clock might be better in the stats manager that keeps track of time as it easier if you need to pause them all)
hi anyone knows how can i convert a texture 2D to bytes ?
I see. That makes sense for what you are describing. Don't think it would work in my case because:
- I could call the same time of buff (with different values) multiple times before it expires, and I would want them to stack.
- I would need to create a base uObject for each stat I would possibly want to change.
The approach you describe might be very valuable for more unique and specific effects though.
Right now it's more like a flexible way to do math with any variable I want kind of thing. (on a timer)
There's nothing stopping you from creating multiple buff/debuffs objects at runtime that get applied to the player. The affects would stack and function independantly from each other.
I don't see how I can implement it. 😄
To do what you suggest I would need to create a base uObject for every stat right?
I was just referring to having the buffs/debuffs as objects. You could do your stats as objects as well if you wanted.
But the buffs/debuffs are basically the same as changing stats in my case.
Export Texture 2D? The output are bytes
call a buff + 30% damage for example
Anyone know how I can make a projectile collide with most things it comes into contact with, but not with for example the player?
Collision channel and settings
There is no output 😄
I'm trying to export it as string to encode it in base64
don't know about string