#blueprint
402296 messages ยท Page 942 of 403
I think they're OK if you're really just using them as "this is easier than copy-pasting the nodes on this class that I'm working on". Usually something basic like checking a state and branching execution. (UE 4.26.2 here.)
cause UE5 is still buggy, especially on my converted project
I'll finish this one on UE4
@tight schooner I'm using macros for very simple and repetitive things
i can only think of very few situations where macros are borderline useful
I try not to use it for stuff beyond flow control
flow control is one of the things that functions can't do on their own (at best, outputting a boolean/enum/etc.)
anything serious probably shouldn't be a macro
how to make my keybinds work independent of shift key pressed or not?
currently my interact key wont work when im holding shift for sprint
do i have to make second keybind for shift+interact or how does this work?
I did a second binding then I turn a bool to true or false on press and release
so on interact I check if Shift is pressed and do different things
this way players might be wanting to be able to rebind the key. I don't like hard coded binding
seems quite unintuitive, isnt there any way to make it ignore shift key?
in the event, did you try unchecking CONSUME?
nvm i just did this now
so if you hold SHIFT and leave justy the F key it doesnt wqork while pressing shift?
ohh wait
so SHIFT + F doens't work if you don't add it like that?
yes
i tried messing with the consume input but no change
I actually make it open doors faster while shift is pressed like you're in a hurry
See?
yeah idk why its being wird like that for me, guess someone on the team enabled some fucky settings
btw does my sprint code look weird? xD
sure
xD
Why TF
And states. like Idle, Walk, Run, Crouched etc
I need them so I can multiply the amount of noise my footsteps do for AI detection
For example object Mass multiplier is for when holding heavy stuff
but this doesnt involve stamina drain or sprint lock when reaching 0 stamina
I've never used quaternions (outside of some dabbling in Niagara script), but a cursory glance shows that there are a decent selection of nodes in UE4.26. You should be able to figure something out.
Some light googling suggests you can scale a quaternion by simply scaling each of the float values in the struct.
Maybe ToRotator (Quat) and Make from Euler (Quat) can convert rotators to and from
It should be this simple.
Input -> bWantToSprint
Tick
Sprint = bWantToSprint AND Stamina > SomeNumber AND InputVector > SomeNumber AND bSomeOtherCondition
Stamina -=bSprint * SprintCost * DeltaT
WalkSpeed = BaseSpeed + bSprint * SprintSpeed
Yes it does, Stamina affects Walk speed which is the first multiplier. If it's 0, everything multiplied by 0 will still be 0
In my game it's never 0, you just walk very slowly
lol
๐
BTW if you're trying to do sprinting in multiplayer you won't do it in BP only
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
Test it with lag
You can simulate network conditions, look at your PIE settings
this?
ya
Try it on bad, how does your sprint feel?
It'll depend on how high your acceleration is and how different your sprint speed is from your walk speed but it might be super janky
ok this is really bad lol
Welcome to #multiplayer
UE documentation said as long as I use the Gameplay Framework (default Actors, Characters, Player Controller, etc) that multiplayer functionality would be automatically available (and I'm assuming reliable). Is this not true?
this tutorial is actually very helpful
It is automatically available. You still gotta tell it what to replicate and all that jazz, but you don't need to build any network logic or set up any servers to start developing for multiplayer
isnt there any way to make sprinting in bp?
To work with multiplayer, no, not really.
I mean yours might technically work
but it'll be jank
well basically the movement gets executed properly, the client is just jittering around alot
but technically im just setting the movement speed of the character
so i dont get why its so bad xD
does anyone know if there is an easy way to make one spline out of multiple other splines if you have an object reference to all of them in bp
Did you watch that video?
You'll get why it's so bad
im still watching
Basically it comes down to prediction.
Say your setup was that the Sprinting state was synced on client and server.
You go to move, you think you're sprinting.
Your moves get sent to the server, it rejects them because it didn't know you were sprinting at the time.
The very act or state of being Sprinting has to be incorperated with the character movement controller to get predicted well. Without C++ you can get to where it will only be jank at the start and end of a sprint, but even then it'll have corrections all over the place when you start and end sprinting.
Hey! I'm currently using interfaces so that my players can pickup items on the ground. I'd like to equipe the item, but for that, I need to know which player called the function. How do i say : THIS particular player called the pickup function? Any idea? Thanks !
The only way to do a buttery-smooth sprint without C++ that I can think of is to limit inputs when not sprinting. Basically setting up your system such that half-inputs are walking, and full inputs are sprinting. But that's super easy to cheat around as you're trusting the client when it gives its inputs.
If you had
Charactermovementcomponent.addmovementvector(InputVector*(0.5 + bSprinting*0.5)
Then that'll work, but you're trusting the client.
why do they even ship it like this when its not actually usable? xD
It is perfectly usable.
uhh
why is sprinting hard to implement in bp, in multiplayer?
Watch that video I posted.
It all comes down to movement prediction. The CMC does predicted movement. You need to incorporate the state of Sprinting into the CMC so it can be predicted too.
Nothing is stopping you from making your own movement system in raw BP but the CMC is like 50,000 lines of code. Good luck doing better in BP.
Multiplayer games and prediction especially are HARD.
Honestly, a multiplayer BP-only project is right out, unless it doesn't need prediction. Something turn based would be fine, but you're not gonna make a fast paced shooter in BP only.
You can probably find plugins to do the c++ parts tho, if they fit what you want to do.
Any idea ? You look like you could know lol
Add that as a parameter in the function call
Is this a Pickup interface or a more general Interact interface?
Might need to reacreate the event as the signature has changed
Although equipping should be pawn acting on item.
it's a general interact interface
OK so yeah that'd work great.
Pawn
Input -> Item.Interact(Self)
Item
Interact -> Interactor.Pickup(Self)
Pawn
Pickup -> DoSomething -> Equip(Item)
I really don't like the item telling the pawn to pick it up but that'd work
I like to keep communication going 1 way
my problem is to send the Interactor parameter through the interface function. Because thats what i should do right?
Yeah, interface function should have a parameter for Interactor
Gives me this kind of error
delete that event
ok, lemme try
i noticed that literally all movement in my game becomes wonky
even at 30 latency
rotating things also lagging lol
@faint pasture Ok so wow, it seems like it works. I have no idea why that bug got corrected that way, and the only thing google game me before was : there is no solution. Thanks a lot man !
edit : It does actually work very well lol, THX
Hey, so i am currently working on an Widget where you can switch between two things. The thing part is done now i need to somehow get an "Impulse" everytime the value switches to set a Button to Visible. I am pretty new to UE
Don't know of an easy way offhand. Gotta loop through each and every spline point in the individual splines you want to read from, and build it into an ordered array to construct the new consolidated spline with. It's easier if all you care about are the locations, cuz then you can build the spline points with world-space vectors. If you care about the tangents then those are all going to be in the respective spline components' local spaces and that means a lot of conversion.
Basically... don't.
Any idea why the dropdown isn't appearing on the Create Event node on the right? Trying to bind StoreCameraRot, but don't want to tangle my blueprint.
hello, how can i find multiplayer rts type fog of war plug in for 4.26 project?
@faint pasture what emulation settings are u usually using when testing ur stuff?
excuse me?
i made fog of war but because of render target i cant run it on 2 different client
both client can see their fog of war and i dont want that
pff ๐ฆ
@crystal canyon means class doesnt have that event? Try refreshing or recompiler. Sometimes unhooking it and putting it back solves it
Is this a bp smell? I suspect raising that event when the delay is "counting down" will skip respawning that player
in multiplayer that event is fired whenever a player dies
so if 2 players die in a 4s window
one of them won't get respawned I guess
That sourds like griefing
No, that's a double kill for instance
why do you use a retriggerable delay in the first place?
sounds like u have a networking issue
make sure the fog is replicated in owning client and not multicast
Looks like I needed to recompile my first person character. Thanks for the tip!
@devout wedge game mode aint shared
i already tried that but it aint work for me, i'll make arrangement for that, thanks
Yeah sure but RestartPlayer should only be called on server right?
read here first block of text
GameMode (server) spawns the pawn
thanks
Is there something wrong with the code I shared? or when there is a latent action, the outputs in the event are not captured?
where are compiled blueprints stored? in the DDC?
No idea, how can I find it?
that was not related to your problem^
that player controller ref reaching across the delay is kinda gross
Player1 dies T=0
Player2 dies T=3
Player2 rezzes T=7?
Player1 never rezzes?
This should be instanced per player so probably in the PlayerController or PlayerState
Died -> 4s -> request respawn
Each client should only do FOW for their local view
Ignoring cheating, FOW should have nothing to do with networking
Each Playercontroller or CameraPawn just calculates FOW locally with THEIR vision sources/units
OK so only do FOW on the character if it's LOCALLY CONTROLLED
for now
later you can only do it on character if their team matches the local player's team
but i think my first step should move code to player controller right
Eh
That's not a great place for it either, I do it in a Subsystem but that's a bit more complicated
i'll try to create actor component for it
is it okay?
it might be more "configurable"
Here's how my system works.
I have a VisionSource component
In that component, on begin play, it registers with VisionSubsystem.
On tick, VisionSubsystem does the FOW stuff using all its registered VisionSourceComponents
i got it
You could replace VisionSubsystem with an actor component, put it on GameState probably.
That's how I prototyped mine
most "clean" way is that i think
Yeah it gets tough with teams
If you are comfy with c++ at all, dig into Subsystems as soon as possible, they're great
you can globally just "get Subsystem" and call functions on it.
i'm not but i think this task is my opening gate to c++ world ๐
thank you so much
btw do you have any tutorial or prototype for me to investigate?
You can take a look at this, no guarantees on it not exploding your computer or even working.
haven't touched it since UE5 came out.
aww thank you so much that will be great
I did that on the player state finally
lol
thaaaaank you so much <3<3<3
one last question can i run it on 4.26?
IDC what you run it on
just found this
okayokay <3<3
been trying to add audio to npc speak task by adding a Sound Wave variable to the task function, but no success. Any suggestions?
The option of the audio is coming up, but it's not playing during the gameplay
If that guy peeing into the desk?
Wow.
he kind of looks like a mix of mark zuckerberg and adolf hitler lol
Have you actually tried playing the audio instead of just adding the variable?
right, so if i do "Play Audio" into the NPC task function, it's going to play that same audio everytime he speaks
I was looking over the code real quick and this just gets you up to the vision triangles, you'll have to draw them to your render target yourself. I'll eventually move it all to C++ but it hasn't been messed with for a while.
hi all, how would i check which way something has collided with box collision ??
is there a way i could say if it hit from this side then I want to do this but if it hits from this side I actually want it to do this?
lol i found issue why it was actually so bad
because speed was only set on server but not on client
so server corrected him all the time
That would certainly make it worse
but shouldnt the changes get replicated anyways?
Not sure, test by just setting CMC.MaxWalkSpeed on server on begin play and see what happens.
yeah the max walk speed never updates on client
though i did set the movement component to replicate
the CMC does a lot of stuff behind the scenes that you don't know about
like you notice that you never send your inputs to the server? You just shove them into the CMC and it automagically works?
well isnt that what the cmc is for?
ya
So you need to set up sprinting such that you can just shove IWantToSprint into the CMC and it automagically works.
The same way you jump or move
so i should make a child of CMC and add my logic there?
in a way that i just send a sprint request to it
Yes that's the Correct(tm) way to do it. That's C++ land tho.
Let's see if I can get some help here. Anyone know why the event possession is firing off twice? I'm going through the Brick Breakers tutorial, and Im current stomped that on play it keeps spawning two balls. I did a debug and noticed that my player controller was doing an event possessed event twice on the same pawn. I know I have the auto possess set up to Player 0, but Im wondering where the second possession event is firing.
I also realize that when I set the Auto Possess Player to Disabled, it spawns one ball correctly, but I get this error:
Blueprint Runtime Error: "Accessed None trying to read property As B Pawn Bat". Node: Stop Moving Graph: EventGraph Function: Execute Ubergraph My Player Controller Blueprint: MyPlayerController"
Which makes me suspect...
I cheap solution would be to have a do once node after on posses event.
I was thinking that too but it feels like a bandaid rather than me figuring out the WHY. It'll likely come up again in the future so I gotta nip it in the bud now
Yeah you're right. So It's obvious that auto possess causes the second on possess call
So turning that option off fixes that
It does, but then Im forced into the spectator pawn because I have the default game mode player pawn set to off (cause the pawn is placed in the level)
Can you show me a pic of the node where the error occurea
It's the recent one I posted
The error points to that above
Because I disable the auto possess, the variable above is null. Which is odd cause it's STILL spawning a ball. I'll post a webm in a second after processing
can you do a print on beginplay and lmk if it runs twice?
one second
It only showed once
Alright this shows the events happening
I Disabled the Auto Possess Ai and now a ball doesnt spawn at all
So...
HOWEVER, even with these two settings, it still spawns two balls.
That shouldnt be logically possible
Show your player pawn BP
Whole thing if you can
Or at least everything that could touch the ball spawning
Print off OnPossessed, does it fire twice?
WHy not just spawn ball on begin play
the one that's doing the spawning
It prints twice
Yeah might be something goofy with the whole auto possess thing
anyway, either gate it with a DoOnce
or spawn the ball on begin play instead
begin play and possession will happen at the same time
or on the same frame anyway
Yep Do Once fixed it. I imagine in a real game scenario, I'd be spawning it on command, but this was a silly scenario I wanted to find the answer to. Kinda sad that its a bit of a goofy behavior
I think it's dark nodes
I use it. I use this with electronic nodes, auto size comments, and blueprint assist.
Not only is it 50x easier to read the blueprints, but it's probably 5x faster to make them and easier to stay organized.
Yeah, worth it
I'd pay double honestly
If nothing else, electronic nodes and blueprint assist
Their default settings aren't perfect. But after a year of using them all, I've got it all dialed in.
Clean code is like a drug for my addiction to blueprints.
Idk why people think those right angle lines are easier to read. They automatically cross and overlap all the time
all lines are mid
It's a free plugin, and not a honeypot repo
Same tbh
I feel like it's not any easier to read than the cables
IDK maybe its just me but i find it easier to read than the cables, maybe it comes from me being used to reading circuit diagrams etc
@faint pasture i downloaded the project files from this tutorial now and its actually giving me worse results than what i have now
I like the look of electric nodes when done right.
I found though that I was often spending more time rearranging the nodes to look pleasing.
besides, don't you all just try to keep cables straight when reasonable anyways?
like so
i would avoid lines cutting through nodes when possible
is it possible to only activate a function when ive touched the ground 3 times if so how would i go about doing that
On landed->increment int->branch(int>=3)->do function
can anyone tell me why my basic light flicker blueprint isn't working? i'm quite novice to blueprints
ok i can do that but the fact is i want my function to run in the tick function
oh wait i can set a bool for after the event landed
then activate that to activate the functuion in tick
whats triggering it?
i'm trying to run it as an event in my level sequence. the code doesn't simulate even if i use event tick though.
i don't know why it wouldn't be simulation though, it looks fine to me
you gotta realize how much 11 intensity is
try doing like 500-5000
or something
right but what i'm saying is that when i click "simulation" to enable simulation of the blueprint nothing happens
i'm not seeing an execution flow, which i'm assuming means my code isn't running
anyone have a solution?
i would use an select float node as input for intensity
and a random bool to switch between on and off
my reasoning for using the random float in range node is to make it so each time the light flickers it's a different intensity
how do you set a bool true for a certain amount of time
but i'm still so puzzled as to why the code isn't running @spark steppe it's driving me nuts because of how simple it is
what should actually start it?
i'm using an even track in sequencer that points to "trigger flicker"
this is the sequencer director
and the code for "trigger flicker" is here
does it not turn off or not turn on?
it doesn't do anything at all, and when i run a simulation i don't see an execution flow anywhere in my code
make an event for it, set it to true, use a delay node, and set it to false on the delay node completed
cheers
if anyone knows a solution to my issue please let me know, i've been desperately trying to figure out a way to make my light flicker without a light function material
If you have blueprint assist, it's simply just ctrl+r done.
Is anything calling Trigger Flicker?
i believe it's getting called via this SequenceDirector blueprint that was made when i created the event track in sequencer
Test it by calling on begin play and simulating. Make sure it works before making sure it works with sequencer or whatever else.
make sure your light is stationary or dynamic too
you're joking right?
no i mean.. the result is terrible
before 'auto format'
after:
nothing will ever beat just doing them by hand imo
If u use it with electronic nodes it has automatic reroutes
I love blueprint assist, for assisting with the BP, but not for actually reformatting the order of my nodes. I tend to keep my nodes in a readable order with as few crossings as possible
I find that the only way to get good, consistent, and human readable results is to do it manually, and do it right.
q is your best friend
it might be much nicer for the material editor ๐คทโโ๏ธ that's where they showcase the plugin
Imagine not doing your BP like this
I do wish there was a comfy way to make data flow vertical while execution flows horizontal
this is the one place electric nodes does excel for me
Or the other way around, which is just how code works. Execution goes line by line, with each expression being horizontal
I'm also a dirty node stacker, though I will expand things out horizontally if the stack gets too absurd
Ya I stack once it's settled. makes it super compact to see what's going on
Very brief question, I found a forum post about this but from years ago, are uint64s still unsupported in blueprints? Working with PRNG algorithms and int64 is not enough as I need the higher prime number that doesn't fit in an int64. (Right now I'm just converting to FString for display but it sucks not being able to pull uint64s into blueprints.) (I'm in UE5)
I'm terrible at math, so I tend not to stack. need to see where things are going for debugging
(bad code. do not run on tick like me!)
hmm, I remember rider complaining about uint(anything) a while back when trying to expose it to a BP
For instance this is an entire tire model
This runs on tick like 20x over lol
Just did a quick test, you are correct, I cannot UPROPERTY any uint ๐ฆ
This works for me
uint8 is the only uint I've used tho
uint64 and uint32 will not work in a UFUNCTION for me
Why would you need those, making an idle game?
I'm working with PRNG and WFC, and want to be able to tweak the generators in-editor/in-game
The prime number used for the modulo will only fit in a uint64, and for Linear Congruence it will go through every uint64 number without a duplicate as an random number generator
my god. lol this is too much for my fragile eyes to handle ๐คฃ
Interested in your WFC approach, I'm doing the same thing lol.
Doing overlapping model with uint8 bitmask tiles.
so 8 colors possible
Working on the ingame editor rn
Why are you doing your RNG that way, speed?
I'm in very early stage lol, currently just implimenting the rng algorithms, and lots of learning.
I'll be fully 3D, and the RNG will drive constraint weights and blending.
Yes it's extremely fast. I want to be able to have a near-infinite world, and it does this by determinstic RNG driving the generator. I don't have to save world data, because whatever coordinates you were at last, you'll generate chunk seeds up to your coordinates and then render the world only around you
I'm trying to get it fast enough to not require threading, and be able to generate the map data in a tick or a couple ticks.
(deterministic via seed)
How does that work with WFC? Doesn't WFC end up differently with different starting states?
Like if you solve from left towards center, and right towards center, you'll get a different center
The RNG will generate all the constraint weights that get fed into the WFC, rather than a reference image
I mean for infinite world. There is no one arrangement a certain place will end up in, but it'll depend on what you collapsed before
well that's the thing about seed based rng. When you start with the same seed, if you're on the 75th chunk it will get the same exact derivitive seed off the world seed every time its generated with that seed, and since the chunk seed drives the WFC constraints the WFC will collapse with the same tiles on that seed
How do you get a chunk to be continuous with a neighboring chunk then?
Like say you had 3 chunks, and you're in chunk 1, then walk to chunk 2.
Someone else has same seeds etc, is in chunk 3, and walks to chunk 2.
How do you guarantee it's the same?
Or are you doing each chunk on its own and doing some blend at chunk boundaries?
That's why the RNG has to be fast. Right now I generate metadata like biome and blend weights on each chunk up to the one your on, and keeps generating until all the chunks in visual range are seeded with their metadata. Then it renders only instanced objects and terrain around you.
So does the WFC cross chunk boundaries?
I'm still working that stuff out as well, it's not perfect. Basically a chunk get's a 'biome weight' that dictates the blending across chunks, and this weight spans multiple chunks
this weight also influences the WFC constraints
with the same seed, it will generate identically every time
As long as a chunk is not influenced by neighboring constraints it'll work. I don't recall the title but there was another game doing something similar and they ran into the same problem I'm talking about. They ended up just rolling with it as they didn't need persistence but you might find it challenging.
It actually doesn't matter if they're influenced by neighboring constraints. Because I always generate everything in the same order, it'll come out the same as the chunk weights and constraints are generated
If all the numbers are linearly generated in the same order controlled by the initial world seed, you can do whatever you want and get the same result.
The real challenge, and what I don't have solved, is being able to start generating at your coordinates without re-generating all of the chunks in order before you.
All this math is actually extremely performant, and I can generate 20,000 derivitive seeds in about 4 seconds so I'm not worried about re-generating everything from chunk 1 every time you load back in.
Yeah that challenge is what I'm talking about
What I might do is push all the chunk/biome/blending metadata in the save file, so that you don't have to save tile data and you can just... resume.
I'm still in the heavy research phase so a solution may reveal itself in the future
The results of a chunk depend on its neighbors, which depend on their neighbors, ad infinitum. If you don't force constraints at the chunk borders then it's doable but I don't see any other way to make sure you end up with the same thing at chunk XY when you approach it from different directions, as it'll have a different boundary condition (different collapsed neighboring chunks)
If you do solve it I'm sure you can sell it for a lot of money.
Hahaha that's why the current implimentation will continue generating minimum data all the way around but it's definitely not the optimal solution
Honestly it's not a bad idea to ditch WFC and just use compound noise for generation (Minecraft and Factorio) but that's to the needs of each individual project
One thought that comes to mind is to have noise generate "seed crystals" for each chunk, but you still end up with the infinite neighbor problem.
jfc how did it not occur to me the option of combining disciplines until you said it
I'd try just doing a chunk on its own and finding an algorithm for blending edges
but that might end up gross
This is actually an amazing idea, but also adds infinite complexity
Oh I replied to the wrong thing, I mean using noise to generate biome zones
and WFC for everything else
@faint pasture
https://nuclear.llnl.gov/CNP/rng/rngman/node4.html
https://nuclear.llnl.gov/CNP/rng/rngman/node8.html
You might also find this useful. I've been poking around at patterns institutions use.
(Edit: Wrong algorithm)
Fixed the link, the 64bit one is the really attractive one
the 2^64-2^10 + 1 modulus has significantly reduced patterns, however
Have you checked if it's faster than FRandomStream?
I actually haven't
So im having this problem where my spawn point is suposed to be going to random spots and spawning enemys but it just stays in one spot and spawns three of them this is the full codw
would anyone know how to fix this
Hi guys, just a high level question. When working on any system or mechanic or problem solving in general, how should I approach it? Like we approach UNIVERSE from a perspective of maths, physics and chemistry etc.
IMO, a good way to design complicated systems is modularity, and decoupled logic in mind
layout your requirements first and figure out the interactions between each one before you start implimenting
in a perfect world
I see, so in a way fundamental structure depends on variables, functions and classes, as well as subsystems?
Architecture is the word you're looking for
there's a good resource on programming patterns
Yes, Iโm reading that one as recommended earlier
awesome.
Lastly, compared to from scratch approach, how much stuff is premade and ready to use in BPs by default?
As I am coming from a Unity background in coding, where everything is done from scratch
Unreal does a lot for you.
there's a lot of built in systems for each discipline.
You'll still need to implement everything on your own
Unity also has a ton of prebuilt systems, components, etc
unreal isn't a easy button. I'd say it's more complex than unity out of the box, and thus a tougher to use engine in general compared to unity.
it's all about perspective.
Iโve spent quite some time to learn it, specially wrapping head around Bp
I approached it from Unity perspective and tried to make things from scratch, making my own life harder
Even something as simple as jump, which is pre-made, I tried to do from scratch and got lost ๐คฃ
well, you'll find all the same issues in unreal if you try to create your own character movement component
Yup, so I stick with whatโs offered and build on top of it
Unreal offers the relief of designing stuff and testing it asap, unlike Unity where essays have to be typed before getting results
this will likely be a great resource for you https://learn.unrealengine.com/
start from the bottom and work your way up
Blueprints is still programming. It's just done in a visual manner.
if you don't yet know how to program, best get learning ๐
I know how to code basic things, if not complex systems. Though I get the idea what you mean by architecture
There are just no proper example videos to show best uses of fundamental nodes overall
Please share
That I know about, anything else covering basics extensively?
haven't found anything that i could recommend
Btw work I do lays in high level category
Gameplay programming than systems, as I happen to be a game designer
@desert juniper will start there
I think it is also a good idea for me to stay away from animation related stuff as well, hate that stuff. I love cubes for prototyping purposes.
why stay away from it?
This is how I like using BP assist
Hi Guys, just a question , I have a map variable and to add a key value pair i just have to use the Add node , right ? Or do I have have to use the set map node after that ?
hit location is somehow not working what reason are there
or at least the niagara and sound doesnt work
but it does before i copy and paste every sound and niagara to line trac
or my line trace is not getting surface type
Which functions should be performed by a pawn, and which ones by player controller?
just add
@white elbow One can potentially possess multiple pawns, so pawns should only have code related to their functionality specifically. Like movement for example. But if the player presses Start/Esc or whatever to bring up the main menu, you should do that in player controller, cuz you want that stuff to work regardless of which pawn is possessed
Do some debugging with print nodes, draw debug, and breakpoints so you can narrow down the issue
Make sure every part of your BP is producing the data you expect
It sounds like you don't know where the issue lies
so in print string ,there should be arrows on hit location but its not even there
im thinking either hit phy material or location aint working
lerp from vector a to vector(b.x, b.y, b.z + c)
It doesnโt help much into prototyping and I tend to work on First person games most of the times
And I feel it is unnecessary specially in ideation process
How do I make a detached camera that follows the player but doesn't turn with him?
for a top-down shooter
is there no way to read a text file to a string using blueprints?
does anyone know of a way i can make this custom event run every tick, as if it's running on event tick?
Why not just run it on tick?
I made a data table and connected it to a struct and I can get the rows using the Get Data Table Row names Node but I cant find any node which I can use to add a row there ! Is there a way for that ?
No. Datatables are static data
anyone know how I can detect which direction something overlaps with box collider ?
i never used it but there is a plugin for it https://www.unrealengine.com/marketplace/en-US/product/data-table-nodes?sessionInvalidated=true
wonder how it would write back to the data table on runtime oO
probably only temporary changes?
looks like it...
then you can just use a map in the first place ๐
I was using maps first, but I am trying debug an issue i am facing with the add node, nothing was working so i tried to use a data table.
probably gonna sleep now and try to debug that tomorrow ๐
ok, just wanted to get sure that you didn't have any weird data type as key
Name shouldn't make trouble
Just to give u a full image , these are the connections, i printed everything, the values are correct
that looks fine to me
Hey guys, I'm trying to approach a Lidar effect for my scene, as if everything is a point cloud. Just based on this how would you approach this? Post process shader, line trace and decals or something else? Unfortunately the meshes are generated but don't interact with niagara because theyre not real meshes, they're live streamed in from an external source and they generate no distance meshes
Hi guys! Can someone help me with this one? I did this onChanged event for a BoxSelection, but is there a better way to do this? I mean i tried with the select Node, but it seems different with that. Any help is appreciated ๐
@thorny forge could probably be done in post process, using the depth buffer to determine the size of the points
search for the switch on string node, there you can add values in the details panel when you select the node
Yea thats what I was thinking. Thank you :)
Nice, thank you @spark steppe ! ๐
Hey guys, I have a single blueprint instanced in a grid (this is a proof of concept setup), let's say that blueprint contains a static mesh actor of a box that has simple functionality that on component hit it changes scale or something. Question is, can I connect instances in some way, considering they are the same BP ? I would like to have this kind of interaction - instance that is being hit has a radius around it that samples other instances around it and if you active one instance - it activates all other ones in a radius around the one you activated
that sounds scary
you can get all actors in a region
but be aware, if you have a grid that will trigger a chain reaction (most likely)
that is the question basically, eventually this has to be a constraint setup, imagine that destroying main pillar of the house should lead to activation of physics and geometry swapping of nearby instances of other meshes
Id do a loop distance check
I fear that implementing it in the same BP will lead to chain reaction
and I only need to break or activate one that will lead to activation of those that are connected to it
"connected"
radius here is a maximum simple case
so on activation you would get all actors of class in a radius and activate them ?
You could always set up some graph with connections
that's an interesting topic, I'm not really strong with UE, I'm mainly a Houdini TDish guy, can you point me towards graphs in UE ?
or official documentation will suffice ?
does it work with instancing ?
if we have a house which is fully built from a point cloud with diff instancing setups can it be sampled ?
maybe you've seen how matrix demo was setup with Houdini, that is the case for me
everything is a point cloud, etc
hi, is there anywhere i can find out the precise node set up for a save system?
i already have a save instance, etc, i have a save point the player saves at that works, etc, and i have objects that act a certain way (i.e. a door closes) depending on what variable is true/false at EventBeginPlay but I really can't seem to figure out the precise node setup to save/load these things into the game if that makes sense.
thanks!
Is valid
also, you can right click Looking At and "Convert to Validate Get"
I dont think you need to validate it either
You dont
The interface simply wont do anything if the target is invalid /null
you can add delay until next tick node lol
Call it from event tick.
Do you have to 'create save game object' every time you want to same something?
Not if you already have a valid savegameobject
confusion, so i have all those attached actors and i should be able to group them together just like that in the blueprint as well
Ah, okay, thank you. :)
i dont get why its impossible to do that tho, right now i have to wait for the ship to materialize with all modules, then pause the simulation, select all its children and then group them
No wonder movement is costly ๐
yea i get that, but i feel like it should be possible to group them from the blueprint, like get an array of all attached things, then pull a node from there and select the group node, which doesnt exist, sadly
Like to move them?
Select them and in the topbars there should be a group option
I just woke up tho so idk where exactly it is
You select all but the first
Then group them all to the first one
i am having a modular building system, right now if the ship moves all attached things get transformed as well which is costly. so the prefered way would be to just group all attached modules so instead of having transform 59 times, its just 1
all this is supposed to happen at runtime from the blueprint
Ahh idk then
As long as they all attach to the root they should just come along for the ride.
But you may wanna move to c++ for this. iterating over lists is MUCH faster in c++
yea my current plan is to make a custom node that would do enable me to use the group actor functionality inside a blueprint
I'm still sorta lost on why your grouping them. Groups are more for in editor. If they attach at runtime then moving the root should move them all
well upon profiling it turned out that moving many attached actors at once is costly due to them all having to be transformed. i read that grouping actors removes the need for transforming each indiviual part
@tawdry surge remember that validated get is 17% faster than isValid
@rain egret your issue is you have too much going g on at once. It is easier to deal with 1 complex actor mesh than hundreds. My guess is that they aren't instanced at all. Whatever you use to generate, use more complex geometry instead.
And instance it
whats instancing, i keep hearing that but when i look up instancing actors i only see tuts on how to make child classes
I'm sure that 17% is nothing to worry about outside of a for loop on tick, but I do forget about that node and it's more compact
Instanced static meshes (ism) and hierarchically Instanced static meshes (hism)
the majority of those parts that are attached to the ships frame are wall actors. they use procedural mesh to conform to the shape, i cant just feed the mesh data into a PM component thats on the ship actor to skip having to attach all those actors, the reason for this is that each wall element ought to be moved when clicked on, and unless PM has a on click event that tells me which section of the PM i clicked on, this will not help
i appreciate your help, i really do, but i have thought of all those things already
and they just dont work with the system i have
you can fetch the hit section by trace
alright imma try that
So what I'd do is;
Whenever something is placed (a wall, a floor etc) you merge it into the main PM
Whenever something is selected (For moving, deleting etc) you extrude it into its own PM
which has a lifetime duration of that specific event of moving/delting/changing the section
are you talking about the element index?
So im having this problem where my spawn point is suposed to be going to random spots and spawning enemys but it just stays in one spot and spawns three of them this is the full code
I never correctly recall which one of them it is , but its one of those 3 yes
would anyone know how to fix it?
sorry, i dont know much about AI but you could try adding a print string to see if you get a random spot on each repeat or if it stays the same
would have been too good to be true, but they dont work, i only get -1 or 0
i dont think they work on PM components
so back we go to grouping
your idea was good however, lets say the PM has two walls in it section 0 and section 1
you make a line trace and get the face index, now you could use it get the section you hit right? sadly no since even it it worked, the triangle data on those both walls is identical
but hey i wanted to get more into c++ anyway so why not now
Would use two walls instead of two sided material?
yes, it just looks better
I see
So im still not sold on why this couldnt be done in a material
not saying it would be easy
but it would save you some heavy performance
So instead of spawning proc meshes
you instead add instances of a fixed wall tile
the raw positioning is done when it's added,
and the vertecies are manipulated by the material,
using the per instance data
that sounds interesting for sure, but the creation of the PM isnt really heavy at all
No,
but moving it is
my suggestion would leave you with 1 single ISM component per unique ship component
possibly shared among all ships if desired (altho that requires yet another system setup)
Here's one for ya: So the first image works while the second image does not work. The print string is printed correctly in both cases. Whhahaaaa? When the event is set to multicast the print string only fires on the server.
i will think about it, that sounds hella complex
I've never tried it myself , but I can imagine such a system work quite well
I'm successfully moving up to about 2k instances with not to much work or drop in fps
true,
they support collision
guess it would be a tad less accurate tho
since only the visual is stretched
so you'd need the instance to generally fit to where its placed ..
not sure about the precision you need on this
perhaps its not a great suggestion afterall
@sand gazelle order of operations issue?
that would be a great idea if ships were uniform, but players can edit the base shape of the ships and cause all sorts of monstrocities
Holy shit the saturation on the character is nutty
It is unlit
Not that I can think of. What order would you be referring to?
Boolean set incorrectly in order
Or the event to set it s not replicated
Do a F10 check
The top bool is coming from the actor BP. It is true that the multicast isnt working for that event
That could just be the real issue
But then i have to figure out why its not working
But it is on tick so I suspect your other event isn't done when it dhould due to order or replication
@sand gazelle either print string everywhere or put an observation toggle
in the top it is setting every tick from the actor BP. In the second it is running from the event. The string is printed correctly in both cases
not trying to interrupt
so i have tiles that are numbered from 0-39 and i got everything to work finally but as the character reaches the last few spaces so lets say you land on 38 and you roll a 6 it automatically goes to grid 0 and doesn't continue, so essentially i need it to count 39, 0, 1, 2, 3, 4
I'm trying to move my camera using touch. All it needs to be able to do is move (x/y) and zoom (building that part later). So far I have this: https://blueprintue.com/blueprint/js3-0b_y/ but it makes the camera shake (video). Anything obvious I'm doing wrong?
@shadow field i think there's a wrap function to do that for you
Aparently RPCs must be run on actors. Is the animBP of an actor count as being run on an actor?
No matter what I do I only get this event to run on the server. Even when I move the rpc to the actual BP of the actor it dosen't work but it does work when playing standalone
awesome worked like a charm thanks
@sand gazelle that's new to me
@shadow field you need logic to wrap around the index
@real notch it seems to toggle between Start point and end point. I would put this on tick
It's not, I checked. It's running in the order it should be running. It's jumping between two values, but not the start value. It's hard to see because I sent such a short clip
Well, I seem to have solved it. I must have not set the actorBP event multicast when I thought I had when testing before. All I needed to do was move the multicast to the actor BP and its working
@real notch why do you use a 3d vector?
Instead of 2d
I mean I work on mobile and depth van make the camera look like it is panning but it is changing depth
Because this is the version without zoom
Try 2d
I tried tick btw, no difference
I also tried 2d before, no difference.
Which is good I think, because I need 3d eventually because of zoom
https://blueprintue.com/blueprint/-ptcbd0_/ you do mean like this, right?
I've made sure the depth is consistent by putting an empty actor with a box collision at landscape height, using a dedicated channel for the purpose of moving the camera around.
So Z is always 0
how much it too much for the tick function
I got rid of the shaking by lerping. This tells me there's some issue with the trace in combination with movement, because moving the camera is going to change what the trace returns also. So not sure how to fix it, but maybe it helps someone to help me ๐
A lot
Oh so theres a bit of leg room then
Depends on what you wanna do, but yes
Is it the best place to do lots of things? Usually not
squize you will never believe what i just learned
so after asking the cpp guys a channel down how to use the group actor function in a custom c++ node that i made they told me that wasnt my problem and that moving those actors wasnt the problem.
the actual problem was the navigation
i had that ticked and after i unticking it, it shaved 5ms off
5 moving ships only produce 10 ms now
How do i clamp my horizontal velocity at different points so i want 3 dofferent clamps one at like 1500 one at 2000 and one at 2500 how would i do this and how would i activate them separately
I had to remove that for my ism aswell
why does multigate Out 1 never fire? And how do i fix it?
looks like you want a sequence
this is what you want
what does update component to world mean, i cant find anything on this online
UpdateComponentToWorld updates the component's World transform
that it does, so it happens when you move something
Yes.
hm so theres no performance fixing there
alright thanks
to be honest i am happy to know that the real culprit so far was some checked box
10 moving ships now only produce 17-20 ms
which is a great step in the right direction
Massive step!
has anyone had issues with not being able to create a local variable in bp where it says name in use even though its not...?
?
Hi, is there a way or a command for the player to be able to change their rendering mode between directx 11 and 12 through a settings menu?
Maybe ask #graphics but I suspect UE can't produce a build where you can select between multiple APIs...
@lyric rapids a bit late but essentially simple math is fine. You can transform, get, etc at no cost. The issue comes with loops, very complex operations or loading too many ticks at once.
So ive got a lot of like if this bool is true do this function
Branches/switches are useful. A ton of them, like anything else, isn't great
If the input or output nodes of the function use the name you're trying to use, then you can't use that name for a local variable, nor can you reuse the name of a variable that already exists in the class as a local variable.
Is that ok or nah
@lyric rapids it will not proceed past it if it doesn't need to
Not sure how many branches you'd need to make a dent in the profiler
No i mean is a lot of them happening in tick ok
I am getting this error when I open unreal, anyone know how to fix it?
Yes it is fine
@pine trellis known issue you have to edit a value somewhere
Google it :/
Is there any way I can pick a random point in a radius around a specific world location, without using navmesh volume? How expensive is the navmesh volume in general?
@cursive grove purpose? To navigate to?
I want my enemies to roll around while idle
at the moment I get a random point and add force to it
@pine trellis I guess reinstall :/
@cursive grove pick a world location as a vector. The randomize the X and Y and make a new vector?
The 'random' always tends to push them to a specific corner
is the navmesh bounds volume expensive?
Can't for the love of me get EOS to work properly.
can someone help me understand why i have to add that print string to make this work like it should? without the print string length returns 0, with the print it has the expected value
same thing happens with another array
@cursive grove no. Excess is but a regular one
Is not
@dry condor the check is done each step and the set isn't done immediately. Only after set is done
hmm let me try something
@zealous moth its weird imo, how does the print string change anything ? because if i change to to "delay to next tick" it doesnt work, the debugger shows the arrays content when i hover over the left side of the length node but the int stays 0
even changing it to a 2 second delay doesnt change anything. i dont understand how this works tbh
Hello folks, I am having an issue i could really use some help with as I cannot find a simple solution to what feels like something that should have one
I am making a starship game, where starships should have modules (engines, wings, etc) that can be damaged and destroyed. To simplify creating starships in the future, I want modules to be their own actors separate from the ship's blueprint (added as child actors, so they can interact with the ship, since all ships are the same class) However, I am running into an issue
To have the module get damaged by collisions, lasers, and radial damage, i need it to have a collision box, which needs to be in its own actor BP to make it so it doesnt't need to be set up for every actor of every ship (which is the whole purpose of this system, simplifying future ships being added)
The collision box needs to be able to hit other ships amongst other things, otherwise it won't be able to recieve damage from ship collisions.
Yet, the problem is, the component (example: an engine) will collide with its owner / parent (the ship) and cause it to explode
What can I do to avoid this? How can I make the component not collide with its owning starship? or am I missing something or trying to address this issue the wrong way? Any help or feedback would be much appreciated, since I am clueless on what to try next to fix it
does it really need a collision box for each component?
Why not just check which component the laser hit?
i think for the collision with self problem you can set the collision preset to custom and ignore pawn
Hi, I'm trying to implement an inventory system that cycles through the items you pick up via the last index element, it's working as it should in game functionally but for some reason I can't wrap my head around atm the UI is not updating properly and only removes the icon of the first item you use, a none of the ones that remain. Would appreciate if someone could correct my error?
Remember every component (of the starship- i should be calling them modules so it's less confusing)
Every module is its own actor, because i'm working out the "base mechanics" of the game and one of my goals is to have an easier time adding new starships later (i plan to add a lot, and I also want to make the game moddable), so I am trying to make module classes (like engines, wings, etc) that i can later drag and drop into the starships as child actors, change stats and 3d models and all that, and that work almost out of the box, handling their own damage and then "communicating" any changes to their parent starship
so big thing I've found. Child Actors are really problematic & buggy. They're not like unity prefabs at all
be careful working with them
Do you have any alternative ideas of how i could achieve peak modularity and optimize my workflow instead?
I will fully admit i suck at this for now, first game i'm making from scratch, so I'd love it if i could avoid any major mistakes from the get go
I'd argue that you can just go for a component based approach. you can have all the logic you want (such as additional module spawn points, module limitations, stats, etc) all on the component
Modularity is going to be the difficult part, as you'll have to abstract a lot
Another approach may be a data driven approach
Any reason why pinch gesture axis mapping would always return 0? It's in the player pawn, InputTouch event is working.
For context: I am trying to move the camera closer on pinch, and I couldn't think of another way of doing it
The end result would be a single actor with a bunch of static/skeletal mesh components
@dry condor the peeked at value can only change when going to the next operator
In what sense? is it not possible to have a common... "entity" that manages the code of all engines, which i can then reuse with few changes for different starships?
Enable Gesture Recognizer
Are you kidding me
components can have blueprint code inside of them?
I'm sorry if that's the dumbest question ever
absolutely
@zealous moth do you have any resources where i can read up on this, cause im still kind of confused ๐
@dry condor I learned by trial an error.
and creating modular code/components/etc usually takes quite a bit of architectural work.
It's by far the better approach, but will just require a bit of extra dev time
Oh, absolutely, but modularity isn't just to make my life easier, it originates from the fact that the damage model is modular, and relies on those "modules" being able to be damaged separately
or that's my goal, at least
Which class of component would be best for this kind of stuff?
StaticMeshComponent and SkeletalMeshComponent
@zealous moth fair enough, i still dont really understand what a operator is or why the Interface Message doesnt count as one ๐
both are children of MeshComponent, so you could start there with a base class, or just have the option for both in the same component
@real notch there is a project on the marketplace with a solid gesture manager I use. Better than the built in one
Wait, how could I house blueprint code inside those components? I thought those were just for 3d models / rigged 3d models?

I think you don't yet know what components are. one sec
@dry condor Operator is a song by Papaya
you can then just add that to any actor
If you want your actor component to be a child of StaticMeshComponent, or USkeletalMeshComponent (or in my screenshot example: MeshComponent) then just select the appropriate class
Cool, I'm now going to build my own because I'm stubborn ๐
There's too much BP for me to fully wrap my head around at a glance, but it seems like you need to answer some basic questions like whether certain events are actually being called or not. Or if removing a widget also removes it from the array (in which case you would be removing 2 items from the array at once) โ I don't know the answer offhand.
Do some basic debugging with print nodes and breakpoints. Make sure the BP is being executed and is producing data in the way you expect.
The main thing to look at is the bottom two images, the two above are just showing how the item cycle is working (successfully), and I'm applying that same logic to the Inventory widget. I know that the events are being called because it's an event dispatcher so in the bottom the player inventory index, and the widget index events trigger at the exact same time.
The thing I'm wondering about is the Icons array. After dropping an item, removing a widget and removing the last index, how long is the array?
That's the only hunch I got offhand
Array โ> Length โ> Print String/Text
should answer that
the add item function is triggered in the inventory widget when the player collects an item, and at that point should add a new icon widget and be added to that inside an array.
Okay I'll check that, thanks
I did not know this at all. Thanks a lot! Your UI seems a bit odd tho so i ask just in case- this is the same in ue4, right? (not sure if you're in ue5)
The length is returning the what should be the correct amount of icons/items, but now removes every icon at the same time..??
thats UE5 UI in the screenshots
yeah I'm on UE 5
but there's very little changes for all the basics
As long as it all applies backwards, then that's great! Thanks a lot for answering my questions, I was really struggling with this!
bruh, making a save system in ue4 is like the most complicated thing ever. i'm thinking about downgrading to an earlier version to use a save system extension.
i already have the blueprints set out for a door to close if 'IsOpen' is true on EventBeginPlay but just no clue how to load the variable into it at start. i've looked at every tutorial.
why I can't create reference to any actor in controller class but in level bp it is possible?
Its basically just to load the aaved atate of the variable, and if it differs from the actors default state run some initializing to update its state accordingly
Hard refs from the world outliner is only possible in the actor that owns them, so to speak
Why youd need it in your playercontroller is another question
then what's the way of acquiring ref for some actor?
I want it to set the default camera (is the better place for it?)
yeah but how do I do that? XD
Well the typical ones are by some sort of interaction by some trace method, or letting one actor register to the other during beginplay,
There are also world iterators like getActorOfClass but I wouldnt recommend them generally
There's usually a better way to achieve it
The class in question could access the playercontroller (Get PlayerController) and provide itself as the new view target or camera
i made it in level bp right the way u told so
The same way you would trigger the door animation upon interaction, just this time without the actual interaction part
Yeah, that part I have coded out already just fine, it's the whole saving and loading that doesn't seem to work. I can't seem to figure out the right way to put the nodes in to implement the changed states. I think I need an array.
Doesn't seem to be any good tutorials out there and any I found don't work.
If its just the door you dont need an array
is "set target view with blend" node still upo to date?
Load game from slot -> cast to my savegameobject class -> get door state -> set door state
Okay, I'll try it thank you. :)
my wild guess is removing the widget marks it for "destruction" and also removes it from the array, but you're in a better position to examine that. At least you've narrowed down the mystery a little
Try it, but yes it is
So I have a C++ UClass Uobject that I inherit with a BP version, which I'm trying to use to Spawn an Actor, but I cant seem to find the node in its event graph that lets me do that
It just doesnt show up
Even if I try to use PlayerRef, (which is a pointer to a character) it cant find the node. It seems to lack the World context or something but I dont know how to solve that. Any help?
advice on how to have a character ease out of an animation? Want to have a player character hold their gun up for a second after firing before putting it back down
Hey folks! My dynamic navmesh starts rebuilding in a worse resolution if I increase the camera height, very similar to an LOD. I searched the web and went through the project settings and I have to have missed the settings, but I need it to keep "LOD0" all of the time. Can someone please help me?
it's pretty related to how you implemented the animation in the first place. I'm hardly an expert but I think that stuff is normally handled at the animBP level
If you're doing your animation directly with blueprint tick logic & timeline components then that's another story
#animation might be a better channel for the former?
thank you! Yeah I'm sending a variable from character blueprints to the animation blueprints to let it know it's firing. Going to try a few more things and then post in the animation thread!
Hello. I don't know if is the correct session...
I have a scene with a 5 or 6 static mesh and 2 lighting, all the background is black and there isn't a skysphere. I have try tobuild and i reach the 80 fps with lowless to 40 fps. I try to check the profiler but is different to unity and i don't understood what's the problem
Any one can help me to find the problem?
@green temple is the BP you're trying to spawn an object or an actor?
Cuz objects can't spawn
Whats the difference between the red one and the blue one? The red one works
I assume the blue one is directly calling the interface?
the red one is the custom event and the blue one is calling the event
Ah so because its an interface, then there's nothing to call I get it now
Blue one needs to be called with either a trigger or input event
I was wondering why I wasnt receiveing any messages but realized I was using the blue one instead
Its set up to be called with a left mouse click to the object with that interface and function.
In controller:
So basically, blue to call, red to receive
I'm not a pro but pretty sure lol
Im going to be using C++ majority but learning BPs simply for the foundation
Yes blue to call, red to receive
And its much faster to prototype in BP and then covert to c++ as an optimization step in the vast majority of cases
does the BP automatically make C++ representations?
Like is there visible code that I can see from what Ive created?
No, but anything in BP usually has a c++ version that is easier to find knowing the BP node for it
Nativization was dropped cuz it sucked
can someone help? I am getting an unknow structure on my blueprints but I dont see any errors in the blueprint how can I tell which stuck is unknwon
So there's a fat stutter in the middle of your graph. Sometimes the profiler will tell you what it is and sometimes it won't. What happens in your game at the moment of stutter? Is a new shader or particle system spawned/displayed in that frame?
idk a lot about profiling but based on your screenshot it doesn't seem to be GPU-side. Good luck figuring out what it is
(typing "stat raw" in the console will help you see the moment of stutter in realtime)
@pine trellis looks like your selection platform is referencing a struct it doesn't recognize. Did you change the struct asset recently and not save it or something?
Trying to spawn an actor
Issue I'm having is that I cant even get the node to spawn actors inside of this Class (that is just an object)
@tawdry surge I might have been doing some struct editing not to long ago should I just disconnect each node until the error stops? or maybe delete my saved and intermidate folders?
well it looks like its just the base stats?
@green temple objects can't spawn actors afaik
I find Pool Trhead7 and pool Trhead1 make an avg of 8 MS each now i try with stat raw
@tight schooner
@tawdry surge I dont understand if the blueprints complie and give no errors how can anyone find out which struct is bad?
does anyone know how to calculate a vertical and horizontal movement axis and turn it into a radial speed calculation so it's the same speed diagonally, I think it would be called normalizing a vector
i'm wanting to take a vertical and horizontal movement axis values -1 - 1 from axis events
I see there is a node for it, but how exactly does it work, do I need to get the vector from a rotation?
@pine trellis I have never had this particular issue before, I was just reading your log. I know messing with them in BP after they're implemented can be touchy. I'd just delete and replace the ones in use on the graph currently and then if that doesn't work try remaking the struct itself
ya its not that... and I always name my local with LOCAL at the end to make sure its not colliding specifically with those.
they are for sure colliding with other local variables from other functions with same name
Is there a reason the GameMode Override isn't working? It keeps using the GameMode from the title screen I made rather than the one I have set specifically for that level in World Settings.
The documentation says it should be working as appropriately
How do you know it's not using the override gamemode?
So, it is using it now that I fixed a logic, but the World Settings never updates on the side on level change. So it was probably me misinterpreting the editor display. Though that seems like an unfortunate thing to not be able to see the game mode change visually. I suspect I'll have to make a Debug logger for that.
Ah wait...there it is. In the Outliner.
Unreal has a lot of nuances Im going to have to get use to
Hey sorry for pushing, but has anybody an idea about my problem with the navmesh?
so I made a geo script BP to create some terrain, it works, but in the sequence it seems like after the third pin (out of four) it just stops executing
but I don't know why
the first step is I make a plane, like this
then I add some perlin noise
then I'm trying to overwrite it with another different compute mesh, I allocate it, add a rectangle and perlin noise just like before, but it just doesn't work
(this is a simplified example, earlier I was trying to do something else with the mesh but I simplified it and the issue was still there just to try and figure it out, and I can't)
Anyone know what's up with it?
hhh this makes so much more sense in C++ lol can I do this in C++ instead of nodes
Does it actually stop executing though, or does it only seem like it does? haha
i don't know if it actually stops
there are only 4 pins
but the 4th pin is supposed to increase the texture scaling, and if I cut the third pin it does but if I don't cut the third pin it doesn't
I'm suspecting that this is an issue with references
it probably actually is increasing the texture resolution, just on the TerrainMesh which is no longer bound to the dynamic mesh object that's actually being shown, that's my guess
Well why not add a "Print" to the start of that execution, just as a sanity check.
I'd guess it might be a reference that might have become invalid though
yeah
like this?
i mean, what I think is happening is: Rather than binding the output of the perlin noise in the third sequence to the Terrain Mesh by value, thus keeping the Reference valid (as I expected it would), it's binding the Terrain Mesh variable to a completely different value
In that case, how do I change the value of the reference inside of a BP var instead of changing the reference to a different object? I basically want to copy the value into the Terrain Mesh
aah I should just do this in C++ lmao
You mean casting? or haha
sorta idk
For when a character speaks I'm using 'Play Sound At Location' - GetActorLocation. However, I find that if the character is running it plays the sound at where they were at when it triggered.
Is there a way to get the audio to constantly stay with the character?
@vivid inlet Use an Audio Component on your character and play the sound through it.
ah, thank you. :)
how would one trigger an overlap only after the character player has stopped moving?
Do a boolean check on tick. Unless you're able to catch something like the button release of the player.
@shadow field
so make a boolean and attach it to the characters velocity or something because i assume you would have to figure out if the character is moving staying in the first place to use a bool?
Exactly, you can use this boolean for example
yeah i tried that one and it never fired
It's not an event, just a variable that you need to observe every tick
yes but that's why it's bad for the performance
a better way would be to find out if the player is not pressing any "movement buttons"
well is ai based
Or just check if velocity is 0 on the overlap since that's when you care
so no buttons pressed to move character
Getting through these BP tutorials, Im going to be happy going to C++. All the bak and forth between objects is a bit unituitive
I know its suppose to mimic abstract calls between objects but lines of code would be far more readable for me
What's the math to calculate something like this: I want to select a value from 180 to 90 as I increase my speed from 0 to 1000.
@true valve Do you want to go smoothly from 180 to 90?
What are some good mobile games action game plays? I can see mech arena as one where you move and shoot. Any others?
not sure if I should post this here or in Animations but has anyone ever had these weird tails added to the ends of bones? I've had a lot of issues with aim offsets and just realized that my characters skeleton looks weird
second photo is how it is supposed to look
That usually happens if you import and export a lot between Blender and Unreal, because by default Blender has an "Add Leaf Bones" option checked during the export
@iron bone
you will have to remove all bones that you don't need/want and then export without leaf bones
it all depends on what you want to achieve
Also do you think these leaf bones would affect things like aim offset?
hard to say because idk how your aim offset and character look like. Usually, the animation does not worry too much about additional/unused bones, but it can be a reason
thanks so much for your help!
Sure!
does anyone know how to calculate a vertical and horizontal movement axis and turn it into a radial speed calculation so it's the same speed diagonally, I think it would be called normalizing a vector. i'm wanting to take a vertical and horizontal movement axis values that range from -1 to 1 from axis events. I see there is a node for it, but how exactly does it work, do I need to get the vector from a rotation?
If you're using a character movement component, you can simply use the "Add Input Vector" Node. It will make sure not to increase the speed above max speed.
@onyx violet
there's something more specific i'm doing
not simple to explain fast really
so my game is a soccer game
and I'm adding a mechanic where when the player touches the ball, it slows him down for a short time
I was doing this by just taking a float variable and changing it's value from 1.0 to 0.9 for 0.2 seconds then resetting to 1.0
then when the event for movement is called just multiply by that
the problem is if people are going diagonal it doesn't slow them down at all
because the combination of horizontal+vertical axis inputs is still >= 1
so I wanted to figure out the math for normalizing the direction vector
also could use this for a few other things as well
I'm not sure whether I understood you correctly, but if you just want a vector of lenght 1 you can use the "Normalize" node. You can also always Clamp a vector's size if needed.
Okay then let's do it this way: What type of variables are you dealing with? I assumed you have two floats (range: -1 to 1) for X and Y movement axis
yep
Why are you not just using the settings on the character movement component
Your player character is a character right?
then you can scale max speed
Ok so the character movement component handles all of that for you
I tried that, the thing is with high ping
it ends up desyncing sometimes
if the player for example
starts sprinting right after he touches the ball
which slows him down
then it's basically changing the max speed a lot and getting desynced sometimes
on low ping not that bad
on high ping really bad
but also shouldn't be like that even on low ping
not that bad like i said but can still happen
How are you changing the max speed? And for what else do you use it?
I use input actions to set the max movement speed on the player controller then calls to character and sets it on that
i was thinking I could make a system where it 1st sets the speed on character
then callsback to player controller after and sets it there
i think it would help with being synced up but also sort of could be annoying for high ping players
since they have to wait for the callback from server to actually start sprinting
Why is the controller involved. All the capsule movement is run by the cmc.
If you're not working with it, you're gonna have a time trying to fight it
what do you mean why is the controller involved, that's where the input comes from
if you don't set it on both server and client it desyncs
and makes really stuttery movement
Yeah.. the controller takes in input. It doesn't care about the speed of the character.
If you wanna save it somewhere other then the player then player state is a better place to hold things you wanna replicate.
However the only place the the speed is actually applied should be the cmc on the character
You still need to set it on server and client tho
Yup
yeah i'm not sure how this is supposed to help me, did you read what I wrote above
about what i'm specifically trying to do
I am only applying the speed to the cmc, just doing it on the character/server and controller/client
I believe that your issue is composed of multiple things. There's a chain of events/actions that need to happen in a specific way for you to reliably change the Max Speed of your cmc, because that is one good way of controlling the speed of your character. To make it reliable though, you need to make sure that all of the variables of the cmc are set in the correct place (which is almost always your player character blueprint). This is also the only place where you replicate the speed. If you do this correctly, you won't have any stuttering.
If you're setting the max speed on the cmc then it's already normalizing your inputs and calculating velocity for you based on acceleration, friction, max speed, and a few other things
so you're saying I don't need to set it on the player controller then?
Yes ๐
hmm, i remember having issues when I didn't
but I guess I'll try it again
should the character event for changing speed be run on server? or not replicated
The player controller is a class that is mostly for forwarding the inputs of the player's input device to other classes. Like a bridge between the mouse/keyboard and the character.
yeah
Run it on client, call an rpc and run it on server
You could try multicast or rep notify too
I'd recommend running it on server first, then replicating it to all clients via a multicast, but that will lead to a worse experience for players with high ping, because they'll have to wait until the server replied to make them change their speed. But it will avoid stuttering.
I'm not a networking pro though.
ye
ok but let's say I did want to go with the other option
which is the normalize vector for the 2 axises
would you guys have any idea how that would work?
I'm not so sure about your current setup, but normalizing a vector means "making a vector of length 1 with the provided direction"
What I think you want is something like this
ah wait
I think I might've gotten the wrong node
but basically this
you can leave Z at 0
so would I have to make my 2 different movement events into 1 then?
What do you mean by 2 different movement events? Your input axes?
Could you send a screenshot of your setup?
I think I'm misunderstanding
yeah, because before I would do it with 2 events, with this it looks like both horizontal and vertical will have to be calculated at the same time
well I guess I could still use 2 events
You definitely have to handle both at the same time. Otherwise the X does not know when it is going diagonally and have to slow down more
Also it simplifies your code and is more performant
hmm ok I will give this a try thanks
Sure, let me know how it goes ๐
Btw if anybody can help me with NavMeshes I'll be happy to receive some tips with an issue of mine
Animbp should have zero to do with RPCs
AnimBP observes the state of the actor and drives animation with it
LogOutputDevice: Error: Class named NPC_Component_C creating its CDO while changing its layout
anyone had something like this happen before?
Ahh so replication on animBPs doesn't work?
i'm kind of lost of how to fix it, i had it fixed yesterday by accident (had this issue on all my actor components, fixed one and it was gone for all...)
now it's back
Replication on animbp isn't a thing