#blueprint
1 messages · Page 356 of 1
Hello everyone, my name is FOD (Dev name: Mascotsam).
This message is for @leaden urchin who is Fred Russ and the owner of Untamed Kingdom server.
I want to clear my name because I was wrongly accused on this server. The real situation is this:
On August 27, 2023, I was contacted by “Blip” (real name: Fred Russ) through Fiverr to create rigs for Unreal Engine 5.2 (Tiger, Crocodile, Rhino).
We agreed on a price and deadline. I delivered two files on Fiverr and informed him (via Discord, not Fiverr) that the third file would take a little longer due to an issue with the original design. He agreed.
Within 24 hours, I delivered the third file. Despite this, Blip went to Fiverr and requested a refund, claiming I only delivered two files. Fiverr then canceled the order and refunded him completely, leaving me unpaid.
I still continued to help Blip, even building Blueprints for his project afterwards, but he never paid me anything. Eventually, he blocked me.
Later, he told me he “had no money and no game anymore,” but at the same time I saw that the game was still running and active.
I am not here to cause drama, only to state the truth:
I delivered the work.
I showed updates and evidence.
I was never paid for my time and effort.
This has been going on for 2 years now, and I am prepared to pursue it through proper legal and official channels if necessary. My goal is simple — recognition that I did the work and fair compensation for it.
I am not a scammer. I am a developer who was taken advantage of. I have screenshots and proof to back up every part of my story.
Thank you for listening.
#announcements #metahumans #control-rig #unreal-news #ue5-general #uefn-general
I don't know if this this right but please I need help and Justice.
sounds like you need a lawyer.
Can we keep personal drama out of the channel 
Can you elaborate on how exactly your camera switch logic is setup. I have no idea how your code works so screenshots of important code help.
Also explain the end goal of what your trying to do.
When I get back to the computer 💻😊
I don't know how else to describe it. I think it's best to see it yourself. Make a new actor, inside make a for loop that loops 5 times, put a delay in that loop and after that a print string node. You will see that it will only print 1 time instead of the whole 5 times
The way you worded it I thought you were saying there could be oly one delay per blueprint 😅
but if you call 5 different events all with a delay in it at the same time you will see a print string 5 times
What you are describing is a quirk with loops and delays, a delay is latent, loops are not
no, i think it's how the delay node handles it's callback/reexecution context
if what you said is true, this would work (which doesn't)
Hello, I would like to get some information about a question that's been on my mind.
I have a modular stamina system. I keep this in a separate blueprint.
I also have a hunger, thirst, and health system under the name BPC_stat. This is also in a separate blueprint.
My stamina system is located within bp_thirdpersoncharacter. The stats are under BPC_stats. I use separate create widgets to send these to the HUD. Will this cause any issues?
what is the best solution ?
i tried (enabling first person fov & first person scale adjusting it to about 0.5 and setting the first person primitive type to first person in the rendering settings of the weapons) but it still either clipped or got cut off
i tried scaling down the camera and weapon but then the weapon clips in the camera
any ideas ?
1 sec let me test
What he is saying is true. One delay node "holds" only one execution
Yes, one delay per call. But it is not scalable in loops for example
But thats exactly what i said XD
You can also use something like this if you want nightmares
And for a real solution, adding a small component per delay (with the delay being handled by the component) is a good option I think
my brain hurts
yea i misinterpreted your "5 events" in that context
i thought you mean 5 event calls
Oh i see no not calling the same event 5 times
But i think there is a node that resets the delay if im not wrong but you would only see one print string then
This. No matter what you do, delays ignore reexecutions when there's an execution already running. You can also use a timer if you want the delay to reset with every execution but you simply can't make a delay that handles multiple executions asynchronous. This is due to the very nature of how UE actors work. Making a separate actor that gets spawned for every execution seems to be the intended way
In my case, components seemed to be exactly what I wanted. Since I was working with characters, I could simply bind said components to the character which has all the logic including the delay and runs independently for every character
or you use a queue 🤷
GET IN LINE!
This is the funniest blueprint script I've ever seen
tysm for showing me that
I have these replicated from the main menu level, which works. These two do not. I know I am probably far off.
Is the second camera reference valid? Maybe you copied the execution but forgot to set the ref
I thought so as well. So this is in my main menu blueprint. The main menu view is in the main menu level.
So these two are in the main menu widget, separate from the main menu level. In the main menu level I can drag and drop my cameras into the event graph and do as such, which is why the main menu view works.
I noticed in the widget I do have them as two variables with the object references to each one of them. I've been thinking about it for a few days now trying to understand how to actually switch from one view to another. When I click "options" inside of my main menu, the camera nose dives.
I dunno then. The view going to the ground is consistent with an invalid camera reference.
Remove from Parent seems suspicious there - if you have two options, and you remove the widget, is the widget added again before you click the second option? But if the error with the camera happens on the first click, it is unrelated anyway.
Personally I would ditch the refs here. Tag your camera actors in the scene and just get actor of class by tag and use it as your target. Less upkeep than these refs.
Hello All. Need some help with setting members in a Structure variable. Which is the best method. My scenario is: I have a Global Structure Variable that has 5 member variables. Different functions in the BP change each of the different members. How do I update only one variable without changing the rest. My research says I should use "Set Members", but I've also seen "Make Structure" and "Set Var by Ref". The first image shows the three options. I think "Make structure" is creating a whole new structure variable to update my original one, which seems overcomplicated. And the Set Var by Ref, needs to have all members set and can't just update one of the members of the structure. Option 2 is the best. I'm I correct in my understanding and how its laid out? I need a double check please.
Secondly, one of the members is a Map variable and I want to update just one of the Key Index Values of just the Map. Is the below the proper way of doing that? Again, I need a sanity check on my thinking how this is best done. THANK YOU!
yes, option 2 is the best choice
Thank you Ben! And any thought on updating the MAP variable index value?
This makes sense. I'll try this after some yard work. Needed to take a break. Where would you suggest that node placement go? For the tags. I do have the cameras in the scene tagged already.
wait option 2 has a bug
you don't need to Set the struct after modifying it with set members in struct
it will modify the struct in place as it has a direct reference to it
Great! I was wondering about that.
i don't even know what "Get Key value by Index is", i wouldn't use that
you likely want to use a Find node there
map indexes are not stable
They way I have option 2 now, is I'm setting the structure twice in a row, so just delete the "Set Test" node at the end.
can maps be edited via refs, like arrays?
not in the way you want it
the break node returns a copy, so you can't modify the map on the struct directly (afaik)
funny thing about make array i found out you can't just use one random float node, you need one for each input. hmm
That was my understanding too. That's why I used the Get Key Value by Index. From what I read on that node, is that it gives the paired vaule in the Map at the index you provide.
option 1 will most like give you an empty struct with only that one value changed
i do option 2 most often
I just read the "FIND" node. It definitely gives a more specific return value to the index provided, were get key value can get out of order (as it says in the help bubble). THANKS!
yes.
[idx 0] 1 = 1.0
[idx 1] 2 = 2.0
[idx 2] 3 = 3.0
with GetValueByIndex(1) you get 2.0 as result, with Find(1) you get 1.0 as result
and there's no gurantee that the map won't "shuffle"/shift if you remove/add values, which makes it even more unpredictable
Oh wow, yeah I now totally see how that is not good. Plus the FIND node gives boolen I can check and handle "Not found" instances without crashing code.
Thank you for the quick and very helpful response @spark steppe
The same place your Ref node is. You can just get it before calling the SetViewTarget.
I'll try that in just a bit, thank you!
Hopefully it works.
Is there any way to store an Actor and an Actor Component in the same variable?
An Object variable works, but the problem is that it requires casting for each element.
make a structure that has an actor reference and a component reference (not really a nice solution but it works)
You just store the actor that contains the actor component and then you can access both
@lunar sleet @lunar sleet I want a single variable that can hold an actor or actor component and can be used to change the location without making a cast.
to add a third option here, you can just store the component and get the owner from the component
Why to the first part and why to the second part?😀
But yeah, above options will do it
what are you using it for
@full badge @lunar sleet I am trying to make a system that can change the location of an actor or component depending on what you place
Components shouldn’t exist by themselves in the world tho
nvm, interfaces cannot do that
he prob means like scene components locations in the actor
Yeah actor components and scene components are very different things
i think simply casting to actor/scene component won't cost much performance
It will not cost performance but will increase the complexity of the codes
Casting perf impact is usually overblown but I think in this case we’re talking object agnostic logic. Still, if you’re changing the location of a scene component inside an actor you’re prly gonna wanna change relative location and an actor’s location in the world would be world location, so this seems like a bad idea overall
just store scene component reference then, if it's an actor use it's root component
@full badge I think it will work. Thank you.
And thanks to the rest. @lunar sleet @austere orchid @spark steppe
maybe stupid question if im altering the play rate of a timeline, is 0.0 or 1.0 the base rate? the node defaults to 0.0 but I wanna be sure
nvm its 1 I just tested it
No dice, wondering if there is a node that I need to connect all of them.
Hello. What does Count mean in Write to Niagara Data Channel Batch ? And what does Index mean in Write Position?
Count is the size of input array?
Changing the location of a root component is the same as changing the location of the actor
Is there a data structure that would allow me to search and look up these values dynamically
i.e. I shoot a fire projectile that hits an ice target. I retrieve a the float stored inside.
I don't think you can make something like that directly. It would need to be a 2d array. Like SomeArray[GameplayTag][Name] = 0.5f;
But I think even in Unreal's C++ it would be hard to make. So you would need to abstract it into two parts.
At the core it could be a map of GameplayTag => Float and above it another thing associating it with a Name of the material. But honestly, it depends what you want and/or feel would suit your project better.
You could create a data asset and hold responses for each material in each data asset. Easy to associate it with actors and such.
You could put it into a structure and create a datatable with it, to then search through with the material Name.
All of that could be done with the help of library functions for easier access.
And there are probably more ways to handle it.
all an actor is for this purpose is their root component
how many of each axis are you going to have?
15 rows by 8 columns. 120 entries
I'd just make a map of {GameplayTag,PhysicalMaterial} tuples to float
if you're in bp only then you'll probably need to do something else
how often do you need to look this up?
hundreds of times per second like a bullet heaven or just occasionally like Pokemon
does anyone know why an animation would affect player position on server, but not when playing as client?
some setting within the player bp
it's going through an RPC and works with a different character, just cant seem to find why
#multiplayer is better to ask in tbh
Sounds like what GAS is for.
GAS does this but not to the granularity that I need it too. I think I’ve got it though. Thanks!
Sure it does. Magnitude Calculations.
Limited to one type of damage per actor. The effect calc class pulls tags from target and source. I can’t tag individual components of like a vehicle (rubber, glass, metal) though
Hello, everyone!
So I have this blueprint with a child blueprint (attached via Child Actor). Is there a way to make a child Actor's blueprint's variable Instance editable?
Or is the only thing I can do is to make a child blueprint and change whatever values of its child blueprint?
My suggestion is to not use ChildActorComponent at all, even epic them self said it's broken.
Unless you know it's limitation and limited usage (very seldom used for visual effect stuff, because seriliazation is broken),
You best not use it at all.
oh, thanks for the heads-up. I thought it's handled like in Unity (you just attach it and change everything that is exposed to editor)
Yeah, you don't do that here :D, it's a common self destruct from people transitioning from unity to unreal.
Let’s talk about ChildActorComponent
Users coming from other engines often use it to replicate prefab functionality, but in doing so they often encounter issues, instability, and crashes. Using the ChildActorComponent is not the way to go if you're going for a prefab-like workflow.
The thing is, ChildActorComponent really stress tests our re-instancing systems. We use it on FN, but only for simple attachments like for VFX, and no nesting. Anything more complicated, or related to replication, or nesting, will probably give you issues.
To get close to a “prefab” workflow just attach normal components to each other within the same blueprint actor, or attach pre-existing actors in the world outliner, or use level instances.
Scene Graph will have a better prefab workflow, check it out in UEFN (experimental) and see if it fulfills all your requirements for a proper prefab workflow in Unreal Engine, tell us if it doesn't. Now is the time for this kind of feedback, don't miss your chance.
I'm having a weird issue with a struct in my save object. The struct stores player stats, like money etc. By default, all the values are 0 except money with is 5 (ie 0,0,0,0,5,0).
If I play in editor or package for Debug/Development, the default values are used and all is good, but if I package for shipping they get all wonky (1,0,0,2,2,1)
I have no idea what's causing this...
neither does anyone at this point. If you show the code, there is a chance someone can spot something.
perhaps you are using loading the older existing save game? It wouldn't use your new default values because the value isn't defaulted.
But can't say much at this point.
The player stats struct, The SaveGame class, Loading the save and setting variables, Saving (done on a timer and when opening certain menus)
there shouldn't be any difference between shipping / development other than different save game location.
If you are not having the same behavior, package the game again. Delete the save files from the shipping folder /Game/Saves
or move them somewhere else first. Then try from new game again, see how that go.
If I package after deleting the .sav or package with a .sav that has the correct values in editor, both produce an incorrect outcome in the shipped game
Where does the packaged game store it's .sav?
/Users/<Username>/AppData/Local/<PackageName>/Saved
ok neat! if I delete the packaged builds .sav from there, the correct default values are used, and persist after quiting and reopening.
im guessing the .sav that was there was from a number of versions ago, hence the weird values
is there a nice way to overwrite/delete that old save when I run a new shipping build?
not sure, but long long time ago, I remember doing a lot of band aid to address old save files to my existing users every update.
band-aid includes validating values and forcefully setting them.
hello all technically this is a programming question and idk if anyone knows a fix or has problems with this but how do you disable the cable component tick? i have tried setting it at runtime and in editor and it doesnt work the reason i know is through insights \
Effect Calc context should include a Hit, which has the materials you want.
i might be doing something stupid, but why is this cast failing?
Put a breakpoint on the cast and see what you're getting as input
k 1s
uhh, im not getting a error message
what should i use instead of get anim instance, since i think thats the problem from what it looks like.
You can mouse over the "Get Anim Instance" pin to see what value it has.
Or look further up. Maybe Mesh is not correct?
it might not be, i previously did this with a child actor component
that child actor component is a arm, and i just now put the arm on my main character mesh, but now its not working
when you hit the breakpoint, you can check the output of the Target - Mesh node.
wait nvm, i just fixed it, i forgot to assign the new anim bp to my mesh. 😅 im so sorry for wasting your time
"IsValid" is your friend.
IsValid just prevents accessed none errors it doesn’t always mean it fixed the issue
Hey, I got just in a problem just after my pc start after getting shut down when light goes out, my 1 file which is a bp_mastercharacter is gonna corrupt. Have any idea of how to get it back to work
You don't use version control system?
start doing one to prevent losing more work
no idea what that is
okay then
blueprint is prone to corruption and once it corrupt, there's normally no turning back.
there may be backup asset located somewhere but then it's just finger crossed.
Your fallback method should always be a version control system.
otherwise when you lose your whole project, there's not much you can do.
is it SubVersion plugin?
Source control isn't a plugin.
To start with you can use Azure dev ops for your repository and GitHubDesktop as the git app.
but you will need to make commits to travel back in time.
if you haven't already use one then there's no saving your bp.
got it
If I have a map, which is string | struct, and the struct has only a single element which is an array, is this allowed? Because it doesn't seem to work correctly. If I find the map item, break the struct and add to the array, there is only every a single element in the array, no matter how many times I've added to it?
Show how you add to the map? You might be working with copies.
A map is just a pair of key and values.
You can have string as the key and a struct / array of struct as the values.
I'm not familiar with this component but in general you change SetTickEnabled or something like that. At least that is what I use when I need to disable ticks on the fly.
What ColdSummer said. When you pull the value of the map it's a copy. So you need pull it, alter it as a local copy and then overwrite the original by calling Add with the same string.
Hey guys, just realized I can't call any functions from GameplayStatics in blueprint derived from UObject. ChatGPT says that there is a hardcoded rule to only allow usage of functions with meta=(WorldContext="WorldContextObject") on blueprints derived from certain hardcoded set of classes (AActor, UActorComponent, etc.) . Is it true? Is there any way to enable using GameplayStatics (and other BP function libraries) in blueprints derived from UObject derived C++ class?
UObjects by default don't have world context. This can only be added in C++. FuncLibs such as gameplay statics require world context for the functions to be called.
How can it be added? From my understanding, having world context means "GetWorld() != nullptr". But:
- The instances of my BP class are created from C++ with valid outer, from which it can get a valid world
- I don't understand how it can be even checked at editing time (in BP graph)
One sec, i'll grab a code snippet.
This is how Epic tends to do it. After adding this, any child of the uobject has access to the relevant world context stuff. Just got to make sure when its created, it has a valid outer.
Header (public):
virtual UWorld* GetWorld() const override;
bool IsInstantiated() const;```
CPP:
```CPP
/**
* Retrieves the world context for this object.
*
* If this object is a Class Default Object (CDO), it returns nullptr.
* Otherwise, it retrieves the world from its outer object.
*
* @return A pointer to the UWorld this object belongs to, or nullptr if it's a CDO.
*/
UWorld* UEQTraceHandler_Base::GetWorld() const
{
if (!IsInstantiated()) // Check if this object is a CDO
{
// If we are a CDO, return nullptr instead of calling GetOuter()->GetWorld().
// This prevents UObject::ImplementsGetWorld from falsely detecting a world context.
return nullptr;
}
// Otherwise, retrieve the world context from the outer object.
return GetOuter()->GetWorld();
}
/**
* Determines if this object is an instantiated instance (not a Class Default Object).
*/
bool UEQTraceHandler_Base::IsInstantiated() const
{
// Check if the object does not have the RF_ClassDefaultObject flag.
// If the flag is present, this means the object is a CDO.
return !HasAllFlags(RF_ClassDefaultObject);
}```
Thanks a lot! Will try it
The comments are Epic's comments as well but hopefully it'll give more context.
Yep, that worked! Thank you very much again!
And I think I realised how that works and why you need to override GetWorld explicitely:
/** Checks to see if GetWorld() is implemented on a specific class. Optionally overridable in derived classes. */
COREUOBJECT_API virtual bool ImplementsGetWorld() const;
This is likely used to determine if this class can provide World Context. The implementation is a little bi hacky:
bool UObject::ImplementsGetWorld() const
{
bGetWorldOverridden = true;
GetWorld();
return bGetWorldOverridden;
}
The original GetWorld implementation sets this variable to false. So you need to override it, even if it's doing the same. I think that's how editor checks if that BP supports world context
Yea something like that. You can also expose world context pin for specific functions as well if you didn't want to give the uboject as a whole world context. This shows the world context pin like it does in funclibs. Not really played around with this that much though.
Hi all, quick question. Ive nade a niagara slash particle effect and there will be quite a few I use for my character. Would you recommend that I spawn them in when i need them, or attatch all the niagara effects to my charecter and then activate them when I need them? Thanks
when the game is running can i tell in the outliner what spawned ai controller class belongs to what spawned character?
If possessed they are usually nested iirc
Spawn them in. Having the scene components on the character not doing anything still updates their transforms.
Yea I did that doesn’t work
They’re not nested in the scene viewer for me.🤔
Happy Sunday everyone
A few days ago I tried seeing if I could continue to try and have my camera change from the main view in the main menu to the options menu within the main menu level. I cannot for the life of my figure out how to go from one camera to another when a button is clicked.
Hello, I am very angry
Because for some reason when I spawn my NPC let him wait a sec and tell him to move, he moves but with velocity and acceleration = 0,0,0 which means he won't rotate towards his destination.
I tried: Orient movemnet to rotation, controller yaw, manually settnig actor rotation,, I checked anim bp, he has velocity there but in my actor bp he doesnt so im ????
please help me
set view target with blend
I do have that on the options button, but it nose dives the camera.
Im not sure what that means
Hey for some reason, my material changes whenever I posses my car. Idk why it does that. When placed it the world it's completely find, but whenever I posses it, it changes to a weird material. I also attached my material (I got this from fab so idk what to do).
How can anyone help you if you dont show your code ?
Because I thought this was a material issue so I showed my material code, but here is the other code for the player when they enter the vehicle.
Disable markers and spawn arrows custom event have nothing to do with the car btw
It just helps spawn in things in the level
There is nothing anyone could tell you with that material what you are doing is you plug it into base color lol
But the rest of your code also doesnt have anything to do with the material switch
Which is why I'm confused why it's changing the material.
My guess is at soon as you enter the vehicle the uv of the atlas switches or your material
But it doesnt do this on its own there has to be code attached thats handling that
The only thing that I have for event possed is to get the input mapping and turn on my engine sound cue
Do you have nanite enabled ?
I believe I do
yea it's also checked on the project settings
Even when changing the material to say the default world grid, it still changes the material once I posses it.
Try to turn it off and see if that helps
I heard it can cause such problems with materials
I never had the same issue so i dont know tho
If that doesnt help resetting the material after you enter the vehicle might do it
Nope both don't work
I even did a print string to get the material and it says the correct material name
After you reset the material you have to set its uv
How do you do that?
All I did was set material on possed
Also my parent class is the vehicle advance pawn from the vehicle template. Idk if there's anything that changes the material there
Its a bit much to explain ...
You would need 2 parameters in your material
Do you have a link to the fab page ?
OMG IT IS THE VEHICLE ADVANCE PAWN PARENT CLASS THAT'S AFFECTING THE MATERIAL
lol
The brake light custom event was changing the material. I got rid of that custom event and it's back to normal
Well I guess it's fixed now lol
@surreal peak sorry for pinging, but I wanted to ask a question about your answer from the multiplayer thread (#multiplayer message), but it’s definitely not MP-related anymore.
when you said about getters, did you mean interfaces with output by that? I know in C++ it’s different, but a simple function with output doesn’t solve this issue, there’s still the need for hard reference/casting in BPs? So should I create an interface with output as a getter?
A getter is a public function(method) in a c++ class that reads out one of the variables and returns its value
In bps its basically the same
if you drag in a variable and select get < thats a getter
You can create a interface function with a input and hook that up to the variable you want and ye that gets rid of all casting needs / hard references
When I'm packaging my project, I get this error "FStructProperty::Serialize Loading: Property 'StructProperty ... CallFunc_GetDataTableRowFromName_OutRow'. Unknown structure." I think it's something to do with it not recongnizing my data table/struct but when I looked at when I'm using my data table/struct it's fine.
Ok never mind, I fixed it by hitting refresh node on the get data table by name in my blueprint and it fixed it. Might have been a refrencing error.
I usually don't work much with interfaces in Blueprints. In C++ there isn't really a concept of hard reference in the sense of them loading tons of assets. So there interfaces are used to abstract the actual classes away. With getter I just meant a function that returns a member variable. Most peeps don't do that in Blueprints and just reference their variables directly. Up to you.
If we specifically talk about the Stamina text stuff, you'd usually have something a bit more complex already to let you define what resource the character is using and determine the text based on that. There are tons of ways to build this up but the core idea is to have the code to it for you and not manually start setting some random progressbar text. Imagine you do that with all your UI. What a nightmare that would become.
Please don't use the error log. Use the output log and resolve the errors from top to bottom there. Also this is a #cpp topic and not blueprints.
Also you are cross posting which is not allowed.
Nobody responded in the other chat
is there no way to itterate over a map variable in blueprints?
nvm i can use keys
there is in 5.6
I dont know is it right Chanel but can somebody help me with my bluprint i am trying to make lock pick widget so when i near the door and press e the print string says lock door and then the widget should show up but only print string shows up and not the widget, i am trying to fix this problem for 3 houres and cant get it fixed
lol please use screenshot, it hurts my eyes trying to read it
use flameshot it's free
Here is a question I have just posted on the official forum:
I am currently in the process of making a luck-based card game based on the card game blackjack, which makes use of grids of cards. With the two integers - Randomizer and CardNumber - set to 1 as the Minumum for the two nodes that randomly select from the two ranges, the program determines which suit of cards will be played. Then, the Card...
Don't make the cards individual images.
Make them individual "cards"
So, the cars have logic, and just have there number defined.
Rather then needing to get each individual card image.
You can just give it its number, and it'll randomly choose or whatever
I'm not totally sure on what you mean. Each card is a button with an image over it, since I can't change appearances of buttons themselves.
I can? I can't assign any brushes to any buttons. I can change colors but not images.
When a button is clicked on, the card is supposed to "flip over."
The card images are set to Collapsed so that a button will make it Visible after it's been clicked on.
I have some idea on how to assign images based on the random numbers' drawings, but I'd like to use fewer nodes.
You said whats the best, and least complex way to assign the card images to the image slot.
You make each card its own widget, so you just code 1 widget, and done.
Not code a card 9 times, by using 1 total full widget.
Its like tabs on chrome, or whatever. 😛
Theres no all controlled by 1 big block of code.
Each tab has its own code.
You essentially are doing that.
Code 1 card, then you can just duplicate it 9 times, rather then code 1 big thing, for 9 cards manually.
The fewest I plan on making for a screen is 16 and the most will probably be 36 or 49, depending on the difficulty setting. It depends on how many cards the canvas size in its standard size will allow for. I could keep the randomizing integers in each UI too, since I'm not worried about which cards show and this will be a luck-based game anyway.
Yeah, and a widget that is a full card would especially help with that,
Just add more widgets, and done.
No need to manually code in 20 more, or 36, or etc.
Alright then. And I can also set its position as it's added to the viewport, right? Like, world positions?
Also, should I use the map's BP to assign the position for each card widget as it initializes?
Yeah, there place-able, just like individual components (images/ buttons)
Okay. I'll give that a shot. Thanks for the feedback so far!
Hey, I want to create overlap on a component, but I’m wondering how to block those overlaps if the object is, for example, on the other side of the wall. My first idea was to line trace to the overlapped actor and check if it doesn’t hit anything, but I’m not sure if that’s kind of overkill, maybe there’s a simpler way I don’t know about?
What's the actual mechanic at play here?
What's the true test
I'm making it in a multiplayer game where one team member has a sphere component attached, and I'm triggering an event on the other team members when they overlap. Everything works fine, but the radius is about 4 meters, so sometimes it goes through walls. I have the collision channel set to overlap only with enemy pawns, but I’d like walls to block this overlap.
what is the actual test here
is it meant to be "if in range and visible"?
not really visible, you dont have to see him. It could be behind you, just in range but not through walls
so there has to exist a line of sight from some part of A to some part of B
just line trace
So i wanted to get actor location, and shot line trace to
if i have a parent blueprint then a child blueprint of that, and i have a function on the parent that works with a table (instance editable), then why does the parent function not see the changes?
I thought there might be some propertie on overlap component already for that, but if not then I will send line trace
Can you provide more context?
yes, I'm trying to make a shop inventory display where i can hand place contents of the shops, I have a manager script that displays the contents of the shop on the parent actor, my idea is, i create childs of this and only change the contents of the inventory
and the shop will just display whatever item there is in the 'inventory' array
however, when i change the inventory on the child, the parent does not see the changes
You shouldn't need to create a child to just change the inventory unless its some sort of preset you'd use frequently. If the inventory array is instance editable, you can just place the parent in the level and change it for that given instance.
the problem is, I need to have multiple variants of this that do different things
but thanks, that 'kinda' solves my problem
i think i can go around it
If you need variants it should still work with inheritance. Do you override any functions in the child?
weird you want the parent to see the changes ?
usually the child would inheret the array
and then they would just have there own version
so you put the array on the parent
and make a bunch of children
they will all have there own version of the array
how to get the decimal part only of a float?
as another float or string?
i think tostring can format it this way
or maybe totext
solved it
Need some help with a simple actor Blueprint.
I have 2 meshes in a actor Blueprint, main building and fire escape.
I have 3 simple requirements
1- expose the fire escape mesh itself as a public variable
2- expose the transform of the fire escape mesh
3- expose the visible property of the fire escape mesh
yeah but i don't want to run the function on each children
i want to have a parent function that uses the children's arrays
and it does not work
you can on the parent reference self
self will be the child
so you pull from self, get the array
this will be the childs array on the parent
and on child
call the parent event/function
right click at the top and add parent call or whatever it is
so when the child is called, it calls the prent
and uses self
thats what i would do tbh
I would look into the "construction script" and "instance editable variables"
Hello, I've unified the path into a single line, as you told me, and now I want to make it so that AI vehicles overtake each other by moving either to the right or left, and once overtaking, they move back in dynamically without causing a pileup. Hello, I've unified the path into a single line, as you told me, and now I want to make it so that AI vehicles overtake each other by moving either to the right or left, and once overtaking, they move back in dynamically without causing a pileup.
Hello, I've unified the path into a single line, as you told me, and now I want to make it so that AI vehicles overtake each other by moving either to the right or left, and once overtaking is complete, they move back in dynamically without causing a pileup.
By the way, I wanted to know if I should start from a different base to code a functional and consistent overtaking logic.
Sincerely,
Why isnt this working the event isnt being called ?
Moving the nodes into a function and calling that also doesnt work
The timer gets reset every time 'Set Time by Event' is called. Call it on begin play instead.
How do i stop that happening ?
By not calling it multiple times on tick. Just call it once on begin play.
You ever done boids?
Boids is an artificial life program, developed by Craig Reynolds in 1986, which simulates the flocking behaviour of birds, and related group motion. His paper on this topic was published in 1987 in the proceedings of the ACM SIGGRAPH conference. The name "boid" corresponds to a shortened version of "bird-oid object", which refers to a bird-like ...
I'd do it like that
the ai wants to be on the racing line, they also don't want to crash into another car, and they want to go as fast as possible.
Thank you it works now
I never done a boids
I think you want to do something like that
basically line following with avoidance
honestly if you just add avoidance to a line following ai you might get interesting behavior out of it. They will naturally pass each other if there's a big enough speed difference in their cars
Yes, that's it
Okay, but how am I going to integrate the program boids with my project (Blueprint) and my AIC Rally Car Controller in Unreal Engine 5 ?
just implement the idea
make an ai that can follow a race line
then, make it want to avoid nearby cars
Okay I will try to implement the idea in my code and see the result
Is this a sensible way of making a trigger for when a player enters a radius around an actor?
There's certainly something I don't understand, because this doesn't seem to detect players. If I set the object responses to Overlap, it does though. I don't really want to add another Object channel if I don't have to. Is there a way to use my existing Trace channel for this purpose?
Uh, aren't trace channels only for well, tracing? For the player overlap you should use the Pawn
you could just trace for pawn and then cast to the player class
Or at least some Object channel, not trace
sure that's fine.
It won't exclusively detect when the player's pawn enters the radius, it'll detect if anything that blocks or overlaps the Pawn channel enters. You'll still have to cast to know wtf it is. If all you care about is that it's a pawn then that's fine.
That would make sense.
The difference with traces is that you can't make an object have Object type of the trace channel. Like you can't make the player capsule be a "Visibility" object. Same as your custom Player channel. So it won't work with physical overlaps or blocks, because they work with the assigned object type.
In case you need it, there is a very helpful blogpost about understanding the difference https://www.unrealengine.com/en-US/blog/collision-filtering
Choosing what collides is obviously very important, but it can be tricky, and it’s a problem that we have spent quite a while discussing while developing UE4. The system we have can seem a little complex at first, but it is very powerful and consistent, so I wanted to give a little background on how we arrived at it. We’ll talk about...
It works mostly the same in UE5
You can make custom channels though and set it to that object type
hey guys im having issues with some items(widget based) that when player 1 drops an itemm and player 2 picks it upp (split scrren) it still has Player 1 focus on it
how do i clear the focus *
@twin tide
i mean "have to" ? you can just make a new object channel and call it a day lol
Not sure what you mean by focus here
like widget focus , im using gamepads
set focus?
dosent work
hmm
hi
hey guys i need help i can't change a structure in the editor adding a new variable i get this crash:
Assertion failed: INDEX_NONE != StructureToCompileIndex [File:D:\build\++UE5\Sync\Engine\Source\Editor\KismetCompiler\Private\UserDefinedStructureCompilerUtils.cpp] [Line: 411]```
it can't handle the modifications and then to go ahead and fix them in the editor
that is unreasonable i can't go and remove all references of the struct then edit it
i did update redirector reference, validate assets, delete binaries & intermediate and rebuild, refresh nodes of the blueprints that have the struct
what else can i do or try?
Structures are somewhat known to corrupt in blueprints. General advice is to have those defined in C++, even if one doesn't know or want to use C++ beyond that.
For the problem at hand I'm not sure. Are you using source control? If not, I would suggest setting that up asap to ensure nothing worse happens in the future.
Did you split any of the struct pins of that struct? Could try recombining those and see if that maybe fixes it.
Are there any bits of info in that call stack of the crash that could lead to what part exactly it crashes on?
If you are able to use c++ I would suggest connecting your ide to the process and letting it crash then to check the call stack and the variables for any references to Blueprints that might be causing this so you can at least narrow down the asset that the kismet compiler is crashing on
i did do debug build to check out why it crashes but it just shows exception with the mov machine language idk how to interpret it
i've gone ahead and redid the struct and now i tried adding a variable it doesn't crash yet thankfully but if it does again i will move to c++ structs
this is an idea i can try as well to modify the splitting of the structs in blueprints i will check it if it crashes again
Id just move to c++ for it instantly.. saves you brainpower used on trounleshooting etc :p
quick question, Im converting my vector from local to world location by adding the vectors together as you do
does anyone know the equivilant for rotation values? is it as simple as adding the rotators together?
Check if there is a "Combine" method. Otherwise maybe a * operator.
This is, btw not necessarily the same as combining the overall Transforms, as that would ensure the rotation does affect the location.
TransformLocation/Rotation
Yeah that, or fwiw just GetActorTransform and then apply that to the relative TargetTransform without splitting anything. You can always split the result if you want to filter the Scale.
wait so hang on
I can just merge the 2 transform values?
I didnt know you can do that
Although the scale could affect the location I guess. But you could just make a transform from the ActorLocation/Rotation and put scale to 1.0
Yeah, there should be a function to just combine them
I assume order matters.
And each component will potentially affect the others (so if one has a scale of 0.5, it might affect the location overall, not sure).
is it compose?
But if that's the case then you can still just do "MakeTransform(GetActorLocation, GetActorRotation, (1.0, 1.0, 1.0))" and use that.
Yeah could be. I'm not fully awake yet and I'm sh*t with remembering those terms.
also scale isnt a factor here they are all at 1 1 1
im using a transform variable thats instance editable to set "way points" that the camera will blend to. I just need to make sure that data is in world space obviously
Yeah the compose them.
What you were doing before would actually have not been correct then, as you'd lose the rotational aspect of the location.
oh?
Yeah I can't explain that properly without a coffee. Create both solutions and check what the result is. I'm pretty sure the end location (world) would not be rotated correctly.
it seemed like it was, when I did the combine rotators, it just oriented itself along the X axis
Gimme a sec.
That's your World Transform. Location (3, 4) and a rotation that can be seen as a directional vector that points to Y+, so (0, 1).
Now let's assume you have a relative vector of (-1, 0).
If I were to draw it into the world, it would be pointing along the X-axis in opposite direction and you'd be like "yeah that's correct, it's (-1, 0) after all", but it's not (1, 0) to the world. It's (-1, 0) to the transform you wish to combine it with.
And that world transform is pointing to (0, 1).
Or lemme change the numbers for a second, cause then I don't have to draw stuff on top of other stuff.
Eh, why did I write 3, 4 and draw 3, 2. Not awake yet, as said. One sec.
lol you're good I appreciate the help
This would be the naive way of combining them, they way you did it now.
But you have to consider that it's coordinate system is relative to the red transform. And forward (X+) is in the direction of the red arrow.
So the correct world location of the relative one would be this:
The "Rotate (-1, 0) by (0, 1)" might be a bit difficult to visualize in more complex setup. If we assume that UE is actually left handed coordinate system (this one is a right handed one), then (0, 1) would be a 90° rotation around Z.
Another way of visualizing it could be drawing in the coordinate system that the relative location is actually relative to.
You know, cause the red dot is not just a location, it also has a rotation (direction), which points to (0, 1).
Thats one hell of a coffee, please provide info ^
If you want to break this in UE with the "wrong" math, you'd just need to put the relative location to (-100, 0, 0) and place the Actor at (0, 0, 0), and rotate it 90 degree.
It's easiest to understand you try it in the Editor.
so I need to add them together but also account for the objects actual rotation?
In a class room i would grab a stick and hold it on my hip, pointing to the left. If I rotate 90°, the stick will also rotate and the relative location + my world location will change, even though the vectors don't change.
Paint sucks.
But I think this should make clear that the rotation matters :D
oh no I get the importance of relative vs world, I deal with that all the time in Maya too. I just wanted to make sure im doing the conversion properly engine side so that my camera ends up where I actually want it to be
Yus. So yeah, composing the transforms should do what you want.
i prefer the blueprint streamlined struct editing too much haha
I get it, but see it like this: If you declare them in C++, you get access to all those fancy meta specifiers to modify how the data is displayed.
And the small side effect of not breaking your whole project one day.
yes i agree there are many benefits to having the structs in c++ to also include them in code, but i don't want to spend at least 1 min or more everytime i want to edit the struct
Right, I usually don't modify structs that often, so maybe that adds to my opinion.
yes at least for now it's not necessary for prototyping
this struct issue is an anomaly anyways i had another project with much more complex structs with more references to them but i never crashed from adding or removing things in them
so based on that i should have high probability of safety with this fix to just delete this faulty struct and create another one
but if i get another crash i should update my thinking lol
Wasnt thete a plugin
Allowing bp-like editing of native structs
Guess it'd still require a rebuild tho
I was forcing myself to use BP structs at some point too. But man, are they pain in the ass. After switching to C++ structs in another project, all the problems I had with them before disappeared.
What is the easiest way to make a component not change position when the size of the parent actor changes?
I would think setting its location to world and not relative would solve it ?
No, doesn't solve it. The setting for Location to World is about the position, not the scale
yeah , i'd still think they'd affect each other but oh well , if it doesnt it doesnt
guess the next thing to do is counter it by construction script logic
Setting scale + location to world fixes it on my end atleast
actually, justy the location does... but it was weird at first
If it is possible in your case - instead of changing the size of the actor, you could change the size of only relevant components - like the mesh and the collision capsule (with the half-size and radius, not scale)
Then other components won't be scaled (if they are not attached to the scaled component)
Sorry, I think I misunderstood what I needed, because the component's location doesn't change, only its size.
I'll rewrite the question.
Um, you probably don't want to use World Location on a child component
Child component will be always stuck at the same world coordinates, even when the actor moves
How do I make the component remain the same size and not change and stay in the right place no matter how the size of the parent actor changes?
Depends on your needs, for sure
There's some ways to achieve it while having it follow the owner
Attach it to a socket of something like a mesh, and set the scale to be Absolute
Or write your custom code to relocate it after scaling the parent
Scale not changing is as simple as setting the above mentined setting to world/absolute. But location is more difficult
Thank you it works
Btw I just had a dumb idea - put the second component on a spring arm. Set the spring arm scale to be absolute. Disable the collision test on the spring arm. It will work too 😆 It is a sdlightly different effect than attaching to a socket though
Not sure if springarms have any performance drawbacks though
I don't know, I haven't used Spring outside of cameras before, but that's a good idea
can anyone help me with my control rig, im trying to make it so the feet connect to the ground but its freaking out.
the first sc is when i have no control rig attatched but playing the animation in a level sequence, the second screenshot is what happens when i use my control rig. and the 3rd screenshot is my control rig setup
i can supply any more context that is needed
Control rig is very difficult, I suggest you take an example of a character that has a control rig and see how it was made
i have, this control rig works for other skeletons i have but not this one even though they have the same bone heirarchy (not exact but similar) im just not sure how to go about fixing it. i know that there is something wrong with the rotation of the hip and or calf bones but dont know how to fix it
i cant change the bones either before importing into unreal as this rig has alot of pre baked animations for it
I'm not an expert in control rig so I hope someone can help you, but in my opinion if you have a big problem it's better to watch tutorials, but if you have a very small problem and you can locate it it's better to ask the community
Im not great with the control rig either. If the logic looks right and works on another skeleton, chances are the the skeletons aren't as similar as you think. From experience, one of the biggest issues is individual bone axis. Their base orientation and facing direction could be completely different. This often requires you to change the math to accommodate. If left and right aren't correctly mirrored it can be a pain as well. (Of which I would recommend sorting and re-importing)
However, it might be worth asking in #animation I'd imagine the folks over there would be more likely to help.
Ive got a line trace by channel to see what surface im running on to add footstep audio; it works well on landscapes but not planes it seems; the physical material is there and theres a hit on the line trace but comes back as default; is there a tick box or something im missing ?
Vaguely recall a checkbox for it yeah
return physical material data or smth
from Forums
Unfortunatley added this and still no joy
Have tried to debug like this but still get back default physical material on hit component/phys mat & hit actor
I just want to point out that with the screenshot you've shared, its setup to get the physics material from the material itself which is different from the physics mat on the hit result.
get the display name of the phys mat
can't you just use the phys mat from the hit ?
This was how i was doing it to get the landscape surface type
Yeah; am just getting defaulyphys mat
pull from phys mat in the break and print display name
do you have trace complex checked ?
Im a silly saussage
thanks both of you guys
Hey, i want the reload function work when the flahlight is below 5 or less and the drain battery stop there and first reload and stop until the player switch the flashlight turn back on, i just confused a little bit. Can anyone tell me what's going wrong here in this graph(pic)
Im not understanding what you're trying to do.
I want to do is when the flashlight is being reloding using battery then the drain battery system and the flashlight should be stop and off until the player turns back on the flashlight and it's battery be at 100 percent
So when battery gets to <5% player can reload.
When reloading, flashlight should be off and battery drain should stop.
Battery drain shouldn't restart until the player has turned the flashlight back on.
Yes
What currently happens?
The drain battery system started and the battery reloads, but the drain battery(tick) always be at true and didn't false if we have 0
What is PDA Reload?
pda is primary data asset i am using it coz its change at runtime in place of structc oz its fixed and i dont know much of it
I wouldn't be using a data asset for this. Their singletons so there's only ever one. Anything to wants to use it would be using the same one.
You can also get some funky behavior with changing them at runtime while the editor is open as the changes will persist.
Generally, data assets are for static data.
It would make more sense to have things like the battery charge inside the flashlight actor itself. Although, most of what your doing should be inside the flashlight.
The battery should also be picking up by the actor and I am using struct for this and maked the inventory through yt video
You're probably wanting a setup more like this.
You'd just call the 'SetState' function when you want to turn it on/off and call the reload battery when you want to charge the battery.
Okay, but sometimes I didn't understand these type of you know blueprints, I just understand simple ones I don't know why sometimes fr
By the way thks for telling me I will try it
Is there a way to ensure alignment between a Scene Capture Component and a CameraComponent? Even though my camera is parented with my scene capture (spatially aligned) it seems the projection matrix is not aligned. I've ensured that FOV and aspect ratio are the same, so not entirely sure why there would be a slight difference between what they're each capturing. The scene capture (depending on viewport aspect ratio) seems to be slightly more zoomed in or out. Lmk if anyone has tackled similar issues before ❤️
Hi, not sure if this is the right place but I am trying to capture one frame of webcam media source.
Basically, to create a camera mode but taking a photo from webcam.
So far, I have figured out using MediaSource and MediaTexture to display a live feed from webcam to a mesh.
However, since there is no direct conversion from MediaTexture to Texture2D, I am looking into using RenderTarget as intermediate steps.
But I am unable to write to RT and then use it as texture 2d parameter value.
Has anyone looked into this? Most of the tutorials focus on SceneCapture2D for the scene camera.
Anybody have tutorial on how to make multiplayer match timer in blueprint ~~ not match countdown~~
Is there an event for detecting when the game viewport/screen size changes? I haven't been able to find one so far, and have setup a timer check for viewport size changes but was curious! (=
- None that I know of.
- Why do you need this?
I have a feelings its for UI, but UI (if setup correctly) would already auto do that
sorry for the late reply i just got on for the day, thank you greatly. im going to take another look at it
How do I set up Blueprints so that if they crash in a build, there's useful crash info?
I'm in the most certainly bad habit of just attaching print nodes to undesirable paths, but obviously that doesn't work in a build.
Is there anyone here that understands math for quaternions and rotations well? I’m trying to have the closest face of a cube orient to the player when the player picks the object up and stay facing the player.
You mean lookatrotation
Look at rotation only uses the forward facing vector of the object though, I want to make it so when you pick up an object it stays oriented to the player in the same way you picked it up.
Alright, I don't know how to describe the issue I'm having other than that those increment and decrement nodes just . . . stopped working.
They WERE working.
And now they're not.
I ctrl z'd back to multiple points where I KNEW they were working. Nothing.
Restarted the whole dang editor.
Still not working.
Without any other context.
How do you know theres a bug?
I see 2 path.
One is 0 + 1 = 1
One is 1 - 1 = 0
(for all I know)
Most basic test would be to print before the ++, and after the ++
Your also not printing the end, so what if they are just ending for some odd reason (thus the actual issue)
does anyone know how to structure this out, my code for this is on Blueprintue (https://blueprintue.com/blueprint/ljurbrvu)
as well as this one https://blueprintue.com/blueprint/0ek1oh6b
Okay... weird bug, or something else? I'm on Unreal 5.4.4. I have a function in a user widget that has an input named "Opacity". When I reference it via the implicit getter somewhere in that function, everything works fine, it compiles, it plays correctly, etc. When I close and reopen the editor, the build is broken as it has attempted to rewrite the Opacity getter with a "Get Render Opacity" node (and in a broken state). Are there variable names that should be avoided?
Hey new here just wondering if anyone can help me I made a blueprint to play an attack montage that also makes it so you cant attack or move if you are attacking or attack while you are jumping. It almost works how I want it to but it breaks when I try to attack while in the air then I can no longer attack at all after that...
It just breaks the whole thing if the attack button is pressed while in the air.
enable root motion is bugged on the skeleton so that's why i'm doing it this way.
I don't really know how to go into blender and fix it i'm using a miximo Skeleton.
What do you mean enable root motion is bugged?
if root motion is enabled to prevent the movement the character floats up and to the left a bit while doing the attack lol
looked it up and people are saying it's a problem with the root bone and the mixamo skeleton?
Lol it's actually doing something differant now with Root motion enabled...
You should set the IsAttacking Bool after the IsFalling branch. This is what blocks your attack - because when falling you set the isattacking, but you never continue to unset it since the isfalling branch exits with true
Ah thanks a-lot that makes sense. I did end up starting to import a new Model and Skeleton to try to fix my base root motion problem. Thanks for the reply though I will know for next time.
The target is not set on the first screenshot - is it a part of the bug, or did you forgot to connect it to this widget reference?
I think when downloading animation from mixamo you have an option if you want the animation in place or not, maybe changing that could fix your problem. But in general yeah, their skeletons are slightly different then UE skeletons.
ya i was using the inplace option so i'm gonna try the ones that are moving across the grid then lock them myself in unreal, hopefully that fixes it.
Screenshot ordering issue - that's the node that UE replaces the implicit getter (the other screenshot) with after restarting the editor.
Easily fixed by just renaming that input to anything other than "Opacity", but just strange behavior I'm trying to understand in case there are other variable naming oddities like that. It doesn't even match the "Render Opacity" name... I'd almost understand it better if it were an exact name match.
Hmm, I know widgets are a little wonky sometimes - they look like blueprints, but they don't behave 100% in the same way. I had similar issue with some widget variables but mine was during creation of the widget - it kept breaking the connections after restarting the engine and I had to manually refresh each time.
But it happening inside a single function is even weirder.
In theory, no, you shouldn't be able to make a variable with a name that is special and/or taken - the engine would not let you save the name.
If it is not a big function I would suggest remaking it and checking if the issue will still be there in the new function. Maybe something broke when yoiu were renaming some variables or functions.
Seen this happen during renaming of bp structs in particular
can behave extremely wonky
Definitely can happen for some variables that already exists and is used by the engine. Which blueprint it is? Also read exactly what Error says.
Hi I'm getting weird behavior from combobox and would love some help
It seems that it is only clickable on the top part of the button, even though the hit box seems ok (same on default combobox)
left picture clickable, right picture not
can you be specific with the timer? what's the different between match timer and match countdown?
So a timer that increment is what you are after?
If you just want a timer that increment, then just ask server for the time via RPC as client.
Server_RPC -> Client_RPC (Passing the time).
In the client _RPC -> Passed time + (round trip time / 2).
Once it's set you can just let the timer increment locally.
also ask in #multiplayer next time, you have better chance.
You can see what you are hitting in the widget reflector
can see there are like nested objects there.
make sure only the one that is clickable is set to visible
rest should be visible (not-hitable)
How does variables declared in a Blueprint Function Library (not c++) work?
If I have an init-function called by the owner, and set a bunch of initial states, will they be there on next call to a function in that library from the same instance?
eg. I have a BFL1 referenced by other Blueprint Actors (BA1, BA2)
If I call BFL1.init from BA1 and then from BA2, will they get overwritten? Or do they keep their own sets of variables? I would assume the later as you add them as a component
Local function variables are wiped each time the function is called.
Are they global, or per BFL actor "instance"?
Local variables is two steps down on the list. But they are not what I'm interested in 🙂
I'm not even sure I understand what you are talking about. Blueprint Function Libraries don't have standard variables. Unless it is specific to an engine version? What version are you on
What you are showing on the second screenshot looks like an actor component
It is a actor component. It had an icon of two puzzle pieces meshing together and its in its own section of the blueprint.
But yes, it has ActorComponent as parent class. So, I'll assume cause its not a bfl, it has its own set of variable. 👍
Well yes, BFL is something different than an Actor Component. BFL exists as a singleton, while actor component exists as an instance on the thing it is attached to.
Just realized I cant have variables that is references to other objects anyway. Oh well, parameters it is
Eg. I cant store a reference to the "owners" declared variables in the actor component.
Well... yes... If I make a C++ struct with the references... 😛
If you mean pointers then yeah, you can't use them in BP. You have few other options though. Passing some values via construction of the component, creating dispatchers in the parent that the component binds to, just casting to the parent from the GetOnwer, having an interface on the parent etc
Casting... nah, too many different classes using the library.
C++ reference storing, maybe.
Function parameters by-ref. yes :3
This is where you can get smart. If your using multiple actor components for your logic, you can have one actor component get another actor component it needs from its owner without needing to care about the owners class type. (Get Owner -> Get Component By Class)
If I had been smart from the beginning, yes.
Now code is deployed and I cant move the variables 🙂
Had I been smart, I'd have put the variables straight into the actor component using them. But I was not.
If I wanna do it now, I have to make a "wrapper" that holds the variables.
I'm assuming actor components can have savegame and replicated variables just like an actor
Oh crap. I forgot I cant have by-ref on outputs...
moved it, thanks
Hello the team !! I am trying to implement a quest system at the moment. There is obviously no way to queue to For each loop node, but how do I send reference from my QuestID and QuestActor variable the widget create node ? A bit stuck in here. The idea is to have the widget updating the completion of the objective; I am pretty sure I am missing something right here
its done. thanks
I don't really understand what you want to do here. Send to which widget? And which widget is this code in? Is the other widget inside of this one, or are they unrelated?
One thing I understand though - your widgets shouldn't change anything related to game logic. They should only display what is given to them by the appropriate actor/component
How can I find references to a blueprint function? Right click and find references seems to only search the current blueprint.
I have two widgets: a base one where you can read the quest name etc...and a second one where I want to keep track the objectives and update them. First mission is to reach a location, and it is not being updated on that specific widget.
Theres a little binoculars to the right of the search box, to search all files
This is 5.5, but should be super similar
Hello, I’m new here I needed help creating a school game project. I’m trying to copy the YouTube tutorial
The screenshot above is mine and the below is the reference
How do you get the target settings node like the photo below?
Seems like the node below is a node AddComponent with a class selected, not the function AddPostProcessComponent - but maybe version difference
Is the version of the engine listed in the tutorial?
I’m not sure about their version but the video was created on April 2022 but I’m using 5.4.4
Hm, there are indeed two versions of it, but they both have the same output so it should work either way. Well... did you try dragging from the blue output pin named "Return Value" to the target on the smaller node?
Oh that worked! Thank you!
Oh.. ok.
I'm trying to figure out how to control different actions with the same button. Right now how I have things set up If you press the space bar you jump and if you hold it you will also walk forward. I've added crouching into the mix and the sequence currently goes if you hold down the space bar you jump once start walking forward and crouch. But Id like to know how to separate Theis I want it so if you hold the space bar you always walk forward, But if you press it once you jump and if you press it again you start to crouch then if you hold it down you will start to walk forward and if you stop and press it again you can pick something up.
But I don't know how to do this. How can I cycle through those actions instead of them all happening at once?
A quick add on questions. Does it have to be on a separate bp_thirdpersoncharacter without default add input mapping and camera input?
I don't think connecting them to existing actions is a wise thing to do for it.
But it is not a common thing people would do, so there could be many approaches. Personally I would design my custom handling on the input. One Input Action which is spacebar and then the code manages what happens next. THen you would need to count how long it was pressed with the elapsed time, or cache the previous time it was clicked, so you know when it was double clicked or not.
So you could go forward only after elapsed time goes over a certain value. Or jump when the input is canceled and the elapsed time was lower than a number. Crouching I don't really understand in your example
Something weird has happened.
Somehow, a static function appeared in the class created in blueprint (ActorComponent).
I've discovered it by accident.
And more fun thing, that creating the same function by hand does nothing, but copy-pasted function in another blueprint also becomes static. And __WorldContextPin appears though.......
Is this a bug in 5.6.2 that I've somehow reproduced?
I don't know what you are asking about
literally me rn (sorry for offtop)
Basically if you were to press the space bar once you jump and if you were to press it again you start to crouch. so every time you press it you preformed a different action besides walking that would be constant if you hold it
well, I've figured it out.
It's a bug. Can be reproduced following this steps:
- Create a BlueprintFunctionLibrary
- Create any function in it
- Copy created function inside any other class
- Function remains static.
I suppose it's caused by function flag FUNC_Static that bluerpint editor doesn't check when pasting function
Hey everyone,
I’m working on a drag-and-drop system inside a Canvas Panel.
The widget starts dragging, but it doesn’t follow the mouse properly — it jumps away in a random direction when I click and drag.
I’ve already tried using AbsoluteToLocal, GetScreenSpacePosition, and set the pivot to MouseDown, but the result is still off.
Everything works except for the positioning.
What am I missing to make the widget stay under the cursor while dragging inside the same Canvas?
Thanks in advance!
I do this, to have my dragging in the center of the widget your dragging,
Which is what I assume your wanting?
Cuz, by default is drags from a weird top left corner
Oh
Let me try
Cuz, sounds like were doing the same thing (at least logic wise)
Cuz, I have dragging on a canvas panel
Yes, that's exactly what I need
Can you send me your bp?
Its not a base Unreal Engine BP file, so its unlikely to work.
But, the logic I do is still sound/ correct.
Does that mean it doesn't look like a blueprint?
It is a normal BP.
I ain't that smart.
But, it just is a ton of custom C++ and shit on top of it from other stuff.
Did you have to do this because otherwise you couldn't move the widget as you wanted?
No.
Its just part of a complex system.
No special stuff was needed for this feature to work.
But, various other stuff is C++ based.
I just need to know how you did it
That would be fire
I show'd you?
This?
Yeah.
Was your issue not dragging being offset weirdly?
Yes, but when I try to pull it it starts making these strange movements
Is this a good place to ask about the PhysicsConstraint component, or should I ask one of the physics channels?
I'd really like to get that cube to hover somewhere around my chest and have some slight up-down bob, but otherwise turn sharply with the character. This component is honestly giving me some information overload.
That looks like your making dragging end, or something.
I don't ever recall issues like that
So, I can't provide much input.
I don't do any special handling when dragging.
Just on start, and end.
Did you get rid of that wholke DragOffset var you have that does black magic?
No, not yet, why should I do that?
Why didn't you?
Because the Unreal documentation says I should keep it
What documentation you reading?
Usually they document features, not tell you to create new variables, and logic, to make there feature work
Oh, a tutorial. 😛
Yeah, idk.
Never read that.
I just know my method works 😛
and, drag offset apparently doesn't since even with a step by step for it.
Did you figure out the method yourself?
Pretty much.
I was doing extra stuff on top of any tutorial I could find.
So, basically had to do it myself.
How do you come up with such things yourself?
Are you a genius?
For this specifically.
Trial and error for like 8 hours straight, cuz I hate math
Hence why its BP.
Like 1000x easier to iterate quickly and easily
If I have a Blueprint Function Library of potential actions to execute when a button is pressed, is there a way to get a variable in the details panel that will display as a dropdown select of those functions for an instance of a class that uses them?
That could probably be worded better.
As in?
Select functions via dropdown?
No.
Only thing BP can do is call by name, with timers.
But, you can't timer a function library anyway
I know that actual behavior is not possible. I would like to know a good way to get similar behavior. I could obviously make an enum variable and then in the BP, map the button to a function on a Switch, but that requires manually editing both the enum and the switch every time a new function is added to the library, and that's bad.
Either that, or use an actor component, so that you can call the functions by string/ name with a 0 seconds timer
In cpp you can bind functions by their name, might be possible to pass a string parameter to the bind function by name
Another hacky way would be to make a component with a function, then make children components with override to that function. You can store component classes in variables/arrays, add thge component and call the function. But it would bloat the number of files.
Hm maybe not even a component but an Object depending on what it is supposed to do
This would require you to make it work via a delegate
In CPP I could pass functions by pointer. But my goal here is to make it easy for team members to use, which is why I'm tryna get functionality that can be enabled via the Details tab.
Your team members would still only have to deal with the string drop down no?
Also our project has been going through Hell with getting CPP to work so I'm trying to avoid it.
void AMyClass::CallFunction(const FString& FunctionName)
{
OnMyDelegate.BindUFunction(this, FString("AMyClass::") + FunctionName);
OnMyDelegate.Broadcast();
}```
I'm not exactly sure what the bind function by name is called but that's what I'm envisioning might work
Actually, can't you bind timers by function name in BP?
Don't you want to call functions based on a drop down or am I misunderstanding?
Or would you also want to populate the drop down based on what functions exist?
Ideally yes, although that part may not be possible.
I have no idea how you would populate it but seems joe had the same idea with 0 second timer and binding by function name
I have this project that is in VR, were the user can move objects around, The issue is the base model is given to me and some object have a coordinate node outside the object, I can't change this because whatever is moved on VR has to be recorded and send back to design software. The issue is when the user grab the object the line trace get confused with this x,y,z outside of the object and the location of the object gets screwed. Is there a way to create a temporary coordinate just for the line trace object? or an offset to take in consideration the i maintain the coordinated offset, but the object move correctly? I have tried using some add and multiply nodes but they don't seem to create the effect I need. Thank you for your help on this.
I did this to have a isometric view with depth of field but it’s not giving me the blur at all. I followed the tutorial to make a test k for comparison but only thing that happens is a slight blur on the character and little twitch on the camera
Is there anything I need to tick to make an actor component save with its owner?
Unsure what you mean with this? It already does this. You can always GetOwner from a component.
I know, but my variables in the actor component did not save. At least they where empty on load. Even tho they had SaveGame checked
Which variables?
how can I make a "bigger on the inside" effect? (aka non euclidian geometry)
You're doing a Serialize call in C++?
I think so, yes
Hmm. No reason it shouldn't work then. If you mark them Savegame, and then call Serialize to dump the info into the byte array, and then call Serialize with the other archive to dump the byte array back into the correct actor, it should "just work". Is there anything weird in those structs? Can you test it with a more primitive type like a simple String changed at runtime?
I moved them into main actor and made parameters for everything and now they save 😄
Oh. Right. Cause you'd need to serialize the Component separately.
Cause it's it's own UObject. Serialize won't dig into subobjects.
Okay. Good to know 🙂
So do that. Grab the thing, and set the target location to be chest height and in front of you
then just tune the stiffness and damping so it bounces around as much as you want
Hm... is it not possible to use Set Texture Parameter Value together with a Masks texture?
I loaded my texture with "Import File as Texture 2D", then set the compression settings to Masks, then sent it to Set Texture Parameter Value on a material that has the shown Texture2D Parameter settings
#materials is better for this
Okay, so I've created a widget for each of 16 cards in one of four levels by difficulty in my game. But now I've reached another impasse: what do I need to do if I want to disable all other cards if one card is clicked on? I've tried using the Create Widget node for each other card so the first could invoke the others; but it apparently hasn't done anything. So even if I do click on the first card and even after I set all the others to Not Enabled, nothing happens. What's the best way to disable all the other cards on this grid when one has been clicked on?
Obviously, using 15 Create Widgets and promoting each other card widget to a variable doesn't work.
I'm sure there's some less complicated way to call upon the other widgets from the first.
Your trying to affect all 15 others, when 1 is pressed?
Corect?
Yes.
You can either get children on whatever the widgets are on.
Or, each widget can link to the parent on construct, and from there a card can access said array on the parent.
So I would have to make each widget a child to the level map? Or would I have to make other widgets children to whichever one is clicked on?
The screen on which the widgets appear is the level map.
What you're looking at is the easy-level map, and I will create higher difficulty ones with more cards later on.
When the map initializes, the widgets you see on the screen appear.
Sounds like a perfect place for a dispatcher
Dispatcher?
The widgets are presumably a child of some other widget?
Unless, is each card just 1 standalone widget (as in not in some over arching canvas, or grid panel)
Since there childs, they can get the parent.
and from there add themselves to an array, do a dispatcher, or etc.
Make a dispatcher in the parent "CardClicked". And in the individual card an event "OnCardClicked" - you can pass a reference to the one that was clicke,d or an index, or whatever you need.
Then on begin play in the parent bing the dispatcher to the event on the individual card.
Now you only call the dispatcher when needed
I didn't think to make each a chid. Right now, they are independent of one another but have the same exact coding. I don't think I've dabbled with dispatchers yet, so I'll look into that.
Dispatchers are great for communication of the type "one to many", where the classes are closely coupled (or can be abstracted to some parent class, since you need to know a class, so a cast is required, to bind)
Oh right -- so that's what Create Event is
.
Wait. I mistook that for custom events, but I see it now. There were times when I had to put in event dispatchers in other programs.
So basically, what you guys are saying is that 1) I should make the card widgets children to each other. Like, the one to be clicked on is the parent of the others which are children; and 2) Create Custom Events and dispatch to them under each widget so that all children are disabled. Right?
- Wrong. 😛
- The idea is there, but your wording/ potentioal understanding is not
You make all 16 cards childs of the main "map" widget.
So, some grid panel or such.
Those 16 will get the parent, and register with the parents dispatcher.
Then, when one is clicked on they will call the dispatcher.
Thus letting all 15 others know, and to do stuff
- It is not about which is a child of which, but you need to have a way to easly access all of them. So grouping them under one parent is one way. You can even make all of them variables and put them into an array by hand and it will do the job - because you need a way to iterate through all of them. Either to call something on them or bind a dispatcher
Or yeah, bind to dispatcher from the cards instead of the parent as joehelp said, that works too
Something like this? This is under the InitializeCards function on the map BP as it loads.
No
You just added it to yourself
Also OMG
You did not understand the inital thing I told you to do
Obviously. I know. I'm an idiot.
You were supposed to just use 1 card BP for each card.
Not have individual card 1, card 2, card 3 😛
I don't know what I'm doing, after all.
I really am an idiot. I apologize for the confusion.
I'm just way in over my head.
The basic design for a thing like this is to have one main component (an actor, or actor component or widget if it is widget based) that acts as a brain of the entire system. SO if it is a card game that is entirely in the widgets, one main widget is the brain. Then you design other elements to do only what the brain orders.
So let's say we have a single CardWidget: It's job it only to display things and handle events related to itself - like turning on/off the possibility to be clicked, or changing the image, disappearing etc - but it does it on command from the brain. Either via the dispatchers (for situations where one to many communication is neede) or through direct calls of events/function on it.
So you add every card to the main widget - either via spawn, or by adding a grid or a box to the main widget and positioning the cards there. And the main widget tells cards what to do, while the only thing the cards need to communicate up is when they are clicked/interacted with, so the main widget handles what to do with the interaction
I’m not even sure how I can pull that off. I mean, examples would help. But I’m just way in over my head.
It is just something you need to experiment with and learn. Btw this pattern is called Mediator Pattern (or Observer Pattern? They blend together for me) if you want to read up on it, maybe you'll find some examples
in setstate function, can I ask you what is it? I can't figured out
Its the input
I think starting in UE5, function inputs are now automatic local variables
Hence the ->F
As Joe said, it's the input on the function. Instead of dragging a line from it, you can get a ref to it like a local variable.
Also the f icon itself was added only in 5.4 I think? Or 5.5
I see now thanks
Not sure if this is the correct place. but is there a way in the GASP project to make one of the custom characters (Echo, Twinblast) the default mannequin over the UEFN one?
Nevermind, i found it
Just remove collision on the "flint lock"?
Why does what I presume is a weapon have collision in the first place?
Otherwise, you can make the movement component ignore it.
i removed, i think i will have to re open
Creating a city skyskraper night asset. I am at the point where I need to introduce random lighting for the windows, so that each instance of the building will have different emissive material windows turned 'on'.
What additional logic is required so that the window lighting of each instance of the building, with the same window Material Instance, will appear different?
Could you give me some pointers on how to get that behavior? There's a lot of options here and blind fiddling isn't getting me anywhere. The first image is teleporting it to where I want it to roughly stay. The second I start walking, it turns to the position in the second image and bobs around in that general vicinity rather than oscillating closer to the position it starts at. This is probably a failure of understanding how joints work, but like I said, I haven't been able to intuit it.
As I understand it, it's like a spring between a bone in the model (currently the pelvis) and the object being held, right? I'm guess that the initial turn of the pelvis in the run animation is what biases it over to the left, but I don't know how to make it not do that.
I tried some other bones as well but they all bias left for some reason.
Are you using a naked constraint or a physics handle?
My game contains objects that the player can zoom in on and inspect, similar to Gone Home or Resident Evil. Within this inspector view, there will be various clues that the player can click on to activate various other functionality. The other functionality isn't relevant but I'm unsure how to go about designing the clues to be properly modular.
Ideally, Designers will be able to add any number of clues to my InspectableObject actor blueprints, and then tweak the information related to said clues. This info will consist of location, appearance, and other irrelevant game specific data (probably stored as structs).
My initial instinct was to have the clues inherit from actor component, so that they could be easily added to the actor. However, I'm not sure what to then for collision detection. The player needs to be able to click the clue, for which my instinct is use sphere colliders (may want to switch to a different shape depending on how those feel, but ik spheres are the cheapest), which it doesn't seem like I'm able to add those to actor components. I tried adding an array of actor components, in hopes that I could just place the colliders in the InspectableObject's Constructor, but it seems like spawnActor and any similar methods can only be called at runtime (which makes sense tbf). I also tried making the clue inherit from actor, but that prevents me from attaching them to InspectableObject blueprint.
I think I remember Unreal has some sort of spawnactorcompoonent? A component that takes in a reference to an actor, and spawns it at runtime. This might work if I can remember the name, but still feels like a poor workflow in terms of allowing designers to actually edit the colliders. The only other idea I have would be to have the colliders and clues be separate objects, and I guess setting the references in the inspector/constructor? Which would probably technically work but that feels like a really gross hacky solution. And I don't just wanna get this working but I wanna get better at using Unreal "properly"
It feels like there's a more basic option that I'm missing here, but I'm not sure what. So I'm hoping y'all can enlighten me
I am using a Physics Constraint Component.
I don't know what the other 2 things mean currently. I would be happy to learn though.
Show its settings and how you're setting the constrained components
per instance random
or you can use some noise function of window position to do the lighting
To me.
Either use a scene component, so you can physically put the clue at a spot, rather then some vector variable praying.
Then, you can just line trace the inspected object, and see if theres a clue nearby (maybe it has some radius param or something?)
Or, you can make a child of the static mesh component.
So, you can choose a model, and use that as the clue clicking collision so 2 things in 1
There's nothing else to show, this is everything I changed about the default settings. There's a LOT of settings and I'm guessing fricking with some of the angular or linear forces will do what I want, but I think I need some guidance to find which ones.
scene component is a step up from actor component in that it does provide better positional control (something I completely forgot was an issue with actor component, so ty).I assume your proposed logic is get the hit location on the line trace, then check whether that distance is within clue distance? That could work well I think.
deriving it from static mesh component would still allow me to do that, but also with the added bonus of letting me set the appearance by model, which I had somewhat glossed over in my planning and is now kinda my bigger concern. Main issue with using the static mesh component is that the clues will also take the form of text and pictures (probably more often than models actually).
Ideally it'd be nice to be able to derive it from the text renderer actor, something to render decals/textures, and the static mesh component simultaneously? obviously that's not how inheritance works though lol. Interfaces are the first thing I jump to when I want to apply the same functionality across objects with different hierarchies, but they still don't quite work how I expect them to/wish they did. Interfaces are for other objects be able to make calls to the same functions, but you still have to implement each function separately on each object. Also they don't allow for member variables which is like half of what I want to be shared.
Hmm I'm not sure. I may play around a bit to see if there's some other way to provide/circumvent the multiple inheritance esque pattern I want. Otherwise I could just stick with having the visual appearance of a clue be separate from the collision detection and data storage. Which I dislike that and it feels hacky and dirty, but practically speaking probably wouldn't cause any actual issues.
Could flip it then.
Actor component handles logic and such.
But, you can have it select any specific component to define the "clue"
Good mix.
Allows any component use, but also no weird interfacy stuff needed
Hey wait a minute static mesh and text renderer are both actors (or at least have actor variations). I could probably just make the clue functionality a component, then store that on 3 blueprint actors (each inheriting from text renderer, static mesh, and whatever I choose as my image renderer) which I thiiiiiink could then be added to the inspectableObject
just sucks that you gotta do it by name
show the constraint component in the 3d view
zoom in enough to see the axes on it
why do you have swing free?
I'm still newer to the "cooler" stuff of C++
But, is there some weird C++ type, that allows BP to choose component refs?
Or, what would be a "better" way?
I haven't found it, I'm sure it'd be used for the constraint component if so
you can set refs at runtime no problem
but I haven't found a way to have a component refer to another in the same actor at editor time
lol
Even the constraint component is by name.
Gave me hope for a quick second there. 😛
I use the actor component model for one of my mechanics, it is used to tag a scene component just so I can avoid the overhead
how would I make a Bp thats used as boolean for the models inside a world. Im guessing with Dynamic mesh component but how would I get the models inside the world as dynamic mesh components
(basically I need to cut through a building with th cutout parts filled so the meshes look solid. I wanna do it with dynamic mesh booleans since ithink thats the best way)
Hello everyone,
Is there a way to export a Blueprint class I created as an asset ?
I would need to be able to share the blueprint with others locally
Hey,
any idea why this does not return all childen of this component? Some are listed and some not. they are all direct children and all of the same type
Are you sure all children are present at the time of the query ?
yes
I tried it also with number children at the number is incorrect. it just picks some of them out of the middle
what is your code doing?
We have an ingame editor and have snap cones which we can place on the prefabs. Once hit play I want to delete them (thery are all childs of the root component)
yea you wouldn't delete them like you are likely doing
first of all rightclick the node and show exec pins
then use a reverse foreach loop
Sounds like this also could be an issue with accessing the array without a buffer
and not using the reverse node indeed
I keep forgetting this exist
this very much looks like removing array elements while looping it
reverse foreachloop fixes it
In fact reverse for each fixes it. What on earth
not what on earth
before you deleted the first element, which moved every other element once forward
your next for iteration would operate on index 1, which now holds the 3rd element instead of the 2nd
Its logical once you understand how this works
Remember, if you wish to remove from an element from an array you're looping through, do so in reverse.
Ah I tought it would store it in a local variable
Well no, it literally doesn't. It only keeps the index and the current element. That is why hooking up a pure, heavy function to a foreach in BP is not a good idea.
the pure isn't the issue here, it's the forward iteration on a changing array
I know, I added it as an example
Why are you using event tick ?
In begin play calculate how long a day is based on the DaySpeed variable and save it as a DayLength or smth. Then make another variable to hold TimePassed and add deltatime to it at the same time you rotate the sun. Later you can get how many days passed by dividing TimePassed by DayLength
Also "optimized" doesn't really matter here. I mean, level is a single actor, optimizing one action of a single actor probably won't give you any performance boost. Unless you do something very stupid in the code ofc
Short answer is you can't. Rotators are normalized when applied to an actor so you'll never be able to find how many full rotations its had from the rotation alone.
Personally, I would have the sun update based on a time variable.
IDK why, but i'm having troubles with this mesh, it's making my character bug
when the gun is spawned, my character always go background or go flying, but only when there is the gun
and jsut in case, the gun is an actor
What other components are in the actor?
wich one, the gun actor only has a static mesh and an arrow
what are the collision settings on the static mesh component. (not to be confused with the static mesh asset)
this ?
No, inside the actor you said there's a mesh. The collision on that specific component.
i literally showed everything
the mesh
the gun actor's collisions
Again, i'm referring the the static mesh 'component' not the static mesh asset.
Open up the actor and click on the static mesh component to see it's own collision settings.
my bad
there
i found my problem
thank you
🙂
HERY EVERYONE I NEED I LITTLE HELP WITH MY GAME YOU SEE WHEN I OPEN PAUse menu and hover over a button it keeps playing hovers sound but the thing is that it doesnt happens in main menu and also the game does nt resume when i click the resume button
the problem got solved thanks if you tried solving it
can someone explain me how character arrays work
cuz i wanna make a character switch but i need to get An array with different characters but i don't know how it works
Can you explain what an array is ?
why you want me to explain you an array
Well maybe your problem gets solved by yourself when you do that
It is too vague of a question. What part exactly do you have problems with?
Why wouldn't I?
sadly no 🥺
the idea is to basically be able to have a menu to cahnge actors
when i click on a button i have to switch actor to another, but i don't know how character arrays work
this
Do you have the characters you are choosing from spawned in the level or not?
Is every character a separate blueprint or do you want to change the skeletal mesh only?
How the array works depends how you set it up and what you want to put into it
But the rule is the same for every array - you choose a type, and you place things of that type inside
basically i wanna change the type of characters because there are some sockets and all
classes (gun, shotgun, rifle)
or i could make buttons to change the characters too when i think about it
If you have different classes of things and you want to put a class inside an array (to spawn it for example), when you look for a type when creating the array, you need to choose class, not the object. Sec, I'll make a screenshot
Then you can place a class reference in the array and use it during gameplay to spawn an object
i see
Even better is to put a soft class reference instead of a standard one - but if you are just learning, it might be too much to figure out at once but look into it in the future and why it is better.
how can i make the class changement (the nodes)
This is on you to figure out
Or look for a tutorial, there are probably some about it since it is a common thing
i hope
Heyyy ! In my project on UE 5.5 I have several managers, EnemyManager, TowerManager... I spawned these managers with my GameMode, how could I recover my refs on another BP without necessarily exploding its SizeMap and having hard refs? I thought about GetGameMode -> Interface to avoid a cast on gamemode but I was told that it amounts to exactly the same thing because the interface is not designed for this kind of thing. What is the best solution? Ping me please !
get actor of class the manager?
Or, you mean you don't wanna hard ref the manager?
yeah i don't want hard ref the manager
A get actor of class would directly make it hard ref
Then you'd want like a double interface.
Interface the gamemode, then gamemode gets the manager data (cuz, it has a hard ref from spawning)
just to the component tho
I was told that an interface is the same as a cast, that it creates an invisible cast, even if at first glance it saves the sizemap, so I don't know where to go
or you make an actor array and then you get component by class
hard reference to actor is no problem
A interface does a cast under the hood but it doesnt create a hard reference
Well, an interface that returns a manager would be a hard ref.
Thats why you interface the gamemode, and it gets the manager data.
Ye unless you return it
Mh, it’s true
@digital lantern
To use an interface, you must hard reference that interface. This is fine, because interfaces don’t have any assets, and they’re really lightweight. When you implement an interface on SomeHeavyActor, you can write code against the interface and never take a hard reference to SomeHeavyActor.
This is true, because your Blueprint nodes must hard reference all types they work with. If you have a Soft Reference to some ParentObjectType, then you can set that soft reference to SomeChildType. If you never cast to SomeChildType, you’ll never hard reference it, but you still get a hard reference to ParentObjectType.
It may not seem like much of a distinction, but in the latter example people often think that ParentObjectType is “mysteriously” hard referenced - and it’s explained by Blueprint code hard referencing the classes it operates on
(Blueprint code and the type of blueprint variables both cause hard references, not just the value of blueprint variables)
I bareley ever used soft references
So lets say i have
parent - empty character
Child - heavy child actor
Then i use a soft reference to heavy child actor will only empty character be hard referenced in that case ?
“Heavy Child Actor Soft Reference” will hard reference Heavy Child Actor, but if you set a variable of that type to the value of “Heavier Grandchild Actor”, then Heavier Grandchild Actor is not loaded until you load the class/object stored in your variable
Soft references are very similar to casts to objects- you always want to use the least-heavy, most-base classes, like Character instead of Heaviest Grandchild Actor
so better to cast to actor than to character
If you can
But code classes are more or less the same
BP classes that are always loaded are also fine
If Heaviest Grandchild Actor is always loaded, you gain nothing by soft referencing it
Ye ofc thats also why you can almost always cast to player in most games without a problem
if i have two camera components added into a bp, one for the main interaction, then one to move into a location in levels to show a reward spawning. and i want to blend to one w one input and to the second on another input, but the only way ive been able to get set view with blend to work is getting a reference to self inside the bp. but thats not gonna work for the two cameras, how could i fix that?
So do I have to use interfaces? If for example, I spawn all my managers with my gamemode, I use an interface on GetGameMode to avoid a cast and therefore a hard ref if I want to get one of my managers? Or do I cast my gamemode without worrying about anything since my managers are always busy?
Why do even care about hard refs to manager classes? Aren't they supposed to be there at all times?
And if that is the case you really shouldn't care about hard refs since the objects will be loaded anyways
If that's the case, then I don't care if it ends up in the SizeMap when I cast my GameMode in a BP X?
it doesn't matter, the size map is relevant when handling hard refs to objects that aren't always there.
Example:
You have 1 Character class for your Player Character, you can cast to it anywhere you want since it will be loaded anyways.
If you have 200 different enemies than you shouldn't cast to each of these as they may not be in memory at the time of the cast. These 200 enemies can cast to your 1 player character from the first example no problem
Ok so if I have something that is always loaded -> Cast ?
yeah, thats no problem
Ok thank you because I've been fighting for nothing since the beginning then, with my SizeMap... xD
SizeMap is a trap
Blueprint is a trap xDDD
Never use cast is a very persistent myth
once you understood that if something is in your memory you can cast to it you know how you can safeley use them
Also in enclosed systems
Lets say you have a horse character and a saddle actor, the horse can spawn with or without saddle
you can always cast from saddle to horse since the saddle can only exist while the horse exists
Ok i see ! Thanks you all 
(cast/ pointless hard refs are still bad, especially if a complex game, with inter-connected system, cuz then you get to reference loops)
It doesnt change a thing
Ofc you shouldnt do circular casts
@digital lantern Never cast from horse to saddle and then from saddle to horse
Thats a circular cast and your game wont compile
and make sure you dont have casting chains
saddle - horse is ok
Something else - saddle would create a chain which is bad it would then load your horse and the saddle whenever something else is in memory
Yes I see, after that it's logical it should do it, thanks again for everyone's answers it's great
Hi, I am trying to create a save and load option for a VR presentation, I have several objects that will be moved by the user. WHen they click save on the VR UI they will save the modified location of each object, then after re opening the app they can, reload that state, you can see the blueprint below, I am using only objects with the tag 'Relocate'
I can see that Unreal creates a file on the save game folder, but when clicked no object relocate, thank you
First thing i'd do is debug the contents, and that loading for each loop.
But, display name is also not how you wanna do this.
Cuz it'll change.
question, what's the reason behind having variables in anim notifies being read only?
I thought the object name will stay, so which other way I can have a unique identification for each object? so the system know what coordinate for each of them?
each object also has a Tag with a unique number, should I use that instead?
It shouldn't stay, cuz it'll append the instance numbers to the end.
So, like cube_732093486732, not cube_1.
But, yeah a unique number should work in the tag.
So this are imported assets, from a CAD software, each object has a unique name already, they won't spawn, just clarifying, in that case still apply that the name will change each time this game runs?
You have an asset name.
But, then you have like an instance name.
Which is where name is cube, but then when its spawned, it becomes an instance, so its "display name" becomes like cube_2783027
In short, you can't rely on the name of the object. You need to add some other identifier
You could for example save a map of the OriginalLocation -> MovedLocation. Then on begin play find every relocated thing, check if it is inside the vector map by the current location and if yes, set the location to the one form the map.
Unless they have physics, then the vectors may vary a little (because the thing can move after spawning) and you need to do something else, like adding some unique ID variable to each one of them
Hey guys, I'm trying to pass a blackboard value to an interface, but the Blackboard Key Selector is grabbing a different key to the one I've named. Any idea what I've misunderstood here?
mmmm ok I think I understand, I am very new to blueprint and I get the concept but it is hard to develop to know what node to use. I'll try what you say
BTW you think the issue is with the load function not with the save? I am trying to narrow down the issues, thanks
Well I never tried to actually use display names for anything other than displaying them, so not sure if they would match or not. But probably they don't, and that is why it is not teleporting them to the new location
But you can add some more debugging prints. Like printing the names before saving, and then printing them out when loading, so you can check them. Or print the length of the map after loading to make sure they are in the save file when loading
Oh now I remember why I never used it. Because it has a handy tooltip
I always forget about the tooltip, yea, I changed to Object name, and then it worked, I tested with Tag ID, also worked, but is more work per object, there is a lot of them, so object name seems to be working now, thank you!
for some reason image1 is working but image2 isnt. any help pls, thanks. dnt mind the disconnected node in image1, i jst recently deleted a mesh there.
Since it is MP, it is important to specify what is nto working.
The event is not triggering?
The mesh is not changing on server?
The mesh is not changing on clients?
Which event is not working?
ig the event is not triggering, coz print string after the MC is not showing
Is the server RPC called from the actor that is owned by the client?
this is a weapon crate actor bp which is spawned by the GameMode
So the answer is likely no. Server RPC's work only when called from something the current client owns - by default the player controller and the character possesed by it
so if i jst create an empty actor, run some replication logic inside, drag and drop it in level, so in this case the replication wont work?
If you want it to be customisable and persistent (especially with late joiners), the best course of action is to have a repnotify for each state - a mesh is a state.
And use Multicasts only for short-lived changes
but why img1 is working, is it bcoz its called from beginplay?
Like vfx, sound, etc
I don't know where you call it
ikr, i dnt need to use repnotify bcoz i wont have late joiners
img1 is called from beginplay, img2 is called from characterbp to this actor bp via interface
Uh, to be honest I don't know, I'm not a pro with MP and replication still makes my head spin sometimes. I would need to have the project in front of me to debug.
But there are probably more people knowledgable about it on #multiplayer
As an FYI, in the first screenshot just replicate the component and just update the rotation on the server side. No need to do an RPC event for it. With the delays (and latency) it'll probably end up out sync after some time.
(I know that wasn't your question but felt it was worth mentioning)
doesn't matter if you have late joiners or not
just make code that works
Your code should work with or without late joiners
I just reviewed the code, why are you using RPC here.
Most likely yes, because the server side would be effectively starting the loop where it replicates to all clients. But as i mentioned above, you should change how this is handled anyway from a replication perspective.
so from where should i call the event in img2 to make it work?
i totally get ur point, doing repnotifies is a robust fix, i m still learning replication, i thot i knew a little bit, now i m confused again!
you probably learn from youtube
which is understandable because they keep telling you the wrong things.
Always multicast / rpc for stateful entities 🤢
For a start, why are you doing server RPC at all?
server rpc = client telling server to do something.
Shouldn't the server and only the server tell the clients, where the ring should be?
no i was thinking like this, i want something to happen for everyone, i make server trigger it by the runOnServer event and then doing multicast to broadcast it to clients, but ig this is wrong
You don't need a rep notify to replicate the rotation of the component.
Rep notify is for when you update a variable and want something else to happen as well on the client. (Update the UI for example)
On the component, just enable replication. When the server updates its transform, it'll automatically replicate this to the clients.
Server don't need to RunOnServer (ServerRPC) it's already the server. You having this backward.
Server RPC is for Client to tell the server to run a function.
name a bit confusing but that's what it does.
ok jst tell me this, if i want fr example to spawn an actor, i can do this by simply spawning it in gamemode and i wont have to replicate?
To spawn Actor for all machines, you simply have to do the following.
1). Server spawn the actor.
2). Mark the actor as replicated.
you do that and each client will eventually get a copy of the actor in their world.
ok and now if i want to do some replication logic inside this spawned actor? then?
then you just write the code, is there something specific you want to ask?
some visual replication, i wont have to RPC?
Really depends
This is a broad question, you can be handling the networking part to your own will. So there's no one single answer.
The important part is you need to know how to communicate between server and client.
One thing to be aware of is that the gamemode only exists on the server. This means clients wouldn't be able to access it to call its functions.
yea all funcs in gamemode is handled by the gamemode only
ok, let me do more trial and errors, ig the only way to learn is to do stuff and see what works ig, this is very confusing
not sure what you mean by this, so I will re-iterate what pattym says.
Say I am the Host (Listen server). Then game mode object only exist in my computer.
If you join my game, you will be client. The Game mode will not exist in your computer.
So if you as client, tries to get Game Mode, it will just return null.
super duper confused by this, i m having dedicated server, but i can get gamemode variables info by casting from clients
wait, lemme show u sth
I won't believe you 🙂
must be something that's misunderstood on your end
and casting has nothing to do with getting the game mode or how you can magically get the properties of game mode from client.
casting is just a type check.
this works, this is in playercontroller
i understand, but now i dnt understand myself lol
i m not arguing, i m jst saying this code works, and i m getting gamemode here in PC, so i want to understand whats going on here
The player controller running on the server... not the version on the client.
Have you even tested your game with a client?
game mode will still return null as client
My game performance runs well, but there's a major hitch that occurs in my game about 10-20 seconds into playing. It basically freezes for 5 seconds before resuming play.
does anyone know how I'd go about finding what's causing it?
editor or packaged?
editor performance is not to be relied upon.
Other than that, you probably have to profile.
Run the profiler
i m ultra confused, let me read some more, thank u fr ur guidance @frosty heron @dark drum
ok, i'll check out packaged performance
is almost certainly much better but there will still be a slight hickup i would assume
Probably some shaders compiling for some meshes
if it's to do with shader compiling, what exactly is the solution? Is there a way to compile things before play?
Add a loading screen
I must be really stupid somewhere can someone please tell me why this Input Action Event is never firing please...
The charatcer is set to receive input from controller 0
Here is the button assignments
is the input mapping overriding?
As far as im aware no
any print strings on triggered? do they fire
Nope nothing
single player?
The WALKING print string does not even show.
LogPawn: Error: EnableInput can only be specified on a Pawn for its Controller Oh... Just found this in OutputLog. >.>
i alwyas have input inside controller
the input is inside the controller