#blueprint
402296 messages Β· Page 748 of 403
wow thank you so muchπππ
i have another question.
i am trying to add mouse control for camera movement around a ball that you control with the mouse keys.
i used action mapping to set the events
but it is not working
moving the mouse does nothing when i hit play
did i somehow set it up wrong?
you're moving the pawn, not your ball actor
if they're not the same, there won't be any movement
this is one of those instances where having GetPlayerPawn globally accessible is really detrimental
so how would i go about referencing my ball actor?
you have to go through the motions of understanding blueprint communication
your ballactor needs to be a pawn
your player controller needs to possess the pawn
Usually you'll have two skeletal meshes on a FPS character. One is the third person mesh, the other is the arms. You set the Owner visibility on them differently so that only owner sees the arms.
3 meshes, you forgot the party hat
Can't forget the party hat. π
Also I know a good bit of code but I love blueprints
it keeps my mental status in place
code drives me completely insane
@maiden wadi making a totally separate actor for the camera, setting view and moving the actor around worked!
Mildly confused about the rotation though. A value of one added to the rotation seems to be almost 180 degrees.
At first I thought radians but then 3.14 would be 180.
What is the unit scale unreal uses for rotators?
Depends on the orientation.
Yaw and Roll are both -180 to 180. 360 degrees. Pitch is always -90 to 90. 180 degrees.
Out of curiosity. Where are you adding one? I can't think of a place where that would cause a rotator to do a 180 besides in a normalized direction vector before you convert it to a rotator.
Well. There is one place. If you're at 89.99999 pitch and add one, your yaw will invert.
Getting world rotation, breaking the struct, adding 1 to the z axis, and making a new rotator.
Then I use a lerp off a time line to transition from one to the other
It turns smooth, and in a consistent proportion. Its just not the value system I expected
It will change from 180 to -179 if you add one to 180, if that's what you mean?
It also turns 40-45 degrees if I put in .25
If it was taking degrees as the value .25 or 1 wouldn't move it at all really, if it was radians it would take 6.28 to go full circle
At the moment it's looking like a value of 2.15 or so is gonna do it
That's definitely not normal. Would have to see the logic to comment though.
Ah. that might be why. I didn't catch that Lerp at first.
Pretend you have four frames. So your alpha from the timeline will be 0.25, 0.5, 0.27 and 1.
You start at 0 Yaw. Your alpha comes in at 0.25. 0 yaw lerped to 1 yaw here is 0.25 yaw.
Next frame you start at 0.25, add one, lerp from 0.25 to 1.25. Alpha is 0.5 so you're adding lerping to 0.75.
Next frame is 0.75 alpha. You're now at 0.75 yaw. You add 1 to lerp from 0.75 to 1.75. Alpha is 0.75, so now you're at 1.5
Last frame comes in and lerps you from 1.5 to 2.5 with 1 alpha. Now you're at 2.5
Is there a way to add widgets to screen, not player controller?
To LinearInterpolate correctly, you need to save your start and end location first. These should be stable. Or at least your start should be stable usually.
Create it and call AddToViewport on the return value. It doesn't matter where you create it usually. There are best places for it but that is a long and opinionated conversation. π
Oh I got you.. it's pulling new rotation start each frame
So it is supposed to be radians
Rotators are always in degrees.
I'll have to play with it
It takes 180 value to turn and face the other direction. 360 value to turn in a full circle.
Hey, I followed this tutorial: https://www.youtube.com/watch?v=dKkssm6D4RU
Project Files : https://www.patreon.com/posts/39705781
Today, I am going to start a new tutorial series on a multiplayer first person shooter game. In the first part, we are going to setup a basic multiplayer game using the first person template and then change the template to replicate the physics interactions in the world and projectiles. So, ...
But now I can just see the pellets of the client and when I shoot from the server the client doesn't see anything
π’
Yeah I know how degrees work, it just seemed like even with a moving start location, adding a fraction of a degree each frame shouldn't have gotten me almost 180 degrees around
yeah but this way it still needs a owner player controller while creating widget
And there's the problem
I want to add a widget first frame the client comes to server world (loading screen of some sorts)
But it does add it after player controller is initialised, so I have a split second without the loading screen, and I am wondering if there's a way to avoid that
Normally it might not. But consider that your code is framerate dependent. You would need to multiply your +1 by the current frame's deltatime. So actually your timeline could move something 3 degrees, or 200, if it's only running for one second.
Here you can see the problem
I Host the game- widget initialises first frame
I come in as a client, i have quite a few ticks without the loading screen
I got you
You normally do this by adding the loading screen to screen before calling open level. I personally do this with a GameInstance Subsystem. Can do the same thing in the GameInstance. Your open level code can get your game instance. Add the widget to screen, then call open level. Then your HUD most likely would GetGameInstance and remove that widget from screen on Beginplay or whenever you're ready.
Also if you're C++ inclined, there's a very nice way to do it in one of the epic examples for the Action RPG. Also makes the screen run on a separate thread so as not to lag as much.
Wait, don't widgets disappear after coming to another level?
I know only basics of C++, and I get soooo confused after trying to do anything in UE4 lmao
Hmm. They might from a hard load.
Because what I'm doing is add loading screen with fade in before changing the level, and then after I add it on begin play of the player controller and fade out
Can I open a level without discarding widgets?
Not sure. I know that ServerTravel doesn't discard them.
That requires level streaming though. and even then you still have to hard load some maps.
dang, thanks anyway, I will look for something else, thanks!
If you're at all C++ inclined. I'd seriously give the Action RPG a look at. Memory says it was even in a plugin. Could be easily drag dropped into your own project and used.
What I usually do is I create a transition level that automatically adds the widget to screen
The transition level then loads the actual level via LoadLevelInstance and removes the loading screen when it's done
But the cpp way is better
Because game modes and stuff
hmmmmmm, makes sense
Will try it later!
Why my loading screen is not working? It shows widget for a sec or two and then it turns black untill level is loaded
Cause that's not how you do it
All tutorials on yt told me that lol
Then they're wrong
They're wrong
You can handle persistent stuff through levels in the GameInstance
Like a loading screen
It doesn't even fire the next exec node iirc ^
uh
Except when it is in the game instance
But the target is invalid then
can I do loading screen trough game instance?
Yeah
That's where you would do it
But still not like that
So I do in loading screen map beginplay I trigger custom event in instance?
So game instance don't have beginplay function right? So I need to trigger event in game instance. I was whitnking, then in loadinglevel map, in maps Bp i can triger that event from beginplay. @obtuse herald
Yeah
ah
It will fire as soon as the game starts
so like this?
Like I said, this still won't work, because open level destroys the widget
ugh
Meaning you would be stuck at a freezed screen
So i need to use Level Streaming?
Yeah
uh
I wonder if asset loading would load the whole map so open level woudn't take up any time...
I have an array of vertices. I need to somehow sort these vertices by their Y component.
Can anyone suggest how this might be accomplished?
@mild beacon Look at the plugins, there is one called LoadingScreen
Thank you, but I fallowed leavel streaming tutorial and kind of figure it out
You can use non freezing loading screens even during OpenLevel. Just requires some very minor C++ work usually because you have the get the MoviePlayer and use it. It runs on a separate thread that isn't blocked by loading.
Does anyone happen to know how to disable the default PlayerController "click and drag to move camera around" logic? setting input mode to UI Only isn't an option for me as I need click events (which need Game and UI or just Game input modes, but that allows the drag to view thing). I suppose I could just set a view target to a static camera and be done with it...
ah, just making a default pawn (that isn't DefaultPawn lol) works.
Hello, I want to implement a simple system to play a sound when my character walks, I've seen the most common implementation is to use animation notifies and then line trace down to see the type of physical material and play the appropriate sound, however, I was wondering if there's a better solution like doing line traces on each foot on Tick and keeping track of the distance to the ground to see if a sound should be played.
I don't want to put the notifies in each walk animation considering it's going to be too many for each character in the game.
Anim notifies would be more easy on performance, as you'd only concerned on playing the footstep sound without branching every frame. Doing line traces each foot on Tick would be the worst way to do it.
I think this really depends on your game. If you're going to have like 20-30 characters max, you could easily program it on tick and disable said thing based on relevancy. Would save the time of setting up anim notifies. This would be very easy with a single skeleton. Traces and vector math are extremely cheap even in blueprint. Though there is something to be said for the hand made setting of the notifies. They're easier on performance, and a lot easier to rely on. And realistically you're not looking at more than a couple dozen animations to do this on as a solo dev. Just the ones with leg movement.
I'm trying to set up a frontal damage block for an actor. Right now I'm using a collider that will add pawns/actors that are owned by pawns it overlaps with to an array to ignore damage from. Is there a better way to do this?
is there an auto sort? i thought shift d was key but no.
Did you try undo? Ctrl+z?
So this will basically spam lots of sounds for when moving a door. What I'd like to do is play a sound (e.g. creaking) while the door is rotating, but not be spammed like this is. So should I be doing something like checking if lastPosition != currentPosition => Play Sound?
maybe set a bool (or use a function that may already exist) to see if the sound is playing, and if it's not, play it again.
it plays if I move the door as is, but since it's on tick, it's spamming it so I actually want it to stop being so frequent because it saturates all the available sounds
essentially it should be 1 sound instead of many and it should play through the sound if the door is moving. Right now it plays the same sound separately
then use a do once node or a bool
you can also try PlaySoundAttached or something like that so its on the door specifically
Anyone know how to make collision less buggy? (no glitching through, jumping ontop of things)
I used an actor location since the door's location is the pivot point. Is that okay?
Hello. I have a question. I followed to following:
https://answers.unrealengine.com/questions/519968/bp-equivalent-for-if-ue-build-shipping.html?sort=oldest
I created a cpp class with the content written out in the answer of the website. I already built it for win64. Now when I try to use the node in blueprints it isn't available. How do I make a CPP class available in Blueprints?
Hey I have a question
I wanna make First person and Third person Shooter game (switchable camera)
Then, How to sync ejection and firing effects between First person Gun mesh and Third person Gun mesh?
I don't want to use True FPS style because it breaks some animations
so, i am trying to make a system where you can select from multiple characters, each with their own abilities, that all interact with certain objects in the same way. I need an easy way to duplicate characters, as many of the objects rely on casting to the original character to verify that it's the player colliding, so how would i duplicate the player in a way that won't effect these objects, or effect the references in the Animation Blueprint?
show your header
(you can paste it in #cpp if you want instead)
#pragma once
#include "CoreMinimal.h"
#include "Kismet/BlueprintFunctionLibrary.h"
#include "GetBuildConfiguration.generated.h"
/**
*
*/
UCLASS()
class COINTREASURES_API UGetBuildConfiguration : public UBlueprintFunctionLibrary
{
GENERATED_BODY()
UFUNCTION(Category = "Utility", BlueprintCallable)
// Return to blueprint node
static void GetBuildConfiguration(FString& Configuration);
};
@fiery glen
oh, you already asked in cpp
Yes I noticed that channel after I asked here
But it's a bit of a question for both
since my blueprint node isn't showing up in UE4
Now it is
Thanks a lot!
what changed?
you could have a base class they all share?
I do not think I understand what duplicate means in this context
i want multiple character bp's, who all share the same code and can be referenced by the same cast node
I think you want their base behavior defined in something they all inherit from
I built it with UE4 closed
hehe it was my first time using CPP with UE4 so I was kind of confused
why not do something like having a ABaseCharacter with the interaction code/animbp?
and the different class all inherit from that?
I just tried it, and it worked perfectly!! Thank you!! I have legit been trying to figure this out for hours, and i couldn't decipher how i was gonna wire it up
How do I use multiple condtions on one line trace?
My Blueprint is not detecting the Ammo tag because I don't know where to branch that one node
Thanks π
will only check if only theres no hazard
Another question: Since I'm using raytracing to detect hits, my variables like health or ammo will go up or down super quick as long as my player is touching the objects. Is there a way to slow it down?
Or delay the hit detection?
well
delay node might work π
or you can put a do_once node when raytace hits the target
and open it again whenever you want
for example when ray trace is no longer hitting the target
I tried using the delay node by putting it at the end of all my nodes but it didnt work
oh ok i see
I put the duration for 10 seconds and it is slower but it's not 10 seconds between when I print the string
probably because of the raytracing and how it works
oh wait
try do once
actually i think i got it
arrows showing where doonce should be
why is this not working for some players?
it doesn't get the HUD of the player correctly therefore it doesn't work
despite the player clearly having a HUD
this only happens for the listen server clients
not for the server
@tawdry mural I moved the do once after the first branch and it works how I want it to. Thanks for the help.
How would I separate the physics of a helicopter with the rope that drops from it? The rope doesn't affect the heli until I turn physics on and the heli goes all kinds of crazy.
I guess you'd attach it using a physics constraint? Beyond that it should mostly be a question of tweaking the physics properties of it I guess, but depending on how you want it to behave you might want to forego having it be a physics prop altogether and just manually calculate how it behaves
This is in the player controller
@earnest tangle physics constraint.. thanks i'll try that.
Im calling this in the gamemode
Hello all. Hope you are doing all well. I am glad I found this server and hopefully someone will be able to help me with a question. How can I use a fluid to wrap around an object using blueprint . For example: making a mobile game you can take the fluid and wrap it around your object and it will remain on the object creating a fluid sheald around it.
Hey, how do I get the actor that is hit when event hit occurs?
other = other actor
Use "Other". Not "Other Comp". Score one for Epic Naming convention fails.
hello. why execute command not work in realize? In standalone all ok.
As far as I know exec commands are disabled in released products.
There are much much better ways to set graphic qualities
Unless you're Ark. Then you just release the development build as the final product. π
https://www.youtube.com/watch?v=rRzbgRgsK1I
check this out
What are the Game User Settings Nodes in Unreal Engine 4
Source Files: https://github.com/MWadstein/wtf-hdi-files
It's not only for Ark. You can always have a dev build on any Unreal game. But you will lose performance gains as a result.
A, ok. Thanks. No option to include the command in the assembly? I don't want to rewrite a lot :))
From what I see you are trying to change shadow quality. That can be done by changing stuff by using "game user settings" instead.
Year
But i have a lot code where i use command execute.
If maybe Unreal have enable too add the comand console in realese, its be perfect for only this project.
I believe you shouldnt use command consoles at all.
They are as their name implies, overriding values via a console
That a released game should NOT have as an option.
Literally what I used
it's weird
That's odd. This isn't server code is it?
You are hooking up the execution pins?
huh
Blue nodes with the white arrows only run when the left side has a white execution line ran to it.
Ohhh
Then uhh
what
What was that little thing
nvm
Oh hell yeah it works
What was that condition block?
this thing what's the name of this thing
Ah. Don't use that one. Right now you're asking if one instance of something hit another instance of something.
Wait til you start in on instantiation, and hierarchy inheritance. Or hierarchy inheritance. Epic still has us all beat with UHierarchicalInstancedStaticMeshComponent though.
I just wanted to check whether I hit the cube and disable floor hits since when u hit something it disappearrs
If you want to check if it's a specific cube, use the check you already had. If you want to check if it's A cube, then use what I posted with the Cube's actor class as the Parent Class.
To use what you had, you need to get an instance of the other cube you want to check against though.
Object
Put them in line. Depends on how you want your logic to go.
You can sequence it if you always want both of those to run.
Is it possible to enable / disable Groom Hair simulation at runtime? Cant find a way...
hey guys
anybody know why character is duplicating
I set it to use the character on play
it creates a character and the one you put in manually stays
what would be the best way to bulk edit a BP's component transforms?
like multiply all X in location with 2, even though the X is different in each component
ya i noticed that
if I dont have the character in the scene it will not duplicate
I just find it weird that you start the game with an empty scene
like I mean with no character in sight
use this to set a location where you spawn
Hey guys i am working on active ragdoll character ,i want to ask some (a lot of ) questions about CONTROL RIG and Physical Animations ,who can help me?
i cant find any information about UE active ragdoll characters
any way to bind move AI when it's done?
post in #legacy-physics
what do you mean when it's done? success and fail are when the movement is "done" but with different results
yeah whichever is fine I found this but it makes no sense I don't even know which pawn is done moving
What's the target on that?
Yeah so that's another option for it I guess
if you wanted to get the pawn which finished moving for the event you would probably need to store the ai controller ref so you can get the controlled pawn
how would I know whick AIController is done from this though? Doen't make much sense
save the one you bind the event to I guess
it's a bit annoying many of the events don't carry the sending actor as the parameter
So like a map of "Pawn" and "event" ?
Oh, I don't know if that's possible
When i possess my character by another(a vehicle) his anim BP stops responding and no print strings from it run, any idea? Character switches to T-Pose
this would be easier in C++ since you could bind a lambda to the event or something where you can carry the extra info for it tbh
yeah it's not haha
another method would be to move this logic into the AI controller
then you know which one finished
True, thank you for your help @earnest tangle ! I'll keep trying and if I don't make it happen I'll put everything into the AI
xoxo
I'm stil confused though, how does the engine do this? Can it be done manually in bp?
It's probably checking if the pawns location is changing
There is a delegate for it in the ai navigation request which handles it under the hood
If the pawns location is ~Dest then Success
but much of the machinery is not exposed to BP's
Right I see
If the pawn doesn't move anymore then failed
this node is the best you can get for it mostly.
But there is probably more to it
Because there are NavProxys or whatever they're called
Basically a "Portal" for the Nav. Where you can decide in bp what to do so the pawn reaches the other side of the proxy)
hi
someone can help me how i can desactive this ? (cemra clipping) (same in play)
i try to modify in general setting but not effect
did you adjust the near clip plane?
that doesn't look like camera clipping as there is no line. maybe I'm blind
what would be the best way to bulk edit a BP's component transforms?
like multiply all X in location with 2, even though the X is different in each component
got an example @gilded pebble ?
With editor utility for example
Well for example I have an actor
with 5 different components with different transfroms
I want to multiply the X in the location of all 5 transforms to make them more spread out
can get all components by tag then set a random position
Normally I would need to do it one by one, Is there a way to bult multiply them even though it says "Multiply values"
yes, but that only works in Runtime, what I need is to edit the default transform of the components
I tried to use Editor Utility Plugin, but can't seem to get it to edit properties of Blueprint Classes the way it does for example textures
sorry never used editor utility thing
@gilded pebble you can make a function "run in editor" in the function details panel
And then the function will appear as a button when you have the actor selected in the level editor
Thanks, but that doesn't edit the default values of the class, only the instance
Sorry, dunno about editing class defaults programmatically
wdym
same ingame
i can't see my body
you said you changed something in project settings, close render culling is dependent on the near clip plane
I want to slow max speed down when 2 InputAxis are pressed at the same time. I know I need to divide them but I dont know how to create an IF statement in blueprints to achieve that. Anyone have an idea? Im trying to slow diagonal speed basically.
when you add velocity to your pawn clamp the vector length
you can define functions as call in editor and call them from the actor details panel
they just can't have any arguments, but you could still make a randomize location method
I wonder why it'd be interesting to change class default with an editor widget? What usecase is there ?
maybe you want to apply editor changes to the class as default?
What sort of editor changes? Did Loki provide an example? In case there's other ways to achieve it
Oh nvm, reading up.
im not sure if he wants to actually change the default value for every instance
i assumed it was more related to instances
I'd think so too by the description
Multiply 5 component transforms location.x by 5...
Guess you could edit "class defaults" by programming variables for it dynamically instead and using those as "defaults"
It wouldnt actually work in editor but in game/as instance it would
Bulk edit would only work if they were of the same parent class tho
Explaining it makes it sound horrible. Wouldn't recommend
Thanks for the tip but it didnt really provide the desired results. It did clamp directional speed, for example, when I moved right but I need it to clamp when both inputs are active. So I did pawn > get velocity > vector length (split struct) > clamp vector size into add movement input. I still feel I am missing that IF statement. Clamp IF move forward is active kind of thing.
I also tried character movement component > velocity > vector length > clamp but that just made it do weird things lol
@civic crypt Are you using input axis events? I haven't dealt with character movement before personally, but I will say generally that you don't have to use the input axis events to process those axes. So if you're trying to process two input axes in relation to one another, you can do it on Event Tick and use the Get Input Axis nodes (or something like that). Then you can combine the float values into a 2D or 3D vector and clamp the length and stuff, rather than trying to process each axis on their own parallel ticking event.
Also to answer your other question, a Branch node is the practical equivalent of "if" in BP.
I know branch is the node but I wasn't sure how to introduce that with floats/vectors. I havent looked into the get axis node. Im not seeing it but I do remember running across it at some point. This is what I have here:
I realize the axis value isnt plugged in for MoveRight, thats cuz I removed it prior to the picture lol
yeah I was kind of confused there...
so yeah the point I was trying to make is your two input axis events are just tick events for convenience, and the complication seems to stem from running two parallel tick events but having the two inputs affect each other
so I was saying it makes more sense to do it as a single line of execution
coming out of a single tick event (Event Tick is the obv. choice, but using just one of the Input Axis events is OK too)
and then you just use the Get InputAxis nodes to get the values
and process them however you like into a vector that you feed into Add Movement Input
Ya I agree. So is the InputAxis not native because it doesnt show up in my blueprints.
or are you talking about the input functions?
ok yes got that haha
I was looking for a float π
Thanks for the direction @tight schooner Ill give this a try.
I believe what Ben was practically suggesting is you can pack both axes into a Make Vector node and feed that into Clamp Vector Size to limit the total length of the vector
We're assuming you're trying to prevent the classic game thing where the player moves faster at a diagonal
indeed lol
Im not super familiar with vectors. Im somewhat blind in this aspect but this give me a lot to research and learn, and thanks for clarifying Ben's suggestion too.
hey guys have a noob question here. When I shoot my bullets, they go through my objects. I've tried changing my collision settings but nothing has worked. All my other objects can detect if my character touches it. What am I missing?
That only sets the transform of the actor's components, not the default for the class
@dusk cave Have you given this a try? https://answers.unrealengine.com/questions/57343/view.html
Is there a way to stop a component inside a ball that is rolling, to not roll with the ball? Think of a hamster inside a hamster ball. The "Lock rotation" isn't doing it
@civic crypt sorry I think I typed that out wrong. I just need my bullet to work with event hit or I need my other objects to detect if my bullet hits/passes into them.\
I think that link is for if the bullet collides with the character when it spawns
Don't attach the component to the ball.
There maybe someone here more knowledgably on collision detection than me. That post was about the extent of it haha
I'd figure using event ActorBeginOverlap could work but it didnt also
@spark steppe @tight schooner I got the vector clamp suggestion to work! Thank you for that. Now I just need to figure out how to reduce backward diagonal speed comparably.... π€ lol
shouldn't the vector length clamp range just be something like -1 to +1
Well it works perfectly. All directions match their set speeds. However, I set backward input to -.8, so moving back works diagonally resets that to the aiming speed. I was hoping that would make the diagonal -.8 as well.
Trying to play media on all clients but it's only running on one even though all of these are replicated / multicast
if you know anything @ me
How can I get the thing inside the ball to move around with it tho without attaching it?
Is there a way to set an actor label on spawn?
Widgets aren't replicated. You can't run RPCs from them.
So how would I overcome that?
Probably have an actor as wrapper
You'd have to run the RPC through a different class (perhaps gamestate makes the most sense for this one since it's for all clients) which then would need to call the UI on your clients to perform the required operation.
Check out the multiplayer compendium pinned on the #multiplayer channel.
So instead of making it a UI, I just played the video with a keybind, and I used replication, but it still won't work. No idea what happening, still new to multiplayer
This isn't in the widget blueprint, this is in the level blueprint
How do I reference my Bullet Actor here
what bp is this?
this is inside my enemy blueprint
it makes more since to me to create a event on the bullet bp for this.
On bullet overlap, attempt to cast to the enemy. if it succeeds call the custom event for take damage in the enemy bp. or you could just use the damage node directly in the bullet bp.
I just need the bullet to destroy the enemy on overlap or hit
so would i still keep it in my enemy bp or do it in the bullet? Either way, I can't figure out why my EventOverlap node hasn't been working
Is setting a series of variables or a struct after runtime the only way to incorporate data table values into a BP? Like, I can't somehow bind a collection of variables to a data table through the editor, can I?
Hi all. Not sure the best place to ask this... but if I have a sample project that I would like to borrow something from e.g. the way the Spatial Audio is set up in the Spatial Audio Temple project; is the best way to use this logic in a different project to Migrate it? Or some other workflow?
E.g. if I have a plugin for footsteps, a sample project for spatial audio, another project with the assets... should I basically just migrate everything into a master project as one of the first steps?
Thanks
Or maybe can I just call the struct I need every time I need to call a variable? I have no frame of reference for how much more costly that is compared to individual variables
You can create a variable of the structure type itself and store the value from the data table. If you need to reference only specific variable you can use "break" node to get access to the specific variables.
Otherwise, if you want to store them individually, that's fine too, but you'd have to manually create and set each of the variables after reading the values from the data table.
Cool, that seems to be what I want. Calling the structure frequently won't cause many issues over just using variables individually, would it?
An enum with 3 items not an array can you randomize it
Maybe. Worst case you just do a select node and randomize an integer to select your enumerator
how? The index of select has to be enum
Is there a way to get a variable from a spheretraced actor's blueprint into the blueprint doing the tracing?
"random int in range" and then plug it into a select node. Then you plug the select node's output into your enum input and it automatically changes the wildcards to enum of your type
KIM that the first index is zero, so your int range would be 0-2
You're using a select on enum node. Use the one that's just called "select"
I got it thanks
Not sure what you mean. If you can cast to it or otherwise interface with it, you can get data and call functions. But AFAIK it has to be initiated by the thing doing the trace
I tried getting gameplay tags from the actor being traced and while they were set within the sphere traced actor they could not be read by the actor doing the tracing. I can't cast the blueprint being traced to pull variables from it because I want it to be different depending on whats being traced, is there another way to just start pulling and reading variables without casting?
or a way to cast from what was sphere traced?
I thought gameplay tags would have been the solution but for some reason "Get owned gameplay tags" will not pull into the other actor's blueprint
Create an interface. The interface should return whatever values you want to return from the actor. In relevant actors, implement the interface and return the values you want to return from the actor through the interface.
It would end up looking something like this:
Ok thank you for your help and your time I'm gonna read up on it now
How is this function supposed to be used if it has no inputs or outputs?
My guess would be you place the controller on a flat surface, then use that node to "set" the level.
void UKismetInputLibrary::CalibrateTilt()
{
GEngine->Exec(NULL, TEXT("CALIBRATEMOTION"));
}```
it literally just calls a console command CALIBRATEMOTION
hello
Im trying to make it so that after 7 seconds of idle I want to play a random idle breaker animation
Can anyone help me?
Hello. I am new around here, I apologize that English is not my main language. If it is not a suitable channel to ask this, I am sorry. In a multiplayer if for example I have 100 players in the same game, how do I assign a camera / point of view to each one? I can't find any mention in the forum or youtube about this.
Im talking about camera / point of view nothing more and I have used the example of multiplayer and 100 players as an example.
@past spoke i wouldve used in the character bp and the play montage node.
Simply have a cobdition that determines if idle. Then after a timer countdown play a montage.
No need to go into the anim bp.
do you know what this message means
Having a bit of trouble with input. Recently added a drone that is controlled by the player controller in addition to the player character. After implementing the drone, all movement and mouse input for the player suddenly doesn't work. It still runs the action evens, but the value for axis events is alweays 0.0 even when I move around and look
actually the axis values do work, the "add movement input" node doesnt work now
the code for sure executes, the add movement part doesnt seem to work
I have a character movement component, and it worked fine before adding the drone in (even if the drone is not spawned)
jumping seems to work fine
as well as aim down sights
I may have found the problem
Hey Everyone, I've created a new Blueprint class that I'm calling PowerNumber. It's a number that can hold really really really large numbers by separating out the float Value of the number and the Power/Exponent of the number. It might hold a Value of 2.465 and an Exponent of 453 to represent 2.465E+453.
So this has been working fine, but... the Blueprint approach makes this number an Object. If I use an Int or a Float, it's a value. I can set a default value and use it without initalization. If I use a PowerNumber for a number, it's an empty object slot that has to be filled with an instantiated object at runtime. Is there a way to fix this? Is there a way to make my PowerNumber as versatile and usable as another built-in type like Int or Float. If not with Blueprint, can I do with with C++ ?
struct
Structs can't have their own functions though, right? How do I do custom Addition/Multiplication and stuff if I'm using a struct?
I guess I could use a Blueprint Library for the functions that work on the struct maybe?
a struct is a variable you can use almost anywhere once you've created it
also depending on which engine version you're using, there is Double support, so you can store pretty large numbers anyways.
hey bro
do you know what this means
the message in the bubble
https://answers.unrealengine.com/questions/571589/view.html No idea other than that which I googled.
Any reason why this would not be working?
Multiple. Are you hitting anything at all? If not, are both collision primitives set to block each other and to generate Hit Events?
Can somebody help me, this is my main menu level, but after loading the play level this happens....
the wall, cylinder and the green marble are part of the mainmenu level. everything in the background is the gameplay level. i thought loading a level was supposed to destroy everything??
Nevermind it was loading an instance instead of open level.
Can anyone give me an idea for how to move Actors around in runtime just like it is in the level editor ? I already have a Gizmo that I can select I just need some kind of logic to actually set the new location from the mouse cursor.
I tried with "Convert mouse location to world space" but that ends up being offset of the original location and is also way too slow so it doesn't stick with the cursor.
Also interested in this logic, haven't tackled the gizmo just stuff yet ;D
Yes you can.
Pretty much answered your question yourself :o
Couldn't you just "deactivate" inputs in the animations and "activate" them with that notifiy ?
anyone good at math? I'm trying to figure out an equation for a players level. I want it to take the players total XP number and figure out what level he is from it while having each level be exponential by 50%. These are the inputs and outputs I want to have for the equation
Have a look at the compound interest equations
hmm doing some googling
i think i might have found something for it
ty for the tip
You're welcome
after doing some digging, what I'm kind of trying to do is the opposite of a compound interest equation. This equation i'm seeing is taking the base principal, rate and number of times compunded and getting the amount. In my equation I know the amount, the principal, and the rate, I need to take those and figure out the number of times compounded
im so bad at math lol
Here ya go
ooo thank you very much. i will take a look at this
Hi, why is my line trace so weird and not in the crosshair?
How do you setup your line tracer?
motionblur also makes debug lines look funny
r.motionbur.amount 0 can make debug lines less funny looking
multiply the forward vector of the camera by a float instead of a vector
At forward vector you probably want to multiply by float instead of by vector
Or multiply every vector component by the same amount
UE5 so cool
the ui for changing math pin types is really not nice
Did it with float and it has the same result..
it should just be a button on the node
UE5's modular arithmetic nodes are kinda confusing tbh
You mean smth like when creating a new variable?
Thanks this fixed my issue
sweet
Any ideas how to make a lock on system?
something like a little extra button arrow thingy near the value pin
no idea
it's just weird how it's so hidden
I guess I would need to get the hit pawn and use it's reference and get his location all time right?
Yeah
I was always deleting and creating a new node while I was testing ue5 xD
Yeah, something along that
I have a question about a node, i realized it has a weird delay. So when I click, it doesnt shot the line trace, but needs 0.25s to shot it after holding the button.
But i have initial delay set to 0, how can I make it instant shot as soon as the button is pressed?
@devout doveSave a timer handle from the return value. Use it to check if timer is valid. If not, call whatever the red line is calling imediately, then start the timer.
I don't understand how you mean it exactly
So no custom event?
Call the custom event before set timer
call ShotGun right before the Set Timer By Event
Only if ShotGunTimer is not currently active.
you could just spam the button that way, negating the point of the timer
Yeah that's true
Like this?
Yeah, but before you call it check if your timer variable is valid
And only if it's not you do the stuff
like this?
Yupp
or a validated get is a little simpler, combine three nodes to one
but if it works, it works. no need to make it more complicated if you dont have to
The fancy way
i don't know how to do that
right click on the get variable
Should I create a function for that?
then at the bottom
ok what then
it gets the node and checks if it is valid at the same time. You just connect up the pins
so its the same connections you did in the branch
but instead of 3 nodes it's now 1
not on the pin, but the node
Pretty sure that's only for hard pointers?
yeah I don't think this struct supports a generic boolean operator
Ah that sucks
here's an example
You can just leave it, it's not like there'll be any performance drops because of the extra node or two
Don't worry, I'm thankful that you all taking time to help me, all I can say is thank you π
Do I need to have this connection here?
I'm trying to wrap this somehow into a function but it's very messy and causing errors
Yep
Can't I promote it to a variable or something like that?
You can also use a CallEvent node
And then select the event there
Or maybe it's called GetEvent
like this?
You can also have that red line (called a delegate) as input for your function
Yep
Hi, I have my skeletal mesh and I want to use blueprints to rotate one of its bones (like pressing a key and rotating X=30ΒΊ), but I cant figure it out how to do it
you can absolutely still spam shoot with that timer setup? am I wrong?
I tried doing it in the animation BP, but doing it inside the animgraph sets the bone rotated all the time
@fiery glen What do you mean?
Timer invalids after 0.25s, so you could technically double shoot every 0.25s but that's need a pretty good timing
I just did that -_-
Yep you can shot with that 2x the speed
Oh
releasing the mouse always invalidates the timer no matter what
And I don't know how to fix that
Oh right
So I need to add a time delay before invalidating it?
Yeah you can totally spam click
need another boolean value
make a new boolean called WantsToFire or something
only clear the handle when the time elapses AND you don't want to fire
still feels weird but I can't think of anything better that isn't ticking
also I just drag the red line to the event directly instead of creating a new event
which should not really matter here though
we are doing automatic weapon fire here I guess
this would work great for a semi auto weapon
I tried this but also doesn't work π¦
Yeah that perfect actually
just copy what I did directly
don't use the extra delay node
that's actually somewhat cooler because it lets you set a separate "cooldown"
It works but it also has a tiny problem, when tripple clicking the delay takes to long and it doesn't shot, then you need to release and click again to shot.
but yeah don't let it set multiple delays
but when i click the button while the delay is on, it wont fire
it could still set the weapon ready cooldown multiple times merely by releasing the input
Works like it should but damn, that's a smart solution to that. Thank you π
This could be done on tick right? Not very efficient but I think that this way it could just skip the delay,
I know a game that works this way, the game uses also Vsync as default so having a 240hz monitor gives you advantages in that game :p
No matter what this is great solution. No matter how fast I click I can't double click. On click tester I did 18clicks/second so I guess that's good
UE is designed around a variable ticking rate either way
as in always considering the current delta time
Is there a way to change the static mesh with blueprints?
"Set static mesh" haha
Thanks, couldnt imagine its that simple π
Does anyone know how when linking selected item (string) to a command, i can also add a command, meaning my command + returned selected item string
right now it returns a resolution -----x---- but i want to return r.setres -----x-----
append string
Is there any reason you're not setting it through GameUserSettings?
I am not really sure why i havent, can you explain me what does this change and why its required?
But i will surely do now
i am also having problem with r.fullscreenmode, i also tried print but there was no printing for some reason, and the window type not changing
you're putting your parameters before your actual command
it should be on B?
I also think that window types are with integers and not names if i am correct
so i could replace the labels
you have the url for this because i couldnt find it?
http://www.kosmokleaner.de/ownsoft/UE4CVarBrowser.html
this site is probably helpful for you
youre the best
can you print the output before you're running it?
no, at the end
also you have to connect the exec ofc
is it normalized/a direction vector?
seems right
yeah
apparently the command ain't workin no more
but the setres command can turn it into fullscreen "aswell"
just put an 'f' at the end
hmmm so what i have to do is to get current resolution and add an "f"
yeah
or you use the functions from game user settings
reaching from -1 to 1
what is your setup?
how do you get the vector?
what rotation do you want?
Ok
Is it a location vector?
or a normal/direction vector?
alright
I'm assuming you want the avg. rotation of these two rotators?
you mean that?
I tried my best
You are all so helpful =)
That??
@obtuse herald Sorry to bother you, a quick question
in the combo box, there are some array elements
in the click, when returning it gives me the selected string, but can i get the selected element?
as string ofcourse
you mean without the event?
Here, it returns the selected string
but i want to return the array element, 0-1-3-4-5
wdym?
i mean, it will work now ? because in the combo box nothing is returned where selected item is
damn it worked yes
Thanks for helping me, trying to understand how blueprints working lol
ah, yeah you don't need to use that
it's bascally a shorutcut for that
yeah trying to understand how exactly it reutrns something that is not connected with the event, on selection changed
but seems like it takes its action by self
what do you mean by that?
I mean by doing only that, that is enough than connecting it with the event trigger
Yeah, because you're referencing your combobox again with that blue thing. If you would use some other combobox there (i.e. Fullscreen) then it would get the value from that and set the postproccess based on that
thats really awesome
i tried getting selected index from returned selected item from the event but couldnt find, so i guess whats what i only have to do
Yeah, selected item is only a string, there is nothing more to it
yup, some times you need the index to get the values if they are the same, for anti-aliasing, all index elements are fitting with the command when selecting.
I just dont understand why on tutorials they are having 10 buttons for normal, medium, high, every single of it has a button than having a combo box
10 buttons is weird, but comboboxes are also garbage
I usually code my own "horizontal combobox" which looks like this:
< CURRENT OPTION >
Yeah thats damn awesome
i want to learn that too one day, seems better than everything
Can be done just in BPs, so nothing is stopping you
i guess a button for changing the option
Yeah the center is a Textblock, the < > are a button each
Internally it's an array and a variable for the current index.
Buttons increase and decrease the index and update the Textblock
same
The nice thing about your own widget is that you can make two arrays, one for the friendly name and one for the option
Often the option is some weird English word and the friendly name has to be translatable
You think there is a tutorial about this one out there? it would be great if someone created one
You're welcome, just try properly phrasing your question next time
I will surely do that one tho, i am just messing around for now until i learn blue prints well
hello
Im trying to print an integer value that will change after 10-15 secs depending on the animation duration
I cant seem to make it work
like this
Wanted to say the same
depending on variable number 0-1-2 assigned to the animations I want Idle Breaker index : 1 to appear for example
mmh
I take that as a yes, and what do you get?
oh thats because i think it will spam the text
does it print anything at all? do you always get 0?
Maybe try 0.1 as duration
0 works on tick
β Couldn't find a 'Input' channel, so I am just going to ask here: I can only press buttons with Left-Mouse. Is there any way to change that somewhere? Maybe inside the project-settings like the input page?
well maybe I need to plug event blueprint update animation to set Is idle breaker?
Project Settings > Input?
oh wait that was your example
today is big brain time
Nah. That input page only handles input created by me. E.g. running, jumping. But a Button Press is a standard. It just works out of the box. But I don't wanna use Left-Mouse
Yeah I don't think that's easily possible, the click event gets forwarded from slate afaik.
so you need to override that
That's what I thought.
Sadness
Well, guess I have to work around that
I'm trying to create a simple path/curve editor that I can manipulate in editor mode for objects to follow. Where would I start with that?
Isnt it overrideable in the playercontroller? Default click method in the settings or something?
@tame pasture damnnn
Use a Sequence after "... Update Animation"
Wooooow, thank you!
I will try that
Sadly doesn't work
I don't know what that setting is for. But if I select 'E' there and press 'E' on my keyboard, no button underneath the cursor will be pressed.
Maybe I am using it wrong.
Did 'K' work on your side? @obtuse herald ?
honestly I didn't try it
Oh okay
well a simple tooltip reveals it
what you can try however (a bit hacky but maybe worth a try) is adding a widget component that draws your widgets infront of the players camera
because that IS a component
Ok apparently if you use a widget component there is an extra widget interaction component that handels the input
And you can change input settings there?
You need to call a funtion that sends the input, kinda like this
it's used for (mostly vr) game controllers
you probably always want to be able to release the key tho
hahaha
Thank you
you're welcome
Does anyone know how I can access this within a blueprint?
https://docs.unrealengine.com/4.26/en-US/API/Runtime/Engine/Engine/UTexture2D/HasAlphaChannel/
I want to check if a Texture2D has an alpha channel, because I want to apply it a material supporting transparency if it does
Returns true if the runtime texture has an alpha channel that is not completely white.
Does anyone know how i can set a text when clicking a button? the text is empty
Hi guys
Can someone help me know how can I make a destructible vehicle?
Where exactly did you find this? should i do it on button click? because i want this to happen when they click the button but tried to find settext, cant find it
get your text reference
drag the pin
set text
Unfortunately i have no idea how to get my text reference
You have a text somewhere in your widget that you want to change, right?
Click on it
set 'Is Variable' at top of the details panel to true
awesome yes, i did that
now go into your graph
on the right hand side are the variables
there is also your text variable
yes, now i can do set text
is it possible to get the text of the button
so i can change the text on the selected test?
i do the same way i guess?
yeah
okay this is the text i want to transfer to selected chapter text
is that correct?
it is
If you have an UI element and it's not inside your variables, just tick that box
yeah i didnt know that, well i was trying to search about it, i was like where the hell is it and its not in the list
that tick thing fixed it
you're the best, thanks for helping
Next step. Doing it with localization. π
Localization is actually incredibly easy when set up correctly.
You can do it very efficiently using Stringtables, and save a ton of translation cost by not accidentally repeating word uses in places.
i think i need some time to learn that cuz its my first time using unreal
Also Unreal Engine has built in Localization Dashboard, though blacklisting certain FText objects from getting picked up is a chore.
After all you don't want to pay the translator to translate placeholder texts, something that have near 0% chance to appear intentionally.
It's as easy as 1, 2, 3. Literally. π
Create a new Stringtable like this.
Add some lines to it.
lol okay and how you change the language?
that thing looking kinda complicated
Once you have some texts translated and compiled, you can view it here.
damn it seems so easy
It's a tad bit complicated, but useful for huge amount of text scripts, but also it picks up every single FText that's flagged for localisation.
gonna check it out now
For the dashboard. You can also tell it not to compile anything except the specific objects you want. Like I have mine set up to ONLY look up those stringtables.
I personally use a ton of RichText. It's so much more efficient design wise to use than the TextBlock in most cases.
What does your TextBlock's Text setting look like?
If you set it from the stringtable it'll be greyed out.
Will look like this.
Oh i understand, no it looks basic for now, default text
i have to transfer it from texts table to the text?
from here?
Yep. Selecte the StringTable, then you can select the string table row.
Perfect.
Awesome okay, i linked everything
now for example, how can i use another language to those
and maybe we should move somewhere else because this is for blueprints?
This is blueprinty. There's not really a localization channel I don't think.
Oh okay
this channel gets abused for everything anyways, I don't think it matters
First off. Organization.
It's probably best to keep your StringTables in one folder, or one folder tree. I have a UI folder, in it I have a StringTables folder.
done!
Go to Window in the main editor and open the Localization Dashboard here.
American Immigrant. π
heh
That looks right.
Down at the bottom, click on Gather Text.
Afterwards, compile it.
Will take a minute.
Oh. And add whatever cultures you want at the bottom as well.
Add another one just for tests.
Once you Compile, that's how it'll read what you can test in with the dropdown in the widget.
Okay i had green tick and clicked okay
Kay. Open up a Userwidget.
Should see a button at the top with a planet and "None" next to it.
That None dropdown should have both languages now.
I really want to know what this panel is ?
Perfect. That's how you'll see what people can see in your game when they run those languages. Setting language in the actual application is a little trickier.
the thing is that its still in english, the menu
that means i have to edit based on language?
You can use these. You'll need to know the locale codes you want to use. Best to put them in a datatable or Dataasset, so that you can also link them with other variables like the Text you want to display in the dropdown.
You do. Normally you would send this out to a translation company who is capable of handling that kind of translation.
However. There is an easy way to do it yourself if you want.
For translating greek i can do that since its my mother language
In the dashboard, here. The small buttons on the right, click the leftmost one.
yes, it says here 0 (100%)
You'll see things here if your Gather picked up your words from the StringTable.
For instance. My Finnish one looks like this.
is casting essentially reloading the entire actor or what?
in terms of performance expense
I dont really understand, that means others have to translate my texts and i just wait until they finish it?
isnt something to translate by my own like Play game > To greek
Oh
In your Dashboard. Change your slants to the other way.
Content/Game/StringTables/*
You mean create new string table with greek?
Your slants are left facing though. \
Try changing those. Then Gather. Your main culture should detect everything in the string table
This is a complicated question. Essentially there is no performance lost for CPU computation for casting. It's nearly free. The thing you cast is a pointer. It's a small memory address that points to an object's location in memory. The pointer can be the object's type or anything it inherits from. So a Character can be a Character pointer, Actor Pointer, Pawn Pointer, Object point. Casting between these is pretty much free.
The performance issue of casting is terribly explained, specially on Youtube and bad tutorials that just repeat things they hear. When you put a cast node into a blueprint, OR even just have a pointer to it in that blueprint's variables, then whatever class that pointer type is needs to be loaded up before an instance of the class it is in can be used. Unreal does this because it keeps copies of things it instantiates and copies them for use. These are CDOs, Class Default Objects. So.. In this case, consider Character. Character uses the CharacterMovementComponent. This means that before Character's CDO can be loaded, CharacterMovementComponent needs to be loaded. Essentially the issue with this stems into places where you load a ton of classes on accident just by loading one class. For low level classes this is fine, but a lot of blueprints point directly to heavy assets like the player's models, weapon models, textures, etc.
The simpler explanation is simply that casting has no CPU cost really, but it can screw your memory use out of control when used wrong. Correct use of SoftObject pointers can largely negate this.
Delicious circular dependencies
@maiden wadido you know where i can find localization names? such as en-US, cant find my own language
Try el-GR
Greece, or Cyprus?
Cyprus is el-CY, Greece is el-GR
wait how can I set up the input button to walk on PC
right now If I press w it just starts running
If you're talking about a Character, then the normal way is to change the max walk speed in the character movement component.
i cant find my language lol, english is working with en-US but i cant find Greek
it says here el-GR but it doesnt work on a combobox
Hi! Are you trying to cast to the character from the object you want to interact with?
I'm pretty new at unreal, but as i know you cant cast to other blueprints if they don't inherit from the blueprint you are trying to cast them, a way i use to cast to my character is to use a Get Player Pawn node and connect into the cast node as an object
Casting is just a question "is A an instance of class B? If so, let me treat it as an instance of B"
Im spawning a character i wanna posses later, but when i spawn it, it has no gravity so it just floats. Whats the fix to that? Cause i wanna launch it on spawn but launch character not workin!
Perhaps the character movement component's gravity scale?
Nah it's gravity is fairly high. It actually has gravity working when possessing the character, but refuses to move when not.
Having an issue with timespans. I have an amount of time in milliseconds, and I want to create a time span out of it then read the values. I can do this myself with a bunch of modulo statements, but isnt this literally what the timespan node is for? The output is -647ms. Worst of all, if I divide the millis number i supply by 1000 and pass it in as seconds; it works as expected. I get the correct time, but I want higher resolution than whole seconds.
if i supply Get Game Time Since Creation, which is an ever increasing float in seconds, i get garbage back out of the time span.
My first thought was this must be some kind of integer wrap around. But integers wrap in the billions, not the thousands.
FromSeconds
great! thank you! I dont know how i never saw that. I've been on the documentation all morning. π
it works perfectly in my use case, too! Thanks again
you're welcome
https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Utilities/Time/GetGameTimeinSeconds/ exists as well
Get Game Time in Seconds
hey guys
Anyone know how I could fix this issue?
Basically when I start running I'm still in the idle breaker animation
it doesnt stop the animation
Is the ProceduralMeshComponent can be traced?
hey
Why?
