#blueprint
1 messages · Page 1 of 1 (latest)
Agreed, blendspaces are a wonderful thing
could you provide a screenshot or something?
There are some layers to what you're trying to accomplish. (If I understand correctly - I just read back to it just now)
Are you familiar with using line traces?
not really
Not trying to diss you or anything, but you should look up some tuts on just line trace use, a common thing is for simple interactions. Line traces and related things like on overlap and Get overlap compnent and things like that are all incredibly useful far beyond just setting up an explosion, so you should definitely get familiar with that stuff
@lofty rapids thank you! The boolean was a simple fix. I'll keep your advice in mind for future reference
Trust me, once you learn how to handle traces and overlaps, you're gonna use them a lot and be glad you learned about them all the time.
As engage mentioned For Loops are also extremely useful and get used all over. In a gravity system I just set up, my character can check for all gravity volumes that it overlaps. If there are more than one, I can use a for loop to add up all the gravity fields and divide them to produce an average gravity.
I see how that could be used. So should I look for actors within the explosion radius, line trace, and then apply an impluse?
Ill show you how my gravity check looks, although it definitely wont be a clean fit for your case, it's related
k, thx
here's one part
thats simply "Is it now overlapping zero grav fields? set the bool accordingly
simple use but useful use 😄
Thats a custom class I made, called "Gravity Volume"
Here's the averager
that one has a for loop you can see
Thats a pretty diverse filter, btw, can be practically anything
yup, I see
In that case, its getting all overlapping actors then filtering down to which actors have a gravity volume, which is my component that will have the relevant info to work with
So if it overlaps an audio object or something, it doesn't try to average the audio's gravity source lol
Hi all, does anyone know how to translate what is captured from a SceneCapture2D - a minimap in this case - into in-game locations? For example: I want to be able to click on the player/enemy/an empty space and get its location
How do I give "Get Overlapping Acters" a target?
Right now, it's just targeting "self"
the target is whats being overlapped
Then how come I can't just directly apply impulse to the actor? Shouldn't it know what actors are overlapping?
self sometimes works if the code is in the right place from the start, but in my examples, I have to select the capsule component more often than not, because "self" woulod mean the entire character blueprint
do confirm that your actors in question are physics enabled to begin with.
Simulate physics. Make sure your character can bump them n stuff
I dont have a good answer for that, its probably gonna have to be some clever tricks where you do some math to figure where your cursor is and compare it to some other math that can solve for where the relevant items are
either that or youre gonna have to make a really crazy material/widget where the clickable stuff is coded parts of the widget
No. You can make and call functions in BP so it should be posted here.
I'm wondering whether an event calling function A (which does stuff but doesn't return anything) and then function B will wait for function A to complete before proceeding down the link to call function B
You asked about a void function that’s why I asked
Yes, they go in order
void just means it doesn't return anything
delay in the function? nope, I was just curious since I know Events are single threaded and functions I think are multi
Not in bp, not usually
You generally need cpp for multi-thread except for async load nodes maybe
If you're talking about a function with a void return, then afaik it would just complete straight away and then the next one would go ahead. If you're using the word "void" to mean "invalid", thats a different story, because "void" actually has a definitive meaning in programming
Yeah, he meant the regular meaning, just threw me off because you don’t hear native terms in this channel often 😀
I meant void as in the java void function type
so it would fire off the function and proceed to the next one without waiting for the void function to complete?
In any case, I'm no master of Unreal, but some of the things it does under the hood screw with syncronicity in blueprints, so sometimes delays are the answer when they otherwise wouldn't be in cpp
It has to complete in one tick anyway, so nothing to wait on really
Hence why I asked if you tried to add a delay in a function
But you obviously know better than that 😀
How do I connect Get Overlapping Actors to Add Impulse?
I literally just solved a major bug today because a stupid event/function pair was able to run all the way through to completion in one frame and then run again in that same frame (it really shouldn't be running twice, but w/e) delay.
For each loop
if it fires the func and proceeds without waiting for it to complete it could make problems if the void func has a lot of for loops or other complex stuff that need to finish first before the next func
Array element doesn't connect
drag off the array type in for loop
From array not from element
theres a lot of diff versions of for loops and you might get the wrong pins if you just type it up in open space without the context
nothing connects to the target element on Add Impulse
Afaik they just go on order given it’s a single thread, can’t really jump over unless you add latent functionality, but I do admit I’ve seen race conditions at times
In which case I’ve used macros
Show your code
You're probably going to be sending events to those actors through an inteface or event dispatcher
Oh
This one goes to the entire "Blueprint communication" subject. Its another insanely useful topic that you should jump into and learn broadly speaking
You will never see that in blueprint. It's all single threaded on the GameThread with a few rare exceptions unless you purposely expose async stuff.
the for loop will most likely need to call events , which will be carried out by the actors, with that code being continued on the actors
ie. the add impulse stage will be on the targets themselves
Not necessarily. Thats something components can handle
btw, what I'm trying to do is create an explosion that knocks back entities within the radius
also parent actors give their aspects to all child actors
like If I make a cube actor and tell it how to respond to gravity volume information, then every copy of it that I drag into the scene will already have that component ready to go, and all 500 cubes will know how to repond to a gravity field without any code duplication on my part
But game dev is weird sometimes, so what you're really going to be doing is essentially "Hey every relevant object that was hit by the blast, fly backwards for me, pls"
Via a command on the relevant object, a function that tells it what flying backward is and how to do it
When did you start with Unreal?
like 2 weeks ago
If you need to use that node you can cast into the actor and get the desired component
I thought you might be a newbie 🙂
Don't get scared of this stuff, it will all make sense soon enough if you keep at it.
But, trying to do really specific stuff, even seemingly simple stuff, can be prohibitively hard when you havent learned a ton of basics. Don't be afraid to spend some time in significant basics/beginner tutorials. My favorite guy early on was Ryan Laley. He's very good at being super transparent about what he's doing and why
Ah, engage's link looks quite relevant, nice find
To get you started.
BTW if you follow that guide, just remember that even if it works well, its only one of many fully valid ways of doing it
Cast to won't be a character if you're trying to affect other things or multiple actor classes
Usually not much reason to care about that. Things that get moved are usually a character, or simulating physics. Might need an extra condition for things using a PMC.
Also be aware that a pretty solid official source exists 🙂
https://dev.epicgames.com/community/unreal-engine/learning
do u guys know how I can pass
FVector CommandMoveLocation
output parameter into " Vector Destination" input in this blueprint function
using this function to call the BP function
{
UE_LOG(LogTemp, Warning, TEXT("CommandMoveLocation: %s"), *CommandMoveLocation.ToString());
}```
Its a delayed forloop, so it works :p delayed internal execution flow
But if its taking this much time id wonder why... are these classes huge for some weird reason? Memory wise ?
You basically break the internal flow of the forloop
Not outside on the loop body (as that wont work)
Like this?
https://www.youtube.com/watch?v=7Q1gqpf2JhU
I was trying to use Set Actor Relative Location and found it seemed to move by absolute position. Or more specifically, I had something that was not at the origin that was sent to the origin if I set the relative location to 0, 0, 0. I figured it wouldn't have moved at all instead.
Yeah
I do like 1500 traces per tick no problem
C++ though, if you're in BP only you'll struggle
it's not the traces that will be slow, but the math and general BP overhead
This better shows what I'm doing
Then I just render the triangle data to a render target adn sample it in shaders
This is the old way I used to do it which is a bit smarter in some ways, only shooting at wall corners. Depends on what your level geometry is and if it's straight lines or not.
The last one is in general the effect I'm aiming for but the geometry is more complex (different heights, rugged sillouhets, maybe windows at walls at different heights).
I'm guessing you have rays shooting on some constant z value (floor?)
Yeah we shoot at a constant z
it'll be pretty hard to handle elevation changes
This is VERY unfinished but feel free to mess around with it
https://github.com/AdrielKinnunen/SpectrelightPlugins/tree/main/Plugins/SLVision
Thanks for sharing!
This is what you use for the first video right?
That just shoots the rays, you'll want to get the polygons and draw them to a render target for actual usage
yeah the 1st / 2nd
2nd is the latest video, i went from constant angle between rays to constant perimeter
Very nice
The angles are still constant per perimeter right?
I've seen a method where you initially start with a bigger angle, and then between each 2 rays you shoot a middle one until you find the sillouhets and other objects in between, and iterate for a maximum number of iterations
The white dots are the target point
It's easier to just slam some density of lines instead of trying to be smart about it
BTW with the render target thing, you can do spooky stuff like this
Since you'll want a copy/blur anyway, if you just decay the copy between frames you get this ghostly effect
Trying to reduce number of traces so it will be cheaper do to various z values
Would it still be logically 2d or can you have 2 floor Z levels at a given x,y?
I would say even more, it may not even be directly on x,y plane. Think character going down/up stairs
yeah that's going to be super hard
I did a gpu version of this once but it would have to be for visuals only and not have any data available for gameplay
basically compare pixel distance from viewpoint to scene depth as viewed from viewpoint
I wonder if these can be done via shadow map / volume technic
I guess it was just a shitty shadow map what I did
If let's say we take the first person camera, it shows visible parts
If it works it's not shitty 🙂
I don't have a video any more but this is a still of the distance vs depth comparison test
idk if you'd be able to mask on it tho
Why not
This is really cool.
Math can be slow but you can use the math node which can help alleviate some of the overhead of some more complex equations. Avoiding division can be helpful as well. (For those using BP only)
I mean just the sheer amount of nodes
I went from 8ms/frame to 0.05ms/frame just by moving the math around the traces to C++
Looks like you can mask on depth
idk how to handle the shadows tho
unless you want shadow ppl
I'm surprised you cant manipulate the shadow data in post.
I am trying to do component scripting for the first time and I don't think the component hierarchy actually has a notion of location in it. So when I set relative location, it is relative to the origin. I don't see a transform with a location in it. So how would I properly add one so I can have the blueprint move the object around?
I think I figured out my problem. I was trying to set the relative location to the actor when I needed to target my scene component.
You can set the relative location of the component which is its location inside the blueprint it's in or alternatively, you can set its world location.
This is a set transform option as well for both relative and world.
Yeah the YouTube video I first saw on the whole thing was talking about having stuff moving relative to each other inside its little subspace and I realized things were a bit more vast than I expected.
Like "<rips from bong> What even is a location, man!"
Which would I want to use then if I was trying to lerp a timeline-affected vector? I am trying set relative location and it's using the full vector value. If I use add relative location, it just goes nuts with the math as it just adds more and more of the vector's affect each tick (kind of expected that)
Do I have to capture the original location and work off of that instead or something?
Well, I got it to got that way. Even figured out how to promote to a variable and do the math myself. I'm only 99% clueless now! 😄
That would depend on the lerped value. Generally, I tend to set the location when using a timeline.
You may need to set the components initial location when the timeline starts and then use that and add the timeline value.
If the timeline is using an absolute value, you might be able just to set the location to it.
Relative location is location relative to attach parent
if you don't have an attach parent it's the world
You will want to get the initial location when using a timeline, yems.
can anyone explain how animation notifiers work? ive followed the documentation, added a skeleton notifier in my animation, but it's not showing in my anim graph
documentation seems to suggest that you just add the skeleton notifier and it should automatically show up as an event that you can add to an event graph?
this bit isnt happening for me...
Are you using anim montage?
Show how you are playing the animation
And how u call the notify
Iirc anim notify only pick up from anim instance
So if you use the play anim node it's not gonna get picked up
hello guys, im currently trying to create aim offset for different types of weapon, i started with the 2d aim offset, but i have to make aim offset for each of the weapom
which lead me to changing the up and down using transform modifying bone so that i can move each spine
but the problem is, the character is not looking at the camera
and the character look up and down way faster than the camera
its not looking directly at the center
anyone know how to fix this?
heres my blueprint setup
its just a simple one
does anyone have any suggestion?
should i stick with different aim offset for each gun?
can anybody halp pls >,<
how do i set the spine so that it moves accordingly to the center of the camera
I was looking on My GPU profile. And the most instensive to compute is 'Nanite::VisBuffer'. What can do to optimize that? Or is this supposed to be like that?
So I'm having this issue where I'm not able to open my child door and my guess is it's coming down to this custom event in the parent and then it's being called on Self inside the Interact Function of the parent, evidently making it not work with any child object of the door parent. This was all working fine and dandy when it was just for one specific door. I realized having a parent would be better so I wouldn't have to redo the code for several doors. Though I'm stuck on this little issue. I hope my amazing Paint masterpiece makes somewhat sense here
If anyone has an alternative solution than to use a custom event like this or if there's any way I can use the event to work for parent and children
do you by anychance hafve the open and closed events themselves implmented directly in your child class
have no idea how to call it
so bascially as im playing the anim montage, not activating it through my anim BP, the notifier doesnt work?
what i want to do off that notify is have my enemy react to the parry
Nope, the events are created in the event graph and then they're only done in the function of the parent class because I cant do a timeline inside a function for some reason
Yea you can't do latent events in functions, delays timelines etc. If you add a print string on the parent events, are they running? Can you send a screen shot of the rest of the child class?
The way you're doing it, and the way you're describing it is on the right track
No they don't run because the target i'm trying to open is the child door while the event inside the function is targeting Self, which is why my concern with Self on events is using events like this won't work in inheritance cases. This is all I do in the child BP.
and I'm not able to think of any other way to try it either. I tried with some trickery using bools but to no avail. My brain is limited lol
Targetting self shouldn't matter
Oh wait, you're calling those events in the parent
How are you trying to call the open and closed events
oh yea this is how it looks like in the child class
In the Interact function of the parent. Like, all the logic pretty much, is inside the parent as I was hoping it would work with any child then aswell.
Ok, do this for me, on begin play in the child, call "open door" and tell me if it runs
yup it did ^^ yea that negates my theory then
It should 100% be working on the child as well
Put a print string in the childs interact function
keep the call to parent
yea i did two prints in the child function. before and after the function. None of them shows.
So something is stopping your interact function from running
How are you calling that function
is it an interface function or are you casting
Does it have the tag you specified? I wouldn't use a tag, you don't have to for interfaces. If you want to be sure a class implments an interface you can use "implements interface" instead. Realistically though, you don't have to. It wont return an error if it doesn't it just simply wont do anything
I had a Does Implement Userface before using the tag but it was returning false on it, I only switched to tag because I thought it was due to the Parent implementing the interface and the child inheriting interface and the For Loop gets the child door that only has the inheritence
Dumb question, but you properly implemented the interface right? Like in the parent, you went to class settings, interface, and set the interface?
Again, if the interface is in the parent, the child should also have it
Yea, although I expected it to still stay inside the details tab. This is in the parent
There's no interface implemented
If that's the details pannel for the parent, thats why its not working
Interact is just a normal function, and you don't have the interface set
yea which is weird because I remember creating it
Set the interface, and then make sure to click on the interact function in the "interfaces" dropdown on the left, and not the regular "interact" function you have. Then put all your logic in there
ahhh no way...
it makes sense now
well i fucked it up somewhere along the line yesterday I guess 😂
Glad you got it fixed, remember to go back and remove that tag check, it's not necessary and will just create problems for you later on
Also, just a bit of advice, in your child, on the left in the my blueprint pannel, if you click the cog wheel, you can show inherited variables. Which will show you everything the child gets from the parent.
Ahh yes it works now 😄
Awesome
Ahh neat! Cheers for the help!
No problem!
Hello everyone, I'm new to Unreal Engine. I'm encountering an error like when I restart the editor, my C++ actor component class variable is removed from the blueprint components. I've tried disabling live coding, but I still get this error. How can I fix this?
That component is added via c++? If you click on the class settings for that class, what is it's parent
someone please help me door keeps spinning
I create this component with c++ but i add it with "Add" button in blueprint. Its parent class is "UObject" and my blueprint parents is "Actor".
@graceful peak help please
I'm going to, i'm recreating your code rn
tysm
Hmmm this may be a better question for the #cpp channel, but I will say, I'm confused as to why your custom component inherits from UObject and Not SceneComponent
Upss sorry, i said wrong. Its inherits from "UActorComponent". I looked wrong class 😅 . Then im going to ask this at #cpp channel, thanks.
Soooo its working fine for me, what does the inside of your timeline look like
one of them is 0 - 0 , other one is 1.5 - 1
can i see the components pannel in the blueprint
Interesting, i doubt this will fix it but what happens if you use the door in your code instead of default scene root
Also how are you calling "Open Door"
? What works? You got it fixed?
Im sorry, what do you mean? Can't see what coming through the code
someone help me please
Haven't worked with BP Interfaces in ages, is there no way to create event dispatchers in them?
I dont think so
Shame, I'll do it in cpp then
Show what calls open door, and try to organize the code so you don’t have streams behind nodes or crossing each other, as much as possible. Being readable generally helps debug faster
Ok
Instead of rotating the scene component try setting the actual actor rotation, see if that fixes it
The door
you mean like the static mesh
No, like the whole actor
i cant drag it
UE5
Hi, I am trying to add a "drifting" function to the Vehicle Sample game.
In SportsCar_Pawn blueprint, there is an input action called handbraking, which is called when the user presses the "Space Bar".
The SportsCar_Pawn is using the ChaosVehicles.WheeledVehiclePawn parent class.
The SportsCar_WheelsRear is using the ChaosVehicles.ChaosVehicleWheel parent class.
What I would like to make is When I press the space bar/Using the Handbrake Input Option,
3 Values should be changed:
Cornering stiffness and Wheel Load Ratio in SportsCar_WheelsRear and the car's mass: Mass in SportsCar_Pawn
I have tried the "Cast To" command but it does not work.
How could I do it?
In short: when a keyboard button is pressed, the program have to change another blueprint variable's value, but this blueprint has not the same parent class as the first blueprint
There’s a blueprint communications video pinned here that you should watch to understand cast. What is the relation between the 2 blueprints, how do they interact?
anybody? 😦
Not sure, if this is for #animation purposes I’d ask there
Wdym it doesn't work. It work, you just have to catch the notify
Didn't the doc you follow show thay
Thanks! I will watch it!
alright, ill try asking there
how do I set these variables before spawning an actor so constructor/begin play code doesn't fail
Wdym, how’s it failing?
"Item Data" is a data asset which has a static mesh variable, I need to set the spawned items mesh in the constructor depending on the variable
if that makes sense
in a nutshell, im using a data asset to select the mesh
How do I get the actor closest to my forward vector (the red line)?
maybe try expose on spawn, it will add it into the spawn where you can plug it in
Gather the actors you want to check into an array, and then do a GetPointDistanceToLine on each of them.
worked, thanks
I'm having a puzzling issue where I have a reference to the Main HUD in my pawn controller, but when I try to access it from the Game state, it returns as null. But its parent, the controller, returns as valid. What could be the cause of that? Here the Camera Pawn Event Graph follows by it's functions Reference Casts and HUD Creator, then the Game State at the end
https://blueprintue.com/blueprint/bmueelpm/
https://blueprintue.com/blueprint/0delk3kv/
https://blueprintue.com/blueprint/mak9r0k_/
https://blueprintue.com/blueprint/sepc_hn7/
Also here's some custom logging I made with the result of variable validity checks
Ey yo as soon as i move out of the attenuation radius the On Audio finished event starts to fire more often
Is it supposed to be like that?
Cuz my light also gets weird cuz of that i want to play sound wait a bit and play it again and switch the light on and off
Two notes. For starts, don't do != blank pointer. It might work, but an IsValid check is more secure.
Second, the reason you're having this issue is probably due to beginplay orders. You cannot rely on beginplay orders. Some beginplays will almost always run before others, but there's no promise. You can test this by putting a 0 second delay in your GameState. You'll probably see the HUD as valid. Not good practice, but good to understand.
On a tangent to this, I'm not sure what you're doing, but don't. UI should have basically no coupling to gameplay classes. Your GameState should not care about this widget. You gamestate should do it's own thing, and have braodcasts or variables set for it's own stuff. The UI widget should be able to GetGameState->CastToMyGameStateType, and then bind events or get variables to affect itself.
I have mutli line enabled on my text in a struct but when it's stored it isn't multi line?
I'm storing a bit of data in a string array then using join string with a delimter thats
+
So that it has the shift+enter and some character that I can use to split it.
Ah okay, I was going off of a youtube tutorial and did that verbatim
What you're referencing in your tangent, I mean
Most of them are garbage
Official Epic ones, MatWadstein, maybe Ryan Laley, those are usually the only ones that know what they’re doing
Fair. 😄 Youtube, or really any tutorials tend to cut corners to keep view retention. But as a general note, the least amount of interaction between gameplay and UI classes, the better. You never want your UI to affect how your gameplay classes logic runs, without direct explicit input from like a button press. UI is for display and input. So you tend to create UI as a layer on top of everything else that binds to gameplay classes and pulls/inputs to them. It makes development a lot faster, and a lot easier to iterate on. Gameplay programmer doesn't have to go looking through widgets. UI also has a habit of getting reiterated on a lot in projects. It's not uncommon to entirely ditch a whole widget in favor of rebuilding it, and that really sucks if you interconnect it with gameplay classes because you end up having to do a lot of work for what should have just been a basic class swap.
Got it thanks!
question, how can I convey a bunch of information through the Apply Damage event?
like I need an attack to say if it can be blocked (a boolean), and what element it is (an enum). I know about Damage Types, but don't know how to change their variables on the fly from object to object - and I don't think the solution would just be "make a Damage Type for every possible combination"
There’s a damage type class selector on that very node. And how many possible kinds of damage are you going for in your game?
I'm trying to make an explosion that deals knockback to anything within it's radius. This bit od code kinda does that, however, it only launches my character and only upwards. how do I fix this?
To start with, there should be absolutely 0 nodes after you call destroy on the bp
the launch velocity, 0,0,1000 is exactly upwards
well, I was hoping to just have 1 damage type with an enum and some booleans that I can select and change on the fly - like if a player uses a normal attack, it can be blocked, but if they perform a heavy attack then it can't - would I need 2 separate damage types for this? I have about 8 elements in my game and several other booleans I wanted checked, making a specific damage type for each possible combination doesn't exactly sound right, so I feel like I am just missing something
Launch char only works on characters, so all of the surrounding objects would need to be characters and you’d have to cast to the base class
Yeah, damage types is usually more for stuff like fire damage, ice damage, etc.. I think the tooltip even says that
What node should I use instead?
what should I use instead?
I think using something like #gameplay-ability-system might be the way to account for multiple attack parameters
🤔 maybe add radial impulse or add radial force to a sphere collision component
Gonna start working on weapons, what blueprint parent class should I use??
Maybe actor component?
This isn't uncommon. The Damagetypes are just passed as a class, like a template with some basic data that damage handling code can use for reference. It's entirely up to your code to use these templates and their static data along with the other data passed from the damage node to handle damage calculations. For example you can make a Melee damage type, then add whether it's a light, medium or heavy attack, etc. You can make a basic ElementalDamage subclass of damagetype, and specify some variables like arrays and such. Like default effects to add when damage type occurs. Subclass that and make Fire that automatically applies a burning, subclass Ice that automatically applies a freezing, but you only have to cast to the ElementalDamage type.
It can get complex easily, and it can be tempting to just hardcode some stuff. But it's generally better to make an asset driven system. You'll spend less time modifying the code, and more time configuring assets for gameplay balance like it should be.
That said I definitely agree with Neo about using GAS. If you have even a vague C++ ability and some time to spend learning it, it can save you a lot of hassle.
for some reason, when I enabled GAS, I can't open my game anymore - it says I have to try rebuilding it from source manually.... ;-;
Anyone here possibly able to help me with a Save Game issue i'm having?
maybe, explain the issue
Currently, My save works correctly other than on a fresh install where no save previously exists. When creating this save and saving values to it on this install no data gets saved. I am unsure why. After this first save all data is saved correctly
show code
Code is a bit of a scramble but I do have a does save exist set up before hand
So I changed it to this, but it just doesn't do any knockback to anything
I get an attempted to assign none error on this first load only. Appears to occur when any of the "SaveGame" events fire
change it to radial force and this component should likely be on something that's in the center of the explosion, not the hit objects
show the error log
Yes I am
Like this? (it still does nothing btw)
ok, for starters, when you click on the magnifying glass in that log, does it take you to this? And also, do you have "As Fruit Save Game Ref" showing anywhere or is it just talking about your return value @tulip lintel
no, read what I said again
where is this Event Hit, what blueprint?
here's the whole blueprint
To my knowledge everything that it's pointing too is related to these values from the structs. Clicking on the magnifying glass takes me to any of these areas in the instance
the name
add an isValid? check after the Create Save Game object, do the errors go away?
BP_FirstPersonProjectile
k, do you have a sphere collision component on it rn?
is it this?
kewl, drag that into your graph, then add radial force to it
I have a actor that Has child actors at locations where you can grab it. These child actors are queried from an array to find the nearest one All working perfectly. But I am attatching another actor to this actor and that actor also has a child actor on where to grab it, Im also adding that one the the array on the main actor and its being detected correctly My Problem is I am moving constrain to these locations But Im having a really hard time getting the constraint to move to the attatched actors child actor location relative to the main actor. Hope this one makes sense., Anyone see any issue here ?
Hey all, is it possible to unposses pawn to prevent destroy when player close the session? for now Im just spawning new vehicle actor with the same params, but I hope to find better solution.
I would still get the errors by the looks of it. After the first load and the save has been created this isn't an issue as the save exists and values get saved without issue
Maybe i'll have to add a create game button here
you would or you are?
I'm just getting this error, did I do something wrong?
doesn't make sense, if you're still getting those errors, they should be pointing to a different object
what does the rest of the msg say, it's cut off
The error logs point to here still, which is the same areas before the isValid is being placed
remove the destroy actor for now, see if the force actually works
leave the isValid check in, add a delay of 1s, see if it still does this. It makes no sense though, it shouldn't keep going if your isValid check is failing
its not really working for me. I know the maths is wrong but any ideas what I need to alter. I am rubbish at maths going to be honest
No errors, but nothing happens
So I set an IsValid? with a Delay of 1 second as screenshot above. A save is created as expected but the erros printed still occur. Some reason something to do with values getting saved on this creation cause the save to messup. Any time after this it's no issues. Super strange
my guess is, bp structs. They're broken af and adding stuff/editing them at runtime creates all sorts of issues
So no real fix?
use cpp structs
Idk how cpp structs work
I think velocity is in unreal units (uu) . 1 unit = 1cm , so if you're trying to calculate using meters, it might be what's throwing you off
yep
they're not super complex to setup but you do need a tiny bit of cpp programming
here's how they do it in the FPS template:
well, impulse works
but radial force/radial impulse doesn't do anything
Is it possible to make a main menu appear only once, Lets say on a fresh install. As soon as the player hits play it will never load that level again?
Savegameobject
A simple bool there will do the trick
in my char_BP, I'm trying to cast to weapon_componentBP to call an event which sets a RepNotify variable. I was trying to simply have weapon_component have the variable and linetrace function
1: wth do i place in the object box? 2: please point me any links which will help me learn this so i dont have these moments?
i'm reading and watching everything possible, but casting i still dont quite understand.
Such as I suppose "If pressed set true" and load this level, if false load other?
you're replying randomly and did you watch the blueprint comms video pinned here?
It's a place to store values. The logic rest on you
😮 oh snap. didn't notice that. sorry Zirii
🙂 no but i will now ❤️
Apparently impulse doesn't work. I switched radial force to add impulse, and now I'm getting the error saying that my player capsule needs to have simulate physics enabled.
but fi I enable simulate physics, i can't move
also, this didn't happen the last time I tried to use add impulse on my player character, so idk why it's doing that now.
sec, I'm looking into it
Check the target. It's mostly pointing at null
Just show the error log
this was exactly wat i was asking for. perfect answer neo. ty
are the objects you're pushing set to simulate physics?
you're joking
U still haven't show the error log btw
Hmmm, I'm confused one second
tf, making me question my existence when his isValid check is not doing anything because he's looking at the wrong thing lol
everything but my player model
btw, nothing takes knockback, no matter if they have simulate physics off or on
yeah, looking at the docs for add radial force it says "Add a force to all bodies in this component, originating from the supplied world-space location."
the origin location is wherever it hits. So why doesn't anything in the radius take knockback?
idk tbh, you might have to stick with add impulse. I've tried a few things with radial force including adding it as a component and no luck. There's a couple of tutorials on radial knockback out there but I'm not super fond on how they do it
Where is your Set As Fruit Save Game Ref node?
the issue is, add impulse isn't working either
it requires simulate physics on the player model, but if I enable that I can't move around
are you doing what they are in the template, where it's adding impulse to the component of the actor being hit that is simulating physics?
How can I record a scene in unreal in the unlit lighting mode?
uh... try #cinematics maybe
You don't seems to know how to use variable?
I want this to effect my character, but no part of it simulates physics
Do you know how to set variable?
well yeah, if you turn on physics on it it'll turn into a ragdoll afaik
maybe ask #chaos-physics, idk why I didn't think of that earlier
I have a "Set as Fruit Save game Ref" before the game loads, i presume this is where my issue is then
so how do I deal impulse to my player?
yes, that's why I asked you if you had that anywhere originally 😄
Ah right, I must've miss read it. Sorry
what's likely happening is you're trying to access that before you have set the variable
so at the time of the initial save it's pointing to null
well, I thought I knew but apparently not so I would post that it in #chaos-physics
k thx
So I'd need to have this node set ideally before the save is created?
Yes
According to the error log anyway
You set it as soon as you create the save. Or when you are loading
Create save game object, draf the return value . Promote as variable
guys im keep getting this window when im trying to save? what is causing this?
Dont try to load or access before setting the savegameobject
Do you have multiple instance of the editor open?
Nw
So would I still have this setup wrong? Should I move the "Create Save Game Object" to be beofre the Set Ref or just move that to be after. I still get the errors :Z
Ofc u get the error. You are setting a variable to it self
Since its pointing at nothing aka null ptr. Then it still point at nothing
I told you how to set it above #blueprint message
Damn I'm happy I don't have to manually serialize structs like this anymore.
So this?
My first try at all of this so i'm still trying to learn 😦
Sorry to ping you again, but I finally figured it out! I just dealt radius damage to anything within the explosion radius and then on the player blueprint, I can break down the radius damage into a direction for player launch (If you can't tell, I'm really excited)
Oh nice. I thought you’d already tried the radial damage mb
Ye but try to understand what u r doing and why Ur error is gone
I think I did, but couldn't figure out how to break doen it's vectors
Any help on this issue would be appreciated:
I was just changing up the skeletal mesh for my blueprint that was already in-place and working fine. I got the entire chase mechanic working, but ever since I changed the mesh and restarted my unreal editor, I go back in and click on the mesh component but the details pane is just empty and the actual skeletal mesh can't be attached anymore because of that. I don't know what happened:
The error isn't gone for me tho 😦
Oh I got it thanks guys
Guys for some reason im keep having a red msg telling me texture streaming budget smth and my quality of everything goes down very extreme, is there a way to fix this?
it makes everything look super bad
sorry for a stupid question, but i'm a little lost here
i get a Team of a Pawn (Name type var.)
and i want to make a branches here, T1 true/T2 false
how can i do it here?
What var type is this?
Just wondering if there is a cleaner way to reference certain things. Like in the example below there is quite a chain of references where the system could fail (assuming I don't use isValid nodes).
Why are you getting an array of units from the ui?
I could place this in the gamemode now that I think about it. But as it stands it is because there is 1 particular node for checking which units are under your selection square, which is only functional when in a HUD BP connected to the "Draw HUD" event.
You can check if the TEAM var == T1, ifso, you execute the true path, if not, you know that it is equal to T2.
Hey guys, I am currently working on a prototype where there is a hub world that evolves as you collect items in dungeons. My current thought on how to do this is have the "evolving element" set up in a hub level blueprint that triggers them to repair once a varible or object is collected from the dungeon - is this a good way to do it or is there a simpler way?
thank you, i just realized it, i can use Equal operator for a Name type var
does anyone know how I can apply "character launch" tp am actpr?
You cannot. You can either add force (which is over time) or add impulse (which is instant and very similar to launch character). Both options are physics based, so ensure you have simulate physics turned on
hey guys if i am using add impulse and i want to know the current speed of the character how do i do that
adding impulse doesn't work either
what should I connect to the target
ive tried using velocity but it returns values that are way less than what i plugged into the impulse
Type it in Google, it will tell you how to "fix" it. (Increase texture streaming pool)
The target is the reference to your actor.
Alright, thanks ^^
nvm im just gonna set the velocity instead of useing add impulse
Usually this would deal a lot of knockback to a character, but it seems that it barely moves the cube?
is that okay or are there negative results for that? if i just set velocity instead of use add impulse?
Likely because the friction is too high, or the force is way too small. Try multiplying the damage received by 10000 and see if it still barely moves it
Or alternatively, multiply the vector you put into the impulse by 10 000
Well, that kindof worked
I can push it sideways
but it won't go up
In that case specifically multiply the Z value of the vector more than the X and Y
Only works if I aim perfectly at the bottom
Alright, then you will have to do some further debugging to see what the input vector (from your break hit result) is in the different scenarios. Then you will figure out why it only works when you hit it directly from the bottom
I'm pretty sure I know why it isn't going up; none of the rays are hitting it's bottom, so it doesn't have any Z direction vectors
I don't know how to fix this though
How prevent possesed vehicle from being destroyed on player disconnect?
Not sure where to put this, but how would I make an objevt's model animated? Like a spinning disk for example
it can be done in the material
Im really bad with Unreal, I have a question about widgets, I cant get the details tab to show me the event cues
like I cant assign events to the buttons in my widget
Hoping someone can help me out, currently have a parry mechanic set up but enemy enters execute state as soon as button is pressed, I have an animation notifier set up in my animation but no idea how to reference it and create a 'perfect parry timing' mechanic...
U would have to do that in the Anim BP. There you can have Events getting fired and you can then continue as you wish
Guys i have problems with cloth painting, in wich channel should i ask for help?
If you have an anim notify called parry enter you would have an event called Event Notify Parry Enter or sth like that
@hoary summit
yeah i dont
i added this parry notifier and have saved
and cant see an event parry anywhere
where can i find the event? in the anim bp only?
Ok, just found it
thanks bro
so this is in my anim BP, how can i link it to an action in my character BP
had the idea to cast to the blueprint and get the boolean is perfect parry, but have no object to link up
anyone know how i can better reference that?
super easy question. how do I make a conditional statement using two conditions? like an "and" statement?
im trying to see if a value is between 0 and 3, > if true do a thing.
I know I can just put another conditional after but is there a cleaner way?
"And" is a node
Watch the blueprint comms video pinned
you can do greater or lesser than and make it the condition of a branch
if true then execute
Also, where is this code, what bp
character BP
watching now thanks
So what’s ABP_Manny used for ?
that's the name of my animation blueprint
Oh
its being used to get a reference to my parry timing anim notifier
cant find another way to bring it into my character BP
Yeah, I getcha
but it's not working anyways lol
Afaik you need to go from anim initialization into the char not the other way around
You should just be calling play animation and then run things off the initialize event in there iirc
Does anyone have the algorith for gamepad acceleration? So when you turn your camera left and right when aiming in a first person game, the acceleration builds up the longer you hold it. That way holding left on the joystick will make you spin fast, but tapping left will not give you full acceleration turning speed.
algorithm 😀. Just use enhanced input and drag off the elapsed seconds with a branch that checks if a certain amount of time has elapsed, then increase your speed float if it has, set it back to normal when done
Or hold trigger and set the slow turn off the cancelled pin
Few ways to do this
I never thought of that. Would that be smooth though? Also I needs to be held in a somewhat same direction. So if you just spin your joystick in a circle, you won't go full aim speed, but if you hold it in the same direction, say "left" then it would eventually build up to full speed. Call of duty for example does it that way
Like this, If I spin the stick, my aim is still tight
but I can spin fast
🤣
It’ll need a couple extra checks, like action value to make sure same direction is kept. It can be smooth for sure, the triggered pin ticks
How would I play a sound on a moving object?
Hi!
Is there any variable type that represents a curve? I'm trying to control one of my component's variables with a curve.
Spawn sound attached, or add the sound to the object inside its blueprint if it's a blueprint actor
@lunar sleet So this does work like you said, but I'm new to enhanced input so is "action value" something I can get or do I have to calculate the direction myself. I never know with this new system what is already done for me and what I have to create myself. There's not a lot of info on gamepad stuff besides basic sensitivity
Print those action values and watch what happens when you move the stick in each direction
It'll spit out values from -1:1
Right, so you’d have to cache the initial value and check if it stayed the same throughout, within a certain tolerance anyways
I get what you're saying but I'm still confused. Because the numbers are going to be all over the map when spinning the joystick like you would when aiming or spinning the joystick.
Here's the X
IDK how to compare this lol. I mean I could take the magnitude of X and Y which would give me a value from 0:1
but even then my value would probably be 1 when fully presing the joystick all the time in a circle idk
The point is to check if you’re holding down in one direction, I thought?
Well it is, but it's also like the .Gif above of call of duty. Where your aim is "tight" until you hold the joystick in a direction.
IDK if i'm making any sense. It's hard to explain
So lower sensitivity?
I have sensitivity lol. It's some sort of acceleration. Think in terms of say a car, If I'm going 10mph, then want to reverse, It takes it a few seconds to slow down and then go backwards. Well the joystick feel the same way on games like Call of Duty. It's not just a hard set linear sensitivity. There is some acceleration feel to it
Yes, you can make that too
That's what I didn't know how to calculate
I know lol I couldn't find any info anywhere
Yes, but how 🤣 I didn't know how to wright the calculation. How to get directions etc. Do I have to break out the cos, sig, tangent?
Not necessarily
There’s near equal
Which has a tolerance
I’d prly cache the x and y on started and then on trigger check if the incoming action values are near equal to them. But it would need some testing, especially because you could start by going in one direction and then rotate while holding and then hold
So yeah, maybe do some research on the topic
Thanks. I'll keep at it. It's frustrating how there insn't much about it anywhere. Most people just tell me to use keyboad and mouse and get lost lol, but it's not for me, I just want an enjoyable experience for gamepad users as well
lol no, def. I hate consoles but I can understand the need to develop for them
I never noticed it until a friend of mine who only plays on gamepad told me my game felt off. Then I plugged in an xbox controller and sure enough it's hard to aim lol. So i've been researching ever since and trying out games. Turns out it's a common issue with lots of AAA games too. But COD seemed like it did a good job from the games I've been testing
how would i sort an array of numbers ?
Isn't there a sort method?
It might be in cpp only
Other than that, write your own quicksort algorithm.
There’s a TArray::Sort but not a bp one I don’t think
Implement this or learn how to write a bpfl in c++ 😛
is unreal editor's multi-user editing plugin actually useful?
what should I use instead
just regular old source control
Isn't multi-user nothing like source control?
no one needs to work in real time like that. In fact it's kind of a disservice to.
No, it's actually built on top of the source control integration
Oh my.
it just allows you to visualise the other uses changes as well
but it work's well?
so its the regular file locking and such
I saw some people using it to have unreal open on multiple pcs to work on stuff sdie by side.
no
its only good for lan only, and it's main use was before one file per actor and such, to edit the same level at the same time.
(no one used it for that)
Now with one file per actor and such there's literally no reason to use it. It's experimental, and completely unnecessary :P
Regular old source control with file locking and a bit of communication will be just fine
I could see that being a use. collaborating literally side by side with a friend or something.
That's literally the only thing I've ever seen someone use it for.
It was at a virtual production studio where they had shit tons of hardware and wanted the virtual set they were using to be edited by multiple people.
so I should just use source control if everyone's remote?
And the fuckers had like a 100gb/s internet connection. Tested it on a speed checker for me lol.
That's an interesting use!
I only ever heard bad things about multi user editing. Although with OFPA there is little use for it still. Again the only use I can think of is as you describe. Multiple people in the same building trying to make 1 level cohesive, and quickly. I feel OFPA really overshadows any other potential use case.
Holy damn! Wouldn't mind that for myself :P
I was more surprised that the speed checker could handle their speed.
Oh absolutely. Multi-user is not for anything even remotely normal workflow lol.
Multi User is used heavily in virtual production
But that's pretty much the only place I see it
Is git/github a good source control?
git and github are not interchangable. Github is not a good host
Git is good source control, Azure DevOps is your best host
If you truly want the best experience for unreal engine, and have the funds to pay for it, Perforce is absolutely best no contest
(as bad as it is)
but you will need to pay for your own host, and depending on team size, the software itself
I'm sticking with git rn, as I have a bit of experience with it, is that ok?
yeah, perforce is miserable to learn, and unfun to use. but you can't beat its tools with binary assets and such
it will be, just be prepared for lesser tools and such.
git is absolutely fine and used extensively
studios normally use perforce though, so it may be a consideration at some point, again, money dependent .
Hello im using the set view target blend function i would like to know if there s a way tok now then the animation has finished like a "is finished " or something
Does event begin overlap only work between actors?
@twin epoch yes, what else?
I'd struggle to think how it would work with anything else
an actor is something in the world
an object doesn't have a world representation to overlap with anything
and overlap uses the world...
Does github have a storage limit for projects?
I have a 8 directional moving character with the animations set up, how do i add "start/stop animations" with the "constant animations" in the middle?
do i increse the grid layout or
yes
thats why i said dont use github
azure devops is free, right?
yes
and it doesn't have a stoarge limit?
dang
though you can go above it
damn
with unlimited LFS
if your project is above 250GB with your uassets in LFS you are doing something insanely wrong
yup
aint nobody playing that shit about 250 gbs
well, I guess I'll go learn azure then
above
it does require a card information tho, right?
there's not much to learn, its still git, you're just picking a different host for the rpo
not that i know of
hmm
anyone on know anything about animation blueprints/blendspace
Hey guys, does anyone know why this simple fInterp code I made to smoothly transition between vignette off and on isn't working? It is just printing the same value of .01667 every time it is called. Thanks in advance for the help!
the boolean isn't the problem, as I see the print strings when the code should be going
Current needs to be something that changes over time.
oh, so how should I do this if I want to have the vignette intensity just go from 0 to 1 over an amount of time? I can't use a timeline because i am doing this in an actor component
When adding a doublejump to my character, would you guys suggest to just increase the jump counter or rather setup blueprints that check if you still have a jump available and set that to 0 when you did 2 already?
actually I have an idea, I'll try that and get back to you, thanks for the help!
You just need to store the return value in a member variable and pass it in as current.
yeah that's what imma try now, thx
if I add a sphere collision to my mesh will it prevent me from going into walls or do I have to use overlaps to prevent that?
anyone got a suggestion better than world widgets for how to do a computer screen? the text gets torn to pieces by anti-aliasing and increasing render resolution+decreasing scale gets absurd after a point
is there a good level sample to use for full locomotion animation set ups, like "ValleyOfTheAncient" that isnt 100 gbs
Hi guys, should a wheel or a part of a vehicle best suit a scene component (parented to say a static mesh component so a mesh can be added), or as an actor? I can't make up my mind or understand fully the scope of things when thinking of future functionality. For example, swapping a part out, like a wheel, will swap out not just functionality but also its mesh
why does left click print but right click doesnt
can you add an angular impulse or force to a character movement?
Hello I followed tutorial YouTube for making 2d top down, But I met directional player problem
Depends on your collision settings. Overlap and block are two different things and they do what they imply
Hi! I followed a tutorial about sliding and I set up running first and a bunch of setting stuff up. I am having problems with my running speed being set to my crouch speed after I unrun.
This should be all the info and images needed to fix the problem if anyone is willing to help. Thank you!!
That’s because on clicked only detects the left mouse button by default. If you go into the player controller being used, you can add new bindings to effect this.
You can use win+shift+s for screenshots, easier than taking pictures. If you’re following a tutorial and it works for them but not for you, watch it again a couple of times. Usually it either means you missed something or they casually skipped over a step
Are you correctly setting the directionality in the player? That sounds like the problem to me.
I haven't looked too deeply at this and don't know exactly what the issue is, but at a glance I see the Can Stand function will always return false
Does the teleport node not work if there's multiple attached actors?
I notice it works if there's only one attached actor it'll work, but not if there's more than 1
Could be a collision issue
874G .
all free assets from the last years are "in" my project :>
aint no body got time for that migration nonsense
Luxury
gta 6 is smaller
git will grow fast with binaries like uassets and umap
lfs doesnt really exactly solve it, you still need to store the full copy
though now with One Actor Per File
it should be more forgiving for changeing stuff in maps, so it doesnt need to update the whole binary
😅
why it prints "vegan burger" but says it's length is 3, the same thing with the other burger
It's printing the length of your array, ie the number of elements in it, not the length of the string
yea i know, the point is that it's selecting the wrong burger, it says that the length of the array of the selected burger is 3 even tho the vegan burger length is 2
You're trying to get the index of the vegan burger it sounds like, not the length of the array its in
That array contains 3 burgers, so it's length is 3
Hey guys how do i create a local variable in a BP?
that is only in memory after a node and not all time
like in C++ a scope
what? no, it doesn't contain 3 burgers, its the "recipe" like the bun should go on top and on the bottom, so the array is 2
Ohhh I apologise, I saw your third screenshot and thought those were the burgers
So you're trying to print out the number of ingredients for a given burger, and although your setting the "correct order" variable to "vegan burger" it's still printing 3?
yea
The Random node will pick a random Name for Row Name , and a different random for the append
Didn't even see that
really?
yes, try saving the Random to a variable, and useing the new variable for Row name and append
okay, that works, thanks
Can someone help me with the crouch and sprint system for 1st person template with an animation with no locomotion
i can try to help you
accept DM
Guys another thing. When i change r.VolumetricFog.GridPrixelSize to some value it resets back to 16 after i restart
how do i save that?
Why not just help them here? It's what the channel is made for :P
That's how pure nodes work. Pure nodes being the ones without execution pins. They don't cache their results, so every time they're needed they're re-ran which could provide different results. For example, if their input values have changed between executions, or there's some kind of randomized functionality to them.
This is something to be aware of with the default For Each Loop engine macro. If you double click on it to view the macro you'll see the Array input is never cached and is plugged directly into a pure Length and Less Than node before finally finishing the chain at a Branch which gets called on each loop. This means if you connect any pure nodes to the Array input it'll be re-evaluated for each loop body execution. That's also why there's a warning not to change the input array's length or order in a comment in there.
whats the best way to "do something" when the player is looking at a specific object?
Line trace on tick, send an interface to whatever you're looking at. Normally when a button is pressed. Thing implements the interface and does whatever
Ahh fair enough. That's what I'm already doing was just checking if anyone would suggest something else. On the right track then atleast 🫡
But how would I compare Hit Actor to children of a parent class? 🤔
does someone know how I can keep the canvas panel from the parent class, and still put other elements in this child without making the canvas panel from the parent class to disappear?
I have a weird problem with UI.
After using the Inventory I have to double click everytime I want to shoot in the game, that's with Input Mode set to Game and Viewport Mouse to No Capture, if I set it to Capture Permanently It works with only once click but then I cant move the mouse while clicking...
Any Ideas?
Anyone here knows about debugging cooked project?
I'm geetting a Fatal Error crash on Open Level and i have no idea why and i can't find the reason
Crash report just shows it might be soemthing to do with particle being deleted but which one?
how do i find out ?
is there a way to set a dynamic material parameter on 1 instance of an instanced static mesh? I would like to change the color of some instanced static mesh procedurally, but i cant figure out how to access an individual element from the ISM
I think you want to look into Material Parameters
By combining the nodes PerInstanceCustomData, VertexInterpolator and the SetCustomDataValue function, we are able to have different Scalar Parameters on Instanced Static Mesh Component.
exactly what i needed, thank you so much
Hello,
I am generating a simple mesh Procedurally and the generation works.
The mesh appears as intended
But If i change anything during the gameplay, such as toggling a variable on the actor, the mesh just disappears
Focusing on the actor does nothing. The procedural mesh just vanishes.
How can I fix this?
Ok... I've been beating my head against the wall for a couple of days on this so I'd be super grateful for any insight. The idea is that I have a beam weapon. When the player holds down the fire button, a beam particle comes out of the the weapon which uses a line trace to calculate its end point and applies damage, using a timer rather than tick, and it can start fires based on the physics material it hits. Right now I'm just spawning decals every time a line trace hits but what I'd like to do instead, using a counter I already set up to "skip" x amount of line traces, is set a spline point and then add spline mesh components to create the illusion that the beam has melted a line along where the beam hit. I'm open to alternate ways to accomplish this rather than using a spline comp.
Does anyone know why it doesn’t save?
Is it possible to do this random?
you want to play a random sound out of 3?
I wanted to play 3 sounds but make them play one after another
Hey guys. Ok so I finally got the spline system working somewhat on my beam weapon. I'm now running into an interesting issue where the mesh between the first and second point seems to be causing issues and I'm not sure why. The pipe mesh is just a placeholder. I'm making a "melted line" mesh once I get this working right. Here is a video of what's going on:
Here is the code for the function being called by my line trace in order to update the actor that has the spline component in it every time I create a new spline point.
It spawns with 2 initial points
Also...
Id reconsider the entire logic there ifnim reading it correctly
Guess i read some of it wrong
I still think it could just be one mesh
Also the spline has 2 initial points
Howdy,
How can I go about stopping a song with a button. I currently do this with sound effects, but when trying to do this with a background song the audio doesn't mute / change volume. I presume it would after it ends but I would want it to pause straight away?
when you're in a function just scroll down the my blueprint window and youll find local variables
Try #audio for that stuff
Probably need an AudioComponent on the HUD or similar to play 2D sound for music. Then reference that for control. Not sure if there are better ways to handle that, but at least default and FMOD do most everything through components.
I've made a "SpawnActor" and "AttachActor" for siwthcing between weapons (keyboard numbers 1-3) this works well BUT I keep spawning multiple actors if pressed multiple times; is there a way to replace / only spawn one
Thanks in advance x
im really confused what's going on but I made an item pickup using attach to actor, when it has no code, the child works fine and behaves normally but if i add any node inside it the game comes back with errors and doesnt work
I added a print string with begin play and it worked weird
bone attaches normally
(please dont make fun of it, its a bone)
adding this print
Well you’re setting “enough knife” but not checking it anywhere that can be seen, should prly check that is false right before you spawn
Thanks, quite new to this; will give it a shot
Where is the logic that is throwing this error?
inside the parent
the parent has this and the actual child has nothing inside
addinbg the print breaks it tho
Any reason you don't just add a "User" parameter to your Interact? Make it Actor,, or Pawn or Character, or something. When the character interacts with something, pass self through. Doing these gets and save references on beginplay is tedious and error prone for a lot of reasons.
oki
For starts, if you suddenly decide to kill off your pawn and spawn a new one, suddenly nothing has a valid reference.
Another reason is that you cannot control the order of beginplays. There's a good chance a lot of thing's beginplays can run before your character even exists. Even if it's in the level it may not be possessed yet so GetPlayerCharacter won't return it.
i added cast to interaction rather than begin play 😄
Hmmm.. ok so every spline comp starts with two initial points? So in order to make this work correctly, when I create the spline, I should move the point at index 1 to my hit location before creating additional points?
Soounds about right
I ended up deleting the first (second) pointn
So i only started with one
ohhh. that actually might be a better solution for me
That worked really well to stop the duplication (Thanks)
But now if i have pressed 2 and then 1 the "1 slot (pistol)" doesnt respawn
Show the pistol code
Can’t tell from this. Use breakpoints and step through the code to see what happens when you do that
Apologies I'm not too well versed with 'breakpoints'
Get versed 😀, debugging is 50% of game dev
Select a node, press F9, run the game
When that node it reached, it’ll pause the game
You can then use the arrows at the top to go through the code one node at a time
Hey not sure if this is the right place to ask, but I'm trying to get cloud saves on steam sorted for my game. Does anyone know how I can find out where Unreal Engine stores save games on different platforms? Thanks
I will thank you
I'm using GetAllAcorsofClasswithTag. I have actors with MyObject_1. I would like to find actors that contains MyObject_, I tried to add MyObject_ to GetAllAcorsofClasswithTag but not working, any idea?
Maybe name it something other than object for starters and just add the corresponding tag
Figured it was just these missing, thanks again
When is recommended use GameplayTags instead of enums for some status?
any ideas on how to deal with this translucency on faces that aren't receiving direct light 
apart from adding emissive light
always
enums are exclusive,
while a tag container is inclusive 😄
do you think this looks okay for a crystal material
that's really cool
i would add more faceting and scratches on the surface depending on if it's natural or polished:
oo true, i completely spaced on the normals
hello i'm trying to create unlockables with a datatable, i have my character colors set up:
problem is i don't know how write to the data table to make it update after an item has been picked up:
Data tables are read only
i have most my systems set up with data tables 🥲
what should i be using instead?
you can use a datatable for the definitions of the unlockable
but to unlock something you'd wanna put some Identifier in some container that you can save
Row Name into an Array for example
help
i made a light trigger button everything is working but when i changed the point light variable to array it doesnt attatch to toggle visibility anymore, i need more than one light to turn on an off in the same button do i make more one variable for each orwhat do i do
What would be a good answer to:
What is the difference between sets and arrays ?
There are different operations possible depending on the type.
Also, any examples on what is handy in a specific case ?
Enums are fine for things that need to define simple state. But avoid it at all costs on anything that needs to be saved to disk. A good use case is something like the Widget's visibility stats. It has a few states that are easy to edit in a project agnostic way without needing to have the tags specified for it.
But as stated, Enums are really bad for anything that needs to get saved to disk. Lets say you derpily write this enum with SomeState, SomeOtherState, AThirdState, EvenMoreState. You release the game, people are saving this to disk. And then suddenly you realize that you need an invalid state. You can add it to the fifth slot, but it'll look kinda derpy. But if you put it where it should have been at the first slot, you'll reorder everything else by one slot and break people's saves.
Gameplay tags don't have that issue because they're not defined in a list like enums. So there is no order to mess up. Plus even if you decide you hate their hierarchy and decide to entirely change it, there are tag redirectors that can point the old tag to the new one.
But aside from this, they're but just keys. They both largely reduce down to an integer. Enums are named integers. GameplayTags are wrapped FNames, and FNames are compared via an internal integers. So there's little to no real speed difference. You can mark functions to use specific tag hierarchies so as to not see all tags in the project and only the intended ones. So in the end there's almost no reason to use enums that much anymore.
Sets are arrays. You just can't add duplicates to it. A Set simply enforces that you cannot add doubles to it. It would be the same as using an Array and always using AddUnique instead of Add.
For each loop
@lunar sleet hey man, here's those collision ss (NoCollision is the gun body, and the OverlapAllDynamic is the sphere collision)
Thanks for this elaborate explanation 👏
And sets are also faster for operations yes ?
Is a foreach in a SET faster than a in an array ?
Ok, now show the player’s collision
Not likely. I'd assume they're slower since adding uniquely means you need to check all existing entries first.
Removing should largely be the same. Unsure if they might internally do an assumption that the first remove is a valid place to stop since there can't be any extra entries of the type where a normal array would finish checking all elements. I'm doubtful. But either way probably not that big of a difference in performance unless you're adding and removing mass amounts of things every frame.
For iterating, I'm not sure. It might be identical in C++. In BP I think you have to get the array from the set don't you? Which might be slower depending on how it acts.
Realistically they're pointless questions. You probably won't see any difference in runtime performance between the two without a massive, constantly changing data structure. And at that point you're probably fighting allocation issues anyhow which both will be victim too. You either need a Set or you don't. If you don't, you use an array. If you absolutely need to force unique entries, you use a Set.
BP Character preset or Capsule Collision presets? I have both, former is as shown, latter is set to Pawn
Wow, thanks for all the infos 🦐
It's just the default FPS character
Yeah probably pointless, sometimes i think "should i use a SET instead of an ARRAY" ?
Well the point is if you want the weapon and char not to block each other, you need both to only overlap each other. Only one side won’t do it. Did you check the FPS template to see how they have it setup?
Yes, the sphere collision only overlaps the pawn, similar to how I have my sphere collision set up
I haven't edited the character/pawn except adding the fire weapon code
You started from the template and built on top of it?
Yes
Yeah. Basically your only consideration on that should be if you want to completely enforce a strict no duplicates policy for the container. If not, Arrays are just fine. And TBF I tend to use Arrays anyhow and just call AddUnique where it's being populated instead of hassling with Sets but that is a personal preference. 😄
I also made sure to include the AnimBP reference in the weapon pickup
Odd. Ik we decided the issue was collision but I’m not so sure now
It's strange, I've been pondering it for days, and the only real thing I can think of is that my mesh collection is overriding the weapon pickup collision at runtime
But like you said, it should be set during runtime alongside the other settings such as attaching to a socket on the character
Is there any good tutorial that anyone used for start/stop animations with a 8 way directional character? setting the animations up is easy but the start/stop ones are killing me
I meant you can change the collision at runtime but ideally it should be already set in the editor
Root Motion tutorials are great
Yeah this is more or less what I meant lol
New to Unreal and I'm a bit confused:
I spawn Actors with attached meshes in the *MyClass::BeginPlay() * function with GetWorld()->SpawnActor<ActorToSpawn>(blibla). And it works fine in play mode, however when looking at the map while the game is running I can't see them in the editor. How can I look at the current state of the level with the procedurally spawned meshes while the game is running?
Also what I wanted/intended for the future
Wdym you can’t see them? On the map itself or in the outliner ?
i have root motion turned off and only "force root lock, and use normalized root motion scale" activated, to avoid my character not lining up with the animations. How will that come into play?
I could more than likely merge most of my SM components, but I need some separate, so it doesn't solve the issue entirely without a loop. I still don't know why I can't get collision disabled on the entire actor
This is how it shows at game view but in the editor I can't see them:
I can focus the BP_HexTile0 but there is no mesh showing up
nvm i see i can have all root motion turned on as long as i have force root lock on as well and it doesnt run ahead of the character
You'll probably find better answers in #animation but root motion I've always personally felt had a much smoother 8-way movement, less jarring when turning
Though it's all a development quality pov
its okay i just didn't know i could have all 3 on and itll still will work, i thought the root motion was the problem with running head of animations and not just having force root lock on
Didn't know that either, you must've had root motion anims already cuz usually ue hates mixing the two
Ahh yeah i didnt design the animations another guy in the group did. Thats probably what it was
Yeah, that’s odd. All I can think of is either you’re looking at 2 different spots on the map or there’s something off with the visibility settings
hmmm ok thx, at least I know now that it should be possible to see tem 😅
Yeah, not sure what’s happening exactly
I think I figured out a way to really disable this collision at runtime 🤔
TBD if that’s the actual issue
Man this is driving me mad. I'm gonna have to work on another feature in the meantime
I'll go insane if I keep spending too much time with this
What was the original issue?
Picking up my weapons cause my movement input to mess up, mainly as if all S & D input are being shoved into W & A
And you disabled collision on the weapon?
Though no debugging shows those kind of numbers, just the feel
Yes
Also all the meshes being used on the weapons, the only thing that has collision of a sort is an overlap collision sphere that is immediately destroyed on pickup
Which calls did you use? Also as a test cast to double check the collision, you could offset the weapon like 200 units in front of the character instead of at the intended attach point, should keep the pawn from colliding when moving for enough of a test to know if it's that.
I'm starting to agree with Neo and cant think it's collision anymore
I'm just using an OnOverlap event, and of all things I actually haven't tried offsetting the weapon lol
I would try offsetting it in front of the character. You should still see it moving with the character like that, but if the issue stops, it's 100% a collision issue.
I'm using attach actor w/ snap to target, how would I go about offsetting it lmao
I'm sort of brain fried atm
All good. 😄 uhh.. Maybe a simple AddLocalOffset might work here? Do your normal calls as you are, and then after all of it, do AddLocalOffset with X as 200
You'll have to get the root component of the weapon to do that. Forgot that was a component call.
This is so damn weird 😬 When I drag the blueprint in, the meshes show normally in the editor but the from c++ spawned actors of the same blueprint class just don't show in the editor
I can move the transforms in the editor and they move in play mode
I made sure to do that, just been a habit with how many components are here lol, thanks for the advice, I'll test and check back here
Yup, that fixed it, looks like it is a collision issue
For starts. Remove that thing you just added, and before calling Attach, do a SetActorCollisionEnabled(false)
Omg I literally did this before I just did it after attaching
Why didn't it work after attaching tho
Is it because it wasn't the owner anymore?
It worked btw
If you do it after attaching, does the movement mess up every frame forever? Or is it just an immediate bump?
Hello what this is doing is basically remove inputs from a menu then traver to the new menu_page and put user inputcs back on . the problem is that i want to enable said collisions only when the view target with blend is finished animating the movement . because right now im able to click menu button even if the camera still moving and it basically creates a lot of mess with the camera
Thank you so much, and yes, it was messed up forever still
That I can't speak for. That's an odd one. It shouldn't make a difference if you do it before or after. Technically it shouldn't matter even after for the bump, since the collision will be disabled before the character's next move tick.
Hmm, then it's no wonder everyone here was so stumped. Maybe it's a UE bug then? I won't report it in unless I hear someone else have a similar issue, but it's worth noting I guess
You would need to repro it in a few steps in a fresh project to report it. Or they won't even look at it.
I definitely know how to reproduce it now lol
Anyway though, thank you again, that was the bane of my existence for the better part of 2 weeks haha
But yeah, that is odd. 😦 From a logical order standpoint it doesn't make sense. The character doesn't move in the time between attachment and collision disable. Makes even less sense that it would persist.
It's odder still that while using an OnOverlap event it persists both when destroying the sphere, and when not. It should be able to read the disable collision node just fine
I also tried disabling collision at the root parent class level
So I'm just confused
Unsure. Would need to see screenshots to discern anything else. 😄
Ehh it's a whole mess, but it's fixed now, that's what I'm happy about. I just hope it's not what happened last time when Neo and I fixed it 😂
You essentially want it so users can't click the menu until your animation is finished playing, right?
yeah . it works if i use a delay . but not sure if delay is exactly the best way to do it
hey guys quick question. I made a menu for the first time...wondering what the best way to restart my level would be? seems this way it restarts but my mouse is not responding...I have to hold right click to move my head... any help would be great
Sounds like you're missing an InputMode call somewhere.
You could just use a boolean to determine whether or not your animation has or hasn't finished
this in response to me, thank you
It is. Sounds like you need a SetInputModeGameOnly somewhere.
Delays are pretty harsh, and just delay the code from running for X time. It's not the best way to code in my experience
I'd actually go for a Timer whenever possible when dealing with anything regarding a need for this sort of thing
You PlayerController's beginplay, or similar place.
I wonder if ViewTarget blends have any finished delegates. I've never looked.
Woah that looked useful
Just makes it so you don't have to click once when opening a new PIE window before you get control inputs to it.
cool thanks
It won't help your issue if you are opening a level and losing control like that though.
that always bugged me lol clicking
Making shooters especially
ok, hmmm not sure what to do yet though
Do you have a PlayerController class for your game?
Crap it doesn't autoswitch windows
When you have two ue windows open for stuff
yes
its just the mouse movement
all inputs work except that I have to hold right mouse to look around
which is strange
Try this in it's beginplay.
in the Player controller? or my character BP... thank you
PlayerController, easier to get a reference to the necessary controller.
Speaking of references, will I be able to reference my character mesh through the player controller? I'd like to not cast
Maybe. Though I'd question why you need to?
hmm its c++ ... I made one, so its just empty?
or am I suppose to have something in there?
Attaching my weapon to my character
besides what you sent
It's fine if it's empty. Make sure to also specify it in the GameMode so it's used.
awesome thanks!
I'd question that still due to encapsulation reasons. The controller doesn't need to care about your weapon, and it doesn't really need to know about your Pawn that much either. So the attachment should probably be done on the Pawn. The weapon shouldn't have this because it should be able to be independent of the Pawn entirely. The Pawn has to hold the weapon and it knows it's setup for attaching weapons, like what sockets it needs for the attachment etc. The pawn is also the one overlapping the picked up weapons, etc.
In general I find the PlayerController a rather useless class for gameplay outside of networking and some control handling functions. But a lot of people tend to use it much like the level blueprint and just true to cram everything into it.
works great thank you so much!!
Well yeah. you said the actors were being spawned by begin play. They won't appear at editor time
something spawned by begin play only exists for the play session
This was an editor shown while the game was running. The actors show up with the blueprint smybols and I can move them around but the meshes don't show in editor
show the code
Okay that makes sense, it was explained fairly similarly to me yesterday in the sense of "what makes your legs move, and what tells your hands to play the violin" so I get what you mean. I kind of don't really get the purpose of the PC other than an easy reference, so I just was curious if it was a good way to go
ok this makes sense. Your content browser version that's subclassed and has the asset refs setup. you're spawning a base class that has no mesh references setup in c++
but why would they show up in play mode then, if the references wouldnt be set?
The controller is a core class. It's basically the player's representation as an actor in the world. It allows the player to use Pawns via possession, and allows the player to make ServerRPCs. And if you read C++ it becomes clear how it handles input by passing it through an array of InputComponents that every actor has when you call EnableInput or Possess a pawn. It's a fairly critical class. But as far as extending it, I've just never personally seen a great use case outside of the networking that needs to be generic and not exist in other actors, or some input handling stuff, like applying Enhanced Input ContextMappings in it's beginplay.
I make a trace but I want to ignore owner how can I do it
the actor is still being spawned. you just can't see them because the mesh reference is null
Also I'm not spawning a subclass, I'm spawing AHexTile itself with the reference to the mesh
guilty while working on the RTS project 😅
it seems like you're trying to use multiple viewports or something weird... don't, UE's PIE system is funky
nowhere have you shown AHexTile having a valid mesh reference
plus you having it in your content browser means you have subclassed it
a viewport that isn't connected to the PIE world will be... weird
How could it not have a valid mesh reference, but have a mesh in play mode?
(also, please do not cross post in both BP and CPP channels next time, at least wait a while between each)
ok but what I need to plug here
I make a FocusedAreaBP and add it to my third person character
I want to ignore self
the check box didn't work ?
That's really useful information because as far as I've gotten into UE I've mainly thought of the PC as just a more generic version of the Character class, so it's good to know what its' intended purposes are
ignoring me, whatever
I'm not following here. You're sounding like you're giving conflicting info.
The below screenshot is in play mode?
a mistake (not sarcasm)
yes thats in play mode
with a mesh reference
being there
and if you possess a character instead of simulating, the meshes are there
not the weird "click the camera and see what it sees" business
as Hojo said
Im for now usually im not
but dont