#blueprint
402296 messages ยท Page 583 of 403
what are you trying to do
not what your method of doing is
but what you are trying to do
Basicly receive OSC signals(input) or read them from a local file the data from 64 "players" , x y z location and send them to blueprints in unreal
its kinda hard to explain i guess without writing too much
well it didn't work
what happens
fov doesnt change back
okay
I thought sending variables between blueprints was pretty close to what I want to do. OSC is usually used for sound but its a good protocol to send data too
did you remove the branch on your released input?
yes
again you're discussing method. what is it you are trying to do. no method. just purely what you want to have happen
it's 4:33am here lol
@muted dawn do you know how to use the debugger?
well rip
blueprint A receives variable (which is being done), send that variable from blueprint A to blueprint B / C / D / etc ? Does that make sense?
no
it does not
you're being obtuse
and you're still trying to talk about method
you're not talking about what it is you want your system to do
passing data between players is all I got. what kind of data? why?
etc.
that what i understand from that sentence as well
if you right click on a node, you can add a breakpoint. try doing that on your sprint input
alright
did
yes
cool. up at the top you have some controls for this debugging mode
yes
yes
cool. now use the one that's called something like "Step Into" or "Step Next" or "Go to Next"
ok
so now you should see if the nodes are executing
@maiden wadi hey, sorry for going quiet, i got suddenly busy. back now, though. added the function and all, but the sphere trace is coming from a set point in the map for some reason instead of my sight
but they do execute? the timeline as well?
like this
yes
outside of that it works, though
can you tell me what the value of WalkingFov is? if you're in debug mode you can hover over the value it and it will tell you what it is
there's your issue then
the alpha needs to be a float that goes from 0..1
you mean in timeline?
@muted dawn hah, yeah i did think about that. it's just my weird lighting though
yes
oh no that is 1
I see
it still explains your issue though
alright
or no, WalkingFov
is 90 like you said
so my take here is that there is some issue between having two timelines delivering conflicting information about the FoV
ideally what you want is actually both of the use the same timeline
so one uses play from start, and one uses reverse from end
both play from start
yes
now
you want to do something else as well
the lerp should be between walking fov and sprinting fov
once you're done let me see an image and if it is correct
yeah but i cant connect the both at the same
... how come?
ok
just have one lerp with Lerp(WalkingFoV, SprintingFoV)
you know that target field of view
you don't actually care what the current FoV is for the player, just what min and max FoVs are
the timeline handles the rest
and you probably want to use Play and Reverse instead of Play from Start and Reverse from End, but that's polish
show me the entire logic
looks correct
replaced it with the function, yes?
it only activates when i release when i have 0 stamina
should i change it to 100
and use >=
I think you should try with using Reverse instead of ReverseFromEnd
and see if that fixes it
do what?
sprinting
that is the bool i use on the stamina
it connects to the timeline and the other
so this works?
kinda back to square one
so it doesn't work?
it worked with the same way i did it
okay
but when my stamina runs out nothing reverts back
okay
until i let go of released
so that function I gave you
put it on a branch on the released
actually
nevermind
that wont work
my bad
i tried
so
didnt work like you said
create a new custom event
i have one already
call it something like StaminaDepleted
make a new one
hook it up to the Reverse of the timeline
now
where you use the stamina
yes
yep
alright
pull a line out and type in the name of that event
that you just created
that should be it
๐
i also hocked up the release to it
yep
it deservers a clap after so much time
thx
i can finally sleep
@odd ember you are the best thx
How do i make the mesh line up properly if i go on the ledge a bit sideways? https://i.gyazo.com/9fdf7c862a77989fec7b0864dff719a7.mp4
or how to make it more accurate
so for the player start
my pawn keeps moving and i want to have it be staying still
im trying to find a way to edit the pawn so its a camera instead at least so I can have it be stationary but it doesnt seem like I can with the knowledge that i have currently
no idea how any of that relates to each other
is there anyway I can completely remove the player spawn (including the actor)
cause it seems like when i remove the player start and set for me to start on the camera it still uses a sphere actor
I mean you can remove the player start actor
but I doubt that's going to solve your issue
Create new character actor with nothing but camera and use that @orchid thicket
yeah but even if i do a sphere shadow would still appear
and set it to spawn instead of the other
or you can edit current remove the sphere and just use camera
or click on sphere and check hidden in game
seems like there are 2 cameras
im not sure what you're trying to do still so im just low balling
im trying to do this tutorial and it requires my player start actor to be stationary
yes
it shouldn't
idk
can you make a gif
ah i cant
yeah this doesn't sound correct
but i can take a screenshot of what i see or control
I doubt it's the player start moving
player start is nothing more than a glorified position in space
i know
take screenshots i guess
but clearly something is annoying me and doing research doesnt help me
it says its showing 1 of 7 actors
how do i enable more
take screenshots of the issues
this doesn't really show anything xd
see i dont know what to do because again im trying to do a tutorial and in there the guy's player start doesnt have an actor moving
so uh
i don't think you're using player start actor
you have a ball
i dont know how i can change the actor and i cant seem to be able to stop the movement of the sphere
on a slant surface
and you're wondering why it's moving?
and the view you are seeing is stationary from the camera
im womndering how i can disable the sphere moving
does the sphere have a character movement component
disable physics i guess
there is no physics going on
the sphere is supposed to be the player but flying around
well phasing
what tutorial you're doing ?
im doing the
I still literally have no idea what's going on lmao
im on episode 6
rip
player start actor and character actor are 2 different things
i suggest you redo the tutorial
you missed something
wherever the issue started
@orchid thicket you should change status, it's fake news xd
huh?
oh
lol
no i mean by like friends -_-
i dont really have any friends :
๐ฆ
oh no i didnt pay for it
a friend did and helped me setup the python and shit to get it downloading ANNNNNDD
now i got free lessons ๐
@odd ember thats why i said RIP
wait wat
wat
scratch that
someone im learning how to make games on unreal with so we can collab
I thought you didn't have any friends
๐คฆโโ๏ธ
Any idea when I start the game I see my cam on the ground. https://gyazo.com/d32aaa9884e41dac33a5af2996374170
ah can u see a cameara
or player start
like stop playig the game and find the camera or pawn or player start and move it up a little so your player can start on the ground
My problem is for some reason the actors are hidden
@native plover
how do i see the invisible actors
i found it
im such an idiot
i had something within the search bar thats why it didnt show XD
has anyone had problems adding or changing fields to a struct? i have an Item Info struct (for RPG style game) with a lot of child BPs that contain it. when i try to add new fields and change the default values, it crashes the editor
i'm clearly triggering a ton of processing, but i don't know why?
Is there a foliage spawner for the infinite world very much like minecraft?
structs are generally are poorly suited for BP. I wouldn't be surprised if something is triggering this to crash
how would you suggest to define item data if not a struct?
I'm not saying don't use them
I'm saying that they are not really BP friendly
so I'm not surprised to see stuff like this happening
I'd submit a bug report to epic
@mortal nacelle I've run into a similar issues with structs. If you've implemented it in a lot of places and change fields around you're bound to have a bad time. Adding fields I haven't seen a problem with... yet.
Otherwise, set once and begin using... No problems.
yeah, i have an ItemInfo struct and a blueprint for every item in the game. I'm guessing its churning under the stress of updating all the references? this is a nightmare lol
maybe i need to switch to a data driven approach and instantiate with a factory method instead
yeah absolutely
I don't know how you've done it otherwise but that is the way it is supposed to be done
UE4 is supposed to be made with EC(S) in mind
makes sense. i grabbed an inventory UI asset off the marketplace to bootstrap my jigsaw inventory UI and kind of just kept extending it how they had it
a lot of shitty code i've uncovered ๐
sounds like a big ole yikes
I'm very wary of marketplace items that come with BPs attached
i don't mind paying a couple bucks for a reference project, but I should have rewritten it from scratch most likely.
oh well, thanks guys. i think i know what to do. was hoping to not have to refactor yet but may be time to bite the bullet
the sooner you refactor the better
how can i make a variable that is an array of actors and add stuff to it? i swear i can't figure it out!
i don't mind assuming tech debt for a gameplay prototype. generally want to find the fun and rebuild a 2.0 if it is successful
nvm i figured it out!
I mean I've given advice that goes counter to best practices when e.g. time is of the essence
but if you have a long running project there is no excuse to not make your stuff properly IMO
although I should practice what I preach too, I definitely got some refactoring to do for my own long running project ๐
dont we all ๐
anyone know how to get the end of an audio?
to detect that the audio finished playing
Anyone know a good way to store character variables outside of their blueprints?
nvm got it
Anyone know the hotkey to automatically +1 this?
I remember there is a + increment that doesn't require you to plug anything.. It just adds 1 to the value
@trim matrix does having ++ not do it?
^^, i think the set is unnecessary
@trim matrix like a Bp component?
Have anyone here experienced the open level reopening current level on android devices? On PC it opens the correct one
@flat raft you see how I have level plugged in , in the beginning? There's a way where that isn't required
I don't understand
You're talking about the ++ ?
you have to plug Level into ++ if you want to use it.
ok so i'm still trying to fix my outfit replication
right now it almost works but there's a problem
anyone can only see others' outfits if they first have put an outfit on
i have no idea why
this is my code
@trim matrix don't use the set. I think ++ will increment Level alone
@desert topaz oh that was it, thanks
what's this one about?
I'm making a platformer
when you fall off your character is destroyed and a new one is created
meaning variables are reset
That is a problem because once you die you lose all your levels
@flat raft
Save it to a SaveGame, or you can put it on the controller, or game instance.
oooh, I've found ways around it, never used any savegame
got any tutorial links?
I can actually just look it up
lol.. there is like a million tuts on yt
consider GameInstance first
Save Game will write to disk. Game Instance to memory.
If your player will die a lot, then maybe game Instance is best.
if it takes awhile to level up, then save the variable on a OnLevelUp event, rather than everytime the player dies.
If you have Mario type levels, then maybe look at saving temporarily on the LevelBp
Depends how you choose to organize ur game
Could someone help me with my gameinstance blueprinting? I'm trying to have a button in my main menu set the image for a player's stock icon (they can choose either Cougar or Husky).
In the main menu this is what I have for setting my 2d texture variable
And in my HUD this is what I have for the binding of the brush for the stock icon image
@flat raft went back and set up a savegame, thanks for this!
Does anyone know if there's a way to pass root motion info/movement to a character with nodes or is it all under the hood? I have a mesh actor that handles animations/character model changes which is a child of my character and I can't use root motion due to that relationship (character > mesh actor > skeletal mesh). Am i just going to have to move it around?
Does anyone here know of tutorial or example for best practices when working with multidirectional 2d sprite characters?
I have a first person RPG that will use all pixel art
I have a question about nativization. I've found out about most of the rules myself (it's a crude feature with some pitfalls).
But I strongly suspect that if you nativize a blueprint, it's children blueprints will be automatically nativized as well (even though they're not selected for nativizing). Could someone confirm this?
I know that if you simply select a blueprint for nativization with first removing all references and usages of other blueprints (that are NOT marked for nativization) then this will cause a nativization chain reaction. If BlueprintA references BlueprintB and BlueprintB references BlueprintC and so on ... then the nativization system will nativize all these blueprints
How do i make an object move where my cursor is,like a drag and drop ?
https://www.youtube.com/watch?v=WfF3fb0WaoY
heres a start
An example showing the basics of how Drag and Drop operations work in UE4. This is a super simple right to the point on how to use it and more advanced examples are covered in other videos.
Good morning all, so i wonder if someone knows how i can use a series of vector locations as "path points" which i can then generate a path through the easiest route?
i have 4 vector locations, but i want the path / trace to ignore certain ones if the route to the player is shorter
hey everyone. does anyone know how to make togglable keys. I want to add controller support on my game and i can't find how to do it
Like this ?
No problem :)
not yet
i mean for the player controller
then i add my character I made to my fps controller that i made from scratch
That's the way to do it ^^
Can anyone help me? I have done a recoil system, and I would like to smooth the recoil between 2 bullet, I tried a timeline, but even with event key, the value coming out is a bit random (depend on the framerate etc), which I don't want to 'cause I have no control over it
unity has time.deltatime for: (depend on the framerate etc) as you said
ue4 I don't really know tbh
And if I do something like this, my test will always be different (-+15%)
Well I find ue4 really stupid on this
Because on update it execute when it can
But if I make a custom output (like here) it's supposed to execute when I want
you are trying to make a recoil pattern same as csgo system yes?
I still haven't reached that part
(siege)
I only helped someone like 7h ago at 6am i think
It's a pretty easy thing to do, the problem is to smooth it :(
Well that's not like I helped you that much x)
On the thing you were blocked on earlier?
Show me the system after that :)
As needed
(and you shouldn't make different input like you did, but different key to the same input)
that's not what i'm trying to do
i need it speciffically for the controller
only for that
What's you default value for stamina?
And what's the problem here? what does the timeline do here?
You want to start at 100, and when you reach 0 you can't sprint? Just have to put the default value at 100 no? Because your system is already working with 0 = exhausted
ok
You should take more place for your blueprint
Hard to read x)
You can remove the stamina node, the decrement work perfectly well alone
ok
i'm using this stamina system
Hit that SUBSCRIBE button and notification bell to stay tuned!
Check out our Patreon to help us continue making video games!
https://www.patreon.com/AuroraGameworks
Facebook: https://www.facebook.com/AuroraGameworks
Twitter: https://twitter.com/AuroraGameworks
OUR PATREONS!
George Far...
And if you remove your event begin play, and set your stamina value at 100 it doesn't work?
The print is just here to help you understand if everything is working as intended or not ^^
Oh ok
@clever steppe Not sure if you fixed that. I overlooked it when I was doing it. I shouldn't do things like that when I'm tired but the trace should have been started at the projectile's location, and end at (forwardvector*Dist)+projectilelocation
how do i get this
Drag it from the component list into the graph.
It looks like it's a WidgetComponent in an actor? It should be in the top left Component's list if you've added it to the actor. Just have to drag it into the graph.
I suspect your script is trying to get the character before it's been spawned
hey guys, so i'm wondering what could be the most proper way to get characters that a connecting client has selected in the main menu and then spawn them based on that
basically: person who is playing selects two characters, then when they go to play the server will see the characters they've selected and remember that to spawn them in later on
Have you already done the selection system?
no, i'm just thinking at the moment before i go ahead and get going with it
I personnally use a custom actor to replace spawn points, when they spawn they claim their presence to the GS, and when I spawn any player in the GM it receive it's spawn from the GS depending on his team
You got this video doing the selection if you want (and multiplayer along the series, if you haven't already done it) https://www.youtube.com/watch?v=VzV1cecL2oE&list=PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ&index=20&t=2s
In this video we create the visual layout of our Character Selection screen that can be accessed by both Clients and Servers inside of our Lobby Menu. This allows us to choose between 8 different characters as well as default to a null selection. By the end, we test out that we can properly display it during gameplay.
(00:09) - Intro and Inside ...
yeah but wes did it when the server was already made, i'm not planning to do it like that
at least, i'd rather not
yes, but you got some mecanics on how it works
You just have to make this menu on your main menu (before joining the lobby)
And transport this data to the server > I never tried this part so I can't help you much more, but if you use the same playerState on both the menu and the server you should be able to select the caracter, put it in the player state, join a server and use a "on post login" to cast to the player state and extrate this data for the game
hm
that playerstate part seems good, but i do not use the same playerstate; possibly i could
Well you don't really need a specific player state in the main menu so I think you can do it without any problem
Great ! Where was the problem so?
variable value was 0
i fixed it up and it starts from 100
i had to remake it tho cause it would still sprint when i wasnt holding shift
the problem is that it's not sprinting for some reason.
should i remake the timeline?
I don't know what your timeline look like
Might be a part of the problem
As I remember, it just change the speed so if you put correct values there's no problem
There's no problem here
hmm, i guess i could just communicate between playerstates 
ill look into it some more and see
PC and PS aren't aware of other PC / PS, you have to use the GS / GM to do that
Use print and see where it stop
x)
Good luck
fov changing also works pefectly
If anyone can help me, I'm still stuck on getting correct values #blueprint message
Well you don't care about place ^^
take as much as needed
(as I said earlier, it would be better if you could expand more,)
This kind of thing isn't helping x)
ok
i organised it a bit
i just need to add some dalays
i found a bug in this
if i press shift too quickly stamina starts regenerating and thus having infinate stamina
how can i add a delay before you can sprint again?
Timer?
Well you make a timer that start when you stop sprinting
And when it reach 0.2 s you disable it and put a a canSprint variable to true
Yes right there
no just a timer
integer?
ok
Hey all, does anyone know how i can add objects box extents together? to make a sort of block grid? @maiden wadi Maybe you know mate? ๐
Like, get the biggest cube out of them?
make a cube out of all of them together
add em up sort of thing
or well to be more specific make a cube that fits all of the objects inside
Just compare each of their extents together.
the video says to add a delay here but if i add one it it still drains the timer for 3s
So if you have two extents, if X1>X2 use X1 else use X2, repeat for Y and Z
heres a screenshot of the box extents found of an "obstacle" how can i make the original box extents (with the trace points) expand to tightly fit all of them? ๐
hope that explains it a bit better
might need to see some nodes to understand, if you have time ๐
Hmm. I'm fairly certain you could just average their locations, and get the largest extent points.
Lets try...
@latent arch What data are you working from so far? Like what do you have available to input into a function?
humm
ive got the original hit objects bounts and worked out the vertexes, those vertexes are traced to from the player and the sound object, if those traces hit something then theres another object in the way an i then get their bounds, like the two boxes underneath in the picture. So then what id like to try do is expand the original bounding box perameters to fit all of them inside, and add the new objects to the trace ignore list
something like that anyway lol ๐
Do you have the object's origins still along with the bounds?
not saved but yes there they are getting retrieved for the debug box ๐
do i need to make an array of those?
brb
Hmm. Okay. I'm... "Faaaairly" certain we can do this simply. Let me throw something together quick.
does anyone know why this isn't working
it tried moving the branch to different places too nothing worked
reverse works 100% of the time
this is the entire code
why are you using a timeline when you use none of its functionality?
like you have nothing connect to SprintFOV
?
also why the delays? that is what you use the curve for inside timeline
i removed them
awesome thanks dude
when do you call the sprint function?
?
so which input is consuming it?
yeah
what happens if you press and release the sprint key in super rapid time?
those delays will still fire on opposing branches
i have the delay cause it will drain all stamina if i let go too quickly
anyway, it might be order problem
what even fires first
the FOV one or the sprint one?
so there is your issue
how do i do it?
gonna have to delay the FOV setting or move it to the same input as the sprint
(which is what i would do)
What is the best way to add a spell list to a monster datatable? Can I nest datatables? Like add a spell data table to a monster data table?
@latent arch Put it in two different functions. But I think this will work. If you can add all of your origins and extents to an array and then feed them through this.
amazing thanks buddy! ill test it out asap ๐
it works perfectly
C++ makes that so much cleaner. That second function kills me.
hehe yeha i know what you mean!
im actually trying to copy a plugins C++ code to do this, to see if a similar function is viable through blueprints
with the second function, are those inputs the outputs of the first or?
@worthy frost and the last bug i have is i need to add stamina regen delay but it makes it drain for the secoinds i had the delay on
this
if i add a delay in between it keeps draining stamina
@latent arch Nah, the second function is being used inside of the first function. The green CombineExtents near the bottom right.
hi, sorry for my low english first of all.
i am making my roads with using landscape splines but to make textures be ok, i have to set all section of road(mesh) as equal size. right side road meshes bigger than left ones so texture diffusion is different.
Question is : How can i adjust them equal to each as a size ?
Pretty good at it in reverse. Just depends.
ok no worries, if you fancy it some time i can send you the source for this crap see what you make of it lol ๐
@maiden wadi any ideas whats happening? it should just be considering the one cube at this location ๐
when i try to play in multiplayer my camera looks like this, like snapped inside character
how to fix this issue?
@latent arch Not sure, what's the logic train?
sec ill show you, ive probably got something the wrong way round for sure
its probably as confused as i am at this point lol
Is there some way to reference a level by variable, in Blueprint?
I would like to stop referencing level by name, that seems brittle and prone to breaking
I have a weird situation I have an event dispatcher that is suppose to open up doors, but it will only open the first door I put on the map, if I put more then 1 door on the map, it wont open the other doors Here I call the event dispatcher
then off begin play I bind it
Hi there, when I create a Data table, it shows some of my structs twice, why is that? ๐ค
(Even four times for some of them!
So between levels I am loading a save game file. Where is the best place to call the load function. I was thinking about putting it into the level blueprint so it runs immediately on scene switch. Is that fine?
The problem with level BP is it's not transferable to other levels. If it's not level-specific BP script then it shouldn't go into level BP. (That said I'm not sure where it goes. Game Mode?)
right now im using a line trace to set this, but is there a better way? the line trace has to fire off every 0.5 seconds to make the popup for the hit add / remove the info box accordingly. is there something else i could use to do this that doesn't require a timer?
Maybe a capsule collider?
its based off of where the player is currently looking, not exactly sure how to setup a capsule collider for that sense its based off the camera and they could be in first or third person view
i had to make a function for the line trace start and end depending on what camera mode was currently selected, which is also used for picking up items when the player presses E key:
For one of my games I had a system where names would pop up over NPCs you were close to, I just used colliders for that. You might be able to simulate a trace with a capsule collider on your camera. I have never tried that but if it works it may be cheaper than tracing.
could 'mouse over' work for something like this?
wait that wouldn't be range based... nm
yeah distance from npc is abit different though, i mean this is where objects could be sitting in a pile and your trying to look at one object to see what it is
Most games do this on a timer at about 10-30 times a second. Line traces are exceptionally cheap. Even a mediocre laptop could handle thousands of traces per second.
so the timer method is okay for it? just seems like alotta timer cycles
The issue with a collider is making sure that it's always getting the correct one closest to the center of the reticle. By the time you add in the math and arrays for multiple objects in the collider to deal with that, it's going to be just the same if not more expensive than a line trace. And mouse events can work, but it's more of the same thing. You have to place the mouse cursor at the center of the screen every tick or timer then get the object under the cursor and do the logic just like you would with a trace.
alrighty, i'll just keep the current one then. i set it to check for that in the same timer thats going to be handling the spoiling of objects.
use a dot product once in range of the item's collision
I have something similar set up for my character's head. e.g. they'll turn their head towards stuff that is interactive
removes the need for a line trace entirely
Could possibly make it more event driven that way with the begin/end overlaps. But for getting the single object at the center of the screen, is that really worth the extra complication vs a simple trace a few times a second?
if you're making a system for it, why wouldn't you want to make it proper?
this type of system will also propagate into interaction
You still have to check it often anyhow to make sure that even if the collider moved and the events didn't run because nothing entered or left the collider, so it's not really any more performant either.
so you basically save yourself work by doing it once and proper instead repeating yourself across a half dozen different systems that have trouble interacting with each other
performance shouldn't be an issue for a system like this. it is so core to any game with interaction that it should be prioritized. you can always optimize later
anyway you can get away with lazy inits on begin overlap
and then store your interactions in a PQueue
that will work regardless if you have single interaction or multiple (e.g. like hitman)
He was just concerned about performance with his current method. Which really isn't going to get any better than a line trace a few times a second.
Possible. In C++ I'd agree instantly, but I'm not sure about the looping in blueprint vs the single line trace call.
Kinda curious. I wanna try that.
yeah this is purely a blueprint driven project
far as parts interacting together, im being very careful with that and making sure things will interact properly as I make them, if something needs changed so things do work together right, i'll stop at that point and work on it till its working properly with all things it needs to. part of why its moving so slowly.
you should IMO consider your system dynamics before finishing any one system
that's the best way to reduce technical debt
I said reduce, not nullify
Actually, making a quick function to compare the dot product of the overlapping interactables in a loop vs line tracing, Line tracing wins out by an insane amount.
I mean yeah if you count the cost of overlaps as well
collision is always goign to be more expensive
Nah. This is comparing an array of actors. Collision is not included in the difference.
so how are you actually using it
Array lazily updated like this. Prints correctly. So assume that there's an array of actors on key press.
Key presses were just these.
Returns the closest actor to the center of the camera from the otherwise updated array.
damn that song " i believe in magic " just popped into my head...
I'm not saying it isn't a way to do it but you're not testing dot product anymore
you're testing your method of including a dot product
You are if you have to find the closest actor to the center of the camera?
I could tell you beforehand that if you had a nested loop that the performance would be way skewed
but that doesn't prove anything
So. How do you do it without the loop?
how can l rotate a head bone base my character Location
if you're testing pure functionality you should figure out a way where the two methods are comparable just by purity. e.g. one line trace vs. one dot product
1 shot event doesn't give you proper test results.
if you need them in sequence your going to have to do a sequence test to see if one wins out over the other, if dot product is going to start falling behind in sequence testing over the line trace then, the line trace is going to be better to use for that.
you also have to look at efficiency verses performance. while one may be more efficient it may be cost heavy on performance.
It's a simple fact that each node in blueprint causes overhead. It's not like C++ or traditional code. Math is incredibly expensive in blueprint.
^^ yeah this too, blueprint vs. c++
Just ran the same test getting only index 0 from that array. No validity. Simple one Dot product vs one line trace. Dot product wins at 85 vs 92. But that's ONE dot product check.
so we know that dot product is cheaper. now we can look at how to include it for optimal performance
which is basically breaking down functionality of a line trace and approximating it with a dot product
I don't think I'm being clear enough that I'm making the point that this is from a blueprint only standpoint. If I could write another function in C++ to do the dot product check, I'm 97% certain it'd be faster than a line trace. But with the tools you have in blueprint, it is simply not faster.
using your method it isn't
but that doesn't mean there isn't a method where it is
even in BP
I would love to know how you would compare nine actors's dot product to that of a camera in blueprint that's faster than a single line trace.
that's your method
like you're comparing 9 dot products vs 1 line trace
the point is to get that number down to 1 vs 1 for a method
I compared one. It barely won. Having one in the array is useless. You may as well just go by the latest overlapped actor rather than dot product checking.
By the time you check two, it's slower.
you're still not getting my point
you should only be doing one dot product check
if you want a more optimized approach
So you have three objects in front of you. Lets just check one object. It'll definitely be good enough.
The point of the check in the first place was the narrow down three to one. So how do you magically jump from three to one?
how to replicate interface?
you can approximate the dot product down to an amount pretty well. so at 90% of the angle you're pretty clear on what the player is looking at
or if you want more precision, 95%
and i'm calling interface like this
i want it to replicate that interface from setting variables section
i'm calling this interface function inside override function
so how can run this event on client and server?, i can't able to custom event inside function where i'm calling this function
BPIs can't replicate.
The BPI can if at all call a replicated event in your chosen actor
i'm getting this interface inside player camera manager class
does player camera manger class replicated?
because i have some custom implementation inside pcm class
No, doubt it replicates
Hello! Did you figure out how to fix this? Or is it just borked in this version??
Ivthink its just borked. My workaround was using tick and counting up a float by delta time and only exe after the float is larger then my "delay" number
There are certain nodes which update on pause, like "Get Real Time Seconds" or "Now" so you can potentially avoid the delta-time tallying, but otherwise paused means paused. I suppose the delay node behavior just brings it in line with how event timers already work (or don't work) while paused.
@grizzled rain what are you checking for is it meant to be a real time or just a delay of what ever
The reason i am asking is that DeltaTime is not constant
My simulated proxies on the server are not having their spine rotations updated (transform modify bone) unless the listen server player is directly looking at them. Anyone know how to fix this?
The variables driving the spine rotation are correct. But the actual spine rotation is wrong (until the listen server character looks at the simulated proxy, at which point it is correct)
Some sort of strange relevancy going on here. The spine rotation of my server's simulated proxies needs to always be correct, even when the server character is not looking at them. I use the spine rotation in calculations
@dense mantle every tick I add deltatime to a float.
hello, i wanted to ask about jumping and the camera, how can i stop the camera from following my character when im jumping (3rd person project)
@ me if you can help me
Anyone know why massInKg doesnt affect anything?
Trying to make something heavy but it has no effect
pretty sure tick is paused as well
how are you attempting to manipulate it?
I'm just setting the value MassInKg to like 50000 and then starting the game to see if it'll fall to the ground faster lol
I'm trying to edit this on a golf ball, currently it glides for too long and I'd like it to come to the ground faster
Very good point, do you by any chance what massinKg does?
Ah okay, so it'd be harder to push
or colliding with other physics objects
Tick does work. Theres also a node to tick when paused
How would you make an input access that eases into the axes?
so what's the issue
For example, I have an axis event to go left and right, and I want it to ease to the value 1 when I press D, and when I press A I want it to ease to -1 :)
Can't use delays and timers. There's an ok workaround though
lerp on input?
Thats basically what I want to setup yes... but I cant find a node for it... I want to know if there's an easier way before I setup a complex timeline system for it. :)
i really like darksiders games with all the dungeons, puzzles and combat so i'm trying to make a game similar to that
but i don't know how to do the melee combat
lerp on input?
Wait is this a node? I dont see it in the selection ๐ค
it's just called lerp
like i've tried with raycasting and triggerboxes but they damage them mutiple times per swing
on input I was referring to the input events
in your case you just need to lerp on a float
But that will still cause the jarring action where when I press D lerp value is set to 1 or -1 immediately (because there is no smoothing on the input action event's value) Which is the problem I would want to solve... How would you go about smoothing a value like that using the lerp node without some sort of timeline? ๐ค
Am I missing something?
Using a lerp like this exactly replicates what happens when I only use the event
This is the setup :p
I can't tell what's going on from the video
Let me record it without the particles and with a line trace and some objects one sec :)
can you explain which part of that was problematic?
I am trying to use input axis events to move an object left and right. When using the axis value to determine which way the object should move (Left, right, or stationary) it immediately jumps to moving left and right when I want it to have a smooth transition between going left, right, and being stationary... The same issue of jolting left and right happens when I use a lerp node too.
See how when I go left and right the movement of the camera immediately starts and stops? I want it to have a smooth transition :)
so you want acceleration and decceleration is what you're saying
Yeah... But in this case I want it to be done using set world position and I dont want to use physics to speed it up or slow it down.
what kind of movement component are you using
Movement bp looks like this and I am moving the default scene root of the player blueprint.
Idk what you mean by movement component because this is a pawn not a player character
so you're not using a movement component?
pretty sure pawn still uses a movement component
Nope not using a movement component (at least not here)
Again I just need help with the math to ease in and out the axis input :p
well if you were using a movement component that would handle it for you
but if you want go about it the hard way be my guest
https://docs.unrealengine.com/en-US/BlueprintAPI/Pawn/Components/PawnMovement/index.html there is something called a pawn movement component
Pawn Movement
you could potentially use the last input vector as a way to deccelerate
Ah I didnt know the pawn movements could be added :p My bad
Ok thanks! I will look into it haha
hello, i wanted to ask about jumping and the camera, how can i stop the camera from following my character when im jumping (3rd person project)
@ me if you can help me
does anyone know any way of adding legs to my fps camera
i don't want to use a tfps system
@tired fog melee combat has a lot of elements to it, try starting REALLY small. and I mean it.
Why is this being tinted? I can't find ant reason for it
I have a question regarding AI Behavior Trees. I already have an enemy base blueprint, it works enough. Sees me, follows and attacks. Now my goal is to make more than one kind of enemy. For example one that can shoot from a far, one that can heal others, one that runs away. How do I do that?
Do I create a different behavior tree for each one (and each BT would consider the enemies abilities, like using items, healing, running) or do I make one tree for them all to take care of that?
@quasi frost looks like either something is wrong with your material / encoding or you have some kind of element in the UI, maybe a panel or empty image that adds the tint?
if you think you aren't using a material, that means that you are using the default one which might have issues
is there a difference between get actor OF class and get all actors of class? for some reason I can only open 1 door on my map if I place 2 the other one wont open, would a get all actors of class solve this? or is it the same?
@pine trellis absolutely, get actor of class only gives you one and if you are lucky, its the one you need
get all actors of class gives you an array with all of them. however "get all actors of class" is a bad idea in the long run, as it's not very efficient.
A much better way to find them all is "Get all actors with tag" and then add the "Door" tag to the door actor. Gives you the same effect, just much faster
(but you have to cast the result actors to a proper blueprint class)
is this the correct way to get the varible ?
yes
but you are never guaranteed it's the one you need
I am assuming that you have something like a button
and you press it and then the door opens
well its a mini game
and a different button opens different door?
well its 1 mini game and its set to open the door blueprint
but if I put more then 1 door on the map, it will only open 1 door
quick question and I will help you easily
which behavior do you want:
whatever happens and then ALL the doors are open
or:
whatever happens and ONE specific door opens?
maybe one specific one, I was going to try to only use 1 per streaming level, but even that doesnt work for some reason, if 1 door is there the others wont open
if you want only one specific, you need a variable holding the door
and only use that
Alternatively make an instance editable array and add the doors to the array manually via direct communication.
like my keypad to open the door only works in the persisitant level which I think is weird
@pine trellis then yeah, you need a variable. The keypad has "Door" object variable and you set it up in the level editor
im working in multiplayer so I dont think it will work in level blueprint it has to be called by the player I think
i didn't mean in level blueprint
so use the variable from the get all class node?
Is it possible to merge static meshes in runtime?
yeah it still didnt work with that varible
@random hill "A much better way to find them all is "Get all actors with tag" and then add the "Door" tag to the door actor. Gives you the same effect, just much faster"
Is that actually true though? Does adding the tag create a new array that only has that tagged item, or does it still run through the entire list and only returns the tagged items after checking the original actor array?
ill try with the tags, see if both doors open
from your perspective photon, it will work great and he is absolutely right its a great way to do it, I am just curious about how it works behind the scenes
it might be better to populate your own array of the actual spawned items on begin play IF the array is the original array and checks say 100 objects and returns only the tagged ones
@covert stirrup never did a benchmark myself. but I saw some results which were confirming this
ill do a bit of digging to see, I am curious ๐
@pine trellis if you want them all to open, you need to make a loop
because if you run it the way you already did, it will still only open the first door
@random hill owuldnt the tag be set in the BP, so therefore ALL of them would have the same tag, unless it's a child bp?
this how to set the varible? Do I need to set it manually?
@pine trellis I will show you a quick example of both
ok
lets say you have avariable set like this
then you go to the level editor
put the actor in the level and you can see this
the ones with eye icon are editable
and then you can link them up. Of course my example isn't related but you get the idea
so if you put 3 buttons and 7 doors in the level, you can put specific door for each button
and if you want to open them all, you need this
do I make a varible from the array and use it in my binding event for my event dispatacher?
from the array element?
I am not sure what you want to achieve but I guess not... if you just want to open them, you would just add "open" method to the "loop body"
hey there; New to ue4 and im trying to figure out why a bp would inherent things from a different project ? I had the bottom 3 components and when i selected the option to "edit blueprint" it added a campfire i had made in a different project folder?? And im unsure how i would edit these components individually now
No, you put it in the place where you want it work @pine trellis
ok
it's up to you where that is
I'm sorry if I will be silent, it's middle of the night here
i can connect it to loop body and it prints updated but it kinda spams the print bar, `why wont completed work?
hey @rough jay how come its at the complete and not loop body?
cuz i only have 4 actors its suppose to grab and it spams the 4 actors x 2 so its printing out 1 actors health 2 times
it works but it kinda spams the print bar
4 actors ingame btw
@random hill forgot that component tags / tags are 2 seperate categories, it does look like a regular tag is added to an array specifically, so efficient if you don't need BP systems
it's component tags that are harder to reach
@rough jay show the rest of the code. The use of the foreach there makes no sense
I tried like this for my for each loop and tried different combos but still only opens 1 door , or only if door is on persistant level
@pine trellis it will never get to completed if you have no loop body
photon you are looping, but on completed getting the LAST reference
I just need the door to activate
it's not doing it for each
@pine trellis i would help you more but I need to sleep... sorry
@covert stirrup atodaso!
you're cycling through for example 15 elements, and on completed you are referencing the object, which would be element 14 (15th in the array starting at 0, not 1)
@hollow cape i used foreach loop to put all actors in an array and now i want to print out each of their healths so i thought that would work
As Phenakist stated above, by connecting the print to the Completed pin only, you are simply printing the last index of the array. If you want to iterate through the array, you need to connect to the Loop Body pin
ik but that prints out 2 much
again, if you could show more code we could help more. You are omitting thing that I bet are the cause of it printing multiple times
thats how i put the actors in array
ideas on how i should fix that error? i know it needs to specify an object type, but what type do i pick for a simple blueprint actor?
i only ever did this with the player character before
this is on a level blueprint btw
get actor of class?
let's try it
@rough jay ok so many things here....firstly, your order of operations from a readability and reliability standpoint is wack. Secondly, you Get All Actors Of Class returns an array, which you could then use to just set the All var. What you are doing is getting an array then iterating through the array and adding it one by one to your All var.
@clever steppe you need a reference to the instance of the actor you are trying to call Activation on
the object pin on the left side of the case cannot be empty
@rough jay what is to the left of the sequence node, is this in Event Tick or a timer or something?
event tick
well that's why it's spamming
how can i get a reference to it? getting actor of class didn't fix it
it shouldnt i put the print timer to delete at 0.2 and when it calls 0.2
you shouldn't really have a delay in tick. If you want to print this at known intervals, you would be better off using a Timer
firstly you need to get rid of the foreachloop that is setting the All array. Take the array output from Get All Actors of Class and use that to set the All array, or just plug it straight in to the foreach that prints the value
yeah i did that
Cranz I know, that argument has been done over and over. It doesn't change the fact that that is how many people learn
I was half joking
Lol, every time somebody says they're using tick or get all actors, I cringe knowing the storm is coming haha
the blame really lies with epic still allowing stuff like tick being so easily accessible
get all actors of class is another, child actors yet another
I dunno man, is it the blame of car manufacturers that cars can go fast because the pedal can go all the way down? It's up to people to use the systems properly
child actors should have been deprecated years ago
yeah but you wouldn't have a pedal that changes function halfways down
which, while not a perfect analogy, is how event tick is used by most people in BP
That's just improper use of a system though, not a fault of the system itself
we're arguing the same point from different angles basically
I am more of the mind to say give us the system, and we choose to use it or not
im I doing this loop thing correct?
the argument about tick being enabled by default....different story lol
there is a point where ease of accessibility begins to create undesirable results
and we're past that point
I dont know how to make a loop body
like I said I never argued they shouldn't be there
except child actor
but they should be more difficult to enable
@pine trellis loop body happens every iteration. That is not a correct setup
fair enough @odd ember
and child actor should be shot into space tbh
@pine trellis is the intention here to call Activate on every actor in that array?
the problem is I can only have 1 door on the map that opens using a keypad
if I put 2 the other doors wont open
only 1 opens
yeah because right now you are only calling Activate on the last element of the array
The "Completed" pin happens at the end of the looping, and only happens one time
if you want to open all doors, move the "Activate" in line with the Loop Body
that being said, the set array elem setup you have there makes no sense
like this ?
but it doesnt fix anything it just does the same thing like before only 1 door opens
what other node do I need?
yeah because you are feeding it 1 singe reference, it's just going to call Activate over and over as it loops
you may want to go do some general tutorials so you come across this stuff and get more familiar with it
let me try I did that before
I did say you should go through the blueprint communication tutorial that's in the pinned post
didn't see you mention that, absolutely
it was yesterday
tried like this same thing
are all the doors the same class
yeah
like same exact BP
I have a feeling that activate isn't the command you need