#blueprint
402296 messages ยท Page 710 of 403
yes
that's why I'm telling you to do that lol
The after you set it to RepNotify
there will be a function called like this
How to make this text red colour? Is it possible? Thanks in advance! ๐
use a widget maybe?
you get the font then break it up
then set it
@buoyant gate so first...
try without the branch first if it works
cause that timeline might cause trouble
Wut? Just Set Color on the textblock.
timeline is just for setting intensity
yea you can't use timelines in functions :o
might need to find another way around it
@charred breach
you can change color there
mb
any one like some spaghetti?
@fair magnet Like this?
Less concerned about the spaghetti and more concerned about the use of variables from other execution lines. ๐
I guess ?
what exactly are you trying then ?
Did you change the color variable?
like just change the color in general ? or change it after you press smth?
if it works it works I guess
Are you setting the color to something else in the animation?
Can you show the animation in the UMG editor?
yes
Ohh, I am dumb, look:
I changed it and it works, sorry ๐
@maiden wadi Thank you!
Not dumb. Just learning. ๐ฏ
๐
Is it Low Poly FPS pack?
@fair magnet so what do i do here?
plug in the target in the update sun direction
it wont run
Trying to get a definitive answer to this question. Can this,
be done in BP or C++ at runtime? and if so, how
Sorry Ayes and Hushey, did'nt mean to interupt your productive exchange
I don't think so
thats alright bro no problem at all hope you get help with your thing too
Thanks, both ๐
why use this stuff over what i had
@radiant muralWhat is that for? What asset are you in to get that?
@maiden wadi That is a built in engine function. Just right click on a skeletal mesh, go to skeleton section in the menu, and you should see it there.
because that's how replication works o.o
@maiden wadi it actually works really well, but i need it at runtime. Would save me months of work if i could do it at runtime.
@maiden wadi Missed the other part of your question.. It is for, well, exactly what it says ๐ It allows you to assign a different skeleton to a skeletal mesh asset
Alright Hushey... so in case you wanna keep your old stuff... Let's just make a new actor right?
This actor you set to Replicated
Aswell as Replicate Movement
Then... You do this
alright?
that alone makes your sun rotate already
since it's replicated... the Server will tell other clients the suns rotation
@radiant muralHmm. I don't see anything directly. But then that's a pretty unorthodox method. Normally you just assign a skeleton to a mesh, and often times even if you use multiple skeletons, you just name bones similarly for coding purposes.
Also, since this is for sun things. You need 360 degrees. Either rotate the Yaw 90 degrees and use Roll instead of Pitch. or keep a replicated float and set pitch explicitly based on a 360 degree clamped float. You'll end up with gimbal lock otherwise.
The rotation setters have issues at around 90 and -90 pitch with tiny increments because they're designed not to allow rotation past those points since they're usually meant for FPS style movement.
@maiden wadi Unfortunately what i am doing requires the step i am asking about. I do understand what you are saying though. In this particular situation, it is beyond that normal technique.
@maiden wadi the only other thing that would help in this scenario would be if they have added the ability for a skeleton to adjust real time to drastic changes in a base mesh from morph targets. such as a character creation system that goes from a giant to a small type character.
I feel like there has to be an easier way to handle that than a full skeleton retarget at runtime.
@maiden wadi I certainly wish there was ๐
I have this line trace by channel and I want to check if it hits the head of my target.
it has a collision on the head and the body, but the code for hitting it is:
the whole actor
I think you should be able to look at the Hit Component
Check if it's the component you use for the head hitbox
I did, I don't think it is possible this way
Hi guys,
Is there a way to click Play in Editor from Editor blueprints or console command?
Does it not return the correct component or?
Hello, I'm a newbie to Unreal and currently in school learning about it but I have a problem that I need help with and can really use the help if it's not much of a bother
Oh uh my apologies, I have a pseudocode that I need to deciper into unreal but I'm not sure which nodes I'm suppose to be using
Show some code, so its possible to provide some pointers ^
Well its directions were:Set a local variable named curHighest to the first item of the Items Array
For each Item in Items
If Item.cost > curHighest.cost
Set curHighest to Item
Return curHighest
So getting the highest cost item from an array of items?
Yes so far that I know, i would need a For each/For loop node, a variable named curHighest, an array named Items, and a If node
Is the item a struct or an object?
Well the item was placed as an actor, so an object
If I may ask, in the first photo, you use a mybreakitem, what exactly does that do?
In the first one it's passing in an Array of Structs. Breaking the struct just shows it's properties.
It's the same as your Item.Cost in code.
Technically since you're using actors, your pseodocode should be Item->Cost. Cause you'll be getting it from pointers.
Oh okay and what about if it was the opposite? Like let's say instead of finding the highest, i would find the lowest. Would the same layout work for the lowest or would there be a difference in the nodes being used?
Well, to be fair you could ditch the float in that and go off of what you had written. Then it would be a simple matter of the operator swap.
Should work for instance.
Er.
to get the minimum you need to store first one. then start searching for lower price items
Well. sort of. Actually amusingly that complicates the function more...
How so? Would it be difficult to understand or is it another matter?
Well. Dealing with pointers in blueprint is fairly safe, but you should still avoid null pointer usage where possible.
This would keep you from trying to access Cost on null pointers here without requiring to check the array before passing it in.
In Blueprint it'll just error out and take longer to silently fail. If you access null pointers in C++, your application crashes.
To explain what I just posted. It's removing any null pointers from the array. Checking if the array still has indexes. Setting the local pointer to the first index, and then running the comparison loop.
Yes I've been told that the application loves to crash alot especially when trying to do pointers
Doing things like this in Blueprint makes me appreciate having learned C++. ๐
Correct me if I'm wrong but in blueprint, you are using C++ right? Is that why it's easier to understand? I currently been studying how to understand C# but I failed the class as it was too much for me to handle but I have to retake it
What was the node to get the class which a pawn inherits from?
Reference to that class
@mental kelp Blueprint nodes are written in C++, yes. for instance, I can create the same thing as above in a library that would look the same when used in the graph by doing
.h
UFUNCTION(BlueprintPure) static UMyItem* GetHighestCostItem(TArray<UMyItem*> InItems);
.cpp
UMyItem* UMyFunctionLibrary::GetHighestCostItem(TArray<UMyItem*> InItems)
{
InItems.Remove(nullptr);
if (InItems.Num() <= 0)
{
return nullptr;
}
UMyItem* HighestItem = nullptr;
for (UMyItem* LoopItem: InItems)
{
if (!HighestItem || (LoopItem.Cost > HighestItem.Cost))
{
HighestItem = Item;
}
}
return HighestItem;
}
@astral tangleNot sure if that actually exists. You can compare if a class is a child of a class with ClassIsChildOf, but I don't think you can get anything but the object's actual class. You should already have access to the full parent class though if you have the object's class?
I see. I recognize most of the code that you used and it does seem to use all of what the nodes show
In this situation, if integer is returned "INDEX_NONE"(?), the bool will always be false no matter what right?
Should be.
I realised when I cast from the inherited class to the base class (with get player pawn) I can get the base classes reference from that. Thanks anyways!
This is what I was looking for
Yeah INDEX_NONE is -1, this is because it's common for array related functions to return -1 if an element was not found, hence "none" as the index
apparently they wanted to give it a constant in the UE C++ codebase
Is anyone able to help me with some infinite loop problems? Since it dosnt say what loop is in the wrong i tested it, the third loop is where the problem is. Num(2n-1) = 20 and Depth(2n-1) = 0. I cant figure out how to fix it, as the loops are identical except 1 difference, and that shouldn't changes that much since when i remove the Depth value its still an infinite loop.
Well these are nested. How often does this call in total?
Does it reach the infinite loop detection value?
Well it is an actor that spawns, so as i press play it gets called once, and does not get called untill the player moves
Sometimes it can be worth putting the next loop inside of a function to hide it from the loop detector in blueprint. It counts more like 3-5 iterations sometimes in the loop detector instead of the one it should. The default 0.5 million iterations is more like 125,000 to 250,000 with triple open loops like this for some reason.
Okey so if i understand you correctly, i put the third loop in its own function since the system kinda freaks out and assumes there are more iterations than there really are?
I've fixed similar problems by doing that before I learned C++.
Alternatively. Just up the loop detector considerably in the project settings.
This for instance. does not crash.
But this does.
3x3x29000 = 261,000. Far cry from the half a million default setting. ๐
Hi
I made a PlayerController and in that I created the widget and set it in a variable like the picture.
I am trying too access this variable in my character blueprint (in begin play to reset some data like bullets etc.)
but ot gives me Accessed None To Read Property
I think my character begin play gets called faster than my player controller.
Can you help me what should I do?
it's my character bp
and it's error
Use the possess events so you know that the controller and pawn are connected.
Also, is this ever going to be multiplayer?
No it's singleplayer
Access Nones mean that you're attempting to reference something that either doesn't exist (yet?) or that you didn't properly get the reference to

hey, is there anything that I can do to make the detour AI controller not jitter my characters?
Essentially, I have a large horde that is densely packed with each other all moving within generally the same location. The problem is, when some of them start colliding -- they start jittering like its jacobs ladder lmao.
I tried making collision affect navigation, reducing their turn rate, and setting navigation as dynamic. However, even though the problem has been reduced a bit its still prevelant.
Any ideas on what I can do?
for access none thing, its good to try and use isValid? nodes
I usually do that
I used possess event and it did the work
Thank you very much โค๏ธ
yes, or just making it so that you can never be trying to reference things that don't exist -- possible to make entire systems that don't run if things aren't set
true, but in some cases when the character is destroyed or smthing then you might have unexpected cases where the reference is no longer valid
so when I start getting that error I usually slap on a isValid? :DDDDD
It would be much better to just not try and access something that does not exist if you know it is not valid for sure there tho
anyone know what do here?
how can i stop camera collision like this?
click on that sphere, in the collision category, set collision preset to Custom. then select ignore checkbox for camera.
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 the differe...
this might help you understand better.
could someone tell me what does this mean? ""Var" is read only and can not be modified directly", I'm just getting the variable here right?
I guess is the trying to modify it that's the problem?, but how can you change just one parameter then?
It means that it's set to BlueprintReadOnly. This means that it's only modifiable in C++. You can't set the members of that struct in Blueprint.
Is that an Image widget?
๐ฆ oh I see, thank you as usual @maiden wadi very informative
yeah
I think that the Image has a Set Tint color function doesn't it?
I'm an idiot haha, thank you so much @maiden wadi !!!
these are two variables created as local variables, but have different icons, I need to make the item base variable in the form of a ball icon, not a minus one, but if you look in Details, then the icon is a sphere.
Why do you need the icons to be the same?
With the minus icon, it is a variable in a function and a local variable, but with a blue sphere, is it just a variable? Generally I need to specify it as just a variable.
It is necessary to fix these icons somewhere in the engine, so as not to get confused, in previous versions of the engine these icons were all replaced with a blue sphere.
why can't i call a custom event in a widget blueprint? trying to create a custom event for a callback but wont allow custom event in the widget?
@gentle drum In a Userwidget blueprint?
i think so
i know i tried to copy the blueprints form a working project . tried to use it in this widget and wont allow custom events
So when it comes to saving, whats the difference between saving level states or saving and loading?
I want a save system that saves location, saves what weapons the player has, ammo, health, as well as what items were picked up in the current level along with the previous level.
Just like half life's save system
@gentle drumIt definitely wasn't a UserWidget then. In fact I don't know if any class would not support custom events.
@uncut larkSaving and loading is a semi complex topic. It's not necessarily hard, but it has to be tailored to your game. If those are the only things you want to save, then most of it is easy, basic variables. The harder part will be the specific pickups if you're allowing the player to go back and pick them back up at a later time by loading the level. Is that the case, or do you just need to know how many you've picked up?
I need to know like if they picked up a specific health pick up or a weapon pick up, either placed by me in the editor or dropped by the enemy
Are the enemies placed?
Yes
Im assuming Id want to follow this tutorial?
In video voted for by my Patrons and YouTube Members we go through the process of saving the state of a level and player data between level changes. This is intended to show you the thinking behind how to accomplish this, along with a working example.
Support me on Patreon and get access to videos early, join our developer community on Discord,...
Initially, it's just about data control. I'd make a struct that contains a level identifier like the level name. Make an array in it. Assign your drops and placed items some form of ID. Name, Integer, GameplayTag all work. In your level load, check against the save, get that level's stats, and set them in the Gamestate or something. Remove all placed versions from the level at beginplay, and on enemy death, check those values and don't do the drop if it already was.
@gentle drumThat.. Is odd. I have never once witnessed that. O.o And I work mostly with widgets for my dayjob. Does this happen even if you create a new UserWidget class and open up it's graph? You can't right click and create a new Custom Event?
If that's the case, what engine version are you running?
How are you creating the Userwidget class, by chance?
purchased this template so not really sure i will look
I know there's an odd bug with the designer missing from creating it from a C++ subclass via right clicking. Or at least there was in 4.25
I found the most confusing BP node I've seen so far :P
The In XY is actually just the X value... the Out XY is actually just the Y value...
the Context String does nothing, except it's used in logging if the row is not found...
Haha.. there's not even any commenting on that either.
i feel like my characters speed is indicated by my mouse , if i look down he becomes slower and can stop completely if fully look down, how can i fix it?
its a 3rd person btw
you need to rule out pitch and roll from your rotation before you get forward and right vectors
break rotation then make rotation again but only connect the Z component. then get forward and right vectors from it.
??
i added the break vector how do i only use the z
nothing connects to it
@orchid star is there something are you talking to just me?
GetCamera->GetRotation->MakeRotation from only Z from the GetRotation.
yes. should be something like this.
wow, thanks man
im new and dumb, tanks for showing me the full thing, rather than being vague
Any Way to avoid this after changing structure?
Splines. the red debug spheres are the actual random generated position the spline points "should" be located at. but they are spaced evenly every 100 units or so. is there some "override" in the spline that i need to deactivate? im creating these with a forloop on begin play
How would i use Instanced Static Mesh to make slate roof out of actual slate plates?
I have two classes I can't cast to... anyone know why?
I am trying to bind event to a custom event, so it looks like this
but I am trying to do it inside of a function
and it won't let me create an event
you can't have events in functions... create and event to bind the event, and call it from within the function (I think)
No need to message me. Put the thing you show in this screenshot in an event, and then call the event from the function.
Try unchecking the Context checkbox
If that doesn't work, I have seen a bug where you can't cast to class objects that you just created until you restart the editor.
Not that I've found. If you change elements inside a class that has been used in a BP, you usually have to go back and fix them.
So I have enemies in my map, my gun does a line trace, to do this knowing I will need more types of enemies, I have them as a child. So my first child enemy works fine line traces them fine. But I add a second one and line trace does not find him. Just passes through, should I make it a child of the child or what am I doing wrong.
well either your line trace settings are set for only that enemy instead of the parent. or the new enemy is missing some collision setting
Is there a way to have a string go to a config.yml file? for Example I am packaging a dedicated server build and I want people to be able to setup their own dedicated servers.
for example it would check a serverconfig.yml
Servername=
Mapname=
ServerDescription=
SessionName=
you mean importing a text file at runtime, yeah you can search how to do that
Say I want people to be able to download the server so they can host their own dedicated servers
And I'd want the server settings to read from a config.yml file
actually, you can with the help of the 'Create Event' node. But it's definitely not intend, if you use the function more than one time in the object, it will error.
Oh nice! Which config file is it? IS there a way to specify a specific file/make one?
It will tell you if you activate it afaik. Also I don't think you can make a specific file for that
Oh, on further research it seems like you can't override it in a packaged build
which defeats the point
yes
Something that really bug me is inability of ue4 to handle or read simple text file. Yes, you still can do this. But, what if I want to do is just put simple file text and read that as a string. You can do that in C++ using For the purpose of this tutorial, we โฆ Continue reading Reading text file in Unreal Engine 4
Not in a BP only project
however
there is a BP Files Utils plugin I belive
it's a 'stock' plugin, so you just need to activate it
but it can't read files
damn I'm giving bad advice today
but there are several free plugins on the market place to open, read, write and save text files.
i.e. File Helper BP Library
or you can just create your own libary if your project isn't bp only
Okay thanks for the help ๐
So I think Im slowly beginning to understand saving and loadint a bit better, Im just curious, how can I get the level streaming volumes to save the level data once I leave it and to load it once I come back? Could I just use the begin and end overlap event on the level blueprint?
Im just stuck with implementing while using level streaming volumes. Every tutorial ive seen online has different levels, but its not handled using a level stream volume
I want to create a three looping tasks with a delay
Do task A , then B then C , then A , with the delay between them
Would uou wanna use a looping sequence?
wdym
I think so yeah
I just added a delay between the three tasks , connected to a looping timeline , if theres a more proper way for this please suggest me
Nothing has changed in Unreal on this front, I'm guessing? You can't find a key from a value in a map with blueprints?
(Yes, I know a value could be in several keys, but you could have "find first key".)
This is the Bp i created for Traffic light and its working and looping but Iโm afraid its too dumb The way i connected the end of bp to the first color to loop
No that's pretty much an okay way to do it.. It just looks ugly, there are definitely better ways to achieve that though. But not something critical you need worry about
there is also something you have to think about with traffic lights, for one, you'll need to at least sync the traffic lights for the one street section, nothing like having two green lights firing off at the same time when it should be red and green.
Also on a city grid, believe it or not, the traffic lights are synced across the grid so that they all fire off in a particular order to allow smoother flow of traffic. without it, you'd end up with green lights going off but no one could move because the street ahead is full of cars still.
just some food for thought for you @stray island
Thats interesting info for future creation, and i think i can implement a logic for that with some extra steps , but for the time being i will leave it as simple it is as its a simple stylized city pack for market place leaving extra steps for developers thanks!@orchid garden
Hi. I currently have a working leaning system from several tutorials using a timeline, and using its alpha float to drive lerps between transforms and set the relativelocation of the FP camera, and to drive the rotatory values coming from the control rotation also for the camera. It works. However, I have a problem when I simultaneously press buttons. For example, I continuously press E, and while pressing it I also press Q, the moment I release Q, while still press E. The leaning sort of resets. I would like to limit that when I am pressing one leaning button I cannot press the other one or at least it would not reset. I tried several methods like adding bools, using is input key down, etc. Thank you
by the way I am using Use Pawn Control Rotation so I need to use control rotation from get controller to rotate the camera**
Sounds like you need another check. Maybe.... can you pull a value out of the cameras position?
Like an axis value?
And then just add it so that it constrains the lean to only be able to work if the camera is > a value on the neutral position? If that makes any sense
you will have greater control with tick and float interpolation. inside the tick you check if E is pressed, then interp float to 1 otherwise if Q is pressed then interp float to -1, otherwise interp to 0. after this logic simply lean right or left based on current float value
Hi. I did that also previously using certain floats. But I made a mistake I forgot the use the enum on the direction from the timeline and connect the finished to sort of rest bool. Thanks ๐
Thanks, I also was trying to find out a tutorial based on tick or getting the delta seconds connected to an Finterp as they are usually smoother like I was using from a weapon sway. Do you have any links or guides to this? I still need to learn how the logic works but I thought of it previously but I can't materialize it haha
Also when you press or release E/Q, update booleans accordingly and enable tick for actor. tick will be disabled after lean is finished.
This awesome feature allows you to "mute" nodes like in houdini, resulting in much cleaner code. It's built-in in editor (editor preferences -> blueprint -> experimental features)
Sadly, it doesn't work now in 4.27 and nodes are still executed ๐ฆ
it's experimental I think. but it would be great if it always worked
Say it's a "cleaner code" when you have those lying around and you forgot to turn them back on.
when rename C++ class/file name, how to deal with the inherited Blueprint classes?
Reparent it and fix up all of the links.
is there any automatic way to convert Blurprint to C++ code, and vice versa
I don't think converting C++ code to a blueprint would be possible
https://forums.unrealengine.com/t/converting-blueprints-to-c-code/109706
Converting blueprints to C++ is tho
Hello, I am new to UE, not new to programming, I graduate from a Software Engineering degree in a few weeks. I was wondering if there was any good resource I can use to make the process of converting blueprints to C++ any easier? i.e this type of node is this way, this other type of node you code this way, etc Any guidance would be greatly rec...
ok, thanks
BP code can be nativized by checking the box
This effectively generates C++ code from it
Generating BP from C++ is not possible
Anyone know how i could get the possessed pawn from a player controller?
I've tried using Get Controlled Pawn but it doesn't return the proper type of my pawn
It returns a Pawn Object Reference and i need my custom class (named TrueFirstPerson)
I tried casting it but the cast fails
@maiden wadiis it able to dynamically reparent the BP inherited class ?
Core Redirects can also be used if you rename C++ classes, they will automatically rename the refs in BP's
i know, but i have many to rename, donot want to keep so many lines there...
If casting the pawn fails then the pawn isn't of the type you tried to cast it to. Get controlled pawn will return the correct object
If you add a core redirect, open the editor, then go into the affected blueprints and press save. After this you can delete the redirect
They have to be manually saved because the editor won't flag them as changed, but this will save the changes from the redirect
ok, greate, i'll try it , thanks
I'm trying to set a variable on every player when they log in
Both player pawns have TrueFirstPerson as a parent
I don't know if the pawn has been spawned yet in Post Login
maybe try using Spawn Default Pawn For
heh :)
I made a change in a Blueprint somewhere that for some reason causes a stutter... it's a single stutter I know how to trigger, but how do I debug it? I can't use break points because that of course won't make the stutter show up... I need a graph of some sort, I think
there's so many cool gpu performance visualizers etc, but is there the same for blueprints?
๐ค
I mean if you know how to trigger it, then that should give you an idea on where the problematic BP is
You can try disabling parts of the logic and see if the stutter repeats. If it stops doing it, then you found where it's being caused, and if there's more nodes to look at, you can try disabling some others in there
I think there's some kinda profiling tools in UE but I haven't really looked at them much lol
Trying some session front end with a data capture thing now, but wow, it's difficult to understand even with a tutorial...
wtf... I don't even have audio in my game yet! ๐คฃ
ok... and now suddenly the data capture button is greyed out and I can't capture anything more... wtf
hrmm... so note to self: Don't listen to headphones using ASIO exclusivity mode while testing performance in Unreal Engine ๐
But still, this doesn't tell me much either...
IMO, ASIO is terrible
For Unreal maybe, but for hi-res audio, it's great ๐
Voicemeeter is more servicable, but I'm not an audiophile so what do I know
Where is this magical device? (Found on Reddit...)
Either my Google Fu skills are weak, or there's like near zero results for it...
asio is for musicians who want low latency
Thank you so much. I will dissect this one and implement it. I just love how using interp and tick/delta seconds smoothens everything. At least my game is single player so probably tick events really are not a problem ๐
In multiplayer you would not replicate tick. only the events, like pressing or releasing E/Q keys. smoothing would be on tick for each client without replication. I don't know anything about multiplayer though. it's just my assumption.
Kazem is right in that regard. In multiplayer you would likely just replicate a visual state enum for the animblueprint and let it do the animation blending locally per client. you could easily switch between like LeaningLeft, LeaningRight, StandingStraight, and also use the replicated crouching variable to get all of the animation blending looks you need from a third person perspective. Locally it'd be different because you need to move the actual camera and whatnot.
I see thanks guys ๐
Also some general advice:
- Generally try to not use tick, you can easily achieve the same outcome with timelines.
- Only the Authority (Server) is able to replicate stuff to the other clients, so make sure you change variables and fire events on the Authority if you want that stuff replicated.
Timelines are tick.
and a bit more tricky, for stuff that can change state while the timeline is running
Thanks for the advice. I still haven't delved with multiplayer. hehe
I do have other logic tied to weapon sway/procedural aimoffset and recoil recovery using tick/delta seconds which for me was I think better to do (at least when I compared it to another method) and complicated for me to do use using a timeline.
Timelines are actually more wasteful than a boolean on an actor's tick. Since they're another component on the actor, and even more function overhead calls.
but you could just make your own event, which triggers itself until done
instead of messing with enabling/disabling tick on the actor
Tick takes more time to run in my experience.
but there are timers as well
just leave it as it is for now, but if you add more stuff later, it might get to some point where disabling/enabling tick becomes quite a mess
Also do not use repeating timers near tick times. Those are also potentially more wasteful than tick.
I have another problem, I noticed most FPS templates and tutorials have a fire rate tied to timers and function by event etc, which I think is a common practice. I noticed that even if I slowed down the fire rate lets say 1 fire every second when holding the LMB it does 1 fire every second. However, if I spam the LMB I can sort of get out of this limitation and go faster.
May I ask if this is really the behaviour of guns (real life) despite the gun having a slow fire rate when holding the trigger, you can alternatively just press and release (repeatedly) to make it faster? Hope I make sense. hehe Thanks
You usually can't pull the trigger faster then auto-fire
and auto-fire is as fast as it gets
gun needs time to load new round into chamber + heating issues
Yeah, so probably it may need a sort of gate, or do once and have it reset within the code?
I will just probably ask the authors if they can add that logic though so that it would be cleaner ๐
I would go with do-once
Hello everyone, tell me how to call a variable from the blueprint class in the animation blueprint class? for some reason is called from some other blueprint class.
Is there anyone in here programming for PUBG?
you have to cast your character reference to the correct class
which seems to be BP_CharacterWHATEVERISCUTOFFFROMTHESCREENSHOT
an error: Cannot place variable in external scope
did you cast your character reference?
no this is a new variable in the animation class, a new variable referring to the permonage.
It's not entirely clear how they made it so in the video that a variable from another class can bind to a character.
Not quite sure what the link means?
they cast to the correct class before accessing the variable
When I unchecked the Content Sensitive checkbox, a variable appeared, but not from the required class
You are mixing stuff up
Casting gives you a more specific reference for the Object you pass in. Your โObjectโ input must be a parent of the reference you want to get.
In this case โTry get Pawn Ownerโ returns a Pawn reference. However, you need a โBP_Characterโ reference. Since Pawn is a parent of โBP_Characterโ, you can cast to it with the โCast to BP_Characterโ node.
Here are the parents of your โBP_Characterโ: โUObject => Actor => Pawn => Characterโ
The TryGetPawnOwner node returns your Character, but of type Pawn. While the correctly spawned Character is "in" that variable, the coding part only sees it as a Pawn, which is a Parent class of your character. If you want to access the variables and functions of your class, you need to cast to it. You aren't doing that. You are casting to Character, which is still not your class. The Inheritance is probably Pawn -> Character -> BP_Character.
You need to cast to BP_Character if you want to have access to your classes properties.
trying to override the canjump function but i dont understand how i have to proceed. when i try to create a custom canjump event the editor doesnt let me name it canjump
oh got it
If you hover that it should show "OVERRIDES" , which you can click
You can select available overridable functions there
thats what i needed thanks a lot sir
and is it possible to see the base code somewhere? i'd like to copy it and modify only a little part of it
Yeah in C++
I didn't quite understand, my class was created as character, not pawn, and I create a new anime class as character.
Pawn is the Parent Class of Character
Character is the Parent Class of your class, which you named BP_Character
TryGetPawnOwner returns the instance of your class, but as type Pawn
You need to cast if you want to access the BP_Character stuff
ok so this works perfectly, but it only works for the "SiloBP" object in the persistent level. How can i change this so that it affects every single item under the "SiloBP" class instead of just the one in the persistent level
IsAiming is part of BP_Character
You can only get that if you cast to TryGetPawnOwner return value to BP_Character
You are currently casting it to just Character, which is not enough
The Character class does NOT have your Aiming boolean
do i need to dowload the engine's source code for that? how do i have to proceed?
No, there are multiple ways. If your Project is a C++ Project, then you can look it up in your Visual Studio solution. Source Code is only needed if you want to alter it (+-)
If your project is BP only, then either turn it into C++ by adding a C++ class (any will do), or, if you don't want that, look up the code on GitHub
Oh okay i remembered doing that in my C++ project but this one i wanna keep blueprint only and didnt could not find my way to that anymore
gonna look it up on github thank you
You can also make a second project that has c++ and stays empty and only use it's visual studio solution
Visual Studio makes it a bit easier to search for functions etc.
Maybe you can even just open the engines solution
but never done that on launcher engines
oh that's a good idea
i'll just open my other project which is in c++ with rider
Thanks for the clarification, now I understand
anyone have a clue about my problem? Seems as if it wont let me change it to the class for some reason.
Get all actors of class
THANK U ily
Or GetActorOfClass if you only need the first one that pops up.
hmm, both say that they are slow and to not use them on things that are constantly happening. What would I use if it was a constant thing? There is going to be atleast 200 of these animations happening every few minutes
not at the exact same time of course, but there will be many per minute and probably a few a second
Hey all, can I get some advice on an approach to an idea I need to program. I need to store several predefined zones (vectors) on the level to later spawn (and destroy) actors. Is the best approach to manually save each and every vector in a variable and then called them or is there a more efficient way?
Read up on how to reference actors. Typically you'd get it once, then set it as a variable and refer to that from that point on.
Thanks, will do
uhm, If that's the case they should probably have a way to activate what you want them to do themselves. What you're trying to do probably doesn't belong in the blueprint level editor
One of the animations happens after a certain amount of time, and one of them happens when the player presses E on the object
should i not do that in bp?
You should handle that stuff in the SiloBP
Give it a collision capsule, when the player overlaps it and presses E then it should activate the animation
ohhh okay. you are saying to do it in the actual silobp instead of in the level bp, i gotcha
that was you don't need any references, you certainly don't want to be calling hundreds and saving them for no reason :/
As for the ones that activate on a timer, you can easily do that with a timer function in the silobp
yea i get what ur saying now. That makes alot more sense than doing it in the levelBP and stuff. Thanks, will do it in the SiloBP instead!
oo okay thanks
Create an Array of vectors and store your predefined zones in it. Perhaps in level blueprints, and handle destroying the actors there as well. There isn't really a "more efficient" method in this case because of how minuscule the impact will be. I could suggest removing vectors from the array that are no longer necessary
Storing the vectors in the array would leave them as the index number and would confuse me so much as the array gets bigger
use a map
Oh right, i haven't used arrays and for loops much in my experience but thanks for the feedback I appreciate ๐
How intensive is saving different game instances?
How do you mean?
Like I want to make an fps with level streaming, but obviously I dont want to bog down the performance too much
So is saving each level to a game instance going to be too much data for the game to store if I implement it across an entire game?
Like is there maybe a way to delete a previous levels game instance?
If you don't want to save the data, just clear it when streaming in a new level. Game instance exists from the time you start your application until you close it. You don't really destroy or create it more than the once.
Unreal handles all memory management for you. If you have a huge array, and you empty it or remove many instances from it, the engine will automatically free the memory for you at garbage collection. If you continually overwrite the same variable, you're using the same amount of space, nothing extra.
Gotcha, so maybe not the way to save a previous level's data for whats been killed/used?
The thing with these different game instance tutorials is they dont mention for how many maps you should be using the method for. Im assuming its the whole game but Im not sure
Personally, I'm against storing game persistent gameplay data in the GameInstance.
How would you approach it?
In this implementation, the game is using level streaming volumes. I was assuming I could just use a game instance to store this persistent data
Sounds like you're using one map then and many sublevels?
Im using one persistent level and many sublevels yes.
So chapter 1, area 1, chapter 2, area 2
Etc
You should always consider saving game related data in Savegame files. In that case, you will not lose data if your application closes/crashes.
For map wide data you need to keep for gameplay computing, store it in the GameState.
GameInstance should be reserved for application wide data. Loading screens. Options menu open? Stuff that will affect you anywhere but can be reset and doesn't matter if the application closes.
Hi there, i m bit noob to BP but i want to try stuff i usually do environments in UE but i want to try and make something ike game and maybe learn BP so my qestion is how to merge 2 projects together mostly just to add flying balloon to an rpg game.
I added the second project to the RPG and i added all the inputs and it is working but now i want to add the controls from the fly character to the rpg one
This are the 2 project i m talking about
"https://www.unrealengine.com/marketplace/en-US/product/easy-survival-rpg"
and
"https://www.unrealengine.com/marketplace/en-US/product/modular-flight-system"
Anyone had experiance with this projects ?
Interesting. Everyone stores it within the gameinstance, but yeah, I guess the gameinstance in this circumstance might be not as optimized
Okay, so for level data, save in a gamestate. Player data, like variables and location, have the savegame object handle it
Any form of data that you need to save to reset your game from startup from a load game, put in a SaveGame. Checkpoints are a common thing for this. It's easier to keep game data accurate from specific points in the game. Anything you need to play the game in real time, should be kept in the GameState.
So could I call a gamestate from a savegame object?
How do you mean?
You said the gamestate is for realtime, so Im picking up from that is if I quit the game and reload, it wouldnt save said data
So could a savegame object retrieve this data?
I also found this, which I think would solve my issue
We will be showing the concept of a Saveable Object Manager that keeps track of objects in our scene that are saveable and then reloads their state when the player comes back into the game.
Source Files: https://github.com/MWadstein/wtf-hdi-files
But I still would like to understand how to differentiate between gamestates and gameinstances
Backing up just a bit. Do you have checkpoints or whatnot in your game, or are you allowing saving/loading from anywhere?
Sorry, Im allowing saving/loading anywhere
Think like Half Life, but its only going to be limited to like 3 or 4 spots
Well, ignoring everything else. Consider just the player. I'm not as familiar with loading in using level streaming volumes, but you'd need to load the persistent map. Have something like GameMode or GameState get the savegame. Make sure your current correct level is loaded. Then either purposely spawn and possess a pawn or set a value and override GameMode's spawn default pawn and set the position to the saved position. Initialize the character's other stats from the savegame. Health/Shields/Stamina/Weapons/Ammo/etc. You can probably get away with that with a single struct of data for the player, and then a name for the sublevel they were in.
For all other things, it starts to get more complicated. If I recall correctly you said you have hand placed enemies and health kits. You'd need to tag these somehow with an instance editable tag. Name, Integer ID, GameplayTag, etc. On map load, you'd need to crosscheck the picked up ones from an array and destroy them whenever you load a new map.
@trail crane
You said you'd show us a more efficient method to do this but then didnt :(
We will be showing the concept of a Saveable Object Manager that keeps track of objects in our scene that are saveable and then reloads their state when the player comes back into the game.
Source Files: https://github.com/MWadstein/wtf-hdi-files
Yeah, so Im assuming these things would need to be saved into an array
Or possibly have it access all of the objects with a certain tag (Im assuming a Bool) and then handle it
Why can't I move an object attach to the character using the Select and translate Object tool ?
This happen after importing the new developed map for my project, but switching to the old map I can move attached objects in the character view port
is it possible to get the highest zorder widget displayed on the screen? like, without having any references to anything at all?
like... what widget is this?
huh... doesn't seem to be a way...
I have an event called Event On Move Made in this UE4 tutorial project, but I can't find where the caller is. Is there a way to debug from where it's being called? I right-clicked the event node and selected Find References but the only reference is of itself
It's definitely being called, i created a breakpoint and made sure
Array references are not compatible? Help please!
None of those are arrays, did you read the message it shows?
Would anyone here have an idea how to setup a blueprint that would give the ability for the player completely able to see themself in tpp and only able to see their arms in fpp? or would that not be a blueprint kinda deal
@light rootYou can search in All Blueprints by name for the event. From the main editor window go to the top left, and go to Windows->FindInBlueprints->FindInBlueprint1. This'll do some indexing. DO NOT SEARCH until it's done. It can crash the editor if you do. Then just write the name of your event.
@vapid moss Generally just create a function in your character blueprint that sets which camera you want to see to enabled, and the other camera to disabled. Based on first person or third person, set visibility of the skeletal meshes.
hmm okay ill try to figure that out thanks
Hey guys, do you know if there is a way (node) to do a selection for execution pins - so that I can use a int or float value to decide which execution order gets triggered?
Similiar to the select node, but for executions instead..
SwitchOnInt?
Won't be a thing with float I assume
Cause that's not so nice with ==
@teal dove
Yes that's perfect, it's exactly what I was looking for, thank you! ๐
whats the opposite of "set owner no see"? "only owner can see" would make it so other players cant see it right? I figured out how to hide my body in FPP mode but not TPP mode, but when i go from FPP back INTO tpp i cant see myself then. So im close haha. Just trying to figure out how to be able to see my character after i swap from tpp back to fpp. This is what my bp currently looks like.
Couldn't you just switch the bool of the "only owner can see" node before you change the camera to 3rd person?
And I think your blueprint structure won't work, because you fire the toggle two times, giving conflicting results
the toggle works fine, and since i start on tpp it works fine, but after i swap into fpp (i cant see myself, which is good) but when i swap back to tpp i still cant see myself
What do you want to do, toggle the visibility of the mesh when you switch the camera?
yes, I want the player to only be able to see themself in 3rd person, and hide themself in first
and im halfway there, i just need to fix the fact that im still invisible when i switch from fpp to tpp
Give me a sec I will make a screenshot
ok thank u, and thanks for being so patient ive only done this for a few weeks
No problem I hope I can help ๐
Hi, does anyone know of a way to setup a loop which counts amount of actions in the Input mapping context? In this case 2. I only find an array of all total key mappings. Using Enhanced input in 4.27.
This one?
Going to give it a try. Ty
I do this, in case it's useful...
I'm trying to make a blueprint for a playable keyboard. Ideally I'd define things like the position, pitch, colour, etc. for all the different keys in a single place. Something like an XML or a YAML like file which contains the parameters. Does Unreal Engine have a concept like this?
So, I think I finally have my head around how to setup and work with Blueprints. Iโve started this framework, but wanted to run it by others in case Iโm missing something.
I have a Player with components for things like an Interaction System, HUD handling, health system, ectโฆ. Then on the opposite end I have components on my other Actors that the player components can interact with, like the rest of the interact functionality.
My though is Iโd extend the components if things need more defining (like if I add a Pickup to my game it will just be an extension of ActorInteractComponent).
Everything uses Interfaces to communicate.
Does this all sound doable and scaleable? It seems to be working so far, just wondering if thereโs anything Iโm missing. Iโve started to incorporate Multiplayer elements now as well, so wondering if Iโll run into an issue with MP and my current plans for the framework.
Any feedback would be appreciated! Thanks!
Please learn C++
How would you suggest I approach things differently with cpp? Still stick with the component system as my primary framework for things, or take a completely different approach?
Hii, im trying to make a stamp mechanic where i place the stamp on the paper and a decal saying verified spawns on the paper at the same location where stamp hits like irl but idk how to do i tried setworld location for decals or spawn decal at location and got the location of the stamp at the OnCcomponentBeginOverlap of the paper but i still cant find a way of doing it can anyone help me ty :)
Is there any node where I can get information about how far away or how close player looks at given actor? By "far/close" I mean purely angle of view, not distance between player and actor.
@modest gulch Do you mean like this? Red actor would be 45 degrees to the left in player blue's view.
yes, something like that
If you need a FPS view, it's also possible you might be able to project the point to screen and do some math based on the view's field of view.
basically I need how far away direction of camera is from ideal direction "staring straight at actor"
hi brain not working rn, any idea why when trying to add a TPP perspective (already have over the shoulder and FPP, as notated with FPP and SPP) isnt working (its going second, first, second, third) and wont let me cycle back. Im trying to get it to go FPP, SPP, TPP)
Direction, or point?
I mean, I know you can do some black magic with dot product, but maybe there is node for that?
(not for dot product, but for whole functionality)
Okay, so you're right...
but, I am trying to add the objective here, to my array of objectives. Everything is working up till this point.
I am working on a quest system and at the moment, these are 'sub objectives', i.e. I have the quest name that pops up, this is supposed to populate sub objectives of "Go inside the house".
Well I don't really know how it's supposed to work, but the Target pin is supposed to be the object you want to call this function on, not its parameter
and if you look at the node it says "Target is BP Obj Collection"
so the target needs to be of that type, or a child class
It looks like this on the other project I am implementing from and it worked properly there. I feel like I am missing something small....
This one DOESN'T work
It looks like BP Reach Destination doesn't extend the class which the Objective parameter should be
maybe you didn't use that as the parent when creating it?
Solved: Recreating the Character class and re parenting to tits main C++ class will reset the sticked garbage data somewhere in the project causing the recently modified components not to move.... and those components will start moving after doing this step to clear all the active conflicting garbage
Any quick way to check this? >.>
open the bp and see what its parent class is
The parent for Reach Destination is BP_Objective
Is that the type of the Objective pin? It should say if you hover over it
Sorry I meant the pin on the Add Objective node, which takes the objective as the parameter
For some reason when i play my game in standalone, it does not call any of the HUD functions. Is there something else I am supposed to do to set this up? It works perfectly fine in PIE mode
Well that doesn't seem right, if you're reimplementing it you probably should see how it was set up in the other project
Hello, hope someone can point me to the right direction. I want to place several actors on the level but I don't want them to be loaded all the time. What should I use to load/unload these actors?
@runic plinth unless they are on screen and with active functions they dont matter
Worst case just disable their tick when thry arent on screen
And enable when they arr
Is the same logic for blueprint actors? How exactly do I "pause" BP actors?
It is the same.
Look do a test using ~fps and i forget the other command
When you load a level you load all of it.
Then you instantiate it.
The only thing that matters is whether or not they are on screen
Hey. I'm playing around with subsystems and for some reason my UGameInstanceSubsystem with a method denoted as UFUNCTION(BlueprintCallable, Category = "Whatever") cannot be found withing a widget blueprint? Any ideas?
Alright will check it thank you.
I guess my problem is finding out exactly what I did wrong here, so that I can compare it to the original...however, I'm not sure why the object references don't match. I'm fairly new and ignorant when it comes to UE4.
The Add Objective function is probably wrong
most likely you have a different parameter type in the other project
hmm so this is working perfectly the first time, but after the 1st time it cycles through FPP, SPP, TPP it gets stuck in a loop on FPP, TPP instead of cycling back through. Ive gotta be doing something wrong with my reset. Anyone got ideas?
Do i need to maybe combine all 3 of the Set Owner No See Exec's into something and run it back into the MutliGate reset? If so im not sure what its called
How do I cast to an AI controller?
Hm, so it seems you were right....but fixing one problem, created 5. >.>
Changing my Add Objective input node type to BP Objective allows me to hook them up, but breaks everything else referencing the Object Collection.
Imo start over and check as you go
I will probably be taking this route, but it hurts my head, that I can't figure out where/why I went wrong....
I guess the biggest frustration is uncertainty.
It is always best to redo and do it slowly and check your steps along the way
When i combined dcs and als for instance, i had to redo the same steps 3 times to get it right
Hey all, I am trying to make the following calculation, however it seem's that when using power function, if the exponent is lower than -7 the result is 0.0.
Is there any way around this or is there something I have messed up.
Engine version 4.26.2
Apologies I am new to the engine.
@trim matrix what is the actual value in scientific notation?
10^-9
Hm mighy be too small not sure how the engine handles it
I would test different exponential values on print string and see when it just becomes 0 to see what the lowest is
0.1 0.001 etc
I am not at a comp atm
Yeah, I tried with 10^-6 works fine, soon as it hits 10^-7 it returns 0.0
First day on the job I hit the limit ๐ฆ lol
Ok so thats the threshold. Check settings if they can go lower
Otherwise use scientific notation as a work around. I mean so you really need such low values?
When i made my fps i deal 1 or 2 damage but i output 100 and 200 to make it flashy
Unfortunately we are working with chemistry values for a simulation based game, pH being mixed requires crazy low numbers due to the calculation required, so one digit out will result in huge differences
Yeah i am aware of log scales
Yeah they are a pain in the butt.
Programmatically what you can do is keep the units and save the exponents as separate values.
Ahh ok.
Which brings it back to sci notation
Basically do a check if greater than 0 on multiplication of the inverse log and if so divide and save that operation as a separate int. Loop until satisfied.
Thank you Zanet ๐ I will have a go and report back, Thanks again
How can i deform my mesh to stay along spline component?
Spline component? Why not use spline mesh component?
Hey Zanet just reporting back, tried a few different solutions unfortunately looks like this may be not possible on unreal, going to have to settle with average value rather than the exact pH mixture, so to confirm 10^-6 is the limit ๐
for animNotifys, is there a way for it get a variable from another actor, and store it as its own variable without needing to cast every time?
Ah nice! thank you. I see it references a parent class called Match3.tile but there is no blueprint or file for that matter called that in my project. What does this mean
update: looks like the implementation is made in c++, didn't realize this
what's wrong with casting everytime? but to answer your question, yes there is a way assuming your animnotify is a blueprint
im just trying to maximize perf, since the anim notify is running every time an enemy takes damage, but when i cast to a variable(works fine as local var), it says the value is read only within this context
In my project it is set to blueprints but I need to make a C++ class. When I right click I dont have the option like I use to, to create the C++ Class. How can I?
Is your animnotify it's own blueprint?
Can you use AimOffset with root motion anims?
I've asked similar questions before, but I've narrowed down my issue so I'll repost one last time and hope for the best. I've got a map widget made for my level and its near perfect, it just is a little off when getting to the further corners of my map. I'm 95% sure this is because I stupidly put my level on a slight rotation ages ago. Can anyone think of a smart way to fix this without redesigning my entire map by correcting the angle?
I'm a novice when it comes to blueprints so I don't even know where to start
if anyone is interested, what my top-down looks like
by using the bot-left and top-right corners it should offset the size difference because of the angle
I think this might be a bit of a tough one, so it may be impossible, who knows
is this render target?
Screenshot. Should I use a scene cap instead?
yes, you can capture one and save it
I didn't understand your angle issue by the way
just make sure your scene capture is orthographic and not perspective.
okay
Anyone run into an issue where every time you try to save a struct or edit anything in it the entire editor crashes?
i need some help. my character is vaulting in air and i think its because of the line trace. not too sure tho
So I just found this question
And this trick does indeed work
But is there a reason why "World Soft Object References" should not be created as a variable?
And are not able to be created from the UI
if the line trace hit something it'd show as green
Hello all - I have a question about one of the examples from the Content Examples, specifically the Math Hall map. There is an example in there showing the trenchcoat dude in tpose, always facing the player. There is a little BP capsule with some logic to display player distance as text, but I don't understand how the rotation is being passed to the mesh asset, as I don't see any reference to it in the BP, only get nodes. Can someone explain ?
this booth :
UWorld is not exposed to be a BlueprintType.
(hi Cedric !)
Hey!
I gathered, but for what reason is it not exposed?
Epic Games doesn't want you, in Blueprints, to get, set, store etc. a World reference
It does say that the BP calculates it. I don't have the Content Examples installed. You should be able to open the BP and check the EventGraph or not?
that's the confusing part, I don't see any reference the the mesh, and the mesh itself is not even a BP actor, just a plain mesh dropped there
and duplicating it doesn't create the effect on the copy, so this specific mesh has to be called somewhere, but somehow I can't find it
LevelBlueprint?
that was my guess too, but no luck
it almost sounds like a weird conversion between engine versions causing the link to be hidden somewhat ? But that seems like a stretch
If you rightclick it, there is a menu option called Level
There you can click Find In LevelBlueprint
Maybe that helps
But the logic itself sounds very simple, if that's all you are interested in
yeah definitely not in the level BP, hmm
true yeah - find angle, apply angle
or maybe the engine has a way to feed expressions directly to object transform fields ? Bypassing BPs ?
(just thinking out loud here, it's just confusing)
Hiho I'm trying to save some character variables when closing the game. The main code is in the CA_SaveGame file. Now I am trying to call this up within a widget (LogoutWidget). My question is, can I just call this up now or do I have to declare it every time?
This is in the CA_Gamemode
No, not that I know
If your SaveGame code is inside something that you can get a reference to, then just call it from there
The code is in the Gamemode with a SaveGame custom Event
Yeah then get your gamemode and call it
@worldly karma The code is in the capsule that you can barely see
Also there is a Normalize2D node. So the multiple with 1,1,0 isn't even needed
yeah I could tell that the code was from there, but I can't find any reference to the model in it
It's an Instance Editable Variable
even though it is clearly referencing it somehow, as deleting the model from the scene gives a warning
You can see it in the settings on the right
"Target Actor"
"Instance Editable" means that the variable can be modified on an Instance level. So if you drag the BP into the scene, you can modify the variable on the instance.
If you have 2 or more of those in the scene, they can have different values there.
but how is the implicit link being made ? I still don't see the reference to the model
The BP has a variable, that is set to Instance Editable
Then it's dragged into the scene
Then you click it
The you see the variable in the settings on the right (Target Actor)
There you can select the MeshActor
"Owen" is the name of that MeshActor that is A Posing
I finally found it haha
so ... a skeletal mesh is considered an actor, even when not part of an actor BP ?
that seems helpful but also dangerously confusing at the same time
Whenever you drag something into your level, it has a chance to use a Factory (that's something in c++) to handle that.
For something like a USkeletalMesh (the Asset), it will spawn an ASkeletalMeshActor, which comes with a SkeletalMeshComponent, and sets the USkeletalMesh on that.
That exists for a lot of Assets
Sounds do that, Particles do that
Everything in the scene will always (+- some very specific things) be an Actor
I think I got "trained" to expect that kind of stuff to be very strict (ie, wanting to manipulate a skel mesh, requiring to specify that type precisely)
Well it's not modifying the mesh
It's rotating the Actor that the Mesh is part of
Which will rotate the MeshComponent too
right yeah - but the UI/UX doesn't really show that layer, so to speak
Ehh, maybe
hehe
If something is in the level, it's an Actor. That's basically a given.
The node in the BP that sets the Rotation is also based on Actor.
So you can read that it's doing that
I suppose its the BP paradigm that made me assume a certain structure (BPs wrapping around components), whereas there is another way to access the actor aspect (so to speak)
anyways, that clarifies it ๐
it's also somewhat strange that something BP related, isn't typed/defined inside the BP editor interface, but only in the properties panel once dropped in the map hehe
but I guess that's the nature of instancing, UX wise
Very common though if you want to reference things that are placed into the level
E.g. a generic Button that can be used to tell another actor to do something
The button would also have such a variable
And you#d select a door, window, gate, etc. in the scene in the dropdown
But that laso goes for other variables, not only for references.
A Gate can have a boolean exposed like that, so you can set one to open and another to closed
well, that clarifies a few things in advance that I likely would have gotten confused by very soon in the future haha
:P
There is a stream pinned to this channel, 2 hours long, called Blueprint Communication
It should talk about that stuff
It's a bit older, but these are fundamentals that never change
well, you clarified it faster than any 2hours video could do hehe
but yup, noted
interestingly, I suppose that one could sometimes want to be able to call more than one actor there, in order to not have the duplicate the BP as many times the effect is needed
so I guess that's the main limitation of doing things that way
Anyways, much thanks, that's all clarified ๐
You can expose an Array of Actors :P
well, for now I'll just move the logic inside the BP itself, that's just easier
but yeah, thanks again, that clarifies a bunch of things.
Hello I have an question. So I made this in a BP sword, I want it that the ThirdPersonCharacter will play the animation. In the Play Anim Montage it wants a target. but I don't know what I need to do there.
you need to reference your character for the target. I don't know what others would recommend but I personally would keep animation related blueprints either with my character or the animation blueprint
Okay
If its a child actor of your player character just use "get parent actor" then cast to your character class and get the reference
Or just use get player character > get mesh > get anim instance
But this will play the animation to the player even if the character holding the sword is an ai or whatever
Hey there good people, Not sure if this is the right channel but it is blueprint related..... SO my PC keeps Bluescreening when i used blueprint nodes in the editor. I don't know if i can simulate this crash on another program. I don't know why it is crashing, i'm starting to think it could be my motherboard, but i don't know if i am over reacting. Please help, why does my pc crash?
https://www.youtube.com/watch?v=zgd59GaUBXE Hey, how can I make this flashing effect be randomized, so it looks like the light is flickering/broken, rather than blinking in an on/off rhythm?
Here's node network for this so far ..
Hey all, I'm running in circles trying to solve something which seems fairly simple in principle. I'm trying to break down what was initially a single 'Move Component To' call into 2 movement calls, one for the 'sideways' movement, and one for the 'forward' movement, rather than the diagonal movement which occurs when these are done simultaneously.
I know that I just need to find the change in X and change in Y from the Start vector to the End vector, but getting those values relative to the actor forward and right is where I'm stuck.
@sand tartan if I need a vector to be made relative to an actor's rotation, I use the node "unrotate vector"
@trim matrix maybe better to ask in #graphics cuz I'm not sure. Maybe you can sample a noise-like curve asset or a noise texture or something. Or add up and clamp a bunch of off-phase/freq sinewaves. I don't think there's a true "random" node in the material graph and idk what the best approach to pseudo-randomness is, so either ask in graphics or wing it.
Thanks, that's a new node for me, I'll have a look into it and see what I can do
Hello, So I am trying to change parameter Alpha in blueprint during runtime. How can I accomplish that, I've already set Is Variable to true but cannot find a method a method that changes alpha parameter
Thanks man, will ask there then -)
then make sure you hook whatever widget you are trying to adjust into the target there
How to deal with this?
you can only use it on widgets, what variable type is "ones"?
Text that I've added in Designer. I want to change alpha (transparency) of it through blueprint
Thank you all! it works
managed to get it working using that, thanks a lot!
Can someone tell me the difference between Steam advanced sessions and steamcore I searched on the internet but couldn't really find something.
Welp, decided to go this route this morning....
Rewrote the system and it works fine now. >.> ?????? LOL
you missed a step along the way
you can do this also
assuming you didnt leave the server >.>
I think I might know what I messed up/missed, by doing it again.
just make sure you hit that save button
Hello, could someone show me some light. I set in the player BP a reference to find the closest "A " BP actor. Now I need to reference a variable in this "closest reference" in the BP "B ". How can I do this? Referencing my first attempt to ask this question to make sure I'm explaning myself the best I can.
@runic plinth do a reverse set
when you actor spawns, get them to find the player bp cast to it and set themselves
Going over it thank you. I guess something like this?
Hiho im still working at my SaveGame System. My problem is the Character Logout Location is still working but the Character Level, Current EXP, SkillPoints, Coins will not be Loaded maybe they will not be saved i dont know.
This is the Save
I have watched a lot of Videos about that problem and there the are loading all saved variales with this little loadgame
I thought i have to call every variable like at the top screen with changed in and outputs, dont I?
It would be nice if someone have some experience with that kind of Code ^^
If the location is working, then your level save should be working. What does your loading look like?
yup
Hii, im trying to make a stamp mechanic where i place the stamp on the paper and a decal saying verified spawns on the paper at the same location where stamp hits like irl but idk how to do i tried setworld location for decals or spawn decal at location and got the location of the stamp at the OnCcomponentBeginOverlap of the paper but i still cant find a way of doing it can anyone help me ty :)
What a terrible way to save! I highly recommend you save a struct instead of individual variables unless you feel like making multicolored pasta.
Also, where is your save data node? You load it but I don't see you saving into it.
Yeah, now that I think of it, Iโd prob be better off just running it thru a custom event in the animBP since that retains a var.
No I mean you can literally have a blueprint specifically for your animnotify
https://gyazo.com/96b0e2c852773d7ee6d01351a85fe23b
At the beginning I tried to save everything in a database but it didn't work for me. I have a SaveGame file and in this I save it in variables. Currently this is the only way I can manage ^^
lemme rephrase: your struct can contain all your variables but have to be loaded once.
instead of dragging and dropping 10+ times each time per save event
Yes, but variables arenโt retained, only local vars are
On construction script executes twice, not once, anyone knows why
doing just this, I see 2 "Hello"
nevermind, my mistake.
I'm fairly sure its cheaper to convert to multiply decimalplace , to int, return to float and then divide on decimalplace again
yup it is but the person i replied to did not sound like a programming type
Fair enough. The node you showed is very helpfull for showing float values on screen aswell :)
Without loosing the relative precision
hi I have 2 basic questions
im new to blueprints
when I run the exe I cant see the custon in the main menu
and I have enabled when pressing esc to bring up the main menu, but the game ends. Does anyone have an idea of what might be wrong ?
are you using PIE?
pie?
Play in Editor
did you save everything?
did you try to use another key to test it?
have you bind somewhere else the esc key to close the game?
yes pressing m works
I have saved everything and with esc key not for other task
As you can see in the image this is a level stream
and Im changing between 2 levels
when I want out, supposetly by pressing esc key should bring up the main menu
but it doesnt, it quits
I dont know
try the same without 'Set Game Paused'
If it's still the same behavior, try disconnecting everything and just calling a print node
If it prints, then some node is causing an issue, if it dosen't the issue lies elsewhere
How can i call get schiene from the other blueprint
Good time of day. How can I get an event when I am changing variable which is editable and expose on spawn, while I am playing in editor?
use WinKey+Shift+S to take screenshots.
Quite a few people in here are students. They don't have access to Discord on their workstations.
how are you changing that variable?
are you changing it from detail panel or with blueprint?
@worthy tendon From detail panel, when playing in editor.
Anyone an idea why the second line trace often spits out false for a hit?
First trace is from crosshair world position to an end point, and second trace is from the weapon barrel socket towards the first trace's impact point.
I am not moving my mouse a bit and yet the second trace often fails to register. How can that be?
Edit: The first trace 100% hits every time (not visible in screen shot)
Whenever the "false" appears, I can still clearly see the green one is going through the object, so there is no reason not to hit it
add a custom event and enable Call In Editor
@worthy tendon ok. I know about this. What about real time change settings without event tick?
there is no event tick
@worthy tendonAnd thank you for trying to help.
then you have to manually select this button
Understood.
@worthy tendon Unfortunately no, but for first time the update custom event will work fine. I thought that there is and option, when you changing the value it can call the event
Coming from Tick. How taxing on the performance is the work around above for my lack of knowledge?
You realize that you're checking all actors in the game. If they're a type, bind an event to them. Then getting all actors in the game again, if they're of a certain type bind a different event to them. And you're doing this once for every frame drawn to the screen. Which can mean up to 200 times per second.
At the very least, you should do GetAllActorsOfClass once, and then iterate over that return array with a for loop to check the tag. You'll be iterating over less actors that way.
I don't think there is other way than tick if you want to do it in blueprint.
You should also move that to somewhere that can be called easily if you ever need to update your portals, or just do it on beginplay.
@worthy tendonThank you. Have a good time
Thanks for the feedback. Portals are to be changed during runtime to somewhat simulate a procedural level. Could you explain better what you mean by iterate over that to return array?
Your portals are all the same actor, just distinguished by the Tag on them, right?
Sorry. Same Class, not same Actor.
At the moment yes that's my approach. I tried a spawn/destroy but was ending up with a mess of vector variables so I chose to place the actors on the map and manipulate them.
Maybe with an Actor has Tag condition node?
If you want to be thoroughly optimal. It would be best to have an array somewhere that is easily accessible. GameState is possibly a good choice. Just an array of pointers to your actors. At their Beginplay, have them GetGameState, CastToCorrectGameStateType, AddUnique into this array of portals.
@runic plinth could you explain what you are trying to achieve? From what I understand, you have bunch of portals, some of them exit point and some entry. And you are trying to keep track of enter and exit count?
What class is your above screenshot in?
Something like this?
It's kinda long but trying to make it short, I need the game to ask if the teleport will teleport the player or not. To control a linear go down level, I thought about an integer system, so if player goes through teleport A +1, if it goes back to teleport A -1. This way if the player decides to circle b ack the level is the same.
I am doing that in the level BP
I see. And what do you mean by Kill 0 (blue) and Kill 0 (red)?
when it reaches the maximum of teleports allowed ( Y ) kill either end
How can I access the variable inside this reference? Being that Closest Portal comes from a second BP class
Let me explain better sorry. The Closest Portal variable is set like this
It is now a reference in the player character BP. I need to get a variable from Portal BP while "filtered" from the Closest Portal reference
Like this
Referencing my first attempt to ask this question to make sure I'm explaning myself the best I can.
Annoying discord took so long to set this zzzz sorry
Below that question someone here tried to help. Hope with this you can better understand.
That's confusing ๐
Oh I think I get what your saying. But that Cast comes from Tick. Thanks for the right click to convert it to Pure though that's new for me.
Another edge case is if the node has a stale value. It will only ever execute once per invocation.
Being called on Tick doesn't address either pitfall
If you
, I did a vid on how that all works which has had mixed reception
Thank you. Although I still need to draw a reference variable from that reference variable.
I dont understand why you are trying to do bindings in tick
If you scroll up there's a short story about that which you participated in it sorry ๐
This?
yeah but I changed them to BeginPlay though
What do portals do? (I'm just trying to understand your problem to come up with better solution)
This might get long, should I pm you?
Go ahead.
both methods seam to work, but i dont wanna get screwed later down the road
I have this error and im about to send the code, im confused
There is the code, it is in the level blueprint
Can someone point out why this is None?
It's a SoftRef contaning a level. It returns none only if it already opened another level. i.e. if I go from level A to B, it works for B but when going from B to A it gets nulled out. Even though, it is just a SoftReference that should be created on the flight. Right? Not sure if Im missing something about them :/
but Im not loading anything in there. Im just returning a reference from it
that should return TSoftObjectPtr<UWorld> but in that sceneario returns None
maybe when you go from B to A, the level is unloaded and soft ref must be loaded again.
Check your game mode
what should i look for in it
player controller, but also check the type of your game mode.
Nothing is in the game mode for my menu. Its also a game mode not a gamemode base
oddly enough it works fine as a separated process but not in PIE
Should I redo it as Game Mode Base or leave it as Game Mode, for the blueprint actor
class
Inherit from GameModeBase. but I don't know about GameMode. it might be needed for multiplayer (I have no experience with it)
Yeah i was doing multiplayer so i did game mode but i didnt know i needed game mode base, ill try using game mode base instead of game mode
No, like I said, I don't know about GameMode. use it if you have to.
Sooo, the compile button has disappeared. Is this a bug or did I do something to hide it?
which folders can be deleted in a project and yet keep enough info for safe transfer?
I am having some code run for day and night cycle. But using lerps and timelines when switching between levels the code just resets and the progress is lost. Is anyway for code to never stop running or not reset bewteen maps? I though of the game instance but not really sure.
Yes, you could store your "current game time" in your game instance and on level loads, read the value from there.
I mean I have a timeline and while running on the level it has some progress. When switching the level this timeline I guess gets reset and then it messes the code
Trying to use AI Move to, I have a nav mesh, but the character just wont move at all. Any ideas what I can check?
Does it have an ai controller? Use the base topdown game and see that code for ref
I migrated the third person shooter
and reused the character
I imagine it has something setup to get only player input and not AI stuff
thats my guess
The EditorUItilityAssetAction Blueprint... is it possible for me to do something for an entire folder? including sub-folders?
ty
Would any of you guys know how to do a swap weapon on overlap, making it so you only have 1 weapon at a time
This is what I got and keep getting an error and dont know what I'm doing wrong for such an easy system
I'm really tired and mentally fried but first off you are destroying the same actor twice and I'm not sure you can spawn actors from an actor that you've called destroy on
You also seem to be in some kind of loop
Nvm you aren't spawning in a destroyed actor
You are destroying the same actor twice. Remove the first one
secondly, There's no mesh to attach to the component because you just destroyed it
@fiery swallow @meager spade Thanks both ๐
How to stop third person model casting shadows to first person hand models when tp is owner no see.
@autumn plover Set HiddenShadow to false.
Then set it false locally. It's not replicated.
It's a little odd to disable the third person shadow though. Even for first person. You'll be a pair of floating arms. O.o
yes, but its casting shawdows to arms
its kind of annoying
third person models are basically casting shadows to the firstperson arms even though the third person model is set to owner no see.
i like the shadows it cast on the ground... just don't like it being casted to the first person arms.
:no_entry_sign: Jรณzsef Csurgai [EB]#4756 was banned.
Hey everyone, i have a widget inside of blueprint and im trying to create a variable in blueprint that would set a text that widget displays, here's where ive got so far, but it does not work( Any tips? On the first screenshot is blueprint construction nodes trying to set var inside of widget
Here's widget nodes
Text is binded to input var
Odd question, Im doing a tile based game with AI and I wont be able to use a Nav Mesh. Is there a way I would still be able to get enemies to follow the players to attack?
Not using built-in movement logic, but you can always implement your own system.
Everyone pirvet, can someone tell me how to call the blueprint class Camera Shake, I'm using the UE version 4.26.2.
hi, i wanna create a free roaming car game whats the best tutorial any suggestions
Udemy - Pro Unreal Engine Game Coding I can advise you to do this for a start, but this is C ++
The racing game sample from the laucher's Learn tab.
Why would the developers of Unreal Engine remove all the necessary features?
Like what?
In the post above, I fixed the screenshots, what the developers deleted, but in those. There are functions in the documentation, but they cannot be called, because you cannot call a specific Camera Shake class.
The developers of Unreal Engine removed, but did not come up with a replacement.
Maybe somehow you can write a blueprint class, if you know what functions should be included in the Camera Shake class
Hi, guys!
Does anybody can recommend some Game Architecture guides for ue4?
I am starting make a game and want to make it in the right way.
Hello, there are no such lessons, everywhere you take a little from free resources and by typing only, you can only familiarize yourself with technical documentation, but not take it as a basis, now I just wrote in a post above that those. the documentation does not match all functions.
Yop, documentation isn' always up-to-date. Your best bet is to learn the Game Framework first, so the classes that make up the core of the Engine's gameplay framework (e.g. GameMode, GameState, PlayerController, Pawn, Character).
Once you truely know what they are for and which one to use in what scenario, you are already quite far. Everything else is learning by doing and googling, as well as your own code.
This is what helped me to understand, thank you for the last time you suggested how the classes work.
Hey everyone,
I'm trying to create an quadruped animal character. However, I'm having trouble settting up the collisions. I read that the capsule component has to be there. Am I supposed to add collision components for the legs one by one and attach them to the bone sockets?
@dire atlas https://www.youtube.com/watch?v=1I2IYbZVLok
This might help you with the camera shake
I think they only renamed some stuff
Basically, as far as I can see, you just need to use the Matinee one and then it should start looking familiar again
Not for my mind this C ++, I programmed using tutorials, but without a specific teacher on programming games in C ++, I can't do it at all, I just can't try, my hands dropped, I don't know how to master this C ++ myself at home , for me this is unrealistic.
Not sure why you tell me this
You asked for the CameraShake stuff
Everyone pirvet, can someone tell me how to call the blueprint class Camera Shake, I'm using the UE version 4.26.2.
That's all I answered
If you open the video and watch the first few minutes, the person explains what class to use for the CameraShake BP
Matinee Camera Shake does not call Play Camera Shake, I tried to call it from the parent class, this function simply does not exist.
That's literally what the project i'm using is doing though
Make a CameraShape BP from MatineeCameraShake and use the exiting PlayCameraShake functions to play them
This works just fine
BP_CameraShake is a child of the Matinee one
Functions should be called from Get Player Camera Manager.
This is what is called, but these are not the functions that are needed.
Although similar, I'll see how it works. Thank you.
It works, you need to download the old engine and the new one in order to compare and it will be easier to navigate the renamed functions.
But the functions were never on the CameraManager?
They were always on the PlayerController
And that is still the case
Maybe not idk
But I can't see the issue atm
Can anyone give me pointers on how to access a socket on a rifle scope that is blueprinted and attached mesh to it? Weaponclass spawned, childactor spawned (scope) and attached to weapon. Need to access a socket on the scope mesh for ADS camera
I can Get access to the scope blueprint via char reference but not the mesh that the socket is attached to
Camera Manager is the parent class from which Camera Shake functions are called
Why not?
if you spawn the Weapon and save the ref, and that has a ChildComponent, which has the Scope Instance in it, then you should be able to interact with that
I thought also that this should be no issues but socket transform clearly gives back parent transform so it is not correct.
Could be a ChildComponent thing?
So im doing wall run and i can't jump from one wall to another more than 3 times. I think its because of the max jump apex attempt thing being on 4 but idk. can anyone help?
Been looking at the easy ballistics plugin and was wondering has anyone been able to get a alternate fire mode or different ammo to work?
If you are actually using JUMP, then it might be limited by the max amount of allowed jumps
If this is singleplayer, then you can just use LaunchCharacter with the velocity you need (might even be better, given that Jump is only upwards)
start by studying materials for Russian speakers https://www.youtube.com/c/Unreal-engine4Ru/playlists and English-Russian tutorials https://www.udemy.com/courses/search/?src=ukw&q = Unreal + Engine + 4
yea im using the jump input thing
so how can i change it
yea i used launch character
Hi, guys!
What is the best tool for planning and drawing all architecture of your project? for example - For example connections between actors or event dispatchers or variable and etc.
Thank you very much for personal suggestions!!!)
But I'm talking exactly about architecture patterns, not about the tutorial materials)
For example MVC or EC ๐