#blueprint
402296 messages · Page 711 of 403
@ornate trail Get the same Array. Get the loop's iteration count. add one, and use it to get a copy of the index from the array.
- ensure that you don't access out of range on the last run
why would you add one? arrays run from 0 to xxx value, only reason i can see to add one would be for display purposes (sorry just asking)
sry not with it, i get it, so that if your not doing it inside a loop you can get the next array item...
Hello. Can I somehow call this "compile gear" from the BP details panel, or by another way? In my case when I am spawning skeletal meshes and assigning to them animations in the construct script by editing exposed variables in editor I should recompile BP in order to put them in the right pose in editor.
During the play everything works as I want.
If you have hierarchy like this
Sphere
Plane
Cone
How would you move cone to center of sphere?
Nvm, was only thinking relative location, i can just set it to the world location of the sphere 💯
@pastel rivet Get scene component world location of Sphere. Then set cone world location.
Hello everyone, I have a question about Distance Grids
I am currently trying to create a distance grid much like the one that you see while putting inside a golf game. The thing is I have no idea currently how to implement it. Does someone have an idea how I can start implementing a simple distance grid? Thanks so much in advance for answers.
@pastel rivetAlso. Just in case you end up in a situation where you can't rely on world location for any reason, the answer is to get Plane's relative location, and multiply it by -1.0. This will get you the reverse of Plane's location to Sphere, and if you set Cone's relative location to that, it'll share the same location as Sphere.
how do i get ride of the target node connection on a UFUNCTION
@ancient kestrel Presuming you're making a static library function, it's just this.
static void MyFunctionName(UObject* WorldContextObject);```
Mostly Meta=(WorldContext="NameOfWorldContextVariable")
thank you
GameplayStatics library has quite a few of them. Things like GetGameState, or GetGameMode are good examples.
Does anyone know how to fix ES3.1 OpenGL ? When i want to change to preview ES3.1 OpenGL and reaches 100% and then tries to load,and then CRASH
Same on IOS PREVIEW AND ANDROID VULKAN
Matinee camera shake is deprecated but I still haven't seen a single person figure out how SequenceCameraShake works
could anyone please tell me how to calculate projectile rotation based on targets location
Hey, quick question, I think this is the case but just to confirm, does streaming levels as in load/unload on trigger overlap save performance during play?
If you overlap it properly, it can save resources, but keep in mind, it wont save the previous state unless you tell it to, and when loading the next area, it may need a dedicated loading screen
What do you mean by previous state?
Hi. Anyone care to help with delegating input mappings in BP?
Does anyone know how to keep the UI on the same place for every resolution
Hey. Not sure what happened, but I moved the file location of my character and now when I press play it doesn’t possess the character. I already have the gamemode and character selected in the project settings.
could anyone help me, Im trying not to use level BP, I would like to use an Event dispatcher, then call it on an actor, but when I add that event to the actor its bringing me to level BP, any alternative not to use level bp ?
I just want to avoid using level BP, my teacher told me That should be used just for renders or cinematics
Hello! I've been working in Unreal for a while but I'm new in blueprints and programming stuff.
I'm trying to create a blueprint that detects when the Player is affected by a Spotlight, in other words, I want to use the Spotlight as a trigger, but I can't manage to do it. Can anyone help me please? Thanks in advance 🙂
Could anyone help me with a construction script to help me add trees randomly to my island
Thank you very much
hello . Can someone help me figure out why i cannot create a custome event in widget blueprints inside a function?
you can't create custom events in functions
You can call a custom event from a function tho
Does anyone have any idea why my UI widget doesn't update binding on tick ?
I have binded 4 text boxes but none of them update on tick and just stay as blank text.
Sounds like #umg
Also sounds like what they're bound to is either empty or invalid
I print the output in the tick method, the binding is the same variable
I am taking the current time and formatting it to text then binding it.
question, when creating a main menu soundcue that plays randomly with loop attached to it, how am I able to create fade-in and fade-out instructions for it?
or is it better to use audio program to make the fade, rather than using something programmed in ue4...?
and the print in your tick shows the correct value? is your tick and printstring in the same UMG? How do you Bind it - can you share a screenshot?
Sure thing.
This is the function, Its binding through a textbox in UMG
In my Tick, I print it to a chatbox. The last part is the days binding
and no warnings/errors in output log? and the nodes in your tick/printstring are the same like in your function?
Hello, for spline meshes does anyone know how to bypass this issue here? Where the spline mesh is smaller than the current spline length
Same thing, no errors. It just doesn't seem like any of the bindings are updated on tick
I added the function to the print string and it has the same output. The function returns the correct string but UMG does not update or refresh. Is there a way to manually trigger a refresh without having to rewrite all the binding functions to SetText etc?
i would test 2 things - make the return value static for testing to see if that text gets put into your widget on start (disconnect your nodes before and enter some test string). also check for isValid of your playerController - maybe it's some wired raceCondition and after it fails to get the PC it skips the binding.
I'll give it a shot
ah - and maybe try to start in "standalone mode" - I had an issue with not getting my subsystem correctly while in PIE
No luck D:
thats strange if it is not setting the text even with a static result...is the widget used anywhere else and maybe a setText is called on it?
this does not work?
I figured it out, for some reason the font is broken. I reset the font to default and that fixed it.
I dont remember setting a font but well glad it was something as dumb as that not me going insane
😑 good to hear 😄
I tried the SetText on tick and still did not work, glad to see I am not crazy. 😒
Heyo, ive got a question for ya'll, i've been trying to find a way to set a new camera as the default one for my game, but have had no luck with it yet.
trying to make a static tetris-like camera, but i can't get it to be the set view on begin play for some reason
help
found it
blend view target?
You need to play with the tangents in the spline. Worst case, use a T connector or something else.
I'll have a try thank you
Trying to find out what menu a widget is in... this was apparently not it 😆
top level seems to be user widget... not the whole menu class
Hey! Could anyone give me a hint on how to implement mouse pointer sensitivity ingame?
I'm not talking about making the movement of the camera faster, but the speed of the pointer. Thanks!
I hope this is the right place to ask this.
I'm setting up a combo system, but if a player smashes on the attack button after the first loop it gets messy and the character just does attack 1 and attack 2 over and over with a very rare attack 3.
What can i do to prevent that behaviour and get a crisp 1-2-3, letting the full length of 3's animation play out before starting the next combo.
If you're talking about actual mouse cursor DPI, that's up to the mouse/OS settings to decide.
@grave hornet you beed to make a buffer system.
Basically set up a boolran with a timer countdown. If the countdown expires, the boolean resets. If during that timer the input is pressed go to the next timer and so on.
oh, that would keep me from caring about any button presses between discreet attacks, i guess
will try
Yes, I was talking about that, ok thanks!!!
is there anything builtin unreal to distribute vectors on a 2D plane (or even better on any kind of shape) evenly?
e.g.: i give it a shape like a hexagon and say i want to distribute 10 vectors on it, do it
blender has something similar
@amber dragon That is not a Blueprint question. Please re-ask it in #graphics or #animation
Please also read the #rules and #more-resources.
Thanks.
sryy
👍
So I'm working on a simple physics based projectile, but unfortunately the projectile's speed and size make collision testing unreliable and causing it to phase through both walls and the player at times due to how fast it travels. I've been trying to set up a ray trace to check if there is an overlap between frames, but I haven't had much luck with that. Anyone know of a good system and/or way to implement the ray trace system?
My first thought is to use the speed variable to calculate the length of the raytrace, but I'm bad at math and have no idea how to do that
Also I've tried a projectile path trace and while Im sure there is a right way to make it work for my purposes, I haven't found it yet
Have you tried using CCD? @midnight wedge
check Use CCD under Collision category advanced tab for bullet.
Do you think this is useful for melee hit detection?>
My melee system is leaving a lot to be desired because it's so framerate dependent and there's no fixedupdate
I don't know, It's up to you. physics can be frame independent using substepping. just enable it in project settings and see different.
Yeah
But you cant use substepping for line traces
at least not in BP
right now im tracing the weapon arc with sockets
but obv if the frames go down the trace isnt too accurate
I thought CCD was primarily for physics sim like u said
but if I could trigger hits with it that'd be cool
line trace is continous already.
i would just linetrace when you pull the trigger, calculate delay based on distance + bulletspeed and fire the hit event when the delay is done
CCD will help to prevent fast moving physical objects passing through other objects.
could also take the hit target velocity into account, and redo the linetrace if it would move out of the hit area
unless you need 100% accuracy that should work
Your blueprint was about bullets and now 😅
I don't think you need CCD for this. How about sphere collision instead of line trace?
Just like, not very accurate is it
Box collision?
I mean one school of thought is to make custom colliders for each attack
and just do an overlap like youre saying
what's nice about this system is I do know exactly where a hit happens for example
spawn particles there etc...
That would be very expensive. I think you need to enable complex collision as well otherwise only a simplified collision is used.
might be one of those things where you just kinda shrug and hope frames dont drop
but I don't recommend you doing complex collision. a box should suffice.
how come?
can skip over the overlap between frames
but your animation is not that fast. and CCD would help if you have like 10 fps!
but who plays a game at 10fps
yeah
probably better to just try and make the framerate good
but I know that its possible to do it in real time
because Mordhau does it
I just cant figure out how 🥲
Yeah you should try rather than speculation
I know. sorry 😄
I think maybe with some CPP i could run traces on substep
but havent delved into that yet
Yes, I think I saw that too. to tick with substep
Me neither
How many of these are going to be in your game?
My engine keeps crashing when I try to have one client join another client's session (UE5 Beta)
like, attakcs?
You should find balance between performance and accuracy. with more accuracy comes more computation.
weapons?
I mean how many players or AI are going to use this system
Yeah, so what ever you do, roughly the cost is multiplied by 20 😄
yep
plus all relevant AI
but yeah
in mordhau they have teams of like 32
all doing real time tracing along the swing
so its possible, but technically challenging beyond my ken
Also one thing comes to my mind, even with substep, I don't think your animation would substep, or would it?
probably you need to tick for every frame of the animation rather than substep
well there's more animation frames than game frames if the framerate is below 60
this is accurate
Yeah, but substep is for physics. I don't know if it works for animation or not. (it probably doesn't)
🤔
unfortunately notifies only trigger on game frames
I havent learned a way to trigger on animation frames
if those are even running
this is fine tho, this would definitely hit. also you can try sphere trace for example if your weapon has larger width to it.
to simulate low fps go with this command t.MaxFPS 20
and set it to 0 to reset to default
yeah hahaha when I do that
I get like three points
This might help if there is no other way to make animations tick more. https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/AnimationBlueprintLibrary/Pose/GetBonePosesforFrame/
Get Bone Poses for Frame
so basically you do the substepping your self for each tick
But I can't find it!
How can I sync changes made to a component in actor's constructor (in C++ code) with a blueprint?
Let's say that this is the initial constructor
AMyActor::AMyActor()
{
PrimaryActorTick.bCanEverTick = true;
MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
RootComponent = MeshComp;
}
, and I create a BP based off this class.
And then later I modify the constructor like so
AMyActor::AMyActor()
{
PrimaryActorTick.bCanEverTick = true;
MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));
MeshComp->SetCollisionResponseToChannel(ECC_Pawn, ECR_Ignore); // <<<
RootComponent = MeshComp;
}
But the configuration of the mesh component in the BP does not change.
@brittle garnet if you are hot-reloading, that may be your issue.
I'm trying to cast a ray based on the input direction relative to the character and the camera and I'm not getting it right it seems
This is what I get. The ray seems to just point in one direction, regardless of the input or character/camera direction
@rotund pilot Start = Actor Location, End = Actor Location + Direction (from camera) * Distance
Thanks! I read up a little on HR/LC in Unreal. Recompiling my project from IDE with the editor closed fixed my issue.
@brittle garnetyeah, hot reload is known to cause such issues.
I feel like the logic I have is already doing that. Not sure what part of it is wrong
Don't work with blueprints based on hot reloaded code. At some point it will corrupt your blueprints and waste you a lot of time (ironically it's supposed to save you time) I personally never use hot reload or live coding.
@rotund pilotit isn't. You are not adding the actor location to the End location.
In other words, you are only using Direction vectors for your End location, which is what causes the issue. End location should usually be Start Location + Direction * Distance.
Im trying to save this Widget object reference. but it just wont save it. I have no clue why?
Thank! In essence, that's what I understood from the community wiki article I found. It's a bit of a wrinkle in the workflow, but nothing major for me. 🙂
Okay I tried that and it is still stuck in one position
Doesn't change based on input
@rotund pilotstill wrong. It has to be Actor Location + Direction * Distance. Sum and multiplication are not commutable, the order matters.
So do Direction * Distance and then add the Actor Location to it.
This is what I get. It's a lot closer to what I'm trying to do but the angles are weird
I think maybe the camera's pitch is causing it?
god damn inheritance 
I'm trying to do this on BeginPlay:
right
I wanna get a thing from my third person character, and put it onto an actor
problem is
it only works once my third person character has that thing too.
So i gotta do dumb shit like this to make it work 
and add a delay.
Is there a way to make this more... elegant? And not scuff it with a delay?
Yep it was the z value of the GetForward/GetRight function. Thank you @atomic salmon. Thanks for the content on your channel also.
@rotund pilot great! You are welcome. 🙂
🙃 I do wonder what would happen if I press compile now...
you can fix using event dispatcher.

Assuming at some point in your third person character blueprint, you set this widget variable, call the dispatcher.
It's not an interface, it's event dispatcher.
or that
do you have solution with interface?
wouldn't an interface work too? 
idk, i got an interface already implemented...
so that way i'd just have to add a lil "initialize the thing"
I don't know how to fix it with interface.
and something like this in your other blueprints
Now that I thought about it that might be a better and shorter solution. 😉
What is that even for? Why create a widget until you need it?
Hello there, maybe someone is able to help me out on an issue that has been bugging me for a while
So I have set up a bow and arrow logic (Third Person) and the camera is set up that its basically seeing over the players shoulder while aiming (HUD is fixed and centered)
I am using a transform for the arrow with a projectile movement which uses the look at rotation of the "Muzzle" and the Hit Location of my line trace which originates from the camera
It all works perfectly well, but now I am working on an ability which is a pierce shot, so the arrow goes through multiple enemies
Issue is: As the bow has an offset from the camera, the arrow travels obviously from an angle, but I cant figure out how I can correct its path
I tried readjusting the rotation on the first overlap with the last impact point of my line trace or changed the velocity of the movement component, but these things didnt work... any idea how I could overcome this issue?
I would have just gone for the look at rotation between Muzzle and End Hit, but this causes some issues when the first target is too close and the player misses that shot as the arrow passes by that enemy
Here is an illustration just to clarify... appreciate any help 🙂
You want the arrow to change its direction when it hits an enemy?
Basically, yes. So as of now the arrow follows the blue line, but what I would like is that after its first hit, the arrow should follow the red line
But the arrow is a projectile right not a linetrace? And the target might also be moving
so the initial direction of the camera won't be the same when the arrow reached its target
You might be able to set the direction of the arrow depending on to the hit normal but that's a dirty workaround
I have a line trace from the camera when the arrow is initially shot, if no target is hit, it will just use the end of the line trace for its direction
But if an enemy is hit, it takes the direction as illustrated
The idea was to take the same line trace values from the inital shot to adjust its rotation to account for the offset
What I would do is to probably move the camera to the shoulder of the player parralel to the muzzle direction
(When the player is aiming)
So there wont be a need to readjust the arrow's rotation
How about moving the crosshair to the side?
Yeah I also considered that but I was not really satisfied how it looked with the characters animation etc, for which reason I was trying to figure out this alternative approach
You mean just aligning the hud with the offset of the bow? Not sure how that would look as I have a small hud just indicating the center of the screen while not aiming for interacting with stuff
I think TheAscent had that issue too, sort of
But different, I was of course not the one fixing it
Or at the very least you could make the arrow spawn from the camera not the bow itself, not sure if your game is fit for that but it's an option
With a bow and arrow its kind of weird as you see the arrow travelling in my case, I could use some sort of "decoy" mesh that spawns from the bow but the actual projectile spawns from the camera, might be worth a try
Yeah, many games do that especially if they're competitive such as csgo. When you shoot a gun you see a "bullet" travelling but it's just a particle effect and the actual shot is a raycast.
Overwatch did that for the stun grenade of the cowboy
They throw a mesh from the left hand
But then spawn and "throw" the actual grenade from the center of the screen
You don't really notice it cause it's so fast
Note that if you spawn the projectile from the camera in a TPS game if an enemy is too close to the character it will be obvious
I think I will stay with the logic for single target as I have it right now and just use the decoy method for the ability as it will use some sort of vfx and most probably hide the transition between the two
I think the best option would be to move the camera to the shoulder
People shouldn't be using bows in melee range. O.o
But they will
Unfortunately Ive had the brilliant idea that the player is able to use the arrow as some sort of meele weapon when the enemy gets too close, which leads to the issue that its very likely that there will be such cases that they stay way too close while aiming
What if you make it so the character will automatically attack the enemy as melee if they're too close
and not give them the option of aiming the bow
I mean. I'm all for programmatical solves. But as an avid gamer this is also a player issue. If you want to pierce things in a straight line, don't offset aim at things close to you.
If you're a bad player, use something that bounces arrows off of targets.
I am always hesitant to remove players abilities in some certain scenarios, would require some clear indication
There are lots of ways to solve this and it's a matter of game design, you should probably choose the best one that fits in your game
What works for one game doesnt always work for the other
Definetely, yeah I might give my current solution of changing the rotation of the arrow a few more tries, otherwise I probably just switch over to spawning the ability from the camera. Im investing way too much time in such a minor thing which most likely no one will notice anyway
Anyways, thank you all for the helpful inputs, appreciate it
You're welcome
I am trying to create a widget in the top down template but even though I can interact with the buttons/etc just fine, the "Get Hit Result Under Cursor by Channel" node keeps firing so the player is interacting with the world unintentionally. Set input mode game and UI isnt working either. Is there a better solution than to use like an switch on enumeration to turn it off?
If you don't want to be able to interact with the world, you set input mode to UI only.
https://media.discordapp.net/attachments/680224059501314064/877533077394559016/unknown.png
the first code is to spawn actors that saved in game instance
the second code is to save the actors transform and class in game instance
the idea is the player when resets the level the same stuff will be in the same place that he left it in
but for some reason it doesnt work
maybe im messing it up, but it still doesnt work. I think its because there is actually no input, so the only way to be to remove the cursor or something? Forgot to mention that its on an event tick
As far as I know, the Game Instance is spawned anew each time you play, so it shouldn't be the place to save these things.
isnt the idea of game instance that the vars in it doesnt change when you change levels?
In that case you have to give it a condition that you can toggle. If the widget is open, change a bool to false and don't let the event fire.
and i save 17 other vars in game instance and it works
but for some reason this one doesnt work
Ah, between changing levels... yes, I would expect it to work for that. 🤔
what other stuff can make it not work
like its just getting all the "0_cup" and adding it to the game instance
and spawn them back
they dont even spawn
yeah thats what im gonna do but it feels like im doing more than I should
I've attached a ProjectileMovement component to a Cube practicing making a simple rock throw in first-person
I can't seem to get the thing to lob forward in the direction I am looking at
Am I missing a step?
Lets say i have 3000 boxes that change size simultaneously (Same size, size fetched from GM). Would it be more optimized to use a parent class for that box to fetch the size variable? or wouldnt it matter performance wise?
It's getting it from a different actor, it makes no difference whether the function that does it is in the current class or its parent class
Most likely the action of getting the variable is the least expensive part of that whole thing, to the point that it probably doesn't even matter much
can someone help me to get the spread to a round shape: https://giant.gfycat.com/CluelessFittingBurro.mp4
@runic terrace Managed to get it to work with my initial logic. Seems like while the projectile is moving, it does not accept any rotation. So at the moment when the first target gets hit, it stops the movement for a brief second (which is not noticeable ingame), rotation gets set to align with the initial line trace when the arrow was fired and afterwards I just add the velocity via the forward vector
Not the cleanest solution, but it works for now. At least the adjustment of the rotation only gets fired on the first enemy hit and when the ability is actually used, so it not that often fired
https://media.discordapp.net/attachments/680224059501314064/877533077394559016/unknown.png
the first code is to spawn actors that saved in game instance
the second code is to save the actors transform and class in game instance
the idea is the player when resets the level the same stuff will be in the same place that he left it in
but for some reason it doesnt work
oh great
The problem might be that you need to save the actors when the game is closed not when started
Oh ok no just got what you're trying to do now
Are you trying to just reset the level to its initial state?
im using it to save between levels
the idea is that it saves the transform for "0_cup" and when restarting the level it spawns them at the same transform
Why not save the transforms before the restart occurs
And then load it right away when level starts again
you mean like event end play?
end play is when the game is closed
oh really?
anyways
it saves every 3s
and when the level is restarted it spawn them
when does the level restarts? if its with a button then you can just hook it up to that button
This is what I use, Vector should be the forward direction from the gun where you're aiming, Deviation X and Y just set it to a random value within the deviation range you want
my problem that it doesnt work, it saves but doesnt spawn anything
w8 lemme look at that bp again
You're saving actors as objects
save the class of the actors
not the object references
When the level restarts the actors get deleted and the object references become invalid
You need to save the classes of the actors
If you want the properties of the actors to be saved as well then you need to save the properties additionally and set them when spawned
You're welcome
ahhhhhhhhhhhh
atleast it works
tysm
gives me also a square pattern
is there a specific way to make a specific actor ignore collision with a specific actor?
Use trigger box?
with your method:
I don't get it, I used a Box Collision with a Cube as its child. I can't get it to ignore a specific actor still
@odd veldtUse a pitch value for your actual spread variation. Randomly select a number between -180 to 180. Make a rotator out of that from Pitch and roll. Rotate your forward vector by it. Should work.
^ this
.
This for instance will randomly spread your forward vector in a circle by up to six degrees.
Er
@odd veldt This rather.
Yaw should be zeroed.
this gives me a quare pattern i want a round one
What I just posted definitely should not give a square pattern?
Yaw and Pitch should be enough. You won't really see any "Roll" or?
yes, because the forward vector changes all 3 values with the look direction
I'm having trouble with figuring out where the cursor is aiming. I use a simple raycast towards a vertical plane, but if I then put a point there, it's in the wrong spot. In this screenshot I clicked on the place of the black dot, but DrawDebugPoint gives me the position of the pink dot below it. What am I doing wrong?
This is the Blueprint for the raycast
(When I eject I can see that the points are in the correct plane, at least.)
Hey is it possible to make a attack only available during a certain few frames of a animation?
it looks like this if i skip one value: https://giant.gfycat.com/PerfumedHorribleCavy.mp4
Hi all, I have a question, can anyone guide me to seek tutorials on how a player can switch between roles in a game in UE4 if they are playing against an AI?. For example, if a game is cops and robbers, I want a player can be able to choose which side they are on in the beginning of the match, like if they choose to be cops Ai is going to be robbers. And vice versa in the next match. Also is there a way to randomize it? Thank you for the guidance.
look up anim notifies
Hm, not sure that helps but you could try "RandomUnitVectorInConeInDegrees"
This should work
That is weird. I swear I've used Rotate Vector for that before. :/ I could have also been dealing with pure local vectors though. I ended up with this.
You're rotating around world axis not local
ah w8 no
There was a node like that?
Damn I missed out
Thanks, this was it, now its round: (is it possible that you are the exi from the level-designer.de board)
This should do the same though
No, I'm not on that board
I think one of the differences is how the rotations are applied
i mean mappingbase.de
Could be that RotateVector does it in one go
That would be correct
Yeah I think the difference is how you are all calculating these vectors.
Authaer is first rotating it around Up, then taking the result and rotates it around forward.
That should be a different result than what "RotateVector" does.
Interesting, has RandomUnitVectorInConeInDegrees new in 4.26 or something? 🤔
If it actually does that thing then it seems pretty handy, must've completely missed it somehow if it's not new :D
Don't know, I was looking for something to fix their problem but then this popped up
Note that the method you currently use has a strong focus of points in the centre: it's not evenly distributed over the surface of the circle. If that's desired or doesn't matter, then fine of course, but if that's not desired then you need a different implementation.
Looks like there's a japanese UE4 related article mentioning the C++ version of this function from 2017
so I'm gonna say it's not new :D
or I just assumed that a game engine powering lots of shooting games wouldn't have such a function which is definitely unnecessary in shooting games
lol
Its in 4.22 (its the oldest version what I have installed)
I'm trying to smoothly translate a meshcomponent using VInterp to Constant but it's as if I'm not using the node (jumps to new location)
the new locations seems to be correct but again, it's not smoothly translating.
Are you calling it on tick?
@earnest tangle it's just an event that gets triggered when the player presses a button so no, I don't.
also you seem to be translating the forward vector which is not the position of the object
right - so the interp is not like a "fire and forget" thing which automatically interpolates something to a target
If i'm not wrong it still does the job (moves the object forward a little bit which is all I want"
you'd need to call it over time until it reaches the target
so I'd use a while loop?
well it does the job but it doesn't do it the right way unless you call it with the correct parameters
Use tick or I think an ease node can also get the job done
Overkill
a while loop does not work because a while loop runs within the same tick
calling it on tick, or from a timeline, are the two options that would make it work
^
@zenith trout and an ease node is a "fire and forget" node?
Good Morning everyone, little help please? all I want is the Month a date and current year (But it cannot be before today)
Don’t take my word for it
I’d go with tick or a timeline
I haven’t used the ease node before but logically it probably wouldn’t work as the value would still only be set once instead of every frame as it interpolates
I'd have to set a boolean flag so that the event isn't called all the time right? So I'd just do something like this?
Ease is similar to VInterp in that you'd need to call it several times over time
oh, nvm I can't even call the event.
how would something like that using tick look like though? Would I need an additional flag?
that's the only way I've ever worked within the tick function.
A flag would be one way to do it yeah
Depending on how your actor works, you can also turn tick on and off
how would you do it without one?
My Actor is based on a custom cpp class but I don't know if I should be turning tick on and off just for my "animation" to run.
you'd need to have some way of determining whether it needs to be animated or not, so a bool would probably be easiest way to do it tbh
the other option is using a timeline, the timeline node will run similar to a tick
gotcha. Thanks a bunch
Messed up how?
The Get Year node will get the year value from an existing date time, so it probably doesn't return anything very useful there
The selection list in the Force Feedback Effect is not appearing . Can anyone tell me where did i mess up
trying to select fire material from the list but the list is missing. I'm noob and need assistance
Do you have a force feedback effect?
You're saying "fire material" which confuses me a bit - force feedback effects are not materials
ho ok i don't know the terms but i'm not able to see any items in the drop down list to select from
So are you actually trying to spawn a force feedback effect? (as in, something that causes gamepad rumble/feedback effects)
or something else
yes
Have you created a force feedback effect asset?
what should i do to resolve this
no
how should i do that
right click in content browser, under miscelanerous you should find force feedback effect
ok will try . thanks
@earnest tangle I tried what you had suggested. The sword does not get set back to its original position but I can't figure out why.
Why, no matter how hard I try to clean up the zero field, does it always give it to me as populated?
the float is from the timeline
@pine roost because you're not "cleaning" the value at index 0. You are removing the item at index 0.
you will get a value until there's no items left in your array
it would probably work better if you use the timeline float as a value between 0.0 and 1.0, then use it with a lerp or such to lerp between the start and end positions
this way you could have the timeline go up and down to have it first move away from start, then back to start
that's exactly what I want. I'm currently just having the timeline go from-to: 0, 1, -1, 0.
is it because of floatpoint calculations that it doesn't get set back to the original position? the math seems correct to me. Just curious.
It's probably because the rate at which it gets called varies by framerate and such, so it ends up doing slightly different amount of calculations per direction, so the overall movement doesn't match
That's why it should work with lerp if you just save the start and end positions into variables, and lerp between the two
@earnest tangle this way the sword just goes into infinity. Timeline: 0, 1)
OK thanks. Is there a clean way to reset the vector so that we have no more elements?
okay heres my dilemma,, i want to pull the current year and subtract 1
if a reset vector is (0, 0, 0) to you then just overwrite the element with that.
the calculation is wrong, you're treating directional vectors as positions again
Also with this method, you'd need to use set actor location, not add offset
(either set local or world should work)
@earnest tangle i'm still not able to select an asset in Force Feedback Effect after trying the above mentioned options
It works in general but the sword just stays at the new location.
that vector I need to create the list of elements of numerical value largest to smallest. So in order not to interfere with the calculation, it must be empty.
@midnight ravine is the sword actually attached to the player in this case?
can you show the feedback effect asset?
okay, so I think it would work better if you set the sword's local position, and make sure you use the same location in A, your current method changes the A position if the sword moves, so it doesn't return correctly
@pine roost if you can rule out that there won't be a vector with 0,0,0 in your data then just check against that when you do the calculations. Or instead of replacing the value with 0,0,0 just replace it with something unrealistic like 999,999,999
is this the thing that i was supposed to do?
Oh, sorry maybe I was unclear
you can also do it by clicking the add/import button there
click it, go into miscelaneous, choose force feedback effect
this should create a new ffe asset which you can then modify and also select from the spawn node
Anyone know how to get a simple text body from a url and then save it to a slot . Then recall it to a widget UI? Anyone ever seen this?
did this step . will try again after restarting the engine
Ok that's fine for me as a solution. Thank you very much 🙂
I am working with instancedStaticMesh.
Generating them in a random position in runtime, I would like to perform a check on collision with other objects, so as not to create them if there was an overlap. Is there an effective way to do this?
@earnest tangle not really working well. I'm saving the current position before heading into the timeline but
a) the sword keeps turning in the original direction even when the player rotates while the timeline is running
b) the sword still doesn't set itself back to the original position.
c) using SetRelativeLocation yield weird results
I probably misunderstood you on some part.
the engine can handle that for you
But I don't spawn, I create an instance
@pine roost won't you want to spawn the instances at some point though?
but from what I understand, that knot is enough for me to show them on stage. And so it happens.
Instead I should interact with the individual actors of the instance and go and check the collisions of each of them
yeah this is why it would work better if you use local position instead of world, because then it won't matter if the player moves
also the set actor forward vector will return the forward vector in world space, so if the player turns, that also causes the result to become different
in local space you can also just use some vector like 50, 0, 0 or whatever as the target position since it just moves in local space
I'm attempting to create a function that creates automatically resizes a collision box to encapsulate all of the spline points inside a spline. I was able to code something that gets close, but I wanted something more precise similar to the Bounds.Encapsulate function from Unity
Btw, I just need it to adjust the X and Y(length and width) of the box. The depth is handled separately
Is there a on collision touch event that I can assign to a mesh with collision? So that when it touches something, it executes code?
@brittle plinth AFAIK no. Add collisionbox to your mesh and use the OnOverlap event from the collisionbox.
I don't know what to attach my weapon to. Currently, when the player looks around the weapon starts to look weird. What is causing that/how should I attach the weapon instead? I'm currently attaching it to the capsule component of my player.
Alright thank you!
I believe the standard is to parent the weapon to the camera or a spring arm attached to the camera. It's so that the weapon follows the camera (head) movements
Attach it to the mesh and set it's parent socket
I had done it just like that (attach to socket on mesh) but the result is the exact same.
Check that it's not using pawn control rotation. I don't think it should be able to. But check
Yep it's not able to.
the pawn itself:
The usual method is to attach to a socket on the mesh.
I can do that.
You shouldn't really be using the pitch
Only yaw
For pawn itself
For spring arm, you can use the pitch
if using yaw only the sword stays put.
Yeah. The pitch of the sword should be set another way. Either from aim offset in anim BP or attaching to the spring arm as suggested earlier
gotcha
If you inherit pitch on the pawn and look at it from a third person perspective, you'd see the character rocking back and forth which is usually not what you want
How can I stop a sound I previously made Using Play Sound at a Location?
does the construction script run in packaged games?
im having an issue with actors i spawn in a construction script disappearing in the packaged game
Use Spawn Sound at Location, then you get the sound component it creates for the sound, and you can use that to control it afterwards
Yeah I just figured it out! Thank you!
do you know how to make a camera shake?
You can find plenty of tutorials on Youtube. Search for it and you'll find plenty.
I'm using these nodes to call a function in another actor blueprint. It works.
But now I have stored the actor in a actor variable but I can't call the function from it. What am I missing?
Picture of the variable
Is there a way to remove those "Reset to default" things ?
Or at least do a double check if you really wanna reset it ?
I feel like one click could destroy too much work 😅
Your "Target" variable is only of type "Actor" which isn't specific to your BP. You would need to cast to your specific BP type before you can access the functions / variables that it contains.
Huh. How can I do that? I tried some searches in the list of variables but I found nothing.
Drag off from your "Target" variable and type "cast" as well as the name of your BP, so if your BP is named "Door" do "cast door" and you should get the node that you need.
You do NOT want to spawn actors in construction script. It's a bad practice that shouldn't even be possible
Works like a charm! Thank you!
why ?
Because the construction script is run every time the smallest change happens to your blueprint in editor. Changing variables, dragging the actor in the level, simply clicking the compile button.
You normally can't call the spawn actor node in the construction script but it is possible to bypass that by wrapping in another function
doesn't it resets itself? I think I fund why one of my blueprints has an ever growing array
The side effect is that you can potentially spawn thousands of actors without knowing.
@fallen glade use BeginPlay instead. That's probably what you want. EXCEPT you need something to happen before runtime (before you can interact with the world as a player)
Yeah it does but the actor is spawned anyways
I see, thank you for the explanation!
I'm already using begin play, what do you mean?
Yeah and the array issue too is there also. You're lucky you caught it quickly.
mb wrong @gritty aspen
well thanks to you haha
You can clear the array before doing anything else in the construction script. That's what I do
Okay well I found out that's it's not an issue with my construction script but an issue with my actor
nice
Yeah. Wasn't really addressing that issue. I was giving you some advice.
Yeee
So I have visibility variable. Is it possible for me to check if the visibility is visible, and if it is, it will set the visibility of something to hidden..?
I hope that makes sense lmao
Quick question, in editor how do you teleport/move the far away actor to the location you are pointing at instead of dragging the pivot
You can right click choose snap object to view, think that should do it
there might be some shortcut for it too but not sure
Could someone explain to me the error in my logic please?
(This is a blueprint component)
1 - At begin play collect owner
2 - When given the command, add a static mesh to owner (works)
3 - When given the command, remove "mesh" from owner (triggers, doesn't destroy the mesh??)
Can't really say just looking at it, it seems like it should work
The one thing that comes to mind is that if the false branch triggers multiple times for some reason, it would cause you to get multiple meshes and "lose" the earlier ones
the question is why do you want to add and remove that component
no, I'm printing whenever it enters
:/
So does it enter the remove branch correctly?
yeah and the destroy component fires
@earnest tangle based on what he said, yeah but his component isn't destroyed
and it remains visible despite being destroyed? 🤔
again though, why destroy it?
why not?, one thing less to care about
:/
Just as a test, try changing it to invisible instead of destroying
I don't think that should make any difference but it seems kinda weird destroying it wouldn't get rid of it
that works!! 😮 why?
haha lol I'll keep trying
thank you !
maybe not garbage collected?
Yeah, although it seems a bit weird it would affect it in that way 🤔
I guess you could try destroying it, and then clearing the variable so it no longer has any refs to it
just tested:
works as intended.
oh you know what
might be because component tick was disabled
he is disabling tick but you need tick to progress in the bp logic
I don't think tick should affect destroy
disabling it would just stop the Tick event from being called
a lot of things are on tick, like collisions. If you disable it, there is none detected
Tick is fine, might be because I try to remove the component from a component?
ah there it is
but my components share the same owner
so your component is part of another component?
says so in the tooltip, can only be called by the owner
that's a bit annoying, oh well thanks guys!
np, but your logic is very odd to say the least. Why disable the tick? Why destroy the component?
Hm, I guess it could be with components... you can disable actor tick and they will still collide etc. just fine
I haven't really tried disabling component tick much so not sure about that :)
that owner aspect of destroying the comp is interesting
I wonder why it works that way
my brain works in mysterious ways. Basically I'm adding a box mesh that I use for some shader thing, I need to update the box each tick to fit the actor bounds, then when it's not needed I want it to go away
and doing it as a component so it's plug and play
Going to guess to avoid the pending kill error. Imagine you kill a process and that process is still trying to do something. Pending kill!!!!
Might be yeah
If you're using the box more than once, you can simply use activate and deactivate component. I'm sensing micro optimizations here
^ pretty much this
and resizing on tick.... that's kinda weird
and disabling tick before destruction... why?
just kill it
it's actually disabling tick on self, not on the destroyed comp
does that impact performance? I mean having disabled components?
Someone please help me been struggling with this for a week. I need to create a local database with Structs + savegame instance . Still very new to unreal but learning fast. I need to be able to call a url then convert string to text. Save that text to the database mentioned earlier with Structs + savegame instance . I been using Varest to pull the text from a url. I cannot for anything get this working. Please please help? Does anyone have an example project that does this? Can you share one so I can see the logic? If this helps this is the text value I need from https://www.coinexplorer.net/api/v1/DASH/circulationSupply . So I need to pull the valve “text” from the api and save it. Then be able to call the saved value to a widget blueprint. If someone can help me. I can pay a reward in litecoin, Bitcoin or etherum. Thank you
I need the box to be the exact size of the actor bounds at all times, including animations
Not as much as if they are enabled. Still cheaper than creating and destroying components at runtime
but that's a one off, piling unused components doesn't sound like a great idea
yeah cause you will trigger massive garbage collection later >.>
didn't think about that
just disable them, they will do nothing at runtime and if you need em enable
I'll do that then thank you guuuys much love 🙏 ❤️
How many boxes are you using? Over the lifetime of the actor, is that box created used and destroyed more than once? If 1 to the first and more than once to that second. Activating and deactivating the component is better.
yeah more than once is for highlighting purposes !
Yeah. Activate and deactivate is better. If you're really concerned about performance (which isn't very even significant in this case), you can even rework your shader to avoid using the component at all. I may be very wrong here but I think a Fresnel node can give meshes outline of a certain colour.
Why am I not seeing components added via Blueprints in the details panel of actors when pressing play in editor? There should be a component here!
I would think its because its some sort of a static view
Dynamically added stuff never showed for me in the details panel (altho i never needed them there either)
It would be so great to get an instant visual confirmation 😦
I suppose it could have its benefits. You could expose it as a variable that is instance editable variable and get it confirmed that way
Right, but that's so extremely limited... I mean, the components have their own variables that I want to check in on!
Hmmmm
Cant you check the component itself?
I was pretty sure one could...
Havnt touched a project in a few weeks so dont recall properly right now (vacation mode hit me hard)
Yes, you can open the blueprint asset and then check the drop down list to see how many are active, but it's not an easy thing to deduce, and then you have to add watches manually, etc, etc
Doesnt sound very intuitive does it
No 😦
Is there a "register component" function exposed in bp?
https://answers.unrealengine.com/questions/372595/uproperties-and-dynamically-created-components.html This is what i found related to it
Done in cpp, only diff i see is the register component...
But even then there's limits to it
You just add the component.
Right, but it doesnt show in the details panel as eobet pointed out
Yeah. It wouldn't. It's not a variable
The ones that show in details panel are explicitly UPROPERTY variables.
Technical explanations like that doesn't improve the UX does it? 😛
Sorry! 😬 But thanks for the info! ❤️
So, why isn't Blueprint nativization talked about more often?
Because they got rid of it in UE5?
I was unaware of this. That's.... frustrating.
Using it was frustrating... it was a horrible, buggy mess for only a potential 30% speed improvement
But yes, it's sad that they abandoned it instead of figuring out how to improve it (which I bet they tried, but still).
?? Never had issues with it
Debugging in C++ is getting the better of me between compile times and editor restarts.
As long as your bps are not overly complex nativization works pretty well.
Like loops with multiple entries or nested loops may cause issues.
But simple things dont
Nested loops, from my understanding, are one of the biggest performance bottlenecks for BP
Depends how you make them. Unless it is a 3d grid simple chain loops should be fine. And if you run them on tick just use a modulo frame skip
Recently I've been trying to convert my rollercoaster track mesh generator from BP to C++ (with hopes of it running in real-time in-editor) but somehow I've managed to screw my vertex placement and it's frustrated me to not wanting to work on it.
Why nativize that? Sounds like a regular constructor
It's slow enough that it doesn't run well in editor while adjusting a spline, but fast enough that I think the little extra speed could make it run realtime
Is there a way in BP to get the path name from a TsubClassof Variable?
Dunno if you can run command to do it
I'm trying to set control rotation from two locations atan2 degrees but the pitch is from -90 to 90 while atan 2 result pitch is 180 above the range, how to fix?
Would anyone know how to add controller input yaw as recoil in the VR template? Do it exactly as described doesn't work.
I have a gun set up, does everything but the recoil
And the node Add Control Input doesn't work
Hey, im having troubles with the widget component.
Im using the same widget on my screen and on the laptop screen but when I press E, it doesnt get updated on the laptop screen
Ive tried manually updating it every frame, but that doesnt work.
Is there a way to ignore other pawns on the camera I am getting a weird flickering when the ai attacks my player?? Not sure what it is ??
would anyone know why get directional vectors of actors and components are retrieving the respectable vectors from the world rather than the object?
using the get forward will do the same thing and still of the world rather than the actor
This is quite confusing to me because i've been in a long term project for almost a year now. This is not the first time using these nodes.
because its only a direction vector, to fix it u have to add it to the actors location
oh wow i should of known that
Hi Im trying to replicate a top down ability like League or Dota for example.
To throw an object to a SPECIFIC location. Ie, the abilities landing location must be a parameter and it should travel through the air like a grenade or something. Can anyone point me in a good direction?
Maybe i can just translate the object between two points but with a curve thrown in so it looks like a throw?
Is the take high resolution screenshot through blueprints calling something other than the one available from the menu? The args are totally different… 
gonna assume this right spot for this question,
How do i set up the variable in save game object for morph targets so when save and load it keeps morphs targets?
I'm about 24 hrs into this and i know its probably super simple but for the life of me i can only do whats visually show like all the tutorial videos, yet none covers this exact question *or at least i can find lol 
do you want the object to impact on things while it travels?
if you want to do it from A to B its so simple but if you want it like an arrow you need to do smart ppl math..
or maybe there is a node called smart ppl stuff that will do that to you ue4 blueprint is weird
ProjectileMovement component is probably what you need.
Can someone please help?
You need to show how you're trying to update the widget.
With the option to update every frame?
those are two separate widgets. you are only changing the 2d viewport.
They should both be changing though
you can probably use a render target to show what's in the other widget
I shouldnt need to do that though, it should be updating every frame with the new values in the variables
there are some nodes about Predict Projectile Path. maybe you can use that as well. @wise edge
No, those widgets are separate instances. You have a logic for holding E, after that you change something, those are only happening in 2d viewport.
it's like having two computers and when you restart first one, expect the second one to be restarted as well.
They share the same variables though...?
They don't share same state
I dont understand ._.
If the Player and Laptop BP share the same variables, why can't the Widget Component inside the Laptop BP share it as well?
What do you mean?
This is entirely moot until we know how you're updating the widget. Tick? Which tick? Timeline? Where? Widget binding? Show how you're doing it.
Ok I found it. You need to do this
I already said...
that function is just an example, you need to get the 2d widget from player and set it to the widget component. it should show the same thing
you probably have Create Widget node somewhere right? and then Add To Viewport
that's for the player. and how about widget component?
Yep
Just the "Widget" component
widget component creates it's own widget. I suspect you set the class here.
Yep
That's the usual way. but now try this instead and see what happens
Where you have this node?
after you create widget, just set that for the widget component as well.
I have this in the same BP as im trying to get the widget in
It worked!
Any idea why everything is squished together though?
Its normal on the player's viewport
Nope..
maybe wrap the whole thing in ScaleBox. then set draw size manually. let me try
are your pivot points correct? for each element inside the canvas.
What are the pivots supposed to be?
for each element it should be center of it. pivot point is that star thing
sorry it's anchor.
not pivot point
Yes, all of the anchors are correct.
With smaller draw size your fonts become relatively larger. I think that's the issue
try 1280x720 draw size and scale the widget component to fit. (no draw at desired size)
That works, thanks.
but that has extra cost though. you can try 1920x1080 and that should look exactly the same as what you see on screen. (if your resolution is 1920x1080 as well)
Okay, thank you!
one last thing, maybe do this so that it looks the same at all resolution settings. remember to update this again when you change resolution in game settings. @rapid token you need to adjust scale as well, i'll leave that for you 😄
Alright, thank you so much for your help!
right click on image -> wrap with... -> scale box
Did not help. The icon is also stretched.
this was just an example, you can move them into center as well like you shown at end of video
Nice graphics btw 👍
This is not mine from the tutorial, by the way, the graphics are worse than in the training video, I set all the lines to epic, but still the pixels are visible on all objects, envy of the screen, I have a 43-inch telephoto screen, so these pixels are clearly visible.
Question. I'm trying to make a cone aoe attack. Mainly a fire breathing system for a dragon and abilities. Naturally I know I would just use a trigger. Thing is I am wanting to detect if the object can burn. Torches, oil, ect. This would be a tag. But what I'm wanting to do is have the blueprint check if a particle hit it so it can do its own events. Is there a way to have the blueprint check for that particle? And what's the best way?
Very rarely do you use particle hits to detect gameplay decisions. Most times the gameplay math is significantly simplified, and the particle system is created to match those parameters.
Working on a scene where I have a day and night scenario.
My persistent level has all of my geometry, my day map has my day skysphere,skylight, directional light and my night scenario will have it’s own skylight, directional and skysphere with stars. Scenarios will be toggles with a key press.
I have several meshes that have backlighting on signage that turns on in the night scenario and I am wondering the best way to acheive this.
A typical mesh is a wall with signage as a different material channel so the idea is during the day it is just an opaque white but at night time it turns to a different material which is emissive.
One thought I had was to duplicate the object and have one day and one night object with different materials but I don’t know if that is the best way.
Thanks in advance for any help.
hi, i've got a quick question. How to change a static mesh in a blueprint so that the pivot will be located in correct place?
@jovial ridgeplace a scene component where the pivot needs to be, parent the mesh to it and rotate the scene component instead of the mesh
Hello I have an problem I tried searching on the internet but none of it helped so ill ask here. The problem is: my event from an interface isn't getting called.
like that?
this isnt getting called somehow
yep
but still, pivot is moving with object
actually it is the object which moves with the pivot (scene component) in this case
if you want to change the pivot for the static mesh iteself, either you do it directly in the level or you edit it in Blender/Maya/...
^it's probably a good idea to fix it in the 3D tooling tbh, because if you ever need to do calculations based on the dimensions of the object etc. it may be a bit annoying to deal with it if the centers of your meshes are in different places and such
for a simple rotation around the z axis the scene component trick will do, but I also prefer clean implementations (fix the pivot in your DCC tool of choice)
yeah, but i need to change only pivot position 'cause when i changed the door mesh it stoped working properly
@crimson hornetstart looking where the interface method is called. Does the call actually take place? Is it happening on the right actor?
@jovial ridge if you need a modular solution (working for all doors) then your best option is to get the pivot right on the mesh itself. So fix it in Blender/Maya/etc. and reimport
hey guys. Can anyone help me out , on my project
which is to display and indicator path from a location to another
like gps
Hey am I blind or is there no documentation for blueprint stats plugin anywhere?
Looks like all it does is give you a console command to log some stuff
DumpBlueprintStats
Interesting was there a document with this information I can reference?
Source Code :P
Appreciate you
how can I add an interface to a blueprint actor?
Ah I found it! It's in class settings
yes
@crimson hornetis the target actor actually implementing the interface?
- Is the Object you call the Interface Message on valid?
- If Valid, is the Object the one you expect? (print its name)
- Does the class of the Object implement the interface?
- Does the Interface Message call even happen? (breakpoint it)
- Does the Event actually call but something after that doesn't and you are looking at the wrong "issue"? (breakpoint it)
Some of this was already asked
But that's basically all you have to check
Interfaces aren't really that complex
Why is that a Server RPC :D
idk
Now i have the feeling that your network code is just wrong
If you do a multiplayer game, then Health should be an OnRep variable
And in the OnRep function you should access UI and update it
And you should already be on the Server when you modify the Health var
mhmm
thinking
does that also have some sort of connection with the interface not being called?
Well I believe, just from the screenshot, that you are trying to update the visual health above the characters head
And you are only calling that on Server side
thats true
So clients won't see this
If you play with a dedicated server, then it would seem that it doesn't call
This is basically the wrong place to do this
It needs to be in an OnRep of the Health Variable
I‘m sorry for this question but i actually don‘t know how i can simply move my pawn forward with „w“... without physics..
@whole duneyou can simply give it a new world location based on the expected movement. Basically you take the current world location of the actor and offset it by the amount of the movement. First define the forward axis, then multiply it by the movement distance over one frame (say 10 unreal unit = 10 cm), then use the result to feed an AddActorWorldOffset call.
This way of moving an actor around is called kinematic, as opposed to using physics which entails adding forces/torques to your simulating actor.
Yes, it will look jittery if your offset is too large.
Make the offset small enough and it won't look jittery.
Ok.. i‘ll try, thanks
That is also related to the speed of movement of course.
If an actor moves very quickly you can expect it to have a large offset from one frame to the next, which is perfectly fine.
Yeah.. my pawn is moving along a spline so maybe i can use a timeline aswell
Then you can get the distance along the spline, find the next point your actor needs to move to and move it there. Then increase the distance variable and repeat.
Alright
If it is like a vehicle following the spline or a character you will also need to adjust its rotation
Already got that set up
Sweet
You are welcome 🙂
@crimson hornetnext time please keep in mind that mentioning you are working on a multi-player game is a quite relevant piece of info... 😉
hi guys
Im just calling the crouch function and the character seems to be going under the floor
any idea why? and any fixes?
@hazy lindenmake the character capsule visible in game, you will see what is happening.
yea i have done that as u can see in this clip
Basically when you crouch the capsule becomes shorter, so your character can pass under obstacles. That shifts the center of the capsule down. If you don't adjust the animation/pose of your character accordingly, it will look like he is going partially through the floor.
hmm, thats weird. I tried it with a default thirdpersoncharacter blueprint, it seems to work fine. even without animation
you are right, I saw it only the second time I played your video
as u can see, if i use the default thirdperson character, its working fine. I'm unable to figure out what setting i have messed up to get this happening
You mean the skeletal mesh stays on the floor even if you crouch and the capsule becomes smaller?
It should be controlled by bCrouchMaintainsBaseLocation
lemme give it a shot
also check what the spring arm + camera is parented to
im not using a spring arm
nvm i fixed it 🙂
this was it
Hello, is this the right chat room to ask for help with UE4 blueprinting problems?
yes
Sweet, I'm adding enemy archs of view with a procedural mesh, which are being updated via line tracing. In the editor the archs will get updated when I move the enemy BP, but when I play, the procedural mesh won't update and will hold the shape they started with in editor.
(Works in reverse order)
I'll bet you guys I've got something you've never had
a blueprint node that is deprecated
@small swiftyou shouldn't call the line trace + adjustement to the procedural mesh from the Construction Script. It should be called from an On Tick Event.
Rgr, I'll move it to a tick.
how do you go about passing multiple options while opening a new level?
In bp you cant the way you show it. You would need to create your own game instance and store variables
@fair sun @zealous moth You pass multiple options by separating them with ?. So "MyOption1=315?MyOption2=true"
I have an array that changes the amount of elements within it depending on what happens in game. How can I get a copy of a random int within the range of the array elements?
@fair sunSo, in the order of top to bottom. Passing a string, passing a true/false, passing an integer.
get the array length -1 then get random integer in range using the function
thanks
Got it working now, thank you! :)
Thanks!
Hi there, is it possible to add a blueprint component to a regular actor in a level? (not a blueprint actor)
Basically I've created a separate blueprint actor in the scene that will have logic to activate / deactivate other actors based on the component attached to them
My scene is mainly imported via datasmith so I dont want to go around converting every sub-object to blueprints as that may be lost on a later reimport (also the sub objects have children that I also want access to without having to dive into blueprints whenever I need to make a small change ie. change the angle of a door)
I've mainly used unity in the past so I'm used to being able to add components to objects in order to create functionality
How should I approach this?
Aah it seems I can add the components to the actors but I can't do multiple at once so I have to do each manually
?
@remote obsidian what are your "components" meant to do? Manipulate the actors inside the level/editor or provide a behavior during game play? The former can be addressed via editor scripting. The latter can be achieved by turning the actors into blueprints. If you create the behavior in a base class and then base them all on that class, they will all inherit that behavior.
How to bind events inside functions?
They need to fix that event auto generate to go to a graph. 😄
Created an ugly intermediate event for that. Why not just allow selecting any events from the list
@vast crowyou don't. Functions are not Event Graphs, they are reusable pieces of code meant to be called multiple times from multiple code locations.
Aren't events too?
Just cut the event and paste it into the Graph. Then set the CreateEvent node to the event.
@vast crownot really. What I mean is that by binding an event "hidden" inside a function (which is anyway not possible) means part of that functions would be run each time the event is triggered, which logically doesn't make sense. That is why Events need to be outside of a function and inside an Event Graph. If you want to hide a bit of the complexity you can always collapse that part of the code in the Event Graph or use multiple event graphs.
means part of that functions would be run each time the event is triggered, which logically doesn't make sense
Lambdas make a lot of sense, though. I see something similar here.
Anyway, it's possible by putting event into event graph
Lambdas can be argument to functions, but they are not called asynchronously from within a function with an own entry point.
That said, you can do whatever works best for you provided the VM supports it.
I got it, the CreateEvent list actually discovers event from event graphs, I just had wrong parameters in the event I wanted to bind. All good then
Quick question, why does this cast fail? (GM_Main is the default level gamemode)
Calling this in the player controller
since i need to get and set a variable from the gamemode inside the player controller
Does anyone know why my spline is so way off on curves?
@whole dunewhere is the pivot point of your rail mesh?
OMG its way off
I totally forgot to check that
I tried adjusting the relative location but that wouldnt fix it
you need it to be at the center so it doesn't offset respect to the spline
help?
Print the name of the object you get from get game mode
or do get class and print it
that should give you an idea
Having a bit of trouble with taunt logic on my turn based game. by default all enemies are targetable but when taunt is applied to an enemy or more than one enemy i need only those enemies to be targetable. How would i approach this in BP?
Depends on how your "is this a valid target" logic works I guess
you could for example do a loop of all the enemies, and if any of them have taunt, don't allow targeting anything that isn't one of those
@eternal krakena cast fails either because the object you are casting from in invalid or the object is valid but it doesn't have a relationship with the class you are casting it to (for example is derived from a different parent class). I would suggest you to place break point on the cast and check what happens when the execution gets there.
@whole duneyes, that is the only way to make sure the pivot is permanently in the right location.
Why do you want to get length of cube with line trace? You can probably get mesh bounds and that gives you the length
I recently started to do a pedestrian system and i´m trying to figure out how can i make that my NPC´s character move along desired track points, but the problem is that i don´t know how can I save all track points in array and then sort them with the distance, when I try to do this all of my NPC´s are stuck in the first track point and don´t move to next points. Does anyone know how to help me solve this problem ?
anyone have a guide/link for how to build a fixed/isometric camera for a 3d game that moves with the player? kinda like lego games or Marvel Ultimate Alliance
hello everyone. should I be moving my actors like this? or should i connect "speed" directly to the "AddActorWorldOffset" node? does "AddActorWorldOffset" node multiply the input with deltatime inside itself already?
This should be ok. The value you give to speed would be centimeters per second.
Understood, but i still don't understand how i could get the proper object ref for my GameMode if casting from "Game Mode Object Reference" to my custom GameMode class doesn't work
Make sure your custom game mode is applied correctly
Check project settings and world settings
it is
It's the correct type
This is very strange
I have a Create Widget node right after
And the Create Widget node only gets called if i switch the exec to Cast Failed
so the cast fails
but it's the correct type to be casted to?
@eternal krakenfirst things first, it seems you are developing a multiplayer game but you are handling the execution flow like it would be a single player game
I suspect your problem is mainly due to this
I'm still learning multiplayer in UE, watching a whole multiplayer series didn't help me learn much so i'm just jumping straight into it
yep, got it
It seems like the gamemode is invalid
so your problem is that the Game Mode object only lives on the Server Side
so if you do a Get Game Mode on the client side it will fail
I need some way to store global variables
For all the clients to be able to access
That is the Game State
Please read the first paragraphs here: https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Framework/GameMode/
Got it, thanks
Np. If you still have multiplayer related questions it is better to ask them in #multiplayer
ah
Still have one question
I'm thinking of making an array on the server to store all the animation speeds for the players (and i need to change the animation speed for the current player inside the player pawn)
Would that be a good idea or would there be a better way to achieve this
Is that something all players will use, they just need to be told by the server which one to use?
I need all the players to see eachother using the proper animation speed
Each player will have their own animation speed, not being able to modify the other player's
got it. So if the player changes their animation speed locally, you need to let the server know by using a server side RPC. Then from the server you can inform the other clients using a multicast. This is one way to do it, there may be other ways.
Again, ask in #multiplayer, it is better suited for this type of questions.
You are welcome
hey everyone, I am using a time line to make my health go up but it always goes up from 0, how can I start it from my current health instead of 0
You should use tick not timeline
The first two putts work normally, but 50-60% of the time, the golfball hits an invisible object on the way to the hole
there's literally nothing for it to be bouncing off of like it does in the last four-five putts in the video
simply enabling physics, does anyone know what it might be bouncing off of?
(might need to watch in full screen to see it clearly)
@mild lotusis the ground a terrain or what?
landscape
got it. Engine version?
4.26
go to your project settings, under physics and set Min Contact Offset to 0.0001 and Max Contact Offset to 0.001
see if it still does it
the first putt I tried worked perfectly so I thought it was fixed but then the next two bounced, so no luck but I appreciate the try!
ok wait
iirc there is a known bug in 4.26 which ignores the contact offset for the landscape
so maybe I should update to 4.27?
So I have a struct A that has an array of structs B. Struct A is used on a Data Table.
If I edit struct B, the engine crashes. Also, since struct B has an Enum E field, if I edit Enum E, struct B gets updated and then proceeds to crash. (This is how we found the crash, actually. Trying to add a new entry to the Enum).
Does anyone have any idea on how to solve this? I have been googling and trying a few different hacks for the past 2 days, between moving the struct B file to another folder, deleting saved/intermediate, forcing a refresh on all dependencies...
We have found this https://issues.unrealengine.com/issue/UE-40033 which is pretty similar and supposed to be fixed.
`[Compiler] Invalid property 'DialogStates_10_A3CEF14C4AFD47CB903227A69891E54A_Value' structure 'SDialogArray' error: Struct 'UserDefinedStruct /Game/Programming/Core/Gameplay/Data/SDialogArray.SDialogArray' is not compiled
LogBlueprint: Error: [AssetLog] D:\Projects\ProjectName\Content\Programming\Core\Gameplay\Data\Dialogs\SDialog.uasset: [Compiler] The variable DialogStates_10_A3CEF14C4AFD47CB903227A69891E54A declared in SDialogState has an invalid type Map of Names to SDialog Array Structures
LogBlueprint: Error: [AssetLog] D:\Projects\ProjectName\Content\Programming\Core\Gameplay\Data\Dialogs\SDialog.uasset: [Compiler] Structure 'UserDefinedStruct /Game/Programming/Core/Gameplay/Data/SDialogState.SDialogState' is empty `
@mild lotusI will DM you a fix dll for the landscape
does it crash on fresh project/asset? @fluid lance
im doing dodge/roll. and i use an input action for dodge and want to read the current movement axis to decide which of 4 dodge directions/animations to use.
how could i pull out the vector of the current input and get that to a place where i can make 1 of 4 choices
@grave hornetIs this like TPS, dive forward, dodge left/right, jump back, sort of dodging?
yea
i have animations for 4 directions
so i just want to get the nearest cardinal direction to current input direction and perform that caridnal direction dodge
oh
You should be able to get MoveRight/MoveForward axis from your character.
i could just compare teh axis values to dermine the highest
?
highest absolute value wins
Pretty much.
Personally. I'd turn it into an axis, and get a 0-3 integer to use for an array of animations. Unless you're doing blendstates with enums or something, Depends on how your animations are set up.
no blendstates
the array of animations would be prefered. im confused on turning my two axis into a 0-3 int tho
its gross, but i think it works
Anyone know what I need to do to convert to Int
Round it
I want my health to be in Int so more then 1, but I know the progress bar needs from 0 to 1 but apply damage needs float
This is the damage applying side
hey
i've got issues with something
could someone help me
@grave hornet Whew. That's dirty in Blueprint. 😄 My solution would have been this. Either way works. In this Left=0, Forward=1, Right=2, Back=3.



