#blueprint
1 messages · Page 7 of 1
ANyone have any insights?
your using the wrong foreach, that's why it's error probably
i fixed all of them thanks buddy
but now i have another error
i dont know what to connect to it as it has nothing from the begging not connect
what does it say when you hover over error
the error message its there
ya it says font 0 is invalid ?
hmm, how is your structure look ?
I never used an enum, i have no idea about that, but 0 as byte should be ok seems to work without error
its okay thanks alot for your help will keep trying with it
i'm still learning and am new to unreal i'll get to it eventually when i need it
i believe it this switch on enum issue
he read both foots as new enumerator 0
and i can't find that switch on enum when i search on it
Idk how to explain this to you further. You can increase it by any amount you want, I just gave you an example, didn’t say copy it verbatim
switch on (name of your enum)
finally no errors here
thanks alot
now lets fix the animation blueprint 
I'm using the default third person template. I'm trying to add a Hit animation that does damage when a person presses a button.
- I created a new Input Action(IA_Hit)
- I updated the IMC_Default to use IA_Hit
- I now when into my Character Blueprint's event graph and added
EnhancedInputAction IA_HitBut I'm not sure what to do here and how to hook it up to my Animation Blueprint?
Add the stuff you want to happen when you press the hit button
Presumably play an animation/montage)
You're saying to just play an animation directly in the Character Blueprint? @faint pasture
As opposed to using the Animation Blueprint?
I created a Play Animation node on my triggered and now my character won't return to the idle animation set in my animation blueprint
Anyone know of good tutorials, that guide you through making abilities without coding i.e. mostly using BP's? I just wanna play around in a 3rd person template.
Or is there a better channel to post the question in
sis you play animation or montage ?
i would try montage
i had a problem with the animations on hit reaction as well, i noticed some games just leave them out and have particle effects or something
also someone mentioned to me about blending animations, i tried it didn't work
Okay good to know. I'll try a montage!
You're on the right track
Data driven would be something like a data table which is a giant list of structs, and your game objects look up their properties on the data table
The alternative to that would be object driven, where each object has the values plugged into it before the game starts, which sounds a lot worse, but can actually be better
But in regards to taking damage, you almost definitely wouldn't want your health variable to be inside of a struct that would be annoying. The purpose of a struct would be to load or pass information in chunks
@whole timber Bp is still coding. There are plugins on the marketplace to eliminate most of the c++ but it doesn't require much to begin with
how do i get a reference to a Behavior Tree Task Blueprint?
neither google, people in call, and chatbots seem to have 0 info on how I can successfully compile this "is task executing node"
Dispatches would be more convenient for you but interfaces work just fine as well both approaches are acceptable
Hey can someone help Me I am trying to get the variable zippolit
into a different blueprint
but I am not sure how to properly cast it
I want when the Zippoislit
I can then light the campfire
probably reverse sequence one and two or put them on the same execution after the first true
Ok thanks
reversing it fixed it
thx
Does anyone know how to make the camera rotating only in Z axis when I get close to a collision? Now it zooms in to the character when I'm close to a wall. In my game I can freely rotate the camera in Yaw direction only, and when I get close I want the camera to change its position that I kinda look from the top
How would I change the character’s animation/movement using blueprints? For example, when the player character is holding a gun, instead of running like normal, the arm that’s holding the gun stays still?
i imported a pile of texture images, and in the process, unreal decided to group/pack/etc.. them in groups (presumably according to filename) such that i have 1 texture with around 10 source images. how do i access these images from this single texture in my material blueprint?
yeah wtf, when importing a single image, unreal decides to go hunting in the same directory and automatically pulls other images around it with similar filenames
does this obnoxious behavior have a name so i can go turn it off?
maybe #ue5-general
i fixed it by moving the image into its own directory and then dragging it into unreal from there (to hide the other images from unreal's grabby behavior)
He looks so sad
Anyone know why it dosn't work?
The healt float is set to 10
is the cast failing ?
yep...
Try get player character
the best way to map your health onto a progress bar btw is to do current health / max health
THANKS, idk why its work but it dose
that will always map it to a 0 - 1 range
oooh, am just learning UE so am just trying bunch of stuffs
thx for the advice
you likely didnt set the owning controller when spawning the widget
Well, spawning the widget look like this.
What difference is between Get Player Controller and Get Player Pawn?
well one returns the player controller, the thing that routes input and possesses a player pawn
oh
Sorry that I am bothering, but i still cant figure our how to do this.
I'm assuming you have a max health value too?
Somewhere
Otherwise you wouldn't know the maximum to heal to etc.
i have a calmp set to 100 and branch
Well you need a max health value. So make one real quick. Then you can replace the 100 with it
And then in your progress bar just set its output in the bind to health / max health
so just create structure with curret healt and max health
Woudln't structure work better?
sorry to disturb,, is it possible to make a append ui on UMG
that you can add pin in game?
like a expandable item box.
and i can write on it
OK, AM OFFICIALLY DUMB. I didnt realize that Health/MaxHealth meant to DIVIDE
Ah we've all been there :P
but yee, thank it's work now
Np
Not sure if this is a basic solution, but anyone here know how to get a gamepad to use On Click events for the UMG? I have my controller joystick axis moving the mouse, but I need to have the Gamepad Face Bottom to click a button. If there is a way, can someone guide me please?
Has anyone here used the pelengami dash vfx pack and found a good solution for clipping through walls
So, when i know i need to use a PlayerController and when to use the input setup on the player bp ?
controllers sit above pawns, just imagine if a pawn didn't have a brain, like a zombie... it can still be damaged and die, but it won't do anything because the controller (brain) isnt doing anything... the brain can be you the player pressing buttons or an ai behaviour tree
stats like health keep on pawn
To begin coding?
so unless i have different pawns controlled by one player, is good to put it on the player controller
I ask that bc most of the tutorials follow the Unreal Template, where they but it on the Pawn BP not the controller, and i saw some people saying that was a bad practice from unreal
I am struggling with another dumb math problem...
I am trying to set the extents of a box to a size in multiples of 100 units, but I can't figure out what the math needs to be. I am very tired
blueprint's can get messy quickly, it's good to keep things like spawning huds in the HUD class, brains in the controllers, attributes in the pawns...
if you start doing multiplayer or split screen you'll need to do it this way as well...
if you want to use pawn possession nodes you'll want the inputs to follow the controller into any pawns it may possess...
you miss out on being able to child your players pawn class for your npc's to build off of and will be forced to write code twice
i'm new game to programming, so there's probably tonnes of other reasons, those are just some i've run into
100 units in all axis? or just X and Y?
just x and y
and z is always 100?
I think I needed to do R*50+50 to offset my box by the first 100 units of size
hey y'all rn i'm having trouble finding nodes that basically makes an actor look at where the cursor is pointing at, but the only solution i could find on google is just get hit result under cursor by channel (which will reset the actor's rotation if you look at the sky) so i was wondering is there any other way to do it?
Why would it reset the rotation?
Hold on lemme show you what i meant
This is top down I imagine?
For get hit result under cursor by channel, yes it's (better) for top down
But i'm using the third person template
Why
Because i'm not making a top down game?
Then why do you need it to look at the cursor itself
i'm trying to make the arrow look at where the cursor is pointing at cuz it's supposed to shoot something out of there
This is relatively straightforward.
you first need to use a linetrace from the cameras forward vector to get the look at hit location. Then use the node get unit direction from the player's head to the initial hit location.
this would basically be the setup for thirdperson aiming. It allows the aiming to still point realistically.
Wonderful, thanks dude
I just realized you mean the cursor position not the camera forward vector. But the concept is the same. Instead, you would use the node: "GetHitResultUnderCursor" via the player controller.
Ah oops sorry if my explanation wasn't clear enough
But the damn black background is still there..
I have a post process inside my blueprint and i want to control its bloom based on a variable , how to do such thing? It cant find bloom node for the bloom settings out of it
Hm, so anybody any insights on issues with world partitioning and attached actors - or more specifically "Attach Actor to Component" not working at all neither in construct nor begin play?
Since converting our map to use world partitioning (we used file per actor from the start) all attached actors that are attached this way stopped actually being attached to their parent actors.
Also tried shoving in a delay to see if its a loading order issue, which it doesnt seen to be.
Whats stopping you? You can just get the pp volume, get its bloom setting and set it
I would just create a custom bp actor that has a pp volume
Hi quick 911 question 🙂
I have one Savegame object and I am saving two different material slots out.
Problem is one material slot is over writing the other one.
So which ever material is written out last over writes the first one.
I cant seem to write it twice once to one material slot and then to another.
Both my material slot names are different and are correct.
My save game txt file looks like this:
BoolProperty ¸B<«ãPAJ¢ic¹uW/ Section_6_Part_3_customs_save_1_Savegameobject ObjectProperty J #“ tüž‘CšÊz"x%òF /Game/Materials/WQStation/M_Stationlight_3_Inst.M_Stationlight_3_Inst 6_Part_3_chosen_saved
BoolProperty ¬úŒoB¶£X’¶¬ None
So when I load this saved version back into the game, both material slots are filled with one material
Do I have to create a 2nd savegame object?
Or is there a way to seperate the two material slots?
Blueprint , i want to do it as a blueprint based on variable instead of selecting the pp itself
Yeah then you can do as i say. Create a custom bp with a pp volume. In your custom bp you can have variable that drives the bloom. So it would be float
Thats my question, how do i drive the bloom , whats the node
You just need to access the pp and do a set member in the pp setting
I tried get setting > set setting , no bloom in search or as a member
Show where you get stuck. A picture will give more chance for you to get help
Show a picture on how you try to access the pp setting, and show the pp setting you are trying to change
To answer my own question YES you just create another savegame object to separate information written out. Problem solved 🙂
2 savegame objects for something like that feel terrible imo
What's stopping you from using 1 save game object
Might as well just create another variable for the other material instead doing the whole savegame object
Thanks, I will look into that.
I found a way that works at least 🙂
I have 2 different variables.
het guys i have an image where the edges is transparent
im using it as a UI image
but when displayed on the UI there transparent part is gone
its fully visible
how do i make it show the "transparecny"
like this is how its shown in the ui
if i want my grid slot panel to be of particular proportions based on a FVector2D how do i calculate the rows?
i can calculate columns with % but im not sure what to use for rows
tried this with x being 10 and y being y
i get a checker board effect
Loop within a loop is probably easiest.
First loop Set last index to: X-1
Second loop Set last index to: Y-1
Connect the first For Loop's Loop Body to the input of the second For Loop.
Connect your widget creation to the second For Loop's Loop Body.
Connect Your "In Row" on the "Add Child to Grid" to the Index of the first For Loop.
Connect your "In Column" on the "Add Child to Grid" to the Index of the second For loop.
So if you have X = 5 and Y = 3 You'd end up with 5 rows of 3 columns.
right yeah, i asked openai and it gave me a similar answer. i used this method before in another project too and then forgot all about it 
Division for row, modulo for columns
Index % RowLength = ColumnIndex
Index / RowLength = RowIndex
yeh ive done that too but it doesnt offer the same amount of control over how many rows you want
unless i was doing it wrong
Hello everyone, I am trying to do root motion movement, but the screen is flickering on the client, can you help me?
Any idea on how to approach generalizing this?
Context: I will have an "infinite" number of npcs that should use this code - montages are exposed as vars, they will be retrieved from DT. The problem here is I could have any number of notifies and adding n pins to the switch isn't the best idea. Any idea on how to better pass functionality no matter what the montage notify name is?
What is the best way to create functionality for children of Button Blueprints? I have a parent class, "BP_Button" and want to create children of that class with different functionalities but what is the best way to continue the code after the button press? Do I just create an event in the parent class that I listen to in the child Blueprints or should I use an interface for it or how else could I do that?
EventDispatcher that sends over either the button's ref (I'd recommend that so you can pack it up with whatever data you require), or a "tag" or something. Then you can use that wherever you like to listen to the button being pressed while also always knowing exactly which one was pressed.
Hey folks, has anyone set up an Analytics solution using a blueprint-only project?
@high ocean iirc common conversation buttons already do that as part of the on clicked dispatcher
idk what you mean by "common conversation buttons", maybe a UE5 thing I haven't yet picked up on yet
Sorry meant Common ui* plugin is the next step up from basic umg. Similar to how enhance input is then next step above the legacy input
Hi guys!
I have a question, has anyone here idea, why my code can't handle the cast to 3rd person character node?
Like, the code going well to string "1"
I have no idea why this code don't work properly
probably an issue with your object ref, how are you setting it
Do you know what casting is?
Your cast there is just checking if ObjectREF is a BP_ThirdPersonCharacter
If it isn't, it'll fail
So how to setup it?
I need to take the variable from third person and set it here, for third person character blueprint to know, that the variable changed
What class is this code in?
Print string on cast failed. Then check if there is error in your output log
Yeah, there is error, but still, idk how to fix that
Check your object ref variable type
You can probably use actor for the variable type
On cast failed print string the value of object ref
Casting is a type check
I heard somewhere that creating variable that's type is object will always work with casts
And most of the times it worked, but not today
I also have a casting issue for some reason
My object reference is wrong as a user widget object reference (I know that much) but I didn't create an individual reference for the widget to be created and I used another blueprint to host all widgets on one blueprint and those blueprints are created with the picture on the right so I'm not sure how to get the correct reference
I'm also able to jump in a call since no one has been able to help me with this issue yet
You might be looking for Get Player Pawn
And what can I do with that?
Pin it into the object pin
Yeah! It worked
Idk what's the differance, but it worked
Thanks 🧡
You're grabbing the exact instance of the possessed character you need and there is a reference to it through that
while this is a bandaid fix to your problem, watch the blueprint communication video pinnedd here. You have a fundamental lack of understanding on how a cast works and what a reference is.
You first solution was not working because your Object REF waas unset
this means the while it was a type able to be casted, it did not have any reference contained within it
True
You want to create a reference like I have in my second picture
Ironic that I can help with others casting issues and not my own 🥲
You can think of the Object REF var like a box, that only allows certain things in it.
You said "Make me a box that only allows Objects in", but didn't put anything in that box.
What a cast does is check if the thing in the box is of a more specific type. If it is, it gives you a reference of that type. I.e. is this object in the box a food item, if it is let me eat it.
What happened with you, since the variable was empty, is the cast looked inside the box, found nothing, so failed.
@frosty heron ^
Internet caught up and I realised I don't add to anything 🤣
Box-> cast to see if the objects fits a narrower, more specific box 😎
Anyone can help with my issue? haha
What's Ur issue? If cast failed just print the value of the variable
what is alternative of Engine Rotation Speed in chaos vehicle component?
Well the thing is, the widget exists and displays in game. Does this mean that a reference has been made? If so then I don't know where it is
If you need the widget ref like you say, get the reference of that other blueprint, (it should be the HUD that controls it if you've followed good practice), then get the ref from there
then from the parent widget, you can access the refs to child widgets
So hud that controls it is in playercontroller. That's where the second picture in my op is hosted. This is what my layout looks like in MainHUD, you're saying I can still get the children from here?
yes
with the ref to MainHUD you can get a ref to Stamina and Fatigue
personally, I would make a function on mainhud that does what ever in stamina and fatigue so you don't mess around with ref hell
Just MainHUD->MyAmazingFuncThatModifiesStaminaAndFatigue()
How can I add physics to my Actor? So the actor will fall on ground when I start the game?
Did not know I could control children from a host BP. Thanks for that!
Although it does still fail to cast 😦
show the updated code, im not surprised your intial exmaple fails
all you should need, is no cast really, and just get teh mainhud ref from the controller
(I would consider handling your player facing ui in the HUD class btw)
is that screenshot in your player controller?
because you have 2 different variables there
the one in your player controller is called PlayerHUDref not PlayerHUDRef
Damn, literal naming convention hell
Casting a type to it self?
Nah this is hosted in top down character
That's what the note is saying I bet
You are most likely casting a bp main HUD type to bp main hud
So it's useless casting
Yeah read what it says
Hmm, so how do I get a reference to my stam bar then?
By getting your stamina bar
Finish blueprint live communication video pinned in the channel if you havent
Gives u a good start
The ammount of time you spend figuring out why things don't work probably more than the hour needed to understand how to cast and how to get reference from the video
I told you, get the reference to your hud from the player controller
then from there you can access the child widgets
a cast is unneeded if the var type is "MainHUD"
might want to do a validity check beforehand
or even better rather than messing with the child widget, just makea function in MainHUD that does what you need
also like i said
Will do after this final thing is done
I made an event that starts an Animation everytime the character fell from a certain Height. But for some reason, whenever i fall off a height that starts the event, after that, every time i jump and lands it also performs the animation. It's like it's still thinking its falling from the minimum specified height i set, eventho it isnt.
show code
What could be causing the "Height-check" not to reset every time i enter the falling state?
This seems like the best practice, will do this quickly
sorry for the mess
You probably never reset those bools
How would I change the character’s animation/movement using blueprints? For example, when the player character is holding a gun, instead of running like normal, the arm that’s holding the gun stays still?
You should have a look at Animation Blueprint section for that most likely
Looked on around on the web a little, cant find much on "Resetting a Boolean" what other terminology could i best use to find some learning material on the subject so i can figure this issue out?
set it to false(Or whatever default state it is)
Im not sure i entirely follow, i have set the Landing to false after the animation is played. Is this what you mean|?
if i lower the delay on the check speed, it seems to be less of an issue. Would this be a performance issue down the line? (having the delay set to 0.01 for example)
Im lerp transforming an actor to a an actors component location then setting a constraint, But When My actor is moving its causing the constraint to not sit at the correct position , whats the best method to solve this?
I've put the whole function into the MainHud blueprint, Where would you recommend that I call it? It needs to be after the rest of the functions from the TopDownCharacter blueprint
whereever you were going to do the thing with the stamina bar
hi guys. Sorry but i need help abit for understanding, so in this blueprint, when i activate my anim sequence "Throw", my set "Is attacking" is true but if i didnt use it, my set "is attacking" is false? sorry im kinda dumb but please help to understand. did i get it right? 😅
That would be in TopDownCharacter, Here's hoping I don't get a cast issue again
you shouldnt need to cast
you have a reference in the player controller, it would be non sensical if it wasnt already a MainHUD type
You want me to call it in the player controller instead?
Does Unity have some sort of newbie bugbear like Unreal does with tick and cast?
If I go to a Unity server what's the thing that all the beginners are hung up on?
I don't remember having issues with Unity since there was descriptive documentation everywhere and almost a tutorial for anything you wanted to do
player controller. the new version
its complicated and its buggy at times
Hi folk, I am having some troubles with blueprint structs
I am trying to update a variable inside a struct, but it doesn't update it
so I basically have a Effects Struct and Effect Struct, Effects Struct has a list of Effect with their names. I want to update those structs variables inside a foreach loop, but the way I am trying (which you can see from the image) doesnt work
No.
You said you had a reference in the player controller to the main hud. You showed it.
You're gonna need it to call that function you made, so, where you were doing the failing cast, replace it with getting the hud ref from the player controller, and calling the function you made with that ref
I am open to any suggestion or recommendations
I made these structs for the purpose of regeneration/effects over time in a kind of generic way
for example currently I am using it for Stamina and Health regeneration, I just push an Effect named staminaRegen by 5 amount of ticks and 1 power to the list, and it just regenerates 1 stamina for 5 seconds
BUT the problem is, it doesnt reduce the ticks
so it goes forever
Hello guys! Need some help, a VFX partner wants to have almost all objects in the scene static, but we need to adjust the orientation and position of all objects when the scene loads just once... Have any sense to change from movable to static during runtime? Is that even possible?
Hi guys. How could I spawn the same component from a blueprint multiple times?
it really depends on what you are doing, the way I did mob spawns was spawn an actor which had a construction event on spawn that creates the mobs and then destroy the actor after spawning them
I have a plane with a texture on it and I would want to spawn 2 or 3 of them in the same area (not position ) to create the effect of distant rain
Anyways, I also had a question!
I was looking for a way of doing a handful of timer events in a logical way that isn't going to be real bogged down, I came across this: https://forums.unrealengine.com/t/executing-every-second/18789
I'm a little confused because they didnt show an example.
I'm thinking that on game tic he's counting up an integer (from lets say 0 to 10000) , when it reaches 10,000 reset it back to zero, then any other event that runs on a timer looks at that and says "okay every int1000, this event fires) or whatever, does that sound right?
Looping timeline with event tracks
oh I gotcha, sorry I'm not at a pc with unreal on it.
The way I would do it would be
-spawn your "master rain" actor
-construction event that takes the actors current location, applies a transform, then spawns a plane with the rain element on it
-repeat a number of times depending on the effect you're looking for
is there any reason you can't just use timers?
As far as I understand, if you use a loop with delays, it waits until the loop is completed to go to next tic, i'm just trying to build this right the first time because more or less everything will feed off of these timers and I dont want to rebuild the whole system if I implement it wrong
If you start a timer on a loop, it doesn't stall the tick until it's finished. Timers use UE's built in timer system for calling an event/function x amount of time later.
yeah right now I have a simple SetWorldLocationAndRotation which works fine but now I can't figure out how to repeat it with slightly different values
I was thinking maybe of a sequence?
There's a "random integer" node you can use
just take that, multiply it by like .1 and then add it to the first location, boom, new coordinates right near the original 🙂
you can even retain the original Z so the rainclouds are all at the same height if you like
this is the current set up I have (second ss is the relocate node)
Yeah I can try it that way, I read that using those timers on a loop may be iffy but maybe thats only if its firing very quickly, I can have a ton of objects reference the same event so they aren't all running individual timers
That is true, for some reason I'm not able to get the reference seen from playercontroller to TopDownCharacter
there's a bunch of ways of doing it, my way was just how I would 🙂 are you going to be spawning rainclouds by input or always at that one location?
I'm not sure why starting a timer on a loop would be iffy. It's not something I've heard in the years I've used UE. What are you wanting to use timers for?
the way I thought about it is to be yes at that one location
oh in that case you could just cut and paste your spawn event stuff a couple times and modify the location, its kind of a chunky way of oding it though
Hi guys, i need some help with a project that i'm doing, i'm doing a building project but its an augmented reality project, i've used the handheld base and it's working, but i want to create an bp to make a light switcher, like turn the HDR off and turn the lights of the building on
Idk if this is too hard, but i would like some tips or a tutorial that i can follow to create this
i was trying to recreate the buttons with a event function but i honestly don't know what i'm doing
so I found a solution, I realzied that I have to set the variables through a fresh struct variable, then assign it to the map I am using
well as an example, right now I have a 1000x1000 grid where I spawn tiles and designed a system where it despawns and spawns tiles based on where the camera is so it isn't rendering a million grid actors all the time.
now next step is mob spawns, example: if I have 1000 mobs on fire, I dont really want 1000 timers running, I feel like I could set a world timer to fire every second and apply fire damage to everyone with the "on fire" flag in one pass
More or less I'm just trying to build each system so that I'm not limited by scale if possible, lol
I got it to work doing this, unfortunately the functionality isn't working so back to drawing board
your issue lies in the reduce stamina bar size
What I did was move the whole function over to MainHUD so what I'm going to do now is only have this part in the mainhud area and the rest of the system back to topdowncharacter
well your missing the execution
I probably should have print screened before I took it apart
Yea, you could just have a manager of sorts that has a function that's called every x amount of time and does something.
Definitely better than having a timer for each NPC.
Ah well it works now, But it absolutely demoloshes the bar in a split second haha
lol
you'll have to manage how often you call to it 🙂
True, its definitley down to mechanics of the system over the functionality now
Yeah I've played way too many games where the whole thing breaks down when things get active, I'm just trying to have a solid foundation because I'm "sure" i'm going to be dumb stuff later
another question, is there a better way of doing projectiles than checking for overlap events? I was thinking since each mob will be roughly cylinderical I could just check x/y distance instead and that may be more lightweight
Collision detection is pretty optimized. You're not gonna beat it in Bp
Is there any way of modifying the editor so I can press a button on the controller and start running my game and also focus into the game?
Are you gonna code using a controller ? 😀
Hello everyone, I am a beginner in UE5 and I am asking for some help.
I need to when looking at a mesh to highlight it and when looking somewhere else to stop highlighting it. I achieved this using this tutorial https://www.youtube.com/watch?v=NOLgy-evbEw.
Now what I need is to create a widget and only show when I left click on highlighted mesh and stop showing it when I click somewhere else in the scene. I would be thankful for any suggestions about any tutorial, or any other suggestion from someone that can help. Thanks in advance.
Welcome to our Highlight and Pickup Effect/System tutorial!
We cover the process of highlighting objects by adding them into a custom depth pass, using the player controller to determine if an object can be picked up/ outlined and spawning/ removing objects in the world when necessary.
Outline material Tutorial:
https://youtu.be/m7DpYnWQbKI
...
you have used widget before ?
Yes I am actually creating one, what I need the most is the code how to make it show up when clicking on the mesh.
you want the reference to the widget, then "add to viewport" i believe
to remove it i think it's, "remove from parent"
you want to "click" on it with the mouse ?
Does someone know a more efficient way to check a variable from another blueprint which isn't the character
I want the zippo lit variable from another blueprint
without casting to it
That's right
Also I can get an error when the bp_zippo doesn't exist yet and I am trying to get the variable
yo bro can you help me
your trying to get the variable of another bp ?
yes
lol
if this object isnt guaranteed to be valid, just is valid it.
I did but is valid before it but still got the error
though you have slightly larger issues if you're always casting to an invalid class
I put it inbetween cast to bp firstperson and cast to bp zippo
show
ok
oh wait nvm, it checks out why thats happening
if your is valid fails, you continue on to the next sequence where you access the var anyway
this shouldn't be a sequence
So… did you die or are you going to ask your question
i forget h
I JUST FIGURED OUT THE AWNSER i'm crying rn
if the class can be invalid casting to a base class that has the variables but no assets is a decent way.
The other way you could avoid these hard ref issues is an interface but I don't reccomend it personally
no more error so thats good
there is still something wrong though
when that cast fails, a bp zippo is permanently in memory, meshes, textures, and all
you want to avoid this, as it can easily blow up the memory needs of your game
so make a base class, which only has the variables, no asset refs or anything
can someone help understand how to perform a line trace from the mouse position? this doesn't work i think i'm missiong some math, i'm not hitting the red cube currently
i'm doing this blueprint to try a light switcher in my a.r project, idk what i'm doing wrong, i want to turn off the skylight hdr map with a button, can anybody help?
tbh you can remove that sequence and is valid most likely
is there any chance you can guide me along because I am not too sure how
Its a long road
lol I mean all of it is wrong
only at a high level. it is just making an actor class that is a bp zippo without the assets. then your bp zippo inherits from the base
You’re binding an onClicked event to on vis changed for starters @unreal wind
it just ensures that when that cast fails, the only thing being loaded is a few kilobytes of variables, and not megabytes of textures
ok
Any idea how i can make an event that only happens if i look away from 1 object: For example i want to spawn 1 enemy or move 1 enemy if i look away and don't look at it?
A dot product
so the one with no asset inherits from the one with or other way round
other way around
what do you mean?
Use the DOT product
hi guys. Sorry but i need help abit for understanding, so in this blueprint, when i activate my anim sequence "Throw", my set "Is attacking" is true but if i didnt use it, my set "is attacking" is false? sorry im kinda dumb but please help to understand. did i get it right? 😅
Worth googling but basically it helps you check if the direction you’re facing is the same or opposite of the one the other actor is facing, from which you can infer when you’re facing away, tho you might need to add a check to make sure you’re not looking at its back
what about the "ConvertWorldLocationToScreenLocation" Function
by ue
thanks, realized now
Not sure if that would work with this but maybe
theres a couple ways to do it, but that seemed to me the simplest and works, not sure if there is any quirks about but it works
still doen't work for me, but i understand now that some math was missing
Its just something I wouldlike to stream line. So many clicks to start testing.
Is there a way to get the "RowName" from a DataTable ?
Do you want the row name of a specific row? Or the row that is associated with a specific name?
my brain cant comprehend, sec 😄
maybe me explaining the issue makes it more obvious 😄
You might be able to change the shortcut in editor settings not sure
Alt+P is default
Shouldn’t need to click on it
I'll try it in a moment.
Set input to game mode only , immediately followed by game mode and UI if you’re having window out of focus issue
I got a data table based on a struct.
Now i get multiple rows via a name (GetDataTableRowNAME)
This gives me an array of said struct.
Now I save this struct to a save game.
Now I change,lets say the icon, in the data table according to the 2nd item in the data table. If I load the savegame it still has the old icon for it, so I somehow need the RowName now of object 2 to update this data
hope this makes sense 😄
I need "this name" (red underlining)
my idea would be to add RowNameName (as a string to the struct)or something like it and just copy paste it each time,but that seems stupid 😄
I don’t think you can update DTs at runtime, but I could be wrong. As for editing struct, you’ll need to use cpp, bp structs are not reliable
I am not trying to update DTs at runtime
I am trying to "update" the struct in the savegame with the new data from the Data Table
and i cant do that if the struct "Farm" for example knows its own RowName
It would work for most building in my screenshot,but at CowHerder - Cow Herder we would have an issue.
I am basically just asking... if i do this:
does the OUTROW have a variable that I am not aware of that says "Chicken Coop"(its ROW NAME)?
Not sure, why don’t you break it and find out
I think a better question is, why are you even saving this data in a save game?
ive done that, and it doesnt have that, it only has the variables i defined in the struct 🙂 thats why im asking if theres a variable im not aware of 🙂
Why do you have 2 sources for data where one is authoritative and one isn't?
cause each building has variables that change during gameplay?!
I don’t think the engine would hide any variable from you 😀
Sounds a bit atrange ill admit
hey you never know 😄
I don't mean all teh values. You have a name that relates to an icon. You don't need to save this icon because when you load it, you want to reset that icon to a new value anyway. So the question becomes, why are you even saving the icon?
I mixed 3 or 4 dts to make this as fluid as possible
So a building only has a base row ref and an integer for its upgraded stage
i suppose he is looking to saving runtime data related to a building
the DT has info like whats the name of the building, what is its 3d Model, whats the icon of it etc.
the SaveGame has that PLUS variables that change->like an inventory
Yes
them models better be soft refs
I got that
having a map or array to with the row name as keys should be enough
you dont need to save the whole row struct 🤔
and thats what I am asking for 😄
, Comment and Subscribe
if that struct is a FBuilding i probably would make a FBuildingSaveData with a few array or maps that saves the state of the building
So upgrades should be its own table
With a new mesh, texture, and production values or whatever
i said icon, not texture
Its the same woll
you click in a building menu the icon of the building.
and right now I have PLACEHOLDER icon...... now lets say my graphics guy comes and replaces this... this means i have to delete the entire savegame
thats what i am doing, but i need the RowName
i know
You should have a ref to the row for static data, and icon swaps would never be an issue
It would always read the latest and greatest
that "ref" would be RowName
thats why i am asking if i can get that
id take the ID of the row too if possible
Don't save the 3d model and icon and all that into your save game...
Only save the dynamic stuff.
Yeah like if you change the icon in editor, it’ll change when you run the game anyway no?
I guess I'm back to answering questions again, What could be the reason why the function at the end is triggered instantly instead of waiting for the condition in the branch to be met first?
Not if they save the struct and not the dt row...
that 🙂
Then the save will have whatever was there at the time of saving
not really possible as the flow of execution is left to right
You shouldn’t be saving stuff that the players can’t change imo
Thats what we're all kinda saying
You should look up database normalisation and apply it to your data structures.
yoyo we got there 😄
Eyyy
And what they really are asking
however that will evaluate nearly instantaneously, so it's likely youre incrementing very quickly
For my setup? 😂 some days discord chats are a mess
That's what I figured, except the function is executing on start. I've looked all around my blueprints to see if there is an extra call but nothing
No probs , i got that ^^
Okay, so we found out im doing it wrong fundamentally, back to the basic question 😄
how do i get that one?
ye i assumed as much 😄
what is the value of total stamina consumed ? default
or maybe you change it for some reason
0, It also requires moving for a few seconds to get it to 25 too
so that i can save that into the save game and next time the game loads it loads it from that
You should have 2 lists. 1) static data that doesn't change. This is loaded from your libraries/code/whatever. It is identified by a name "Farm" or whatever. 2) Dynamic user data that is dependent on your game/player/whatever. In that, you might have an array of owned buildings, in which there might be the name "Farm" along with other dynamic data, like if they gave it a custom name or colour.
are you currently hard selecting the rows for each of the building?
And that name "Farm" links the 2 lists.
thats why then. you're asking if 25 is greater than stamina consumed. if stamina consumed is 0, then yes, 25 is greater than 0
do you want you value >= 25, or 25 >= value
i think you have it flipped
if you make it a variable, and store it on the building, then when you save, you can know the row handle
"it"?
She, the variable
Ohh yeah, I need to switch the pins. Dohh!

Yeah thanks for help haha
but thats the question, i dont get it as a variabale in the first place 😄
np :D
a DataTableRowHandle consist of the Data Table reference and a Row Name, so instead of hard selecting on the bp, you can make it into a variable
when its time to save, you can use this variable as the "identifier"
Mechanic works as intended now, Now I will spend hours and hours in the tutorial section to never leave again! I've reached a milestone in development, Next part of development involves using character physics so will probably go to c++ for that one
Lets go through this step by step:
I do the screenshot above
Then I have a struct
now i save this struct
now i load the savegame
The Input Pin of "RowName" in "GetDataTableRowNAME" needs a variable now
.....one sec, i think thats the answer from @remote meteor that he just posted... the DataTableRowName
brb testing... this is new to me(the handle thing) but from what i can see its the variable im looking for
Unless blueprints would be better for physics based coding?
Haven't done the research yet eitherway, will probably do so over next few days
sometimes im confuse about the phrase "physics code", are we talking about simulating physics or..? 😅
this would mean each building gets this variable(preferably from the parent) correct? and all the children just have the value "RowName" changed in it? e.g. the 3D Model of a farm gets a RowHandle with Farm, the Carpenter gets Carpenter etc.... I think this is it 😄
New var of type data table row handle
Selected in the building defaults
In this case, I aim to do weapon handling with the mouse axis. A bit like Mount and Blade but more directions, will be the toughest thing to do so far so I'm going to do as much research as I can to avoid missing basics as I have done so for many months
Added and implemented in your bp_master_building, parent of all buildings
yes yes yes,this is it 😄
thank you !!!
so, an aim offset for upper half body kinda? 3rd person movement, similar on how fortnite is?
Ahh, melee weapons I mean
@gentle urchin@mental trellis@lunar sleet@remote meteor Thanks to you all 🙂 we figured it out, now i gotta fix a lot but thats fine 😄 The "DataTableRowHandle" is the variable I was looking for and didnt know how to describe 😄
fortnite does have melee weapons, and the way of handling this doesnt have much of a difference between a sword or a gun
I meant flicking your mouse in a certain direction will cause the melee weapon to go in that direction too
new question
Does it make sense to create an array inside of each projectile, then add the actor to the array on overlap, and check against array on overlap event to verify that each actor is only hit once by each projectile rather than every tic they overlap?
I want to destroy gun part when this triggered
If you only want a projectile to cause damage to a specific actor once, yea, it would make sense.
actually, if its a projectile based, please do, when anything moves, the overlaps and hit can fire very quickly
Yeah, I'm looking into how overlap events work to see if I should reduce the scope before checking or anything
I figured its better to put as much into the projectile as possible because there will be a lot less of them than actors... probably XD
depends on how the projectile behaves
does it bounce? pierces? destroy on projectile stop?
Yeah, all sorts of stuff like that will be added later
Right now I'm just looking into handling 1000+ actors and shooting them as effeciently as possible
maybe set a reference, then destroy actor
how do you fix the issue with when using mouse to control the characters camera, after like 10 seconds or so the mouse no longer controlls it and you have to re click on the screen?
controls*
Are you changing input to game mode or something?
yes, i have just two inputs put in and this is the blueprints
Set input to game mode only is a node, I’m asking if you’re using that anywhere
do i need enhanced inputs for even something this simple?
yeah i tried that
and than changed it back since it didnt work
That could cause your window to lose focus is what I meant
Tho generally only when you start the game
you mean "set input mode to game only" right? thats what i tried a few mins ago
i can try again and show if need be
well no, if that’s not it it’s something else
yeah i always have that which is fine where you have to click the screen to use inputs but after like 30 seconds or a random amount of time it doesnt register inputs and i have to reclick the screen
I would make sure you didn’t accidentally put it somewhere else as well
i dont, this is just a test world so its very limited. Its only on the left/right camera view i can still use movement and stuff when it happens and i dont have to reclick the screen sorry, instead i just have to move my finger off the left to right on my mouse and do it again
maybe change the mouse sensitivity?
Doubt that’ll do anything but 🤷♂️
same idk
please help
these two are not working
its just resolution settings why is it not working
its very simple
i click and nothing happens
im not sure if anything happens but i cant see it happening
i tried standalone game but i still cant see a change
is there any mistake though in the code?
put a print string right out of the event on clicked, see if one fires
just try one
maybe for some reason it's not clicking
Is there a way to get a Select node to stop throwing errors when encountering null references on the branch that DOESN'T get executed? Other than switching to Branch
select node WILL execute both paths regardless
switching to branch is your only option
Hi guys, still trying to make this work, i want to create a bp where i can turn the skylight off and then turn all the rec lights on
can someone pleeease help me
for one thing your exec pin isn't plugged in
Watch blueprint live communication video by epic. It will help you understand
😦
where it should be plugged?
there is no execution going into that cast node, the white lines
And there's no way to make a local macro or collapse the node graph and add an exec node to its input/output? Oh a collapsed graph can have exec nodes, nice
It will not work in pie iirc. I'm not sure about stand alone. Best to check in packaged mode. If that still fail, check your screen mode (windowed, fullscreen, etc)
follow the advice given by Cold Summer, even with connecting it, this will never compile nor work
i just started watching
read the errors/warnings
I would try to help when I can but when I see things are thrown randomly like that, I felt like some helpful videos are due lol
absolutely
hello, i am trying to
const FGameplayTag Tag = FGameplayTag::RequestGameplayTag(Attribute.Attribute);
how can i do this in blueprint 🙂 thank you (i searched and failed)
You’re trying to add a new gameplay tag ?
hey guys, its me again
ive set up a way to move an object in the same direction as the player's velocity, but what im looking to do is more as to move it like you were pushing on a specific part of it, meaning to also include rotation
this might be difficult to explain, but if any of you would have any ideas or input to give me id appreciate it
i already have the tag
its basically a currency.gold currency.silver etc
RequestGamePlayTag <-- i'm guessing your getting a tag and trying to set it to variable tag ?
what is Attribute.Attribute ?
do you just want to check for that tag, or you want some value in return if it finds it ?
not sure it's helpfull but there is this
so i've saved the tag by converting it to an fname, now i want to turn it back into a tag
i was doing it via that c++ code
I don't think that exists in BPs
You might just want to expose a static function for it
ah thanks
Hey i seem to be running into a issue with player controller animations, i set up my blendspace with 8 way directional movement, and sprint, and the input are working and the animation i choose seem to all have root motion on, but for some reason when i walk the seem to still snap back to like some origin every few seconds
Unrelated to your issue: You probably shouldnt cast on Update Animation, it calls every frame just so you know
If its always in memory, its practically free
what event would you reccommend? @winged pier
I mean there's still no need though, you can cache it in a variable on begin play
True that
Begin play
In animation blueprint it's Initialize or something like that?
Any idea why in WidgetBlueprint i cant see the button click events on details panel ?
Youre in the designer tab, you need to go to the graph tab. Click the checkbox at the top of the details first, and make the button a variable
@winged pier ty so much
Hi
Using the VR template UE5; I was trying to follow this today, but for some reason I am not successful, perhaps I am not doing the target point right in my project
Can someone please help me on who to add in the menu, a specific button where we click and teleport to a specific location?
#umg for widgets
Can anyone explain to me, why I can't find the "ThrowObjREF" from spawn actor?
Yeah, but the tutorial that I'm currently watching do excacly this, and works perfectly
I find that hard to believe but if you insist: if you’re watching a tutorial and it works for them but not for you, watch it again, you likely missed something
3 times watched, so here I am
Ah You’re trying to get the mesh from the actor, not spawn the mesh
That was confusing for a sec
Yeah, something like that
I have a sphere that is my point where the "rock" must start the throw moment
Your throw ref is in the Third Person Character bp
The former is a component on the latter, which is the actor
Oh, maybe i understand, I must to check one thing
Yeah I get it
That's the problem with names, the tutorial same "sphere" is not the sphere I thought about, everything works just fine
You’re trying to find the rock’s throw point on the flashlight as far as I can tell
Yeah, most tutorials are crap
Official learning portal or MatWadstein, maybe some Ryan Laley are solid, the rest is a throw of the dice
Not all of them, but for begginers they can be confusing sometimes
Ryan Laley, my mentor XD
Matt Aspland is good too
Anyways, thank you for your time and help 🧡
Hello, I'm having an issue with trying to make a perform light attack blueprint within my player BP. It won't play any of the animation montages I have it set to. I'm new to using blueprints and have been following a tutorial, but somehow this won't work
So Macros by default will only let you pass a copy of a variable? How did I never realize that before? Lol
I guess I'll have to make this a function then....I'm wondering if the same thing happens when you collapse a function into a Node? I'm wondering that because I've tried to do that in the past and remember sometimes having issues with it suddenly not working and not knowing why. I'm thinking it wasn't a bug as I thought at the time but simply that it was passing a copy of something I was trying to modify
you have a default slot in your anim bp ?
or is it printing Attack Montage Not Valid ?
Did anyone know how to properly save "Primitive Component" data into variable to set it outside the Blueprint?
It's not printing that anymore after I selected my montages
Is it possible to set a niagara decal through a damage_type?
I need the primitive component class to use it for physics linear velocity BUT I want it to be a variable that can update itself, what Primitive Component to use it on
Idk anymore lol. I'm trying to get to the bottom of it. Because I need to modify some things and I want to make sure I am not just modifying copies.
References and Blueprints don't mix very well.
Just assume it's by value. Cry a little. And plan accordingly.
I never understood how the input key system should help me with interact with my lanthern.
"input key system" ?
Do you mean #enhanced-input-system ?
Hey. I got this problem where the class reference array has to be connected into the blue array socket (marked with ERROR!), but I couldn't find any way to do it. I need the array to be an object reference for the next step which is "Find Nearest Actor". The reason why I couldn't just make the array an object reference from the beginning, was because I got "Editing this value in a Class Default Object not allowed"
Do you mean these? They fire code you set to come from the Exec pin when you press the key in the title of the block. This screenshot was taken inside the player controller.
That system is deprecated
It still works but should learn EIS asap
and EIS stands for...?
No I mean, I have a Lanthern Actor BLurprint into my third character blueprint. I want to control it by the interaction key E, I set the input etc... but not able to control it
The error kind of says it all
You can’t Set that Array and feed it nothing
why is the PhysicsHandle's Set Target Rotation half worldspace and half localspace?
the Z is always the same and the object rotates fine, but the X and Y rotate along with the object
im losing my mind
You could use get actors of class if you’re searching for a specific class to look at but I don’t usually recommend using that, might be fine for this case tho
so you couldn't just get an array of actors that you can plug in ?
I can't create an array as an object reference because of "Editing this value in a Class Default Object not allowed", and all the array elements are grayed out
you probably have to make the array
loop through the classes, get all actors of class, loop through, add to array ?
i would make a function
or ig you can just collapse it but i like functions
Does anybody have any idea why this isn't working correctly to reorient my wind vane to the wind direction?
Its never enormously wrong but it's never spot on either as the wind direction is clearly visible in the waves.
i didn't test it but something like this might work
Why not just make an array of soft object pointers instead since that's most likely what he/she wants?
Sounds like he wants an array of already placed actor instances
Did you figure it out on your own?
I'm trying to add a mapping context to several local players, it work's when I run this code from the pawn class:
But doesn't work when I run this from the player controller directly:
I get this error:
@lofty rapids It didn't come out the way I meant to, no harm meant
How can I add the mapping context to the player controller instead of to the pawn?
idk what soft object pointers are anyway, i'll have to look into it
I want to handle input from within the player controller and from within the pawn
well i think they need specifically an array of actors to plug into a node
Is it not possible to add a mapping context to a player controller?
Yeah hard to tell, I interpreted it as wanting to handpick items already placed in the level
no idea
Like an unloaded pointer. Saves on memory from what I understand. If you want to use it later, you actually have to explicitly load the reference it’s pointing to
the only problem is that doesn't plug into the find nearest actor node
Sure it would, you just have to load them and then create the actor array
Make them derive from one class
Make one actor that’s of class A and then child B and child C derive from type A
i was setting up my wall jumping for my pretty standard third persona character and started with just touching the wall and sliding
but idk why but this does not work
do you know any reason why?
Then when you want to store a reference, you just specify that it has to be of type A. And then any object/class that is of type A or and child of A can be stored in that variable. Welcome to OOP
It's totally fine to not be specific, you only need to be as specific as your needs. If you only care if it's an actor you can store it as one
Ok this is really weird:
Adding a delay unit next tick works, when adding a mapping context to a player controller
When using a pawn, it works immediatly :/
can i expect a material containing a "per instance random" to vary if i create meshes with "add mesh component" or do i need to use "add instanced static mesh" for my meshes to be actual instances that can vary said property ?
Can someone show me how to sync up a third person player model to a firstperson camera with the arms perfectly syncing up with camera movement without the camera being attached to the head? is this possible
I dont want that spine to move at all
Is this possible
you just remove the attach parent from your mesh
you want to sync the camera with the head?
What makes you so sure the waves immediatly respond to a change in wind direction?
anyone know why this (negitiveSpeed) bool i have set up wont work? I've been trying to set the X vector to when it turns -1 it plays my backwards animation
forward vector returns the forward driection of the player, not the forward velocity
Any idea on how I can trigger something in another blueprint?
I mean, this lanthern is a blueprint outside of the third character, with his own code and we don't have it in the being, so that why it's outside. I will want to open and close the light, with F key. Input is already settup with the new system.
do Get Velocity, then get forward vector, then multiply them, and then check if its greater than something
ahh i had that set up right above just didn't realize and bet bet let me try that
GetChildActor on your BP_Lantern
I don't think you need the Get Unit Direction, just plug the velocity straight into the multiply
Depends on how you wanna do it, you could have an event in the character called ToggleLantern or something that the lantern can listen to(makes the lantern toggling non public which is nice) or you can have the lantern have a public function for toggling it(anyone can toggle the lantern now)
Technically, don't matter because the game is single player 😛 but how I can access the function, it not reference
GetChildActor?
The lantern itself has the code for toggling on and off the light right?
i switched it now and got it to work bless
@meager spade yes
Is it one event for off and one for on or is it the same with a bool or what are we dealing with?
actually, remove the break vector and just get the vector length instead, otherwise it'l only work when the player is facing a specific direction
I had a function, deleted since it isn't worked
but isnt the X for moving backwards? because when i have the print string i face forward and move forward and it puts out 1 but when i face forward and move backwards it puts out -1
drag BP_Lantern (ChildActor) into the Event Graph, Make a GetChildActor node, then Cast to BP_Lantern. This will give your access to the BP_Lantern functions
if you are facing the Y direction in world then your forward vector would be 0, 1, 0 instead of 1, 0, 0 when you are facing the X axis. So if you are facing the Y axis then the X float that you are getting would be 0 instead of the actual forward velocity
do you know how the forward vector works?
it pretty much gets the location of a point 1 unit in front of the player
so it's not always 1, 0, 0
oh okay okay makes way more sense
@flat raft I heard about to cast is nnot really a good idea... better to use interface... no?
You heard wrong
Don't create a interface if you don't need it for multiple classes
Unecessary overhead imo
Only reason I would have an interface for a single class is if I really need it to be used from a base class
you mean, by acample, lot of item can be gatherable, now you use an interface
example
Yes
or door etc
Casting is mostly only bad when used as a crutch where another approach would have been simpler or when you do it a lot on tick
But it's not something you need to avoid at all costs
'BP Lantern' does not inherit from 'Scene Component' ( Cast To BP_Lantern would always fail).
show ur graph
Eh, event tick casting can be ok, depending on the situation, tho there’s often a better way
Remove the get child component
get child actor
Also, casting is not bad. don't believe the youtubers lol
hi, does anyone know why this isn't working? Sound goes off but the actor does not spawn (starts off not valid)
i changed it out for length and i still must have something wrong
I have no idea how Location->Transform default values work, is there a chance the actor is spawned with a scale of 0?
nope, he doesn't spawn at all. even when i spawn him with a trigger and it Is Valid the Follow Player doesn't execute
Also no idea if this matters but isn't there a specific spawn node for AI/character classes?
Nvm I'm dumb, it shouldn't matter
add a IsValid after the spawn and print something
thanks man this helped 🙂 i got it
Any BP people know if there's a way in BP's to access and list ALL user parameters want to print them out an copy them setting up some automation stuff
can't seem to find any function for it though
I could use some help understanding chaos destruction. Currently I have a GeometryCollection object inside my enemy character blueprint; I enable physics on it as soon as bullets overlap with the bullet actor *(so it doesn't break on its own or fall from the actual mesh) * but I get some unintended behaviors.
For one, it seems random whether the bullet actually fragments the GeometryCollection or if it just makes it fall to the ground where it explodes on its own. The pieces on the floor are also unaffected by the bullets.
I also don't want it to fragment entirely on bullet hit, just chip some pieces away until it runs out of HP and then break entirely. What blueprint functions can I use to achieve more deliberate/intentional destruction?
All I've got so far
@gray lantern https://youtu.be/2GptXWIgwqI?si=G3dSK-YNnw6ndCVR
Unreal Engine 4 - How To Get Object Properties With C++ And Python
────────────────────────────────────────────────────
GitHub ► https://github.com/AlexQuevillon/UnrealPythonLibrary
────────────────────────────────────────────────────
Python API ► https://api.unrealengine.com/INT/PythonAPI/
────────────────────────────────────────────────────
F...
I can't even figure it out in BP hahahahaha 😅
I don't even know how to set up C++ and Python
I don't know if any of you has occur this trouble?
Once I play the game, it's look weird
the original landscape is no more there... that what I don't understand
so I have events I'm registering. at first, I wanted to do them in level BP but I've decided to create a traditional actor BP_Actions and register all my events there so I can simply move that BP when I need it somewhere else and just change a few things around.
However, I have found now that even when I'm calling events from sequencer, the order of event registration on actors is not good and my desired events are not registered before they can be called. I should have known this would have been the case and at first my hunch was to register all events in the level blueprint as it is most likely the first one to be registered.
So basically I have 2 questions.
-
What's the best practice and where is the best place to register events happening in the scene (level BP, gamemode or actor BPs like I did). For example, I have a door that need to open on key press, then turn on monitors at a certain moment. I want to also trigger these from sequencer as well.
-
Is there a way to specify the order/priority of BP execution per actor if this is in fact one of the ways to do it?
Not really sure what u are doing but u could try a delay on your sequencer to allow your BPs to load?
Answer for 2. You would have to create a Pre event and a regular/post event in order to achieve priority in a good way
Pre as in you just name it pre and call that before the other
that feels so bad though 🙂 I thought about it but being a programmer for a while that seems like a such a dirty way.
the issue is that it's not just sequencer, it's the other blueprint that has bindings to that event too.. so BP_Actions for example appears to be not registered before BP_Monitors .. BP_Actions has event dispatchers defined.. BP_Monitors has binds to react to event. So ensuring that BP_actions events are registered would have resolved the issue before BP_Monitors
It's a tedious approach but what I've had to do in a lot of these casses is check if something exists/is ready to be used, otherwise subscribe to a delegate and wait. It makes you have a lot of events but at least it's stable and not reliant on delays
@meager spade any downsides just registering events in the level BP?
What should I watch out for when using DataAsset? and, to save this data and load it after restarting, do I need to create a SaveGameObject? does DataAsset save data itself?
No idea, I have heard the level BP is bad to use but I've never personally touched it
Yeah, that's why I really went the actor BP route
Depending on the chain of events and if you know c++ you could use AsyncTask to get some functionality to run a little later
this is really one level cinematic project.. so I don't think it will hurt if i just put stuff in BP Level and be done with it.. but it was a question for future projects really so I can understant event registration and propagation better
I believe the reason you shouldn't use level BP is if the levels change or something like that
I have no idea since I've never used it personally
yup.. I read about that..
someone?
alright.. so no real proper way inside actors unless I subscribe to delegate and just wait for check if is valid then do something
Not that I can think off, I would personally use a bunch of delegates but that because it's a design style that suits my project. Do w/e makes most sense for u
Haven't used them
You shouldn't be using data assets as "save games" - you should use save games. If you edit the asset in the editor, just save the asset. Don't edit them at runtime.
but I can edit the DataAsset and then save the data from this DataAsset and when loading the data from SaveGameObject set it to the DataAsset? 😄
You... could. But why use a data asset for that purpose?
You could use it as the defaults, but not for live data.
I don't know, it seems simple to me, e.g. I have several widgets in which I need to get this variable, I can simply get all variables from DataAsset
easy to control
You can't point to an actor in bp as the bp doesn't know about the world in editor time.
Ask your self, what can it point to? The bp isn't tethered to any level, how can it pick an actor you place in w.e?
@meager spade just FYI.. for stuff we talked about you really don't even want to use Level BP because it's difficult to get the reference to it from any actor. Game Mode BP though would probably be a better place as it can be referenced from everywhere else for binds.
Yeah, I used to use the GameState for a lot of misc stuff
hey guys the properties for my components for my actor just dissappeared suddenly
any ideas why
how would I make a checkpoint system that gets reset whenever I leave the level?
I wanna reload the level whenever I die (but spawning me at the current checkpoint), but when I leave the level entirely, none of that will be saved
when i toggle my freelook, i'm noticing there's a jitter in the forward vector, like it's constantly trying to correct itself:
i have no idea what's causing this
Simply set the checkpoint back to the value you want before leaving the level
you can use the game instance to keep track of your checkpoint between level changes
and i think also game state?
hey there
im trying to calculate the current character rotation and the direction
and check if the character rotation is more or less then 120 it should reduce the running speed
but in this code i made if i change the direction it goes back to running
any idea why is that ?
by "leaving the level" I mean pressing the 🟥 button
That's got no use in deployed version
If you want to debug just have some key that reset the checkpoint before you hit the stop button
if any one have a better idea on how to achieve that please let me know
ig that works yeah, is there any way to see what the original, unsaved version would be btw?
Does anyone know how to create a replicated crouch system that smoothly sets the capsule height instead of snapping like the native crouch function does
When i use the inbuilt crouch function from character class, in first person it causes the camera to snap down to the new crouched height, i know you can fix it with camera lag but that affects other aspects of my camera controller for FPS
alright getting somewhere, how do i make this rotate back after
rotating/leaning back only when there is velocity, otherwise it should return to it's upright position
currently it just continues to add rotation
Do a check if player is moving then just rinterp in reverse
Current is target
now what
that looks weird lol
That shouldn't do anything?
Do that r interp where ever you are checking if player is not moving anymore
But i meant make the current be the saved result of your first rinterp
and the target be the resting rotation of the character
so that it interps from rotated to not rotated
oh thanks! i'll try that
hey there
im trying to calculate the current character rotation and the direction
and check if the character rotation is more or less then 120 it should reduce the running speed
but in this code i made if i change the direction it goes back to running
any idea why is that ?
if any one have a better idea on how to achieve that please let me know
set this up, seems to work, but when i go backwards my character leans strangely:
https://gyazo.com/ab3dcc18d0650fc6411ce1bf6082bcc7
rotation is jumping between 180 and -180
I have list of structs called item. is there a way i can have item display different info based on the Type
like I want Type: Food. and only food. to displaya
"calories" variable
Try clamping
i think that would stop the character from fully rotating 360
Try one of those
I have a Project that I use to develop shared assets for other projects, such as inventory, interaction components, notifications, etc. Any time I want to start a new project, I can just migrate the assets I want to use to the new project. How can I make changes to the original assets in the Shared Asset project, into other projects when I make updates to various resources? I already tried migrating. Said it was succesful, but I think it did nothing. lol
can someone help me please
i need to calculate the character forward direction and the view direction and check if the character forward direction is 90 degree from the view direction then i can set a condition
is it possible to replicate a ragdoll so that both clients see the exact same ragdoll
and not a slightly varied version
Use get forward vector and the DOT product
I did that but not working
which part
#multiplayer can prly answer that
All of it
It gives a value but when I try to check the character direction it does nothing
Like when I rotate to 90 degree
Nothing happens
show code
Im not on my PC now going to my collage
Also that was another one i made
But here if i move the mouse the it won't work until I make it back to it's original direction
Hard to tell so when you’re back home, show the code and ask the question in chat again, someone will be able to help
Sure I will ❤️
how do I make a sphere sprite into an oval for the niagra burst?
Hello, does anyone how to make the player swim on the surface level. Currently my character can swim up and down, but when the character reaches the water surface it kinda bumps up and down.
Hi everyone is there a "blueprint meter" or test one can do to see if a single blueprint is too big? (too many nodes on it).
I doubt it. I've seen some pretty massive blueprints
One of mine is getting pretty big and its starting to get sluggish but its still working great
Break it down to components
Yeah, split it up.
Its a save game BP
When you clump everything into one bp, it gets really hard to read
No components
Can still split it up
There's one way you could split it up right there.
Make the Save/Load functionality on it's own BP.
Its just saving out 6 different versions of the game
But there is a LOT its saving out
Something like that I would certainly have in it's own BP.
Not sure of the reason for 6 versions, but yeah, start splitting it up. Especially functions that are used in other blueprints that you could transfer to a blueprint library or interface
Aha
Personally I'd keep the save and load in the same BP, but your situation may be easier to keep them seperate
I was just thinking more than one save BP and then the execution just runs from the one over to the other
I guess I will just keep adding to the single save BP until it starts to break 🙂
Function any repeated or reused code, keep functions small when possible, and start disecting a bit. It'll get there.
Yip I have alreaady gutted 3rd of code
See the way I do it, is I have a Manager for different systems, that is also responsible for save/load. So inventory has it's functions, plus save/load. Plants and characters have their own as well, etc.
Its a build and customize game so everything the player chooses has to be saved into a version
Then a Master Save/Load Manager that has all the others referenced, and it calls the different save and load functions as needed.
Ok thanks for the input 🙂
mhmmm. good luck
Scriptable tools can access current key press modifiers Shift, ALT and CTRL.
Unfortunately the ALT modifier is not really usable for click drag tools - since holding ALT with any click drag will automatically orbit the camera in the active viewport.
It would be nice instead if the click drag tool is active that the camera orbit feature is overridden. ALT is quite a useful modifier for tool shortkeys
Newbie question, how do you make the camera face X direction regardless of your character movement?
Just make the rotation not driven by movemebt
Then you can face it any direction you want however you want.
Ah I see, I think I found it, thanks
I had noticed this too, but supposedly there's a lot of people out there who use alt for camera navigation. #geometry-tools message
Anybody know if there's a shortcut for inserting a node through an already existing exec connection? I know of CTRL+clic for Left/Right connection, but anything that place it in between? Like, a reverse SHIFT+SUPPR
I don't know about a key for it, but if you drag off the previous node's exec pin and add a node it inserts it between them
I am sure this is a long asked question but does anyone know how to make a blueprint library such that both actors AND objects can access the functions???
The blueprint function library does not seem to work with objects. Even when I turn off context sensitivity
I've got a (geometry) script that I run in my game to build a spline. It works, but in the worst case can take ~8ms to run, it's also a noticeable hit in a shipping build. I'd like to run this over multiple frames now since it's not super important that it finishes right away.
are there any general tips you can give for this? is there a built in way for splitting up computations of a single node over multiple frames?
Did anyone know how to properly save "Primitive Component" data into variable to set it outside the Blueprint?
I need the primitive component class to use it for physics linear velocity BUT I want it to be a variable that can update itself, what Primitive Component to use
Is there a built-in way to get the widget component from a widget blueprint? I could always add it as a property, but I meant something like GetOwner to get an actor from actor component, but with widget blueprint instead
Do anyone know how to get the player character to move to a location on the nav mesh? As they are player controlled, they don't have an AI controller. :/
I have some instances where when the player interacts with something I need them to move to a spot (mainly for the animation). I have something basic that pretty much moves them in a straight line (simulating player input) but causes issues when there's an obstacle.
A primitive component is the base component for most of the things you add to a blueprint. (Scene, staticmesh, sphere collisions etc...) You just need to set the var to the primitive you want it to be. You'll most likely need to get it from another BP.
Not that I'm aware of. It can be difficult to get a ref outside a widget unless it's passed the ref when it's created. (exposed on spawn)
What are you trying to do?
Yeah, but for some reason that don't work
I created var "TargetItem" that is the "Primitive Component" type (that as far as I know, I must use to set up Physics Linear Velocity)
You can't in blueprints alone. Function libraries require world context for the functions to work. As you can't get a ref to the world from a uobject, accessing them in BP is disabled. If you make the UObject as a C++ class, you can override the get world function (something like that) which can give you access to the function libraries. (and much more)
It's not something I've done myself but when I've looked at it in the passed, there are a few forum posts that go over how to do it.
i mean in this case each time i update i will increasse by itself also
You've created an empty box labelled 'Primitive Component'. You need to actually set the var to place something inside the box. 😉
I'm setting the var in another BP and try to communicate between them, so the var can be set
And what is flashlight? is that a blueprint or a specific component inside it?
Component
how do you know it's not setting?
Create a getter function that just returns the value. (pass by ref unticked) Im assuming you don't want direct access to the var.
hmm
1st of all, errors
2nd - I see that the node doesn't work, the flashlight don't get the "boost" to the throw
So does the set node ever get called?
Yep, immediately after picking the item
Then the variables are used to throw the exact item
I think your issue is the 'Destroy Actor' node you have. Destroying an actors destroys all it's components.
But all other var are set before it, and other var works just fine after destroy
Yes because they aren't referencing an objects in the world. When you set a ref to a primitive, your setting a pointer to it in the world. When you destroy the prim, it becomes null as the prim no longer exists.
Maybe I don't understand and it shouldn't be Primitive Component?
Oh, okay
Yeah, that's make sense, but causes a lot of problems for me now...
In a way yea, it'll just give you the value, (with some modifications in this case).
why are you destroying the actor?
yeah but since im getting the "heal max in the function if i run this twice it still will increase by itself
right
When picking up the item, I don't want it in the world, so I destroy it after picking
Seems logic to me
Yea that makes sense, why are you need to reference the flash light primitive?
May i ask why theres two components?
@gentle urchin i just divided them easier to keep them seperated no reason really
Long story short
I want to make the simplest eq system where you can pick one item, and throw it
But, I don't know a way, to check what item the player is picking without 78 boolans (overstatement)
So my idea was to after picking item, set all needed var and then make the code as universal as possible
I'm self-learning, and can't find any tutorial about that, so I'm struggling to do smth my way
yeah so this dont work its increassing by its itself
That's the code so far
In terms of throwing an item, when you spawn said item back into the world, you would get it's prim from the newly spawned actors and apply a force to that.
If I managed to do the var settable, my code would be so much smaller that it can be
What are you trying to do? Or what is the issue?
basicly strength,con gives max health
so im trying too add that to the max health value
Yeah, but how can I get that from newly spawned actor?
Every time the actor has other names
Flashlight1, Flashlight2 and so
On the spawned actor, you have the return value. That is the BP you've spawned into the world. Either you can create a base class that all items derive from which you can cast too to get the base mesh or you can use the 'get component by class' node and get the static mesh.
And get something like static mesh, right?
Still I can't tick it there
Ok I set it like that and it worked, idk what the heck I'm doing
unhook the component class var and just select static mesh from the list. Unhook the return value, remove the cast and hook the return value directly into the set physics linear velocity.
Like this, right?
Yea. This will get the first static mesh it finds and apply velocity to it.
As any FYI, if your using physics, you should probably remove the scene component from the actor as this can cause issues. With your current setup, your static mesh will move inside the actor meaning it's root will stay where it is.
If you do this, you could probably just get the root component (which would then be your static mesh).
Where should I remove the scene component?
in your pickup bp (FlashlightBP)
any ideas :/ ?
Id have rhem all in one comp for starters
Like, I can't
Especially considering how connected they are
