#blueprint
402296 messages ยท Page 766 of 403
There's only hit result under cursor.. wouldnt think it accumulates
And I'll pick a trace because I like micro optimizations
well maybe it's particularly expensive for where you are
I can't tell
you have to look into that yourself
that's why i chose trace initially for my melee attacks, but the collider served better and my anim state notify graph is waaaaay cleaner now
Surely. Checking here first can make sense if it's something common tho. Before wasting any time on it
nope, the opposite
also no noticeable frame difference
don't waste people's time by seeing if your case is unique to you
which 90% of the time it is
especially when it comes to performance
Hurts even more when you're right lol
AMD chill was on.
as Conrad said, breathing
is there a way to only call finished on Play and not reverse?
or have Finished check if it's from a play or a reverse?
yes, use the Direction output and call a switch/select for it
when i try to cast a string to float its rounding down the number, is it suposed to be that way?
for example when it casts it goes from 18.45 to 18.00
any way to keep the original number? this is a bit odd ive never encountered this
Multiply string value by amount of accuracy, convert to float and divide on the same amount? Sounds pretty bad tho. 100 for 2 decimal places
Or parse the string and do it that way..
Still alot of nodes
is there a checkbox for the convert?
i thought about parsing the string but my issue is why the heck is it doing that
its just a regular convert node
i dont really do string to float or string any number, but there's a numeric optoin
Sounds odd that it does it. Is the decimal noted correctly? , vs .?
i think im thinking of the tolerance for floats with vector conversions...
i ended up replacing the comma for a dot with a replace node and it worked fine
๐ devils in the detail
american vs. european convention?
i thought european contries tend use comma the way america uses periods, specifically regarding number values, like dollar.cents
Hi. If anyone remembers Dark Project (Thief) 1 + 2 there the interactable objects always were a bit brighter when they where highlighted. I want to recreate the effect, but I don't know what's the easiest or at least any way to do that. I could get the static mesh, get its materials, do something with it and reverse that, when the player is not aiming at the object anymore, but that seems quite complicated. I also saw that there are material functions and material layer blends etc. but I don't know if that's the right approach. Can someone guide me to a source of inspiration?
yes, they would have this sort of glow that would happen on a regular interval
back then, id imagine something along the lines of a panner, masked by fresnel
german here: yes, we use comma for decimal periods and dots for thousand separators. For example 1.399,99โฌ
the texture it pans would mostly be dark, with a simple white beam across it
trip!
Also a great source of bugs, because most programming languages assume english/american conventions ๐
tell that to the korean and chinese, its awesome to see code in native language, but yes, for the most part, it seems coding languages are "english" derived
do a raycast and if the object is of the "interactable type" do the material thing
i thot the material animated regardless
oh shit, no ur right, going up to a picture, it will glow that sort of dealio
That's it, how do I do the material thing? I already got the raycast and know when I hit items in the world. I just need the material to appear a bit brighter than usual and to return to its original brightness, when it's not highlighted anymore
i have no idea man, i dont deal with materials often but im 100% sure theres a node that can change material proprieties on the fly
cause ive done it before
it would be a frensel so it doesn't look flat, plug that into a lerp, have a param for the lerp, that is what you control in blueprint to turn off and on
if u want brightness in the material u can just add a var in the mateiral and multiplye it by the emissive or specular or difuse
could also use staticbool param, but lerps are the og way
plug that all into emissive ideally
Trace, save reference, do material thing. Trace, hit nothing, set old reference material to normal, ditch reference.
Okay, I'll go read the docs on materials a bit, I don't even know how to set vars on materials. I also thought I could deal with the material non destructive, because it will be overwritten the next time I do a blender export, but if that's the way I'll figure something out ๐
this would be bp, the material wont get tossed*, its just references
in my mind, i would have a master material so this logic doesn't need to be repeated, then setup your instances for the objects which can be stolen (have this effect)
you'd also need to work with making dynamic material instances, which seems to be a running trend these last few days
k, still I need to dive in a bit into how unreal materials work. So far the blender exporter did all the work.^^
shame as that logic doesn't really retain from blender to unreal
Tosses?
sounded like itmuckel thought he would lose his material assets
Well blender also has some node system for creating materials, so it's not dead knowledge
tossed, fixed it, i do that a lot with -ed words
Oh. ๐
Yeah, the thing is I thought I need to edit the material in my "importedFbx" folder and the next time I import my assets it will be reset to whatever it was before. I'll figure something out^^
i will always turn off import material/textures and just manage that myself, it's never, in all my years, been helpful
not for unreal, not for unity, nothin
isn't this the blueprint channel?
the initial topic regards setting a param on a material to achieve a specific effect, technically bp
yes, but because this involves logic and how to dynamically alter materials I thought content creation -> graphics was the wrong place to ask
Speaking about logic, I have a typical issue most people have and for the life of me I can't solve it haha. I'm in UMG if anyone is interested in lending a hand haha
I got it working, but can I do this without duplication? I already messed up the first time, because I misspelled the parameter name in the copy ๐
This is how it looks ๐
genuinly this seems like a #graphics question. like BP can help you wrap these but BP is not concerned with the graphics of the material
you can use the bool to select a value instead, and that value plugs into one node
Let me rephrase: If Branch is true I want the value to be 0.2, else it should be 0.0, but SetScalar... should be called anyway
Exactly, that's what I wanted to do, but I didn't know how
search for node Select Float
yes, perfect, that also got rid of the branch. Thank you!
yup, although for future reference, when using the different Select nodes, everything connected to Select will be computed.
this is not an issue for you now, but down the road, Branch can be more performant, even though it's less organized.
(for example if you had complex math connected to the Select node)
Okay, but in this case in the previous version did exactly the same thing happened anyway, so there is no difference here?
no difference here correct
For example when the else-case involved doing nothing and I'd fake that case by sending a zero value in a complex math function then it would be far more performant to use branch. That's what you mean, right?
yup
it'd be far more performant to set the float directly, no branch
here yes, but in the hypothetical case that the 0 value had no real effect
generally it doesn't make sense to gate off HLSL for the fastest performance
not sure what you mean, i was just typing to warn/describe the pitfall of using a Select node when connected to heavy math or functions.
he's already done with it lol
Adjust the float during function call :p
yep
The caller shouldn't worry about what the actual value is, that's why it's bool
looks like this now
Or branch -> set local float -> plug into set scalar
No doubt this works fine tho^^
yeah, but then I'd have to introduce a variable ๐ฉ ๐
Local scope so no biggie ๐
I agree with the caller not having to worry about the value tho! Now you can do adjustments and keep the calling exactly the same
i am trying to spawn an object infront of my character
what do i need to change or fix?
Get actor loc + (get actor forward * distance(float))
thanks a million it is working! ๐
UE Editor keeps on crashing regularly when I try to save, why?
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address
sounds like a corrupt asset maybe, unless it's something editor related
I don't know if it's related but I've been working with structs a lot more
And I change the structs around and edit the BPs that use the struct, then save, then it crashes
sounds like structs, try a Resave All from the specific folder it is in and see if it goes away, then do a full resave all and fix up redirectors
I'll try the fix up redirectors, hopefully it won't keep crashing again
resave all is important, moreso than redirects in this case
This is a tricky one, i have been messing with it for days, I am trying to change my navigation to a keyboard and or a gamepad whilst still keeping the constraints of my grid, ideally i would like to limit movement to 4 direction (north, south, east, west). The current setup works perfectly for a cursor and mouse, but i would like to limit it to a d-pad or (A,S,D,W)
select node based on the orientation of the player character
or I'm not sure you can do just one node for that
which is a bit of a pain in the ass
can you show where the camera is in relation to the player character?
here it is in action
sexy
is the camera ever rotating?
I think you'll need a constraint but check with #legacy-physics
k thx, im going to ask that there again
currently not but I do want to create some camera effects like camera zooming in and out so that it is not boring
okay but specifically rotation
yes no need for rotation
get the camera's forward vector and the character's forward vector, do a dot product on them
actually let me draw up what I think will work
@sonic crow use this when you add direction
the top one for forward/backward
bottom for left/right
ah fk the bottom one should be 1/-1 on Y
ty will read and try it now
I need help getting my AI to change roles from being "It" to not It and vice versa within the same blueprint. How would I do that?
how do I change an animation in blueprint
I read that you can use anim instense class but i sont have a class
you really want someone else to decide who is "it"
This is how I decide who is It first
I assume this is standard tag rules. The actor needs to know if IT because that would transfer it to the non-IT. So if IT is true, and the hit occurs, IT is false since the other hit is now IT
???
this is... not a great way of doing it. have the game mode know of all the AI in the game, and decide who is "it" from among them
that would be better in the game mode than on tick
on begin play, you can have the AI each register themselves to the gamemode as "players"
What do you mean?
once a player threshold has been reached, you can pick a random "player" to be "it"
ah, so two things are being asked, you are addressing the latter. I agree, a separate actor needs to determine which AI should be it. What I said relates to once in play, transferring the ITness to another
I'm addressing both
in your event hit logic, you can call on the game mode to say that an AI has been registered as "it" on hit. the game mode then ensures nobody else is "it"
i dont know what to put in the class input
ah, there it is
an animBP
@odd ember could u show me how I'd could go about it
I just told you
what class input
sounds like you don't really know about anim bps, a tutorial perhaps?
im lost
Wouldnt only (it) be able to hit anyways? So no reason to check ?
If hit -> transfer it
i just want to switch my player model and have the animation switch too
that's where i was thinking, but thats on paper and not in practice where, lets say multiple actors hit at the same time, now two are it, that's not right
plenty of those kinds of tutorials
Depending on how hit is done, id simply just let it hit just one. First hit gets it
I cnat find anything
yes, but as EFoolType puts it, this always ensures 1 without extra edge cases
I wouldn't do this outside of a manager class, and game mode fits perfectly as exactly such
not what i need
True, external tracker is beneficial in either case
almost as if you get what you give
is it possible to have independent enemy units that are able to make a formation? if so, can anyone set me on the path of how to do this? thanks.
sounds like something an AI director would handle potentially
Ah, thank you! :)
@odd ember I tried your approach but I dropped the ball, should I be doing this in top down controller or top down character and i also noticed by my relative input location the character movement creates a new target and does not take infor from the character itself
I did say the one at the bottom should be Y, not X
but also, if you're doing this from keyboard and mouse
you should be using InputAxis
not MoveTo
you're not actually getting a location from those values, you're getting a direction
@odd ember I have the level select a random actor and I put it inside a actor variable. How do I get a reference to that variable from another blueprint?
did you miss the part where I mentioned it should be in the game mode?
yea I have that in the game mode sorry I meant gamemode not level
you can always use GetGameMode and cast to your specific gamemode
so on beginplay for your AI actors you want to GetGameMode > CastTo<YourGameMode> > RegisterAIAsPlayer(self)
i made the correction, however I am not sure what I am missing I am currently guessing because you cant use input axis at the end where I had moveTo, and it seems i need to have a branch for both input axis right and input axis forward to work, weird how difficult this is compared to a normal controller setup. I am pretty sure I am doing things very wrong and probably starting to make guesses with nodes in the wrong direction
Is RegisterAIAsPlayer(Self) a node?
you're really overthinking this. the end of that select node should be plugged into AddMovementInput as the direction. that is literally all you need to do
no gating, no conversion nothing else
it's the function you need to make on the game mode
and of course plug in the scale value from the AxisValue
also you're using the forward vector with the MoveRight input
you need to use forward with forward and right with right
By registering the AI as Player, do u mean putting them into an Array called Players?
something like that
but wrap it in a function
so that if you need to do more than just adding them to an array, you can just change the function
for instance, you might want to bind an event per registered AI to call when they get tagged
This is my Gamemode Bp
arrays have a Random function
but also, the array should be an array variable internally
I appreciate the help, did what you said, still not working wondering if i missed something
RegisterAIAsPlayer is not for the gamemode, it's for use in the AI blueprint
I told you not to gate it
none of this needs to happen on tick
also make sure you use GetControlledPawn not GetPlayerCharacter
@odd ember Thank you I got the movement started, appreciated it
yea it is
you need a parameter for the RegisterAIAsPlayer
as in, you pass to pass in the AI you want to send along
then inside the function, you're not having random things happen, you're adding an AI to an array
you're not doing anything else with the array inside that function
you added a return value
you need a parameter
apparently they are called inputs in BP
for whatever reason
anyway you need one of those
also try and keep each function to do exactly what it is called. If you're registering an AI, you're not doing random things, you're not doing anything else but registering an AI
please
Hi guys am learning how to use blue prints. Question lets say I have an OptionsMenu button and I click it, how do I give it a delay before it goes to the options screen?
oh ok
there's a delay node
theres a node called delay
@odd ember can u explain the steps again? I'm getting confused. So on my gamemode, I make a function to put actors in a array. I will call that function into my AI Bp. In my AI BP, I will have another function that will take a actor from the other function and I will make it my It player?
at the beginning of the game, each AI registers themselves to the game mode. the game mode keeps an array of all the AIs in the game. whenever "it" changes ownership, the AI who got touched by "it" needs to call and tell the game mode that it has been touched by "it". the game mode then decides what to do with that information
does that make sense?
yea i think i got it
is there a way to export like a prototype of a UI menu? so people can try it out
additionally, in another function, at the beginning of the game, once enough players have been registered, a random player can be chosen to be "it" out of the array of players that the game mode has
package the game. see: #packaging
how do you change hit result under cursor by channel to my character movement, what do I connect to break hit result
that sentence doesn't make sense. what are you trying to do
apologies, I am still using the topdown default template in ue4, thanks to you i managed to create movement with (ASDW), before I did this I added a procedural grid that forced my character to always step in the center of the square boxes by using the (Get Hit Result Under Cursor by Channel) I want this effect but with (ASDW)
ok first
these are two different ways of controlling inputs
so you have to think in two different ways about them
you can't conflate one way of doing things with the other
each needs its own solution
how are you setting up the procedural grid?
in short, i spawn the procedural grid, when using the mouse you click on the tile you want and it moves to that tile, to get it perfectly in the middle you need to make your collision box extremely thin
so since the input you get from keyboard is not tied to a location, you cannot use the same method easily
it might require some rework to make it happen, unless the grid itself has a way to get this
like GetSurroundingTiles
or something
i think i can get surrounding tiles if so how would i go about it
you might have to do something like LocationToTile(ActorLocation)
and get tiles around it
once you have the tiles you can use SetSelectedTile based on movement input
so if you have an array of surrounding tiles, it'll look something like this
array values:
[
0, 1, 2,
3, 4, 5,
6, 7, 8
]
it's not a given it'll be exactly that, but it will be something like that
so knowing that, you can e.g. use SetSelectedTile to be 1 for forward, 5 for right etc.
thanks i will give it go,
@odd ember does ur method work if I am using one AI Behavior tree?
how do I tell that random AI to use the It role?
it'll work regardless of whether you have behavior trees
it'll work regardless of anything, it's not tied to anything
which is how code should work
ok well lemme show u what i hve now
So this is inside my AI BP. This registers the AI into the Array.
This is how they are added into the array.
yep looks fine
ok cool
one thing to keep in mind
you might want to be polling for players to trickle in
you don't when or how many AI will register how quickly
well im just dragging the AI into the level
ok so what do u mean by polling
so what I would consider doing is
create a delegate called OnPlayerRegistered on the gamemode
@odd ember I beleive you helped me with some ideas the other day i had one more question, I have some sort of system where my character will get the nearest marker and "attach" (linetrace) to it. I am able to get the distance to each one which is great. My question is tho, how to i calculate percentage of the level complete, its a bit difficult to figure out
how come when i play my game it has a different screen size from design editor?
sorry didnt mean to interupt
its ok
polling as a general concept means that an entity is sitting and waiting until something else has happened. so for instance, when doing multiplayer games, when you join a server, if it has just started, you'll be placed in a "waiting room" until more players arrive. the server is "polling" until a number of players are ready. in your case, you can do it a little bit different, which is better
I would ask in #umg
if you do this in game mode, and call that delegate in your RegisterAIAsPlayer function
then on beginplay, Bind the delegate to an event or function of your choice. you can then set a threshold for when you want to set the game to start running
it is at this point you will want to use your random function
otherwise if you random too quickly you might just pick the first AI to be "it", always
okay ill try to figure that out
just to be clear, the threshold would be a value of how many players you would want registered before the game begins
it's up to you to decide what value that should be
you can compare the threshold with Players.Length
nope, event dispatchers are available
it's just another variable type in blueprint
percentage of level completion would be something like CurrentNode / LastNode
like this?
I use the terms delegate an event dispatcher interchangeably
no, you need to actually create a variable
an event dispatcher variable
you really want to call it something more relevant to what you're doing
e.g. PlayerRegistered
ok i did
I have an axis input on Gamepad Left Y-Axis that a player controller is using named MenuUpDown
I have another axis input on Gamepad Left Y-Axis that a pawn is using named ForwardBackward
One controls the menu when the menu is visible and the other controls the pawn when the menu isn't visible
The problem being the ForwardBackward input is not receiving any axis value unless I remove the MenuUpDown from the player controller
How do I make this work?
would it make more sense to put it at the end then
the Consume Input and Override parent binding are both disabled on the player controller inputs
sure, you would normally
I see
there's a node called SetInputModeGameAndUI
Ill do some more math stuff and ill lyk if i get it
This is for VR, the UI is a 3D Widget
you'll be better of asking in #virtual-reality
the widget works though it's the forward/backward that isn't working
ok done. but i still dont understand how id tell the random actor to be it. It was easier for me to do use a bool inside of my Bp AI and reference my blackboard key.
There's just something I don't understand about Inputs
I only have one AI Bp btw
now that you have this setup, you can create a function in your AI called BecomeIt, which you can call from the game mode on the AI you want to become "it". you can have the exact same functionality there that you used the bool for in the AI
ok just showing u my becomeit
that's on the AI yes?
yea
now, since you have all the AIs referenced in the game mode, from the random pin, you can call BecomeIt
yep i did
that's it
if you create a boolean parameter, you can use it to set who is "it", but also who is not it. you should ensure that nobody else is "it". so what I would do is: get the random AI that you have picked for "it", save it into a variable, then use a ForEachLoop to loop over the array of players and use BecomeIt(false) on each one. on the loop's completion, set BecomeIt(true) on the AI you saved out in the beginning
Is my gamemode set up right? It didn't work
@dusk cave did you do this?
it's inside your random function
your random function hasn't delivered
until it does this
okay and what did u mean by using BecomeIt true and false? I make a bool parameter for Become it then call BecomeIt inside the Random function?
correct
I just moved the logic to the player controller instead of in the pawn ๐คท
I don't know why your array isn't already specialized to be AI only
anyone know how i can make it so that my bullets keep hitting even when im close to my enemy? Do i have to push the gun back or come up with a method to do so?
instead of casting constantly. you dont even use the variable you set in the beginning. you need that
the spawn point of the bullet is probably at the end of the gun, so yeah, it's spawning after the fact
ya i think ur right, i just tested shrinking capule on enemy and it hit just fine up close
The "is It"?
yes
how have you used variables so far?
i know how to use it but i don't know understand what u want me to do with it.
I told you
.
yeah but now your loop isn't functional
okay i attached the target to the As BP My AI
did you do the polling event we spoke about?
did you bind the dispatcher to an event or function?
no what do i bind the dispatcher to
... an event or function
I'm lost. I don't understand how to use it.
yes
so you have your bind node
show me what you did
so you obviously don't want to bind it to beginplay, which is why it's complaining
you want to bind it to a new event
you can use the CreateEvent node
to hook into
MY solution does not feel right or work properly with a controller, i am trying to limit my character to moveing only in four directions, i dont want diagonal movement how do i do it?
i just chose it. i didnt know what to put in there
so consider what it is that you're doing
you're binding an event to whenever a new player is registered
so that event gets called every time a new player registers
this makes it your polling method
now you can consider how many players you want registered before you want to start the game
do i keep call player registerd in the function
im getting an error that says infinite loop
...yes
that's because you've still bound it to your begin play function
create a new function
and pick it from the list of options in the CreateEvent node
that way you won't have an infinite loop
apologies here is a closer snap shot, this technically works but not well enough on a controller/gamepad
what's the best way to have a for each loop with a delay?
I can think of a few ways but I don't know which is best (or works)
you set the MoveRight AxisValue to 0 whenever you use MoveForward and vice versa
you don't delay loops
let me reiterate my question then
how do I iterate through an array with a delay in between each iteration
a timer, perhaps
so in that function, you can setup a branch that checks the player array's length against an Integer value of your choice called Threshold
on the true end of that branch, use the SetRandomPlayerAsTheIt function
instead of on begin play
that sounds like the perfect solution, how do i go about setting that up, do i need agate?
you never need a gate
get gates out of your head
it's not a perfect solution, it's the easiest, hackiest one. on both input events, figure out if MoveForward > MoveRight if yes, use allow it to proceed to your MoveForward logic on your MoveForward event, and the equivalent for your MoveRight event
@odd ember i need to take a break and switch to a different project. can u help me again tomorrow?
can't guarantee anything. but you're almost there.
if you do what I said you'll have a fully functioning setup
ok hang on
whats the name if the blueprint that will do this if/else statement, just another branch?
it's a branch. but you're not doing anything on false in either case. just use the true branch
what was that neat way of doing formatted text in blueprint again? I'm trying to do a printf without it being too much of a hassle
invert the condition for MoveRight
I can't find it anymore
buildstring?
cool i think it is setup correctly, it does work but I would like to try that approach to reset an axis "you set the MoveRight AxisValue to 0 whenever you use MoveForward and vice versa" how does one do this as the controller movement would be silky smooth instead of glitchy
the logic I gave you is exactly that
you're basically not executing one while the other is active
if you instead want to get rid of the branch, you can use a Select Float node instead
and set it to the same
thank you, not sure why you doing this but really appreciate you being here
yes. make sure that's the function you've bound to the PlayerRegistered delegate
the random is already being done under the correct conditions in Poll()
right
I assume you've set Threshold to be more than 0?
that's it then
ok so one actor did become it but i got an error with this
what's the error
accessed none trying to read k2node_dynamiccast_AsBP_My_AI
the node thats selected in the picture
your don't use the loop at all
you need to use the loop for the BecomeIt(false)
It's bad to cross node execution paths for references. Your cast node hasn't been executed until the loop is finished, but you're trying to get a value from it in your loop.
so you need another cast node
@odd ember but u told me that i didnt need to cast constantly
I said that if you changed the array type to be of your AI type you wouldn't need to cast constantly
players is an array tho
yes, but even an array is an array of types
you can have arrays of floats, vectors, actors, objects etc.
so you could change that to be an array of your AI class type
then you wouldn't need to cast
but for now
just remove the execution path in the loop body
that goes into the second cast node
from BecomeIt(false)
the body of the loop is separate from when it completes
now you're not executing the loop body
the end of the loop body, cut that execution
you're already execution the rest on completion
oh ok
u mean the execution node at the become it false?
rn both of my players are set to being "It"
hang ong
like this right?
ok so i have one player as It and one as not It
no
oh
so dont attach it to anything?
correct
how does one move objects that are placed in the world without physics, to a specific increment distance from character facing (like a push effect)
this should be correct. only whichever player you picked should be it. what is your threshold value set to? because if it's set to 1, this is what would happen
oh ok
you can do this with trigger boxes or Event Hit. you don't have to involve simulated physics for those, just collision
ty i will research this
@odd ember what could cause both players to be it
the random function being called twice
are they both it consistently?
ah
only when the game starts
I forgot about the tags
in your BecomeIt() function, make sure you update the tags correctly
no i didnt mean that tag i mean like tagging a player in the game
@odd ember I need to work on another assignment with someone in unity. if u can help me tomorrow, that'd be great or i'll try to figure it out.
no promises and don't tag me. but just post in here and there'll be other people who can help you out as well if I'm not here
ok
thanks for the help i really appreciate it
so to end off
lets say I get it working right
what would be the next steps for me to get the tag working
I think the tag is the issue you're seeing. under the hood, there is probably just one "it". in your AI's BecomeIt() function, you need to ensure that your boolean parameter propagates the tags correctly
I was referring to the actor tag. but if you're referring to the tagging it's pretty easy
you'll need a few extra functions but they're basic
is there a way to make pawnsensing able to sense through geometry?
But we didnt use tags in BecomeIt. We used a bool. You mean the blackboard key?
If I want to make an actor always spawn on the surface, do I line trace and set location or is there an easier way?
on the surface is a bit vague. the Spawn Actor node has some options, such as adjust location always spawn
I want to spawn a box damage volume actor on the character's feet and get actor location is not near the feet
I see a getactorfeetlocation but I'm not sure if its exposed to blueprint
yes, the actor location of a character is at the center of it's capsule. You can still do it this way and then subtract CapsuleHalfHeight from the Z
thanks!
Hi. I am starting to make use of timers to some logic of my game that was previously using TICK. May I ask if the delta seconds on the tick and get world delta seconds are the same? I need the get world delta seconds to smooth out some floats. Thank you
sorry. the update inaccuracy is supposed to be 0.1
.1 is fine
but the .01 is pretty much tick
if things need to be done on tick, do it on tick ๐
I see. Thank you. I was using 0.01 on the weapon block trace as the transition was not smooth with 0.1 so I used the 0.01. Please correct me if I am wrong, I moved from tick since it is dependent on the fps? Though I have not yet noticed it, if the fps is low it will also reflect the smoothness?
i do weapon block trace on tick, (granted C++ tick), but still on tick
well you cant smooth things on a timer
if you need smooth you need tick
or do some kinda interp between timer calls.
I see. Thank you for the info. That is why animBPs and timelines are probably on tick ๐
i optimize by turning off tick on the weapons when not needed
ie when weapon is unqueipped or its back at resting spread/recoil.
turn them on when weapon fires
Both of these functions/events are in a separate BP for firearm. So these only fire when I equip a weapon or should I manually set or override it in the blueprint?
Currently the tick actor on the details panel of this BP is set to start with tick enabled, 0 time tick interval and allow tick before begin play is disabled.
would there be any problem if one were to set a variable (delta seconds) with tick, and then use that variable on timers?
1D blendspace you mean sprint via holding a key down?
this kind of input has Pressed and Released outputs, so when the pressed happens they sprint, and once the release happens it stops
you would be changing the MaxWalkSpeed
try searching for sprinting, good stuff on it
haha, yeah, gl
alright... thanks
Do keep the overshooting in mind
If your player lags he could overshoot your timer quite a bit, so you might want to do something in that case
but the timer is based on delta seconds, it's tied to tick
Yes exactly
Usually overshooting isnโt an issue, just keep in mind it can happen thatโs all ๐
so like... whats a situation, what happens?
For example if you were to make a stopwatch or something using event tick
mm i see
i compensate for that in my weapon firing
by getting the slack between timer calls
and adjusting the next timer based on that
What would the point if that be?
you can just delay 0 to delay one frame if that's what you actually want
Guys,I made a simple combo system with montage,but the combos really stiffness between each attack.How can I fix that?
Blend better, offset animation starting points to remove neutral -> charge up keyframes
@devout crow But if you want more specific help, maybe show us what you mean by it looking stiff?
Is it possible to get a Float value 0-1 from where a player in standing in a Volumetric Cloud?
... what? Like a normalised position within the cloud?
@blissful widget like the clouds density where the player is within the cloud
Sorry for my poor english,I am meaning that the attack animation convergence is not smooth.
Those animations look super fast to me, and it looks like the blend times are set to 0 too. The second attack is kinda stiff looking in general, but might be better if slowed down a little.
can someone dumb this down for me or link to a concise ELI5
I will be using it to drive variations in multiplayer "environmental variables" such as wind, temperature. Im hoping to find a way to able to have warmer and colder areas within an area based on a particles or perhaps a Perlin Noise or a Field or something
The dumbed down version is right in the screenshot ๐คท
is everything in "world outliner" one of these classes?
why does a blueprint have to be in a parent class at all?
I used montage to build this combo system,So where should I set the blend times?๐ข
That's helpful,thank u
@trim pollen C++ base classes with BP child classes how UE works. From what I've read, the reverse isn't possible. BP is a layer that goes over C++, but C++ cannot see BP variables, functions and events, so inheritance only flows from C++ to BP
I see
All good mate, good luck!
UIntProperty* IntProperty = FindFieldChecked<UIntProperty>(BlueprintClass, TEXT("VarName"));
int32 VarValue = IntProperty->GetPropertyValue_InContainer(BlueprintInstance);
You can use reflection to find BP variables in c++ that was not exposed. Only works for instance variables, not sure about scope etc. But it is possible.
I seem to have trouble getting the location of an "actor component".
Any ideas how that could work? (Blueprint)
Can you put the component on the node graph?
Yes
Drag out the data wire and Get World Location
Oh, it must not be a scene component
Actor components have no physical presence. Scene components do (they have a "transform")
Yeah
But can a scene component then have a trigger for example?
I never played with triggers. Is that a component?
Components can't have components unfortunately
Hmm that's not good for what I had in mind
I just wanted an actor with multiple components, for which I can get their locations (and they should be triggers or contain triggers)
I really love Unreal, but sometimes I miss a simple way of making a prefab like in Unity
Yeah it can make structuring things complicated. You can attach actors to actors though as an alternative.
Yeah I guess, but in my case it's 27 components and I wanted to declutter my world outliner a bit
Oooh I made a mistake. Those are actually scene components
Only in the blueprint where I work with that actor (and its components) I have set the components to a actorcomponent variable, and then it stopped behaving as intended. All good!
Hey, I'm trying to create a replicated keypad for a door. But I have an issue for sending the number pressed by the client. As you can see in the first picture, the server is pressing 5, so on 5 is display on the keypad. But, the client have pressed 6, the print who say wich number is pressed is correct, but the information is not send to the keypad BP. In the third picture, I'm in my base character class, I'm printing wich number is pressed, and I'm sending this number to a function inside my keypad BP. In the last screenshot, inside the keypad BP,I have a custom event replicated on server, who call a custom event replicated multicast, who are setting the text. Any idea?
@digital palm Two major issues here. First is that you should be replicating the values entered, not multicasting them. Likely in an array of integers.
The second, is that you're trying to send a server RPC through the Keypad. This won't work because the server owns the keypad. Clients cannot network through objects they do not own. Objects they own start as their controller, possession sets the ownership of their possessed pawns as well. You can add more yourself by setting the Owner variable of an object on the server. However that isn't what you need to do here.
Instead, you should have an interface in the keypad. Your key press can get the keypad reference locally, and then send that and the desired number through an RPC in the controller. On the other side of the controller, you can call the interface function on the keypad on the server. That would update the array of integers, and replicate the new state back to the clients.
Hi guys! Is there a command to see the average fps (total/game/cpu) of the last seconds?
So by controller you mean player controller?
Yep
Ok so I have to move these functions from my base character to the player controller
And I can create a array of integers inside the player controller
No. The integers were for the keypad. They're the keypad's state.
Oh I see why you talked about a array. Iโm just sending a single number because inside my keypad I use the build string function
Either way. But the gist is that you're probably going to have more things to interact with. So if you make basic functions like this with generic rpcs that just take actor level pointers, it makes it much easier to send stuff from client to server to do interaction stuff. General code flow in a nutshell should be...
Handle Client Input
(Line traces? Overlaps? Whatever you use to detect what the player is interacting with)
Get Controller
Call Server RPC With Interacted Object And Other Data Neceesary
Now you're on the server version of that player's controller.
Used passed actor pointer to call interface function on interactable.
Now you're on the server version of the interactible
(Maybe do checks here like distance to avoid cheating if needed)
Server sets new state on interacted object.
Server updates own visual stuff.
Replication system comes along and sends replicated value to clients.
Client runs that property's OnRep, sets up it's own new visual state.
The reason for this is because it's abstract. Now you can reuse this same networking logic on not just the keypad, but doors, alarms, picking stuff up, elevator switches, etc.
we didn't, but we can. you are free to add whatever logic you need for that function
Is there a way to do a replicated do once?
Er. You mean like to replicate a value only once?
Yeah I mean I know I could do it via custom events, but I was wondering if there was something that already existed for this. like the already existing do once node.
Kind of. At least you could with the new push model but not in blueprint. Usually that is done via replcating as InitialOnly, and setting it from server after that as a multicast.
Hi guys, does anyone know what is good practice here? I am using a livelinked joint in maya to control ue4 camera FOV (for animating). On event tick I tried updating the FOV(img2) but its a little laggy/jolty, so as an experiment I tried doing (img3) instead the timeline graph is just a straight line 1:1 value-time ratio, I'm not even using the value though I'm just performing an action on its update and its smoother despite timelines updating from even tick too (as far as I'm aware?) - Is there a better method I should be using?
you could use finterp if it's not smooth enough
Is there a special way to replicate movement or do I just do it the same way as everything else? For example I am using a "Launch Character" node but it isn't replicating by default. Do I just throw a server/multicast custom event on it or is there a better way to do it?
@spark steppe will finterp work on live animated skel mesh ? I will take a look tho thanks
noob question - is there a way to make the input array for the for-loop be selected based on where the flow came from?
Probably a Select node
or 'Pick A' node
"Pick A" doesn't seem to exist for me; I don't think Select is what I need
Promote the resolutions to a variable, set it on both paths, then reference the path in the loop.
oh, yes, that might work in this particular instance. But I'm interested in a more general solution
@dawn gazelle I was just about to ask if this would work:
I'm not feeling super confident about when the "Get" node gets called
is there a way to do it without a local variable? (not that there's a problem with using it)
hello there
im having a little trouble with my game
i made a new level and imported an fbx file of a house
and now my firstpersoncharacter doesnt get recognised
when i simulate it shows a static camera actor and i cant move or whatever
its just stuck in one place
anyone who can help?
I want to create an inventory like fortnite where you can press 1 to use the first weapon and when you press 2 you can use your second weapon, how can i create this?
what do you mean by that?
i have a firstperson gamemode
but instead of me spawning as my first person character
if you can't move when spawning in the house it's probably because unreal created a collision box which capsules the whole house
i spawn as a static cameraactor
unless the house is made of several mesh's and not one big mesh
its several
but i spawn as a cameraactor
it also doesnt turn yellow like the rest
idk what that means tbh
maybe it couldn't spawn a character. you still have the player spawn thing in the outliner?
is it within the house?
yup
move it outside and check if it still wont spawn
well most likely your house still has some part which covers the spawn area
so you have to open each mesh and check the collisions
well, it's most likely something that covers the area, so maybe 2 opposing walls or ceiling/floor
anyone got a good source to find free 3d models?
unreal marketplace has some free stuff
im looking for a low poly interior
like a haunted thingy or smth
basement
anything
also how do i check the collisions of the things
and perhaps edit them
in unreals mesh editor, you have to check show collision for it to show up
how do i use the mesh editor ๐
Any ideas why my thumbnails arent updating? They have meshes inside of them. I've made sure 'real time thumbnails' is checked in my content browser view mode
i'm finding like a ton of videos
my unreal engine doesnt have the mesh editor?
idk i cant find it in my plugin list
Just like pro tip to anyone new to BP.. learn the way UE integrates DataTables with Structs to .CSV and use EXCEL magic to change the game!
So mad I didn't pay enough mind to this stuff sooner.. roommate was always like "why don't you use DTs and Spreadsheets" and I was always like "idk htf to do that with bp and im being a baby about looking into it or going back to coding"
LIKE BRO!?
Your mesh editor is when you double click on the mesh in your content browser and it opens a window with the mesh in a test scene
i have like a whole house
there isn't anything to retopo in ue or do topo well if at all if thats your goal
of separate meshes
Yup! DataTables are a great way to set up actors on a construction script too, if you weren't aware ๐
do i have to check all of them 1 by 1?
No idea, posting screenshots helps explain your issue.
You can auto generate collisions on import, might be easier to just do that if you've got lots of meshes
oh dude like.. I feel as giddy and excited this weekend as I did the first time I learned how and what UVs were and what PBR can do to fake dynamics in a scene(it involved making a music themed game) like its such a game changer for me to finally know how to apply some OOE skills that I havent used in too long!
The mesh editor will let you create collisions that are either "max" or "min" with a generator tool that does convex but isn't great with complex geometry. You can set collisions in most 3p software and reimport which is probably best practice(I used Houdini which makes it really easy but no idea about blender) the other option, assuming you made the asset, is to import the asset as individual objects and create simplified/convex collisions individually than set them back together and turn them into a single asset in UE
so... I think I already know the answer, but worth a shot - is there an enum-based ComboBox?
(sorry if this is the wrong channel)
searching online has not been successful
Not that I'm aware of. You could use a map of the index values to an enum tho...
You can also loop all enum values to collect them in an array
And generate the combo value from that
thanks, thought as much
another time where FNames could truly shine... but they don't ๐ญ
okay guys
now i need to get my textures done properly
i have like a map with textures
a folder
wrong channel
but idk which texture belongs to what
hey Efool
so you said to check the BecomeIt() function I made
I didnt have Is It attached to anything before and I think its works now
although the same actor seems to be It. I'm gonna put in more to test.
is there a way to substitute "Update cursor Position" with a gamepad and its thumbsticks?
nope
if you really wanted to, you could see about controlling the cursor with the thumbsticks by using UpdateCursorPosition but I doubt it'd be that easy
ok i added a third AI and put the threshold to 3 and the red guy is still always It. We made it choose randomly right? I don't mind if its random or not.
nvr mind. it does pick another actor but not as often.
random is random. the more AIs you put in the more random it gets
oh ok
good thing that was a easy fix. now to do the tagging
so to set that up, I need to reference the actor that got hit and send to the gamemode?
like this?
so for that you might need another function, this time pure, called IsActorIt
on the game mode
on the game mode as well you might need another function for SetActorIt
I use actor here but you could use Player as well
for the naming
that's true, we could use BecomeIt
so we need to move some logic
or actually
no
we can't
because BecomeIt is on the AI itself
not on the gamemode
so we need another function
we still need to move some logic
so I pass the "hitter" actor in here?
this is in the game mode yes?
yes
so an empty return node?
how to add a muzzle flash
do you have a muzzle flash asset?
are you not reading what I am saying?
i can't connect the equal node to the return node
how are you trying to connect it?
yes
like there is a red pin and a red pin. connecting them should not be an issue
do you have a firing function?
Oh ok i see what u mean
yes
is your gun a separate actor or component?
actor
ok cool
so in your gun actor, I'd recommend having a scene component (or socket, if you want to do it on the level of the gun's skeletal mesh) called MuzzlePoint. when you fire, spawn the muzzelflash as a particle system
ok i check marked it
so now in the game mode, you will need a new function called SetPlayerIt or SetActorIt
in the random function from yesterday, cut and paste the loop part
into that new function
in fact, you can select all those nodes, right click on them and select Collapse to function
i have an error in our Poll function
so that's not in the poll function
that's inside your random function
so show your random function
generally wait with compiling until we're done with the reshuffling
it doesn't connect to the return node now
which is probably the issue
anyway
go into your new function
let's set that up first
you don't need a return value for that function, but you need a parameter for which actor is supposed to be "it"
yep
now with these new functions
go back into your AI
on EventHit
check if the other actor IsActorIt
with a branch
and if true, then set self as SetActorIt on the gamemode
that's it
that's entire logic for the game
now it's debatable if you need some scoring system or whatever, but the gameplay is this
you dont need the hit result, you can use the pin called Other
otherwise correct
awesome it works
gonna have to make changes to my AI behavior
and add in the the stuff I need but I can do that myself I think
cool
consider the visibility of whoever is "it" as well
maybe you want a special material etc.
thanks EFool. really appreciate the help.
now that you have these functions, you can change stuff like that in the BecomeIt function
Efool how long have you been using blueprints?
blueprints are just code
but I worked with UDK before UE4 and they had a rudimentary version of blueprints called kismet
when UE4 came out I just transferred
does Unity have blueprints?
anyway a lot of this is not explicitly to do with blueprints, it's just good code practice
I cannot for the life of me get a widget blueprint to display on the screen.
I have a game mode, I have a HUD class, in the hud class, I create a widget, add it to the viewport.
Hud class is set inside the gamemode class but nothing displays on screen
if you go to university and study to become a CS major or a system architect or a software developer you'll learn the same
doesn't matter if it's blueprint, C#, cpp or any other OOP language
widgets are made for players. so the player controller needs to be involved
Hi, may i know how to resize the Editable text box if i make it as a child of a border?
@odd ember But I have done it this way in another project, its identical
AHH, umg channel is still here. My bad
i would like all the blueprints using a struct to get updated parameters straight from the "master" struct, is there a way? if i update a struct inside a random actor blueprint using it, it will keep these new parameters and not the ones set on the struct itself (outside the actor bp)
a struct is just a data type, it doesn't share values across blueprints
so should i just use a data table?
you may want to store your struct in a global place like game mode, where all can access them
data tables are readonly
this sounds like a good plan
maybe stupid question, but why there is no for loop (or any kind of for) in widget blueprints?
ue5
have you considered asking in one of the UE5 channels?
ue4 does
Ive done for loops inside a widget bp in ue4
I got loops in UE4 too
i checked just now
its a ue5 problem
okay, ty
might be a temp work around at the bottom most post in the link
"copy a For loop node from a plain Actor BP, then paste in the widget BP"
is it possible to have 2 people working on the same project online, with blueprints?
Do you mean source control?
Yes
Though not exactly "2+ people working simultaneously in real time"
But for "2+ people to share the same project", then yes, you can use source control for BPs. The changes won't be apparent though, because BP .uasset is binary file, not plain text.
What do you mean wont be apparent
The change log in your repo for BPs won't be directly readable in the source control interface.
Cool, thanks
Hi thought I would ask the question in a different way perhaps someone can help, how do I replace "Get Hit Result Under Cursor by Channel" with my Xbox controller where the thumbsticks could act as the motion for the mouse. I know they use different systems but in theory it should still be possible
Get hit result under cursor by channel" is a default preset to TopDown view
hi can i ask here about animations ? in animations its dead silent
Ask in #animation
I'll go there.
thanks
I have a floatcurve that I'd like to adjust to be more like the red line, is there any way to accomplish that?
or is additional points the way
actually looks like just 1 more point in the middle did the trick. thanks guys ๐คช
you can also pull out the tangents more generally
I tried that but it wasn't letting me pull them
maybe that's unique to the curve editor, for e.g splines that's possible
Yeah I remember doing it .. somewhere. But it doesn't seem to work here
fair enough, but at least you have a solution
which channel should i ask this question?
if you're doing it in blueprints... then, here?
i am doing it in blueprints but i am happy to do it in C++ if there is no solution in blueprints
I don't think it makes a difference necessarily
the gist is that you need to have your mouse cursor be affected by gamepad input direction
yes ๐ by right thumbstick
so... that should be enough to get you started?
i knew this is what I wanted, I was not sure how to do it, is there a resource that could help with this
You can straighten the tangents at the 2 points
Don't need a 3rd
Just click and drag, right? Doesn't seem to do anything - they won't drag
Can tangents be lengthened in Unreal curves or just rotated? If they can only be rotated you'll need a 3rd point but if they can be lengthened you don't.
It seems just rotated
we literally just had this conversation if you look up
don't think there is. I use a rudimentary system like this for my own project but I have certain constraints. but I mean it's something about getting the mouse position, then using the axis value to propagate direction from the location
@heavy ibex BTW that looks like a sigmoid function so depending on what you're doing or how precise it has to be, you could just do it mathematically.
No real precision needed, it's being used to drive the movement of a pendulum without physics simulation
the perfect solution would be to lock mouse position infront of character (could this be done with a spring arm not sure?), directly x units away from character always (no need to worry about the z axis), then allowing the x and y axis of the left thumbstick to change the direction of the character with the right trigger that moves the character forward in which ever direction it is facing when pressed. And finally limiting the cursor directional input to 90 degree increments so that it can only move in four directions. This allowing the existing tiles to be selected forcing character to always move to center of tile, making the gameplay smooth. Am i over complicating this, is there a better solution?
@sonic crow We have a similar system. We don't use Cursor itself at all.
I have a very hard time figuring out how that would look or feel. I think you're overcomplicating it. I think you should go back to trying to understand what kind of movement you want
and then we can look at the technical implementation separately
i try to explain it here briefly but essentially I am looking for the classic bomberman movement (fun to play on a nintendo switch) the grid system forces the character to move to the center of the tiles, iwant the movement limited to four directions. Getting the character to move to the center of each tile without a mouse currently seems impossible so i am looking for a work around
How do you do it without a cursor if oyu want to center the movement to each tile
I don't think you should be looking for workarounds. I gave you a solution to this last night
what didn't work?
Round the location before passing it to the character
to your grid interval
my movement works fine but it does not limit it to the tile which means you would move your character and you cna stand between tiles
you still need to enforce 8 direction movement but that'll get your mouse -> desired location correct
You trying to do click to move only or wasd/control stick as well?
but you do understand that it is using the same system that you would be using for mouse in the end?
the mouse just picks a tile based on world location. the gamepad would pick a tile based on surrounding tiles
regardless, a tile gets picked
I am using d-pad directions but it does not work with the click to mouse position) so it does not center the location, altenrtively I can use a mouse but most users would prefer playing it with a controller
I did not know how to implement locate surrounding tiles
but... I told you how to do that
Using Dpad, are you successfully enforcing landing on tile center?
using d pad only, can you right now move to a tile edge or center only?
I cam move to both center or edge it does not consider the tile system since it was setup with the mouse position
for the gamepad, you get the world location of the character. that in turn gives you the tile that the character is standing on. then you look for surrounding tiles and put them into an array or a map. then you pick a tile based on the next input
Get your movement behaving correctly so you can just pass a MoveDirection (8 options) and move 1 tile over
Once you have that, it's just a problem of mapping stick input to a MoveDirection
and mouse will be handled by Picking a DestinationTile from mouse position, and pathfinding there by MoveDirections
Unless you want your dude running at any diagonal he chooses which I'm assuming is not what you want
most of the input system was set up yesterday
this is what I asked you to do yesterday
.
This sounds.. painful. I don't know why this whole thing isn't just based on simple grid math. Who needs to care about where the tiles are?
how is grid math any different from this?
It's much simpler to implement. And then the tiles can be anything you want them to be. They can be entirely ripped out and the gameplay still works.
There's a million ways to pull this off but the best would be to have a grid representation of disallowed positions (map of integer vector 2d to enums) which you lookup to see if a move is allowed.
just register all the blocked locations in that map at game start and off you go
thanks i will give it another go, technically my grid is essentially just made up of vertices built with geometry to make it ultra light weight meaning i could have a billion tiles and the game would run smoothly (although might take a few extra seconds to load)
A vector on the character. This is where the player is moving. A second one is where the player wants to move. Character's movement logic always trues to go towards the first vector. Input changes the second vector, when character reaches the first vector it checks if the second vector is set and if so sets the first to the second and nulls the second out. CharacterMoves again. If you need something even more complicated, it's as simple as putting in an array of vectors and a pretty simple path following system. Input from mouse snaps to grid at a Zless point for input and sets the desired location to that. DPad takes the current target and sets the desired target to whatever current target is + gridsize*direction.
this seems weirdly... predictive?
also gonna say that while I get that you can separate grid and movement it's not something I'd personally recommend unless the game has to do both
but maybe that's just me
Predictive of what? If you only want four directions, the character needs to move to the next square before another move can be made. This second vector allows players to set input without having to wait for the character to stop.
ah like that
but that is still predictive behavior
because there is an assumption that players will want to continue to move in that direction
I'm not sure if that affects the system as a whole, however
It's easy to put in a clause that if the new direction is backwards, you can set the current destination immediately.
I'm also under the impression that the character needs to move direct to the center of the grid? I wasn't thinking this was like old Zelda style, but literally like chess movement?
I think they are trying to make bomberman
so I think the whole movement system is predicated on the fact that the center of the tile is what matters
Bomberman or super bomberman?
I don't know
I honestly didn't even know there was a difference between them
I haven't played bomberman for at least 20 years
None of the ones i find have locked grid movement
Me neither, so wanted to look it up so there's a clear reference for the intended movement
Yeah for a Bomberman like I would not lock movement to cells but just placement of objects, and have dude about the same size as a cell
Even arcade version has free movement.. im confused ๐
It would be weird imo if mouse and gamepad dont play out the same tho
Like mouse can click tile far away, and gamepad can not?
That would need some commit to the move when using gamepad (similar to mouse button click)
I wonder what happens when the mouse hits a wall tile
Mouse movement would be weird imo
I guess the tile centerpiece style movement makes sense for bomb placement and the like perhaps
but I don't know, maybe the idea is to have tile based movement style bomberman
and call it transformative
๐
Turn based bomberman