#blueprint
402296 messages · Page 901 of 403
Oof no, separate the nodes, just attach On to overlap and Off to end overlap
which blueprint is this? camera or trigger zone?
Actor blueprint
of what?
It's just an actor blueprint
If you have a defined actors array
Create a blueprint interface, make a function, add interface to an actor you want to receive input in, create an event from interface, then in player actor make a key event, get actors array, create interface's "message" function and plug the array into it
your player?
I do not have a player, it is a separate actor blueprint that will go into multiple levels
the idea is to have a have my camera go inside a trigger zone and turn lights on
yea i got that
and then while outside the trigger zone shut lights off
but that overlap event that you defined there, only triggers if that actor blueprint overlaps with the trigger box
so you rather want it either on the trigger box, or on your camera
I’m new to Unreal, so it’s going to take a moment to research those approaches.
The idea is, once those actors are in the array, I run the BP within the pawn bp-actor and grab the refs from the array?
@spark steppe is there not a way to get the camera and tell it when it overlaps the trigger box to turn on and off the lights
see, i would make an actor blueprint with the collision box
which handles the overlap event
I'm doing that
Blueprint interface is like runs the function if that actor has implemented interface and the function and you don't need to cast to call an event
you said that your BP is just an actor blueprint, when i asked you if it belongs to the camera or trigger zone
so the trigger zone is part of that blueprint?
Yes
ok
select the trigger zone component, and in the details panel search for the collision settings
and post a screenshot of that
To make the stuff works you need
2 actors: actor A that is a box fox example, it has begin overlap and End overlap
Actor B is a player or any other actor
If actor B overlaps actor A it will execute overlap begin/end events in actor A
there should be more settings
e.g. generate overlap events
and a list of checkboxes which tell how it handles collision
e.g. ignore / block / overlap
camera is not in the actor blueprint, I'm calling it on eventbeginplay
well, if you select it in the world outliner you should be able to find the settings
or do you spawn the camera from code?
the checkboxes aren't there?
then shameless ariral was right and cameras don't have collision stuff
so you may have to wrap it in an actor
hmm okay
cameras have no collision
and give it some collision
yea, or attach a sphere collision directly in the level, that might work, too
I was just about to say attach an empty actor to it?
Make a pawn actor, add camera to it and attach the sphere
i would make an actor with the camera and sphere collision in it
that way you can check if it's that specific actor class
Doing stuff on the level itself is kinda dirty
I'll look into adding it into one of my blueprints driving camera mothion
thanks!!!
anyways, once you done that, the sphere collision should have overlapping collision too
then your event should fire on the triggerzone
Phone-bat died. Thank you for your help. Digging into it now.
Hi! How would I go about making a moving platform that uses interptomovement not stop when the player sits in front of it? Thank you!
@gusty axle @spark steppe Thanks from earlier. I've got a nice little Map based inventory now that pulls data from structs via data table. Shoulda just gone with this from the start. I'll def be using maps from now on instead of arrays so cheers Ben.
I just installed ue4.27
I had Render Target and transparency doesnt work anymore for some reason
Any tutorials on how to make HUDs in which text can track a variable?
E.g. a HUD that shows your coordinates
I'm having a strange issue with using the random float in range node. It works great if I'm using magic numbers, but as soon as I turn it into a variable, it goes outside the min/max values I'm setting as a variable. Anyone have any ideas what might be causing this?
Right now my min vertical range var is set to 0, and max is set to 1, you can see in the print string, it is not setting the float in the range I am setting
Set the text component to variable, theres a checkbox at the top
Its probably because min and max range variables are changed at runtime
^
That's what I did, but where do I tell UE4 which variable to put?
I couldn't find any tutorial about that
Use Set Text node
Event graph
And you can convert float to text for example
How could it change at runtime? I have no other nodes setting the variable, its only set upon creation
Hey so i am working on an character spin thing that spins the character when i press right click.
It works perfect but the camera needs to be at the exact point and not rotate with the pawn
Use a camera that is not attached to the pawn
Do i need to spawn it seperatly
You're right. I had my variables exposed and had them changed outside BP 😛
thx for pointing me in the right direction!
That or place it in level
so then i need to delete that one that is attached to the pawn right?
If the camera comes with the character. You can set it to use pawn control rotation. It shouldn't rotate with the character then.
that is what i tried and it just teleported inside of the pawn
and spins with it
Yeah. It must still be receiving input.
You can do what was suggested and use another camera
You don't need to, but if it's a separate pawn only for the lobby I recommend it
yeah untick use pawn rotation
i did that
its not using the seperate camera
oh yeah, also change auto activate to player 0
yoo works thanks
you're welcome
can i get like unlimited turning for that it only goes to the edge and hides the mouse cursor
I’ve gathered docs/tutorials on all of theses steps.
The object oriented aspects make sense.
I’m not sure where to stage things.
“If you have a defined actor array”
Where do I instantiate this so it will be available across levels etc?
Or do I instantiate it in a pawn along with the key event nodes?
GetPlayerController -> bShowMouseCursor = false when you start the rotation.
GetPlayerController -> bShowMouseCursor = true when you stop the rotation.
Anyone know if its possible to set constraints on an actor within BP? I haven't found any nodes, and when I search online, others have the same problem.
"defined array" i mean an array with actors
like you added stuff in it
just plug the array variable into interface "message" function
Sure, do create that array variable in the level_bp or?
I’m not sure where to stage things.
and it will "activate" the functions in these actors
Event graph of what? I'm using a Widget Blueprint that is constructed by a HUD
anywhere you want, in player or gamemode
depends how important these objects are
if its like 5 objects you can make an array in player, if theres alot of them and need to access from many actors make array in gamemode
Ideally they launch at the start and persist across levels.
I’m brand new to unreal and have only worked with the level_bp successfully.
In the widgets event graph. You need a reference to the actor of which you want to access its variables tho
It’s only two objects.
Yes, a CineCamera and Plane.
The CineCamera is a child of an nDisplay, which prevented me from making it a blueprint_actor and running the code from there.
This could also make no sense, I barely know what I’m doing.
Well you can make 2 variables inside the player
I did that already and disabled the input after release
ddefine these 2 variables from the level, and plug these 2 variables into interface message node
Ok, didn’t know I could access the player or make variables there. That sounds interesting.
I don't see any event graph for the widget :(
Hi, anyone could help me with issue with AssetGroupCultures? I set my text language and my audio language using setup as below on the screen and the issue is setassetgroupculture almost always is ignored - it only happens to work the both settings are set to the same calture and when i restart editor - but even that sometimes does not work once, need to switch those multiple times.
I am pasting ma code for changing text language, audio language (asset group), my defaultgame confing any my usergamesettings in packaged game (shipping). I tried everything and i feel helpless now with this, i am pretty sure it worked few months ago but now i just question if it ever worked in the first place.
The text only translation settings work flawless and at runtime without need to restart the game - only the assetgroupculture changes do not seem to work most of the time.
I use UE 4.22
nevermind I found it
oml cultures i had quite some troubles with it
i would help you but i have to sleep f
sry
Oh interesting, so in the level_bp(or player) I create a variable of type CineCamera and another of Plane and then access them that way?
Ahh, 💤
inside player
only player with controller can send key events
make 2 vaiables in player actor and set these variables
make them public first
and you can select objects from the scene
my brain melts i cant speka english i go sleep
Sleep well prince 🤴. Muchas gracias!
k so my HUD needs the coordinates of my pawn, how do I do that?
getPlayerCharacter > getActorLocation
Ok then try this:
On rotate start: GetPlayerController -> SetInputModeGameOnly
On rotate end: GetPlayerController -> SetInputModeUIOnly
i dont know why but on false its not working properly with the only ui
Works perfect with that thanks a lot
oh yeah, use.. ah you found it
yeah xD
Hey guys questions, whats the best way of codding something as a Tell tale game, would it be better to code lets say a whole level in one blueprint with delays and animation sequences and choices with branches, or shold i takkle it differently, as i m having problems with animations playing at start yet when i cast to them they dont play again
Understandable, if you would find some time later I would appreciate this a lot. I also am dead today, 12 hours of dealing with issues all day and I am devastated as I run into this dealing with something else, those problems really like to emerge in packs heh
doing-stuff-for-12-hours-straight gang
The errors are stacking if im doing it with the input mode variant.
I cant click on Buttons anymore 😕
🗿
🤨
The worst thing for me when some current stuff happens not work and when I debug it I find that some other important older stuff also is broken
Same lmao
esp when i migrate to new engine version and it broke my project
Render targets have no opacity on ue4.27 fsr
And background is red asf my eyes are melting
I don't even do that xD this project is on 4.22 still for a reason heh
hmm.., try setting the widget to focus to your lobby widget
My main character is a sphere, that inherits from a pawn, with some features added, like variables. How do I access the variables from another object?
Im on 4.25
idk why i tried btw reference to self and didnt work either
And procedural mesh component have no collision this component sucs i have so much troubles with it
It works 50% of a time
You get the reference when you create the widget
I use 4.27 for other project which is fairly new, but I think this is offtopicing here as people need help with issues
so... im not understanding
Its supposed to be black
But its red and its killing me
And post processing is weird too, it's too bright even on low setting
Ue4.27 is weird
The Create Widget node that you use somewhere returns a widget reference. Plug this reference into In Widget to Focus
the reference is in the gamemode of my game
Yeah, save the return value into a variable
I'm still searching, if anyone's got the answer...
You can either do Cast To or use blueprint interface
I did cast to, but:
inside your lobby pawn: GetGameMode -> Cast to (Your Game Mode) -> Get (Your widget variable)
MainSphere is the class of my pawn
if your mainsphere bp inherits from pawn, it doesn't neccessarily inherit from character. so casting to character will always fail because the hierarchy for character is Object -> Actor -> Pawn -> Character
game mode only exists on servers and widgets only exists on clients. It works for single player, but as soon as you do some multiplayer stuff it will break.
oh shit
ok so how can i start the widget then?
Yeah that makes sense, but how do I get some variables from the instance of the controlled sphere?
Inside the player pawn works, or inside the hud class if you want to have your widgets contained in a separate class.
how do you save and load ragdoll positions?
ah okay i will do that
why would it always fail?
because GameMode is not related to Game_Character
that really depends on how your code would be set up, if you're using an overlap (begin overlap / end overlap events) you get an 'other actor' pin which you would cast against a specific class. if that cast succeeds it gives you a reference to the actor and you can use that reference to get the variables you're looking for.
if you don't use an overlap, you'd likely use a linetrace that gives a 'hit result' and right clicking that pin would give u a 'other actor' pin. It also gives a lot more information, including if it actually hit something which is the 'return value' boolean on line/sphere/box trace nodes.
lastly, you can use get all actors of class, which allows you to specify a class and will return a reference to any instances in the world (granted that there are any in the world). however this shouldn't be used all the time, that's more for startup/initialization of levels.
Is there a persistent unique id for each actor that can be used to reference said actor later? I want to be able to export the unique ids of the actors in a level at any point (editor, packaging, runtime) and later get a reference to an actor from this unique id. GetObjectName doesn't seem to have a way to get a reference from the name, and does not seem to be persistent. My best guess is to make an editor utility that will assign a guid as a tag, then search by with GetAllActorsOfClassWithTag or saving a map of guid to reference. But it really seems like something that would already exist.
I dont know why but its more broken :)
wait
GetName() is unique (per world) afaik
I just wanted to create a HUD that displays on screen the variables of my main class
Do you know if there is a function to get a reference given an object name?
Here i dont know why i cant press the buttons.
I Fixed the mouse in put btw
and inside your widget you tried to use Get Player Character? because if the pawn you control inherits from Pawn, so if the Main Sphere bp's parent is Pawn, you should use Get Player Pawn.
I don't think something like this exists. It would probably fuck up garbage collection as well, so be careful with whatever you are doing.
.... Im dumb
that confuses me too :|
Hmm, good point, I should look into soft references for that
Now I'd like to change the text (in a HUD context), the text is the variable here, however I can't seem to change it like I would change a string?
try setting input mode to game and ui when start rotating too, but capture the cursor and hide it.
nope doesnt work either
that's because what u have is a text object reference, you can put it in your graph and search for 'set text' when using it
yes, with that I don't think you need the In Widget to Focus at all
oh wait
I should read

hey, is there a charactermovement event or something that triggers when the player leaves the ground, regardless of if it's by jumping or simply walking off an edge? I'd like to avoid just checking if the player's grounded every tick
oh, thx
remove both Set Input Mode... nodes and see if you can click the buttons then
maybe something broke when we moved the widget elsewhere
ok where and how are you creating the widget?
set owning player to GetPlayerController
nvm found how to do it, on movement mode changed
the whole time i coudl walk the character lmao
doesnt make any difference
also after adding it to viewport, SetInputModeGameAndUI
don't forget to set In Widget to Focus
ok ill try
nah
i think its not the problem with the input modes
it is...
does it work now?
Thx it worked!
Ok, other plan:
On Rotate:
GetPlayerController -> GetMousePosition -> (Save to variable)
GetPlayerController -> bShowMouseCursor = false
On Done:
GetPlayerController -> bShowMouseCursor = true
GetPlayerController -> SetMousePosition = (from variable)
you mean this?
vector 2d
FVector2D should fit
that's fine I think
wait could it be the problem before
Would be kinda weird but it could be
yeah that should do the trick ig
i can only spin it in one direction
oh wait, are you executing the nodes every tick?
yes
where else should i execute them
there are key events
anyone have experience forcing LOD's via blueprint?
or have a tutorial that they could point me to
nah i never did
you should
anyone know if you can change constraints via BP?
it's best so use them somewhere where input makes the most sense (Player Controller, Player Pawn)
You mean through code at runtime?
whats the name for it
yes
Key event (button here)
they don't exists in widgets tho
ye i put it in Lobby_Character
I think you need a physics constraint component to change that.
so then this sould work
I think so
what kind of component is that?
I just added the physicsconstraint component, but it doesnt have any of the lock/rotation parameters
You can also receive the mouse axis and rotate the pawn based on that.
https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/Input/ this is probably helpful for you then
Actually, scratch what I said. That's for joints between components
it Works.
I Will use that for my main game
Are there any options for blueprint/logic reviews? Like you walk through the logic of the game once it's finished and get feedback?
what was in the anim bp the node to set a rotation of a bone by alpha?
Is it possible to pass a parameter to a level sequence event from a blueprint?
Ok, any other ideas? :p
😅 not at the moment besides checking through the functions on the context menu for one that may do what you want.
I'm away from my pc else, I'd have helped.
No worries! I appreciate the thoughts 🙂
in what context?
Do you want an array?
pretty sure an array is that what you are looking for
it's sorted and gets resized dynamically
no, not an array
ok then what is the diffrence between a stack and an array
how long have you been programming?
long enough that I am worried
Lol easy
if you've been programming a long time and dont know what a stack vs array is... i'm the one thats worried
Those are legitimate data structures
so anyways
i guess a set is effectively the blueprint stack/queue implementation?
it looks more like a map
without a value
There is in C++. I don't know if it's exposed to bp
Its not in bp
damn
But doing a custom one with an array takes like 2 sec
So idk what the fuzz is about
yea but performance impact is big
yea i guess I can do that, been having fun with blueprints
They're great
first thing i've ran across that i couldn't really solve with em
For anything not done x1000000
sounds like a limited array to me
toyB there are significant differences between an array and a stack and a queue, mostly in the way the data is stored and referenced, and also how it is accessed
How big is your queue anyways
doing some 3d map gen stuff
Ah
so... could be giant
Gg then
making a flood fill algo
Anything not cpp will be horrible
yea it feels bad already with small grids
yeah I get that, but an array is the nearest you will get in bp
just doing basic stuff on a few iterations
Yepp
Yeah the containers exist
i guess I'll just write the map gen code in c++ and keep the rest of the game in blueprints
honestly its easier anyways
the lines are getting kinda nutty for basic grid navigation
and i'm still unclear on like...
if i call a function and pull that pin to 3 places... does it do the function 3x or hold a variable behind the scenes for me?
functions without an execution pin
usually green
A function that "promises" not to modify the state of the actor
By the discresion of the programmer..
'random integer from stream' likes to have a talk with you
Yes, executes when 'pulled'by whatever is connected to it
It doesnt modify the inputs
gotcha, thanks a lot for the help, kinda clears up the magic for me
it does modifiy the stream
i ran into that bug yesterday oddly enough
Rip
in fairness if it didn't it'd be basically useless
So often it can be beneficial to keep a function "not pure" despite not modifying anything
yeah but making it pure is kinda confusing
if it wasn't pure tho using it in blueprints would be a mess
also true
yea
oh bruh
stops the stuff running all across the way
whats the name of it
pm'd ya
Guys, why is my subject falling so slowly? I have enabled the Overlap collision for the item, but for some reason it does not fall quickly. But if you disable generate overlal events, then everything is normal. And I just need them☹️
I'm finding myself in a pickle, i'm trying to make certain actions (think sounds, camera shakes etc) fade from when distant from the center of the screen. I have it it set up and everything is working. Problem is that on the X axis things fade away much sooner than on the Y axis, not sure what I could do to make this feel more natural?
increase gravity>?
Adjust it to aspect ratio?
How would you do that? @gentle urchin I thought about it but nothing comes up in my head
And if I don't spawn the item in the character, then everything is fine
Separate the axis, use different alpha ranges, add together and average ?
I'm not sure then sorry I haven't delved into physics much but there is a channel for it here #chaos-physics or #legacy-physics
That simple? I guess it is hah, thank you!
Not sure it feels better, but worth trying ^^
Hmm
Add and average might be wrong
Multiply might be better ...
Id need to test some 😂
Brain doesnt work this late
How would you go about sorting and collecting static mesh actors under a specifically named Actor?
I am at a point where I can find the actor in the outliner via blueprint
Why not use components.
Kinda constricted to something that is completely proprietary
They're all in the editor?
yeah
So for instance I have an exterior and an interior group
I want to take and select all static meshes only in the exterior group
and sort those into an array
Well you need an array variable in the main actor.
Hello. Question. Working on a dynamic day and night system. How can I recapture the skylight without causing huge performance hits? Recapturing reflections tooltip reads: "This is very costly, will definitely cause a hitch"". What is then the proper way to update the skylight for a changing day and night system? Or is a day and night system without hitches not possible in Unreal (<- very had to believe that)
Hello! I know this sounds stupid, but how can I make an actor move forward backwards left right like a character if I don't have add movement input?
If you make the variable instance editable, add one array element and check if you can set that element to an actor from the editor.
I've never tried this so I don't know if it's possible
an NPC or an Player?
anyways, i think the character movement component gives the necessary functionality
I'll take a look at that
oh so I can just add that without making it a character?
i guess so, it's an actor component, so should work on every actor
Hi everyone! i'm stuck on this: i need to get the Sphere radius of each Static mesh, and get the value of the higher radius value... should i start like this?
if you want to find biggest one, yea
I can't add it, it's not in the list of available components
No it won't. It is specifically designed for a character
ok, sorry then
wasn't aware of that limitation
well yea, and if you inherit character it's probably already there
iirc character comes with the component by default
You have to manually code in the movement.
Basic lateral movement is
Location += velocity * delta_time
Do this in the tick function.
or interp move to component
Or this
But you have to set a location for that
I think they want input movement without a character
so I'd end up setting location every tick either way?
basicaly
Not sure how you want to pass in the input though
Since input is best for pawn and it's children
why do you not want to inherit character?
I have this submarine and the character interacts with the buttons
but whata should i add after the loop? how can i process all of them and browse to the biggest number?
Yeah, it's not very expensive dont worry.
Ah this. Okay. It's a vehicle
yeah but I can freely move around in it
Yeah, I get.
@trim matrix you make a variable, where you store the biggest one in and compare it to the one in the loop
and do an isvalid check on the variable, and if its not valid also overwrite the variable (which happens on the first iteration)
You can use a movement component. Maybe like flying movement component.
From what I can gather this is going to involve a bunch of complex movement that you'll need to code your own movement component in C++
awesome! trying!
so in pseudo code.... if(!isValid(biggest) || current.size > biggest.size) { biggest = current; }
at this point I feel like I should just convert it to a character
while you want a branch for the is valid check, and another branch for the size comparsion, otherwise it would throw an error either
Yeah.... You can but a sub is not a character.
When you mature more with the engine, you'll be able to program custom stuff
Theres a function for a float array to get biggest value, which likely will be faster than a pure bp method, and possibly easier in general
also might be easier to setup and explain than my weird approach
Not sure id call it weird but :p
Oh hi @gentle urchin !
thanks for the help!
Hi :) So for each loop -> get bounds -> get the sphere radius -> add to a local float array
Then on loop complete grab the float array, get biggest value , grab the index, plug it into a get node for the original actor array, and return that ^^
wait, that returns the index?
Horrible explanation
i was only aware of the one which sorts the array
i would go with a map
before he starts to call get all actors of class twice in the same method
iterate over the data, populate a map with the float as index and actor as value
grab the key array, and use that method above^^
and find the value
Map is unreliable
how?
Altho should be fine if you strictly only add
sure if two have exactly the same size it gets overriden
And that
i don't get how you "add to float array" for each loop
what else?
In a map the elements arent in a guaranteed order
drag the variable from the details to the bp graph, then you can select SET and GET, you want a get node
Add 1,2,3
Remove 1
Add 4
Now the map consist of 4,2,3
but who cares?
you grab the largest key anyways later
Nobody in this scenario
Two exact same size probably isnt an issue anyways.
Or idk. Not sure what the usecase is really 😅
Get all static mesh actors... hmm.
I guess thats one way of doing it
think i got it!
alright time for some math magic!
I got a ball with 2 bones: a root and a central bone.
when I press W or S, forward vector, I make the central bone rotate a certain amount on the X axis (since it is rotated towards the Y)
So far so good!
problem: when i move sideways using A or D, the rotation doesn't work nor follow.
When you press A and W, you get wonky rotations.
the result isn't predictable either with two same sized biggest ones
Not make array
as even if you iterate over them, you have no idea what order the get all actors of class spits out next call
I assume its the same order, every time
guess so, too. but you don't have much influence on it
Given its the same set of actors
unless maybe one gets streamed out and streamed back in
so how do you plug the radius into the SET array variable?
and somehow ends up later on the list, idk how unreal keeps track of those objects and where it pulls the data from
but i think, end of day it doesn't matter for that scenario 😄
Get the float array variable -> add
don't use bones for that i guess? i think you make it unnecessary hard for yourself
working ! thank you @gentle urchin and @spark steppe !
Sry for the typos, i suffer from saffs
not an option, it's the only way
well, then take the applied rotation into account
First time i've heard something is the only way
one last question, is there an alternative for "Get all actor by class" but for component?
Get Component by class seems different
Target actor, singular. Return value singular
Soo youd need to get the component in the get all actors loop
This returns the first component of that class.
There is the cpp version but I don't know if it's exposed to bp
hahaha lemme explain
I tried using the ball method from the template, with the torque, absolute garbage in terms of reliability, physics and feel
it was way too unintuitive to tweak, so i threw it away
this method, uses normal movement component (since I don't want ball physics anyways) and just emulates the rotation.
The issue is the sideways rotation while following the direction of movement. If I press A or D, I expect it to rotate and start turning but instead it rotates all wonky
I mean cpp get components. The component version of the get all actors.
❤️ 🙏 @gentle urchin 🙏 ❤️ *it works
So, looking forward, pressing A, the ball would roll leftwards?
guess at some point his yaw flips
how about a separate bone for Yaw? which doesn't inherit your forward rotation
Its always a lie ;p
i tried the material route but that was too hard 😄
It seems like a complicated solution to a simple problem.
True
If the skeleton serves no other purpose but for rotation, there are easier ways to rotate the ball
such as?
Add world rotation and the like.
You don't have to manipulate bones.
I don't know your exact set-up but you should try to reconsider your design
Does anyone see an error in here? I dont know why my widget doesnt want to close when i press the button i made
Wait...it is?
yep
I thought it was a prop or something.
Lol.
it's a morphball
Animation might be fine then.
considering it is tightly linked to input, yeah 😛
where is the escape button stuff hooked up to?
tick or what?
yes
But still I'm not a fan of animation for this stuff.
Looks like something normal code can do.
yes tick
and that blueprint graph is where? on the widget?
Yeah
yeah pretty
so self is the correct target?
the setting widget gets called in the main menu
because you add the settings to the viewport
yeah
not to the main menu
yeah thats right
Any clue why when I use "set material" I'm getting this:
esc removes ONLY the main menu with that code
it does perfectly everything
is that intended?
i highly doubt that
if thats the main menu graph and you call remove from parent on self
yeah
thats escape key on keyboard
Working directly in rotations is all quaternions on the back end right?
As long as you aren't doing anything with axis values
but what's the actual problem then?
nevermind setting mat to unlit fixed it
the button escape doesnt work
how did you close it the first times?
in the video^
through escape key on the keyboard
and that worked
dude
add an event to your button in the UMG designer
scroll through the details of the esc button to the bottom, on clicked event and add one
then hook that up to your remove from parent
the whole description sounded like the escape key on your keyboard wouldn't work (at least to me)
yea
so that was there before?
it doesnt work
did you recompile that blueprint?
jeah
you added it like i told you?
yes
that should work tho
nah it should not
i would delete it and make a new one
on the right it doesnt say anything with disabled
ok ill try
and add a new event then, the old one is probably screwed
Put a print string on clicked and see if it prints
If not, then something is blocking your mouse press or your button isn't enabled
so am i
you probably added the mainscreen several times
click the button a few times
i did
a few hundred times
How are you creating the widget can you show that?
if you do stuff on tick 😄
Remove from parent only works for panel widgets. You might have to wire back to the PC to remove from viewport
no, it works fine when he presses ESC key on keyboard
but that would also work fine with a ton of widgets
Oh? Strange
yeah
can you add a print string at the method which works for the keyboard key?
and see how often it prints once you press esc to close the widget
should only print once
HOLY
one escape keypress on keyboard
On clicked for the button use a print string and plug in self to the target. Idk why it isn't working
@gentle urchin working great!! thank you!
because that still looks like the widget exists more than once
That would be my guess but it's only created on begin play
okay imma get off now its 11pm
gn
move that create widget stuff to your begin play of the level blueprint or something
just to test if thats the issue
but most likely it is
its shit
bc then i loose a function of the lobby
need to store multiple objects and their assigned materials together in some sort of array/variable to return them to their state after doing some work... anyone point me in the right direction (node)?
hi all, i'm currently trying to learn to code (im an artist) and im having an issue with my AI and i would love some help. My enemies spawn through spawner blueprints (not target points) and i was wondering how i would go about getting them to run towards a target point (in this case my base). The only way i have found is if the enemies have been placed in the world, i can then assign the target point to run to, but because my code spawns them on a delay, they are not in the world, so i want to predetermine the target point before hand.
sounds like a threat 😄
can't they figure out the target on their own once they got spawned?
you would make an AI task which gets the target location, and updates the blackboard value
that way they would/could also follow moving targets
forgive me, but i have no idea what that means 😂 i have been learning blueprint just over a week
do you even use a behavior tree at the moment?
no sir
well, you most likely should
spent a few days to learn about them, they gonna save you a bunch of time and headaches
okay, i'll look into them, thankyou
as a starting point, you could look into tutorials like "how to make ai follow character"
even if you have a static target, the workflow is kinda the same (just that you don't have to update the target periodically for a static goal)
Btw i maybe should check if the widget is valid or not and then make one when it not exist
that could work, too
Nothing is working
gonna have to give a litttle more info than that
That's asking for too much
i still can relate to it
lol
Im already in bed
I'm changing objects materials at runtime, any ideas how I can change them back to default?
Best things comes in mind when ur right before sleep. I really need to get a paper and write that down xd
save a SOFT reference to the original before you swap them
or try to get the material from the static mesh, maybe that returns the default
thank you
i would try the later first
as it's likely that the override gets only stored on the static mesh component, not on the static mesh
and report back please
as i want to know now, too 😄
thanks! will let you know where i land
why doesn't 'event begin play' - > 'world camera shake' work?
Can you show the camera shake node?
i wanna check
if my animation
is a block animation
is this node really expensive?
It works when it's 'box begin overlap' but not 'event begin play' for some reason.
Might need a slight delay before it gets called. Not sure
What actor is this on
Whoa, that worked. I thought I tried that already but I just tried it again now and it worked this time, although the shake was way subtler than it usually is.
But thank you, it works. :)
probably doing something wrong but seems changing runtime it loses the original
if you use a soft reference you have to load it back to memory if you want to change it back
did you do that?
anyone got a nifty method to rearrange an array of integers so that lower numbers come first and higher numbers come last? i hope im explaining this right.
For example if i have an array of 9,7,8 I'd want it to be 7,8,9... at index 0,1,2 accordingly
maybe theres some node i dont know that can help with this
Hi! one question, how would you go about creating a 2D matrix of X,Y that references to one Object Each?
So that you can access each Object with the coords (X,Y).
I'm just adding this objects to one array and than using the H/W of the (X,Y) cords to calculate what should be the position on the array, but there has to be a better way
any ideas why my montage gothit is still getting triggered even if the first branch is true and death condition is true?
i can hit the target till the delay is over and the actor is destroyed
Guys, which solution is more correct. I need to bind the dispatcher of one component in another component and they all belong to my Player. Which method is better in your opinion. To bind the dispatcher inside the second inventory or to bind it inside the character.
what is the correct way to get a command line into the engine to load a map? I am using -Level=Mobile2 -Mode=FFA -ServerName=PORT_KNOX_SERVER
but its not working on my dedicated server is there some other kind of way to load the map? I tried this code everywhere it could work but it only returns the name of the server
i would do it on whatever implements the event
Is there any way to edit a DataTable on Runtime? If not, what structure would you use to get some functionality like that?
I want a list of things that i can edit at runtime and that they remain after leaving
Hi all, why is the Hidden Actors array not available in a SceneCaptureComponent2D?
Dense or sparse?
No but as a workaround you can use a save game
Write savegame at runtime, copy it to data table at editor time with a utility
Your options are to make a function library to convert to/from XY to index, or use a map of integer vectors to objects if you want the data to be sparse. I'd use a map for a grid system unless you need the grid to be mostly full
Dense, i guess i'll just use the function to get the Index From a set of cords.
Ty, i was getting some troubles with this one.
If i got the idea right, it should be to Generate a saveFile while at runtime and than use some widget utility at the editor to Update the DataTable, correct?.
the EditorUtilityBluePrints should do the work, i can see some cvs/json files to update the datatables, ty!
That's how we do our 2d tilemap stuff.
i = x + y * width
x = i%width
y = i/width
Might have an off by one or two in there but that's the idea
Urgent!!🔥 Can anyone point me in the right direction to build a landscape interaction system that will allow for a plots of land system. For example your in game and you purchase a chunk of land on the landscape system. My question is then how do i get that chunk of landscape land to highlight and well get the player to be able to purchase it, any ideas welcomed pls.
i found something with tracing but that requires a volume
For the highlight something like this should work
In this part of the series we add Mouse Input to our controls and allow ourselves to click on objects in the game world. I also show you how to make a material that will highlight certain objects before you click on them
Here is the tutorial video that I used for the highlight material - https://www.youtube.com/watch?v=MYtmcZeWUFQ&ab_channel=BB...
will watch
i suppose that helps but i want to interact with the landscape if i could just figure out how to make one square of landscape and interact with it
As for the user buying it, if you don't have a collision on your plot of land, you can have an array of cords that point to info of each plot of land, when you go into buymode, you Snap the position under cursor and get a (X,Y) from there and retrieve the plot info with that.
how is this more urgent than any other question here?
Maybe be wonky if your plots are not all the same shape
lol i work in sales so we do that in order to get attention try it dont be mad
this is good
In this video I make a grid system in our world that will be used for snapping objects, roads and buildings to each other!
00:00 - Intro
01:00 - Creating the Grid Manager
09:00 - Creating a Grid Cell
11:30 - Snap Buildings to Grid
Leave a comment below for...
i like that this can help for sure
i rather dont, and neither should you
this isnt a crazy question but i just need to be pointed n
i did exactly what you are asking for the other day, but i'm not sure how are you going to do your plots of lands
nice, not sure either im thinking a spline system to contain it
if they are wonky shapes then i just need to have one point to reference to its middle point
really appreciate this
Maybe just let the land be as it is and don't worry about it.
When going into Purchase Mode, you can have a set of collision boxes (or other shapes) with different extens. You place them all on the map when going into purchase mode and you check collision under cursor to "select" one.
thats alot more simple
that will do really
I do want to build a mini map that can see what land is bought too
but i like these apporaches
thanks dont want to drown out anyone will look into this thanks again @runic parrot
I have a pawn with two variables.
How do I set them from the scene.
I need to control and cam and plane in the scene.
Not exactly sure what you are trying to do, but changing the default values of the variables should probably do it.
Make sure the variables are set to "Instance Editable" if you want to change them for each one
I want to alter the Plane position with the camera direction when I press a key. I’ll try instance vars
Very new so I’m struggling along… likely doing things wrong.
hmm maybe go into your controller and check for the input you want "INPUT x Key" (you can customise input types on the editor if you don't want to use default keys).
Trigger one event or method when the input is received and there, check the camera position or whatever you want to do and do it there.
That’s way over my head.
I made a pawn to collect the key event with variables connecting to the cam and plane in the level.
Ideally the cam/plane could live across levels.
Is what you’re describing related to game gameplay settings?
You can check for input on other blueprints that are not the controller, but you need to enable the option to receive input first.
I have no idea now what you are trying to achieve
Essentially this
I make this test in the level_bp, but I’m having trouble translating it to something portable.
It just repositions a textured card in front of the camera.
Another key should cycle the texture.
Aw 😦 well no I didn't mean dispatchers in specific, moreso mid level topics like mmm I know the blueprint essentials like hey this is how you set a variable but I don't understand things like cast to or dispatchers or custom events in Unreal really. and ofc that's just the examples I know not the ones I don't so I'm not really like sure what all I should try and learn? I'm not trying to learn EVERYTHING because I know that's too much but I wanna learn all of the useful things.
or rather as much as i can*
Is there a way to create a "wait until" style function? I know while loops exist but they very easily crash.
delay?
if you will, basically wait until x is true..
no no I mean there's a delay function is all but I don't think that's what you want- I'm pretty sure that's time based
it is time based unfortunately, yes
what is the specific example you're trying to do?
heres what I'm attempting to do, I have an animation system, when one finishes I want to immediately execute another action, and I have a bool set up for that, just need the code to wait until that bool is true to perform next action
I hate the AI blueprint so, I'm not doing that rn. Experimenting a bit.
Can anyone help me with this? I’m sure it’s very simple 😸 - can you add Hidden Actors in the Construction Script perhaps?
errrrr is it super time sensetive or could you make a loop that checks it every .1 seconds? not exactly a while but I think it should be more resource intensive than one
If the macros themselves allowed that, it'd work.
I staged it in pawn, but it doesn’t seem to be working.
How do you create the Do Something nodes?
wdym the macros? as in the bps?
welll it's not impossible for you to edit the code n make it allow it I don't think-
Either way, why don't you get the time of the animation and add a delay inbetween it and at the end of the delay it would trigger the action?
got it working.
AYEEE nice, how'd ya do it?
Basically the way you said, hold on
hah sweet :DDD
Not pretty but it works.
I'm not the best with bps but I'm decent with the logic... I think- 😎
oh but Darky is there any chance you have any ideas? alskdjalksd
Ah, right, let me review and I'll give it a go.
Okayyyyy thank youuuuu :)))
@sage shale Cast to is a bit of a nightmare but I can try to explain. Custom events aren't too hard. Heres the thing. I've got a 7 hour meeting today, and its already 1am. I need to sleep. But I'll add you to my DMs
alright! 😄
not sure y but i attached some pawns to my player's hand and now when he walks it goes really insane
Casting is just changing the reference type to access the data of a lower class.
All actors have a location. Not all actors have the variables/functions/events that characters do.
So if I have an actor type reference to the player and I want it's speed, I'll need to cast to(change my actor type reference to)the player class type
ive tried debugging y it happens in places that r probably but have had no effect
it isnt my custom camera code, it isnt my setting the rotation of the 3rd person model to absolute
and the WASD values r the same
i just did this to spawn some key actors and attach them to a socket on my hand
if i disable this branch it doesnt bug out
maybe i need snap to target? ill try
nope
is there a way to do this?
this is an infinite loop
but i want to press the right mouse button - which is 1 event-
and while i press it, i want to check every frame if the bool is suddenly true
like as long as i'm pressing RMB, i want to continously check if the bool is finally true so i can move on with 1 signal
well-
turns out i can do ugly stuff
and do this 
which makes me feel filthy, but it works.
Can you not just set the bool on event tick or smthn
Or check the bool on event tixk
i guess i could make a new bool that says "right mouse button pressed"
and put that one on event tick
but that'd be even uglier

any reason attaching a generic actor to a player BP (player is parent) would make ur wasd input wonky?
What are you trying to achieve?
Hi! does anyone know if there's a way to get all "Child classes" of a Main class? i want the references so i can spawn one of each.
For example: All Child actor classes of the lass below (the class reference, not the ones spawned in runtime)
without using a DT, i can use a DT but i'm trying to get a more dynamic way of doing it
Hey folks. Any idea why I'd be getting the error: "Failed to resolve the table input. Be sure the DataTable is valid." ?
The Item Data Table / Item Row Name is a public, spawn exposed Table Row Handle structure which has valid values assigned in the object that are causing the error.
Tried this?
Works for the ones that are spawned already at runtime, not for the class references on editor.
has anybody found good tutorials for an inventory system I've tried one and failed as there was way to much detail and the dude kept doing stuff without explaining what he did properly.
https://www.youtube.com/watch?v=yxqSkFNAzE0&list=PL4G2bSPE_8uktjEdP4ZuRq5r2o4JMdZfM
Ryan Laley does a great series
In this new series I go through a method of creating an inventory system, similar to a survival game. In this first part I introduce the system and go through the process of setting up some key assets that we will need going forward.
There are unlimited ways to create a tutorial, all based on your own tutorial design. As per usual with my tutor...
was about to recommend the same one, it's really simple
He's updating to UE5 video by video as well currently
Hmmm... wait so, where are you trying to spawn these at? Do you have an actor that is doing this?
I want to wait for a UE5 version as I don't want to get stuck mid code walkthrough. it gets me lost quick as I started with blueprints and have not practiced C++ much
Oh, these are BP tutorials, not C++
I badly wanted a Tarkov style inventory, and was fallowing this guy. but it was super frustrating as he kept doing things without explaining properly. had to scrap my code because I was stuck with no lead as to where to start debugging. https://www.youtube.com/watch?v=4CjpBoKl6s8&ab_channel=ReidsChannel
Support the channel through donations. Crypto accepted!
PayPal: https://paypal.me/reidschannel?locale.x=en_US
Patreon: https://www.patreon.com/reidschannel
Bitcoin: 1JFwWHr4X6uAeoZadukzqKjzFBj3Qjy7Sk
Ethereum: 0x2B2Bc108F1Cc0fF899959dEF3226637787d8C3dE
Dogecoin: DNQ33YnhpWoTBokBNVkZP5ub8KTLkpyjpv
Join our community discord!
Discord: https://dis...
At Runtime i want to gather a list of all the class childs (not the one spawned, but the one availables) of X class.
the spawn of actors of those classes is secondary, with the list of child classes i'm ok
i'm already doing a DT, i'm so freaking lazy
Sorry to interrupt rq, but I had a question bout some maths
Ah, well the one I recommended won't help much I don't think since it's individual slot based rather than multi-slot/size based m8.
I am making a machine gun, and the longer its shot within like 6 round intervals its firerate is supposed to decrease to a minimum value.
The variables I am working are,
Firerate Default
Firerate Current
Firerate Minimum
I would need to decrease the current firerate to the minimum within the lenght of shot intervals which is 6 atm. Does anyone know the math behind this, I would love it if you can also explain it thanks.
A grid inventory system is a little bit more complex i think, i would go first with creating the most simple inventory type and later expand when you have an idea of how they work. they are all amost pretty much the same.
hmmm.. and what's the desired end result? It might help to find a solution if we know what you're trying to accomplish.
Yeah, grid is basically a normal inventory but with more on top
It gets really complex rq tho
So I would definitely suggest learning how to do normal slot inventory before moving on to grids, because you also need to know a lot more about widgets and all that too.
But rn my brain literally cant comprehend how I can do this lmao
Lemme whip up a quick BP setup to see if it's going in the direction you're trying to go.
Thanks dude I appreciate that
Also here is my math, obviously since everything can change nothing is static the example I gave is just to be able to understand the equation
This is the calculation of the "Interval" or just shot num that I use to loop the firerate with
The lenght of fire anims is 6 atm, its 0-5 but reads as 6 just like the example
Short version: Replicate this functionality
https://blueprintue.com/blueprint/bpx-3knx/
Try something like that. And sorry I was working on this before I saw your image post lol
Long version: I'm doing a Procedurally generated Tile Map with "wave function collapse" algorithm.
One of the steps is to get all the Tile classes and map how they match with other tiles on each direction.
My pipeline is to spawn them all into the world and keep the process going.
I want to make it so the process can just pick what ever is on that folder and update them all o just pick all the "childs" of P_base (my father class)
Oh man. I'm not sure this is within my ability to help with. Hopefully someone smarter will reply.
No problem, i already got most of it running, i'm trying to optimise that part because i'm lazy af
All good dude 👍
But yeah, basically the thought is how it gets divided eventually into it, it shouldn't get set to it immediately
Also the shot count can be whatever it needs to be just need to find a way on how to divide it per that value
Ahhhh ok so... is this happening inside of a function or on your event graph directly?
I don't know I was able to explain it right 😄
Anywhere is fine, its just the math equation that I need to calculate
You familiar with lerp?
Ye
Why don't you lerp between the values and use a timeline or a timer (if you wanted to avoid timelines) as the alpha?
Hi all, I'm very new to unreal but trying to learn through tutorials but stuck trying to figure something out, might not be using the right lingo
I would like to use a midi device to manipulate a variable in another actor, but cannot figure out how to get that and then manipulate
There was a speicfic node that I forgot the name of
Which would solve this issue I think fuck 😂
How are you getting the actor?
hmmm
is this the incorrect way to get the actor?
What is setting the variable?
setting it up to have midi input set it
the midi input works but i cannot figure out how to control the "vertical rotation" value under default for the other actor
I have a midi control actor trying to manipulate a light actor
is there any way to set calls like "get player state" to return my custom player state instead of the generic one?
(kind of assuming no but doesn't hurt to ask because it drives me crazy constantly casting)
i might have figured it out
nope
lol
have an idea though...
ok i figured it out kinda...
but its rotating the entire object instead of parts of it so i need to dive into the next depths i guess
It should be
As you are using "SetActorRotation"
if you only want to rotate a component of it use "SetComponentRotation"
No you can prob make a function libary pure function tho
o ic, let me look at that
Thank you this is what i was looking for
No worries 👍
Setup a Pawn with variables connecting to a CineCam and Plane.
I’m able to connect the variables if I drop the pawn in the scene, but if I set the bp class as the game mode default player.
How can I wire this up?
i have a dataasset behaving weird, it matches names to meshes. i passed a reference to it to my thread, then it crashed when i exited the game, dunno why.
ever since then it matches wrong meshes for names.
actually i didnt write to it or anything, only read from it
any idea?
ah i messed something up in the code, it works fine 😛
i've been looking at a bunch of different examples online and I can't seem to find out how to bind an event with x amount of parameters, if anyone can help that would be great
I know how to broadcast an event with parameters but I should be able to bind
You mean an event dispatcher?
I think so, yeah, I'm pretty sure those are separate from events though
DECLARE_EVENT_OneParam(ThisClass, FUpdateProperties, TArray<AMapBuilderActor*> Actors);```
this is how i'm declaring it
I'm pretty sure this isn't an event dispatcher but just an event
Hi! does anyone know if it's possible to merge all the meshes from multiple actors into the mesh of 1 actor and remove all the others? This at RunTime.
for example, each one of this tiles has one actor and multiple meshes, can i merge all of them into Only 1 mesh and One actor, for performance?
Has anyone here done any procedural cave stuff? What would be the best approach? Splines maybe? But how do I merge them if you have intersections?
I was watching a sht ton of procedural algos yesterday, the best one for caves so far is this one
Learn how to create procedurally generated caverns/dungeons for your games using cellular automata and marching squares.
Source code:
https://github.com/SebLague/Procedural-Cave-Generation
Follow me on twitter @SebastianLague
Support my videos on Patreon: http://bit.ly/sebPatreon
A yup, Sebastian is always a winner. The generation is fine but how would you render this is my question
I feel like marching squares isnt going to be performant in game(and also I dont know how to do it in blueprints ahha)
hmm i got some not so bad results when playing with celular automata, let me get a picture
Hi.
Buttons 1, 2, 3, 4 are from another Blueprint, but in this Blueprint, I would like to reference some Options that I have already programmed, so, I use Cast To Widget to reference my variables in a new Blueprint. It doesn't work for the FadeIn variable and for ON Clicked (Button 1, 2, 3, 4).
Is my way of doing it correct? If not, I would like to know how and also how I can do it for the other Nodes. Thank you.
This is 10k Tiles with 1 simple mesh Each
i can bump it up to 200x200 and it takes 5 secs to generate the map, apply the regules and clean the borders.
and the logic is really really bad, it can be optimized a lot.
maybe you can use something like this and extrude the borders to make cave walls
than follow like sebastian, separate regions by flood algorithm and cave path with A* or sjk
I think POE is 30x30 tiles or something like that, just to have a reference
This doesn't work, it needs to be at runtime. But it can be achieved with procedural meshes, it's kinda similar. The link got me there, so thanks : P
Hi, I have made a bp with a paper tile map and some box collision but each time I relaunch my editor they disappear
and my question , because my message just like that is not really well written, is : why does the bp keep disappearing (placed in the editor) all the time? like I still have it in my folder but for it to spawn again I need to replace all of these bp
Are you placing it before starting to run the game or while running it?
well I place it then play it work great, then I restart my editor all bp placed (of this type) are not visible, they still there but no more collision, I can only see the collision box in editor mode
it don't change anything, let me get some screenshot because my explanation is not really great
so this is my bp (I just placed it)
and this is after a restart
and my character can't go on anymore
just like the paper tile map disappeared
what do you mean by a "restart"?
well I closed my editor then launched it again
if you are saving, everything should still be there, it has to be something on your bp logic i think
like when I stop for the day and open the project again tomorrow
I do save everything
maybe some corrupted asset reference?
the bp in the assets still work if I place it the bp will spawn normally
I remade the same bp a second time
same problem
I will surely find another way to do the bp and it will work, for now it might be 7:12 am and I am not someone that wake up early 😅
Does anyone know if you can move one SaveGame Slot from one project to another? Given that both have the same format
Probably stupid question 😅 How to use enhanced input plugin for multiple button input? For example: I want to know if person did pressed two keys at same time?
What is the point of Events in Unreal as opposed to functions?
Trying to search for the answers yields the basic differences (events can't return values, but can use the delay node etc etc), but it doesn't explain why events are a thing.
What problem they exist to solve?
There's a usecase why events had to be invented and should be used for, and I can't find what it is.
events are async, methods are sync
So with events you can run one event and trigger delays and things related to time.
With methods, you are blocked until the method is done.
I already closed ue5, but i think on settings -> Input, you can enable input with multiple keys
But wouldn't you encounter all sorts of multi-threading madness if events would run off the main thread?
That's my understanding of it, i may be missing a lot of things that may be important
I might be misremembering things, but I remember making an incredibly slow block of code that was called from an event hanging the main thread
yeah, that's pretty much it.
Functions are sync and blocking, Events async.
Also local variables on methods because of the blocking nature of it
That something is Async doesn't mean it can't slow down the main thread, if it's eating all the resources, there will be nothing left for the other threads.
There's one explanation I'll try to test: it's async, but it's still on the main thread.
it's like a bully standing in front of someone taking all the walkway and saying "yo... i'm not stoping you. You can go whenever you want"