#blueprint
402296 messages · Page 898 of 403
On the left you can see the mov speed variable amount
value*
Store any item identifiers as Name types
Yes
defintly dont store them as Text types, or String types
You're doing
RunSpeed = RunSpeed + 500
WalkSPeed = RunSpeed + 500
Which means that if you start with 1000 for both, you'll end up with RunSpeed = 1500 and WalkSpeed = 2000
Run speed is the variable, max walk speed is my actual run speed and max walk speed crouched is the speed when I slide down with the body to dodge
After setting RunSpeed, you are using the NEW Runspeed to set walk speed and crouched speed, so it's going even higher
Ok, but the one that is working correctly is the same type as the one that isn’t. So I don’t think it will fix the issue?
hMM
Just don't play Telephone with your identifiers. Just use one data type and stick with it. Whatever the data table wants as a key is a good bet.
Im not exactly sure if that is whats causing the problem. Either way, everything after GetDataTableRow is perfect.
So the issue lies before that
How could I fix it ?
I love you! Such a clean coding!
This is what smells to me

Also this is completly pointless
you can just plug the name value directly into GetDataTableRow
that should be unrelated the error, but just letting you know
That finds the row name, not the item name though. The item name has spaces, the row name is the same but without them.
The first bit is just checking if there’s anything in that variable. It changes depending on what the cursor is hovering over (if anything).
Do not store the item name, store the item identifier.
Think of it this way, the item identifer can get the item name
Item ID -> item name
it cannot go the other way around
Ok
what if the ID is apple_01
and the name is shiny apple
well that doesnt work now
Dont code your system to rely on the Item name being the ID
those are seperate things
The row name is always exactly the same as the item name, just without spaces.
Ok, I can switch them around.
While there is a good likelyhood that this is causing the error, there is just as much of a chance that this has nothing todo with the error. Either way, you should really switch them around yes. Always store the ID.
since the ID acts as the key to all other information
Ok
But again, if that’s why this variable is failing, shouldn’t the other one also fail for the same reason?
Making a settings menu and I want it to update live as the user changes some of the settings (such as FOV).
The settings can be accessed from in-game and the main menu, so I cast to the main menu gamemode to change the FOV there.
How can I cast to the player character to update their FOV camera live? This is from a Settings UMG object
Just that in the picture you sent, if there was an error, that spot would be it
This code is error prone as well. Even if this is not the error in this specific case, it will cause errors in the future.
So make sure to fix it
Ok, well thanks for having a look. I’ll see if changing that fixes things 👍
If it does not fix this specific error, come back and we can look at other parts of your code.
Ok, will do. Cheers!
Plug GetPlayerPawn into the Object of CastToThirdPersonBP
Do you know a way to make the new animation play over the old one ?
Like let's say i'm sliding but I interupt the slide and I jum
Jump
How can I do jump animation without keep sliding in air?
is that possible only with anim montages ?
why do some BPIs all for an object reference or message input and others do not?
both are implemented in their classes
never seen this before
oh its just an interface ref... nvm
The message version takes in any object, checks if the interface in implemented, and attempts to run the interface function on it. The BPI_Abilities interface version directly calls that function on the object.
I dont have an option with an object reference input, on the Rot Ability.
How to make it sure the yellow input is blue like the other one?
dont quite understand it but I do want them to be the same. I implemented them both the same way
im sorry I got my words mixed up before
does that make more sense?
The BPI_Abilities interface version directly calls that function on the object.
oml xD
but yea
Yes
Lets think of them as the message version, and the direct version ok?
You will always have the option to call the message version.
It doesnt not matter what object you drag off of, the option to call the message version will always be there. This is because the message version will just attempt to run the function on any object you plug into it.
How can I add an instance to a instanced static mesh without it colliding with other instances?
In order to call the direct version you must drag off a reference type that actual implements the function.
I am and its not giving me a message option
Then thats better, just call the direct version.
The direct version is the best option.
but you said id always have the message option so im confused lol
well in most all cases you should.
And im pretty sure you did also?
yes looking at those screenshots, I see both options
i dont have the message option for the pew abilities reference
and i want to know why. I think i may of had a cast to node for the Rot reference which gave me the message option?
that is the message version
the top is the direct version
You do have it
your not using it, but the option is there
And the other option gets the same node?
yea and thats why im confused lol
If so, then unreal is smart and automaticly turns that message version into the direct version.
Ah i see, thats what was confusing me. They are both in the BPI Abilites interface catagory then
So unreal doesnt even show you the message version if the reference you are dragging off of implements the function.
Either way just use the direct version.
but it still shows the inteface catagory 
lol ok can you tell me what the difference is? Why is one direct and the other one less direct?
very good design unreal
Just to make it clear, these are the same exact thing. Unreal just displays it twice.
to me, an object reference is more direct.
Those are the direct version.
oh perfect lol
that is confusing
im glad its not just me lol
use a trace before placing the instance. if blocking hit, do not place instance.
why doesn't this hide my landscape
because propagate to children might need to be checked
since maaaybe the landscape is a child of the root component
yup, good call! thanks
Take a third person character and move the camera up
you can open a thrid person template and paste in those controls to your current project, OR open a third person template and set gravity to 0.
Then he starts flying
set gravity to .8
Then he has gravity again
then .1
Still has gravity
Just falls slower
I just beed to be able to change the position
Like rigid movement
so you want wasd movement, and W is not jumping?
even though this is a side view game? like a sidescroller?
Your goal is unclear
Zero gravity means things can float
Well
Theres no jumping
Its just w moves up and s moves foen
Like climbing on a wall
Or do you want w to move you on z rather than x like wall climbing
Yes
Z
why is there no gravity?
Cause wall climbing needs gravity off while climbing or you fall
so this is a wall climbing game?
Stuff can fall from the ceiling
But the character itself doesnt fall
this is the movement I want
but then they slide when I press A and D
like they move but wont stop moving
and idk how to do W and S for up and down movement
Im currently modifying the default code for a sidescrolling character
just get world location and add 10 to the Z and set world location?
Yes
Trying to figure that out
Not sure how to change world position based on button input
could use other methods instead of Add Actor World Offset
anything about setting or adding locations
When I add get eorld location it doesnt have the x y z return values
Just a sungle one
right click and split on that 1 value
I see thanks
works?
Still setting it up
Not quite working
Its kinda like just teleporting super far up
Despite being a low number
I have a sequence on trigger , that is firing, at same time as another trigger with a 'similar' name, but definitely not..ue5,,is this a bug ??
Even .001 teleports it too far
screenshot the blueprints?
try "set world location"?
yep
whats wrong with that?
it like teleports back to a previous spot its too weird to even describe
but its worse than the other one
Actually
Its just setting the Z to that number every time I click w
I think
Idk exactly but it is making me teleport to the same coordinate
Nvm
Its setting x and y to 0
And does nothing with Z I gues
Wait na Z works
That works
How do I make it so it keeps going up as the button is pressed?
Because it only activates once on a key press
ah so youll need to go into the input settings and create input Axis
for some reason this doesnt work?? print string gets called but speed doesnt change?
did you try printing both values to be sure it is not changing?
i did
wait i am going to hook it up to event tick see if anything changes
so it works with event tick but wont work with left shift
weird
I do have these setup
@slate orbit use this to set up held down wasd
How do I get it to mesh with the other code?
help?
I dont have time to talk you through that. basically just plug your new W into the event graph and run the green Axis value to into a multiplyer node.
there is absolutely no reason why it should not work
I think its fine too. should be working from what youve shown
problem suddenly showed up after i ported to ue5
strange. what template did you start with?
nothing
from scratch
so if i use initialize blueprints sprinting works but almost non of the animations actually play
just the character in idle pose
It just makes the object fly up infinitely
When I’m not clicking anything
sounds like a different issue
yep i am looking it up
can barely help you with the first movement issue. Hard to know where there is a disconnect
input is being received because you are printing the string
its really weird tbh
just somehow out of the blue it stopped
btw this was the old sprinting logic
it stopped working so i switched to the logic in the other picture but that doesnt work too
super weird
ah replication stuffs
only adds to the confusion
make sure when testing solo that you arent controlling a client
im off for the day
cya! good luck
try in a separate project to be sure
Having an issue where I am spawning a BP at edit time using a Blutility, and then adding components to it. After doing all that, I call a function to return the actor bounds, and it seems to return inconsistent values. If I call that same function in the Construction script it works as expected.
does anyone know why the landscape/portrait button on the designer is greyed out? im using 4.27.2
How come the object can pass through collisions with this?
Everything else is working except that issue
Because you aren't sweeping. Why would it NOT pass through things?
You're telling it to move. It's moving. Why would it not?
Have you tried sweeping?
I see thank you
I'm trying to figure out if there is a way to output the properties names and current values of a Blueprint to a text file. Trying to take BP data into a spreadsheet for balancing...
Look into LE standard library
It has some CSV stuff
Property name might be a little tricky though. Unless you have some sort of structure with name and value
Hrm. Thanks for the recommendation. I'll see if that can help. Crazy how difficult this seems to be. lol
when focusing a widget button, spacebar will act as a click. How can I disable / change the focus key behaviour?
Hello, on my project (blueprint only) i would like to add the same behaviour for dealing with damage, for my 3rd person character (parent class character) and some statics objects. ( urn, statues...). how would i do that ? is there a way to add a "default behaviour" to an interface? or something
Short answer is no. You can make a base class with an interface for all your static things to inherit from, and script your logic in there.
Or for handling damage you can make a component
Or unreal actually has a concept of damage and death by default. You can use those
you will need to override game instance in c++ to override the default navigation config
i'll implement 2 version of my damage so, one for statics and one for dynamics
is the file I'm looking for "GameInstance.cpp"?
hello, I'm making a graphics option menu. How to store and load options that are not within the GameUserSettings object like screen percentage?
Should I use save game object or file read/write?
Draw rect
How do i get the last input key of a spline?
I thought "Get Input Key at Distance along spline" worked with a 0 to 1 range but doesnt seem to be working how i'd like
(Plz tag me if you respond to this 🙏🏻 )
You have to use mobile presets in the Screen Size.
No, you have to make a new C++ class inheriting from GameInstance class.
BTW I already have my custom GameInstance, any documentations on doing something like that?
need create a child to override the FNavigationConfig
remove the spacebar from the GetNavigationActionForKey function
then in your GameInstance you need to
FSlateApplication::Get().SetNavigationConfig(MakeShared<`Your new class`>());
in the init function
I spawned Niagara system at location from a BP actor. However, it doesn't show in the World Outliner 😦 I can see it on the level, but can't really select it and mess with it 😦
while you are at it you also can add wasd to ui navigation if you need in the ctor
I assume FNavigationConfig can be switched in runtime with that, right?
So for example WASD navigation applies to pause menu but not in commands menu
dint tried
opinions/metrics on performance impacts from running multiple objects with independent colliders that sometimes overlap, but no extra objects as all meshes are rendered... Versus.. generating consolidated collision meshes so you are not testing against [many] multiple objects, but instead running fewer collision checks, with the caveat that you are still adding another object into the scene
more specifically I guess, while this new semi-duplicate object for collision will represent some duplicated vertex data occupying ram, what's the cost for draw calls? or other aspects
in the extra step with the dedicated collision meshes you'd not necessarily be rendering them.. leaving that to other objects
?
Whats up yall
I'm trying to make a host game menu, but I'm not sure how I can make it so I launch a lobby without reloading or changing the level I'm currently in. Any advice?
Would this be a question for #multiplayer ?
Yes.
thank you
Is it a good idea to clear all children and re-create them in UMG whenever a state update happens?
no, on_rep in my case @tawdry mural
its a normal practice
ty
well, there's no shadow/virtual DOM or anything like in React, so yeah, I do expect to clean everything and add it all back 🤣
How do I get length of unique items in an array
like only the ones thats not repeating?
Get number of points
Don't think there's any built in node that would do that for you. You can make a function that'll loop through the array, adding unique values to a local array variable, then return the length of the array.
I'm just making the set to array and iterating over it now
hello, how can I connect this without getting error ? I wanna rotate an hdri
What's the error says?
can't say right now, cos im compiling shaders, but it was something with float 2 and float 3
Oh right
#graphics
I am keep searching but i cant see get material in landscape section of blueprint . Do we need to expose it via cpp??
There is get material aginst mesh compo then skeletal mesh then static mesh but no such for landscape , is there anyway to get the material of landscape via bp??
Im trying to get it via overlapping event
So turns out Knowledge Base has an article on it
https://forums.unrealengine.com/t/slate-customizing-navigation-controls/264954
This article was originally published for UDN Slate defines some default navigation key mappings in FNavigationConfig, which is used by most Slate widgets to process input events and translate them to directional inputs or accept/cancel actions. For example, both the Enter and Spacebar key, as well as the Virtual_Accept gamepad key (usually map...
You have to make a custom GameUserSettings class.
Which means you have to get into C++ territory.
Yeah I checked the original UserSetting code.
can any one help me with procedural mesh collision? It's doesn't overlaps.
hi. when we should use safe divide?
"This functions returns 0 if B (the denominator) is zero"
https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Math/Float/SafeDivide/
Avoids division by 0
Hello does anyone know how i can get material of landscape via overlapping event??
You can return the physical material with a linetrace atleast
So atm only physical mat is possible??
When you want to avoid a black hole
There is a get landscape material node when i make a variable under landscape category and thwn bring it on bp
But im unable to work ot with the other actor under overlapping event
Is using physical materials not an option?
Can we search particular letter with parse to array from phycal mate??
I yet have to check
Lwt me shw u what i got
It's what people commonly use to define footsteps and surface specific behaviours
yep i guess that could be last option with a custom overlapping event with a CPP
But you don't even need C++ing to get physical material...
do you anything about it??
ok I got it the landscape was a ref from level itself O__O sorry to bother
Hello ! Does anybody know how to access to the signed distance field of a static mesh in a blueprint?
Who has inspiration on how to set up a factory system? These are bots who spawn parts and send them to other bots to craft them into products. The products are fetched by bots that move it into the warehouse area, like forklifts. I am thinking a "gun system" and use "auto fire" to empty and refill the "magazines" on each bot.
I'm sure this comes up a lot, but how TF can I learn blueprints? I'm an experienced programmer, but the UE BP docs seem sparse and low quality, with blueprint nodes barely explained. Hovering over blueprints in the editor only gives basic explanations of functionality and return types. Any ideas/pointers? Where can I start?
https://www.youtube.com/c/MathewWadsteinTutorials/videos explains the functions of nodes and shows examples on how to use them. He's my go to source if I don't know what a node does.
He should be employed by Epic.
I'm sure he makes more working independently
Thank you I'll give these a go. Is there anything not covered on this channel, or does it pretty thoroughly cover most BPs?
Most of them. If you don't find an explanation for a specific node you can still ask here OR check the node's cpp implementation.
Is it easy to jump from a BP to its code-based implementation? Will the c++ necessarily even be commented or do you mean I'd have to step through the code to see what it does
Hey!
how do i use a post process under a river? im using spline based river if i extend the river the post process volume dosent // how do i fix this
You can double click a node to open it's cpp implementation. But that works only if you have editor debug symbols installed (~40 GB) iirc. Other option would be to search manually for the implementation in the source code.
The source is usually commented decently, but epic loves abstraction
Ah cool, yeah don't think I wanna download that 40gig
Lyra uses "CreateNewStaticMeshAssetFromMesh" that's found in the Geometry script plugin. I'm using the geometry scripting plugin, but I'm unable to call this function. for some reason it's not found (even tried copy-pasting), but it's in the plugin so i'm not sure what i'm missing
it's 50.8GB, but try just adding the engine Source instead of the debug symbols (252MB)
What do you mean "not found"?
If I search for the function, nothing comes up (but the struct for the input parameters to it does):
I spawned Niagara system at location from a BP actor. However, it doesn't show in the World Outliner. I can see it on the level, but can't really select it and mess with it 😫
Does Lyra use it in cpp or bp?
in BP:
Try copy+pasting the node.
doesn't work:
Is it a function in the lyra asset?
Not a global function?
Hmm, I guess not.
Shrug
It's in the plugin:
C:\UE\Engines\UE_5.0\Engine\Plugins\Experimental\GeometryScripting\Source\GeometryScriptingEditor\Public\GeometryScript\CreateNewAssetUtilityFunctions.h
got me confused 😦
i am using a tick to pass the location for a spheremask in a material to a object. this works well, however if my object starts moving very fast (its an airship) the spheremask lags behind, any idea how to circumvent this?
are trying to add it in the construction script by any chance?
You can try changing the tick group order of the actor/component
nope, just in the event graph
event graph of an actor or an uobject
actor, even tried the same actor as used in lyra, and tried from in a function (Lyra is using it in a function on the actor)
alright i will try that
if I check Lyra, GeometryScript has a sub category "AssetManagement", for some reason this isn't shown on my project. though i'm not sure why not
I guess he sort of is, being the tutor for Unreal Online Learning before the refactor
Yes(n't), it's accessible in material graph, but not in actor BP.
Hi All, I would like to set r.PathTracing.ProgressDisplay 1 permanently in my project. how go about doing this?
Mesh distance field is not super consistent (it won't work on Intel GPUs), so it should be used in more cosmetic manner - you can't drive gameplay with it.
its only available with the editor
you can call the function from a 'generated dynamic mesh actor'
Guys, is there a way to just select the default value of a static mesh variable?
urgh, I see now...thanks.
now i'm wondering how to create a new static mesh from a dynamic mesh. (the dynamic mesh has weird visual artefacts when it moves with physics, was hoping to test making it a static mesh)
no idea sorry, never used the plugin
Okay thank you ^^. I was looking for a tool that could evaluate if a location is inside or outside of a mesh (and also if possible calculate "how deep inside it is this is why i though about distance mesh field") do you have an idea of what i could use ?
What mechanics are you trying to achieve?
Mesh DF is only accessible in material graph, so the use is more limited to making effects (e.g. niagara GPU collisions, ripple effects, water shoreline, etc), as opposed to making a logic.
If I have 2 event dispatchers that I call one after the over, will all the bound functions from the 1st event be called and finish operating before the 2nd event is called?
For logic, you want to look for the collisions instead.
so will any functions bound to check name unused finish operating before input changed is called?
my AI isn't activating his walking/running animation
he just hovers over to me
i'm guessing his animations are tied to some other movement input or event?
if anyone is good at that stuff
I am developping a VR application and i track the position of the hand of the character with motion controller. My character wear a thick suit and i want to detect if the motion controller is "inside" the suit and replace it outside of it if it is the case
Then use collisions.
Change Level is broken, just takes me back to the start of the same level
Screenshot the blueprint?
MyLevel01 is in a folder called Levels, so I also tested Levels/MyLevel01 but that also sent me back to the start of the same level and not to MyLevel01
And I tried /Levels/MyLevel01 too, it did the same
When i use timeline, after a c branch i run the Stop >. But that doesnt trigger the Finished >. What should i do to Stop yet execute stuff after? Using Sequence?
if anyone else has this issue, using the DynamicMeshActor fixes this. going to see why it's needed as i'm not using anything directly
Are you testing this in the editor?
No, in the build
Hi guys, is there any way to take screenshot with path like this? HighResShot filename="../test.png"
i would like to put screenshot one folder before the current path
Okay, so you'll need to check if the level is being included in the build. Something along the lines of ‘list of maps to include in a packaged build’, within project settings
Other than that I'd suggest doing it by object reference instead of name
Hello, can anyone help me with possessing an actor or a pawn(?) on client? Seems like possession works but camera doesnt change.
Hey people, I have run into a problem, I have a system that basically creates text messages over interactable objects and npcs that says "press e to interact", it works with trace sphere and so far it works great, only one problem. I want text to appear around the upper side of the npc, or rather a bit upper side of the screen(or changing size of the text would work as well), but it automatically assigns the location and size so I cant change it, how can I solve this? (second image is an example, I want to text to appear around those three blue boxes)
also, text changes location depending on the rotation of the camera like this so moving it a bit side or changing the size could be a better option as well
is it possible to get a random value of enumaration, similarly to how you can get Random Bool?
it's kinda hacky, but you can try this way:
I think you can just plug the int directly into the enum
From the random in range
Ofc with conversions, lol
I've also seen people make an array and pick it from there
but you have to know your upper limit to generate random for int
but, yea, you can convert int into any enum via bp
Ofc yeah, just a more direct way
like this:
It still doesn't work, I added both the levels into the list of levels to include in a packaged build but it still takes me to the beginning of the first level. is there something i need to type differently in the Change Level node?
Level name should have no prefix or suffix, I think.
super helpful, will give it a read!
Yea that's what I tried, just MyLevel01, but it still doesnt work
Do you need to use that node? Could you not use "open level by object reference"?
How do I get a reference to the level though?
You just select from drop down
There are two "open level" nodes.
The one you are currently using takes name. Theres another that has an asset dropdown
Ooh, ok I'll try that one
PSA: set the material on the DynamicMeshComponent, or it looks weird when moving
That doesn't work either, still teleports me to the start of the level I'm already in.. wtf
Make a new empty level, try opening to there
Also screenshot what your blueprint looks like now
it still just doesn't work, i tried different levels, a new level, the template vr level, nothing works
@dense summit Sorry, sort of jumping into the middle of the conversation... if you've packaged the build, did you include the new map in the list of packaged assets? It will include all maps by default, but if you specify at least 1 map, then you need to specify all the maps you want to include. (Packaging->List of maps to include in a packaged build)
Yeah I tried both, first I had no maps selected there, then I put all my maps there, doesn't work either way. The trigger always sends me to the beginning of the level i'm inside, instead of changing to the new level
Is your map in a subdirectory?
Yes
why wont my functions in my main class show up in the child classes?
maybe are set to private?
how do i switch a function to public
it says public
it only shows when i clikc it on the overideable list
itll be there in all child clases if i dont do this right
Im vinterping 300 instances moving them in the horizontal. Is it normal that it starts lagging? They are simple planes with a texture. Im using a timeline.
I use the timeline then a for loop, iterate through them as i move them.
It lags a lot. Yet i've done everything to make it simple (instances / planes with textures). I cant imagine if this was actual 3d characters. Or i must be doing something wrong. Please help me.
For loop on 300 things every frame is not a great BP operation. Heavy looping is much more performant in c++
So i must go C++. There is no other escape?
Could someone please help me (a total noob) with some blueprint programming? I’m trying to make a drag & drop operation recognize the name of the object as a string, and find it in an array, and then set a different array element based on the string array index number. I’m running into problems when I try to cast this to my character pawn.
What exactly are you casting to your pawn..
Stat data basically making an input menu where the user can assign an INT value to a stat
Its a big spaghetti al tomato. But i can describe it. Its a blueprint with bacterias. Each blueprint has like 100 bacteria. Each timeline->for loop moves the 100 bacteria with vinterp. So i have 3 actors, with 100 bacteria, moving with 3 timeline -> for loop -> vinterp to.
(Strength, Dex, Con, etc)
Thats probably your biggest issue then :p the spaghettio
but its only when they are vinterping. And all 3 actors with bacterias at the same time.
3 actors with 100 bacteria
Grabbing some screens now
what are these bacterias?
sorry ive read now, why not do it with niagara?
What's a way to keep variables of whether an attachment is activated on a certain weapon?
For example AR-4 has a suppressor vertical grip etc
And then to check whether its activated by the player with a loadout
Clean up the spaghetti and show some code :p or move it to cpp
I went from 400 to 2k vinterping isms when i went to cpp
But 400 was 'fine' in bp
Ok i will work on that. But i must make this presentable. Because it is a mess.
Thats an option i forgot about. What should i look for? niagara instance static mesh? Will i have to do it all from scratch?
Is there a way to ask IN EDITOR for a file Path?
Hey, I am trying to access this variable that is in this HUD-Child-Class:
But I can not....
Im new to Unreal engine,so It might be the wrong approach ENIRELY, anyone can help pls? 😄
you need to assign the object an object reference to the Cast to node
based on that object reference it is going to check if the object is part of the class you want to cast to
u mean the "left side" at Cast To HUD_MainHUD?
what would this be in my example? 🙂
youre still in the same blueprint ?
the second part, no
you assigned a game mode ?
First part is in a HUD-Child Class
And the second screenshot is inside a Widget Blueprint
yeah i got a game mode
Error:
then plug a print string into each execute output
ohh my bad
i always call my player controller HUD
Surely you would just make functions in your widget then call them from the hud with that reference
@thin panther its not the same 🙂
its about understanding how casting works
Ye im not arguing with that
where did you create your HUD_Main_Hud in ?
They have a ref to the widget in the hud, then are trying to access the hud ref in the widget
Alright, lets back off this is my world settings(u can see the HUD_Main there)
inside the HUD_MainHUD I got this:
Ok
And now I want to get that variable inside a WidgetBlueprint I made
Different to wb character selection?
Well, I am new to Unreal Engine, I assumed that all HUD related stuff would be in the HUD class,no?
Yes then a get player controller into the get hud
Compile the hud?
done
Ive got UE open for a while..lemme restart, ive seen that this "fixes" stuff sometimes 😄
Ye it does sometimes
Why do you get the HUD trough the Player controller when its set in the GameMode
should be set in the Player Controller then xD
Wdym
The game mode sets the default class
The hud itself is tied to the player controller
You set everything here
and you get almost every of those references here
just not the HUD cause you you get it over the PlayerController
O M F G..i think I found a "bug"......
In the HUD i called my variable this: (with an underscore between WB and Character)
obviously I would look for WB_CharacterSelection in the Widget then as well....
Hey guys! Has anyone faced the issue: when I select "self" in BP, Details panel gets populated with all properties of self AND all components that this blueprint has. I think that's not how it works by default, but I can't find a way to change this... Thanks!
Ah yeah forgot about that
It auto treats underscores as spaces
But i thought it would have still shown the cintext tbh
j043ojc039u4q80t9fu3f89043fu8394q XD how can a noob like me know..... 😄
So I had it correct from the beginning.... 😄
unfortunately copy pasted WB_CharacterSelection into the search bar each time...
Okay.. its working now.... thats stupid though 😄 @thin panther @waxen gull Thanks for the help 🙂 Nice to see that after years of "unity quirks" I get to see them in Unreal Engine too 😄
You may wanna repost,so your post is the last and people can help 😄 as my "issue" is solved
No problem lol
why is the line not going in front of the camera
it's shooting at one direction but it isnt in front of the camera
Nvm
forums fixed it
Which channel is the best channel to ask about project structure? Stuff like levels, saves, key bindings for pause menus etc. I'm trying to make my next game in unreal but I'm having a tough time figuring some stuff out.
Anyone good with Json Files? Basically I would love to get an Integer/text/Whatever from a File into a PrintString onto the screen in runtime.
aka I hit the K key and I want to to show whatever is in Content/JsonFile.json
There doesnt seem to be many tutorials about this 😦 please tag me in responses!
for future reference direction vectors are normalised so they only travel 1 unit, to get the vector for more than 1 unit, you need to multiply it by however many units you want it to go
Because GameMode is the one that decides which class you use and a HUD belongs to a controller -_-
because
idc
GameMode
it is what it is
Need help
Basically
I'm shooting a line trace on every tick and I want it to do something when I press a certain key
But I dont wanna shoot the line trace when I press the key
I want it to always shoot it
Rn it's always shooting the line trace
But idk how to make it check if I pressed E
Hello everyone
Hope you are doing well
How to read json with arrays using structs
Created a rotation system for the skybox
Shift-Win-S
Also
LE Standard Library
when it gets to -90, it freezes
and doesnt rotate anymore
is this a known bug?
if I set the sunspeed to faster speeds, it skips -90 and works
if i set the sunspeed slower, it hits the -90 and stops
Can't see anything in your screenshot
Don't use pitch, use yaw or roll, preferably yaw
use a scene component to offset if you want
Pitch goes 90 to -90, yaw can make a full 360, idk bout roll
JSON with array
k ill try that
How can I read this in unreal please help me.out
Fill Data Table from JSON File
Start there
Unable to find in blueprints
Hello everyone. I'm having a little trouble with grabbing objects. I'm using a physics handle to grab an object and move it around. My problem is, when I have an object grabbed, if the player gets on top of the grabbed box and move the mouse around while grabbing, the object sends the player flying, exactly like garry's mod prop flying bug. The only way I found to prevent this was using a Set Collision Response Channel node and stop the box from colliding with the player while it is grabbed. But this is not the result I want, what I need is for the object to keep it's collision with the player, I simply do not want for both the object and the player to exert forces on eachother while the object is being grabbed.
Google is good at finding stuff
So what SHOULD happen if a player is standing on a grabbed object?
Nothing, seems kinda contraditory
The core of the problem is that character movement doesn't use physics.
Well something should happen.
cause Im still able to move the box while on top
Do they rise, float there, or fall
The player or the box?
The player is holding the box so both
the box pushes the player continuously, as if riding a sled
what do you want to have happen
I'd guess it should just fall
dig into the CMC physics settings but this might be super tough to solve with kinematic movement
Was thinking of just stop the player from grabbing the box when he gets on top
This is tricky indeed
Dig into the cmc physics settings and also the base and Can Step Up On settings etc
I need some math help with trying to get a value between 0 and 1 using regular math.
At an angle between 0 and 45, I expect the value to be 1
Between 45 and 50, the value linearly goes from 1 to 0
Any value between 50 and 180 should be 0.
I got a function to figure out the angle value, I just need a hand with getting it to stay within those bounds and interpolate between 45 and 50
That's the problem with physics and CMC, they don't really get along. If you used physics for movement then the grab would just be a constraint between the character and the object, and they'd fall together no problem.
Remap Range Clamped
RemapRangeClamped(Input, 45, 50, 1, 0)
done
Best math node ever IMO
Will take a look, I don't think I'll manage to solve this but worth a couple more hours, thank you!
If it was my project and I had to use CMC I'd probably just release grabbed object when stepped on
I see, i tried it and i am printing the right value but somehow the effect isn't there.
I'm using this in anim BP
Show what you got, what do you mean by "effect isn't there", it's doing what you want if you set it up right
I'm trying to make it so that the model looks at a target when the target is within 45 degrees vision
Print HeadAlpha, if the numbers make sense then your error is elsewhere
i did, numbers are there but the effect doesn't seem to want to lerp
yes
Show how you're setting HeadAlpha
Why are you doing trig, just use dot product
Anyway, start from the basics. Make sure your angle output is correct, then your remap, etc etc
yeah it is all there
at this point, the head alpha is near 1 but not 1
doesn't work
here is at 1
Test static 0.5
works
Are you testing by just typing the number in the node or setting HeadAlpha to 0.5?
maybe i used the map range clamped wrong?
oh
i re-organized it
it does jump from 0 to 1
it's always 0 and then 1
hmmm did the map range clamped fail?
Make sure nothing else is setting HeadAlpha
You're probably overwritting it yeah
you might be setting it, printing, then setting it again to 0 or 1
disconnect all sets but the math one
If you want booleans, bake them into that math (select node0
Hello, when I shoot my bullets too close to an enemy, or while looking at my feet, this happens = The bullet "pushes" the enemy, or pushes me. How can I do this please? Ping me if you want to help
That looks right assuming your trig is correct, just lose the other sets of HeadAlpha
well the false statement in boolean is always false. It's just a switch to follow or not. It has no consequence here
this part here
is the angle
between 0 and 180
This stuff
i work better in degrees :/
lose all that stuff
yeah, it is always true, but sec, i'll do it
Show the whole BP then
ah it's working but the angle is still too steep
going to try to make it a bit looser
You can use a power node to change the ramp too
wouldnt that make it go even faster?
This is JSON. I have 100 JSON like this. What method should I follow for reading these 100 JSON separate files data and how can I make user defined struct. Please anyone can elaborate
Already told you, either import them into a data table or get one of the BP JSON plugins
So now bake a boolean into it with a select node
@faint pasture that worked, thanks!!! xoxox ❤️
if you want head turning to be able to switch on or off
and yeah i know i can use the 0-1 dot product but working in degrees is way more meaningful 😉
I do my day/night cycle with an actor with the planet, sun/moon light, and all that
Fill Data Table from JSON File
Can you have my anydesk access for a while
Yeah, im just hacking something in while I work on the rest of the stuff
I will be really thankful to you
so this works for now :P, but yeah, we will move to a BP actor so I can control everything when we add in weather and all that jazz
😛
Zombies first
😛 then skybox
You can't edit data table at runtime, just read up on data tables, you can just import from JSON in the editor
Yes I want this
Can't import JSON because I have to create struct first. But unable to make struct there
Why can't you make the struct?
I have an array of attributes with string values
Should I make enum
Or unable to import
Just read up on data tables, you're totally lost right now.
Okay
Thank you
Can you do me a favour please
While accessing anydesk
Just make a struct while seeing my JSON. I will be really thankful to you
Yes I am lost from last 8 hours and no progress
Can you just take my anydesk
And do a little stuff for me
I just want to send an updated
And have nothing to show
I won't
Lemme just get my rootkit updated
You need to learn it at some point
Can someone verify that "Create Event" is working in the latest UE5 release? I am not getting and Drop Down Menu (Function Signature should be correct)
refresh the node that you're trying to create this event from
tried already
dumb question but how do I make a string array variable? I want an instance editable list (custom combobox) but when I search array I don't find one for the string data type.
refreshing everything restarting engine
I am using a c++ enum in the signature without TEnumAsByte
could that be a problem?
will check that, thanks!
Removed the Enum completely. Inputs are now only bool and one structs and output is a bool as well. Still not working
I have checked with an example that should work (LE Extended Standard Library Sort Array) Not working either
So either I am really doing something very wrong or the current engine has a bug
Better way to word it, can I recreate this as an instance editable variable in blueprint only?
?
I don't think so, but maybe I have it setup wrong
you will have to regenerate based on your array / set
Yes, but I don't know how to create an instance editable array like the one shown in the screenshot where I can add/remove indexes and change the value of them
just add a string variable and make it an array
@gentle urchin As we talked, i tried to isolate the section of my blueprint as best as possible to show the problem.
Im having issues with performance when vinterping instance static meshes.
Since vinterping and instance static meshes are supposed to be cheaper, i dont understand why this is happening.
Im moving around 100 instance static mesh copies, and they check if there are others too close to them. If there are they will spread out.
This is based on javascript flocking tutorial of codingtrain - separation.
Pls help me solve this issue.
https://blueprintue.com/blueprint/ptfdsr2f/
https://blueprintue.com/blueprint/bnzlqyfm/
Hey friends, quick question. How do I combine My input axis move right/left with input axis forward/back to get this
The node in your screenshot doesn't represent the thing you want. One way to handle what you described is to get axis 1, get axis 2, pack them into a vector 2D, and see if the vector length exceeds whatever threshold you want.
Each input axis mapping has its own getter function
So you don't have to use the input axis events per se. You could check the inputs on tick e.g.
Can I get the index of an enum? I want to convert the fullscreen mode enum to my string combobox by setting the index of fullscreen mode to the index of my combobox.
Oh. And how would i just get the InputAction Movement?
Uhh. Input actions are different than input axes
You define them in the project settings
Input section, IIRC
An axis is analog, and an action is digital (a button)
Actions fire pressed/released events and the axes provide a new value every frame
So the screenshot depicts a button mapping that someone called "movement"
Oh that makes sense. Well sort of. Atleast I understand how he did it then
True. I'm trying to make him change state on direction change. That's why I needed it as an action
State = SomeFunction(ForwardVector, Velocity)
or
State = SomeFunction(ForwardVector, InputVector)
InputVector = (InputAxisForward, InputAxisRight)
Looks good. Well.. i was following a tutorial you see....
I'll try for sure
Thanks guys ❤️
These dont happen to be Character childs by any chance?
Your trouble isnt the VInterp tho. The rest adds a significant cost to it, especially in bp
Along with the nested loops. 100*100 is 10k already. so you're doing 30k loops each frame
I'd like to hear your case against tutorials
They are all instanced static mesh. They are planes with texture.
Good, atleast. But as noted above, you're doing 30k loops
no wonder it goes slow
so what can i do to keep them separated.
i thought this would be cheaper
better i mean
you can easily do 300 ism instances without any trouble (no reason as i see it to divide it in 3),
but you're doing a Loop for each actor with a nested loop per instance with yet another nested loop per instance
30k distance checks
but i need to do so, no? to check if my instance is getting to close to the others, and to make the separation. i check if any other instance is close to this instance, if it is then i add this vector to make the separation
so each instance will loop 100
cheap in singular, but at these numbers its quite expensive
if you do "stat uobjests" in the console
you may get some info about the cost of them
ok so what do i do instead? do i just allow them to overlap? it looks ugly 😦
i need to make them keep a distance between each other
Moving it to cpp will save you some performance
there are cheaper methods of checking distance, altho less accurate (so prob ugly still)
cpp!
but they all move relative to each other do they not?
like a pack
can you see the video?
yeah
they move independently
wasnt sure if that was on purpose
Move it to c++ and you'll see ~10x performance
assuming you stick to the same logic
10x prob is not enough tho
i understand. but i dont think it will fix it. because i intend to have many many units. thats the main challenge
so i will maybe let them overlap
yup. do you have any other alternative suggestions?
Not really. What you're trying to do, assuming you're intending to have 'thousands' of units, is very hard to do
i have an alternative that is, just checking if a certain ammount of units is overlapping. and if they are, i spread them out from the center to the outside
its very cheap, but not the most accurate
and i had a ton of work converting that javascript tutorial into blueprint
if you can use distanceSquared instead, you can prob shave off some perf aswell
ok will try that. thanks a lot
Is it possible to override variables (not functions) inherited from parent class? I just want a child class to have a different default value
Set what exactly?
I can't make a variable with the same name, and there is no 'override' button like with functions
Anyone knows why I can't find this node in my blueprint actor ?
trying to make multiplayer widgets work
this causes two widgets to appear on the main client, instead of one on each
anything else, or blank
gives me "that's not a local controller"
I'm trying to find out what I'm supposed to use instead
when I put in "get local player controller from ID"
id 0 because not splitscreen
I get no widgets at all
and an error saying that calling viewport returned none
thanks
I'm trying to attach the Spring Arm of the camera to my Character's mesh, so that it follows the body while being in a ragdoll. I've been given this answer, but I have no idea how to make the blueprint itself (still learning the basics of blueprint, despite having done a handful of tutorials). Any tips would be appreciated
i found it nvm I'm stoopid
Right after you call the logic that enables ragdoll mode, use the AttachComponetToComponet node.
The Target is your Camera componet
The Parent is the mesh componet
Nevermind I didn't find it 😭 I thought "Cast to ---" would help but it infact did not :,]
literally just wanna access the score in the FirstPersonHUD file and increment it when an enemy is killed 😂
I don't know how to get a variable from one file in another*
In order to access any information about another blueprint, or call any functionality on another blueprint, you must first get a Reference to that blueprint.
You need to get a reference to your FirstPersonHUD. You get one as a return value when you create the widget. Best is to store the value in a variable to access it later.
uhhh okay, 1) Thank you guys for answering and 2) What do you mean when i create the widget? what widget- I'm trying to use a "Cast to FirstPersonHUD" currently but all i can do is set it not read it ;-;
Yes, when you create a widget using the CreateWidget node. That node returns a reference to the constructed widget.
Also you need to add it to your viewport (Add To Viewport)to see it
first i should probably ask what you mean by what a widget is
what exactly is a widget? I'll look it up if you don't wanna explain but i figure it might be faster to ask
Widgets are the name for user interfaces in unreal.
currently I just have it using the draw text function in the preexisting code, should I not be?
ohh okay
You might want to look into that entire system.
Unreal has a whole system for building UI
but before that.
You need to learn the fundimentals on how blueprint communication works.
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
ughhh okayyyy thank youuuuuuuuuuuuuuuu both of you 🙂
How could I create a Box Structure from component bounds?
min = box extent --> negate vector
max = box extent
I forget if extent is radius or diameter so to speak... you might have to divide the vectors by 2. Do some testing to figure out which one is correct
if you need it to be world-space rather than relative, add the "origin" to the vectors before feeding it to the Make Box node
the origin is the world-space location of the box's center
I have a slider control in a widget that has focus and when I press left I want it to navigate to a custom function. This works fine, but I am trying to figure out how to get the slider control object from within that custom function. I feel like I'm missing something obvious. I was going to try to use an input parameter for the custom function and pass in "self", but didn't see any object like that.
Near the name of the slider you have to tick a box and the the slider will appear in your variables
I'm trying to use a generic custom function that doesn't get a specific slider variable. Using Left Navigation for the slider control I am calling that generic custom function. I want the function to just use the slider variable based on the slider control i have selected (I will have 3 of these sliders on my widget that would call the same custom function when pressing Left).
Can you send a screen shot ?
i'm not sure i understand your goal
there is only one slider in the widget ?
3 sliders in the widget. Taking screenshots now
So that is specifically using the Sound Effects Slider variable like you first suggested. But I instead want to have that just reference the current slider that was pressed Left or Right
Maybe you can do 'on mouse capture begin' set SoundEffectSlider to slider1 or slider2
I may just end up using 3 branches in there and check which slider has focus to increment or decrement with specific variables. Was just looking to simplify it a bit.
I know it appears like I'm just replicating what the slider already does, but with a slider you have to select it to change its value. I am ultimately trying to change its value when it has focus. Thus removing the extra selection action. (I'm using keyboard and not a mouse)
Oh okay i understand what you're trying to do. Honestly i don't know how it could be done. You might want to try a on hover node
but i don't know if it would apply to a slider
How can I cycle through an array when I press a key?
Keep track of the selected index with an integer variable. Increment it when you press a button. When it selects an invalid index (there's an Is Valid Index node that'll help you), set the index variable back to 0.
Press Key -> Index = (Index + 1)%LastIndex
Just need clarification, the below is my JSON. I have created struct for entering this JSON file into data table. Name will be integer. And how we will define attributes array in struct?
{
"name": 1,
"attributes": [
{
"trait_type": "topColor",
"value": "Brushed_Aluminum_Top"
},
{
"trait_type": "baseColor",
"value": "White_Glossy_Base"
},
{
"trait_type": "furnitureAccentColor",
"value": "Tan_Furniture_Accent"
},
{
"trait_type": "trimColor",
"value": "Green_Trim"
},
{
"trait_type": "logoColor",
"value": "Tan_Logo"
},
{
"trait_type": "Flag",
"value": "Checkered_Flag"
}
]
}
it would be an array of structs
if anyone knows, how much can you link bp's with actual c++, are they interchangeable?
What does that mean exactly?
me or the json 😄
you
You cannot access BPs from C++. You can access most things in C++ from BPs
BP is on top of C++. You can't access BP stuff in C++.
so you cant alter bp's on the fly at runtime from cpp?
You can "fake" it with Getters or BlueprintImplementable/BlueprintNative events
thats the template thing than i guess?
but you can't direct access methods or fields
Nope.
whats it called macros?
no
it's a one way communication between cpp and bps
so you create a bp, template it so to speak but theres no runtime alteration of it?
prebaked 😄
Think of C++ and BP relationship as you programming a microchip in a circuit.
If anything BP is kind of like electrical engineering.
well no, those are precompiled
no restrospection at runtime 😄
but you can communicate between?
BPs are just a layer on top of C++
You can communicate back and forth but only in a specific way
You can call C++ methods from BP
You can "call" BP methods from C++ but only if they're already declared in C++
The way you communicate "back and forth" is modifying C++ variables that BP can read, and having implementable events. But that's pretty much it.
well yeah thats logical, cant call what hasnt compiled
well you asked if it was possible lmao
are these systems generally used seperately then?
no, they're used together
well yeah 😄 can you communicate 😄
No.
what do you mean "communicate"
wait no theyre used together or no you cant communicate
can i use c++ to communicate with bps
simply put
define communicate
can you send variables/state changes
yeah you can do that
Yes.
If it is declared in C++
You can't just make a BP with a variable/method and access it from C++
tbh I felt like this is borderline trolling action
ikr?
but can one alter the other
stop using random terms
ask what you want to do
and don't say "alter"
or "communicate"
here's an example
UFUNCTION(BlueprintEventEmplemantible)
void test(int bpInput)
here you can pass in an int using bp
i think i asked quite clearly can c++ communicate with bps and vice versa
The level of abstraction was too much, more than that given by UE4's codebase
👍
just keep in mind that c++ cannot access bps
i get that
all i wanted to know is if there was a way to communicate between the two
limitations obvious
no use making a game with bp's only not to be able to extend it beyond bp capability
well yea, that's a given
...well you;d say that...
😄
let me ask a simpler question perhaps
what not to use bp's for?
In short:
✅ BP can read C++ variables that are marked BlueprintReadOnly/BlueprintReadWrite, and BP can override C++ functions that are marked BlueprintImplementableEvent
❎ C++ accessing BP made variables and functions
