#blueprint
402296 messages Β· Page 695 of 403
other way around
Not following why a Physics Constraint won't work though.
oh sorry i didnt actually realise it was a component i thought you mean the X Y Z constraints
my bad
yep that one did it thank you
only trouble is it keeps rotating around the other sphere as it rolls so im just gonna need to find a way to keep the top one still while the other rolls
i want to destroy this after picking the key
i have attached it to player
how to do it
what am i supposed to do with it now?
sorry, im very new to this. what am i supposed to put there?
Also https://www.unrealengine.com/en-US/onlinelearning-courses and search for first hour courses to get up to speed with how BP works in general.
So I made boxes in my game that are like the ones you can find in crash bandicoot but when I jump near the boxes they jump with me. Why is it doing this?
Hiho someone now something about savegames?
Is there a sort of best practice standard number for how many functions should be in an interface?
I think as mutch as you want, but maybe you should sort different interfaces to different topics. For example Inventory_Interface_BP, NPC_Interface_BP, Warp_Interface_BP
There is no standard number. You put in as many as is necessary. Worth noting that you should also keep interface functions as basic as possible as well. Don't be one of those people that thinks they need to use an interface to replace any and all casting in their project.
@sonic pineWhat is your savegame question?
I have created a Save System for one Check Box at the start of the there you can say "dont show message again" its working. But now i try to upgrade that for the chosen language
and im not sure howto create that
This is my normal language choose BP its still working
my Idea is to promote variables for each language
like that
or is there a etter way to get out the chosen language?
how do we make a weapon that shoots like the halo beam rifle but the end point rotates the beam to where the target is?
And you need it to detect the last chosen language if it was selected, and set it by default?
yes
i have a update, save and load settings function
The Accepted is working but the language is only a test ^^
or i need a new function for every setting?
Nah. Personally I'd just write yourself a simple checking setting.
You have the Language string. Make a function that takes that string. At load load the save, get the string, if it's empty, or does not match the setting for any of your languages possibly via lookup in a local variable's array, then show the select language widget. If it does match, just call the Update settings with that language.
ok if chosen save in savegame and after staring the game to controll if saved? take if not default
I know what do you mean, so i have to create the variable and give the string to the savegame. Oh..
You're already saving the language though.
ok i have got a crash xD
ok my language will be saved without save the langue... if im starting now the language is german, if i will change it to english and restart the engine, the langue will be english ...
thats normal?
Sounds normal. To be fair you don't normally set language in Savegame data.
The engine has a whole localization system set up that can work via INI files.
ok i thought its like a setting
Im working with the localization Dashboard
ok so it will auto save ^^
You don't need to save the value in a savegame then. Just set the value via these.
The engine will update in the game at the moment, and also write to the config if you mark that true. Then every time they load up, it'll be that culture.
Only thing you should have to maybe save is if the user has selected that option before or not.
To show the initial selection widget at the beginning of game I mean.
ok i have the language selection at the start
so you can choose the language at the start and it will be saved. the skip button is only for me to jump into the game without char and server selection ^^
:no_entry_sign: WyvernRider#9363 was banned.
Resuming an old tutorial I started on blueprints some time ago, last updated 2017 though, you guys think it's worth continuing it or too old?.
Basically question is, did something change drastically over the last 4 years
oof
does anyone here know about a gun loadout system?
rn im trying to setup a code so when i press the switch button it will place the weapon in a socket corresponding to it's weapon type, but I've hit a roadblock, any advice would help
Is there a way to see how much of a sound already has played?
Like get sound time or something
Likely something retrieved from the component that is playing the sound.
I cant find any variable like time or progress..
How are you playing it?
Spawn sound at location
is there a Get Time Elapsed or something along those lines if you drag out the data output pin from the Spawn Sound node?
There is a "Get Timer Elapsed by Function Name"
Is that what I'm looking for?
opens UE4
Huh, there really isn't anything, is there...
Welp. You can try asking in #audio ... UE4 engine devs hang out there
Yeah did
Or I'll add a sketchy, inaccurate counter that starts counting after spawning the sound.. :/
But sometimes audio has a delay for a short time after spawning if there is a map loading or something.. that's kinda the problem there..
Hi all, posted this a few times in different discords now.
Does anybody know how to get rid of the stacked error messages for the message log, we didn't have this pre 4.26 and can get a little annoying when your testing things.
Any help would be appreciated, must be an option somewhere?
Any ideas why my cast is accessing none data? I am casting from a battle manager BP actor to game mode to access data stored in game mode.
When player hits enemy it opens new level with battle manager actor in it that casts to GM but each time is accessing none data. any ideas?
Hello I am a Unreal Engine 4 beginner using unreal 4.26. I tried to make a blueprint to make an enemy character follow me but all it does is stay in the idle animation. I made an animation blueprint and a blendspace and they both work. But the enemy is not following me. Pls help. here is the screenshot.
not sure, maybe you're missing a navmesh?
No, I've added a nav mesh
I'm trying to access the playback percent float but have no idea how to.. Can someone help?
This is new stuff to me..
Can someone explain why this does not work or how can i fix it please?
Its an actor component
AudioComoponents should have something for that
Reads like that function is static which means it can't access member variables
Well without a ref to self that is
hey guys, I am having an issue with an array
When I add something to the array with this button
I try to print the name of the card but this is always blank, like if the array does not update, however, checking the last index this in fact adds something it itself
@surreal peak do you mind telling me what u mean with member variables and ref to self? im sorry but im still new to this stuff
Do you mean variables owned or created inside the blueprint?
Not local
Sort of yeah
The main issue here is that the function is apparently static
Not sure what function you are using there
I dont know how i can tell what type of function im using, i just clicked "+" button next to "Functions" at the right
i'll post a full screenshot
Whatever you are adding is probably empty
By empty you mean the variable?
That was not directed at you
it's not let me show ya
Says static at the top. Can you click on thr function and show the details
And the cards reference you are using, what is that?
it's an actor component
Where is rhat component on and how do you set the value?
I am sorry I don't know how to answer that question, I am not a programmer and my skills are rather limited
Well you have a Cards variable there, the blue one. Where is that filled
The variable itself is empty by default
Did you mean this by "click on the function and show the details"?
And if you say it's an actorcomponent then the Component has be part of some actor
Gotcha
I put it inside the widget
as a variable
Yeah, seems fine. Not sure then. Try redoing it. Seems to be a ue5 bug maybe. :P that's why ue5 is not meant to be used yet
If I cast it into the actor component would I keep the variable that I have saved there?
Or should I just do it again in the widget
?
All the variable is is a container for a spawned object of that type or a child class of it
If you create a variable of that type in the widget then that will be an empty container basically
You need to get a spawned instance of that component
Just making a variable is not enough
So in my case making the variable saved in the component isn't enough right?
We are talking about the variable called cards in the widget
Yeah
That one is probably empty
You need to open an actor like your character or controller or better even playerstste
And add the Component to it
Yep, it works as it should in UE4, thank you so much for pointing that out π
And then get the Component from that actor inside the widget
okay, would I keep the information from the actor component? or I have to make it again in that parent actor class?
wait it actually isnt empty
checking the c attack 1 actualy has all the info of the default value, see?
is it possible to detect for a keypress while i'm in editor mode
I have a blueprint that places waypoitns on the map, and I want to place a waypoint from within the editor
by pressing a key
Maybe via #editor-scripting ?
Whenever I do something like this I usually fall back to C++
ah cheers thanks
Can you help me cederic? π₯Ί
Only if you type my name correctly 
So what do you need
Is the sound playing?
is the reference (the blue input) set aswell?
select the event Onaudio....Event_0 and press F9 to set a breakpoint π
then when u run it again and u are at the breakpoint, you can hover over variables in scope
It never even fires..
how long is the sound? longer than a second?
yes 30s
i have noticed some events dont really fire because the source is being destroyed, but i mostly saw that in anim notifies
The Sound itself should have a Duration variable
I want to know where in the song i am
(To resynchronize the music to the gameplay if needed)
Ah
NewActiveSound.bUpdatePlayPercentage = OnAudioPlaybackPercentNative.IsBound() || OnAudioPlaybackPercent.IsBound();
You might not get the callback if the native one is bound already
Idk how that works
Trying to find where it's called atm
Ah no there are both called
if (WaveInstance->ActiveSound->bUpdatePlayPercentage)
{
const float PlaybackPercent = GetPlaybackPercent();
FAudioThread::RunCommandOnGameThread([AudioComponentID, SoundWave, PlaybackPercent]()
{
if (UAudioComponent* AudioComponent = UAudioComponent::GetAudioComponentFromID(AudioComponentID))
{
if (AudioComponent->OnAudioPlaybackPercent.IsBound())
{
AudioComponent->OnAudioPlaybackPercent.Broadcast(SoundWave, PlaybackPercent);
}
if (AudioComponent->OnAudioPlaybackPercentNative.IsBound())
{
AudioComponent->OnAudioPlaybackPercentNative.Broadcast(AudioComponent, SoundWave, PlaybackPercent);
}
}
});
}
That should theoretically call
Actually
Maybe the order is bullshit
Since when you set the new sound, the delegate isn't bound yet
So the boolean is false
Can you, after binding, play call PlaySound on the component again?
It's a bit "redundant" of course, but that's what is probably causing your bug
@upper adder
give me a second to comprehend..
Whenever you call "PlaySound" on an AudioComponent, the Component checks if the Delegate is bound and will then set a boolean. If that boolean is true it will later broadcast the Delegate. Kinda weird, but that's how it works.
Now you are calling SpawnSoundAtLocation, which calls PlaySound and THEN you bind.
So when PlaySound is called it sets the boolean to false cause nothing is bound yet.
okay
So if you call PlaySound again on the Component after binding, it should work
6+ Years of too much UE4
yess
Hey guys!
I need to get the Class of all the Assets within a folder in runtime (using BPs). How would you achieve that?
I tried this:
It is able to find assets in the given folder, but all it displays is Blueprint.
I assume this Blueprint is the Asset class from the filesystem perspective?
Yes, and it returns the correct name.
Although its a mere string.
You mean, this @trim matrix ?
no from array element make a node and type GetFullName
not sure if it works thought, but the description hints at it
ah i misread, u dont need the name
Nope. I need the class itself.
i have to look it up, may take some time but i will get back to you
Fair enough. Thanks! π
are those primary assets? i have done it with the node "Async load primary asset class list" i think
@surreal peak I've not had any luck being able to detect a keypress while in editor mode. Can you point me in the right direction to do this via c++ ?
Custom Editor Modes can override the Key Press
So the first thing would adding a custom Editor Mode
preferable via an Editor Plugin you create
And in the EdMode you should have Input overrides
Ed Modes are the things you can select at the top, like Landscape mode etc.
ah cheers, ill look into this , than kyou
this looks like a good starting point
https://lxjk.github.io/2019/10/01/How-to-Make-Tools-in-U-E.html
This article is based on Unreal 4.17 code base, tested in Unreal 4.23. This is a step by step tutorial to write tools for your Unreal project. I would assume you are familiar with Unreal already. This is NOT a tutorial for SLATE code, that deserves a tutorial
Not sure what you mean by PrimaryAssets π€
Returns me empty.
is there likea node likea flipflop but with more channels?
You could make your own use a Select with an integer as an input, and keep track of the integer
i am interested in the use case of this
What's the use case? What are you trying to do?
switching between firemodes
I would personally make an enum. Single, Burst, Auto
Then select when the input is pressed
function GetNextFiremode π
If single, set burst, if burst, set auto, if auto, set single
Then you can use that enum in a lot of places and it's nice and human readable.
ah yes thanks
enum sounds better
i thought you wanted something that played together right after each other in a sequence. but doung so with enums will allow you to go in any order you want
I personally use them all over the place for anything with over 2 states.
and you can then just use a select node with the input as the enum
yes, Enums are great
No need to remember what int Firemode = 3 means etc...
i haven't tried it in unreal, but can you advance to the next enum by getting it's index and increasing it by 1?
They basically are just integers with names
Sure you can but that's not super extendable and would have all sort of edge cases, like if you had a weapon that could only single fire and auto, but couldn't burst
I would just select enum given enum and have that encode which fire modes are allowed
yes select for sure. i just had a more general enum question out of this scope
good to know. thanks
I personally use them everywhere, even when you press the escape button, it checks an enum and then proceeds. In my case, it checks menu state, and advances to a new state based on whether you have main menu open, options menu open, or no menu open
thank you I'll try to implement it
What's the way to reliably set some parameter on an actor you're spawning from a blueprint, before that actor executes its first tick? I have an actor that should be spawned by a parent NPC, and I need it to be present in the level as long as the parent exists. So far In the tick I do check for validity of the variable "parent", which I'm setting when I spawning the actor from the parent's blueprint. How can I exclude the possible situation where I spawned the actor, it didn't got it "parent" set but it had already ticked and thus decided to destroy itself?
Don't use tick for that
Instead of checking on tick, just have the parent tell it when the parent is being destroyed
^ tell* it when
adriel is right, avoid using tick as much as possible and use events instead. That being said, you can set "Expose on Spawn" on a blueprint variable to have it available to be set when you do Spawn Actor
How do i enable hittest for world space widget?
Oh, thanks! I decided to use tick because the actor needs to check up on the parent each frame anyway to update it's position.
Can't you attach it to the parent somehow? or does it need calculations depending on the parent position?
@vapid ibex What's the use case? What is it?
It's a fake shadow that always needs to be underneath the player.
oh use AttachToActor or make it a component
So I made a plane with the shadow texture that positions itself on the location of a linetrace hit result from the player straight down.
(Player can jump)
hey, im having some problems when using the "is in air" function to determine if my car is in the air, for tthe most part it works fine but when the car its on air it triggers perfectly and then returns that the car its touching ground even thought it isn't
ohh I see hmm
well I can't say I can think of another way to avoid that, but still just because you are doing something in tick doesn't make doing other things in tick free
maybe with a socket controlled by IK bone which is on the ground
yeah but you'd need to do the ik line trace anyway
you know what, you could use the Is Falling check from character movement* component to only do the hit test when you are in the air
offload some of that ground check work to character movement*
Well I need to validate the parent param before doing anything from it to not get spammed with exception errors, so...
yeah see the Expose to Spawn for that, its exactly what its for, but of course you can always just use Is Valid to check that the parent is there before you use it
right the issue is that it would be considered gone and despawn
still Expose on Spawn is probably what you need
Yeah
Uhm, any idea why i can't change the Sun Height on this SkySphereBlueprint instance in the world ?
I can change everything, just not the Sun Height for whatever reason
Oh, it was cuz i've set the Directional Light Actor
What's the best way to create a simple backdrop sphere with a gradient to it?
Drag in a basic shape sphere into the level and apply a material that has a gradient, basically? I'm not sure how you mean by backdrop though, is it a 2D game?
@burnt nest Nah, 3D, built for a VR headset. Basically I have a level that is open to the air, but I don't want anything like a specific sky or HDRI or any of the tutorial skyboxes, just a general gradient, maybe some fog, to avoid the backdrop looking like a flat color wall
I don't want a skybox affecting my interior lighting, but I'd like to create a step above the "black void" beyond the level
Oh, I see.
Then I would probably go bug the boys and girls over at either #graphics or #visual-fx π
Gooooood point. I figured maybe blueprinting would be needed for something like this, even within the material, but will do!
I would either just make a very simple skybox material with a gradient or use the atmosphere actor and tune the colors
You can also just make an hdri yourself by hand with the gradient and then use that same hdri for the skylighting
So I'm getting "The widget 'Talk_C' already has a parent widget. It can't also be added to the viewport!" everything is working, but I would like to understand what's causing this error or even fix it if I can. It comes about from clicking a UMG button to bring up a dialogue widget using this...
I understand what the error is saying plainly. But I don't exactly understand what it means if that make sense.
@remote belfry you're trying to add to the viewport after you have already added it to the viewport. Just get rid of the second ad to viewport node
I'm quite new to Unreal and Blueprint.. I'm trying to follow this literally 3 year old tutorial on corner peaking.. I can only assume that the circled green Play Rate node has been changed because I can't seem to find it.. any ideas?
That's what I get for not stopping when I'm half asleep. lol thanxs again.
That is a variable not exaclty a node. If you create a Variable in you BP and the left click>drag it over into the graph you'll get the option to "Set xxx" or "Get xxx"
And it's probably a variable type "Float".
Also I'm not an expert by any means.
Oh okay so would I just create a float variable named Play Rate or something? give it a value of 1?
Essentially. But it also looks like that code is referring to a Variable not within the same BP, hence the target.
When in doubt, use the rubber ducky debugging approach
The tutorial doesn't really go too in-depth but for a split second this shows.. would this help clarify?
What tutorial are you following?
This is a really rough 'tutorial' on how I created the camera lean feature in UE4.
Basically, to create the effect, simultaneously move the camera over, and play a camera animation to rotate the camera. When you're at the end of the lean, pause the animation so it doesn't end abruptly or cause any visual stuttering issues. When you're done lean...
K I'm in a lecture ATM but ill try and take a look to see if I can understand what's going on.
Alright! thank you
Sorry it just hit like late afternoon here and my day just exploded b/c it that time of day people feel the need to connect. I'm gonna jump into a FPS project now and take a look.
Hi, does anyone know a thing about boss fights or not?
That is a variable's SET node but for a variable in a different object, and in this case it's on Lean Left Anim Instance which is why it's plugged into the SET node's Target. To get that set node you drag a wire off the Lean Left Anim Instance object reference and choose the SET Play Rate option.
@fervent bramble What ConverseFox said. Also at 3:36 he clicks on the individual variable in the Event Graph so you can see the specifics of those parts. They are of type camera anim inst > object reference
Hiho mybe somone know how i can fix that:
ItemSlot (Chestpiece) Chestpiece isEquipted?->branch =true
How i can find out which Chestpies is equipted?
How i can addtional all Armor Items?
This is only the one Armor item...
I drag out of the Lean Left Anim Instance object reference and I still don't get an option for SET Play Rate. And I'm confused on what you mean by the first statement.
Could this be a way to fix myproblem? ^^
That tutorial seems done poorly. They just show the completed thing rather than making it along with you, and if you try to create everything in the order you see it in the video then stuff like this can happen.
I see near the end of the video that the Lean Left Anim Instance is being set from the Play Camera Anim node. To make sure it's the correct reference type which has the Play Rate variable I would right click the Return Value of the Play Camera Anim node and choose Promote to Variable. Then name that Lean Left Anim Instance. Now you should be able to set Play Rate off it.
Im getting this crash when trying to join a session anyone know why
can someone explain to me what this node does?
@sonic pine sorry im dumb i need like an example to understand
It starts from world location "Location", then applies your transform "T" to that. "Return Value" is the world location where it ends up.
So let's say Location = <0, 0, 100>. Your Transform is <1, 1, -1>, so I believe you "land" at <1, 1, 99>.
That's my understanding anyway. @sonic pine may have a better answer
so it combine the transform location with the location provided?
hey guys I have an issue with an array and it is not updating the information innit
I have this function that checks the name of the card and it is always blank
and here I have the function that adds to the array the cards
No matter if the array came from the object reference or one premade this does not update the name in the array and makes it really messy
A transform represents a series of operations. (https://docs.unrealengine.com/4.26/en-US/API/Runtime/Core/Math/FTransform ), specifically: rotate, scale, and translate (location offset). Transform Location applies that transform starting from the Location.
Imagine you have a character with a gun in his hand. The "origin" (or Location, in this case) is a point on the palm or wrist. Let's say you attach the gun to that point. Well, it's turned weird, and clips the hand. So you grab it and mess with the scale, rotate it, and move it, so it fits neatly in the hand. That series of operations is T. Transform Location returns where the gun should be, provided the hand is at Location.
Transform composed of Scale, Rotation (as a quaternion), and Translation.
@sharp steeple I was playing around with it, this seem to be the result.
Transform - hand
Location - screw driver relative pos
Result - screw driver pos in world
i could be wrong though
yep, really
also for continuing conversations from long ago* you should use the reply feature
its just hard for anyone else in the room (and probably the person you are @ ing too) otherwise
oh https://xyproblem.info/ too that is 99% of the weird questions on this discord
Asking about your attempted solution rather than your actual problem
I mean, it's better than vague "anyone knows about something" questions, because sometimes they have solid reasons to do it, but stumbled upon a problem that they didn't expect.
oh absolutely
but at the very moment i was posting that message, someone else on the discord was admitting their question was an XY problem, and literally 1 minute later there was another XY problem
im just going to ask "why" for every question* from now on
Asking about your attempted solution rather than your actual problem
it's in the link dunno what more I can say
you didn't do that to be clear, were still at the https://www.dontasktoask.com/ stage for you
what about boss fights my friend?
wait not sure you asked that, it got deleted
Hello, I have here some simple mana regen code. the problem is that the timer executes but not the custom event. Anyone know why?
This is a binding for a UI element. It is only called once, and never calls again. It's my understanding that this should call function should be called repeatedly. Any idea why it's not? I'm not manually setting the value anywhere: https://gyazo.com/3bf07dc4c99c56ad718251f218b3b7bb
probably because its on tick, so its setting the timer to 0.2 and thus never executes the event.
actually, i figured it out. The set visibility breaks it.
Using set render opacity works for now.
think of it like this: you're saying every tick (which is way less than 0.2 seconds) set the timer to 0.2 seconds, so it will never execute the event because it will never reach 0.2 seconds. that's my guess
Can anyone help me figure out tank controls? I'm guessing that's what I need. I have a spline camera system, and with the TPS template set up, it can really start throwing you for a loop with the change of directions. Unfortunately I don't really know where to begin.
I know I need left to be left up is up so on and so forth at all times. Do I start hacking away at the forward vectors?
Hey , where in this discord can i ask about materiaals please ? making a material and kinda conffused .
tthanks
that's correct
it sets the timer again from 0.0
it never reaches 0.2 to fire the event because the following tick fires and resets the timer
you could do something like this
remove the clear and invalidate from there
event start mana regen -> set the timer
event stop mana regen -> clear and invalidate the timer
then you'd trigger these events accordingly for when you want to regenerate mana
@fierce birch
FYI, the set visibility "collapse" makes that widget "unoccupy" the space it resides, so other widgets can claim their space
changing the opacity will only make it invisible
probably doesn't matter for your HUD design but its good to know
hi! I'm trying to make a rotating puzzle. This monolith can be rotated 90 degrees whenever you press a key and once you rotate it to a specific side a function goes off. How would I go about that?
so far I got it to only rotate 90 degrees once when hitting E but I couldn't get it to continue rotating each input.
what I got so far
probably its something like this
yaw goes 0 to 90
when you fire this again it goes from 90 to 90
i'd use lerp
every time you press E it adds +90 to a target yaw first
then lerps from current yaw to target yaw
where would I put the +90?
or you can key it like
t0 val 0
t1 val 90
t2 val 180
t3 val 270
t4 val 360
then start and stop the timeline
to reverse, play it in reverse
the first option seems to make more sense to me but I'm having a hard time figuring out where to add +90 every input
you can try this
the timeline for this is set like above
time 0 seconds 0
time 1 seconds 90 and goes on
if you want it to turn slower you can make it longer
eg: t0 0, t3 90, t6 180
sorry this won't work
i'll send the correct one
yeah I couldn't get it to work either, but I do feel like the +90 to yaw each input makes more sense
I just have no idea how to build that
let me try
this would be the timeline
0 to 1 in a second
or how fast you want it to be
0 to 1 in /seconds to turn/
and this should work hopefully
also needs to have this
@candid blade
you can change this to use a rotator lerp anyway
ping me if it works or doesnt π
this works for the first key input, but once you hit E multiple times it changes degrees instantly and not smoothly with the timeline
@elfin inlet
this is ALMOST THERE, but when it rotates after the 1st time now (after play from start) it won't rotate from the same degree it has been rotated to, but it rather starts from the beginning each time
omg I'm stupid
yes it works!!!! finally
thank you so much
now just to figure out how to send out a function when you rotate it to a certain degree
you can get it from current
like if current reaches a certain number then fire event"?
you're doing combination puzzle right
there is a drawing on each 90 degree rotation, once you rotate it to a specific drawing as described in a riddle you get beforehand, the monolith is unlocked unless you rotate it again and ruin it
you can put a logic like this in a separate object
for example if you have 3 rotating pillars
every time you rotate one of them, you fire an event in the manager object which does this
if pillar 1 current is 90 and pillar 2 current is 270 and pillar 3 current is 0, then do puzzle solved
there are 4 of these in this map; if you rotate them all to a certain degree a door opens for instance
yes exactly that
i could show you a bp graph for this but i need to clean my kitchen and do the laundry
π
do you know how to refer other actors
i think I do from this point, thank you so much for your help!!!! you're a legend
thank you I will!
Is it better that you pass delta seconds through a function from event tick or use Get World Delta Seconds in that function?
I'm a poor level artist with next to no BP experience, and I want to create a BP that randomly spawns one of several BPs from an array - I did some googling but I couldn't even figure out how to make an array of blueprints
Ideally, I'd have this blueprint, BP_RandomTenement, which picks randomly between the Tenement_A and Tenement_B blueprint
how the heck do I get an array of blueprints? Just... any blueprint, I wanna be able to put blueprints in there and, boom, it just picks one of them and spawns it in the construction script
blueprints define c++ classes
What would I need to do to make this work?
lemme try stuff
I'm good! I managed to figure it out
wait, now I can't vertex paint on those π©
you'll have to consult the wizards at #graphics
will do, thanks for the help π
i made more spaghetti again
Hello everyone !
I have been self-learning UE4 and Blueprint for 6 months on my freetime and I am new to this discord. Please excuse me and let me know if I don't write at the good place ... As my question concern a Blueprint functionnality, I assumed this was the place.
Here is my question. I'd like to allow each player for a private rebinding of inputs in my multiplayer game. I mean that each player could chose his inputs in a dedicated HUD (which I already created) and their choice only concerns themselves. For that, I used the AddActionMapping and RemoveActionMapping nodes (target is GetInputSettings, see picture below).
Unfortunately, this directly modifies the Project Settings and seems to apply the change for all players (despite the RunOnClient option). I guess the Project Settings is unique ? In addition, I feel this is not the right way to do it since it makes a "Reset" option complicated. Then, I'd like to find a way to create a local file/actor/component that would be considered instead of the Project Settings while is not empty. Then my Project Settings would stand for "Default values" and to reset I would just have to emptying the mentionned local file.
I've read that Fortnite uses something similar. If there is another simple/efficient way, I'd be glad to hear of it. But as I am not familiar with C++, I'd like to do it exclusively on Blueprint.
Thanks in advance if you can help me π
might be a PIE issue
You mean that could work on server but not in the editor ?
how are you testing this
On the editor ^^'
Ok, I'll do that and come back to you π thanks for this quick answer. I'll do in 1 or 2 hours because I cannot right now. (I did not assume a so quick answer, thank you π )
np, if that doesn't fix the issue then you would need to change the bp
but at a first glance it looks like a problem with multiple instances of play in editors
Hiho i try to fix my Character Stat system, tutorials are not helpfull, i have my own system and no copy.
I have different EQ Slots HeadSlot, ChestSlot, HandSlot FeetSlot and BeltSlot
I have a EQ Setting Structure for all Armor Parts.
My problems are:
The Slot shound not say: "I contain a Item" The Slot have to say: "i contain Item XY"
after that i need a way to export the item Data.
I can breake the structure but this are not data only the empty veriables.
How can i read out the data from specific items?
Any Ideas?
Do not store game data in widgets
Create a manager class for storing and passing data around
I will not do that in the widget i have a CharacterStatComponent ^^
you need to show more
where is this item struct? which values do you need to pass to the widget?
what do you need ?
what logic you already have
This is in the EQComponent
Every Item have an ID, boolian (is Equipted?) for the Feedback to the Itemslot, and different values (Strenght, Vitality, Health, mana, Physical and Magical Armor and SellCoin (if you will sell Items, this is the Money you will got from the Trader)
Trying to follow a tutorial but my anim montage page looks different and I cannot drag this anim onto it like they do
This is what epic ays to do
But my screen does not look like thet
What am I missing?
what I see
what epic says
so for every slot widget, you can set a reference to the item in your character, get the item's struct and break it then bind the values to whatever you want
what did you try and not worked?
yeah i know but the structure is for all weapons so how the Code knows which weapon is equipted?
how is your class structure?
i'm not understanding your problem
if you're defining everything in the item struct, the widget doesn't need to know which weapon or item it is
Weapon Stucture -> ParentWeapon -> 6x Axe 6x Sword 6x Shield
cast it to the parent class
if thats your problem
or you can set up a database for all your items, then use the item id's to enumerate and fill your hud accordingly
Ok this is what i tryed yesterday.
the Break EQ_Settings could be every armor Lv 1 Warrior or lv 20 Mage Armor. If one Armor have boolian Equipted? true and all other Armors have false this is only give out the true EQ Settings?
ok or i will use a datatable that could be better
okay
In a datatable the slot have to get out the ID?
if i understand your question correctly, this should only continue executing if the current element is equipped
correct
i still don't understand your problem
are you trying to pass this EQ_settings into your widget?
Armor Slot will trigger the boolian variable IsEquipted? into the the Item what is equipted
you have 5 slots
the result yes
i dont think you need to iterate through the whole equipment array
where does this code go after the branch
well before it is issued, it will still be charged.
The character has a BaseHeath + ArmorHealth = CharacterHealth
the output value is then sent by the EQ StatsComponent to the CharStats widget and to the ThirdPersonCharacter as CurrentHealth
CharacterStats_Widget is that
At the left are the EQSlots (Head, Chest, Hand, Feet and Belt) The red and orange ones are MainWeapon and Offhand
Grey = EQSlots Yellow = JewelSlots (Ring, Amulet, Earring) the lightGreen at the bottom are actuall not relevant ^^
you can pass the thumbnail to these eqslots and bind it
there are so many ways to do this and its implementation specific
so i can't tell you how to make inventory slots
this are inventory slots ^^
yes the eq slots, but i still dont understand your problem
so you want to fill these eqslots
Ok give me a minute i will show and explain you
but you don't know how to pass the data?
yes
you can dm me
ok thanks ^^
Wonderful ! That was it. I can't believe I've stayed stucked on such a problem for that long. That will be a good lesson for me with no doubt. Thx a lot π
cheers
for some reason the logic is not working properly.
The lamp is turning on when holding the interact key and on releasing the key the lamp is turning off.
Hi, wondering if someone can help, ive got a timeline which opens a door if the player interacts with it and some conditions are met, it'll then close itself with another timeline but i want to make it so while its closing you can open it again if you interact with it which i can sorta get to work but because the 'Close' timeline has variable set on finished its still setting those when i stop it and reverse it, i only really want those conditions set when its finished playing from start only but idk if i can even do that.. the way ive got it technically works but because IsDoorClosed is being set to true when the timeline finished it's also set to true when its Stopped and Reversed which it shouldn't be and because of the conditions that need to be met when the player interacts with the door it causes the player to be able to spam the door open again which i dont want
use play, stop, reverse, and direction to define bools
or instead of bools
If you just flipflop from start to end to start in the timeline, it should sort itself out
criteria for open is that the door either is closed, or is closing (moving in reverse direction, but not "closed" yet)
Hi, can someone help me with a rotation issue?
I'm working on a project where you can grab actors and snap them on actors with the same socket names.
When it overlaps it finds the nearest socket, and when you release the actor it snaps in place. But... its not working when the actor is rotated.
Any help is appreciated!
one thing you could try is generate your rotation alpha with a "float interp" instead of a timeline. I used to use timelines all the time for that kind of things, then i discovered float interp it changed my life. you could interpolate towards zero to close the door, interpolate towards 1 to open it, then use that interpolated float as an alpha to drive the rotations on you doors. Look up "finterp to" in google, lots of tutorials on how to use them.
Heyoh I have a question for you peeps... is there anyway to get information from an actor that has a skeletal mesh component to an animation blueprint? Anim BP's usually try get pawn owner, but what if the actor isn't a pawn? Is it not possible then?
Try "Get Owning Actor" instead
@prime stump Can a timeline have a bool track? Just set bIsClosed true up to halfway open, then false.
@prime stump or just set bool based on float track
how do i prevent a pawn from moving in certain directions even after jumping onto another player and being pushed aside
anyone know if its possible to spawn ocean body using bps or no?
water becomes invis when i try to do that
Can anyone explain to me how to increment Team A score or Team B Score on lot of different conditions such as If Team A kills Team B = Team A Score + 1 OR if Team B kills Team A = Team B Score + 1, I want this to be done in the Game Mode but Idk how to do it lol.?
Does anyone have experience with soft boundaries for the camera? I want the camera to slowly reach the max Pitch and Yaw values without a hard stop. The goal is to have the player reach the end of these values within a few seconds of holding a direction.
So you can't snap your head to look down, you have to hold the button and slowly look down.
The only thing I'm thinking of is an event tick measuring the pitch and slowing down input significantly when >= certain amounts, but that doesn't seem to be working well.
You may looking for the spring arm's lag values.
Hello, I have a very dumb question π€
I have a simple blueprint that generates a road in its construction script (basically, just repeating a static mesh on the X Axis).
I would love to paint some foliage on this road but I can't because it's technically not a static mesh but a blueprint. Is there any workaround for that ?
Thanks
Ooou, I didn't know that even existed. I'll play around with that now thank you
Hello how to enlarge button ?
@fierce current UI?
yes
oh
so you want to make a button bigger when you hover the mouse over it?
and back to its normal size when you dont hover on it anymore?
yes
yes but how do I make it bigger
ok
@fierce current
Widget Animations, but that's topic for #umg
Ok
what animation for button>?
a smooth transition
no when you hover the mouse over it
lol
hmm seems like i cant use timeline in ui event graph
there is no other solution ?
there is like custom events and casting i guess
people saying that its easier to do it on UMG the transitions I just don't know how UMG works my self
oh
@fierce current https://youtu.be/HXL5lX5efyA
Learn how animated widgets work and what you can do with them. This video was voted for by my supporters on Patreon and YouTube Memberships. Join them and support me and cast your vote into the next poll!
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my p...
thanks
ok
how do i prevent a pawn from being able to move in a specific direction i have used lock position on the axis i need but when i jump onto another character i get pushed aside into that axis even though its locked
anyone get weird client side behavior with line traces before? I am running the event entirely on the server although it is replicating to a component
hi, what i am doing wrong ? after player overlap wall colider, it is rotate, as it should, but on like 0.5 second, looks like glitch, and then it atomaticaly rotate to previous position(before overlaping)
Hey guys. I'm following a tut and I made an Animation BP for the character and I'm trying to remember how to do this because now I have to make one for the enemy and the tut doesn't explain anything again and I've forgotten a lot. I'm trying to put another "Event Blueprint Update animation" Node for this enemy BP. I don't remember how I got this Node or if it's custom but I can't find it anywhere. Is this a custom Node or does it exist for everybody?
When I copy and paste it into this new BP it just gives me a blank custom node
Try right clicking on the components in your blueprint scene. Look for the Add Event menu, might be in there.
@broken wadi I'm not sure what you mean. What components in what Blueprint scene? I'm in the Event Graph. Do you mean Nodes?
@faint pasture i dont know if you remeber me, but i was attacking server with my ball rotate after wall overlap. Whole this 3 long weeks problem was only that i was using SetActorRotation. But i was have to use SetControlRotatation, since ball is Character
Oh
@broken wadi no its not there
Have you used the Event Blueprint Update Animation? Or is this one the tut made? I can't remember
Might be similar to this
Yeah I looked in that list..
I had a similar issue where I couldn't find how to get a specific event.
Oh..OK and you found it in that list?
Is this event I'm trying to find an actual event that's built into Unreal? Or is it a made up one
But not exactly your case, I wasn't dealing with an animation. Just a mesh.
OK this is a normal event that's built In not a custom one made by the teacher. So I'm absolutely lost. Especially since I had no problem finding it before
This one ya? https://docs.unrealengine.com/4.26/en-US/AnimatingObjects/SkeletalMeshAnimation/NodeReference/Events/
Events called by the animation system to initialize and update the Animation Blueprint.
Similar. "Blueprint Update animation" is what it's called
I'm pretty new to Unreal. Is it normal for something that's normally available to just disappear from where you normally find it?
Or is this a very weird thing that's happening
Its on that same page, just scroll down a bit.
Ugh! I have no idea how this happened but I was working in a character BP not the Animation BP. Lol. I've been working myself too hard I guess. My mind is getting fuzzy
I didn't notice the icon
Still having another issue but I'm fried right now so I'll come back. Thank you for the help though. I'm glad you smart guys are here to talk yo
To*
i've been trying to fix a bug where i wrote code so that an enemy follows me but it always just shows the idle animation. I did the BLS, I added a nav mesh, and I made an animation blueprint. I don't know what happened. here is the screenshot. pls help.
Hi, can I use CineCamera as an regular FPS camera. Anyone tried to use like this?
It's too overkill to use cine camera for gameplay purposes.
Thanks
I am doing this to add characters to my map. However, it seems to stay at length 1, which makes me think it is overwriting. Where can I ++ the index for each additional character to avoid this?
I got 5 buttons next to each other. After sometime hovering they become unresponsive. Anyone know why? I did it from scratch and I get the same thing.
Not to mention Cine Cameras imposes limitations that are good for cinematic direction, but not for gameplay adjustments.
Oh okey, one more
How can I change camera focal lenght
I think in the AI Move function your vector is set to 0,0,0, maybe thats why?
Hey @icy dragon thanks for the recommend on FlowGraph. Couldn't get it working properly though when compiled. I asked about it in the Flow discord but even the author was stumped. I'm on 4.26.2 wondering if you're using an earlier version?
@waxen path sigh i've spent days without realizing that i haven't connected a target actor. thanks for pointing out the mistake tho
let me check if that works
I'm (stuck) in 4.26.0
create an vector array with random location maybe?
i never used pawn sensing event so idk how it works
oh ok
let me try to just get the actor locatino
instead of pawn sensing
location*
That's probably it then. Oh well thanks!
Though the minor hotfix version shouldn't matter :/
Shouldn't... I know. But sometimes things happen. lol
I'm not discounting I did something wrong that's for sure.
@topaz horizonWas looking at ur SS... When does that "Follow" event get called? You have the pawn sensing execution wire unplugged. I don't get it... Besides, how does ur state machine look like? The abp SS is irrelevant if the state machine isn't entering bls to switch animation...
Oh nvm, I just saw ur other comment sry π
oh yea i fixed that and there's a timer by a function name so that's how the follow function gets called but after that it still didn't work
so not only the anim is problematic
ok... what r u trying to achieve? When u get in certain range, trigger aggro? Something like that?
no i just want the enemy to follow my main player
but when does it start to do so?
...
when do YOU want it to start doing so? π
so basically beingplay - get ref to player, timer function/tick, get player location, move to location/actor?
@topaz horizon
yea
should i do this
Try it
@high ocean you know how to use event dispatchers properly?
but i think i'm refreshing the location too often
if it doesnt' work, we'll fix it π
So trying to fix my add to map issue, trying it this way is really weird, so when I add unique and print length it gets 2, but when I immediately get it and print again it gets 1, why is it seemingly deleting an index?
@waxen pathI think so...
@trim matrixThat's what packaging means, making the application/game standalone. It does require some prerequisites probably, but that's it. You can also pack and run those.
@high ocean idk what do i put instead of set player character do i put the enemy blueprint's name or the third person character
@quasi frostJust use the Add to map node man, y u do all those shenanigans? π
make & break struct if you need to, but add to map properly, otherwise ur in for some nasty surprises
set members in struct would be how i would deal with...whatever it is ur trying to change within the map members
Add to map doesn't work. Prints length 1 as well when adding no matter how much I add
@quasi frost all map entries are unique, maybe ur trying to add a duplicate of sorts, it will not add that.
@high ocean i finished the blueprint let me see if this works
@topaz horizonyou are working inside the enemy blueprint. You want to get the player's reference. That means you get the player and cast it to player...
maps dont print out indexes i think
Adding something to an existing key in a map replaces the paired value
@waxen paththey do
sigh still not working
@topaz horizonshow me
idk how
what is ss
screenshot π
srry im new to discord π
haha, i know the pain Duke
I am pulling from a data table, so unless it counts everything from that data table as the same thing it should work.. I will see if data tables don't work with maps, one sec.
Anyone here knows if there's a way to know if a VARest call url has connected successfully? π - that's my current problem π
@topaz horizonTimer is 00, go something like 1, see if it moves at all
aaand it isn't looping
Is it supposed to loop tho
@quasi frosttell me what ur trying to do, I've used maps alot and love them, but I need to understand, otherwise I can't help
this would fire once, on the next frame
lolz gl! π
ye, hence the VA at the beginning π
otherwise i'd be doing my own crap, but yea - lol, no π
That makes sense π
Ok figured out the issue, was a fundamental misunderstanding of maps on my end. Was setting level as the key and so it was duplicated when characters were the same level. Completely my misunderstanding, was hoping to store level in a map for easy editing.
@quasi frostπ Just throw all data u need inside the struct and go with that - I know 2D arrays would b nice, but yea...
@trim matrixread again "It does require some prerequisites probably".... Those are redists, not the freaking engine π
All games require some redists
@trim matrix https://youtu.be/MatkFIvCKMY
Hey guys, in today's video I'm going to be showing you how to properly package and export your game from Unreal Engine 4. Before this is also building the game and changing all the settings for your project.
Unreal Engine 4 Tutorials Playlist: https://www.youtube.com/playlist?list=PLQN3U_-lMANOnnjfvEEVeAPE8mfrGr_VH
Blender Tutorials Playlist: ...
hey, could anyone help me figure out how to limit a tank turret cannon's rotation
When doing a call URL, you get the callback and you can check the response for the response code to verify if a specific result was received (500, 404, 200, etc.).
Response codes: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
This is a list of Hypertext Transfer Protocol (HTTP) response status codes. Status codes are issued by a server in response to a client's request made to the server. It includes codes from IETF Request for Comments (RFCs), other specifications, and some additional codes used in some common applications of the HTTP. The first digit of the status ...
the tutorial that I used (which came directly from Epic btw) forgot to explain that part
but he did go into Tolkien levels if detail on how to make the Tread UVs move, which is perfect for prototyping (sarcasm)
@dawn gazelleOoooohhh, so basically, I can switch on the reply string to show if the connection wasn't established - right? Great! Thanks! π₯³
So is there some way I can get a map from an index to feed it into spawn, or do I need to completely redo this part of my blueprints?
@trim matrixwtf man... Now I can't even tell if ur trolling or not.
Actually I guess I can just get them from index inside of the actor right?
@quasi frostSo, U got indexes to Chars map - right? When/where does the spawn location come into place?
Like I don't need to actually feed the specific map index into the actor if I feed the whole thing, I just need to feed an index number
Yep. Exception being if the URL is invalid, then it appears to return just 0 for the response code.
@dawn gazelleSo basically, if I throw in the following url: blablabla.bla, it should return a 0 for the response code, because the url (hopefully) doesn't exist - did I get this right?
Correct
Great! Thanks alot! π
Unless blablabla.bla exists (in which case, dracula may be pissed you're hitting his website)
@dawn gazelleπ Worked like a charm π Thank you!
Now the next thing would be to create a fake rest server to test my login system. But so far no luck, need to dig more π
online game huh ^^
@quasi frostWhy do u even need the indices of actors? Why not just throw everything inside the struct and use setmembers in struct to modify whatever u need, when u need it? But idk the design.
@gentle urchinNah, just a quiz for those that wanna play the game - before & after they've played it. Educational research π€
Ah , clever
20 questions before, 20 after, for 8+ hrs of (some would say) boring game time. I think it's fair. No monetization, everything else comes free...
lots of reading involved tho - and that seems to hurt ppl like hell π
can't post the game link here cos it isn't allowed but u can still check it out if u want w/o quiz (hence the work I'm doing now) π
probably not ur type tho π or anyone's for that fact π€£
You could potentially use Amazon Web Services Lambda. 1 million free requests per month.
@dawn gazelleI'll check it out, thank you! π
You probably want to ask in #packaging. What you're asking doesn't relate with blueprints.
They have free tiers so you can do testing and development with their services. The free tier stuff usually has limits that wouldn't work for a released application utilizing them, so then you end up paying for the service once you've breached those limits.
I'm making an enemy character and I want him to follow the ThirdPersonCharacter where ever he goes. But no matter what I do, the enemy just stays in the idle animation. Here is the screenshot. pls help.
Haven't read the licence agreement for use, but i'd usually think it involves them owning whatever you put there etc
@topaz horizonFirst, set the timer to loop. And also check that your level has a navmesh, and also check that you're correctly spawning the AI as an AI and not just an actor without an AI controller.
Can someone tell me what do I need to know to create a local multiplayer split-screen game that has a team-deathmatch gamemode? thanks
Hey. There is someway to do the "Block Volume" block only the player and not the other characters ?
Go to #multiplayer and check the pinned messages in the top right corner. Some good stuff there to get you started.
my one doesnt have multiplayer it is on one machine with 2 different inputs, one for keyboard and one for gamepad, but its a splitscreen
Two players = multiplayer.
even if its offline?
Oh so its a single instance game, with two people playing it?
yes
basically, i got a variable which determines how many players should be in the game, i put 2, so me and enemy team
Maybe this might help --> https://answers.unrealengine.com/questions/240300/how-do-i-create-a-split-screen-game.html
How do i get a components relative transform to the actors root? π€
So I'm getting....
Blueprint Runtime Error: "Attempted to access index 0 from array DLGChoices of length 0!". Blueprint: DialogueWidget Function: Execute Ubergraph Dialogue Widget Graph: Choice 1 text Node: Branch
Which I understand
is the product of trying to read an array that is empty
Which is exactly what I want it to do. Its an array that feeds dialogue choices and this is the state for if there should be none.
My question is what can I do to stop the error, and/or am I just doing it all wrong. lol
Ha ha! I actually already had that tab open but I was just double checking since the language kind leans toward not trying to read from an empty array at all. Thanks!!
oh, so did you managed to fix the error or is the error still there?
I'm actually working on it right now. I usually go through a couple results before I start implementing things. but since you confirmed it I'm giving it a shot now. It makes sense I think it will work. Should have thought of it myself but I think the caffeine is wearing off.
oh lol :d
Hi, i need to get a child actor components parent actor, which i have succeded with, but it doesn't stop there, i need to check if it's actor of an certain class so i can extract some variables...
How do i do this?
Cast
Yup got it. I was doing a "text is Empty" bool on a branch. I replaced it with the "get length <= 0" and works just the same with no error. Thanks for the confirmation.
If I were to have some event in my AI Controller class that forgets everything that entered it's perception, how would I lets say get a level instance or some non related BP class - such as a door BP - to use that event?
I thought about casting but there's nothing to refer to as an obj since both are so different
then I thought about maybe getting the class defaults but it only supports regular variables and not class components tmk so i'm not sure what the best route is xD
i am not sure but I think Interfaces
good for blueprint communication
event dispatchers are good for blueprint communication waiting for something to happen and executed
You might use an Event Dispatcher on the door, but you're likely to have many doors and you probably dont want your AIs being required to find all the doors in the level- I would probably put a dispatcher on the Game Mode or a "manager" actor whose job it is to coordinate between the doors and the characters
i would have the door itself trigger the event, and the characters subscribe to it-- you could do it the other way, i think it makes a little more sense though
yh Managers are good to organise multiple stuff into one I think
yeah
@frozen otter so let me get this straight, you want to have a door make your AI character forget everything it knows? What exactly are you trying to do here
I surmise the goal is to make the AIs in a room forget about the player when the player goes through a door
A collision box around the door for example
I'm just looking for a good method to access another class ig
yeah I don't think that clarifies much
hmm let me pull a good example of what exactly I want to do
I'm confusing myself anyway LOL
So specifically, I'm looking for a way to make the AI Perception forget about everything from another class. I know there's a "Forget All" that tmk does the trick, but I need to do this outside of the AI_Controller BP class, so lets say when the player dies from the AI Enemy. What it does right now on player death is clear the player tags which is great; however, the AI perception still won't leave the player's sights regardless of a tag a player has or doesn't have unless the player leaves the perception of it or I think if the perception updates (right?). So anyway, what I want to do is somehow access the AI_Controller class from a completely separate BP, lets say going through a door - e.g a door's collision box - would tell the AI Controller Perception component to forget, or, something else I want to do is find a way to do the same thing but on player death within the regular Player character BP. But yeah, letting the AI forget everything it knew about what was in the perception. I'm probably overcomplicating everything either way though lol.
There's probably so many better ways to do this but my mind isn't really gathering much rn
if it's about having the AIs forget the player on death then make them forget the player on death. If the player died btw that actor is destroyed unless you are doing something uncommon, so you actually need to clean up that reference
if you keep a reference in blackboard to a destroyed actor you are liable to get a crash in AIModule
ouch lol
yeah it's annoying
thanks for the heads up. hm okay lemme see
you could have a BTTask or decorator that checks if the targeted player (in a blackboard variable) is dead and clear it for instance
ah ok. however about that ^
I originally was doing that but I had an issue with getting a reference to the blackboard in the player character class. on the death event, I'm pretty sure I tried setting the blackboard var value as a boolean (true) for example, so the Behavior tree could run through and be like oh okay he's dead so let's not run the other tasks, but it always returned nothing tmk and threw an error. I can prob reconstruct that and grab the exact issue tho if it helps
a reference to the AI's blackboard from player character?
If so, the player character shouldnt know about the AIs in the game directly, you should use Event Dispatchers if you want to drive the "cleanup" process from the death event of the player character
but here, i think the missing link is that Decorators can solve this
gotcha
you can write a custom decorator that takes a blackboard key so that you can get the actor in that blackboard key and check if its dead
that decorator can read the blackboard key, get the actor, cast it to the appropriate actor class, check if its dead, and if it is, then clear that same blackboard key
This is only really ideal if you have only the simple use case of clearing the blackboard key thoug h
if you want to layer more complex logic in, then use Event Dispatchers
ah okay
huh, I had no idea, thanks
A good way to do it might be to have a common character class that has a dispatcher of "HasDied" or something, and then have the AIController cast the perceived actor to that, and if it casts successfully, subscribe to the HasDied dispatcher from the AIController
that way the AI, who has seen the player, is responsible for asking for events on when that character has died
Worked great, thanks @sudden nimbus!
float precision, just abs it.
I see, if it was a float precision error would it show that the actual value is just a very small negative number like 0.0001? When I debug even the debug says -0.000000
Still, just abs it
it technically isn't a precision issue AFAIR
alright thanks both of you
How would I get a true/false value for whether or not a character is visible to the player? I have a health bar widget that I'd like to hide when the enemy is occluded by a wall/floor but I'm not sure how to check for that in a relatively performant way.
I should probably mention my game has a ton of enemies onscreen at once, I know I could do a line trace on tick for each widget but I'd imagine that would tank performance pretty badly
Do the raycast from player, and only show the health bar on the enemy that the player aims.
Heya, how do I make it so a static mesh bp object plays noise upon pressing "e"?
Good idea, I might run with that if I can't think of another solution. My player characters have a lot of AOE skills though, so I'd prefer to keep as many health bars on screen at once as reasonably possible.
Do you have a max visibility distance and an idea of how many visible enemies max?
are we talking a kilometer and thousands of enemies, or a few dozen meters and 20-30 enemies?
More likely a km and* anywhere between 50-250, one of the characters is a sniper archetype so I'm trying not to skimp on render distance too much.
3rd person view? how big is the field of view around the character at any given time?
3rd/1st with "scoping", FOV is pretty wide. The camera is quite far behind the characters
I was thinking of attaching a large collision capsule* to the camera, getting all actors within that and then doing a trace to see if they're actually visible but I'm not sure how practical that is
I would set a large sphere such that the edge of it touches the camera
get overlapping actors, and batch line trace them if it gets too heavy
you'll have to do this in C++ though
but I can do like 1200 traces per frame no problem in my project
I would have a custom channel for these traces and only have geometry that should be blocking it block it
Oh that's good to know actually, thank you
Who cares if it takes a frame or 2 to "see" an actor as long as it happens soon
I have the enemies set up with a custom "enemy" trace channel, the main concern I had was that tracing only returns the first blocking actor though - if an actor was occluded by another would I still be able to check their vis with tracing?
You'll have fun cramming 250 hp bars into that horizon though, unless you have flying bois
Hah yeah, I was thinking of doing some math based on distance+number of visible health bars to fade out the distant ones if there are too many onscreen
@proud sableHere's what I use my many traces for. Don't use 1200 in game, just tested at that high, but will easily hit several hundred.
Ooh that looks slick. Going back to the trace channel, how do you stop traces being blocked by the closest enemies? From what I understand traces only return one result, won't the nearest ones block traces to the furthest?
Ahh, seems like MultiLineTraceForObjects is what I'm looking for? I wasn't aware of this π (Actually wait those wouldn't be blocked by walls as far as I can tell, nvm)
Don't have enemies block the trace
yeah multi
just trace vs geometry that you can't "see through"
Ahh, yeah that makes sense. Thank you!
In my project we basically have 3 channels for gameplay. Vision, Bullets, Walking
Can shoot through a fence but can't see through it
can shoot and see through glass but not walk through, etc
so fence blocks vision and walking but not bullet, and glass blocks walking but not vision or bullet
well, ok, if the goal is to hide health bars, do a single trace for visibility+enemy originating from the camera/player and see if the hit is visibility instead of enemy* no?
just see if you can make it to pawn location. Use Time
or just use the bool
if no hit, can see enemy
you could also use character perception for this-- if the character can see the player, show health bar, if not, hide it
sorry if all this is covered already
Yeah that would be a good approach as well depending on ease of incorperating to a player controlled character
yeah
Thank you both, this gives me plenty to work with. I definitely came at this with an overcomplicated approach in mind
Hello - Does anyone know if it is possible (in blueprints) to add a horizontal box to a existing wrap box within a widget?
I am working on a talent point tiering system, and have a condition to see if I have values in my array for that tier. If I do have values, I want to create a horizontal box in my talent wrap box, and then I was planning on adding in a custom widget I already put together for each talent being loaded in that tier.
Is something like that possible?
Wouldnt one usually just hide the box untill conditions are met?
hey does anybody knows how to convert a y phasing weapon to x phasing
If i got your question correctly, you wanna dynamically add a horizontal box ?
Correct
And if that were the case i believe you must make a new WBP for the horizontal box alone
And depending on the talent category I am selecting it could be 2 tiers or 6 tiers
Ahh, so a standalone widget that is just my configured horizontal box then?
yeah
Alrighty, makes sense. I had done it for my categories already, so I guess Ill put together that then - thanks π
What do you mean by x and y phasing
facing?
has anyone used the AutoSettings plugin? I have a HorizontalRadioSelect for player inputs, I know how to switch to preset inputs, but when selecting other option of the HorizontalRadioSelect, I don't know how to switch to custom/saved inputs when clicking a different option of the RadioSelect
thanku for your concern i fixed that
yes i was talking about facing only
Just rotate it
yes i have done that only
i want to know that it dont create any problem if i m using line trace
bcz in past one time happend this with me i dont know properly is this is only the reaon or other
At what level is it built wrong? Does the mesh itself face Y, or the actor you built with it, or what?
mesh itself
Just fix it at the source, I think you can set a default rotation on a mesh
okay i will try thanks man
Got the previous health bar widget visibility issue set up in blueprints, I am running into a clarity issue as expected though.
Right now I have it so that health bars far from the camera fade away which helps a ton with depth perception, but I'd like to have the bars offset on the z-axis when there are a lot of them onscreen at once so there's less overlap.
What I'm doing is getting the distance between the camera and the enemy, then mapping that to a relative z location between 100 and X (500 currently).
Then I'm trying to β¨ math β¨ that in a way that takes into account how many enemies are onscreen (Array>Length node). This works, sort of, but it linearly raises all the health bars up too aggressively when there are a lot of enemies onscreen. Ideally nearby ones would have a Z Loc value close to 100 regardless of how many enemies are onscreen, is there a simple equation I could apply here for that?
I have no idea if this makes any sense outside of my own head so apologies if this is confusing
Hi, I have a question. There is some way to block only the player character and not all the characters with a blocking volume?
I've found a solution, thanks!
Well, I sort of figured it out. I add each overlapping actor's location into a vector array, sort it by the distance to the player and set the first and last indices as "furthest" & "closest" variables, and use those for the min+max map ranges. Struggling a bit with performance issues since sorting the arrays isn't cheap but for now it does what I need 
Hello, I have created an empty project, how can I prevent it from moving in a scene?
on my stage I can move even though I don't have a character
how to prevent this ?
How do you get a reference to an "Actor" within another "Actor"?
without using any overlap events
forward it by "expose on spawn" if you can and hold it there would be one solution
if you tell us the use case, we might come up with a better solution since its quite dependant
I have a "door" that controls the logic for a "puzzle interaction" upon the puzzle being solved correctly(player interacts with door to run the win check) the door opens after it finishes opening it "sends a message/cast" to a separate actor which is a animated walkway I was going to try using casting for once but cant seem to figure out needing the object input without using some overlap event
ah yes i remember, gimme a sec
so i see at least 2 options for that:
A) the door has a variable of the walkway actor which you can then set in the level editor. This way the door knows which actor to call
B) If there is only 1 door/walkway in the level (which i think is not, but anyway) you can try the node "get all actors xxx" where is xxx is the method to get them: by class/by interface/by tag etc
is the level design static or do you work with procedural generation?
btw casting is not "getting something", it is always rather "coverting the view onto that actor reference" (u have a animal reference, but since you know it is a cat, you can cast to a cat reference)
Very insightful!
What about using a parameter in the construct graph that sets a variable to "actor object ref" and then in the interface message plug in the actor reference that way? Would that recognize instancing and such? im kinda all over the place trying to find "best practice" solutions
i think i dont fully understand what you are trying to say. in the construct graph are you trying to fill a reference with a valid object or are you creating one?
how to shoot projectile when weapon is attached in ue4?
When the player picks up the weapon*
that's very unspecific, do you mean the launching of the projectile or the location-calculation of where to spawn the projectile? need more information on the problem
The launching of the projectile
have you created an actor class for the projectile (including projectile movement component)?
Yes
then you can usually go with the node "spawn actor from class"
if you want, you can share examples of your code and i will check again
i used the node spawn actor from class but when the player picks up the weapon and he shoots then no projectiles spawn...
show some code please, we need to see which information is passed into the spawn node and maybe when it is triggered (input event or something)
are there any checks that he spawns only projectiles when a weapon is equipped etc., maybe the projectile class which should be spawned changes depending on the active weapon?
Hi, Im sort of new to Unreal so forgive the simplicity.
I'm trying to move a character along the wall only (corner transition is not needed) But the character should only be allowed to move along the wall.
Is there a better approach than using splines for this scenario?
that looks more or less okay, have you debugged it yet? do you reach the node at all?
Yes
But it doesnβt work
i want when the player picks up the weapon and he shoots it then spawn the projectiles
another thing you could check if the projectile movement is "auto-activated" (i think it is by default).
Just to make sure the bullet isnt spawned and just not moving.
Also, since it is taking the scale from the socket in account aswell, this can be a problem too.
it is not easy since there are many factors where this can be wrong
try to split the transform pin and only pass the location and rotation
Wich transform? Make, Break or Socket
ah nvm, you already do that
Is there another solution to fix it
hellow!
is there a way to fire projectile toward the direction of the mouse control?
like toward a crosshair from the character
i am having a bow and arrow esque gameplay
Yes
theres a deproject mouse to world location that can be used
or trace under cursor
so I have an arrow that is attach to the bow
but the orientation of the bow will change based on the movement of the character
the arrow has a projectile comp on it when it exit the bow and will travel in the direction of the bow orientation
did you get that π
is there a way to move the arrow to the mouse position
or the crosshair
i am not sure right now, best would be to check the debugger if all the variables are filled correctly etc. (Select the Node and press F9 to set a breakpoint, then run the game again)
There are complex and simple solution. A simple solution would be getting the WallNormal via a LineTrace and then setting a Constraint on the CharacterMovementComponent.
Or Character, but I think it was on the CharacterMovementComp
Not sure if that instantly works, but it would help keeping it along the wall
what does your projectile do? does it work when you don't have the weapon equipped? if you print hello on beginplay of the projectile, does it print when you shoot?
whoops tagged the wrong person sorry π
@worthy carbon
anyone know how i might get the top sphere to stay in place on a hit like that and not fall over and do... whatever that was? The two sphere both simulate physics and are connected by a physics constraint.
maybe write more about the kind of development which needs to be done. Blueprint in general is such a big topic π also weekly hours and payment are a good start to advertise. Or one of the channels under Job Board π
Can't trust someone who wrote job listings in all caps for non-stylised branding word.
get wall right vector, and then get player forward vector, and subtract both vectors and see their values, and use branch to check condition.
the other solution is to disable player left, right movement input, so you can only do W,S ( not A,D ).
you can also do a line trace from player to wall hit normal, based on normal or vector you need to some calculations.
Thanks for the reply. Ill check it out. Is Using spline movement for character movement discouraged in anyway?
Your solution makes sense. What I was worried about was slanted walls
I can't seem to have more than one Dynamic Material Instance to add to my First Person Camera. Does anyone know another way?
I'm trying to have these screen effects and I need to be able to apply more than one at the same time.
You mean PostProcess Materials?