#blueprint
1 messages Β· Page 225 of 1
and let trace slip through the physics object
and use trace hit as the target location for the object
I will literally pay you to walk me through that lmao
I can show you what i have already
My paypal is ******
is that a no
It wasn't a no xD
Pretty sure hes messing with you lol
trying to see if i had anything i could start off from
100 frickin characters in this dumpster project
one less fit than the other
this is first person , right ?
LMAO yeah it is
it basically updates the location of the object every .001 seconds
id just do it on tick
i thought that was a big no no
for this, its a big yes yes
this should set the location to hit result
If your timer is 0.1 or lower, tick is more efficient
if i ignore the timer part (since it could just as well be tick)
i think tick fearmongering is worthwhile for early learning, but as you advance you learn that there are some things where it's okay to use it
so create a TargetLocation variable
and when you trace,
if its a hit, you store TargetLocation,
you don't, your map is what you use instead of your bool array, so instead of bools, you're checking names against the map to see if true or false
if its not a hit, you store TraceEnd location
full refactor on that, sorry
Its not compatible with array elements
they're not ment to be
So I just tick the ones I want for it on set?
in Maps you use Add
what kind of variable would TargetLocation be?
its a location, so vector
oh right ok
so for example, I'd break hit result after the line trace, and then set the TargetLocation variable to the location from the break hit result?
If its a hit
with maps, you'll add a value to a key on the map, screenshot only BARELY related
so like, your Prayer 1 # would be the key, and each one of those would have a value (the bool, t/f)
Mine have two bools that come out of the find lol
now you'd just make sure that you let the trace channel slip through when you're holding an item
yeah, lower one is if the key exist
upper one is the actual value
if key is not found, the actual value will always be defautled (false for bool)
Okay so use bottom, thanks
oh
but will always return false if the bottom is false
it may return true if bottom is true
and then to change a value on the map, I do add?
TYVM! @gentle urchin @copper chasm
This ends up just keeping the object in the same place. Im using a line trae for objects, does it need to be a line trace by channel?
gameplaytag
Because your trace hits the object, after pickup
you could disable collision
but that could cause weird things
you can manipulate just the channel that you're tracing tho
so on pickup, set channel to ignore
on release, set channel to .. respond ? block/overlap or whatever it initially was
not sure if you can use any of the internal delegates for the collider to do this
wake/sleep/state changed perhaps?
wait wait
always with the gameplaytags XD
gameplaytags or bust lol
does this look right? besides the absence of the event tick
assuming target location is correct, yeah
I'm glad I figured out a workaround for getting all actors with tag, because they ARE good to use, and they ARE infinitely better than normal tags
this looks alright ?
so theres no other way to make this work other than messing with collision?
could you not get the vector length at the impact location and clamp it to that length, or something?
untill you hit something that is not your currently held component
(i haven't been paying attention to the conversation, this is probably a stupid suggestion)
wait
is there a way to specifically store just the distance between the camera and the object?
how so?
whenever you pickup
you store an actor reference
and then you insert that in the actors to ignore array
at the start of the trace
so as long as it is held, it will be ignored by the trace
make sure you clear the variable once you let it go tho
I need to make a character sheet widget system now and that feels very exhausting (I despise working with ui stuff, I overcomplicate it) so I'm gonna go get some lunch before I do that, cheers all
The object still just stays in the same place
(Set held actor after the weight check)
oop ok
alright so now, the object still stays in one place but after i let it go i cant grab it again
oh no you're right i forgot about that
so now i can keep grabbing it
but it still just stays in the same place
have you considered it may just be a very heavy piece of cheese π
Soo, debug draw
See whats happening with the trace
Does anyone know how SaveGame objects are saved between starting the project?
I've watched a Mathew Wadstein tutorial over this and he can save, close the project, open it again, load and it will load values from that save.
In my case I save, close, open and the save does not load. It in fact does not exist as I have Create SaveGame object nodes if the CastTo fails and it does pop off.
Can someone shed some light on this?
I more or less copied nodes one to one for my own thing and it doesn't work, so I don't think its inherently on my side.
Show you logic for loading the save and the logic for actually saving.
Replace the 'Set Timer By Event' with 'Set Timer Next Tick'. If 0.001 becomes less that tick it can cause a hit to performance. Plus it can end up happening ever other tick instead of every tick.
Shameful to admit but while cleaning it up so that it looks appropriate for the screenshot, I found the issue. My apologies and thanks nonetheless. π
Happens to me often π€£
Im really trying to get into Unreal and someone told me to start learning by learning blueprints but how does one go about doing that?
youtube only helps so much I figured out how to get to the window for unreal but idk what to do
What sort of things are you wanting to make?
not sure what you mean, set the default values of the map in the BP
When I click a button, I want to reset back to default
Because ADD changes the value
I want to make video games
You can get the class defaults and set it with whats in that.
default being false?
if you want everything to be false, you can simply clear it
alternatively loop its keys and values and set all values to false
Such as?
so my characters are built with just about all the information I need on them stored in actor components - if I wanted to display stats for a selected character, would an instance of BP_Character be able to reference its own component information outside of itself? Idk if that makes sense
outside of itself?
I want the C button to show a widget with the stats of the currently controlled character, if the widget has a reference to the character, when it pulls the component information, it will be relevant to that character, yeah?
Yes, it'll be the one on the referenced actor.
let the widget do the pulling of the data
I want to start off with a comedic, silly, low poly multiplayer game I dont wanna do anything massive
for instance, left click char A, hit C, widget pulls the stats actor component and reads the hit points, shows on widget - if I close that, left click char B, it'll read char b's components?
if you possess char b, and set it up correctly, yeah
if you store char A's component and dont do housekeeping, nah
Got It! Not sure if theres a better way. But this is working! Thanks again @copper chasm @gentle urchin
well, I wouldn't possess per se, I'd just set it as the ref char on click
i just don't know enough about actor components to know how that communication works lol
this looks so weird
I would avoid multiplayer if you're new to UE.
What I do Wrong? lol
you're clearing the entire map, and setting a variable true afterwards
is that what you want to achieve ?
If you simply want to flip its value
does anyone know if UE5 has an inbuilt feature for disabling specific console commands?
you can invert the current value
you can ADD the other key and set it to false just like you're setting the current one to true, it's KIND of a horse a piece
Nah, doesnt work unless I have that on there
do you just wanna invert the value?
no
if false, set true
and if true, set false?
I need it modular, to apply to 6 buttons total
If there's only ever going to be one entry in the map, you can get away with just using a single gameplay tag var. If it's set it's true for the specific gameplay tag. If it's not set to anything then it's false.
you guys and your gameplay tags π
hey, how can I scale down all segments of chaos fractured model with blueprints? After I break something, I want those pieces to slowly shrink. Scaling down actordoesn't work well because it scales whole actor and moves pieces from their original place
button 0 ,toggles on, and turns off buttons 1-5
button 1, toggles on, and turns off buttons 0,2-5
ect
If the button that is toggled on, is pressed again, turn everything off
Not working in a studio, huh?
I don't need to make things pretty for my designers, my designers are a bunch of cats
I don't disagree they are useful insofar as the least common denominator is concerned, I just laugh cause I wonder how many times a day they get suggested π
i think learning gas actually teaches more about UE itself than anything you can find on youtube or whatever, how to look at things specifically to ue dev
I have different tags for different buttons, Should I not?
Haha. I meant more the desire to avoid spending half an hour tracking down a bug just to realize someone typed TisThing32 instead of ThisThing32
Understandable. is it still possible tho like later in future like what if i just want to make the game itself for now
NGL took me 3 read throughs to see the difference
I more so just want to understand the interface and know how the nodes work
And the person who checked the data only did it twice before passing it to the poor soul who had to waste half an hour on it. π
there are a ton of youtube tutorials out there that I would advise finding one made by someone whose voice you can stand and going through it all with a grain of salt, taking a step back every few hours and tweaking whatever it is you made by parroting the tutorial
You really just need a gameplaytag
it helps if you have a coding background, as blueprints are essentially just condensed blocks of code, but over time and tinkering you'll start to pick up the basics and then as you're googling for answers you'll know how to better frame your questions
Singular
Button.ActivePrayer
idk ive been scourging on yt for a good informational video but I cant find one. do u have any suggestions
How Would I check if its already on If I only have 1 tag?
if the tag is the one the button has, it's on. If its not, someone else is on (or nothing is on)
so if its someone else, or none, set it to us
if its us, then set to none
now wrap it in a function
which you just call
name it something wiisely
not really, sorry π - I spent probably 2-3 months watching through various series before getting frustrated and paying 20 bucks for a course on udemy
I took multiple on udemy lol
wait am i stupid, did you just make a tag container variable with a single tag and use that as a variable to check things against
I have been using hastag and all sorts of pain in the ass workarounds
not even a tag container.. just a tag variable
cool, idk why i never thought to do it that way, but I'm gonna go write that on the board
since its mutually exclusive
there can only ever be one
could've just been an int aswell, at this point
result would be the same
π€―
not sure if you need return variable,
i like how over the course of two hours we've come up with about 9 different solutions to this lol
lmao is udemy worth it in your opinion? to learn unreal engine I mean
I want to do it the right way, so I keep changing it lol
It works as is... but If I need to do it a better way to help with resorces I will
In total I have about 30 prayers, These 6 though, Only one of them can be active at one given time
There's only ever one dude whose courses I bought, Stephen Ulibarri (i think is the spelling) - I would recommend, the courses have discounts on his discord every month (cause udemy pricing is stupid) but yeah, as far as that one goes I would say anyone wanting to sit down and learn stuff would be served well, there's a newish blueprint course that actually has you build like 3 little projects in it and comes with the assets you'll need
nah man it's all good, any time anyone can learn anything it's a win, this is the job
Hes one of the guys in the courses I took too. A couple of courses lol
i've given that man too much money this year lmao
Took me so long to be able to start to wrap my head around things and start being able to make stuff happen that I wanted to happen lol.
lol
well, you go put out a 100 hour video series and i'll throw you 20 bucks too π
I'll wrap it up in 5 minutes
lol
there's a guy on the UE forums any time I google something it's always his answer that solves it for me, I wanna put him on retainer
Everynone?
yeah lmao
noticed
he's in this discord haha
man i'm so mad i never thought to just try a gameplay tag as a variable
doing it in tag containers is fine but is clunky when prototyping, trying to add and remove things from the container without setting it all up
oh wait, that won't work because HasTag needs a tag container
so I do either need to use tag containers or set it up in C++ so my actor class has more gameplay tag functionality
You can just check if the tag is equal to a tag.
okay so, I'm setting a variable to determine if a character is "in the party" - I have a tag that's literally Character.InParty. In my manager class, during an "initialize" function, I'm getting all character actors and checking if they have the tag party, and putting them into an array - if I just used the tag, it seems silly, because I could just put that tag into the container with the rest and check against the container directly
unless I'm wrong
Well doing things for multiplayer and for single player can be very different. Have you followed the tutorials Epic has provided yet? If not I would start their to get an understand of where things are in the editor and what not and learn about some of the common classes.
I could make a single tag variable for my manager class too I guess and just check it against that, would save me from potentially mis-clicking in the dropdown
dose "restart player at player start" dose it "restart everything even begin play nodes etc etc its not like u just teleport to that location right ?
I believe it just respawns the player pawn at the start location you specify - I don't know for sure if that means the beginplay fires all over again, I assume that it would, as the previous object is destroyed and a new one is spawned
i would imagain so,
If I have a custom game controller BP set in the gamemode, do I need to get playercontroller and cast to that bp every time I need to reference the playercontroller
or does the engine make that inferrence based on the gamemode
It depends what you need to do. If you just need a PC then no. If you need to call specific logic on your custom PC then yea.
thanks
so my widget will have a reference to the manager, which has a reference to the current character, and from there I can pull that character's info - right?
that's what my brain tells me to do, but I'm not super comfortable with the best practices of data management
i've just been establishing the manager in places i need it with "get actor of class" to set a variable
sounds about right
manager sounds liek a controller but maybe you got something more in there
it's just a pawn really, it's a top down rpg scenario, I just use it for the camera stuff and some random communication where I need to
the widget is pulling none though, I assume it's an order of operations problem
ah yeah the widget is being set up before the active character is being set, npnp
(we don't validate our gets in this house because we're filthy heathens)
in your manager
add a delegate for whenever character changes
let widget listen to that
oooh, delegates
hey, I really need help. My Pistol is set by default to simulate physics and I want it that way. When I use pistol in enemy class as ChildActor I have error that collision is not compatible with simulate physics.
I tried casting it to item class (so I can get item mesh easily) and disable physics for mesh, but it doesn't work.
Dr. Google says to make the static mesh of the gun the root component of the actor, although I suspect someone else may have a better suggestion as I am simply googling
It's really weird I can't do it the way I want. I wouldn't either like to make mesh root component.
Well, the child actor is looking to its parent for movement, and its parent is the gun actor and not the gun mesh, so it's looking to that for simulation, if I'm reading this right
What's the "right" way check if a Name param is empty? The usual suspects are all absent
check if equal to name none?
what does make name return by default
This should work, no?
What's interesting is one of those will work and the other wont
But I have no idea which
Oh, default value for name is None
I don't exactly understand what you mean. So there is enemy class that has child actor "Pistol". SKM of pistol is set to simulate physics, but in enemy class Pistol has collision disabled (so it's incompatible with physics settings). I want to disable physics simulation for pistol SKM in enemy class.
Hoooold up. THEY BOTH WORK
obviously my string output formating is awful but the results are VERY clear! "none" must be some reserve word in Unreal where "None" == "" is true
I think I misunderstood your question, my apologies, hopefully someone with better understanding of physics can come through π₯²
I think this is just unreal having weird structure
Hey, is there a βmask by colorβ node or sth like that in material editor where i want to select certain colors in a texture?
I don't think there's a built-in one but you can just make it
Abs(R - Other.R) + Abs(G - Other.G) + Abs(B - Other.B) is one way to generate the number you care about
Figures, thnx
Hello,
I am trying to build a weapon selection UI. I want the corresponding box to be at opacity 1 if the is the selected weapon, and if not .5
I tried this as a binding for my background image but it won't work. any Idea why ?
What happens if current weapon isn't primary weapon?
cuz your code says to change nothing in that case
nothing for now because I just want to test for the secondary weapon box, wich is the one on the top
it looks like this, but it never changes
Is this all 1 widget or do you have a widget bp per slot?
its one widget
so there's only 2 states? Primary is selected, or secondary is selected?
You need to add what to do when false, and do the opposite for the other brush
yes
you'll have 2 bindings which take opposite paths and set opacity to opposite values
plus you never return anything, that might be borked.
Hello
So i'm making a spaceship building system for my game, and there's a really stupid thing i've done where each of the 375000 grid elements (The player can build in midair so Linetrace doesn't apply I believe...) where I for loop a 375000 element array EVERY TICK. Is there a better way? Rn it freezes the entire editor when running.
you were right, I was going too fast ahah ty
what are you for looping for?
but my icon is still blank i dont know why
This is for Space Engineers style building right?
First off, is it a constant grid or can there be varied grids with various orientations?
static grid
is it like a Minecraft grid or Space Engineers grid
mc grid
just have some math to convert a world space to the grid coords
how big is a grid cell?
100 units
So assuming you've cooked up a 3d coordinate, GridCoords = WorldCoords / 100 rounded to int
that'll get you your grid coords
now to look up what's there, you need some math to convert from grid coords to array index
that's simple
Thanks a lot, imma try that
stupid question in the first place π
You then need some math functions like:
Index = GridX + GridY * YWidth + GridZ * YWidth * ZWidth
say your grid was 100 x 100 x 100, that'd convert 30, 24, 10 into index 102430
Also, maybe consider a sparse grid. How much of this grid is meant to have anything in it?
You could have your "grid" be a map of IntVector -> thing
grid is 50x50x150
then it'd be super simple to see what thing is at what position
Yeah that makes sense
so this is like cocacenation not math addition?
A grid with 1 steel block at 200, 300, 20 would just look like:
Key = 200, 300 20 Value = Steel
math addition
to convert from coords to index
to go the other way you'd modulo and divide
I'm thinking making the index a string and to do like a substring thing to reverse
uh
nah
just choose whether to represent as an array or map
array is a bit faster, map doesn't have size limits
map changes size based on how many things are in it, array is same size no matter what
What's the size limit for an array..?
What I mean is it doesn't have to be set in stone
you don't need a grid "size", you just have a list of locations and what's there
yes
Imagine a 3x3x3 with the center cell having a steel block.
Array:
None, None, None, None, Steel, None, None, None, None,
Map:
2,2,2 = Steel
Is it possible to get all gameplay tags at runtime?
ok i seem to have missed a minus somewhere
ye right floor it is
probably truncate (because you have negative values)
even tho... snapped to grid would resolve all those issues
I figured out how to get all the members of my party, take a struct containing the data for their portrait widgets, create the portrait widgets and populate it individually with the data - I don't know how to get it to sit where I want it to sit and to position correctly, but damn I am proud of myself
how do i make a delay system where the player can't execute something until x seconds after the last input
For some reason it's creating three widgets, duplicating the first one, even though there are only two characters in the level, needs debugging
Hey everyone!
My Jump input suddenly also started triggering when releasing the space button annd I don't know why. Does anyone know what I might have done?
I remember a character named Xelthas in a MUD I used to play - can you screenshot your input action?
text based RPG, lol
did the add child during the loop and not when it was completed ^__^
You may have changed the input button behavior in your character Blueprint, or the input mapping.
move it from triggered to started and see if that stops it
It did stop it
but it's weird. I havent touched anything afaik
Triggered may fire over multiple ticks, started only fires once until it stops, if I'm remembering correctly
you could also potentially throw a bool in, isjumping, set it to true on triggered, false on completed, and if it is true don't execute the code
but for a jump you probably just want it on started
Thanks man
o7
you saved me from a big headache
Is there a way to get the animation slot value?
did you try turning off context? It might be hidden hidden, or it might be kinda hidden
Try getting the param struct
If you can't, it's probably not exposed / private
Anybody got a good comprehensive ui tutorial they reference? I am struggling trying to position everything just so
Hello, what do I do for a color range?
What do you mean color range? You want WHAT to map to 1, while everything else maps to 0?
Mm i understand the wrong in the question. Got it
what is a quick way to animate a value from 0 to 1, without using a timeline, or some delay hack?
linearly
Maybe I'm missing something, but I can't find anything useful
Without a timeline, in BP? Just add deltatime to some counter on Tick, then.
Looks like this
did you try to get the params struct off it and split the pins?
I cant figure out why I'm getting this runtime error
Don't c anything useful you can get anyway. They are just defaulted to default values.
What are you even trying to achieve here?
show the toggle bp?
One or more of the references in that array are null, I would assume.
Don't have to go that far
oh yeah i guess, I see
prolly
put in a breakpoint and see what the array has in it
yea I had an empty slot in the array without a selected object
dumb mistake, thanks anyway yall
I need to configure the start/end frame of animation tracks (sections) with a specific slot name.
Hmm not sure about the use case, if you want to edit the start and end frame you can just edit the animation assets by splitting(removing) the sections
Looks that I can't use this. I have very specific use case for virtual production needs. But anyway thank you
Alright. Running into an odd one. I have an end overlap in a blueprint that seems to being triggered when I end a pie session while my player is inside it. It's trying to create/destroy a widget (depending on validity) at this time, which is causing engine crashes about 1/3rd of the time.
Anyone have a clue how to prevent this? I'm honestly baffled I've never run into this before.
are you checking if the widget is valid? Also you can't really destroy a widget in blueprints, garbage collection takes care of that
what's the crash saying aswell
Right. It's being removed from parent. If it doesn't crash I get a nice log in the message log that explains it was trying to access a widget. If it crashes, the crash log is pretty vague.
yeah, sounds like you just need to do a validation check
"isvalid" node
if the widget was never created because you spawned inside of the overlap, that means the on overlapped event never fired which is where I'm assuming your logic to spawn the widget is happening
I am. If it's valid, it removes it. If not, it creates a new one.
I probably just need to change how this happens.
showing your code helps
I didn't write the code. I'm refactoring this to be more generic and just ran into the issue.
need a validation check on the widget you're trying to remove
I think it's crashing on creation.
yeah I'm pretty confused on what you're trying to do, I assumed leaving the overlap meant you would be trying to destroy the widget
Yeah. Honestly I'm confused too. lol
I'll be back with better info once I know more. I thought I had it narrowed down, but I could be wrong.
Regardless, I'm still confused why an end overlap is triggered on terminating the game and how to prevent that.
It seems I have found the proper solution. Thanks everyone, guys!
Hi so im going to share an image and two short clips of my code, mayb esomeone can help me. I have a jump that has a delay so it can only be triggered every 4 seconds, and a sound as well that plays . I have a dash key as well that just boosts the character forward and i also want it every 4 seconds only too with a sound, i have some code setup, the jump works perfectly but i cant quite get the dash to work, anything would help
this is the jump working
Jump code that works as you can see
Dash code (currently i cant even dash)
i basically copy pasted the jump code to dash with a dash cooldown instead of jump cooldown but no work
im gonna be messin with it for a while if anyone has any ideas
why is your details panel so infuriatingly large? lol
Have people here figured out a way to quickly bring up the blueprint debugger? I can't seem to make that shortcut work, and I can't tell if that's normal and I'm doing something wrong with my UE editor instance.
use the debugger. Press F9 on one of the early nodes and determine what is failing
Hello anyone who could help. I need this grid of locations to always be oriented in the correct way no matter how I might rotate the actor. Almost there but you can see when I turn it they still line up the same way. What could I be doing wrong here?
because im retarted but i got it working, ill show you
firstly my input action self deleted, but it was still firing soomehow.. creepy, but.. ill show u code
Ghost code?
halloween is coming up π»
here's ashort video on the debugger. recommend watchinnt it to see how it works, and how it can help you debug your code
This will show you one of the quickest and easiest ways of debugging blueprints in Unreal Engine using Breakpoints, I am showing this in version 5.1 but this method of Breakpoints is available in Unreal Engine 4 too, and even some earlier versions that no one uses anymore (I hope).
Let me know in the comments if you like these type of quick tut...
How do I save across editor instances? I don't mean saving during gameplay. I have an editor utility that controls an actor spawn/despawn grid - if I save and relaunch Unreal, the created actors don't stay in the array they were cast to (i.e. using the editor utility widget to spawn/despawn actors will add or remove actors but ignore the ones that were created in the previous session).
Man has anyone used DetourCrowdAIController lately? I cannot for the LIFE of me get it to navigate. I've tried a fresh project, deleting navmesh and agents, everything
What are you doing exactly? Using the utility to spawn actors into the level before play?
Yes. This a slightly older gif but this is the functionality (the actors that are spawned are children of the hex grid actor now).
Not shown is when I save the scene, restart unreal, and use widget again. Using it again works, but whatever tiles existed in the previous session don't respond (because the array must not be persistent I'm guessing).
How are you spawning these in? There is a subsystem you're supposed to use for this in utilities.
Using a spawn actor node? I destroy/clear then resize the array based on the value and foreach spawn a tile which gets set in the array.
Is this code in the Utility?
The EU_HexGrid blueprint is an Editor Utility Actor.
Unless I'm supposed to use this?
Might me that.. Sec, I'm starting editor. But I thought it was from EditorActorSubsystem.
Yeah, this one I think.
Okay thanks - and to be clear, the code is in a blueprint of type Editor Utility Actor but I'm not using the above - I'm just spawning it like a regular actor I guess.
Okay so spawning via this node should persist or do I need to do something to the data (i.e. the array)?
Unsure. I believe this spawn node will at least make the actors spawned save. I'm not sure about the array. Usually you need to transact an object when editing it via the editor.
TBF I'm used to editing data with utilities. So this is me guessing.
hey, i just got unreal 5.4.4 today, and I was =wondering if I could get some help. I am very new to coding and would just like some guidence
Generally just ask questions. People will usually respond if they're able. Larger learning will mostly require you to do it on your own through tutorials or blogs, and such though.
Okay, what do you mean by transact? I'm doing this [images] currently but I feel like the array is only local to the Unreal session. I'm finding difficulty in asking the right question about that. So, thanks for the help regardless.
tutorials dont give you the help you directly need, and start you off as a legit baby. they always say stuff like "what is coding" and "how do I get into the habits of coding" and useless stuff like that, and just take to long in general
Sec. I think I have an example for texture updates.
plus im saying, im a complete beginner to bluescript, and havent done much coding in my life. so i have no questions to ask because i dont know anything
how do you unbind the blocks?
nvm found it
I know you're responding - this is the issue (plus I've swapped out the spawn actor to use the subsystem but that didn't change anything).
"Old" was the previous session. Restarting and sliding the widget makes the new three ones and ignores the previous two.
Eh. Honestly, I would ditch the idea that you're going to do anything quickly. Coding and software dev are very long term goals. It takes weeks to be moderately efficient with any language, and that is with prior coding experience. It takes months to get a good hold on the basic concepts of Unreal's API and legitimate years to fully grasp it if you step from BP to C++.
I'm not saying this to discourage you, on the contrary just to put you in a better mindset that this hobby/goal is a very time consuming one. You need those tutorials to immerse yourself. You need to find some multi segment tutorial that you can follow along with step by step and saturate yourself with getting used to the engine.
Most tutorials are bad. But you need to go through them to get your footing.
But the array doesn't save between sessions, right?
Correct
I guess I'm asking what you meant by transacting the object - unless you're just saying colloquially "usually we don't worry about persistent reference, the utility is there to make the thing and move on."
@jovial sinew This is Transacting the object.
- Start a new transaction
- Ready the specific object for the transation
- Modify the object's state
- End the transaction
Gotcha, I will look into this more. Thank you!
Note this is used for static data classes like DataAssets and UTexture2Ds. I've never used this on an instance in a level before. But it may work. π€·ββοΈ
I assume modifying level stuff does this anyhow since this is how it does undo redo stuff.
Okay so I think that's what I'm trying to do with the array - make it static. But I know making things static can be bad practice. I'll look into what transacting is some more and go from there. Thanks for all your time.
On a side note. How come you're not using ISMs?
Probably because I don't know what that is
Haha. So.. Each static mesh will cause a drawcall or more. GPU costs basically. ISMs batch this to drastically improve the speed of rendering the same mesh multiple times. Like your hexes there. They're all identical so they qualify to be ISMs.
Instead of multiple actors. You'd have a single actor with a single Instanced Static Mesh component that has multiple entries.
Oh instanced static mesh - I'm just trying to prototype constructing a hex grid. Not quite worried about performance etc until the time comes. Also, eventually, I'd like to procedurally generate unique tiles (like grass, water, etc). If that's possible with ISMs then yeah that'll be the next step
I've a ways to go with all of this π
Kind of. There's multiple ways to go about it. Materials have PerInstanceCustom data you can use to do some things like a simple texture lerp. You can also just simply have an ISM for each grid type which gets a bit more complex with the programming since you now manage multiple components, but it causes even less GPU cost due to less complex shaders.
Is there a way to make a drop-down menu to set a variable in UE4?
Anyone interested in helping me with a grid spawn setup I could really use it.
https://forums.unrealengine.com/t/spawn-actors-grid-formation/2015599
I need to spawn my vehicles in a grid formation at the starting line. It is working (kinda) but when I rotate the stating line actor the grid is no longer oriented to the actor and I do not know how to make it do so. How can I make the grid columns always βgo rightβ in relation to the actor right vector no matter what rotation the actor has in t...
Hey guys, I need some help with damage systems. I have made a damage system where I can destroy AI enemy (Actor Class) but I have one more Pawn (a Turret) which I cannot destroy because IDK how to cast both correctly. Can anyone please help me out ?
Here's the Code.
Why not just apply damage to anyone ?
Anyone but instigatorz that is
Recievers can check if damage causer/instigator is the same as theirs if we're talking teams
how do i change visibilty over a server
Anyone had any idea why did the print string = 3?
My TotalFloor variable = 2 only
Binding an event like that in loop looks cursed as hell.
after the loop is completed
the index is above the limit
so if you read it out after it's done it'll say max+1
this is because the loop increments, THEN checks if we're still within our range
you can see this if you inspect the loop macro
at the point outside the loop, it might as well show -378954
but I guess it detects you are trying to get the value so it probably holds the whole context
its a macro, not a function
If it werent for this, the delayed loops wouldnt work either
like this #blueprint message
were you can freely do whatever you want outside the loop
delays, timers, whatever
as long as you enter with Next, and not Exec, you're good to continue
untill it Completes
given this, I wouldn't call it a guarantee. but UE isn't known for its great documentation
the wording is misleading π
i know people use this to 'hack' cached variables without having to declare them in the variable list
they stay retained for entire projects..
my whole point. consider any iterator/index to be a garbage outside of its intended scope. the fact that UE doesn't do that in BP ... well ... speaks for itself π
seems like a comment on index or the node stating to not use variable outside of the loop wouldn't hurt
You will crash accessing non existing element outside bp
Now to figure out where i messed up during the Questsystem refactoring...
this ain't right
I would feel pretty accomplished
hello ,
i am attaching one actor to another while spawning on the server side and then giving possesion to player controller , that object is coming under the parent in server side only but not on client side , so do i need to again attach it to that parent on client side ?
Better luck in #multiplayer
okay
why won't UE let me re-order inherited variables D:
because it's not Excel
Unreal Excel
they could at the very least go to the top of whatever category they're in
I suspect if I didn't have the category already created on the child BP it would be at the top, but I do not care enough to attempt to recreate it
(yet)
It will. You just have to tell it to do that in the widgets displaying them. Just no one has cared enough to make this a setting.
I meant in the blueprints themselves
name is inherited, I want it to be at the top, where IT SHOULD GO
I considered using the inherited name to set a new variable so I could move it, but that felt silly and like I say, I bet if it's the first entry in that category the rest will fill in under it
I know what you meant. The slate widget displaying it picks the order. You could likely change this by changing that widget somewhere in a source build, or making an engine PR. Engine is super modifiable.
ohhhh, i see what you mean
maybe next year when all I have left to do is tinker π
Yeah.. I tell myself something similar often. Next year just never seems to get here with all of the other stuff I keep learning. π
The agreement I made with myself was to do the prototype in BP so I don't end up in a rabbit hole, and it turns out learning tricks in BP became a rabbit hole of its own
Has anyone successfully toggled actor filters within a level instance, placed inside a persistent World Partition (WP) level, during runtime?
Hereβs the setup I'm working with:
PersistentLevel (WP) β LevelInstance β ActorFilters
Using the Data Layer Manager and the Superseded Data Layer Subsystem, I can only modify the data layer when simulating the level instance, but not when it's in the persistent level. Any advice on how to achieve this in the persistent level?
The end result Iβm aiming for is to have random variations of the contents within level instances at the same location using Data Layer filters.
What am I doing wrong? Sometimes I can edit a property directly in the property matrix with many BPs open. Other times I just get the greyed out visual when I try to click into the field and change it? (like the screenshot)
sometimes I have to just click it twice shrug
As far as I can tell they must all start out with the same shared value (or perhaps "0"/unset).
Then I'm allowed to start typing
But then I would have to reset all work I already did every time I want to go in and tweak numbers. Seems stupid.
No that also aint it.
What controls whether a variable is grey or "black" here in the "pinned columns" tab? Seems to be connected.
So I have a bunch of actor components that handle character stats, is there a way to pull the variables directly off the components somehow? I'm assuming I will always need to reference the component, but I am ignorant
I could make a function to grab them and store them directly in the actor, but that seems stupid if I've already got them in the component
just saves a node when I have to pull them from other places
I GUESS I could fill out structs with pertinent information for the character inside the components
So is there a way to do and operation in unreal engine
to do...what?
He's trying to press E and get this code to trigger but the E key press isn't even registering.
Multiple components ?
As in several on singular actor ?
yeah, I just compartmentalized
I DON'T LIKE THE WAY YOU ASKED THAT QUESTION @gentle urchin π
π
I push em all into one
While there may be other components that provides sources for stats
They all churn into the same stat manager
My brain is swiss cheese, if I keep things too compact I get super lost in the sauce
Owning actor being the glue between them
idk if you've got any familiarity with ttrpgs, but I'm essentially turning pathfinder into code
so I've got a component for the attributes, a component for tracking hit points, a component for skills, etc
Wish i had more knowledge than i do
well maybe someday you can try my game and get a feel for it π
But its mostly just a bunch of data
Which you'd tie togrther through the owning actor
So if skills got some %stat bonus
It would trigger a delegate, allowing the stat component to pick up the changes
am I breaking anything by having the components do the math and then updating the owning actor variables appropriately?
Nah thats fine altho there's usually no reason for the actor to have the final variables
If it needs them, it just asks the component
like, the component will know your base hp is 10 and your con bonus gives 2, and then it will tell the actor their hp is 12, so when i need to bring it up in a widget, i can just get actor hp
and not get actor get actor hp component get hp
GetStatComponent->GetMaxHealth
Etc
yeah i'm just eliminating that first call, putting it in the component directly
The widget dont need to care about the actor
It just needs the component
Whoever holds it is irrelevant
well it has to know who has the component, no?
because the widget exists outside the character, I could need to get the hp of like 5 dudes at the same time
My widget just do
GetOwner->GetComponentByClass(StatManager)->BindToStatChanged
hmmm
In your case bind to 5 stat managers :p
wait, the widget isn't a component on the actor, should it be?
No
then how does it know who the owner is (sorry I am dumb I'll buy you a coffee)
OH FROM THE DELEGATE
THE COMPONENT ANNOUNCES A STAT CHANGE AND THE WIDGET IS TOLD A STAT CHANGED AND FROM THERE KNOWS WHOSE STAT WAS CHANGED
....right?
So youd have something like...
OnSelectionChanged
Where you gave 0 to many selected actors
In your owning pawn thing..
Which lets the widget bind/unbind to new and old selection
Lemme show you an example of how my brain sees it rn - I have a little box that shows all members of the party in their own little box. Each character has a struct for the data of their portrait which they fill in with a function on beginplay (probably will change)
The portrait widget itself grabs the data (image 1) from that struct. The HUD BP (image 2) grabs everybody listed in the party and builds an array of their structs, and then the portrait container bar thing (image 3) just creates the widget from the data and throws it into a box
If my frame rate is 72 my tick only updates every 28 ms instead of 14 ms why is that? is there a setting I need to change?
You could still use the struct. You just let the pawn tell you when it changes
And the owning actor*
E.g. the selected party member(s)
Game Master in image 2 is my "manager" pawn - it grabs every character with an isinparty gameplay tag at runtime and throws them in the party members struct
That way you dont need to create a new widget every time it changes...
I see what you're talking about
I don't really have a way to change it during gameplay anyway rn but this conversation is going in my "screenshots of information from squize so I know how many coffees I need to purchase for them" on launch day
I really wish I built a debug menu to add/remove/change party member info during gameplay, but that's so out of scope for me rn I fear it would ruin my progress
well, eventually it will have local network multiplayer functionality, I just want a working prototype of a single player dungeon crawl experience before my kid is born so I can see if there's any interest
30 weeks, nbd
I'm hoping if I construct everything in the prototype cleanly enough, refactoring it all will be easier
Thats definetly the case for me
Once ive vaguely structured a prototype, refactoring it is far easier as i now know the constraints and requirements
I think for a ttrpg or any ttg being flexible is a big pro
Doing stat adjustments, growth adjustments, calculation methods, easy to modify
honestly if i wasn't recreating an established game system I don't know this would ever actually get finished
translating into code is much easier than conjuring code from thin air
and pathfinder is way more crunchy solid math than D&D is, so there's less to calculate
Thats neat
Thats how one of my earlier prototypes began aswell
After failing a few thin air projects
I decided to try a remake
Fixed rules, fixed x.y.z, should be straight forward!
straightforward, but tedious
Can I like, import an excel spreadsheet as a data table somehow
D:
I just feel like making a 193 item enum and then a DT with 193 rows that I have to name individually
might break my spirit
Isn't there import CSV option in the DT
Yepp
My rownames are gameplaytags π€£
Autoconvert tag to name , life is easy then
I'm starting to abuse gameplay tags
Wish there was native support but ih well
Switch on string is cringe
Indeeeed
I abuse them hard..
And havnt even gotten to queries yet
Item names, stats, interactions
I haven't even start my inventory system yet π
Using tags keeps it super easy to push them into my quest system
It confused me rather quickly
Will eventually need to find some sources that break it down.
Do the row names populate?
To abstract
I never used it
oh, I'll tinker with it
You can give it ago and tell me
But an item is basically 1 to many fragments afaik
Hehe i can imagine
Ive had that thought occur multiple times..
But i still end with DT everywhere π
what's the difference? (sorry for asking a question I could google)
Fix up stuff to use a DA, and then make an editor utility to read the DT and create DAs into folder(s).
You can create assets without cpp?
That's neat
@copper chasm early reminder to not have a hard ref in your DT
And to have asset free base class :p
I made a "thing" base class that trickles down into creature/object down down down
COMPARTMENTALIZATION
wait what
You read it
yeah but I don't understand what you mean π
Having a ref to the DT will load all the hard ref in it.
So if you like populate the DT with your items icons, you will end up loading all the icons in the game
Instead just loading the one you need
Knowing how to use soft ref is arguably mandatory if you are going to use DT imo
this is how my ancestry struct for the DT is build right now
I haven't really made it to anything that might bog me down, it's all data
I'll google hard/soft references for later
Sometimes I just like to make SURE the data reaches the destination. Even if one of the cables fails or gets worn, the others will take care of it.
(Imagine those attributes being gameplaytags)
Wtf
Stat.Strength.Base etc
What's up with the reroute nodes
joke π
Been burnt by that before
There are traits I will probably make into tags, but there are only six attributes, my enum array is FINE
"Why the f does it update twice!?"
Yes yes yes, stay at it
Sometime it's not worth it to scrap or refactor at some point
Very true
Hence why I stayed with DT to certain extend
But i suspect this is very very early
But if you are given another chance, use gameplay tags instead
I would make the backgrounds into tags but you can only ever get/have one so I figure whatever
Yeah especially if you are early into the project
traits will attach to all sorts of systems, so the tags make more sense
you can have a common sword, a common background, a common ancestry, a common feat, etc
and i'm converting the enum to a string/name for DT checking, so I can't typo it
unless i typo it between the enum and the DT, WHICH I WON'T
That doesn't sound right, unless you changed the tick time in the settings
Not sure. Maybe. I use this that I wrote for ease. Lets me create DataAssets from BP Editor utilities.
UObject* UTarrionEditorExtensionsLibrary::CreateAndSaveNewObjectWithPackage(TSubclassOf<UObject> ObjectType, FString PackageSavePath, FString NewObjectName)
{
if (!IsValid(ObjectType))
{
return nullptr;
}
UPackage* NewPackage = CreatePackage(*(PackageSavePath+NewObjectName));
UObject* NewCreatedObject = NewObject<UObject>(NewPackage, ObjectType, FName(NewObjectName), EObjectFlags::RF_Public | EObjectFlags::RF_Standalone);
if (GEditor->GetEditorSubsystem<UEditorAssetSubsystem>()->SaveAsset((PackageSavePath+NewObjectName), false))
{
return NewCreatedObject;
}
return nullptr;
}```
Ouch!
what ouch, I made a bfl function to convert and check, it's fine π
Oof blueprint struct
I'm not getting into cpp for the prototype π¦
As long you know if that's a sleeping time bomb
It's broken and can potentially break your project and stop you from packaging
It will never be fixed either
Most common advice by vet devs is to avoid blueprint struct and child actor components.
I found out too late and become a victim
Had to redo a lot of my work
Also it's dummy simple to just have a MyProjectTypes.h file and slam all your enums and structs and such in there
thanks, i hate it
Ouch!
stop saying ouch D:
Discord bugged out :p
We should've warned you sooner
I probably won't do it, but as I'm waiting the 1.5 seconds per "add enumerator" button to populate a new entry in this damn near 200 entry list
I want to
Werent you gonna do it in excel?
for the DT, not the enum
cause each entry has like 4 columns worth of information and i just cannot this morning
Actually the more I think about it if I did build the enum in cpp I could just copy and paste the entries π€
Yes you couldπ«’
I have some hesitation because Iβm not 100% sure how to match my other blueprint information into cpp, if that makes sense - like i know how to define a generic int variable, but I donβt know that i know how to define the βstrengthβ int variable that already exists in the project
Which is why I want to prototype strictly in bp, to avoid side missions like figuring that out π
I have a question that just feels like something with a simple answer that I'm not aware of. I'm primarily using Blueprints and in particular trying to get a behavior tree to, uh, behave, but it requires a little context so I wanted to make sure I was in the right place before dumping a whole bunch of stuff in everyone's laps.
Ah, seems #gameplay-ai might be better suited. I'll slither over there for now instead. Thanks!
guys im trying to make a task queue list kind of like in sims, when you tell the sims to wash the dishes then study then go to sleep, something like that. Would using a behavior tree be a good way to do this? im using the topdown template
I'd say either a behavior tree OR trigger volumes, if the NPC is in the zone and they are tasked with being there, then they can play the anim montage of them doing x thing there.
Question: Is there a good way to get absolute up vector?
I'm running a animation where my character is sliding, it's getting up vector, but the upvector changes as I have root motion enabled. Any tips or tricks?
Goal: If sliding, if I'm sliding under something and I didn't clear the length of the geometry, I want the character to crouch instead of stand, because it's still under something
I worked it out well enough, but my line trace goes sideways haha
Hummmm
I'd have to work it into a line tace setup
Boom, there's a node for that (Thank you Epic)
Problem solved. Thanks for the rough tip @gentle urchin
Distance to?
You mean like have a ruler like tool in editor?
Never heard such thing
Totally doable in cpp but I'm not aware of anything built in
Dont people normally make materials for that?
hi, is there a way to get the player controller that controll a pawn?
the node : Get Controller. return -1 for all pawn
Are they controlled ?
yes they are controlled
i'm inside the pawn
Are you possessing it ?
Sounds like not possessed
but when i print one is 0 and the others are -1
The value doesnt make sense to me in the first place
im on local
So you have 4 local controllers ?
yes and i did that to set the color
i'm inside the pawn. i get controller, cast to my bp_controller, and get the controller id
Not sure how you even start a session with 4 local controllers
So gamestate have 4 playerstates ?
i don't have 4 playerstates
Wouldnt each controller get its own state ? ..
Welp. Guess someone else must chime in with some knowledge
Also more #multiplayer i believe
GrtController works
Local mp seems falling out of favour anyway. It do be hard to find someone that does the same thing.
Just sounds like they dont have pawns , or are possessing those pawns atleast
Id check what createlocalplayer does
Does it include full pawn spawn and possess?
but the PC spawn the actor. so it possess it at the same time
i am able to control them
So first of all you never set the integer again
So if the incoming value is 0 - 1
You do end up with -1 forever
It should be player = player - 1
it's just a create local player function
Then feed the value to the create controller node
you are saying i should go into the controller and retrieve the pawn?
Isnt there a getlocalplayers?
instead of going to the pawn and retrieve the controller
If your problem is with the index, the logic is flawed to begin with
You never set the player value after subtracring
So why do you expect a decrement e.g. 4, 3 , 2 , 1?
Are they correct during creation?
yes
That's got nothing to do with what I'm talking aboit
ha because i manually set the index before creating that function
Look at your function where you feed the controller id
and the issue was already there
Have you print string and check if the value are correct?
so all of them are there, and i can control the panw. maybe they are not possessed
yes
Print string the value of the player int
Have you toggled it to spawn the controller ?
How do I posses and actor? The posses node is asking for a pawn but I have an actor.
you can see the player controller ID with the player number
You only possess pawn
And below
Not actors
SetViewTarget
But I want to use it to posses a television to watch channels
What?
And enable input or similar
So you're creating the controller? With the bool input?
Confirm with pic π
yes
I'll have to look into it thanks for the helpπ
i'm able to control all of them
but i would like to set the player collor based on the controller number
so i was assuming to be able to retrieve the controller inside the pawn controlled
maybe a proxy pawn
because i don't spawn my pawn, the controller did it
So in gamemode your pawn to spawn is null?
yes i don't spawn any actor
i only spawn the controller
so if the pawn are present for me that means the PC is created and posses the pawn
if it's true that means get controller from the pawn should give me the controller that posses the pawn..
it's the case for the 0 but not for the others
except if they are not really well possessed
When are these printed?
Cant you grab controller id from the return reference from create local player ?
just after the create local player and on the event beging play of the pawn
here for the player
and the -1
on the even beginPlay
Your printing your input
Not from the actually created one
So its not really validating anything
no the first one is to display : Player x :
replacing x by the input
after the x : you have the ID from the created controller
yes but inside the pawn. it say there is no controller
So next is checking whatever GetLocalControllerID does
And how it could return -1
I would also for kicks chevk that GetPlayerController 0 to 3 actually prints a valid playercontroller name
I assume they somehow use the same array to find its id
maybe my BP_PlayerController is not considered as a Local Player
Going on assumptions is ofcourse not a good strategy..
i said that because the description say : This only works for local player controllers.
yes it's a player character
Controllers aren't available at beginplay except for the very rare occasion of beginplay being called late. At runtime. A Pawn's beginplay runs directly after creation, which is before it has been possessed by a controller.
For this reason there are Possessed events to use.
This said. The pawn shouldn't need to manage it's own mappings like this.
Why didnt I think of that..
ok so my print occur before the possession
:question: The pawn shouldn't need to manage it's own mappings like this: what do you mean?
:8ball: Cannot predict now.
The pawn shouldn't need to manage it's own mappings like this: what do you mean?
Where is this code?
Hi everyone. I am trying to do packaging now, but the widget slider connecting with PCG graph does not work. does someone know a solution?
inside the gameMode
Should be in the controller behind an IsLocalController check. It'll be true for local coop for all of the controllers. And if you ever decide to do online multiplayer, it'll still work fine. But won't change anything for now for local coop.
What are you doing with the switch check for the controllerID?
it's to set the color of the player based on the number of the controller
0 = red
1 = green
2 = blue
3 = yellow
because the Controller Spawn the player I was thinking to do it like that
i will try to find another way
This is definitely not something to care about the controller ID for. Specially if you ever decide to do online multiplayer. This is basic customization stuff based on something like a team setting. Your game mode should set a team or color on the PlayerState(Cause this is state for the player). The player's pawn can then use that to set CPD or MID parameters. None of this really connects with the controller.
Any idea why this strange gear? I just dragged the Sun to the BP.
Does it say anything if you hover over it ?
I finally finished the data entry for backgrounds, went to move on to feats and I think I'm going to find a new job
Holy...
this chat can help me?
How can I export this 3D model to Unreal Engine as a skeleton for a player? How can I export it in a file that already contains a texture and parts?
idk how many common ones there are, I ought to just do the common ones for the prototype, but still, good LORD, even with gameplay tags that's a lot of clicking
Thanks, I had clicked the "editor only" property on the variable. my bad.
What does this error mean? How do I fix this?
The function itself says "graph is not editable" but not why, or how to change that
Nope, and that option wasn't present. I ended up scrapping all this. I think it's because I deleted the parent which previously declared that function
yeah i mean tags dont make it less work, for some weird reason
just helps keep it organized, and hopefully easy to expand
yeah, there's random stuff I'm having to add as I go through my 156 backgrounds, and thank god it's adding tags
Hey sorry if this pings you, just wanted to say thanks. Looking into transacting solved the issue. The fundamental issue I was trying to solve (and didn't know what transacting did) was marking an asset as dirty.
The parent was containing a reference to the array I was saving but wasn't being marked dirty so anytime I saved the level, Unreal thought there was nothing to save on the parent object, therefore any references within that array were forgotten the next time the session was opened.
Adding just this node fixed it:
Nice. π And for real, don't worry about pinging people. If it bothers them to be in a major discord, there are ways to mute it.
I have not done that I use UE5.4 no settings have been changed on the FPS template
Is there a way to access this button/functionality within blueprints?
so i have read that first the Player controller is create. after the player state is create. the pawn is create. the controller possess the pawn.
so in my game mode i create my controller. after with the controller i get the player state (cast) and i set my color into the player state
on the posses event i call a custom function inside the pawn
to set the color
so into the game mode
i create the controller + Set the color
from the controller inside the game mode
i get the player state and i set the color
into the player controller on posses
i create the ball
and there i set my color for the ball
but the Player Ball Color is not initialized
did i miss something?
this is inside the pawn, called by the player controller on possess
Is the playerstate valid here?
it looks like the call on the Event On Possess is called before the color into the PlayerState is correctly initialised
if i add a delay into the player controller
it works but it's not a good solution
how to be sure that everything is ready?
Generally it shouldn't matter when you set the color. You should be able to set it in the middle of the game for all it should matter in your code, regardless of whether you make that a gameplay feature or not. So your SetColor function should also run a delegate.
What is BP_Ball_Projectil?
it's the player ball that i will spawn with the color
the ball belong to the character
So akin to a rocket from a rocket launcher?
I tend to pass the PlayerState as the owner of things like this. And then set the Pawn who is responsible as the Instigator.
Then in your projectile you can use those both to determine colorings. In your case you can get the instigator pawn's Playerstate and pull the color and bind it's color changed event.
are you saying that everything related to the player should be inside the state? and keep the pawn like an empty class
for example the health
will you put it into the state?
No. Health belongs on the Pawn. Think Car vs Driver. You can possess both as your active pawn. And both have separate health.