#blueprint
402296 messages ยท Page 953 of 403
now i can only press w once when i press it goes 1 down and when i releasd w it goes up again and nothing with s
What's the graph looking like?
Looks right, except for the add. You need to add the current elevation to it
how i do that
Connect the current elevation to the pin that's set to 0 here
what should i set it to
Current "Gun Elevation Angle"
i dont get it
It won't be 0 after you've added to it though. The point is to add to the current angle, and keep adding to it instead of just setting it to 0.1 and that's that
hello. how can i set up a camera to do a 360 rotation around a given point ?
Put the camera on an arm then rotate the arm.
There's a pin with a raw value, currently 0. That needs to be getting Gun Elevation Angle. To get its value, you need a getter, which would be a function node like Get Gun Elevation Angle.
How would I get the dot product of an actor based on their velocity rather than their facing? I want to determine if they're moving towards something, not that they're facing it.
I think you'd be much better off watching a few BP tutorials to get the general idea as well, if you know some programming already
Get Last Update Velocity on Character Movement Component
uhm im sorry man i just dont get it
I'm not sure what to do with that, though. I'm spoiled by GetHorizontalDotProductTo. ๐
whats a dot product? xD
what is a getter
If two actors are facing each other it's a 1, if they're facing away from each other it's a 0, if they're kinda in between it's a 0.5.
A function that returns the value of a variable
most tutorials, even the documentation, handle with players etc, i just need a camera that i can render in a sequencer. do i need to make a bp, reference an existinga camera etc or is there a simpler way ?
ohh that sounds useful, thx
This is what that node does
Basically how alike they are
@limber parcel 1 being identical, -1 being opposit
so its 1 if they face same direction?
Yes
so i need to make a function called Get Gun Elevation Angle
and put it to the 0 value and then what
0 would be perpendicular
NO it needs to return the value of the Gun Elevation Angle variable
You're not trying to set it to a static value, rather change its current value upwards or downwards, IE you need its current value, then you add an offset to its current value, and then you set that to be its new value.
There's a dedicated dot Node that just takes in two vectors
https://www.youtube.com/watch?v=-r-ahrPQrLU
How to use the dot product node? What does dot product actually do? How can it tell you if two vectors are facing the same way?
Welcome to How to... a snack-size video for a snack-size question in Unreal Engine 4.
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a Coffee I buymeacoffee.com/RyanLaley
Donations I paypal.me/ryanlaley...
One input would be the last update velocity, the other would be... well, you decide. The other actor's last update velocity?
okay uhm
Good morning! I'm reposting for morning so I can get more eyes.
I am trying to find a way to remap the controller Dead Zone settings using the Enhanced Input Action system. My goal is to expose the lower and upper threshold as variables I can access through UI. Any idea on this or know of anyone who may know?
Why not just access them directly from your UI?
Why do you need the intermediate variable?
Either works. I am just unable to access them either way
UE5 crashed and I lost a interface I remade it but now when I try to add that interface as a call action I get this. How do I fix?
I'm not definitively sure if it is or not. I haven't been able to retrieve it so far. That was my question I guess
how can i animate a camera rotation around a fixed point while skipping all the game/player-realted stuff while i work on a render export ?
put another actor at that point, attach a camera to it with an offset and then rotate that actor
Your render is a "game" so you can't skip the "game" stuff.
I have this variable which contains my mapping context shown here. I'm just really unsure as to how to actually dig down and pull out that setting
Your rotating camera would either be controlled by the "game" or a level sequence
a sequence, thank you
thanks
There is "map key" which is fine for rebinding but doesn't offer me access into the 'Modifiers' inside my mapping context.
MY Blueprint is referencing a interface that was lost in a crash I removed all interactions with it but is still will not compile
Go to class settings and look at what interfaces it implements
and dont forget to point ur camera at the rotating actor
add and remove that interface again if it doesnt work
ok
@blissful widget pls dont be mad im just asking
how do i make a getter๐ฌ
It's a function that returns the value of a variable.
1 mississippi, 2 mississippi, 3 mississippi... ๐
Its an alternative to allowing direct access to variables from derived or external classes
So instead of just grabbing the health variable or whatever, youd make an explicit public function to GetCurrentHealth , which simply returns the value of the variable
i try make one is it hard to make one? or simple
Very simple
can you teach me
The most basic function you can make
i feel dumb now
Create a function
Drag in the variable into the function graph
Right click the graph and add a Return Node
Drag from the variable onto the return node
While the return or entry node is selected , in the details panels, mark it as "pure"
like this?
do i need to do something to make it only read
ahhhhh
"Set" writes
now i need it in the other bp
Show the result first
You really want to watch some BP tutorials to get hang of the basics IMO
Like this stuff is covered in heaps of tutorials, we're just typing up BP 101 for you ATM
Yeah theres many pitfalls and issues thats on its way towards you if you dont understand how things work
sorry
Tbf many tuts should practice better public and private variables and functions, and how to safely set values and whatnot
Atleast thats the case when i watched 'em many moons ago
Casting from here to there, allowing any other actor to modify any variable in some random bp is not a good idea
They just create a new project for each tutorial, unless it's a series. The code is 100% throwaway, almost by design
then how i do it
Are there animation libraries? like blueprint macro/function libraries?
Personally I'd rather just a straightforward tutorial than an 'architected' one. I'm going to redo everything about it anyway, I'm just there to understand the idea behind it, rather than learn someone's implementation details.
I've got a software background so I just hate everyone else's programming style. It's in my nature at this point
From a firmware background, i share this view ๐
I try to always improve my own setups
The one thing that annoys me is when BP tutorial makers apparently forget about functions, collapsed nodes, events, and just any BP organisation method. Readability is important, and actually speeds up tutorials if you have to pan around the editor less
Plus the mind can only cope with like 7 variables at the time,
So these massive functions become incomprehensible if not divided and structured with sub functions etc
Is there a way to convert this node into any pawn currently controlled by players?
Cast to pawn?
ok Ill try
Thanks that worked!!
Does doing that have any down sides? like cost more processing power or something?
It looks like you're using an interface right after it tho... It's not really necessary to cast if you're using an interface call.
If anything casting to pawn is better than casting to ThirdPersonCharacter as it's a lighter class
ok thanks Ill need to go to all my BP and change it to pawn
I wouldn't do that.... Sometimes you need the reference to be at ThirdPersonCharacter if you need to access variables and functions that you've set up in ThirdPersonCharacter.
Hey I thought this is gonna be simple but got stuck with it. Is it possible to write the output log to the running game's screen? How do you even read the output log from blueprint or cpp?
Should I just read the actual log file?
I know but if I change pawn or have multiple players I have to have it pawn... I just have to add thoes functions to all my pawns
Why is this not compatible?
@visual crest try casting to "BP My Charactor"
A cast is a class check
If it passes the check, it transforms the reference into that class
You were casting to the pawn class, and trying to feed that pawn reference to your "BP My Charactor" variable
So yeah, not the right data type
I am trying to make a controller for all player pawns
how do I do that?
any ti
any time I try to use jump it always says not compatible
Is jump a function/event? The node should say "target is..." such and such
So it'll only work on a target of that type
Anyway you can look into how controllers possess pawns
It's kind of weird for a controller class to be directly telling a pawn to jump
Usually a pawn, when possessed, will listen for the jump input (see project settings โ inputs) and handle that itself
And the controller does universal stuff, like handle the action for opening the game menu
That's kind of all I can say cuz I never made a multiple pawn game before
ok I get it the controller is not the player controller per say but the interface controler
Thanks Ill watch a tut or two more on it
If you need one BP to talk to other BPs of different classes, you need to learn about interfaces and class inheritance
Otherwise you end up casting to every type of thing in your game
You can cast to a parent class and call a parent function, and that'll work for all of its child classes for example
np
How to stack function calls
Like how can I add the same function more than once
Use the same function multiple times, how to link them
Hello I need some help, so I made an Array of anim montages, and I'm playing them on my keyboard keys as you can see on my screenshot
But I want to make it stop playing whenever I'm moving my character
Could someone of you help me construct blueprint to detect player movement, and if so to stop playing Anim Montage? I would appreciate
Hey all. Is it possible to set up a Sequencer camera, and trigger it to do a screenshot in blueprints?
Is there a way to bypass a Layered Blend per Bone node when I play an anim montage from a bp? I have a bp set up to trigger an animation (kneeling down to pick something up) and only the top half of the animation plays on the skeleton.
The blend per bone is used in conjunction with the Document Reader Pro asset on the marketplace.
Slots.
slots in the Blender per Bone?
After the layered blend
how can you make a character nose dive when jumping off something high up. Basically not sure how to orient him as the gravity always makes him straight up and down.
tried set / add rotation but doesn't see to work.
I have created a simple dismemberment system that checks a list of broken bones already, it checks if the hit bone is already in the list of broken bones, if not, then hides the bone and spawns in a static mesh version
But i have craeted a branch inbetween because if i shoot the upper arm l, it only spawns the upper arm l, disregarding its lower arm l and hand l
hiding them without spawning them in
I am really stuck on how to get it to recognise the child bones and spawn them in
i got up to finding the parent bone, checking if it is in the list of broken bones
trying to load a level but the volume simply doesnt trigger the level what should i do???
tho it works if i use the blueprint node "Load Stream Level"
You'd have an UpperBodySlot and FullBodySlot
anything you play on UpperBodySlot is before the blend, put FullBodySlot AFTER the blend.
Anyone have a clue WTF is going on? Character is oriented to movement, but sways really fucking weirdly during movement. Jump is wacky as fuck too
Show the rest of the error
why the script not working
make the capsule visible
Show the rest of the error
Rendering > Visible? Already on
With your animation, NOT by reorienting the capsule
Custom movement mode
hidden in game
Or that i guess
You could reorient the capsule but that gets much fancier
Probably more correct ๐
The particles (if visible), trigger when the landed event is fired, but the jump is still broken, among other things haha
That worked! How does UE4 recognize what slot is what? Like one is named Full Body, one is Upper body, how is UE4 recognizing what is what? Does it work like that? Or is it more it's cancelling the blend bone by using that slot and it doesn't necessarily matter what the name is? (hope that question made sense)
Name doesnt matter beyond your practical use of it
Its struct has a bone name which it will affect all the child bones to, iirc
ah, okay. Thank you ๐
So you usually divide them into whats practical, upper/lower body, head etc
Alright I figured out my issue, the weapon I re-created seemed to be blocking the pawn's movement and pushing it away? Have to remember what I had it set to
I had to mass re-create BPs because I did a C++ no-no, and just squashing bugs from my shaky data entry haha
is it possible to create a mesh volume that culls a specific actor BP when you step inside of it?
on overlap-> actor has tag-> destroy actor
ok good
Im not getting any red errors anymore
But the script isnโt working
I Just want it to continually add force
Your adding 5 force (basically nothing) at the origin of the world it looks like
How do I add it relative to the box
Also that should generate torque but it doesnโt
No
Add force at position is supposed to generate torque and force
Itโs not doing anything
is there a way to do that within the blueprint of the mesh volume? so that i dont need to make a new level BP for every possible trigger created?
I set up some IK for a VR player awhile ago and it was working great. Now I have returned to the project and for some unknown reason the walking animations aren't blending. I don't know why, can some please help? I'd really appreciate it
@shrewd abyss same nodes
I am trying to make an updatable list in UMG but I am getting way too confused...
I have a map of an enum and int. Basically, count X things.
When I pick up a coin, it triggers adding the item base umg but it never updates the values to the right texture nor number. Error states "accessed none" but I cannot fathom why..
okay but i cant reference the BP i want to cull in the event graph of the volume BP
sorry im not great with BP im mainly an artist
Show some code
Damn, actual list view
๐
I figured i didn't want a static UMG for score
just add stuff and if i want more, i update my Datatable
Id just do scrollbox
if i pickup 3 coins i get this
Dont need such optimization ๐
I did this once before
and it worked
no idea what i am doing wrong
here's errors
for each coin 2 errors
so there is a none value in the "on added"
but i don't understand why it is none
should be something
@shrewd abysson overlap will give you the overlapping actor. You can check class or use has tag to filter out which actors to destroy
My guess was you aren't setting the right location
It should still be moving even if itโs the wrong location
@tawdry surge
Like it should be spinning
None of that
Are you sure the incoming object is valid?
should be since it loads the default values
it's the changing of the values that isn't working
this was a game about stickers
the unit ^
and the list:
yeah im sorry i have no clue how to do this
You're adding force, but pretty much 0 of it
idk how to give something a tag
0.5 is a TINY TINY force
Unreal units of force are centinewtons
that's like half a gram
half a gram isn't gonna move much
@trim matrix Works for me
tiny
Hey man, it's the not size that matters, it's the relative magnitude and direction in relation to momentum
Momentum is irrelevant, as everything is relative.
barely moves at 5000 tho
The same force will produce the same acceleration regardless of momentum.
I'm just saying 5 doesnt do anything cuz it's like a weak breeze
I deal with torques on the order of 400M - 2 Billion
Torque units are centinewton x centimeter so 1/10,000 of a Newton-meter
that's based on mass tho right? so scaling down mass should allow you to use lower values of force and torque
Ok so if I set it to 1000 it should spin?
Set it to 100k and dial it back from there. We don't know the mass or moment of inertia of the thing you're trying to spin
Default values
If you're just trying to spin tho add torque. The non-location ones can ignore mass and directly affect acceleration
like every node im finding relating to getting stuff with a tag wont go into the destroy actor node
That doesn't help at all
is it a ship or a fly
default mass depends on volume and density and mass scaling which are all on the physical material.
@shrewd abyssYou'll have to add the tag on the actor you want to be destroyed and then set the has actor has tag node to look for it
A cube
@gentle urchin so i did a test with print string on event construct.
I have default values in the unit at the designer level and at the variables level.
The output is the default designer values.
The print string shows the defaults for the variables.
So there is no communication anywhere ~_~
Is the cube the size of a battleship or a pebble?
just set the mass
god damn
Itโs default size from primitive objects stack
rip! Damn list view ๐
I think default is like 100kg
gonna make a mockup.. give me a sec...
turns out i used the Get functions from umg
kiddo is not asleep yet
and that works
oh xD
the overrides that takes in the umg every tick
that was my bandaid
terrible solution
@faint pasture torque in radians also works with much lower numbers than degrees, which makes sense
so the order of operations when the widget unit is made is that it is constructed first and then added to the list
So would I need a slot for each individual anim-montage in the anim-bp and reference that after the the bone blend, Or will creating one reference that automatically?
Im not very versed with it, but i usually only create a few slots and re-use them
I'm fairly certain the radians/degrees only comes into play if you ignore mass but I'm not sure. It'd make sense for it to do it that way because torque doesn't HAVE an angle unit.
So it was a race condition
sorta
not quite, i was just pointing it out. No matter what order you use, it has to be AFTER the event on list item object is set
right, but doesnt that qualify as a race condition ๐
anyways
hows the performance going now then ?
I set up some IK for a VR player awhile ago and it was working great. Now I have returned to the project and for some unknown reason the walking animations aren't blending. I don't know why, can some please help? I'd really appreciate it
how to get reference to object location
i mean it is super optimal i just want to have this event only happen when i pick stuff up rather than on tick
get actor location or get world location if you wanna reference the static mesh spacifically
So here I have 3 points:
1 - After the item is added
2 - I cast inside my item added
3 - I set it as a reference.
From here I should be able to set the values
this was used to run on tick
and that works
Is it possible to have base scalability overrides in a packaged project?
I need r.SceneColorFormat to never go beyond setting 3.
how can change it so its in newtons and metres
multiply by 10,000
100 Unreal Force = 1 N
10,000 Unreal Torque = 1 N*m
Well it's because the unit of length in Unreal is the cm, not the meter
look at your gravity constant. It's -980
unit of mass is kg, so force is kg*cm/s^2 or centiNewton
since force is centiNewton and length is centimeter, torque is centiNewton*cm
how can change the keybind for the blueprint editor
want to change grab to middle mouse
If you don't like the units, go talk to Tim Sweeney. And while you're at it, get the axis setup fixed.
So you have to keep around an object for every item in the list ?
duplicate is ctrl w
yeah
wth is wrong with the keybinds
Sounds troublesome
is this a valid way of doing things? I haven't a clue what I'm doing with event dispatchers
DoThing is just an empty function in the menu pawn
That's kinda gross, what's the use case?
idk
What are you trying to have happen
I'm honestly not sure, I'm trying to follow 2 different tutorials at the same time concerning a menu, and one of them uses a specific pawn for the main menu
Is this just like the opening screen?
yeah
I get the feeling I don't need to do a lot of what I've done
but at the same time it doesn't quite feel right to not do it
Just create the widget and add to viewport from wherever if you want
ok
Keep the maps and modes separated imo
so what is the point of the Create Event node?
if you want to have the same thing availible everywhere, like the same menu when you pause in game, I do that by making HUD stateful
you're gonna have to define stateful for me
State machine
ah
I have an enum in my HUD
yeah that would make sense
is there any point in having a specific pawn just for the main menu?
Switch on EHudState which can be MainMenu, Options, Gameplay, whatever, whatever
statemachines can go into locks if you're not carefull ๐
anything can, i suppose
You need a specific something for the splash screen, but it depends on what your transition out looks like
we don't do a hard load at any time other than startup and joining multiplayer, so it's all the same gamemode, playercontroller, pawn, all that, the entire time from boot to exit
yeah i cant figure it out
is there a default pawn that gets loaded on start or can you be pawn-less?
i will try again later
pawnless apparently
I think you can be pawnless but that can be more trouble than it's worth
I didnt know that was possible, but apparently it is
for a main menu you usually dont need a pawn
AFAIK we are pawnless until spawning/loading a character (it's a roguelike)
but we directly control the player camera manager and don't use camera components
I'm just wondering if UE will just grab my main character as the default pawn or sth
ok
nah that's a variable on your gamemode
you have a default gamemode and also a level can override it
gamemode chooses your other classes
ahhh
Maps and Modes in project settings chooses the default maps and gamemode
how can i
yep, set default pawn class to none
type it in one sentence ... so your question doesnt get broken up
how to add float variable node
That doesn't parse but if you're asking how you can create a float variable, then just make a variable of type float
click the plus
read the getting started with BP stuff
just mess around
(psst; watch a tutorial)
so for a level select screen, how would you recommend doing the actual level loading? just have a bunch of 'open level' nodes directly in the widget?
Depends on the amount , but thats the gist of it yes
At some point with most setups you reach a point where the overhead for creating a procedural system becomes worth it
if its 5 levels i'd never bother
but if its 500 (for some insane reason) then I'd definetly consider it
I'm interested in the procedural approach, what sort of thing do you mean?
or are you just gesticulating verbally
@gentle urchin so i missed a part in the designer that binds the output to a variable
I did that
when looking up/down the weapon aims at an angle
I have a blueprint with instance editable variables. But When I duplicate it in the world and try to do a change, it applies for both actors. What am I doing wrong?
@humble sleet Well, you could make some function that searches for all the "maps" in a given folder, and for each map found, create a widget and add it to a level select container of some sort, which references the level it was given, either by name or index
As an example
when i aim sideways it works fine
I have this media source, where you input the source. I wanna have 2 actors with 2 different sources, but it doesn't work
ahh ok, that makes sense
I was definitely thinking about it the wrong way
i set this to a variable but now its acting as if its set to 0 when it isnt
FIXED IT
For it to be set, a white line must be connected to it
otherwise it's not set
it acts as a normal get'er in this case
This is getting better and better ๐
back to this again, I presume by this you mean if I have a menu featuring my main character, with a smooth transition to player control
all for the sake of using an absurdly optimized list for 10 items ๐
well, if i ever want to add different or more items, i can now ๐
YEs, but this is made for thousands ๐
that's one way to do it, but if you select your Force variable in the details panel you can set a default value
I could have different pickups based on different levels
thousands
anyway, when it work, it works ๐
is this 3rd person player controller physics based?
because all the "Simulate Physics" toggles are off
it uses acceleration, friction and gravity, so yes to an extent
but that stuff is calculated in the Character Movement Component
Thats one example of when you'd want the pawn in the main menu
is the character movement component physics based?
that depends on what you mean by 'physics based'
you can apply forces to the player character and it will act like a cube
except the capsule will stay upright
unlesss custom movementmode
^
you can use the Set Velocity and Add Force nodes to the character and it will work as usual
because i get physics based reactions even with "simulate physics" on the mesh and capsule turned off
thats the player after colliding with the spinning cube
well the mesh doesn't matter IIRC
because it's a child of the capsule and is controlled by the animation blueprint
ok ok I guess I'm being annoying and dancing around the question, yes the character movement is physics-based in all the ways that will matter to you
you can use forces to move it around
Nicee
I've just found the tutorial that recommended using a 'Menu Pawn'
it seems he was using it to hold the menu widgets
I presume I can just stick that stuff in the menu level blueprint
Or the playercontroller used in the menu
or the hud used in the menu
many options really ๐
that's what I hate
I want to be railroaded into the correct way, for once
I'll let you in on a little secret
I have choice paralysis
nearly anything can be done in a thousand ways
Then this is not a great place to be ๐
Ask 3 people how to do one thing, and you'll get 3 different answers
call it immersion therapy
How can you change the method that is used to add forces to the rigidbody
wdym by 'method'
force is an acceleration over a time period
write a custom physics component ?
what are you trying to achieve?
In unity there is a parameter called ForceMode that changes the effect AddForce() has on a rigidbody
When forcemode=VelocityChange it adds the value to the velocity, when forcemode=Force it takes into account the mass I think
And of course forcemode=impulse is impulse
ahhh yeah there's something like that in UE
it's a bool in one of the nodes
hol up, I'll have a look
isnt that just different nodes here?
I definitely recall there being a 'velocity change' option
Ik there is add impulse and add force but idk about velocity change/acceleration
What about acceleration?
in blueprints?
in blueprints
I guess I meant to say that by default, the Add Force for character movement components doesn't have an Accel Change input
ah
which explains why I was struggling to find it initially
and why @trim matrix may also have not been able to find it
Add force at location local
what effect are you trying to make?
I think you can set gravity strength per object
What about direction
that?
custom directional gravity is harder to make in blueprints without some hacky fixes
especially if you're using the default character movement component
Like addforfe
Add force but acceleration
So it adds the same force to all objects independent of mass
Ah thatโs why you were referring to mass overrides
check the Accel Change
but again, that node doesn't work for the default character movement
which is annoying
Oof
yes
Kekw
I saw the realization real-time
hoookay
I'm doing a turn-based game
bog-standard "let's all line up at opposite ends of a clearing and take turns hitting each other"
so I guess the player characters represented on screen can be completely disconnected from the actual player pawn
Hello someone know what is wrong with this blueprint?
im removing a elements from array to get a unique actor every one loop body, but i dont know why im getting a duplications
ah
Its because random
produces random
for each pin
this basically queries random 3 times
no, it's because the output pin of the Set node caches the initial value
Nothing sets it
You must cache the output from any random if you want to reliably use it
the array is set
not the random node
or random output
so i need to get new array when im removing elements?
No,
hold on
Ok but what has hat dot to do with velocity change no working
Also,
that wasn't to do with your issue, that was my project
O
Im setting a founded actors to BP Curse Item, then im removing founded item and getting random again from array without that elem
you're not checking if the found item is already cursed, and that another one should be made cursed...
yepp, you're removing it alright
but surely since the output of the Set node is used
i was to quick on the trigger there ๐
then doesn't that cache the initial value of the array, and not the updated version
or does it update
I believe it does work as it should
I believe the get side of a Set actually is a regular Get
ahh ok
i could be wrong, but i believe so
so i need to get every time variable after removing a item from variable?
probably not
but wouldn't hurt to use a get
would also reduce the number of node wires
okay but where to place it?
too many getting variables is good to preformance? just asking
I don't think it matters, might be wrong
Tested, and i was correct
But i presonally also prefer to separate the Gets
avoids spaghetti ๐
very much this
reroutes also affects performance
don't you mean spaGetti
but you'll never notice
wat
(or Get CursedItems(Output from Add as index))
but thats just messy
Aalso
Curse vs Cursed
has like 99% overlap
you've messed up on the one you remove from
okay wait guys
thats what i get before
look
BP_Curse_Item is a array with all elements
Cursed Items is a array with elements, that will be added in loop (thats are a CURSED CURSED elements)
Hi, Is it possible to set a new velocity ? I mean override the actual velocity to use a new. When the user touch the screen, my character has to move on diagonal up-right or up-left. Actually I use AddImpulse but I have to set a vector of 500.0 on up and right axis but the behavior is not great. Thanks for the help
referencing this will changing the velocity of a physics object directly break its physics calculations?
gimme sec
the important part is how I cache the output from the Random node
you're adding your random elements to an array, then immediately removing them
if you directly change the velocity of a rigidbopdy
so it doesnt break the phsycs?
define 'break'
you won't break it, don't worry
depends on the value i would say, if you make the value too high something might start "breaking"
true
i just read somewhere that messing with the velocity directly is bad pracitce
but there is no alternative here except writing a player controller from scratch
ideally a gravity system would work in a physically-accurate way and you'd apply acceleration using the inverse square law
so I guess in that sense, directly overriding the velocity is a hacky solution and thus not best practice
pretty much unfortunately
Worked thanks, but why i need to Set to TempRandom?
Whenever you get something from a random node, it will find a new random
it doesn't store the output in the output pin
you can test this easily by doing 2 print strings after each other, and a random int in range
So there will be a 2 separate random items?
ye
gotcha, thanks! :D
Team, I'm trying to get a melee combat system going but it deals damage multiple times to a single enemy. I don't understand why it's not working. Any ideas?
Same. Trying to slice up a procedural set of ISM's ... a pain
I'm just trying to figure out how to set up a turn-based game
I don't even know what I would use a manager for
as in, what do I put in the manager, and what in the game mode
choice paralysis
Manager would be in the GameState (or be the gamestate)
Working on an inventory system and have a question. Is it better to use a line trace to interact with items or would a collision box/overlap event be better?
"better" is arguable
Linetrace requires accuracy
collision volume can show the closest to center item as interactable (with a given treshold)
might be a dumb question, but how do "picked up" items exist in the game world? like when you pick up something and it disappears and shows an icon in your inventory
Varies greatly
How do you rotate content browser images again? I can remember there being some like keyboard combination, I cant just recall what keys it invovled :c
some games keep them around as their actual "actors", some make them into "Objects", and others keep them strictly as "data"
what's the difference between objects and actors?
Objects dont exist in the world
I started with this guys tutorial: https://youtu.be/2fdpqBBhWmw
We are revisiting one of my first series on the channel; the inventory system series, this time with different implementations, improvements, and now in Unreal Engine 5.
In Part 1 we set up the inventory component and some of its core functions and variables that will be in use.
SUPPORT ME
Patreon I https://www.patreon.com/ryanlaley
Buy Me a ...
you can have the in-game item as a thing with a mesh and a link to some data
or you can have it as the full actor with all the logic
Thanks for the replies, I will play around with the two. I have it set up with line trace right now and everything works as expected but I am in a third person perspective and it seems I have to get really close and find the "sweet spot" so to speak.
in the first case you'd keep the logic stored within the 'inventory', insofar that you don't need to use the logic if the player isn't holding the item
I think that's the case, at least
the accuracy part ^^ I've also seen capsules rotated outwards, which would solve the treshold part aswell
Hey guys, do you know any good flying tutorials??
This video is part of the communications channel from Daher to TBM operators, pilots, training institutions, instructor pilots, mentors, and safety pilots. The aim is to enhance the pilotโs situational awareness when flying the TBM. At no time does this information replace the procedures within any aircraftโs Pilot Operating Handbook (POH) or ...
I kid
Its good
Thanks xD
I posted the wrong video
This video shows what you can expect to see on your first flying lesson.
More supplemental flight training video's are available at www.askcaptainscott.com
idk if you've seen Reid's Channel
What sort of flying are you after anyways
I think he has tutorials for a jet and heli
Isnt there an example flying project?
there is
I'd love to remake the flight from Freefall Tournament
I (ignorantly) assumed it didnt suffice, my mistake
thanks for the reminder lmao, I did know this was a thing but completely forgot about it
One of the templates , as Harry pointed out
Thanks ๐
there's quite a few classes to keep in mind , so easy to forget any one of them ๐
I think I should be fairly safe to make the main menu be its own self-contained thing
How can you
I gotta should stop procrastinating now
so I can use (what feels like) ugly hack code
Do it!
I saw a reddit post in which the player controller was flying
My main menu is usually it's own level
that's what I've got
but
it just feels wrong
same. With its own GameMode, and PlayerController
thats my basic setup for it anyways
Feels right i suppose
ahA
no good reason
so I'm not alone
It's just cleaner, and controller is best since the pawn is usually not used
Can set show cursor, click events, lock view etc..
do you mean HUD as in the specific HUD class, separate from UMG?
It seems It's not even recognizing my "AnimNotify". How can one fuck that up?
I thought the HUD class was just an old feature from before UMG
Anim notify is unstable ๐ ?
Perhaps it is. But it has some things you cant (to my knowledge) do elsewhere aswell
go on
ok so not anything I'm really going to need
Unlikely ๐
thanks
As I said, I never create it for my main menu
I never create it
period lol
It's nice to keep all widget stuffed in a single class imo
instead of bits and pieces all over the place
that's why I was trying to use that horrible delegate setup
even this?
Almost
I'm not satisfied with my setups yet
but i prefer to let the owner of the widget do the registration
owner being whichever class made the widget
I was trying to put all the actual logic in the menu pawn, and just have the menu buttons announce that they had been pressed
but then if it's just a navigation button like options, then it's the widget itself that needs to be listening
ah
thats how I would do it
you see, I had the menu level blueprint creating the widgets
I avoid the level bp like the plague
If I were to make my own player controller how could o got about it
subclass the playercontroller
Like what if the player gets stuck in a wall
If the player gets stuck in a wall
Can just detect the collision and get the normal to check if wall and if so donโt execute addforce
But the friction
I'm trying position a widget on screen, based on a percentage, but it doesn't work. If I set it to 1/1 the widget shows up halfway down, and most of the way to the right. I'm not sure what I'm missing.
where is the widget anchor set to?
idk if that might affect it
an example of it, reversed. Widget just listens for events
Bottom middle, I can try setting it to somewhere else
If I were to add a force to an object and it hit a wall will it slide down or just get stuck
I was referring to a button widget
that has a click event
I'm aware. Hence the reverse
In unity if a rigidbody gets stuck in a wall so you have to set friction to 0 and use drag to make fake friction
how does that help for a menu button though?
the event comes from the innate functionality of the button
Tried some of the anchor options (top right, top left, bottom right, bottom left, middle) and none fixed my issue. The widget was still misplaced, just in different spots
I need to test these
so I make an event in the menu pawn, and make it fire when the event in the button widget goes?
ohhh yeah I get you now
I was still working on the basis that my widgets are being made in the level bp
also I still don't fully grok delegates/dispatchers so I don't know what 'pass it forward' means
ok that's basically what I had originally
is the alignment changed ?
casting is fine, but I avoid it if it makes sense
Like.. Does it make sense to store a widget in the levelblueprint?
Is it unique to that level?
no
tied to that level ?
well
So then your cast becomes extra work, for no good reason
the main menu buttons are going to be unique to the main menu lvel
My alignment is set to 0.5, 1.0. Changing the anchor doesn't change it. Should I try modifying this?
so kinda
Lol, true, but still
yeah
If you decided to swap main menu level
that's why I was stuck
you'd need to do it again
because the bad option still made too much sense
that may be the reason why its not where you want it to be, change both to 0 and see if its better
honestly I wish there was just a massive list of best practices for every possible thing
And I'm still not getting my work done.. sigh joke, its on me
I agree
that would be great
anyway, thanks for pointing me in the right direction
General OOP practices apply I guess
๐ It's something ๐
Did not work unfortunately, didn't really make a noticeable difference
honestly if Unreal had MATLAB's matrix op stuff it would be amazing
well it at least should appear where you set it to be
I wonder if there's any way to set variables to private as default ..
is it a good idea to save a ref to the player controller or just use a get each time?
Depends ..
up until now I've been caching everything
Do you use it a lot ?
probably not that much
likely insignificant difference then
good
I prefer saving them
while i dont mind casting when it makes sense, its that extra step
over and over
oh if I'm casting then ofc
Figured out my issue. Had to multiply my X and Y by the inverse of the viewport scale.
If you have code you use a lot and it's generally small you can always put it in a macro. That's what it's for
but then I just realised I did mean to cast in this case
I also save it as a reference, it will be cheaper than calling it every time
but hadn't actually so it seemed pointless
I wouldnt put a cast in a macro instead of caching it , but thats me ๐
one other thing, would it make sense to set up cached stuff like that in the construction script?
or is that not what it's for?
construction is risky
How can I Make a derivative of the player controller
things may yet exist
idk what the constructerino is for
This is an example of good macro use directly from the docs
small code intended to be used often
it's ridiculous
Seems reasonable
macro library :kekw:
I should probably use it more
so if you have like 4 or 5 nodes you are going to need to use often, but you don't want to save it as a variable. Macro is your man
But its like.. It's never so often that it feels worthy to use a macro
I do it alot for getting the anim blueprints
Functions a cheaper than macros
just feels cleaner to me
depends
I use construction script for things like setting up an Actor procedurally mostly
As it always does
Macros are needed if additional pins are needed
I don't know about that chief
they both win in clear cases fam
@gentle urchin about the set/get caching thing, I just noticed this
Confirmed my short analysis, perfecto!
yes, pins, latency, enumeration of arrays.
So its just a hidden get inside the set ๐
In c++ it is possible to create additional output pins for a function
Exec pins? (wasn't specified, I know)
yes
There's a reason why ue has some native nodes in functions, and some in macro :/
Some things you just dont want in a function
Specifically because functions are expected to return something immediately
Input
oh sorry i messed up
The
You can create any number of pins using k2 nodes, but it's difficult
How can I get 'Reverse For Each Loop With Break' ?
So I've heard
reverse engineer it
Ill end up with 2 for each loops then
no
If so, there's a pro tip laying around
ok
well, if we disect the foreachloopwithbreak
when compiling, the code from the macro is copied to the place where you call it. and if you use a macro a lot, it's better to remake it into a function
all its doing is setting a bool to true on break
compare it to the reverse for each
all we need to do is figure out where and how to add the break
just gate it
whats the difference between macros and event dispatchers
Everything...
its a two different things
what do they do thats different?
... Everything...
I would start by reading up on both
Macros are just a node graph helper so you don't have to copy paste nodes as much
I would advise you to read the documentation, or look at the examples
ye that will do it
In the MainMenu widget (containing the button)
and where is the event dispatcher made?
because I don't have an option to plug the button reference into the bind
In the Pawn (since thats who wanted to listen to it in your scenario)
im more artist than programmer so sorry i dont understand........
A macro is basically a pastebin for code
While a Dispatcher is a callable event that is executed on every listening actor
I already know about UE pasting the code to the board but I'm pretty sure if they thought it was a good idea to do everything in functions that can be done in a function. They would not have hundreds of these macro nodes
so a dispatcher is a dude ringing a bell, and anyone listening does their stuff upon hearing it
not that many
Might have an easy question. I'm trying to do a map mouse zoom in, however it only does it once in zoomed in or out currently. Why wont it keep getting tranform scale and adding every time I mouse scroll?
Yes, without macros it will be difficult
But I don't understand why they wrote some blueprint macros
If it was possible to do it in c++
dispatcher is closer to the radio ๐ Anyone tuned in on the frequency has the opportunity to react to it
Pretty sure there's more then that in the form of plugins
surely
this is the standard library
True
and i take it a dispatcher is "this event happens" and everything who is listening (in this case "calling" it) does something related to that event?
the listeners are "bound" to it, while the caller is the one sending out the broadcast
What are Event Dispatchers in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
This is a solid channel for learning specific things in ue4
Event dispatchers in a nutshell are amazing
@brittle osprey A macro is a predefined set of code, very similar to a function with minor differences. If you're not a programmer, you probably won't care about the difference and should try to use functions more.
An event dispatcher is like a pager service. You page the dispatcher, and it sends a message to everything that has subscribed to it. You use it to notify multiple objects that something has happened. For example, if a character has a health variable and you have a dispatcher. You would set the new health value, and then call the dispatcher. Then everything registered to it knows that health has changed and they can update. Materials can be changed to be more bloody, healthbar can change numbers and progress bars, hud can spawn a floating damage widget, etc. All from one single actor calling it's dispatcher.
THAT makes sense to me thank you SO MUCH
I remember an epic training video that was like, an event dispatcher is like a Twitter feed...
Actors can follow the feed
Lol
xd
potentially silly question, what would be equivalent to the opposite?
I suppose a Twitter feed is a more modern terminology. ๐
like a secretary who everyone calls
Functions in GameState or similar.
An interface is the closest you'd get
well,
kinda, but not really
The diff is like who has the object reference for the other thing. The object doing the dispatch doesn't need object references to the listeners
a function is equivalently close i guess
caution, dumb question: wouldnt a interface be kind of like an event dispatcher ?
It would, but on a one to one basis
Interfaces are nothing like dispatchers. In a perfect code base, interfaces are actually useless.
I see I should stop talking xD
But a more direct form of communication would be like (for example's sake) get all actors of class and then calling functions / sending interface messages etc
So it depends how you want to set up those relationships
Interfaces are a patch to the fact that we can't insert functionality to Actors or UObject, so we have to have a way to call functions on objects of differing hierarchies. Interfaces patch that issue, but it's still just that, it's a patch.
I mean you're right about the one to one basis 
can someone help me please im stuck๐ฅฒ
Click on that "set world location" link in the message; that's the node causing the error
you are trying to access something that does not exist
Accessed None means you're giving it empty data
Almost looks like its done on tick aswell, given the amount
but it exist
Idk are you destroying the actor before that timeline finishes?
I mean interfaces can have its uses outside of that right? I feel like it gets pooped on more then is necessary. There are a lot of times I feel like BPI's save me a lot of trouble, and are just more neat from a blueprint perspective
check actors for validity