#blueprint
1 messages · Page 142 of 1
Hey folks
Anyone have tips on how to edit variables in BP's at scale?
I have a bunch of enemies (around 50), and I need to edit max shield, max health, movement speed, damage, etc. on these in order to balance the game.
Can I do it from a table somehow? They all are children of the same parent.
Ideally could do it from a Google sheet and import it, but just a quicker way to go about it in editor could be highly helpful too.
you mean you're referencing them in an array variable?
Right now I open up each BP individually. Very time consuming.
wait huh?
Select them all in the content browser and then right click, there is an option for bulk property matrix. It's great for this type of thing.
ah you have different types of enemies that is a child of a main blueprint?
I'm not talking about run-time.
Correct
then you could try what pattym said
Seems promising. Can't seem to input a different value though?
Am I doing something wrong?
I believe there's two tabs, one of them should allow you to edit them.
Hmm. Don't see another tab. I see the variable in these two places. Can't edit any of them though.
Will do some Googling.
Top right, the details tab.
Thank you. That works. 🙂
so how do I fix the mouse value problem?
not even mouse delta node helps
its like its following the cursor when it loops to the other side of the window border
so whats the issue, is it not going smoothly ?
a bigger jump will move fast for sure
maybe your axis are not setup the way your wanting if the numbers are not what your looking for
its when I suddenly stop the mouse moving and immediately move it to the other direction super quickly
there's a chance the mouse value would bug out and break the momentum of the camera
well if you interp on tick, no matter what you set it to it should be smooth
and it needs like a split of a second to catch back up
it does it without interp to also
I looked up like a mad man online to see if anyone found the fix
one said they needed to disable "Use Fixed Framerate"
that one's already disabled for me
other one found the solution to use "Set Input To Game Only"
that one did not worked for me
Lovely random fix suggestions :D
Have you tried turning it off and on again?
In theory, this might be related to #enhanced-input-system I guess?
actually I'm curious
what if I use the Event Tick instead of the enhanced input node to update the mouse values?
lets see...
i have no idea what kind of issue this is so im going to post it here. When i launch my project (which starts at a main menu, before level streaming) the main menu works fine, but when i click through to start, I get this error. If i press continue, it continues to this error which i cant continue past. I have tried manually looking for those files, they do not seem to exist. This was not a problem until yesterday
In theory, the EnhancedInput nodes also tick
The place to put my savegame data between loading a savegame in the menu and processing it in game is in the game instance, right?
for the mouse only when you move it
Right, cause it calls the Trigger pin only then
In theory, yes
really curious if this fixes the issue....
They are UE pdb files which you'd need to look at the callstack. Why are you looking at thist to begin with?
Do you have a callstack/crash error?
to be fair, that's not really EnhnacedInput anymore
it crashes when i run it
And what error etc. does it show you?
nope, nothing....
that is the error it shows, the unreal editor pdb not loaded
That has nothing to do with your game crashing
That is VS that requires PDB files to show the callstack properly
When your game crashes, you should get a crash reporter will a log etc.
And the game log should also hold information at the end
Can be found in Saved/Logs
I think the last option would be to somehow get the cursor's location on screen, get its velocity and use that one to set the mouse values
That is a really shitty idea :D
I don't want the players to encounter a mouse freeze when they try to spin the camera quickly
Why do you even need all those modifiers on your mouse inputaction
I have none on mine and I have no issue
was hoping for those to stabilize it
Also not sure I ever encountered any problems with going back and forth quickly
Did you try and reproduce this in a fresh project or at least on a fresh character?
No, the bottom of the file should have information
wait maybe it's that class that's null?
@trim matrix The bottom of the file should have the issue. Please follow instructions when people try to help. If you can't find it, share the whole log file.
huh
i will share the whole file, and the backup, sorry
I took down smooth and scale by delta time modifiers, and now the mouse value works fine? 🤔
i was in fact looking at the backup, my b
I'm so confused....
the interp will do the "smoothing"
the values don't flip back and forth when I quickly move the mouse to the opposite
funny thing is I had this issue before those modifiers were even added
and now suddenly its gone....
Triggered is call on most ticks. A bug I have is down to it sometimes skipping several ticks lol.
I think this may be the issue....
I had not a single thought that it may cause me trouble
I think what I need to do here to fix it is by checking if the mouse is being moved
tonight is beautiful isn't it 🙂
You seem to be hitting some ensure in LevelStreaming.cpp
It sadly doesn't say what exactly it tries to ensure
Given it just fails on "false" I assume the code around it would tell more
[2024.04.16-17.57.46:712][999]LogOutputDevice: Error: Ensure condition failed: false [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelStreaming.cpp] [Line: 1017]
It doesn't seem like this actually crashed anything though
Thanks ❤️
good....
Does anyone know how can I "lock" axis for the Camera rotation please ?
huh, i can send you that file, it was written by a teammate, not me so i dont really know how it works
What exact camera rotation are we talking about
For example : I don't want that the camera can rotate on the X axis (roll)
That file is from UE
A TPS Camera (FollowCamera)
nvm then i do not know what im doing
Is there a "go to" method for how to know if a level has finished loading when using Open Level?
In the level BP I believe there's on level loaded type event.
What would the most secure way be to check for a ledge the player can grab on static meshes?
Right now I'm doing two sphere casts (one a bit above and one at should height, when the top one is false and the bottom one true, I attach to the ledge) , but if the player falls to fast (and not really that fast to be honest), the casts will not hit anything and the player won't grab the ledge but miss it and keep falling.
I need it to be more consistent and I thought spherecast would be the best option, but it seems to not be. Any other suggestions how I could make this safer so I don't miss the ledge?
ugh i dont have access to drive D because im doing this on university computers
Depends on the overall mechanic you're going for. Pre marking them with a component is an option then you can just do a sphere trace to find all nearby ones and get the most applicable one.
This of course isn't very dynamic.
Yeah. I would prefer to make it more dynamic than manually adding points. But worst case I would do that since it's important that it is consistent.
found it in a roundabout way, its on line 1097 that the break is happening
As stupid as this might sound, but I would advice not to share full engine files.
They never really enforced this, but it's not really allowed to share more than specific amount of lines :P
If you just share the part around that line number from your ensure, it would probably be enough
cool thanks for the advice, this is the line its throwing issues at default: ensureMsgf(false, TEXT("Unexpected state in ULevelStreaming::UpdateStreamingState for '%s'. CurrentState='%s' TargetState='%s'"), *GetPathName(), ::EnumToString(CurrentState), ::EnumToString(TargetState)); }
30 or so lines wasnt it ?
what sort of camera is this ? are you rotating the camera with mouse ? is it a seperate camera ?
runtime ?
or you mean in editor
Hey everyone, What should be my Settings for Streaming very big levels without stuttering ? The levels are far off so I don't think there would be a time where the level won't be loaded before the player arrives to it. I don't understand if I should have big values or Small ones
Runtime. It is TPS Camera like in the ThirdPerson template of UE5
set it on tick
set the rotation to the current rotation, but in the one you want to constrain just set it to a value
So I force the "X (roll)" to "0" on Event Tick ? (Set World Rotation) ?
ya, set the new rotation to the current values except roll, just set that to a value
Ok great I'll do that thank you very much !
Now do you know how can I place an actor in the center of the screen ?
Like in the World but center of screen
shoot a line trace out of the camera from the camera position, to camera position + forwardvector * distance
I mean in the center of the camera as well
use that point maybe to place the actor
or just do the maths, you don't need a trace
but in theory if you shoot out from the camera, forward vector * distance
should be in the center of the screen
and you can just lock it on tick
Because I already "spawn" that actor between two vectors, but I also want this same actor between two vectors + in the center of the camera
Do you think it's possible ?
idk
I think I will just try to set this actor in the middle of the camera first and then I'll see what is happening
So the center of my Camera is : "Camera Position" + "Forward Vector" * Distance ?
My pawn no longer breaks through walls 👌
well it depends i thought you just wanted something like attached to it, if your trying to just look at then it'll be different
This actor is attached to my Character
I just want it to be always in the center of my Camera even if I rotate / zoom out my Camera
then ya that'll work on tick
it'll put it in the front of the camera at whatever distance you multiply the forward vector by
just mess with the distance untill you get it right, and then no matter where your looking you should see it in the center
I want it to be in the center of my Camera but always in front of my Character
^
So the "Distance" is the thing to make it in front of my Character, right ?
so think of this way, your putting something where the camera is
getting the camera forward which is where your looking
and setting the location out in that direction a certain distance
you'll most likely have to mess with the scale and rotation
But to have it in the center of my Camera but in front of my Character I have to : "Camera Position" + "Character Forward Vector" * Distance
Or am I completely wrong ?
set the distance so that it doesn't go behind the character
the distance is from the camera out
do you have zoom ?
No I don't have zoom
so then it should just be a constant value
That's why I have to find the "intersection" between my Camera and my Character and set it there
you can do lookat rotation, and get forward vector of that
lookat rotation to character maybe that might work
So I "Find Look at Rotation" from Camera to Character ?
so your basically putting it at the camera, then looking at the character, and projecting forward a certain distance
it's worth a shot
then forward of that
But the "Find look at rotation" output is a Rotator
How will I set a location with that ?
Oh with the "Get Forward Vector" ?
It places the actor at "0, 0, 0"
In fact, I want that the Camera Rotate on the "Z" axis to make this "Actor" always in the center of the screen (Camera)
@odd kiln
you should cas on begin play and use the player ref but i just threw this together
this is on the actual actor tick
and you just set the distance with the multiply node
since your never zooming you should be all set
if you were to zoom you would need some maths
Ok so this is for setting the Actor in the center of the Camera and push it by a Distance (*200) right ?
setting it in the location of the camera, getting the lookat toward the character, multiplying the forward vector of that with a distance, and placing it there
you got to add the beginning and end to get the position so theres an extra node
I'm facing another problem lol
I just use a basic "find look at rotation" to look at this "Actor" target but the Actor is still not in the center of the Camera I don't understand
you mean your setting your camera to that lookat rotation ?
and it's not centering the character ?
I use this
"Get Actor Location" (my Character) in the " Start" of "Find Look at Rotation"
well you wanted it to be where the character is right ? or you wanted the center of the camera ?
and in the "Target" I use the "Actor" I want to target
I want it the center of the camera
For example I have two Actors
A1 and A2
I want that the camera of A1 to look at A2 so that A2 will be in the center of the camera of A1
I want A2 to be in the center of the Camera Vertically and Horizontally
Like a "Lock" target
I thought a basic "Find Look at Rotation" will work with a " Set Control Rotation" but no..
That's what I did but I don't know why the "targeted" actor is not centered
show what it looks like
Can I send you via MP ?
it would be better in here, but ig if you want to
The black square is Actor1 and the red one is the Actor2
That's what I did but I don't know why
It's ok nvm
looks like your looking at actor1
My black square should be looking to my red square
Yes it's looking but I want the red square to be in the center of the camera
so set the camera to lookat it
if you have black looking at red
that works right ?
but you want the camera to lookat the red as well ?
And for that I have to rotate the camera (on the picture for example) to right on Z axis, right ?
Yes I want the camera to look at red not the actor itself
set camera rotation to lookat rotate from camera to red
So instead of "Get Actor Location" in the "Start" of "Find Look at Rotation"
I have to set the "Camera" ?
yep
Camera - Get World Location
then target the red square
and set the rotation
if you want it to lock on do it on tick
with a boolean to switch it on off
I already did it on tick
When I change the "Get Actor Location" to the "Camera Location"
My Camera rotates even more to the right, I don't know why
Oh wait
I guess it's because when I "Lock" the target (red square) I set a value in the "Camera" Z axis
So I have to subtract this value in the Find Look at Rotation ?
so your setting the z on tick when you lock on red, you set the z rotation ?
I set it before and I have to subtract this same value on tick
The only problem when I set the "Camera" instead of the "Get actor location" is that my Actor1 (black square) is not facing the red square anymore because it is the camera that is rotating and not the actor I guess
well i would assume you want to do both
set the actor rotation
and also set the camera the location
So I have to make one "Set Control Rotation" and then "Set Actor Rotation" ?
or both set rotation, but your doing two things
one rotating the character
two rotating the camera
so you need to do both things
Oh I can use the same node "Set Control Rotation" you think ?
But it will use the same target "Get Controller"
Or do I have to use "Set World Rotation" node for both ?
I'll try, thank you very much for your time !
hi everyone, where would you add the component that is responsible for the skill tree? Player Controller, Player Character or Player State?
player controller exists only on the server and the owning client, I don't know if I will need the variable values on other clients
replicated variables are set to (owner only)
spawning e.g. spells is done via the server anyway
or verifying whether a given player can pick up a weapon or whether he has enough strength is also done via the server, so I think the player's controller will be fine
PlayerState for multiplayer on account that you can easily maintain the value if a player disconnects suddenly and can rejoin, and I think it makes it easier if you're doing a server travel. PlayerController can work too, but the values aren't saved the same way as PlayerState in these situations.
PlayerCharacter can make sense if you want to be able to replicate to everyone, but only those nearby need to get access to it, but makes less sense if you're going to be destroying/respawning the character as then you have to re-initialize the component.
player state will actually be the most appropriate
Hello 😄
I have a concept that I want to implement, but I believe I am doing this very inefficient. So I would like to hear your thoughts 🙂
I am developing a tactical strategy RPG
The concept is as follows: The Units' attacks change based on equipment. Every Unit can change it's own equipment when their turn has started (except AI controlled ones). The equipment and the combination of equipment determine which attacks can be used. The equipment can only be of the 4 different elements Fire Water Wind and Earth. Only 3 things can be equipped at once. The things I need to know are:
How can I save what is currently equipped on each Unit efficiently?
How can I change the attacks based on equipped elements efficiently?
and
How can I make this easy configurable?
A small example: The things equipped on the Unit named "James" are 1x Water element, 1xFire Element and another 1x Fire Element. So his abilities are the attacks... let's say "Watergun" as the 1xWater ability, "Fireball" as the 1xFire ability and "Flamethrow" as the combination of the 2 Fire Elements, and lastly the two attacks "Steamball" and "Boiling Water" that are born from the combination 1xFire/1xWater and 2xFire/1xWater
I vote GAS, DataAssets, and some sort of inventory, personally.
is there any way to unload asset that was async loaded?
"Equip Item" > Loop through equipped Items > Determine count of all elements equipped > Loop through list of abilities check if the number of elements required are present > Remove any currently granted abilities that do not meet the equipment requirements > Grant any abilities that now have their requirements met and aren't currently granted
Remove hard references to it. Garbage collection will do the rest.
So the function process the DT and then it will be unloaded?
Eventually, yes. GC can take up to a minute, sometimes more to run. The general basics of garbage collection are that an object will stay loaded if it is hard referenced in a class property. So unless you have populated a non local pointer to it, it will get tossed eventually.
okay. ty 🙂
So the same with level instance loading, if i pass soft object reference its better to load it by async load rather then level instance loader?
level instance loading is laggy in my case
No personal experience with that yet. But some people say to mess with your level instance project settings.
I´m so happy right now.
Finally figured out how to control all my 300+ skeletal meshes with ONE master.
SO frigging easy and so much more performant than what I had messed around with before using a custom repeater event iterating through all and updating the play position etc...
I gotta learn to think more in terms of "How would you phrase your question if you were doing this for a game and not for linear content production like TV or movies".
Found it via instructions on how to make customisable character where you´d have to exchange parts of the mesh like clothes or armor.
None of the keywords I was looking for yielded the results I was looking for and I looked for 3 days straight...
Next: Figuring out how I can animate morph targets on top of that, that are only available in SOME of the skeletal meshes using the lead component.
Because if I just use an animation blueprint to set up the morph targets and try to add that BP anim instance, I get a "trash_" red track.
Does anyone feel like helping me understand and how to set up an RPC?
Ive tried watching some videos and reading the documentation on Epic's site, but it's proving to be more of a sticking point than I thought
Make a custom event, change it's Replicates setting.
I did that. I switched the replicates setting to "run on owning Clint" and nothing happened.
are the combos always the same?
Which actor class is this RPC on? And What type is it?
is 2x fire 1x water always Boiling Water?
If that's the case, the amount of elements are more like stats, and the moves have stat requirements
4 ints per unit should suffice
probably 4 bytes actually, but that's just getting silly unless you want to have thousands of units around
so I have a spaceship and I want to add force for a thruster. It works when just using a pawn but I'm transfering what I have to a character class instead. When I add a impulse or set physics linear velocity nothing happens in character class? I'm assuming CMC is preventing it. How can I do this?
What's the Proper way, to implement a widget is In the world ( so not specific to any player ) that is attached to a static actor ( that is replicated, and again not a player) that binds to a variable on that actor. and has buttons in the widget that can be clicked by any player to activate some functionality on the server that will update the variable and all widgets will display through the binding the new value,
For simplicity sake, a Count widget, with - Amount + where the Amount is the binding set to get the variable from the reference to the actor, and the buttons - and + can increment or decrement the replicated variabble on the replicated actor.
Is this not possible?
So I'm currently facing a problem in unreal where my shooting controls lag when I load in from one level to another, but starting in the level with teh shooting it works perfectly, what reasons could there be for it?
does this sound like a gamemode problem or a BP problem?
Yes, it's possible. Widgets themselves don't replicate though. Any inputs the player makes would need to be RPC'd through a player owned actor/component, so pressing the + or - button would need to trigger something on say the player controller that is clicking the button passing through a reference to the actor containing the widget. When running on the server, you'd have to use the actor reference to then adjust the variable as needed on that actor which should be a replicated value. The widget then just needs to be set up to read the value in some way, either VIA a binding or forcing an update through the OnRep that adjusts the displayed value on the widget attached to the actor.
Any ideas on how to get this event from away from using a tick? as the event keeps playing on repeat and stacking up the UI
Here's an example.
BP_WidgetHolder holds the world based widget and has events for updating and an OnRep function for the changing value. This actor is marked as replicated.
WBP_InteractionWidget is the widget used as the world widget. Has a couple of buttons and a value. I use the "Hovered" event as I'm not great with interaction widgets myself, but it got the job done.
BP_FirstPersonCharacter contains the RPC to the server to request the update to the widget holder, and also contains the actual widget interaction component. I have mine to just use the "center screen" for ease.
Video showing it working replicated.
I'm currently experiencing an issue. I have a Weapon Blueprint (with some cpp code attached), which I successfully loaded into my world a while ago and it works fine. I tried to load another one in today, however, this new one, when testing, causes my screen to lag, sends my player back to the spawn point, and the new weapon disappears (leaving just the old working weapon). Even though they are the same type and the first one works fine. Any help as to why this would happen or howto avoid this?
When you are actually changing health, you can do a check at that point if it is <= 0 and do the rest of your death stuff. Basically, put this stuff into a function (or seperate event if you want delays...) and call that function when you adjust your health value.
I need help finding a different solution without the need of the timer, its screwing me over
Sorry I'm not following
Does anyone know why moving diagonally and stopping would decelerate faster than normal up/down/left/right?
Currently you're checking if the thing is dead on tick.
You want to check if the thing is dead when you're adjusting the health value (like when you've dealt damage to it).
Change your IMC so your IA_Shoot is using a "Pulse" trigger.
Then connect your logic up to "Triggered"
Ah I understand you, but I'm not sure what I'd replace the tick with
Create your own event, name it something like "Death Logic" and plug in your logic you have shown in your previous screenshot, then call it immediately after wherever it is you change your health value when the actor is being damaged. The event then that drives the check is whatever is causing the damage to your actor.
So it would end up playing out:
Actor Gets Damaged > Health is Reduced > Death Logic
Input Mapping Context
When you say actor gets damaged, would I call the death logic event from the actor that is dealing the damage?
still a bit wonky
maybe because my player loads into the main menu level
No. Damage can be applied by a separate actor, but the actor receiving the damage should be the one managing how it receives it and adjusts its own health.
Hows that?
I think because of this my timer goes weird on me
You want the death logic after setting your health value.
If you have a trigger set up, you wouldn't need a timer at all.
I dont rapidfire anymore with the timer gone
Check your settings on the trigger. Make sure you've connected your logic to "Triggered" in the Input Action event.
oh huh, the lag between stopping shooting and start shooting is still there
Perfect thanks a lot dude! 🙂
like I can tell it works, but it still is weird, like when I stop shooting if I press the mouse button again I should immediatley fire, I cant seem to do so still like I'm litteraly holding my mouse down, letting go for half a second, and the holding down again but the game still isnt following that
weird right?
think it was the game mode thing I mentioned?
really stupid question, how am i supposed to connect the and bool and the sequence?
have all 4 executions enter a branch
but why is game state in your UI?
wdym
is there an easy way to make ai jump from point a to point b? I'm using nav links but they're a huge mess around
or maybe make it so that AI mimic the players movement but only mimic it in the position the player used it
I'm trying to create a platformer where the player is being constantly chased
Hi, just a quick question. Has anyone had issues building their game, but UE builds an older version of it? Currently experiencing some issues with that, and if anyone has some solutions that'd be very much appreciated
Just rechecked and these were the only warnings given to us
How do you stop widgets from running logic? i figured collapsing it would stop the events from being fired but Im noticing the widget is still running code in the background
i tried remove from parent and the logic still runs , set enable false also doesnt seem to work.
If I start an async action on ObectA, then I destroy ObjectA. Will that async action continue to run?
Should I be ending my async actions as part of Event Destruct on ObjectA, or is that automatic?
This sounds good, I will try that!
Exactly. Even if there is more fire or water, Boiling water will always be there until the Unit has less than 2xFire 1xWater, which is the requirement for Boiling Water
A list of abilities or moves with their element requirements will suffice then
all a unit will need to know to be able to figure out what moves they can use is just their 4 element counts
Yes, that is true. I will try that out once I am on my desktop again. Thank you @faint pasture and @dawn gazelle . Big help here for a beginner
I'm trying to create a possession system. The issue I'm facing right now is that whenever I hit the possess key, it feels like it executes the code multiple times on just a single press and then eventually starts working
Hey, i have an ai that chases the player, yet it keeps stopping at random times, and then doesn't start again, even when player moves right in front of them. Any way to fix this?
Press ' while playing to open the AI debug menu
Same glitching happening with my camera switch BP and door opening/closing BP
Is there a way to set a context object for a UObject so I can call static functions that require one?
thanks
so ive discovered something a little strange when i load a level it seems to load all its instances into the current level rather than just switching levels im sure this is a common mistake would love a pointer
By the way. I got it working with the saving of the key inputs. (Which I asked like last week). Thanks for helping me! 🙂
What I did was to convert the axes values for X and Y to specific integers (1 - 4 corresponding to the cardianal directions, clockwise) and then use these values later for different parts. Maybe I can substitute the int with a byte, for optimization. But I will first need to sort some stuff out.
Anyway, thanks! ✌️😁
im useing an onclick and load level instance by name
how could I achieve spring arm socket offset to location along spline?
the current method I'm using doesn't bring the socket offset at the right place
but is close
Yes, in C++. You can look at GetPlayerCharacter for an example. You probably need to override GetWorld() as well.
Blueprint is a good starting point imo.
btw how to print at ue c++ 😭
i print but cant find anywhere in the console
for test
the output log
is it my vs22
UE_LOGFMT(LogTemp, Log, "My integer {0}.", MyInteger);
#include "Logging/StructuredLog.h"
i typed this thing
void AMyActor::BeginPlay()
{
Super::BeginPlay();
UE_LOG(LogTemp, Warning, TEXT("hello iauhwdiauhduiwhawd"));
}
at the cpp file
this too?
i want it to print in the output log
UE_LOG doesn't require it
do u use that include thing too
so where did that print to
the output log, if you have set the rest of your actor up correctly
Do you even have one of those actors placed in the scene?
And did you manage to compile to begin with?
I think I know what to do now....
just gotta position the origin of the spline in a better place
Previous reply touched on the correct thing, but yes, you need to override GetWorld() if you want to call static functions with an implicit WCO, such as GetPlayerCharacter(...) :)
Depending on your UObject that can take various forms. If it resides in another object (has an Outer), you can just get the world from that. Or you might need to give your object some pointer to a valid WCO that it can use to get the world.
Hey, is there a way to dynamically spawn nav links so that i don't have to place them all around the map?
Do you need it done at runtime or in-editor?
And under which circumstances might you want to spawn them? Do you already have some method of determining where to spawn them?
In our game we use a component created by someone here, which can be added to an actor blueprint which can then be spawned wherever.
Sadly I don't remember who to credit, but if you're fine with some C++ I could send the source files.
wow, that would be perfect
Here they are!
I believe it's more or less a pretty straightforward exposing of an already existing Unreal component, which just isn't BP exposed by default :)
thanks, huge help
No worries! Another piece of good karma for the person who wrote these originally :)
Any way to force a recompile of All the Blueprints?
I want to run a benchmark where I move the camera around.
Is there a good way to get frametimes recorded in such a way I can get it as csv, json or something?
I guess a super bruteforce way is to record the time delta each tick in an array and write it to the console when I'm done? 🤔
Json SaveJsonToFile or something like that might be what you want if you want clean files to look at
this code works, but I dont understand why 😅
by "works", I mean, the function UpdateOrdersPosition is running on tick, while CreateRandomOrder is being called every 1 second.
What I'm guessing happens, is that tick runs every tick (duh) and the first time it reaches "delay", it sets a timer. Then, every time it reaches the delay node, it exits the function if the timer still isnt finished. When the timer is finished, it finally continues. And next tick it resets the timer.
Did I get the gist of it?
You really shouldn't do that however. Use a timer
I think if you hover over the node it says something like this.
Perform a latent action with a delay (specified in seconds). Calling again while it is counting down will be ignored.
@thin panther @jagged thistle thanks guys
how can i stop sound in a widget is there any way ?
I was hesitant to use timers at first cause I really didn't like the idea of "by function name"
like, it's such a weak reference. you change your function's name and your code breaks without warning
Set Timer by Event
Absolutely, which is why by event exists :P
what if I... want to use a function?
are timers incompatible with inputs and outputs for some reason?
I dont see why it be the way it is, but it really do be that way
Pull back off the red square Delegate , and use Create Event
ooooh i see
alright, I'll have to look into events vs functions, cause atm I dont really understand why events are preferred over functions
ty
Possession is working on the character but when I create a child class from that character and put it into the scene the possession stops working and it throws me this error
Can anyone tell me what's the issue here ?
You can still use functions. The create event node will get you the red pin you need.
The short of it is that the timer stores a delegate. In bp, unless you use create event, then functions can't have a delegate.
The delegate must also have no inputs or outputs, you can get around this by wrapping it in an event that supplies the information to the desired function
Does anyone have any suggestions on how to load this soft references? It's a widget class but the function is passed an object ref which of course wouldn't be valid after I've called an event on the event graph to async load the widget class.
I know I could just store the input but I have a few other functions in a similar boat so looking for an option that could reduce storing the data if its not needed.
Im not sure exactly what you ask
And not sure why it would be worthy of a soft ref 😅
I don't what is happening. Sometimes it work and sometimes it doesn't and throws me that error.
And also the possess function is working but I'm only able to control just 1 character and that too a child. I'm not able to possess the other child character nor the parent character.
I sincerely request you guys to please point me in the right direction.
Because widgets can get pretty big. 🙃 Plus there's currently 3 different prompts and it could be easily be half an hour before any of them needs to be shown to the player. Seems daft having potentially 100's of MB loaded when it's not frequently needed.
Ouch, that's some biig widget right there
Well the completion must simply be an event and load async
I did say potentially lol.
Or load it pre Quest complete delegate, so you know its already loaded.
It's trigger through event dispatchers from the quest objects. So I'm not sure if that would be feasible. I could convert them into events instead of functions though and just handle it in the event graph. 🤔
OnNativeComplete()
{
LoadQuestPrompt();
]
OnPromptLoaded()
{
K2_UIShowQuestCompleted();
}
The issue is passing the data through that's needed with it being async.
do it through a lambda
?
or fetch the completed object later in time
void UInventoryComponent::GetOrLoadUseClass(int32 FoundIndex)
{
if (Inventory[FoundIndex].Item.ItemStatic.UsableClass.Get())
{
LoadAsyncComplete(FoundIndex);
}
else
{
UE_LOG(LogTemp, Warning, TEXT("Loading asset async"));
UAssetManager::GetStreamableManager().RequestAsyncLoad(Inventory[FoundIndex].Item.ItemStatic.UsableClass.ToSoftObjectPath(), [this, FoundIndex]
{
LoadAsyncComplete(FoundIndex);
});
}
}
Dont ask me about lambdas, I can barely make it work lol (but it does)
It's a BP only project so I don't think that would be an option lol.
hi guys how do i reduce this event tick performance issue
frameslicing
In class settings or class defaults, there should be a setting to change the tick interval, it seems like you want it to tick every 4 seconds, so set that setting to 4
I would like to chance the material expression constant 2 vector, so I could change these values ingame. Does anyone have an idea how I could change it from 1080 to something else?
Is there a way to render a camera in UI without a render target? Because it’s broken with lumen
How can I mass add static meshes into my data table?
I am interested in creating a database of all the customization parts for a car. My goal is to add all static meshes to the database quickly and categorize them based on keywords. For example, if the name of the static mesh includes "spoiler," it should be categorized as a spoiler. This process needs to be done on a large scale.
The database should include the relevant car, mesh, secondary mesh (for two-part customizations such as fender left and fender right), price, part type, and dependency.
I am open to different approaches to data tables, as long as they allow me to drag and drop 100+ static meshes into the database and categorize them accordingly.
would anyone have a youtube tutorial or smth like that for how to make a turn based rpg
ok ill try this
Don't, instead use a timer
Hey, can some one help me?
I want it so the player's speed gets set to a constant value for a couple of seconds, but every video online just shows me how to make a character controller.
like this? and after few seconds back to normaln value
You can't change a "Constant". As it's name implies, it's constant. You need a vector parameter. Either from a global Material Parameter Collection, or a specific vector parameter with a name that you can set on a dynamic material instance.
why casting is failed ?
I sent you a DM
i am starting a bow and arrow system from yt
i have a sword system already built and now i want add bow mechanics on top of it
how can i implement the switch of weapons and mechanism of thiers when pressed certain buttons (like if a press RMB and LMB while sword equipped i do light and heavy attacks but when Bow equip i need to to anim and launch of the arrown when pressed) how can i get this working.........
The thing that caused this damage event to fire did not pass the instigator through, or the instigator passed was not a controller of that type.
Sorry, I generally ignore DMs from public discords.
I am new to working with blueprints and don't really know how to do this, could you explain the steps a bit more?
.
are you wanting a parameter you change for different mesh or something ?
you can actually just change the numbers as well if you just need to change it for all
can you tell me how i can fix this ?
Its to make stretched screen, and being able to make it more stretched with a parameter or turn it off with the parameter
i am using this player controller
so you need a parameter, then you create a dynamic material, and assign that material, then you can set the parameters
sort of like a function, you can pass the variables in the instance
you can also just make instances and use them
so when you create an instance, you'll see in the details the parameters
start with a basic material, try to add a paremeter, then create an instance, and change it
once you have params, right click the material and you can create an instance
Thanks man ❤️ , just struggeling with how I can make this into a parameter cause its like a weird number
it's a 2d vector
a constant is just what you set it to
Btw it's multiplayer
i don't see a 2d vector param, so you may just need to use a vector unless there is one i just don't see it
Multiplayer doesn't matter. Damage events are only ran on the server machine anyhow. Show where you're applying damage.
Its maybe cause its in UEFN and not Unreal, most things are the same tho between the 2
should i remove self
i am using apply damage in weapon base
this says a couple ways to make a 2d vector as params https://forums.unrealengine.com/t/parameterising-a-2d-vector/763667 unfortunately there is no 2d vector param
❤️ ❤️ ❤️
Thanks for the help man, will look into it
Not sure. What blueprint is this in? How is it related to the controller?
Do you know how i can get all player controllers in actor blueprint
I can use it for each loop and then pull that into the instigator
Would someone know how to make widget buttons more consistent when using a touch screen monitor? Currently for me it feels like sometimes it works completely fine but other time it doesnt respond until i press it multiple times. It works completely fine when using a mouse
So that everyone can apply damage to it?
What is the blueprint dealing damage?
Try changing the.. I don't have the editor open atm. There's settings like DownAndUp, or Point, or similar.
As server, you can store the controllers in an array.
Everytime a player join the game (OnPostLogIn), you add the controller to the array
Don't see how that will be useful for damage system tho
U shouldn't need to know all controllers the server have ref to?
As in like the different events apart from onclick?
You don't need to iterate over the controllers. You need to pass the correct controller.
Hense the question.
What is the blueprint?
For now the button is just printing a string to test, essentially with the project i can look around and move this all works fine with me clicking and dragging on the touch screen as it reads it as a mouse, i call the widget on begin play and add to viewport so its always on, at first it works completely fine i can click my ui look around etc but then it just stop being as responsive and i need to mash the button until it responds
What i do notice tho is when i click on the button and it doesn’t respond it does change to the on pressed colour
I passed the controller but it's working. All players have the same score this way
It's multiplayer
Still confused
@main bobcat These were the settings I meant. Test these out to see if they help at all.
Print the GetInstigatorController value from your original blueprint.
Ah okay ty ill give that a go
Print string?
Hello, I am looking to apply damage to the character (In Lyra Starter Project ) on contact with this actor but I am finding it hard to do so, I cant just call (Apply damage) for it to work. If anyone can help I would appreciate
Why do u need a ref to any controller for score at all
It can just be a replicated variable in game state
Client just get the value from the server
You can apply damage or you have to replicate your custom event
I already did this. But it's giving invalid
Invalid player controller...
I'm sorry i still don't understand. the event for dealing damage is on a different character type I made specifically for the enemies in my project. However dealing damage to the player character (Hero Default) is proving to be a challenge
Why can't you use 'Apply Damage'?
I think Authaer means you should try to print string the Instigated By output from the Event AnyDamage node, not print after casting to your "BP_Gameplaypc". It will always fail if you're casting from a different class, like your weapon base.
But why print string
Idk xD
You could get your controller inside the weapon base, and use that as the instigator when applying damage.
Then casting to the player controller on AnyDamage should work.
If you're using self, whatever blueprint "weapon base" is becomes the object you're casting to in your controller.
so you can see what the actual controller is that your setting
This is why he asked what blueprint weapon base is.
I understand but it's multiplayer so that player controller will add points to only 1
I believe anyway.
I tried this
Well it would work for multiplayer. Assuming your player with the weapon base BP is using BP_Gameplaypc, you can get the controller inside the weapon base instead of using self, as the instigator when applying damage.
Yes I did but it's adding all the points to 1 player no matter who kills
also there is #multiplayer which may have better idea about how to make it work with multiplayer
What node are you using to get the controller?
You shouldn't use Get Player Controller 0 (with index).
Then the server will only give points to Player 0.
What type of class is weapon base?
There's a few nodes to get the controller but I forgot the name 😛
Helps to know the class though.
In lyra i guess there is a built in damage system with gameplay ability, so apply damage function wont work. I did a bit of searching and found out you could do something like this 🥲
Possibly, I forgot the node sorry xD
If your character owns the weapon base you can use get owner, and then use get controller from that.
Just ask in #multiplayer if it doesn't work.
timer dont work
this is on event begin play
thats heavy
Why are you still going for the delay.
The point of the timer is so you don't do that
If you want to do something every 4 seconds, just set the time to 4 seconds, instead of 0.1, then delaying
oh ok ill try this with a timer now and see if it works
the timer fires the event at the time interval
so if you want something to happen every four seconds, then put in four seconds
and the timer will fire that event every 4
seems like only event tick works here
i don't think you need the second foreach
your clearing it after it runs
It doesn't.
First off, the first time you run the timer event you clear and invalidate the timer
i don't think you need that ssecond one, you can just plug overlapping actors into destroy
When implementing something, never attribute it to the engine feature being broken.
always assume it's something you've done until otherwise proven
ok i deleted the second one and still
I would imagine GAS uses the apply damage (with the other types) stuff itself as that's apart of the built in damage system in UE.
In fairness, it won't make a difference. That internally runs a foreach
it's not even doing anything is all
do you want this timer to stop ?
wait why i do this dont i supposed to set timer by event than clear and invalidate timer
yea after it destroy the actor
so you don't want it looping, just run once ?
No? you want it to run every 4 seconds for as long as possible.
so why would you destroy the first actor, then stop the timer ever running again
Follow the nodes, read them out. how they appear is what they will do
i tried this logic with looping and without looping and still but i dont really understand why only event tick works here
oh ok
"After 4 seconds, loop through each actor in the array. For each of those, get their overlapping actors, loop them, for each overlapping actor print a string, destroy it, and stop the timer ever running again"
That's what you've done, in words, reading the nodes 1 by one.
you can see that the last bit is not making sense
i'm guessing for some reason it's not working because the things your checking don't have overlapping actors by 4seconds, which is weird
It's not working because it aborts the first time it runs
it print hello like 22 times but they dont get destroyed i guess
for sure, but from what i remember they are spawning things and trying to get rid of overlaps
Yes it's entirely possible that in this case, the first time it runs, there is nothing to delete.
than why it doesnt give me access none
because you're not accessing none
delete the clear and invalidate timer.
plug the array element from the second foreach into destroy actor
having to do it like that seems weird, unless your spawning on the fly
you should just spawn everything, check for overlaps
you shouldn't need to keep doing the thing
Yes, but we might as well address the logic issue at hand
wait when looking at outliner it actually destroy some but certanly not all that overlaps
ok ill try this
that was what i suggested, to put the logic in the spawner itself, either with some maths, or just spawn check for overlaps, delete whatever
yea all the logic in spawnable actor
but your still using delays and timers which shouldn't be necessary i think
yea just the event tick works and i still dont know why it work and everything else dont
might as well get it working first and then focus on refactoring
still even this logic didnt work
(show what you've done)
always show what you've done
so you haven't done what i said at all
the array element is still not in destroy actor, and the clear and invalidate is there, just moved
wait i thought this what you are saying
i feel like some node tutorials will help you out a lot
you got some wild stuff going on here with this second foreach
again, read the nodes one by one.
now you're saying
"for each actor in the array, stop the timer ever running, then for each overlapping actors, delete the array of overlapping actors."
ok ill do this
don't do that
that's what you are doing, not what you should be doing
you should do the thing i originally told you to do
There we go, yep. Tick looping though, otherwise you're still only running that once
i'm surprised you need the timer at all, somethings up with the spawning i think
unless actors take a while to load up or something
thank you so much this worked
well i tried to do this without timer but it didnt work
whatever works
now thats running every 4s
seems very inefficient
maybe some sort of boolean you can check if there are no overlapping actors left to delete then you stop it
unless on the other hand your spawning more things dynamically, even then i would trigger it untill it deletes all then stop it
ok ill do a boolean
i would check when they get deleted, is it 4 seconds ? on the 8 second mark ? 12 ?
somethings really wrong with your spawning if your just creating a level i wonder why you need to wait so long
even if you just shut it off after a certain time, to figure out if it deleted stuff you'll need to keep a running total and stuff it's not simple
yea i made it one second
the only thing i can think is your actors are taking awhile to spawn
and the execution is just keep going even though they have not fully spawned in
no it spawn on begin play like after half a sec
what should i do to keep shooting?
is this not shooting rapid fire ?
you don't have much control over it here, your locked into tick
i woul probably use a timer and a boolean
so you can dial in your rapid fire
nope
does it even shoot once ?
yep
so put it on a timer
timer by event
plug in the shoot event
do it on started
then clear and invalidate it on completed
oh my bad
so it just shoots off at a specific interval
hmm like this doesn`t shoot at all
well your time is 0.0
but do it from started
0.8*
neither
Completed = Clear and invalidate timer
but without that it should still run i would think on started
it just wouldn't shut off
ah clear what?
like which one should i use
by handle
it doesn`t shoot at all
like this?
still doesn`t shoot at all
so you know for sure this event is being triggered ?
yeah it useed to shoot before
That is up to you. I would imagine shoot. 😉 It will get called every x amount of time while the key is pressed.
If you're doing shooting, you might also want to call the event first as well before you start the timer. (Without it there would be a delay before the first project is fired)
like this it works for sure
That would spawn a projectile (roughtly) every tick. This would mean if someone is rocking 120 fps, they'll get 120 projectiles. Someone chugging along at 30 fps would only fire 30.
maybe started isnt working for some reason
try from started
see if it fires off one
Or use breakpoints/print to see if the input fires at all
and like this it doesn`t keep shooting like I want
that's not a good idea
Triggered fires on tick
then it has to wait for the timer. basically a delay on tick
it's interesting this doesn't work, the only thing i can think is your started isn't triggering which you can check with a print string
but it should be triggering just fine
idk what would cause that
I doubt it doesn't work at all
Triggered will reset the Timer each tick
you want Started > Shoot>Set timer
then , as long as you hold for .8 sec , it will shoot again
if the problem is that you want it to fire right away not wait the first 0.8 secs, then call Shoot on Started, then set the timer and delegate to Shoot
@latent venture
but it all should be happening on Started
yeah bro
done that
doesn`t work
which part ?
you need to give more detail than "doesn't work"
what have you done to troubleshoot
did you use breakpoints and step throug the code?
what you have said
it's just strange it doesn't work a timer usually works np
if the code works in the event, changing it to a timer should run it multiple times
are you letting go of the trigger and expecting it to keep going ?
yep, after shoting once, it is going to set custom event timer to 0, and it immediatly goes to completed
no, I want to hold on my mouse left click and for it to keep shooting
If I want class A to dispatch an event that class B will listen to, does A need a reference to B?
no, but B needs a ref to A
I guess breakpoints are hard to use when trying to test hold
I'll run a quick test on my end
time is 0.0
0.0 means it won't run
thats basically the interval it runs on
when that time hits, it runs the event
bro I changed between more values on thee time, to see if it would make a changee
but it doesn`t
interesting
I was under the impression that there was just a global event stack, that all classes could broadcast to and listen from.
Like, if I have a game with an event "spread fire", and a bunch of different flammable actors, do all the flammable actors need references to all actors that can set things on fire?
this works perfectly @latent venture
i am so sad 😦
so does it print hello at all ?
what is your input, what key are you using, what's the trigger type?
wait hold on
did you set this to a Hold trigger @latent venture ?
only once, when i press click 😦
Time.0.0 is not valid is it
you mean here??
yeah
It's 0.8 check yer eyes! 😄
is it correct the way I have?
nope 😦 just binded left click to IA_Shoot
so it looks like this but with Mouse Click instead?
yeah
and on the input itself, is it set to Digital Bool? Did you add any other triggers there?
I have an Triggers From Input Action
like in picture
wut
no, i mean your IA_Shoot "bp"
and that shouldn't say Pressed
so you prly have it set to Pressed in IA_Shoot
I don`t get it
afaik, there isn't a global thing like that in bp, except for bp function libraries maybe. You can however put stuff in a central area like the PC or GM, so the ref can be easy to obtain. Additionally, you would prly use inheritance so all flammable objects are one class, so you only need to do it in the parent, once.
open IA_Shoot
should look like this
if it doesn't, fix it.
I added a delay to the for each loop macro and the looping has slowed down significantly, but it has become a bit too slow now, in the delay I added 0.001 seconds and yet the loop won’t get any faster
it`s exactly like this
then where did you find this #blueprint message
so there is something like that in c++?
I had it but delted it, I am using the BP_FirstPersonProjectile that it`s given when you do a new FirstPeerson Project
maybe they hhad a setting I think
you can make global functions there I believe. But iirc global stuff doesn't have a world context so you have to feed it one, idk. Imo, subscribing to an event in the PC should be enough. Having said that, in your example, you prly wouldn't want every single flammable object on the map to catch fire just because one of them did. So at that point you should prly have a CatchFire event in the parent class, and if those things are overlapping your location or w/e, you call the parent event
for example, projectile, onBeginOverlap, get overlapping actors, for each loop, cast to BP_BaseObjectClass, call SetFire
onBeginOverlap can be replaced with Tick, this is just so it doesn't run constantly
yeah i gotchu, I get all that you're saying. Just really surprised that this is the only way. I thought the whole point of events was that you didnt have to worry with references, you'd just fire an event into the cosmos, and whoever is out there can listen
guessing you mean event dispatchers. yeah, no they need something to listen to (a ref). Even interfaces kinda work the same, you need something to message to, or something to pass a message through, I always have a hard time rmbring what works with those 😅
then remake your own IA_Shoot
I mean, interfaces need to be implemented by an object, maybe that's what you mean?
no, cause I used to think they can be used in the way you said, like shout into the void, but to use the Message (little envelope icon) nodes, you need a target
your pretty much f'd when it comes to blueprints and loops
but there are ways to get some performance out of it
there's custom for each loops with delays out there, but tbh it's kinda pointless when you have timers, save for specific use cases
Pixels be trying to decieve me
But i read at the wrong input lol 😅 mb. Carry on
tbh @scarlet rose the bp comms live training pinned here helps a lot with understanding these things
Thanks, I'll take a look 🙂
@lunar sleet something like this would be pretty standard then, I imagine (pretend that's on BeginPlay)
what version of ue ?
5.3
still doesn`t work
well for one you'd need to use a for each loop if you want that to work properly.
but at that point you might as well just bind the event in BP_Delivery itself
oh right lol
do you still have something that says Pressed trigger was inherited from the InputAction?
nope
never mind
appareently
it works now
but I don`t know what I have done in order to make it work
Hey guys, quick question hopefully! I have a simple actor with box collider on it that when entered shows a prompt to interact. When you interact, the actor is destroyed and the prompt is removed from viewport. However if the player is overlapping two of the actors, how can I prevent the prompt from being removed until both actors are destroyed? currently, you have to leave and re-enter the collider for the prompt to show.
it keeps shooting and it ain`t stopping tho
Yeah I want to get the performance out of it exactly, but the looping speed has become too slow even when I have a delay of 0 seconds wtf
whats the loop look like ?
whats the delay supposed to do ?
The loop is literally like as if you were to count from 0 to 100 super fast
Verbally
A forloop completes in a tick anyway so modifying the macro to add a delay would just make it take longer.
Yes I want it to take longer but not so long
hmm
Engage, you mean if I were to convert my looping function to cpp it would be better for performance?
The fastest you can go is next tick. (Opposed to all at once ina single tick) If that too slow, you need to look at processing multiple indexes of the loop in a single tick. Like every loop do 10 for example.
yes absolutely
I even tried with the delay until next tick function but same results
Basically I’m using a procedural mesh which has verts of more than 50k, verts and triangles, and this mesh’s verts need to go through a loop function to get modified
Because what he wants isn't about performance. He wants a delay between each loop but the next tick is too slow.
In facing a performance problem when loop is done in a single frame because it is looping around 50k verts ( integers )in a single frame
So I’m not sure how much a cpp function of this will help ?
That's probably more down to what you're doing on the loop. 50k is a lot.
Yeah and I need to use the loop functions can’t avoid it, I don’t know if there’s another alternative
50k with a delay i'd be surprised doing anything if it succeeds in a tick
So if this loop could go from 0 to 50k in even 0.2 or 0.5 seconds it would be fine
What is the loop doing?
you could use each tick and some variables, use the tick like a loop body or a timer and keep track of where you are somehow
The loop is counting all the vertices of the procedural mesh, let’s say my mesh has around 50k , so it counts from 0 to 50k
Why? For what purpose?
The procedural mesh deforms the vertices
Using that loop function and arrays etc
So you're not counting the verts, you're looping through all the verts and modifying them. It's a little different.
Yes looping through all the verts
Whilst loops can be slow, the issue is modifying the verts. Procedural mesh in BP can be pretty slow especially when you get too high. It takes a while to update them.
how can i stop sound in a widget is there any way ?
Yeah so what do you recommend?
If you wish to continue with BP you'll need to look at batch processing them. Instead of doing all of them at once, do x amount in a tick until they've all be done. It could be 100 at a time for example.
I’ve tried that exactly, and it makes it kinda worse because several verts get skipped and don’t get added to the arrays, which modify the proc mesh
I want to know how well all this can work in cpp?
How much of a performance boost ? Because as of now my frame rates hitch badly when the mesh updates
it'll be noticeable imo
Even in cooked packaged builds with allowcpu access enabled on the static mesh
I have heard about this
another thing is it won't crash if it takes too long
it'll just freeze the game
where as in bp it crashes on infinite loop if it takes longer than a tick
Oh yeah
How did you try it?
In the for loop macro where it says assign and add +1 integer, I replaced +1 with +100
That's not how you would do it.
Then how
This part is where I increased the int value just so it could boost a little but then skips verts
I got this image from Google
you want to spread the loop out probably with a regular for loop or even some maths to get the indexes
for instance you can get 1-100 on the first tick, 101-200, 201-200
so you could just use a regular for loop and get you could, never done it i just used c it fixed my loop problems
or even a timer
You’re saying add some more math/ function inside the loop macro ?
no don't even use that
just use a for loop
Don't modify the for loop. It'll mess up everything else that uses it.
no that’s why I created all the custom loops in my blueprints not the macro library
It's hard to recommend anything without knowing much about how you're modifying the data/verts.
I have a video which shows how it exactly works
Voice generated with elevenlabs
In this video i want to give you a look behind the techniques i used for creating the dynamic deformation effect on vehicles.
It's better if you know something about Unreals Blueprints, Materials and modelling, but other than that no other knowledge is required. There is no coding involved.
Playable Demo: https:...
3:35 seconds
That part shows
Proc mesh is created in the construction scripts and it’s vertically and triangle count is stored there, then through the hit event it loops through the verts of the procedural mesh body then storing it in an array, which then updates the mesh section
this is kind of the idea if you understand what it's doing, it's looping through just a few each tick untill it does the total, i'm missing some checks and it may be able to be done different but it's just the idea of breaking it up to several ticks instead all on one
Is it okay to use something like this on the event tick ? Cause I’ve seen several people saying avoid the event tick as much as you can
you could use a timer
or make a custom macro like suggested
whatever works better i was just showing how you would split up the indexes across ticks
Would that be because tick speed can be affected by fps of the game?
probably a timer would be best but i just threw it together to show an example
I see, but like you had said before about converting the function to cpp I think that would work great too
thats really the way to go for a lot of calculations like that
bp just isn't built for that kind of thing
Anyone experienced this bug: Adjust Volume to 0.0, then later if u try to Adjust Volume to 1.0 again it wont work. But if u first adjust to a small number like 0.01 it will work for the latter case
Yeah you’re right I don’t know why blueprints are slower than cpp when they’re doing the same thing
Yepp
I think I read somewhere that the more nodes a BP has the more performance impact it has, which might have something to do with that?
its probably not 100% accurate but this pretty much sums it up
https://www.youtube.com/watch?v=V707r4bkJOY
ブループリントとC++のパフォーマンスの比較をしてみました。ブループリントのネイティブ化をした結果も動画の後半に載せています。
I tried to compare the performance of blueprint and C++. Blueprint Nativization is posted in the latter half of the movie.
If that’s the case then it’s bad
I remember someone said bps are like an emulator
Bp can do lots of stuff , but loops isnt its best friend
and cpp isn’t my best friend either because I don’t know any of it 😂
Oh I don't know any CPP either and when I look at it my eyes go into a haze and it goes way over my head
So in this case using event tick on cpp would be good too ?
VM is more accurate. It's not trying to replicate hardware.
do you want this to run a lot or just once ?
In some cases I need the tick to run a lot of functions
Lets hope at some point in the future Epic makes BPs more efficient
They previously had a tool to nativize blueprints then they removed it
i would just mess around with it, maybe create a manager actor in your project in c++, then you can use it's tick for whatever you want to try, don't forget timers also
Why would they remove that? Sounds like a very useful feature to have
We can also expose cpp functions inside blueprints right ? If I change the for loop function to cpp then I can reference it inside the blueprints,
?
correct, idk about the delays in a function tho. i don't think you can do that
I heard it was too “buggy”
i would just make a manager actor that you can mess around with in c
or a blueprint function library, but there is no delay in a function
So basically they wanted to use their people to focus on new flashy features instead of working on fixing something that would improve functionality from the sounds of it
Cpp sounds like thenplace to be.
Yes
Bigger loops usually gain alot from being done in c++
The same goes for multi user editing btw
I shaved of 84% of the cost moving from bp to cpp, no optimization
For my CityBuilder
Really? I personally don't have a use for multi-user editing but for teams that's a huge deal
That’s great then, I think it would fix those frame drops
84%? That's insane difference
Indeed it was
Food for thought for the future then. I haven't started development on my own game yet, waiting on 5.4 to drop first but will definitely be keeping that in mind
Why wait when you can just get statted^^
Ive been waiting for the next engine version since 4.6
Partly joking
Unsure what you're asking with this. Need context for the sound, like what is playing it, and why the widget needs to stop it.
Volume controls
Our mixer had the same issue
Clamped min value to 0.0001 to avoid them stopping
Because that's the deadline I set myself for starting. I've been spending the last couple of months figuring out and writing down the main features, themes, kind of levels, soundtrack I want in it, nailed down the working name for the game yesterday. And also been spending time finding tutorials for the most important features so I have a basis to work from to get a basic prototype up and running quickly to find out if it'll play as well I hope it does
But i vaguely recall we missed a setting
Which auto stops them when theres no volume.
Because Nativization was really bad. It would bug out and it caused actual programmers to spend more time chasing down ridiculous and obscure crashes and bugs than it would take them to write the code into C++ twenty times over. It just wasn't a good tool for the costs and I'm pretty sure Epic felt the same way so just discontinued it instead of having to support it in 5.+
Ok that does make sense then and is understandable, still a shame it had all those issues
Hope it gets a grant and goes free 🥳
There’s something like that too? Is that a plugin ?
It'll be nice if it works. That said I don't mind BP's slowness. If I need it faster I just convert it. 🤷♂️ Nativization/BP2CPP doesn't solve the biggest issue with not learning C++. Performance is secondplace when it comes to learning C++ for Unreal though. The main benefit is the plethora of tools you gain access to.
That’s just amazing
I will say though finding good and upto date learning material / tutorials for stuff is a nightmare
Wonder when it will release and where
you ever programmed in any other languages ?
I once tried learning c#, unity days 2016
Could never get the hang of it
cpp is a difficult language for first one but basic programming helps a lot
It is and always will be. This is true for any evolving environment. By the time someone makes a rounded tutorial or training material on something modern it's usually out of date because these things are usually made early on in something's lifecycle and it tends to change quickly before settling.
You learn to navigate the chaos with enough persistence.
This video does a deep dive into what's actually different about C++ and Blueprint
https://youtu.be/VMZftEVDuCE
It's not an either/or decision. Learn what makes C++ and Blueprints different, what they have in common, and how to use them together effectively. We'll also learn a thing or two about performance optimization and some basic software design concepts.
Read the article version: http://awforsythe.com/unreal/blueprints_vs_cpp/
00:00 - Introduction...
Yeah it looks hella difficult too don’t know how I’m gonna manage to get my hands on that
Once you have everything installed its fairly easy to add some c++ to a bp project
and use the stuff together
IMO if you're semi comfortable with BP and want to learn C++. Start by writing simple functions that help you in a C++ UBlueprintFunctionLibrary. This will teach you a lot of necessary skills without having to deal with the more daunting stuff.
You get to learn how to expose stuff to BP and what types can be exposed. You learn how to manage stuff in C++ and get used to the syntax easily.
There's no pressure with garbage collection and such.
I feel that as I'm a solo dev and I have so many things I need learn, so atm I'm just trying to figure out the best course to action to get a prototype up and running once I start development. Because I don't want to spend alot of time learning certain things and then discover what I planned to do doesn't flow properly, so want to have something I can mess around with and test before I go too deep if that makes sense
Simplest thing is a simple bpfl
i just use bp project and if i get to something that needs c++ just add it
blueprint function library is awesome in c, your functions are nodes you can use anywhere in bp
With respect, that is an unattainable dream. Prototypes are designed to be altered. You cannot make it perfect the first time through without the experience to do so. The best thing you can do is just start. Make your parts. Alter them as necessary. Try to stay modular enough that systems that need a rework can be reworked easy. You can see this on even really successful titles if you follow dev blogs. They're constantly evolving their systems, redesigning the game with new knowledge, etc.
Oh I'm not thinking it'll be perfect first time, that would literally be impossible. I know the game will change and evolve over time, I just don't want to waste too much time by not having some kind of action plan as other wise you end up bouncing around between too many things and nothing concrete gets made
That’s exactly what I’m looking for
Just don't fall into the trap of wasting time to avoid wasting time. 😄 You can spend many years in Unreal, and still learn something new almost every day that you'll wish you knew before.
Where am I at now... 4 years 7 months I think?
Right around the 4.23 release I think is when I started.
full time?
Trust me the amount of things I'm realizing I need to learn can be pretty overwhelming if I think about it too much. Luckily I already know some people that will be able to help with the soundtrack at least, everything else I don't know anyone and don't have the funds to hire anyone lol
Pretty much. I didn't start working professionally for a while later, but I was pretty much Unreal open messing with something every day for far too many hours. 😄
sounds like a luxury being able to do that xD
If only i could turn back time lol
pre house mortgage etc xD
Hello guys, got a problem with the SaveGame in my project.
When i play the game, save game have to load a money savegame fiel, where you can find real and virtual money, but it doesnt make the savegame file.
Why doesn't it want to save in the savegame file? I checked everything and everything seems to be good but the backup file is not created in the directory.
Here are the screenshots :
?
i am using that widget as an intro and after user played it he can skip it with esc, for now after i pressed esc the sound still playing thats the problem how can i figure out of it
your pulling off the wrong set for the bottom execution
you gotta save the object to a slot
Also you should just have a new getter
this can be null
You should use something like SpawnSound instead of PlaySound. SpawnSound returns a sound component that you can stop and destroy.
did i make a mistake on something ? sorry i dont understand where is my mistake even if i searched that on unreal engine documentation 😢 can you explain me ?
i don't know if pulling off that set is the way to go, just get save player money when you use the money values
ah ok, but it doesn't even get that far, because it always wants to create the file but doesn't create it, so it never goes through the top route... It's strange, it doesn't create the file savegame with the “create save game” node
SaveToSlot Flo33...
Its creating the instanced uobject, but it's never written to a disc location.
oh 😦 i see
nice it works now 😄 sorry i feel so noob (i dont know everything in ue5, i just dev on it since february so thank you very much for your help
thank you to you also for your help 🙂
i got this problem while i was using spawn sound
i am using that on a a widget should i select a location ?
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_SpawnSoundAtLocation_ReturnValue". Node: Stop Graph: EventGraph Function: Execute Ubergraph WB Outro to Menu Blueprint: WB_OutroToMenu
what does your node look like ?
ahh, you are trying to stop both sounds , even though one doesnt exist
actually before here there is a branch it selects one of these sounds
try something like this