#blueprint
1 messages · Page 226 of 1
mmm regardless of what pawn... ok i think i understandµ
so when you pick a Background, you get to choose between one of two Attributes to boost. I put them in my Backgrounds Data Table as an array of Attributes (so I could set which two you can choose from) - how would I get which one the player picked? Probably use that background in character creation and store it in a variable somewhere?
Like, I guess I don't know the best way to do that without making a character creator, lol
Am not sure what you mean by how would you get which one the player picked?
Well I changed it to a map with the attribute enum and a bool, and I can probably set one of the bools to true during character creation and pass that along
like right now, in PIE, I can pick the race and the code will populate all the attributes and hit points and so on, but I'm not sure how I would go about testing picking the background, because in picking the background I have to pick one of the two attributes to boost
I'm trying to test my code, to see if the data is flowing correctly to set all the stats - I can set them as default values and just check that I guess
Is there like a "Safe" Set timer which won't reset a timer in progress? I can build that functionality obviously by checking myself but I just wanna make sure I'm doing duplicating effort
Feels weird for me to think in that manner anymore. We do everything as definitions. You talk about enums and stuff to define things and my complexity alarm bells go off. Cause to me, a created character is just a long list of picked definitions. Each has it's own data to set up however it was intended during gameplay. Which we also use GAS for, so it's pretty much just a bunch of GEs to apply or abilities to grant.
There is not by default. But if you can make your own C++ BP Function library. You can literally copy that function and remove the check code, and it'll do it.
Can paste you mine if you want.
Eh... it's probably not worth it. Honeslty I'm solving the problem right now with this do-once but like... I know this is a little gross, right?
Oh, wait, I read that entirely wrong. I thought you were trying to register multiple timers for the same event. 🤦♂️
I think if I start coding the character creation process, it'll fall into place
Nahhh just trying to stop the timer from repeatedly resetting forever and never actually firing, since this code can run on tick
You can just save the handle from the end and check if it's valid. If not, make a timer.
Else.. do nothing?
There's a blueprint class where every time I try to rename it, Unreal crashes
Assertion failed: !ActorsByGuid.Contains(ActorDesc->GetGuid()) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\WorldPartition\ActorDescList.cpp] [Line: 50] Duplicated actor descriptor guid 'FA86AAB2F2DE2E9FD01640820EA9F1C7' detected:
ABP_AreaEventActivator_C
I think for me, my primary focus is as a UI engineer. And I've been pushed more into gameplay code lately. So I'm always trying to bundle correlated things together. People have a fascination with using GameplayTags and Enums to "define" things. And it can work. But you create an indirection where you constantly have to look up data for things. Have an enum or tag for some inventory stat? Look up the name for it, look up the icon for it. Have a gameplay tag or enum for some preset NPC monster? Look up it's name, Look up it's stats, look up it's icons and descriptions. Etc. etc etc. For every, single, tiny little detail in the game. Ranks/Levels, item stats, predefined npcs, items themselves, skills, talents, weapons, etc etc. All of it having an enum or tag to look up stuff. Meanwhile we just pass around the data asset that has all of that info in it. The asset is the key and the data. No more indirect lookups.
The main issue being that most of those things above go to different systems, not always made by the same person. So you end up with multiple systems with multiple ways to look up data from their keys. And it's just a nightmare honestly.
Well, my particular instance presently: I'm solo prototyping, so I'm trying to stay out of C++, I'm translating existing game mechanics from a ttrpg, so I pretty much know what everything is called, and it's very low impact gameplay (click to move top down with turn based combat) so there shouldn't be a ton of performance requirements.
I don't remember the exact number of feats in the game, but it's multiple thousands, having visible data at my finger tips to cross reference with a book is important lol
unfortunately, most of the stuff i've consumed online hasn't been super relevant to my use case, so I think out loud in discords and get scolded by folks who know more than me, and use that going forward 😛
I think that was pretty much my learning tactic before I got hired at a studio too. 😂
Like for this instance, I'm trying to find something to get a feel for how I'd go about building a debug char creator where I just select the stat options, and I think I'm going to have to work backwards from examples where people make character creators that focus on all the visuals 🙃
Whatever you do, remember to set anything with a combobox on fire.
Passing around a pointer / reference to some data source is pretty free, so yeah you got a point about indirection
And for often what is not even a good reasonn
It just sounds lightweight passing around that tag
is there a way i can make only the array elements editable in an instance and not the length of the array in a data asset? (this doesnt really matter but it would be nice to have)
But in reality you end up doing a lookup here, and there, ans oh over there, plus UI...
in a stroke of genius you'll only find when I get a great idea, I just made X data sources so that each lookup is looking at its own independent group of data
when you make your goblin, you're selecting it from a list of charcreation_ancestries, which then will tell chardata_ancestry it's a goblin so when the ui looks for your ancestry it'll get it from chardata_ancestry not charcreation_ancestries
because if I do more work it makes me feel more smarter 🍻
Don't forget encyclopedias. I still want to write that some day. Have plans to basically allow an encyclopedia widget to pull and categorize any definitions in game. So regardless of what people make, it can be looked up easily by players to understand the game's systems.
I really liked bg3's stackable tooltips
Stackable tooltips? Like open one, move mouse over it and hover something else and open a second tooltip?
Haven't played it. 😄 My wife has. So I'm clueless.
Yeah, if you've got a tooltip open and there's a term or whatever that has a tooltip, I think you can hold alt? and click it and it'll open one on top
I was actually looking at one point to try out how to do that in UE. It has the code to anchor tooltips like that but I never found out how to use them. Plus we started considering more gamepad friendly UIs. I don't know how BG3 is with that, but tooltips are usually a bad consideration for gamepads.
It was great; you could hover over a weapon and get like "Applies 50% Goblin Damage on hit." -- and then you can hover over 'Goblin Damage', press 'T', and you get a new popup describing "Goblin Damage: Applies 50 points of Agony every turn." -- and then you hover over 'Agony' and press 'T' and... so on.
I think it was definitely a necessary system to get non-DnD people to even have a chance to grasp DnD rules without picking up a rulebook!
is there a correct way to use this node?
without getting two different random locations?
Looking forward to figuring out something similar with pathfinder
Nav data I believe can be left unhooked, but the filter class I remember causing ensures if set incorrectly.
Unless it's been fixed in 5.4
i think it gets the filter from the controller by default
it was more about the two outputs on a pure node
Ah, gotcha
So I made a real quick and dirty character creator 😄
Ah, sorry, didn't see this part
What a mystery actually!
I've never actually considered a case like this -- what exactly causes that node to reexecute
my concern is that it's executed twice
Yeah, I get it
a pure node get's executed when the BP VM tries to resolve an output pin value
so for 2 outputs, it's executed twice
If I were to hazard a guess I'd assume the return value is safest to use without fear of reexec, but I don't rightly know
(as opposed to the pass-by-ref)
That node shouldn't be pure imo
Yeah. I just went looking for that. They did it for consoles too, but in a different way. 🤔
Looks pretty elegant on consoles too!
Ima Try The Blueprint System When I Get On My Computer
how can i draw line above my image in widget
and when i change wieport size its still above my image
how can i do this?
So when working with fragments.. does the ui like query for fragments akin to asking for compoments in an actor ?
GetEquipmentFragment -> IsValid ->...
Mine does. I think Lyra does pretty much the same.
Here i am offloading all that into a more flat layered struct for ease of access
To avoid going deep into a nest to find certain info
I also still make specialized data assets too though. Fragments I still keep as reusable functionality. Maybe a system needs it's own fragment on a bunch of data and I don't want to put it directly into those data assets for some reason, I can just add the fragment. But the core data for the asset still goes on it's class.
But fragments are only ever 1 layer deep so shouldnt really be an issue i suppose
Right so an item would be
ItemCore + ItemFragments(0 to N)
It's definition would be anyhow. The item itself is just a UObject with a pointer to that definition an array of other runtime values.
Exactly
Kinda like my quest system is setup
Weirdly enough
With core data, and instance wrappers that actually have instance tracked variables
Thinking about it i could probably benefit from just wxposing the uobjects directly. Todays struct method is... very nested
And doesnt really allow for project specific expansion due to these structs
Exposing objects instead would totally solve that
Fuck... refactor 2.0 incoming.
I have so much work to do on our new system. We moved to using Flowgraph stuff recently. Similar to the items, it's just an object with the QuestDefinition, an index for the active objective, and then an array of enums for tracking that objective's tasks.
lol you’re only at 2.0? 😛
Cant have multiple active objectives ?
Sounds very close to mine, altho swapped words
Questline (DA)
- 1 to many Quests
- 1 to many Objectives
You have multiple tasks for each objective.
Im not at version 1.0 yet so is it evem a refactor at this point
I modelled it off of staring at MMO quests.
- Reach some place
- Get to location
- Press the red button
- Enter some place
- Go to some location
- Wait
- Kill some boss
- Blap the dude who just annoyed you from talking too much
I also got paralellconditions, but its jsut some way to say that all conditions must be fulfilled at the same time, and not sequentially
Im not sure what it actually does tho, as its mot even a failing condition so
I dont really have a good usecase for it
🤣
But man the struct to uobject refavtor will be messy
It always is. :/
I just ditched tags from my inventory system.
I use tags everywhere
Since it goes so well with my QS :p
Using the concept of Channel, which isnjust a way to say which external system we wanna listen to
I'm really going crazy with this "definition as a key" thing. Gonna try it out for a while. It hasn't failed me yet, and it just makes my life so much simpler.
Why isnt the sword able to go from sheath socket to hand on 1 key?
So definition is the lookup key?
IsQuestInProgress(const MyQuestDefinition* QuestID)?
Basically, yeah.
Avoids the extra work of making a second key as a gameplaytag, atleast
1st lesson. don't take pictures of ur screen. take screenshots. use win+shift+s
long road ahead
Also avoids people specifying wrong item per tag and such. I think most people avoid this because of the savegame fear of pointers. 🤷♂️
Lol, 7.4k
You haven't experienced fun until you open the project and it starts at 27k, and after twenty minutes it's up to 34k and still rising.
When I Tried It Brought Up This?
drag the gizmo over your screen, then press ctrl+v to paste the screenshot.
u can also save it as an image in the windows notification that pops up bottom right or the notification menu.
Yea
Say I'm making a dummy that has a health bar and so on, what blueprint would I create and how might I attach my mesh?
Depends on what that dummy is supposed to do
In theory just an Actor that you can put your health component and what not on
If it has to walk around, possibly whatever AI Characters class you have
Mesh would just be a Static or SkeletalMeshComponent if Actor. Or just the Mesh that comes with the character class if you choose that option
where about do I find the options for the mesh?
Sorry, I've never used a custom model before. Just started about a week ago
There should be tons of tutorials and Getting Started docs available for beginners.
You need to add it as a component, top left corner
Ah, thanks
anybody have a good blueprint for worldgen?
hi been a while since ive been here, but anyone know of a better solution for storing database data to be used across game modes and such (i think im explaining it correctly). as of now i have my database data converted into an array that is basically a bunch of structures and is stored in the game instance and to make it network capable i just pass it to the gamestate/playerstate. is this fine or is there something better.
I have an actor next to this overlap who has a tag reading "health" as do the components... But when this actor explodes it should activate their sphere collision - thus touching the actor next to it and enabling what is in that actors blueprint. However... That doesn't happen..
The actor that should now be receiving just keeps on like normal. Any help?
that glare!!
The laptop I sneak to work can't use discord 😦
I mean, the laptop I definitely don't sneak to work.
whats triggering the beenpopped event
are you calling it somewhere
i think collisions have there own overlap event
I switched the sphere collision with a sphere trace by the visibility channel... But even with the other actor reading for overlap... It doesn't register the sphere trace
is it only supposed to trigger on overlap
only asking cause i would just use the collision spheres overlap event, not sure what your using the trace for
Been popped happens when the canisters hp reaches 0, then is shoots off the sphere trace by vis channel
Cause the overlap wun't doin nothin'
so you have an object (actor) that when its hp reaches 0 it creates a sphere collision that anything within it that has the health tag should take damage
What is the data for?
mainly a parts list that is used to build a mech which consist of hundreds of parts (probably a thousand in its completed form)
so i bring in my data from my database, then i convert it into structures, i then store those structres in any combination of datasets as arrays, which is just set in my game instance to be used when iver i need to use it
Ya! But it doesn't seem to like that?
me: I'm gonna use SO MANY ACTOR COMPONENTS, my code will be compartmentalized and easy to understand!
also me: puts code from Actor Component beginplay into actor beginplay, forgets, is confused for thirty solid minutes why it's running twice
Even goin back to basic like that don't seem to wanna make the characters near the explosion recieved anything (my print string never fires on the actors being touched)
are you trying to print string from the characters or the canister
if from the characters u need to cast to them if from the canister then just print string after the true branch
then off the cast call whatever event you have in the character
Hey so I made an Dummy to test damage of weapons on, but when I load in it looks like the health bar is in my face, I think its because of the Setup Health Bar node I have, is there a way to make it so it acts how it is intended (being its floating above the Dummy's head? without this node it works fine but the health does not display
Aaaaahhhh, kinda like I did with my bullets... Shoot. I was hoping to avoid casting cause I'll have a few different bps... But it is what it is
thats where bp interfaces come in. i think thats what its called
looks like your dummy hud is being added over the player hud and not just attached to the dummy. i believe you need to use widget component
Aye aye aye, my first project was aaaaaallll widgets which made it so easy
The HUD is over the dummy once Setup dummy hud is removed
from your picture i just see a blue bar and red bar then a red background which i am assuming is supposed to be the health bar for the dummy and the blue and red bars are for the player
well actually nvm I get an error, the Health bar is back over the head but not filled with health, and I get this
ignore the picture where the screen is red that was old by mistake
this is it now
and the bar is a progress bar correct?
yes
so in the bp of the dummy where do you call the progress bar to be added
I dont actually think I am
lol ok give me a sec to try and recreate it
Does Anybody Have Anything
?
You might want to be a bit more specific there. Worldgen could mean anything from making minecraft, to a script that plants some trees.
A bit more specific perhaps, because most of what people know as worldgen tends to happen in C++, not scriptside
This channel tends to be more used for solving specific issues you've been unable to solve in blueprints, not requesting major chunks of games
Prob Trees Mountains Landscapes Lakes Oceans Etc.
Yeah, no.
Those things don't get generated in blueprints
🙁
I Guess Ill Have To Make A CPP Game☹️
Since you're new, you might want to start small.
Look in the pins of #ue5-general
A newbie to blueprints and the engine in general isn't going to pull this off overnight, with or without other people's tools. No one makes their dream game first
As for what I have, its a custom event for the health bar, im trying to refrence what I did prior for the player but I cant find where I went wrong lol
Ok I think it was my interface messing up, though now the red health bar is covering the screen like prior
Thats everything I have going on in my Dummy BP
Thats how I have it set atm
under the dummy BP if I remove this, it fixes and the bar is still above the dummy but is empty
Done that also
add to viewport adds it to the players view port
ah I see
then just do this in dummy bp
The Accessed None error is due to this code.
It's a logical fallacy. "Get me the owner of the widget that isn't made yet, and then create the widget and set the reference."
Nowhere in that begin play is that reference set to a valid widget before you use it
where are you getting get widget
you would drag widget from your components list
I just get this
now off of that drag and type get widget
then from that cast to your progress bar widget
or just right click in you event graph and type get widget
did you create binding to percent in your progress bar widget
and also what is you max health set to
100
ok then back in your progress bar widget
click your progress bar in the hierarchy, then in its details panel under progress click and binding
next to the percent
is that not whats set up here?
screenshot your details panel of progress bar
How to update widget without event dispatcher or interface using a direct reference?
just get the element and update it!? (or make an update method on the widget)
and do this
Alright cool, How do I get a return node on a repnotify
and finally in your dummy bp only do this
isn't that an event? (which can't have return values)
the other guy in multiplayer said I dont need to cast either, so I have like zero idea how to do it without cast/event dispatcher, or interface
sorry that was meant for someone else not sure what you needed
ah, well rip lol
you have to cast if you use GetWidget on the widget component
also a ViewModel would be better to handle player health
Ive had issues when I had the widget setup as a component, so now it gets added at runtime
right so I connected a String to lmk if the cast fails, it seems like it is, I'm a little confused onto why though
in the Dummy BP
I'm trying to set up display options for my game and I keep running into this error when using the enable HDR output node. Anyone know what could be causing this?
Warning: Setting the console variable 'r.HDR.EnableHDROutput' with 'SetByGameSetting' was ignored as it is lower priority than the previous 'SetByCode'. Value remains '0'
right
in the details panel you set it to the progress bar widget
yeah
I have a situation where I had a C++ class for a level blueprint. The c++ class was renamed, and now I can't reparent the level blueprint to the new class.
Tried a redirector, and it didn't work. Furthermore. In the list of classes to reparent, many classes are just straight up missing. This is a problem that others have run into, but I couldn't see any good solutions to it
seems pretty broken
yeah
There is also this in the logs, and I can't even select the LevelScriptActor as a base class, it's missing.
might be the wrong place to ask that, probably might get a better response/ help from the cpp group
This is an issue in the blueprint reparent menu though, it's not listing the right classes, not even the correct LevelScriptActor that should be in the engine
in the get percent function you have this
yes
oh then idk then
and lastly in the dummy bp you have this
exactly
and the cast fails
then either you are casting to the wrong widget name or the widget you clicked in the component details panel is not of the same name
that may be it
no i just put that there to try something
under widget class the widget should have the same name as the progress bar widget
mine is healthbar
got it
Lmao I was casting to player Widget
Thanks, sooo sorry that was way more difficult than needed
well glad i could help
yup thanks a ton
before i go to bed something came to mind that you probably have already done, but did you try recompiling everything: under tools>refresh cpp
and then probably a close and refresh and if that doesnt work. not sure if you are using source build or not but you might need a recompile after you regenerate project files
You can use interfaces instead of a cast and you don't need a binding for this. Bindings are very expensive
how might I not use a binding then?
Yes, tools->Refresh c++ project doesn't build anything, just refreshes the project files. But I did clean all of the files by deleting the Intermediate, Binaries and Saved folders and then doing an actual rebuild, problem still happens
ok then i have offered the only knowledge i know of the matter at hand, maybe someone else can assist or it could verywell be a bug
-
Right click in content browser > Blueprints > Blueprint Interface. Name this osmething like "BPI_UI"
-
Open your interface and add an event by clicking "Add" in the top left, name is something like "Update Health UI". Once you've created this, in the details tab below, add an float input and name this "Health". Compile and save
-
Go into your widget, on the top click "Graph", then navigate to "Class Settings" on the left. Scroll down to "Inheritied Interfaces" and add your interface. Compile.
-
In your event graph, drag your progress bar variable into the graph and select "Get ProgressBarVar (or whatever your progress bar variable is called)". Drag off the node and make a new node called "Set Percent".
-
Once you've done step 4, in the same graph, type in "Event" followed by "Update Health UI" or whatever you named your interface event. Connect the execution and float variable to "Set Percent". Compile and save.
-
Open your character blueprint, and dragging off Widget>Get Widget, type "Update Health UI" and input the health variable or amount you want. Connect this to your BeginPlay in your character or your damage event.
No need for a binding (very expensive to run) and you can call this event any time without needing to cast which is also very expensive.
Thank you, i had like half of this already set up from a tutorial but ended up switching methods, ill get that switched over tmr
np! Be careful with tutorials you see online since a lot of them have bad coding practices. A good few youtubers to follow is Ryan Laley or LeafBranchGames
npnp
🤮
Don't watch leafbranchgames, he is another youtubers that perpetuate wrong information and bad practices.
Whenever you see a video that says avoid casting use blueprint interface, just click on don't recommend and look away
Ofc he also said avoid tick 🤮
The guy above is trolling. If you excessively use casting you're going to have a huge memory problem on your hands, since casting loads all objects associated with the BP. Not to mention you should make as little use of tick as possible since that runs the code every frame
I actually just ended up doing it now as I want to just get the dummy working lol, atm the health bar is just blank
Do you have an amount set for your health variable in your player?
What are the amounts set for "Health" and "Max Health"
Health is 0 and max is 100
That's why your health bar is empty, because Health is set to 0
Try setting Health and MaxHealth to 1
What would be the most appropriate way, of creating item pick up hints?
Because to show a hint, you probably need to cast a line trace continuously, to check if the player is looking at an item, but this seems quite unperformant.
changes nothing
Remove the division in your first screenshot
as always: depends
can have a sphere collision and simply highlight when in radius
like that?
and for more "highlight when looking close enough" I'd do small vector math and get a dot product between vectors:
- actor position to item position
- actors looking direction vector
Correct. Let me check one more thing to make sure
That should work
That's how I have it set up on my end
getting nothing
Oh
Hmm I was also thinking of having the collision to enable the line traces, because otherwise you have all items around you highlighted.
Yaya glad it works
But the collision thing, would be the only way, of having something that is not performed all the time right?
you can combine two methods I mentioned. sphere collision to gather nearby items, then use mentioned dot product method to highlight only ones close to the center of vision
Yea but regarding the performance, the calculation wont matter, thats just a matter of how I want it to be.
dot product method is way cheaper than traces at least
and don't worry about 5 or even 500 items. shouldn't be a big problem
though with 500 I would maybe start to cache or otherwise partition
Just to avoid lag spikes or whatever, I'm still kind of new to game development and for me having something every frame appears so heavy but its kind of needed and normal i guess.
though the collision can also be just in front of the player, so we only consider what's in front of us
I was also thinking of having something that just catches the near range of the player..
CPU is doing billions of operations every second. this is nothing to it for the scope we are talking about here
I'm also wondering, I probabyl want the player only to be able to pick up the item he is looking at. Maybe still line trace it? Or would you project the item to screen space and get the closest one to the center of screen?
yea ^^
like...a collision sphere/volume? 😛
you can optimize it a bit by only checking certain channel
and having your items on that channel only
yea and just make it similar to the vision cone and close size
so nothing else is even considered
Yea that was my second thought, because having the collision on the item would be nicer regarding that, but then you will have way more overlap
you can use dot product for that as well. if very close to 1 means we are most likely looking at it
But you would say, projecting the pickup item, into the screen space and calculating the distance from the center is cheaper than having the line trace?
but yes, otherwise trace is the standard way I would say
mostly due to straightforwardness of getting hit actor, etc.
but you are not crunching pi here, so don't worry much about performance
Yea I think I go with the line trace
Yea I just wanted to avoid line traces every frame like some YT tutorials suggest ^^
you have one player (probably). so one line trace. that's not much really
you can check it yourself how much of a hog it is. run 1000 or 1000000 traces and check the fps
Yea but then on top of that, there is the thing with having the "Pick up" widget facing the player. That would also be on tick to rotate it towards the player, since as far as I've seen screen space, will not scale the widget.
I mean even both probably will not be that bad, but I'm wondering what industry standards are, regarding this, because sometimes you find some solutions, that are just outdated and could be done way nice.
it's for a split second when nearby an item. again, it's not a heavy operation to rotate something
I probably have to wrap my head around that, because it appears to be so much work but it probably is not at all in games context ^^
it is simple, sure, but takes several steps to get everything working nicely together
@bleak mica thanks for the help brainstormin'
I will say just make a first version of it and don't worry much
im making a spline mesh blueprint that's writing custom primitive data into the spline mesh components
the values are correct in-editor, but it seems like theyre reset to 0 when the game is actually playing
does anyone know a fix to this?
Yea I'll do that, thanks a lot for the insights, really helped 🙂
you're welcome! gl & hf
The huge memory problem isn't casting problem but hard reference problem. It's not casting that loads the object to memory.
Please stop spreading mis information.
The solution is to have native class and use soft reference. BLUEPINT INTERFACE is not a even a tool to address. Not only that will make debugging a nightmare it will defeat the purpose of inheritance.
And in the end when people need to access member variable or function they end up using hard ref in their interface anyway.
You are a victim of people who don't know any better. If you want clarity just ask the programmers in #cpp
If I made a dummy to take damage is there anything I need to do with the collision box it uses to allow it to trigger on actor overlap events?
Things that needs to run on tick, should run on tick. Anything that needs to be smooth or evaluated per frame. E.g movement
The notion avoid tick is utter none sense. You use it where its proper
Casting inherently loads objects. It's slow to do. That's simple knowledge.
Interfacing is not difficult to debug if you know what you're doing. Interfaces are used widely at numerous AAA game studios without issue. It's also recommended to use interfaces in official Epic docs and streams.
I also never said to never use tick. I said that it should be used as little as possible. Things like UI or niche gameplay tasks like interacting with game objects (pressing E on an object) don't need to run off tick.
Casting blueprint class will load the object casting to native class won't.
The issue with casting to blueprint class is the hard ref it created not the casting it self.
Casting is almost free and is not slow. You are talking out of your ass. But not here to argue, go to #cpp if you actually care about what is right or not. They will be happy to demistfy what you learnt in youtube.
And no says to not use interface
I am saying don't use interface to replace casting, that's Apple and orange
Then be more clear. I don't care to continue this conversation if you're going to use language with me
What language?
I am simply saying you are wrong
And you can ask other to clarify that
Casting is fine, tick is cool
Tick things that need tick
But beware that ticks fires every single frame. Use that knowledge
Right tool for right job, at the right time, basically
I have one more question, does it really make sense, to prefix every blueprint you create with it's type or is it just personal preference and why is it used so often?
I want to clarify I never said to never use casting either. I use casting, but it's so far and few between and the circumstances where you'll need to cast is also very rare
Its often part of some naming convention
for a naming reference:
https://unrealdirective.com/resources/asset-naming-conventions
Interfaces and cast can be interchangeable most times, if you know what you’re doing.
is there a specific kind of collision box I need a actor to have in order to interact with On Component Begin Overlap
Project and structure dependent. I cast whenever i need to, but only to the most basic type that i need
Yes, correct. Most times you can get away with interfacing
Quicker for me to cast to something that’s already loaded because I know how they both work, so I don’t need to tell others my way is better
Depends what's already loaded/needs to be loaded but yes
But I don't really see the benefit from it, If you look up a widget blueprint and every of them starts with WBP_ it's harder to ready and does not add to much, the only thing I would see, if you want to name the mesh/actor/widget/... all the same but idk.
I use components over interfaces in 99% of the cases
Hardly ever use interfaces at all
I want to, but I always forget to do so 😅
Thats a nice list, but still why? 😅
Naming conventions are for you and other people who look at your project so do whatever you want, at your own peril
You can make your own naming convention
more or less what you mentioned last. to differentiate the same thing but in different forms. mesh, skeletal mesh, character, etc.
Just share it with whoever joins you
I don’t use WBP for example, just W_
It makes no difference tbh
Because looking at plugins, they also wont prefix there blueprints, would even be weird to use them prefixed
I prefix mine
I don’t make plugins
SQQuest Plugin
There, all cases have been covered 😀
if it bothers you, don't prefix. just be consistent
I'm just affraid, that then one night I want the prefixes back for some reason, and start renaming every blueprint and waste a few hours but maybe i've got to sleep on it ^^
Imo, once you get enough xp, you get so used to naming conventions you don’t even notice them
It does very much tbh ^^
Dont worry, I saw a lot of WBP files working on some big titles even recently
then run a script to do so. and watch your project fail to load next time due to some corruption
also this
I even get bothered by the c++ prefixes, the U, F and S, they are "ok" but prefixing booleans with b why it already is of type boolean, thats just from back in the days, when the ide/text editor was not able to tell you the variables type
xDDD horrors! ^^
hungarian notation will outlast us and many generations to come
does this event not work with actors?
try to not worry and just bHappy @ancient moth
ok I gotta go now 🤣
Yes, its coding standard to do so in my line of work
Is that imgui?
that's just winapi, I think
That is madness!
We also use type prefixes but im not doing that 🫣
Time to check out replicated uobjects then... been avoiding this for far to long
Weird size shouldn't prevent it from being displayed. How are you trying to use/display it?
1000x1000 sounds rather large for something like a waypoint arrow getting 42x42 pixels on screen .. also try to use power of 2 sizes when you can
@gentle urchin Have you attacked fast array? I was told that it's good for large data like items but from what I read last night, it also support atomic replication?
Meaning fast array will replicate the whole elements instead regular struct where regular struct just replicate the delta.
Won't that mean fast array is inheretely more expensive for a collections of something, say item data?
I have not, yet. Havn't really had any use for it, altho it does sounds like a neat optimization. Replicating whole element may still be cheaper due to not repliciating the entire thing, even if it's delta ?
but 1 to 1 it sounds worse in that regard
Hey so I know pure functions get called every for each time their return variables are used, but does anyone know if they are called once or multiple times in cases like this where they all go to the same node? Thanks
once
Great thanks
Hey folks
I have a mesh set up based on a spline following a tutorial. It sort of works fine but I was wondering if there is a way to have it do a "sharp turn" instead of this rounded corner (hope it is visual)?
The corner spline point is what is selected in the screenshot. I tried limiting the tangent lengths for that spline point, but it seems closest possible outcome is a round corner at the moment.
I would like it to be 90 degrees like the track below it.
I don't think you can as the mesh is bent to match to spline. Hence the curve. You might have to handle the corners differently. You might be able to ignore corners on the spline and handle them separately and use specific corner meshes instead that have the perfect 90 degree corner.
You can specify spline tangents manually
Hmm, yeah.
But placing a fixed mesh there is most appropriate , as pattym suggests
What do you mean?
I can control the Tangent, but that won't make the mesh have a 90 degree turn still right?
Doubt it, but maybe
Havnt tested that specifically
I set mine up with fixed corners , but not exactly 90 instantly, so to speak
But even the point I selected in screenshot I have reduced tangent length to near 0. And still has a very soft bend.
Bad screenshot but the turn is 90 degree
This shows it a little bit better
But not a fixed 90 degree, as i mentioned
Not dure a spline mesh would be able to do 90 degree at all
Wouldnt some faces get inverted by that?
Might work if the point itself is 45degrees off
I'm trying to remove a UMG widget on mouse down, I'm getting the debug string, but the widget is not removed.
Thank you. Will look into your previous conversation you linked.
You need to get the widget that you want to remove and link it to the target "remove from parent" node
Thx 🙂
Assuming you're wanting to remove the widget this logic is setup inside, using self is perfectly fine. If not as Silent said, you can connect a references to the widget you want to remove.
However, you need to be aware that the widget (with this logic on) would need to be in the focus path for it to receive the inputs to detect if the mouse button is down. This can be problematic when clicking on a focusable widget as this can result in it receiving the focus instead.
So the issue actually was, that this is a list item and I wanted to remove the list widget, but i was able to remove it with FindParentWidgetOfType 🙂
But for the list item Remove from Parent didn't do anythign, as it's probably expected i guess 😅
Hello guys. Can someone point me to the right resources to properly set up a player character? A buddy of mine uses finite state machines for his game in Unity. From what I found, behaviour trees are a bad replacement for finite state machines and I don't know c++ so I can't really program a custom one for myself. Do we just use the player pawn and player controller or is there an alternative I'm overlooking?
I worry that the character gets way too "conditional" later down the line, considering he has like 4 abilities and a basic attack. I don't want to have ten conditions, for example," If "basic attack" + 5 others are not true, then the character is permitted to do something.
Another suggestion was to use different input mappings and swap between them depending on the what a character is permitted to do at a time, but that also sounds like an inferior supplement to finite state machines.
(Also please ping me, if you have an idea, so I see it immediately.)
Hello,
Can you open and load a level like this? I saw it in a youtube comment and im not sure if it works this way, maybe it loads it two times?
You can but it's not necessary to async load the level
The object ref should be a soft ref to begin with
What you do there will load the level before you open the level
So you end up with multiple world in memory at some point
So its better not to use async here?
Depends, but in general no
Like I'm guilty of async load level too for my loading screen
But eventually I will replace it with a better method
With level streaming?
hi, maybe a simple question but i've been struggling with this for an hour now. I have a bp with a child actor. I want child actors to be deleted of all the bps of this class. I added a breakpoint and it is referencing all the actors of this class but it's only executing the loop for one of them (the one I hit). What am I doing wrong here?
Thanks im going to look into this,
Is it possible to make macro libraries only available for specific classes?
https://youtu.be/GwCD2WQ7-4U?si=uvQDdEjVWgUEL-CV
If you want to look at it but I won't recommend it. If you are after loading screen and you are using blueprint. You can buy plugin from the market place.
If cpp is an option, most common advice around here is to steal lyra loading screen plugin
Unreal Engine 5.0.0 Early Access How to async level load (with C++)
UE4/Unreal Engine 4.26.2
I've created a base class that derives from uobject but it can't use macros in any macro library, even macro libraries that that derive from this base class. Does anyone know what I need to do to enable it?
Hey folks.
I feel like I'm in deep water here trying to control the "roll" of aircrafts in my game. They are following a Spline.
I figured I could get the tangent at the point they are currently at, as well as the tangent of the Spline a bit further ahead.
Then I get into trouble from there with vector math. I basically want to compare the two directions and if the tangent coming up a bit ahead is to the left for example, I would like to start rolling the airplane to the left.
Any suggestions? In screenshot I tried some dot Product, but I'm not sure about that.
I think if am not wrong there is a node named "compare floats" node
But..
Wouldnt you just calculate target directionn
From current to some future point ?
I'm confused at this point.
In other words
(not from your comment) From my own 100s of attempts
Target rotation = FindLookAtRotation(Plane.location - Spline.future.location)
Future can be pretty short ahead i guess
Just to make sure. I might just be confused here.
I'm looking to "roll" the plane. Like around the blue axis here
Woops
Well
Roll would be based om the delta between current and target direction innsome future
Agreed
Bigger delta = bigger roll
yup
So my issue is back to comparing two directions. Found out since my message I can compare Rotation instead of Tangent stuff at least.
You only need some dot product
If you use direction vectors (current and future),
Get their right vectors, you can use dot product to set the roll
But dot product returns positive both if the future point is pointing more to the right and more to the left as far as I can tell.
If you have an instanced structure as an input on a function and break it, you get an exec pin and a wild card. Does anyone know what triggering the exec pin would do?
Initialize the binding id suspect
Feel like this prints the right stuff. (+ or - 90 depending on turn)
I'm probably messing up the Interpolation and rotation setting though?
(Running the function every 0,1 seconds on a "Event by Timer" function). Should I still change it?
Can I just save the Delta Seconds from my tick in a variable and then still run function every 0,1 seconds? (and insert that Delta Tick variable in the Interpolation time ofcourse)
Not sure why youd put this on a timer in the first place
10 updates per second is rather noticable
Trying to reduce performance cost
This is important enough to take the cost of updating the rotation
Calculating spline vector + future spline vector, dot product etc, for all enemies. Might not be an issue though.
Other things should suffer instead
Adjust tickrate based on some distance tonplayer using npc optimizer or similar method
It's a Tower Defense. All the actors are probably relevant.
It's all the enemies moving around the track.
Right.
To actually save performance
Good point. Can also check performance in insights in the end. Might not matter at all
Yepp
👍 🙏
You may want interptoconst
Hi, for some reason, my animation blueprint behaves the opposite in the viewport. I have selected the Spine in Transform Modify Bone, so when I rotate yaw only the player character upperbody will rotate, but for some reason the spine stays still and only moves everything below it. That doesnt happen in the animation blueprint,I checked it with manual values.
Some notes: I have a static camera in the level and the only way I found out how to rotate the player character was with "Use Controller Desired Rotation".
Thanks
Greetings
Im developing a random dungeon generator, and wonder how to optimize "load level by name" node
First, I spawn "Room" blueprints, then I start spawn level instances of the room (like geometry, props, etc)
Loading a lot of levels during generation cause freezes, so Im using "bind on level shown" between level spawn, but they can spawn at the same time (because the code start for every room)
Any clue?
Anybody knows some good blueprint courses
What do you thhink about unreal sensei course?
hello everyone.
The following problem: I once renamed the widget for health bar.
Now, the casting always fails, even if i do that nodes again new in BP.
Any ideas? would be very welcome
(and any general comments on health bar)
Which node is used to update the position of a text box of a widget in the blueprint? When I get the textbox reference it showed set widget slot positon for "position" search but not working
So I don't really know where should I be putting this but I'd like to create something similar to what's in this video from 8:30 to 11:30 ||https://www.youtube.com/watch?v=ZQzPOcENQsQ ||. I started out by following this tutorial (||https://www.youtube.com/watch?v=VmRggTwhiew&list=PLpzMHKXzqf9m7SIRngM3k3RuCt0KN077R||) and I managed to do it ending with rooms that'd spawn with 1-4 doorways leaving the remaining spaces open. I really don't know how to continue. How could I make the engine create "biomes" where the algorithm would be different? And how to I make algorithms to extend walls or something similar?
Can you not use delay nodes inside tasks? I made my own Blueprint task for my AI, and in my Receive Execute AI event, i try to use a Delay node, but the Node after the delay never gets executed.
In my picture, the node Break is never reached.
You should be able to but if it's not reaching the break function, it could be that the task is being destroyed before it happens.
Hi , when I do packaging, the widget slider connecting with PCG graph does not work. Now I think the attached screenshot is the cause. what do you think?
Hm you're right, if I put the delay as the first node, it does indeed delay.. Maybe it is because it tries to delay for each entry in a for loop.. Thanks though, I'll keep testing
This did the trick, thanks!
is it possible to delete specific pins off of blueprints id like to have this set relative location not take into account the x location
If I put a breakpoint in blueprints it doesn't always trigger each time. When I put prints there, it happens more than the breaks. Why is this? It's super frustrating to debug like this (version 4.25.4 btw)
Ugh idk about 4.25. Whenever that’s happened to me in 5.* it’s been because I had the wrong debug object selected, or any of them selected so only that specific instance would trigger the breakpoint)
@nova grottoit's not possible, but you can get (current) the relative location and feed its X in the new one, so it won't change
im sorry what should i be looking up in bp?
Hello
I have pawn with camera, and I want replicate camera rotation
how can I do it?
some good way?
pawn is replicated
as in you want the camera to move the same way your characters facing?
I want to have the same mesh rotation on the server and on clients, when the player rotates the camera, the mesh rotation is still obtained from the server
and I would like the mesh server to be rotated in the same direction as the camera on the client
your gonna need someone better then me then good luck
When working on an equip/unequip system where the unequipped weapon goes on the players back or hip, is it generally better to destroy and respawn the mesh in the right place, or keep the same mesh and re-parent and adjust transforms instead? Does it matter much?
attach to
(node)
@nova grottoyou are setting a relative location, but you can retrieve the current one and feed its X into the Set relative rotation so the relative.X doesn't change
Are there any good tutorial providers on YouTube you guys would recommend for starting off unreal (blueprints)
Mostly done with c++ basics so I'll be revising it before attempting a hybrid workflow, thus I want to get around unreal engine and blueprints work first
You don't update the position of a textblock. Widgets are added to slots. Slots belong to containers. If the Textblock is within a CanvasPanel, then the Textblock is in a CanvasPanelSlot and you need to use that to SetPosition via GetSlot->CastToCanvasPanelSlot
@rare mortar #materials
Sorry! Will fix, thanks:)
If you know your way around the C++ side of things you don't need a tutorial
C++ language not unreal c++, so nope gotta do from full basics
Depends on the case. Spawning actors "can" be costly. Plus replication latency and all. If you have an idea of "equipment", then it can be better to maybe just keep it spawned and attached or even spawned and hidden/disabled. Easier to deal with initialization orders and everything else than a weapon that can be constantly destroyed and replaced.
If yours is a single player then a inventory and overworld copy wouldn't be as expensive as spawning one when changed
I think atleast
Unreal C++ is basically just knowing your macros to expose stuff to blueprints and knowing the UObject hierarchy. But for learning BP, I normally just tell people to find a "Make a {InsertType} game!" thing with 10-20 episodes and just follow along with it. If you h ave programmer expertise already, it'll click pretty quick. They're not always the best practice, but you're not going to find that from a tutorial usually.
Best practives are hidden in different articles spread across the web
Understood, I was hoping any pointers to tutorial makers with decent practises would mean less RnD from my side, but I'll go through and remember to improve the practises myself in this scenario
Or on this server, mentioned by specific people in specific context :p
😂😂✌️
Just start here and try to do the thing.
https://dev.epicgames.com/documentation/en-us/unreal-engine/gameplay-framework-in-unreal-engine
Unreal Engine provides several core game systems such as game mode, player state, controllers, pawns, cameras, and so on.
how would i be able to get the relative distance between 2 actors
Target minus Start = LengthVector
LengthVector->Length = distance
Also semi sure there's a Distance node that takes two actors
like this?
so im trying to get a camera to be between 2 actors but its still acting wonky did i do something wrong with the vector length part of this
gotta study it a little harder
you want the entire vector
not just X
unless ofcourse, you only care about the difference in X...
Hey there,
I made a small stargate which i can go through and spawn at the other stargate. I just use a collision box and set the actor location and rotation. Now I have made an actor which only contains a cube with physics enabled. I cant make it work to spawn at the other gate. My understanding was that the physics is overriding the position so i tried to turn it off and and on again but no help so far. Any advice? 🙂
Wouldn't you want to add both of these then divide them by 2 instead?
Because let's say your first vector is 600, and your second is -400. Your end result would be 1000
That math isn't mathing
True im very bad with vectors i gotta change that
If you want the camera to be between the 2 it should be at (Position1 + Position2) * 0.5
if it's for a fighting game cam do it like this.
Midpoint = (Pos1 + Pos2) * 0.5
CameraPosition = Midpoint.X, WhateverYouWantCamYToBe, Midpoint.Z
assuming the plane of movement is x and z
There's also a Get Actor Array Average Location node I believe
the less you need to reinvent , the better
It can be quite convenient indeed
It is for a fighting game but it needs to be able to be done from any angle hence why im going for relative
trying to do
So the center of the 2 fighters is easy. What do do regarding orientation is harder
Consider 2 fighters circling each other, they can rotate the camera 180 degrees right?
wouldnt that mostly be something like a pawn placed dead center, with a springarm and rotating camera?
Now consider that instead of circling each other they just both advanced, ending up in the same final locations as the first scenario. Should the camera have flipped orientations when they crossed?
guess it depends on what freedom you want to give them
Its like this switching between 3d and 2d
So you want the camera plane to be static whenever the 2d mode is engaged?
that makes it much easier
Yes when in 2d it would work like any other fighting game im just having an issue of it working from any angle
vector math
start with what you know, you know the positions of the 2 fighters
and you know the global UP vector
Cross product of any 2 vectors is a 3rd vector at right angles to both
Get Actor Location of Character + Actor Location of Locked on Target / 2 >> Set Relative Location and Rotation
No need for floats
so Cross(UnitVector(A.Location - B.Location), Up) is the normal of the plane the camera can move in
Hi, i am now working on localization of my game, and i have set up all my text to translate, but how can i change the language form blueprints?
PointBetweenTheFighters + PlaneNormal * SomeNumber is where the camera will be. SomeNumber drives how far away the camera is
The camera rotation is PlaneNormal.RotationFromXVector
so on and so forth. It all is based on the plane normal which is based on the locations of the 2 fighters when the 2d mode is entered.
Ok ty i gotta head to work but when i get off work ill try it like this
Be careful with this in the Editor. You'll change your whole editor to Chinese. And it's really fun to find the options to swap it back.
Wait really?! It changes editor localization too?!
That's awesome, and really bad design lol
I have not experienced it, but thanks for warning! 🙂
If you call SetLocale or whatever it is from BP in PIE, it does. 😂 I've gotten good at getting back to the locale settings.
I genuinely have no words 😆
If you want to test it in PIE. Open a widget and go to it's designer tab and change it from here.
It'll change all loc in your editor to that for FText you have done, but won't actually change the entire editor's locale.
Yeah, i only used this
Loc is fun. Enjoy the incoming hell.
Thanks! XD
One thing I strongly recommend is finding a way to attach context notes to your exports. Can do this with C++ stringtables, I don't know how to do it with BP only.
"context notes to your exports" I don't really know what it means
One example that always comes to mind to express it is Private. We have a military oriented game. So they translated the accessibility dropdown menu. EG Public/FriendsOnly/Private. They translated Private to the rank of Private instead of Private as in secret/exclusive. Identical word in English, not in other languages though. There are a lot of issues like that that pop up without context in translations.
Yeah, i know it, i don't really have translate miss meanings, so it is okey i think
I have only 2 langs in my game, and i am good at both so it is easy for me
If i understood you correctly
I mean if you're your own Loc team, then easy times. 😂
Hi im trying to change the direction midd air of my "projectile" (using ProjectileMovementcomponent)
tips ?
There is a call for that.. sec
Oh, that was for local space. It just sets velocity. What is your issue with this code here?
It's not super important, but I thought you could hide unconnected pins on a set node?
Hey all, I'm trying to add an impulse at a random point along the top edge of a plane (technically a thin cube cause I wanted the reverse side to render) aligned to the YZ axis but for some reason the force and particle always seem to spawn in the centre of the mesh. Anyone have any thoughts as to what could be going wrong?
your random is rerolling
Draw debug point to make sure you're cooking up the location you think you are
You should be able to in the details panel.
If you mean the SetMembers node anyhow.
Yeah it's weird, I know it exists, I just don't see it on this set node
It's not the end of the world, just would look cleaner to the eye
Thank you very much for that advice, turns out I was completely off on scale 🤦♂️ 🙂
Hi, I'm getting quite a headache with rotating and moving this template (big gray rectangle).
The idea is, get one of the arrows (top, down, left or right), then spawn a new room (for now the same room), at that location.
Easy enough, just get the selected arrow location and rotation and spawn the actor there. Works just fine.
Now, just need to choose one of arrows to connect with the original. Rotate the spawned room and, the part that is giving me headache, apply the necessary offset on it.
I got it working with Top and Bottom, so if I pick Top (red), it spawn the new room at the red arrow location, since it is top with top, it rotates 180º, then move it correctly. Same with bottom.
But for left and right, I cannot get it to move correctly. Since it is kind of moving where it should, I guess my problem is with my distance calculation some how, which is just the distance from the center to the selected arrow. Either that or how I'm reversing the forward/right vector.
Well something is definitely wrong, as the select case for direction selected has everything as -1.... I don't get it 🤯
protip, transform and inverse transform are your friends here
I'm running into an issue where I'm running a line trace in a spawned BP, that's supposed to trace to the ground and derive the impact point to spawn a particle system, but for some reason, it refuses to react on hit with landscape or ground planes, so it always returns 0,0,0 as it's hit point. Not sure what I'm doing wrong here.
show more of the math driving the start and end points
Minus 0,0,1000000
You're tracing to the characters bottom of their foot and not 1 cm further
Can you clarify
you're stopping the trace right before it hits the ground
This
trace further down
If that doesn't work. Your floor isn't blocking visibility channel.
show math
My mistake, just had the value inverted
@faint pasture @maiden wadi thanks!
Im surprised none of the traces barely hit but maybe your floor is perfectly flat
in this test scene, it is
why this cast failed???
i cast from my camera pawn to my character its allways failed -.-
Is your camera pawn a MasterCharacterBP?
You should try to change the way you think of casting. Instead of reading Cast To MasterCharacterBP, read this as Tread As MasterCharacterBP. Which it can only do if it is one. So your camera pawn has to inherit from MasterCharacterBP to be able to cast a pointer of your camera pawn to it.
its jsut a pawn and my character jsut a character
What you mean is "When I cast the return value from GetPlayerCharacter to my custom pawn, it fails"
You're either doing this too early, or your player's character isn't a MasterCharacterBP
waht can i do?
i odnt know waht you mean
i jsut wanna cast to my cahracter
why it not works -.-
Show your character BP
specifically the top right corner where it says what its parent class is
Hey so I made a dummy with a health bar, and im using interfaces for it. I think I have my Create WBP Dummy Int widget setup wrong as it does not update and I get the shown error every time its hit, how may I correct this?
You don't add it to the screen so it probably gets GC'd immediatly?
What class owns this widget?
I'm trying to see how that should help.
Basically what you are saying is that I'm mixing local with world location?
wdym, I have this in the Dummy Blueprint and its an actor
What's your goal? I'm assuming you have 1 room placed already, and you want to place another at any of the 4 rotations such that a door or whatever those alignment objects are line up?
You probably want a widget component
That's how widgets end up in world space like hp bars above heads
if that's what you're after
right its in the world, I just cant get it to update at all
how? Show the full BP
do you have a widget component on the actor?
yeah
and you're creating a 2nd widget
saving a ref to it
but it's not visible anywhere
All the blueprints I have
Cast widgetcomponents widget to your dummy widget class and save that ref
Align the arrow from one room to the other room.
It spawn the new room right where the arrow is.
So the new room center is right at the old room arrow. Now I need to rotate and offset it so both arrows align
Oh I see
Why are you doing this? You already have the widget, its in the widgetcomponent
Working
So there can be multiple valid offsets and rotations?
Old methods, I was trying to refrence how I did my health bar for the player but I went through like 3 diff ways and had left over code, with that being said ima go clean that up, ty for the help
woudl say yes, but for now I set to only pick 1 arrow at the time so I can debug. It works fine top / bottom, but left right it doesn't quite get there
OK first off where does the rotation come from, or do you just pick that?
I'm assuming the rotation and the 2 things to line up are set in stone, now just to move the 2nd thing to line them up right?
comes from the arrow name, each one ends with L, R, T, B.
It does rotate correctly, the issue is the offset movement
Do you rotate first then move or rotate and move in 1 shot?
If you rotate first it's easy, just move by Arrow.WorldLocation - OtherArrow.WorldLocation
I was rotating firs, then moving, now I'm trying with set actor location and rotation node, which I don't know how it applies
that is what it is doing, but just don't work for left / right
If it's all the same just rotate first then move, otherwise you need to effectively do all the rotation math on your own end
I just don't get how the inverse transform would help since you mention it
why do you have all these multipliers, if you've already rotated, just subtract the world space positions and apply that as an offset
It would help if you were trying to do it in one shot
was testing, but setting everything to -1 so I can get ride of it later is fine.
so I guess this doesn't do it at once?
That does it all at once
you have not rotated by the time you go to get locations of stuff
it'll be easier to set rotation -> do the subtraction -> set location
Oh, I see, I'm subtracting, then rotating
yeah you'd need to rotate the subtraction in that case, with all sorts of math to consider how the arrow moves when you rotate the room
should be easy to invert those nodes, lets see
It should be literally this simple
Set Room2.Rotation
Offset = Room1.Arrow.WorldLocation - Room2.Arrow.WorldLocation
Room2.WorldLocation += Offset
Oh, you are also basing off the other arrow location, I'm basing off the bp center
noted, well it is the same, center of new room is the same location of the arrow
Holly Fuc#@ look at all the sheet I was trying to do
dead simple
Thanks so much!
I'm on this crap for days. Had it working at some point but only around the first room, anything beyond room 3 would start to get offset again
Now it is beautiful 🥹
I can finally work on some new rooms and progress
Any way to get this bug to go away aside from restarting the editor?
The variable type changing from "thing" to "LIVECODING thing" after a live coding compile
heyy that looks awesome. I've also been working on some room / dungeon generation. it feels so good to see when it finally starts coming together
Don't tell me, the struggle is real
are you using c++ ?
i think #cpp will probably know more about it ?
fr. i've been working on mine for about 2 months.
there was definitely a lot of struggle in rotating the rooms / hallways to face the correct way around a pivot. had to do some math. i don't do math 👿
Yah, I had my two brain cells almost frying trying to figure out this rotation and movement after rotating, I left the project a side for couple of times.
are you doing multi levels by any chance? (buildings higher / lower)
I've thought about faking it rather than doing crazy 3d delauney triangulation
I thinking about it, it should be as simple as adding an arrow upwards now that the system is working, but I'll go with door locks and some sort of design before going vertical
yeah KISS is a good strategy lol. after this I'm faking as much as i can to avoid spending months working on a single system again.
I decided to start my prototype project over to be more forward with gameplay tags
😠
No regrets™️
Is save game the only way to save player info to a server? If so, what would be the best way to save information? E.g. each player has a save file which holds everything, or each player has multiple save files for different information.
save game is not ideal for servers you should use databases or EOS
Ugh refactoring this Quest system really is painfull
Will be worth it tho
that's the first quest
yeah just gotta rework everything about it
once it's done its gonna be good tho.. I think
what's being fed to these?
*let's pretend we didn't see it*
Nvm I just scrolled up and now it make sense
Usually after more than 4 else if ladder I would reconsider what I'm doing
I mean… that whole thing is a mess
Idk why people think getting some fancy node/noodle plugin means it’s ok to make your code as illegible as possible, cause the lines are more straight
And that’s just the aesthetics lol
There is also some degree of precision with floats,
Probably want the node with error tolerance
If whatever is plugged into all those branches is the same value, the first and second checks are completely identical
Sorry for the late reply, but yea that's a good lead!
I'm new to Unreal Engine 5. I was trying to follow a tutorial on how to create a simple kart racer game, but when I tried to implement the wheel rotation movement from the tutorial, it didn't work. Sorry for my bad English. Here is the video I was following: https://www.youtube.com/watch?v=OcNsToxPm_U. I’m having a problem with the section of the video around 8:00 to 9:00. Please help!
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley
PRIVATE 1-2-1 SESSIONS
Email me at support@ryanlaley.com for more information and rates, or visit http://www.ryanlaley.com/sessions
JOIN THE COMMUNITY
Discord I https://discord.gg/TcPtCBp
FOLLOW ME
Twitter I http...
Hey folks
Is there a way to "snap meshes together" using sockets? (I know how to add an actual socket. Just not if I can snap them together easily in my level using those)
Or if you know a better way let me know.
I have a few different track sections that I would like to be able to line up easily.
Like:
Straight
45 degree bend
90 degree bend
crossover
what snaps to what?
So that I can snap two track sections together.
Without socket I feel I can line up the pivot point to a precise location on one end of the track. But I need something to snap the next section to. Thinking a socket might be the way.
Stuff like such tubes for example
In game or in editor?
editor.
Hoping it would help down the line for in-game too, but that is not a requirement right now.
Does anyone know if it's possible to have an editor utility actor call something if it's destroyed/removed from the level in the editor?
are they uniform sizes?
Looks like they are
Like 500 by 500 for example you mean?
Could maybe make them be
45° might be hard
Right, gives trouble when I start using 45 degree bends though.
I could maybe center the gismo and make sure they are 500 by 500 for example.
Then I can use the align tool, and move along local gismo direction after that.
Just figured there would be some sort of easy customizable snapping.
Editor tool for placing them running constructionscript logic
Hello, do I have an error here? when I set the Bool Danger as True, I always get false
you need to understand which one get run first
event begin play run as soon as the actor is spawned
who knows when your event danger is called
My brains thinks:
In construction, add a small collision Sphere around each socket
Check to see it it overlaps another meshes socket's Sphere
If it does, Set actor location to the difference between the socket points
but brain has been wrong before....
haha
So its good from my pov 🤣
ahh yeas ok Thanks 🙂
What a smart brain you have. It's almost as good as mine 😄
you can hold info in the socket's tag if you need to have different types
Need to look into how construction scripts work.
But after that I guess an overlap sphere to trigger and then setting location based on a socket transform would work.
Not sure what that means at this point.
If you have Tubes, and you dont want them to connect to Wires, you can give the socket a Tag, and check for that before snapping
Can anyone please help me? I'm new here.
I think i did it in ue4
I'm hoping I don't regret it later - I'm not sure why I would, but I usually find a way lol
I never saw it
Advanced Dropdown
Always looped them and compared the name
....
So I'm working on character creation, and I want the character creation system to save the character data - would that just dump right into a savegame function? Wouldn't it make more sense to dump it into a SaveCharacter function and then put any characters we have into the SaveGame?
Saving is just the act of writing to storage
you can do what ever you like
just make sure the design make sense
I guess this is more a design question than a blueprint question, yeah
You can write straight away, you can pack the data and write it together with other attributes, it really depend on you imo
I want to think long term but I also don't wanna try and learn to swim in the ocean, if that makes sense
If I keep the saving strictly to the character creator for now, later when I build a proper save game I can just feed that data in
but the optimal solution for something like this is abitary tbh, it really depends on the project.
not really an aswer that people can just say, oh just do X
you can always keep it simple ofc
sure, I guess I was asking more for opinions on my thought process
Press button -> Finalize Character -> Save
My game is 1 Character Per slot
So i just create a new save slot when character is finalized
Save game for slot 1 , 2 , settings
I get you
I think 😂
Is there any reason I'd want to put my tags anywhere other than defaulttags.ini?
UE will load tags from every source I tell it to, and I can put each "category" in its own source?
Maybe a little too compartmentalized, but I don't hate the idea
@visual ember What should I do? I can't speak English very well. I use ChatGPT to translate, but I'm not sure. This was my question.
I add tags as native tags so they are reachable in cpp
I dont split them at all yet. Probably comes back to bite me
the adhd, it forces me to start every thought with "how can I do this with the least amount of self-sabotage" lol
doddle on paper
Planning before attacking
ofc I am never satisfied too because as we learn, we think of better ways to do stuff
Smart
but if you keep re-doing your work, you will never finish the game too
If I had a dollar for every notepad I own with some bit of game info doodling in it
I'd pay someone to make the game
Wouldnt pay very much huh
I have a BOOKSHELF of notebooks 😦
250 notepads barely get you 2 hours these days
Now transmute them into a game !
I have a (virtual) bookshelf full of abandoned projects
I love doing UI
probably the most time I had fun when doing my character creation
I'm doing a very painful way of loading the assets to
using FStreamableManager
Painful?
Its 2 lines for me 🤯
Well 3 but
Curly dont count
(Found out you can also do batch loading of assets in a bp macro )
void AAGCharacterPreview::ArmourLoaded(UObject* LoadedObject)
{
if(IsValid(LoadedObject) && IsValid(LoadedObject = Cast<USkeletalMesh>(LoadedObject)))
{
USkeletalMesh* ArmourSkeletalMesh = Cast<USkeletalMesh>(LoadedObject);
GetMesh()->SetSkeletalMesh(ArmourSkeletalMesh);
OutlineArmour->SetSkeletalMesh(ArmourSkeletalMesh);
//Set Mesh Anim Blueprint to the Armour Anim BP
if (ArmourAbpPayload == nullptr)
{
ArmourAbpPayload = NewObject<UStreamablePayload>(this);
}
ArmourAbpPayload->SoftClassRef = CosmeticDataArmour.AnimClass;
FStreamableClassPayloadDelegate ArmourAnimClassPayloadDelegate;
ArmourAnimClassPayloadDelegate.BindUFunction(this, "ArmourABPLoaded");
ArmourAbpPayload->AsyncLoadClassStreamable(ArmourAnimClassPayloadDelegate);
//Start Loading Armour Outline Material
for (int i = 0; i < CosmeticDataArmour.OutlineMaterials.Num(); i++)
{ // Load Every Outline Material for the Armour //
LoadArmourOutline(CosmeticDataArmour.OutlineMaterials[i].Material, CosmeticDataArmour.OutlineMaterials[i].SlotName);
}
}
PostMeshLoaded.Broadcast();
}
^ What I got 🤡
Coulda just be something like this
AttachedAudio.Add( UGameplayStatics::SpawnSoundAttached(co_await UE5Coro::Latent::AsyncLoadObject(HomingSfx), PSC));
cbf refactoring
Puf
This looks painful :p
Im using a lambda thing
Thats my level of knowledge 😂
Which just calls the function when the ssset is loaded
In a case like yours id batch them all, and call the function when they're all loaded
So the thing I liked about using Enums was that I could use them as data and also convert them to player facing information - with gameplay tags, I'm going to have to manually convert Ancestry.Dwarf.Forge to string values that will display in a readable way, I think
unless I just handle that strictly through widgets somehow, which I think makess the most sense
converting them is one node away?
if I convert to a string, it's structured in an ugly way
can you show an example?
it's not a proper example, but
If during character creation, you pick Gnome, and it gives you the gameplay tag Ancestry.Gnome, and then you pick the Sensate Heritage, it gives you Ancestry.Gnome.Sensate, and then I need to translate that to show Gnome and Sensate respectively on a character sheet widget
I could convert the enum to a string and use that for UI, if I convert the gameplay tag to a string, it's got gameplay tag formatting
I'm thinking it's gonna be better code, but twice the work
which is fine, I just am not sure if there's a better approach
(not an actual use case example, just showing I'll have to edit that string or set the gameplay tag to a UI text specific or something)
before, when you picked gnome, it set the ancestry enum variable on that character, and I could just pull that and convert it for UI
not sure what the problem with this. You can always just create a function to format the text.
not to mention you can't really do typo so less headache with bugs.
if it's for definition you can just make a map pair of GameplayTag and FName(description)
How would you format it to not show part of the tag?
like the . ?
just replace the . with space
you already convert it to Fname/String you can format it as you wish to display as a text.
hang on let me see if I can do what you're suggesting, I'm likely just ignorant of the format node
you can format the name/string
Sure, I just meant I'm ignorant of how to format it in a way that would ignore parts of the name
I've only ever really used format to combine multiple variables into a single line of text, not to chop up a variable
can you elaborate on "coverting" the tag for UI?
In the insance of my above screenshot, I only need the word "Sensate" to show on the screen
It's probably better to just use a map like you suggested earlier
instead of trying to subtract text from every tag with formatting
so you just need the last text from the tag?
In most cases, probably
you can just format it, find the index of the last . found and just use that as the text
Substrings or w/e it's called
i am out of touch
it should be just one node away too
I used enum too for something simple. Mostly UI stuff like to define pages
but for something more defined like attributes, characters, types, etc. I would totally use game play tags
well eventually, for the character races, the info will be relevant for lots of other stuff (conversations, race specific feats, whatever) so it made sense to convert it
I'll just try the map for now
kinda works like I'd want, and then I can use the gameplay tag for game data and the enums for user facing data
and if i build the data table row to naming conventions matching the gameplay tags, that would make that much easier too I think
cool, off we go
Im not sure why you want to involve enum here
also to prevent typos and make selection easier
gameplay tag is there to prevent typos
Common sense tells me that is true, but why?
Enum is just a named integer, you already have gameplay tags, I don't see any reason to involve enum there
What?
It really depends on your game man, you don't need databases for every project.
Look at baldur's gate, multiplayer game, but we save the file locally
the enum is for the player facing data, and I can't get the gameplay tag to format the text the way I want, it's potato potato from a map of tags to names or tags to an enum containing all the possible names
I am doing listen server too, no data base, nothing. Just save the data locally for each player.
I don't trust players enough for that
you can format the text in any way you like. I suggest to look at strings manipulation first before dropping enum
Is your game dedicated server?
You don't need to trust them, if you are making co-op game, you shouldn't care if they cheat or manipulate the save file
I'm not making a co-op game. I'm going to try EOS.
if you are using listen-server model, you shouldn't waste your time preventing cheaters
because you can't
even a 10 years old kid can use cheat engine
Would you mind showing me a basic example? Because looking at the string palette for how to parse down the info, I cannot for the life of me see how it would be any less effort than just typing the 8 races into an enum and using those
8 races into an enum?
I am not understanding the objective here
why are you using enum at all
so if there are like 100 races, you are going to make 100 enum?
that's labour extensive, apart it still doesn't make sense to me anyway.
ParseString (delimiter = .)
I got that far, but then i don't know what to do with the index
I know he said lastindex, so I'd be getting the last .
Ancestry.Dwarf.Sensate becomes
StringArray(
0 = Ancestry
1 = Dwarf
2 = Seesate)
and then probably something about left chop or whatever
google is so difficult to read through for anything other than the most basic ue tutorial trash D:
