#blueprint
1 messages Β· Page 31 of 1
the final output is a rotator
which u can plug into ur camera's world rotation
@snow gazelle
if there's 2 separate BP's both with code in the event tick, do those 2 events get multithreaded?
(wondering if having several different "gameManager" BP's all with event tick would help with performance.)
No
what's the use case anyways?
Not in the true sense of multithreading anyways
calculating weapon velocity per frame
I want debug info but dont want the debug code to slow down the actual code
If you have perf considerations, do it in cpp
That allows multithreading to begin with
will just the act of C++ speed up operations like this?
Yeah, bp is a bit faster now but per Epic it was 10x slower not too long ago
it will speed up everything π
I am taking a C++ class in college right now and were doing the basics.
how different is C++ in UE5 compared to some of the stuff you would expect to see in a C++ class in college?
uhh, it'd be somewhat a rocky road for u i guess at first
but you'd get used to it after a while
I might be doing this wrong but how can i use a render target in an editor utility widget to update an image? I've tried a couple of things already and creating a static texture straight up crashes my project every single time, regardless of the target being square / a multiple of 16
it seems like UE5 C++ has a workflow associated with it.
would you recomend just starting right away with C++ in UE5 rather than do a bunch of beginner C++ stuff in general
no start with general C++
ok
I'm sorry, I'm not being able to figure it out, would you be capable of sending a printscreen of an example or something?
if i get up to the point where I can cerate custom C++ classes and create some methods for those classes, would that be considered an "advanced beginner" level of understanding?
it's the bare minimum i'd say
Okay, do you have ur event tick free?
No code there I mean
yes
@lunar sleet So Just to clarify, It seems like the Get all actors of class is not supposed to be used in the event tick.
If I hooked this up to an event tick in a separate blueprint actor, that would not make it any more optimized?
Honestly, play around in BPs to at least get a visual intuition of how stuff works in programming. C++ needs a header and a code which you don't see in BP however you can create a simple C++ class and play around with it. In UE, they also create example functions for you to play with
It depends on the use case but there are usually better ways
is there a reason you want to get it on tick? It's not expensive but kinda weird
drag ur camera component into the graph and out of it get the forward vector
Once u get the forward vector, draw out RotationFromXVector from it
Now again out of the camera make a new node SetWorldRotation
i call this a "DataStreamedBillboard" BP
it is a 3x3 grid of text renderers and by using it's custom event, you can display data on a specified quadrant if you will
This is super useful for me to debug and see multiple pieces of data at once.
I want to stream data to my billboard every tick of the current weapons velocity.
I don't want to bloat the event tick of the character because it already has a bunch of stuff so I thought I would just manage an event tick for displaying the billboard in a separate blueprint
But apparently it is not going to optomize things.
and connect it to Event Tick
(thats the meat and potatoes of it)
ok........... weird usecase
in the set world rotation block the z coordinate is the yaw, so i gess thats the one i need to use instead of x, correct?
no, don't block anything
so, something like this?
sorry, i got my sh*t mixed up
u want to be setting the spotlight
not the camera rotation
and as for the rotation, now that i give more thought into it, setting the forward vector would act the same as setting the rotation π
Which means for now u can just do FollowCamera->GetWorldRotation and plug that into the spot light
well, when i use the spot light has the set target in the world rotation block it just stay always in the same direction
pls show the tick again
Replace that get forward vector to get world rotation
and plug all the axis in (no blocking/breaking)
make sure the spotlight is attached to ur mesh
also
how u had it before
When trying to save a variable in a save object you don't need to load the save a lot each time right, only once and just with each change just save so when said variable changes stays?
@spark steppe u were right lol, getting the rotation of the forward vector is the same as copying the rotation over
just didn't notice that somehow
Like this it points to where the camera points, but it loses the wobble
is it attached to the mesh?
yes, the spotlight is attached to the head of the character
i would consider faking the wobble anyways
you could take the character velocity, get the vector length, multiply it by some scale factor and add that to the pitch with some spring solver
https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Math/Rotator/Lerp_Rotator/ get this node. For A do Spot Light->GetWorldRotation and for B what u had just now plugged into set world rotation. Check shortest path and set the alpha to like 0.3 for example. Connect the lerp output into setworldrotation
Lerp (Rotator)
I can try to use that block, but i will probaly take a while to learn how to use it
eventually even a spring arm with camera lag activated works? π€·
yes
In this case it makes the spot light turn from its current rotation to that of the camera
based on Alpha
for u the Alpha part here means how fast it will follow the camera
It works on a range of values between 0 and 1 (where 1 is full speed)
yup
but it wouldn't give the exact same wobble they are getting from it being attached to the mesh
faking the wobble is the most ideal, though making it "look good" is harder
so, to vary between +10 and -10 from the original camera angle it could be something like this?
no
also recombine those back into rotators
as it's getting messy
set Alpha to be 0.3
and enable "Shortest Path" on Lerp
@snow gazelle
i did it, and now?
plug follow camera's world rotation into B
and spot light->GetWorldRotation into A
screenshot it just in case after u do that please
it is working, thank you
So I need to figure out how to make this display a variable from my save object rather than my Player controller, sugestions on how I can use this function so it will search my save object instead?
acces it the same way u ended up doing it in the collectable bp
So I gotta load the save file huh
idk how u did that there
We'll because I tried to do a cast to my save object since that's where the variable that needs to be read is, but it needs an object reference to actually work
Anyone aware of an issue/bug with Add Spline Component via a for loop gets the loop number clamped until you recompile the BP?
you'd need to do it in exactly the same way as in the collectible i guess
No all the collectible does is just add 1 to a integer in my player controller, that's it
What you are refering to is just related to ur for loop alone
prob
That get collectible count there to be specific
so the value from the controller doesn't get propagated to the save?
If you want to use the save game object to pull the value from, then you need to get a reference to your save object that you have loaded.
Eg. If you loaded your save game in your game instance and saved it into a reference, you'd need to get your game instance, cast to your custom game instance, and retrieve that variable, then you can read values from the save game object.
You can test it with a simple setup. Just one for loop followed by add static mesh component and add spline component. Expose the last index as a variable, set the relative X pos by index*a float, compile and increase the loop number. Static mesh components get spawned as expected but spline comps are clamped to the current exposed number until recompile
Yes that's exactly what I'm trying to do, it's also exactly why I can never tell if my count is being carried over since that specific number hasn't been read on the screen
hello, im trying to make a spline for some roads, i have a intersection piece and just a normal road piece, im trying to make it so at some points i can insert a intersection, i have it set up so u chose one of the meshs from the array, but whatever mesh u chose it makes the entire spline that mesh. i have it setting the mesh like this in the construction script, from my google searches thats how it seemed like people did it, any help would be appreciated
it does, but I sadly dont have her where it can be read from save since I need to see that the count does caarry over after I quit and go back into the game
how would that look, I tried as you suggested but it didnt do it
I need to refrence something, what should I refrence?
what is the class of this BP?
Widget
so you need create a widget
no this BP is a function of my Widget
No GameTrainerSave is a savegame Object
this is a function in a widget that needs to read a varible in my SaveGameObject, Collectable
Its already saved in a slot?
yes
ok, So I was able to correctly save and load my collectables, however when I start to pick up collectables in my next playtrhough they restart
But maybe you can save and load in another way, instead of casting all the time
how?
The save game object that you want to reference.
If you've loaded it somewhere and saved the return value, that's the reference you want to use.
I was able to get it display, but now I'm facing the problem of my count restarting after pikcing up a collectable the nexct time I play
Yes one good way is use function lubrary to create a reference of save object
well I already do have one
though the savegame object is created on begin play
you can create all save functions inside of another BP, for example player controller. Would be more easy to call and choose the save function of you want
When you load the save game object, you're creating a reference to that save game object.
If you load the save game object again, you're creating a new reference to that save game object that isn't the same as the last one you loaded.
If you change a value in a specific save game object, you have to save that save game object if you want its values to be saved.
Any changes made to a save game object are only for that specific save game object.
Any time you read from a save game object you're reading from that particular save game object and you're not necessarily reading the saved value on the disk, or from any other save game objects you may have created.
could you put in the game instance ?
so you would have it across levels
and could get it fairly easy
Is there a more intuitive way of communicating between Blueprints in Construction Scripts? I have a simple time of day system that alters the directional light, etc when an enum is changed in a Time of Day Actor present in the level - I also have a bunch of Light Source actors that I need to automatically turn off via their own Construction Script whenever the time of day is changed, this should ideally happen live in the editor.
So far I've tried getting all Light Source actors in the Time of Day blueprint, and checking whether a Boolean is on or off, but the Light Source actors construction scripts refuse to update whenever any change is made in the Time of Day Actor.
I've also tried it the other way around, where the parent Light Source Blueprint looks for the Time of Day actor in the level, and does the same as above
This is why it's good to:
- Load a save game and store the values you want from it somewhere familiar like the Game Instance.
- Update the value in the game instance as needed.
- Read the value in your game instance if you need to use it for calculations or display it.
- When finally ready to save your game, get your reference to your save game object (either load it again, or create a new one) and update the values in the save game object, then call Save Game with it.
this is teh function that updates my save slot in my GI
Example here, first image is the Light Source parent blueprint finding the Light Source actor in the level to check if the Night Mode boolean is on or off in that actor.
Second image shows how the Night Mode boolean is set within the Time of Day actor. This all happens in the Construction Script on all involved actors.
If I dont load then how will I get my refrence?
I'm having an issue with the Cable component when attaching it to a projectile and a VR motion controller where it seems to phase phase between my hand and a position not far away, creating the not-ideal effect visible in the GIF above. Anyone have a clue why it might be doing this? I confirmed it's not the speed of the projectile causing this
I'm unsure if I'm doing something wrong or if the Cable component just isn't built for motion controls
I found the reason
I DID IT
Anyone know why this widget of cursor is unchangeable after game starts?
Im trying to had a custom cursor on each map. but the first one to load its forever the cursor setted, no matter what
So, I've got an abstract C++ class that defines a method and is blueprintable. It just has one method they need to override. I want to be able to create some blueprint classes off of this C++ class, with each one of those having some variables that need to get set.
Then, in a data asset, I want to have a field where I can pick one of my blueprint subclasses and modify the variables.
I can't seem to figure out the right combination of what the field type has to be in the data asset to allow me to modify the vars. I can get it to display a dropdown of the blueprint subclasses, but it's not creating an instance of them in the details panel ( the base C++ class is marked as abstract, blueprintable, defaulttoinstanced, editinlinenew ).
I'm sure I'm just doing something stupid but driving me nuts.
Yar, was something weird with trying to use Developer folders and not having my classes show up.
Sorry for the scuffed image, but im trying to set a light components color value, i have an average of float values that are from 0-255, I just simply divide them by 255 to get a value range that is 0-1. After that I set the light color, but the light color that's set isnt even remotely close to the values being passed to it?
Console =
AVERAGES:
178.5
178.5
175.5
Light =
218
218
216
And I can see that the values im passing are correct as well.
And I would use the values with a 0-255 range but that doesnt work and anything over 1 just sets the light color to 255, because the actual range is the linear values, not the floats
Uncheck SRGB, you should still be able to feed in the 0.7 values and it'll end up coming out to 179
THANKYOU!!
wth, thats so weird
I am having a problem with my behavior trees and I think I am just going about it in the wrong way, lmk what you think
so here is the basic tree, there are 3 different phases the AI can be in where he is wandering, hunting the player, and turning off lights in the room
They are all determined by seperate booleans
the wandering and the hunting work however. The turn on lights gets the AI stuck in that phase
Maths question:
Im creating a new movement system using set actor location on a lerp, does using multiple axises actually make the character move faster than just using one? I know it does when you use multiple inputs to control the movement, like if youre moving forward+right itll move 2x speed. But its speeding up on all angles when i launch directly up and im not sure why since it doesnt have any friction.
If I'm moving forward at a rate of 1mph, then in 1 hour you'd expect me to be 1 mile forward.
If I'm moving forward at 1mph and I'm also moving to the right at 1mph, you'd expect me to be 1 mile forward but also 1 mile to the right, effectively, 2 miles away from where I started.
And yes, this applies to all axes.
You mean 1.41miles.
If I'm moving forward at 1mph relative to my starting point and I'm moving at 1mph to my right relative to my starting point, 1 hour later, I should be 2 miles away from where I started.
That is incorrect
If you move 1 mile forward and 1 mile right, you have moved square root of 2 distance from the start position
So i need an system to recalculate it to devide by half if using other axises?
Take the total movement input and if the size/length of that input is above 1, then normalise it.
That will make the total length 1.
2m can be etiher the total distance or the resultant movement vector. It makes no difference.
Either way, it isn't 2.
Wouldnt a clamp work better?
That is effectively what it does. If there is a clamp vector size now, sure, use that.
I wish I could claim that I'm drunk, but you're right π
But effectively what that will do internally is what I just said
My enum to string isn't working in the build but it is in editor
I defined it in c++
I wanted to get the Display Name to display in my UI but it returns the actual name in the build
You might find that meta data is only available in teh editor.
Specifically Meta = () and UMETA()
So I'll need a conversion function?
As a workaround you could do something like: cpp namespace YourProject { TMap<EObjectiveStatus, FText> ObjectStatusNames = { {OS_NotStarted, LOCTEXT("OS_NotStarted", "Not Started")}, .. repeat }; } (this would go in your cpp file)
Seems to work, thanks for the help guys!
Then maybe a bpfl method to access them.
Sorry to clarify my problem my AI goes to the last triggered light location but I want my AI to turn off all light's the player has turned on
this is my current method but it is simple
It looks like you're only getting the first found light. You'd likely need some additional logic to loop through the array of lights, checking if they're on or not and if it finds one that is on, that's your target light.
Once you've turned off the target light, you'd need to loop through again and find the next light that's on. Once all lights are off you'd set your blackboard LightsIsOn to false.
okay here is a simple follow up question, if I am in an object's blueprint how can I get an array of all current actors
How can I reference the base actor of this class via a foreach loop?
It's GetActorOfClass
You are still loading and saving everytime you want to update something...... Just look at the pic i posted . Number 5
oh no I already finsihed that
all good here now and hunky dory
This isnt right
Just load once
Stop loading over and over
U will get bug
I know and I fixed it, now my collectables are now being fully counted
and I can display it on my screen
Let me see your add collectable function
I mean everythings working now, I really dont want to go back, I'm so close to finishing my project
now the ai follows the light only for a split second before returning to wandering
now I'm doing the other things
Im just asking to see it. I can tell u if u doing it wrong or not. Wether u want to fix it is up to you
But I already am though, both rare and normal and they are tracking perfectly
Jsut replace the entire function with ,get game instance-> savegame, like in the pic i showed you if you want to fix it
Also you shouldnt save (savetoslot) everytime you get a score
doesnt work
Cast to your game instance not your savegameobject
Cast to your GI first then call savegame
And get rid of the rest of the code
And dont svae everytime u get a score
question, I'm trying to get an integer from a parent actor but I'm not sure what kind of object I should refrence
Picture this
- U enter lvl 1 with ,0 score
- You pick up some coind and get score.
- U didnt finish and alt f4
- U come back to lvl 1 but u still have the the latest scorem
So the result is u can keep playing over and over and keep incrementing the score
oh I was able to make it so that happens
Not with the way u do it now
But u seems to know better so i give up
You literary save everytime you call the function, instead doing check points
arent you supposed to save?
Have u played video game?
Tell me what video game u played
Something with save and load system
yes I have, and I understand autosave if thats what your getting at
Baldurs gate 3, I spam save and load every dice roll
See how in baldurs gate 3 u save with a shortcut or selecting a slot?
Thats the checkpoint.
You dont want to kill a boss, get its item then alt f4 before saving. Then come back to the game with still alive boss and the ability to get the item again off it
You call save game to slot when the user press save game
Or when u want auto save to happend
Dont save it per goblin kill for example
how would that look?
This is less of a blueprint specific question and more of a programming one in general, but I'm trying to figure out an algorithm on how to get all cells in a square field for dragging a marquee. Each cell has an X and Y value. What would make the most sense for this? I'm thinking basically going row by row and ending the row when the column value equals the end column, and having that inside something similar for each row until it reaches the end row. Thoughts?
Green is showing start and end cells in the example
U go to the road in baldurs gate. U fight 6 goblin. U save the game everytime a goblin died. So u can get the item.
That will caise bug cuz i can kill 3 goblin, get the item. Alt fF4
When i play the game again, the 6 goblin still there but i already have the item from the 3 goblin i killed.
If they dropped key item, i can essentialy duplicaye the key item to infininite with the way you are doing the save game
I'm also curious if others think storing these values would make more sense in a matrix rather than an array
Base actor?
You are looping over a class
Is this just to test? Cuz its not gonna work in real implementation
You are basically saying get a random a.i in the world snd get a random point light in the world
Dont use get all actor of class
Instead point to the actual a.i and light
that was my attempt at real implementation, sorry I am new to this
so wait, you want my changes to be perimnant? like if I get a collectable it wonr be there next time?
it is getting the actual ai,
The issue is I need the AI to check every instance of lights to see if they are turned on
can I do that by referencing one light>
but back to here, suggestions on what I should refrence?
Nothing
Inheritance means you already have the variable, you donβt need to ref anything to get it
If you want, you can even make it show on the left panel from the gear settings -> show inherited
But otherwise you can just right click get
because you only have one ai in the world.
The moment you have multiple, your game break. That's what get all actor of class , get first index does. You just tell the engine to iterate all the actor you want and point the first one it find.
In no particular order mind you
if you need to check for every instance of lights then you can use get all actor of class
Create a function like CheckIfAllLightIsOn
Get All actor of class (light) -> For each, get bSwitchedOn, if true do nothing if false break from the function and return false. On Completed return true.
the AI is not being gotten by get actor of class though, the lights are and that is the issue, but the AI is being referenced from the controlled pawn
this is a good idea
I mean getting your BP_Ai
What is the purpose of going through the gameinstance to then use savegame? Can I not just use savegame directly? (Because it's still working)
if your game crashes instead of corrupting the save file midway, you just crash the instance. The save file is intact
it is always ALWAYS better to work with an instance than the actual data
Ahh interesting. Thanks, I will learn how to use gameinstances to save things.
your best workflow @tribal gazelle is to use the save file as a way to store essential data and only to save when needed. Otherwise, you load the save file into the game instance and work with that up until you need to save. Then transfer the game instance data into the save file.
Ahh interesting. Can I ask, is using multiple save files bad practice? Or is that better than using a single save file? And I am only saving things when needed, like when the inventory changes, or when they pause (to exit) I then save their weapons/position etc.
file or slots?
Slots
you can create one save game and use multiple slots. I like that concept tbh so that I can load at different moments
Ok thank you very much for the insight.
If this event gets called again before it is finished, and the B value on the lerp is different (GetDialAngle is different), what happenes to the event that was originally executing? Does it stop? Does it finish using the old values while the new one starts with the values it had when it was called?
https://blueprintue.com/blueprint/ix975e4r/ As the image is a bit hard to read, here it is again
So unfortunately this determines if all lights are on I need the ai to determine the light's location and move to said location then determine if another light is on then move to that location
Okay Update progress on my AI that turns off lights
I heavily simplified things by giving the AI a pho second sight essentially
once their cone overlaps with a light is the light is on the AI will go to the light and turn it off
Fairly simple
However now the AI upon seeing a light flickers between the Hunt and the Turnoff light behavior tree constantly even if not seeing the player
here is the function to make the AI enter this mode which should disable hunt mode until the player is next spoted as well
where is GetSteeringInput ?
only the function seems to be exposed
how can I get the steering input?
I don't know what is SteeringInput
or if it's a thing
are you after a specific variable?
call the function and see what it takes
function don't exist in UE4
UE4 chaos VMC
this is in ue5
Quick question about blueprint - is it better practice to use a new instance of the "get variable" node every time I want to use a variable, or just have a single node that connects to everything? It's way messier with a single node, unless there's a way to hide node connections that I haven't figured out.
use the reroute node to make the spaghetti more bareable, when it's too far to reach just get variable
it's probably cleaner to use a new node each time, since the last node may have other connections and you may be doing multiple calculation on the thing you forgot about
just pretend it's C++ and you're just using your variable name as many times as you like
yeah, I assume that under the hood it's basically just referencing the variable
just want to be sure I'm not taking performance with simple blueprints
I mean you're tanking performance doing most things in a BP over C++ some automation tests show 100x performance difference
Despite that, blueprints are still pretty fuckin performant
ANybody have any thoughts on how to get curved roads to affect navmesh in a curved way
ChatGPT says subdivide the curved road into a bunch of straight segments
that sounds not fun

you want the navmesh to be curved?
or you want the road to have a lower cost and navmesh uses it ?
Lower cost
ChatGPT tends to talk from their *ss
Whenever I try to add nav settings to any object, it just adds a square no matter what
if you're using a curve, you could always make dynamic meshes by segment and use that ?
still boxes, but it's correctly placed ones
π¦
Yeah but it would be wildly inaccurate
Hey, beginners question, I m trying to understand communicating between blueprints, so I know several ways, there are event dispatchers, interfaces and casting.
I have:
BP_Player - which has event Killplayer (disables ragdoll)
BP_RespawnPoint - a point/points on map where I want to respawn player
BP_KillTrigger - when overlap, communicate to player and kill player.
So, I m not sure how to communicate between those in best way, without doing nesting casting. What I really need to do is:
- If BP_Player enters BP_Kill Trigger. Start event KillPlayer inside BP_Player
- BP_Players need to communicate to BP_RespawnPoint to start event RespawnPlayer
and in 1. I can in BP_Trigger cast to Player right? But in point 2. From player casting to each BP_RespawnPoint sounds like something really heavy and bad practice. So, idk maybe interfaces are the way to do this more properly?
it's pretty bad if you have to do nested casting.
You probably want interface for that case
Try to break things into task and function
A gameplay manager handles the respawn and points
Respawn Point should be referenced in your GameState, so you could do an Interface to your GameState and ask it for the Ref
so there is no coupling
Nothing heavy btw
and since your Player is a child of ACharacter, just Interface call it, so also no coupling
I don't fully understand the differences between all gamestates, instace, managers etc. But I guess I can store it in GameInstance?
I think for my purposes the difference will be negligible. And if there are any critical systems down the line that necessitate better performance I can just redo them as actual c++ scripts.
yea basically, we're only talking about 0.001ms and 0.1ms
well most/all objects can just GetGameState() so if you have something you need everyone to use, then you can just add an interface to GameState, and make it contain globally accessible things, otherwise you can make your own "Manager" which is a singleton that everything can use, but they have a GameState system, so may as well use it π
what's difference between GameState and GameInstance?
Game instance is presistence object that is created when the game started and get shutdown when the game is shutdown.
Meaning you can access game instance as soon as you start the game. And since its destroyed when the game is shutdown you get to store data that needs to survive map transition
Docs should explain better
GameState is alive in the current level only, GameInstance is alive while the application is running
Hello, I'm having a little problem with the main menu of my game, would someone mind helping me?
I think the answer is no, it would not work. If I recall correctly the Find node returns a copy of the value, so the top right Add node would be adding to the copy of the Struct's array rather than the one in the Map. I'm not sure if it's even possible to get a Map value by ref (at least in blueprints. I don't know C++ to know about there), so I think you have to use the Map's Add node to add the new Struct array at the same key.
yeah you are right, I attempted to do some debug print and found the same result, time to redo 6 different functions
So, when i play the game normally the play button works just fine, but when i play it as a standallone game it doesn't, does anyone know why this is happening?
This is my blueprint
maybe there was no explicit connection to the map, so it didn't package it in your build
i think they ment the standalone play in editor
you have to add them to the build list, wait that's Unity...
sorry, wrong blueprint, that one is of the pause menu, this is the one
yes, standallone play in editor
It doesn't open the map?
When i play it it opens the main menu, but when i press the play button it flashes black for a moment and doesn't take me to the main level
you should probably name those buttons...
what's this level instance load here?
its for the pause menu
it doesent work yet, im still working on it
but i don't think it should have any affect on the main menu
What happens after it flashes black?
nothing, it stays in the main menu
but wouldn't that make it always reopen the main menu, and not only as a standallone game?
nope, it wouldn't
ok then, the pause menu has part to open the main menu, I'll check if that's whats doing this
your Pause menu exists inside your Main Menu map ?
that can't be it if u are not running it
that's the only place i can remember that opens the main menu
but i already checked and the pause menu isn't causing it
@snow gazelle
it's not something silly like you renamed your level so it LOOKS right in your editor, but it's actually not really named that
it's just a redirector?
Bumping this in case anyone is able to help π The replied to message is a reply to my original message with context
I'm hellbent on trying to do this in the construction script, but if it isn't possible at all I'll just suffice for handling this properly after BeginPlay in the event graph with functions
No
how do i open the comand console?
`
is that suposed to open a comand console above the game window?
~
It's just that it isnt doing anything
beside number 1
either ` or ~, i can't remember the default key
should be ` by default
since ~ is shift+`
I think it's pretty hard to kill console access iirc
If youre in UE4, you have to re-bind it if you're using a European keyboard
UE5's console bind should work out of the box though
right some people don't use US layout, and " and ' and ~ and ` and @ and a few other keys have weird crossover
I am using unreal engine 5
I'm now trying every key to see if any works
lo
Edit>Editor Preferences
Keyboard Shortcuts
find something including the word console there and bind it to a key of ur choice
I'm not sure what its called
I did it and it still isn't working
what you trying to do? your thing said you wanted to communicate "intuitively" ? like other than Blueprint Instances? but you want to do things in the constructor? so not in runtime ?
try setting the default map to ur main map for now
and then launch it in standalone
To see what it does
The game default map should option only says what map to open when first playing the game, correct?
Yes, which map to load when the game is launched
It's just that now I have changed it to open the main level instead of the main menu, and now when i play it i opens the main menu and the play button works fine
now that you set it to open the game map, it's loading the main menu ?
sounds like you need to reload Editor
but now it works apparently
is that an IRL picture of @lunar sleet caught in 4k?
wait, it only opened the main menu because i had the main menu map opened
can't say for sure
now i opened the main level and it didnt show the main menu
what are your maps?
you have the main map, right?
and a seperate map for the main menu?
which one is a level instance?
So, i have two levels, the main and the MAinMenuMap
When first opening the game it should first show the MainMenuMap level, and then the play button should take me to the main level
Any pointers on holding items and then using them? In this case a weapon. I tried looking at the first person template but I can't quite translate it into what i'm doing, plus I'm using the third person template. Currently I have the TPC with an inventory component. The Inventory Component stores info on the players inventory. I then have a base class for my Items called ItemBase, I then have a object class called ItemObject, which gets created with the info of the ItemBase item when it gets added to the inventory etc. So what I've done so far is that I can drag the ItemObject version of the ItemBase item in my inventory into the 'Item In Hands' slot, which then adds the static mesh component of the ItemBase object into my hand, however, I've realized this is problably not the best approach as I'd have to create animations for every single individual item π₯΄ Which caused me to look into IK anims.. Which in turn turned out to problably be alot more complicated. Youtube tutorials are either outdated due to the new IK system or they don't showcase what i'm looking for. Any pointers or questions to clarify anything is greatly appreciated
every Axe, Hammer, 1H weapon/tool probably has the exact same animation, the animation is played through the Character Mesh, and translated from the moving socket your static mesh weapon is attached to
Also, can i fix this ugly code with class inheritance? (If all 3 input types were to inherit from class input_parent)
ive learned CI just recently and now i wanna throw up at every second thing i made in this project.
I should have mentioned it's an AK47 lol
I thought If I get that part down, the rest would be piece of cake
then yes your AK47 animation is different to an SKS or a 308
so basically it is working like this, if i have the main level opened in the editor and the mainmenumap as the game default map it opens the main level, if I have the mainmenumap level opened in the editor, and the main level as the game default map it works as intended
Sorry, yeah. If there's a better way to do it in the construction script that actually functions unlike my method. Intuitively is just a flavor word because I feel like I don't understand the "proper" method to do this π
Fair enough
It's up to you how you want to do your items and their information, do you want to make a Structure with a Class ref, and animation references and add them to a data table and do a lookup, do you want to make an AActor base to hold them that you can have handle their own animation information, or do you want to hard code every single weapon into a single character class, it's all up to how you understand and can implement them
but a semi automatic rifle and a shotgun and a lever action rifle and a bolt action rifle all need their own weapon animation and character animation
Construction is probably already completed in your content browser before you even move anything into the scene/view and have access to anything in the scene
so unless it's a gamemode accessible class like GameState etc, you won't be able to access a lot of things
Thanks, yeah that's probably it with how unwilling the construction script seems to be to communicate with other actors. I'll just do it through event graph functions then π
Construction is helpful if you want to nodegraph make things/components and attach them to the actor instead of adding them visually as components
Only reason I'm doing it in the construction script for the light sources is for live updates so I as the level artist of the project can better get a feel for lighting
like if you're building a survival game and you want to program in a snap point system you can make arrays of vectors or maps to spawn in collision volumes in spots and then make a child actor and inherit the system and tweak the arrays/maps so that it places all your collision volumes for you
but if you want to access other objects in the level/scene, then construction is kinda way too late in the execution hierarchy
Hello, I am trying to create an interaction system where I raycast to see if I can interact with the object, should this logic be done on bp_topdowncharacter or bp_topdowncontroller and why? Thanks!
trying to make a very simple Pure function that's just print whatever its plug in to it
but it doesn't work, why?
i know there is a pure print but its need that value go throu it for some reason, is there no way to make it print and that's it?
pure functions get executed only if output node is connected to somewhere
otherwise its not part of execution graph and how should engine know when and where to call it ?
when value get inputed in? why not that way
value gets inputted in the same way as I mentioned . when its encountered on execution graph
blueprint pure functions are just visually simplified but they are technically still a function that has an execution order
is there "On value changed" node?
You'd have to call something when u change it
@keen widget
or compare it on tick to the previous value
A pure function get called everytime a node tries to acces its return value
.
but only if the "owner"/"parent" node gets executed
and not if it's just connected
If there's no access attempt for the return value, the pure fun won't get called
how to create wildcard input inside function ?
if you can't see it in the possible var types it means u can't use it for functions
u can do it 100% in macros, but idk about functions
yeah but they did it here somehow
is that a c++ implemented function?
double click on it
see if it says reading c++ symbols
dont opend
cppβπ€·ββοΈ
c++
so my dream to make simple func for debug check what value is where cannot be made
how
add wildcard input var to the event
maybe there is a plugin in the ue store that just show what values are runing by the wire?
returning values with this approach will be stupit though
There is no value running through the wire if it's never called
How do I make this line trace have the same rotation as the player?
position (start)
get forward * float 100 + position (end)
ur code is fine
but u need to multiply it by a float
instead of vector
never
Anyone got an idea of what I'm doing wrong here? This code is for picking up objects and it workd when I pickup only 1 object, but when I try to pickup another object while having an object already picked up, the previous object drops to the ground
Making and empty array and adding to it will always be index 0 i think
h ow can u increment an array size ?
y
are you trying to track the currently held objects in this empty array? if so, make an array, and then use Add Unique instead of making an empty array, and are you trying to have an array of Physics Handles? just make an array and add them to it in your variables list
maybe ?>
That worked thanks I don't know what my thought process was thereπ
I guess
Yea I supposed so. Say the whole thing is a mesh, created several mesh parts into one actor, is the trigger and other moving parts accessable to animate then if the whole thing is a mesh? if that makes sense
sure, but then you want them all the be the same size and same spot, since you don't want the finger to snap to something outside of the skeleton, but you could always use a control rig to handle moving the finger to a point and having it follow the trigger 
wait it needs a skeleton?
aaaahhh
I've already created a new actor of all the parts, it was a pain in the arse to move it around in the viewport when it was in mesh parts lol
I was just curious how i could access the trigger mesh part once it's been made into a new static mesh
every mesh is a component in the actor so they are all accessible
you could make a base to put all your functions, or you could make every trigger/stock/lever action component so you just tell the parts to "triggerAction()"
I'm not sure i'm following tbh. Once I've made a new SM out of the SM parts, I can't seem to find any option to access the individual parts again.
if you force it from multi meshes back to a single mesh you'll lose the access to individual parts, that's what skeletons are for
#animation channel might know a way to combine and make a skellie and have pivot points and access
Thanks King π
Hey all. I have this material and I would like to change the dissolve parameter thorugh the bluepint of the actor. I tried it with dynamic material instance but I could not get it to work. How is this done?
you only create the material but did not change any of it's parametre
if your goal is to change the dissolve value overtime, use timeline
On your return value of the create dynamic material node, promote it to variable
then drag from it and type Set Scalar value
Don't forget to use timeline
if you want it to happend overtime
yep π
Another question. If I have an Interact Interface on an actor like a cube. Can I somehow Invoke an function on the cube if the interaction is finished?
Like a get owning actor or something
can someone explain what absolute does (what options we are talking about) and what options can be written in a string?
If you hover the mouse over 'absolute' does it give you a tooltip?
Is there a way to get a coordinates location relative to an actor/component in world space?
I basically just want the coordinate 5.0 x in front of my component (relative to my component) in world space. I see functions to add local offsets and move components that way, but I think I'm missing the functions to convert between the two systems without actually setting anything
YourComponent -> get component location + (your component -> get forward vector * 5)
That should be in world space.
It will say on the tooltip of the node which space it's in.
If it's not world space (location) try another node.
Itβs a poltergeist
haha maybe
Np
Hi! I am trying to create a scatter blueprint but i get a very weird error. The objcets i am trying to scatter gets placed far away from the acctual blueprint as you can see in pic 2. Pic 1 is the acctual blueprint
also the random line traces dosent use the entire box for random locations
Why not use PCG?
i want a more simple system that i can tweak myself
but in the future i will probably look into using pcg
You can tweak just about everything in pcg.
That's the world location
out of the hit
you'd need to convert it to the relative loc
Thatβs local to world I think
no. hitlocation-HierarchicalInstancedStaticMesh->GetWorldLocation
Is there a node like that?
Yeah
lol
if printcheck is passing some value to pure print in C++ , you can just print that value using print string function in any event graph
is this somehting?
Inverse transform location does the opposite
that works now, it didnt before lol
i still have the issue that the random points whitin the box is not using the whole box
wasn't checked here
i tested it earlier
whats with the rediculous horrible quality ?
thank discord remix for that
this should get a random point whitin the whole box right?
seems like snapshot of a compressed snapshot and recompressed it once again so forcing discord to compress it 3x and post it
what
quality of the image is compressed by discord 3x
but why
you snapshot it from already compressed image
and you posted again, so discord recompressed it
the scattering is still broken
the rocks only land whitin a small part of the box
I promise you, PCG is going to make your life 1000x easier.
you need to mutliply uhh
the box extent
by 2
because random point in bounding box uses half-size
whould you mind helping me in voice channel?
why?
not rn, sorry
ok
box extent * 2, connect the output to half size
use what u had before
get scaled box extent
It will account for the case where you scale the actor
yeah
split output , only myltiply x, y
that's a good suggestion, but it looks like its outside the boundig box
or it might be just the perspective idk
ok
but it's still not it smh
Hey can someone help me with my inputs? For some reason it stops working after I pause the game.
The controller do not get enhance input after the pause unless I hold a mouse button. at this point I have no idea what I am doing wrong
what is the size of Amount that you are looping?
Turn off use mouse as touch in project settings
Btw we have #enhanced-input-system π
Already did. however I am not sure if this is a common UI problem or enhance input
It's unrelated to it going outside of the bounding box
Like I am not sure where to start looking into the problem.
the funny thing is i have done the scatter thing blueprint multiple times before but never have this many problems
I have AIController for the AI units, and PlayerController for the human character. They are very similar, except some extra logic for AIController.
So everytime i change something in the PlayerController i have to change int he AIController too.
Aren't these 2 supposed to inherit from one parent class? Or this is just normal.
try flush inputs after unpause
one more thing you can try, place few static meshes in the box, record their location, delete the static meshes and loop the recorded location and choose random from them and spawn stone
doesn't work, I tried to flush them and even reflush them few seconds after cuz maybe idk it took a little frames
you can store those locations in a struct data table
I might be stupid but it looks like it would need to be divided by 2
There is a node Set focus to viewport or something like that
i give up
i will just use the folige tool
thanks for your time
Haven't heard of it. However it's still not working. I checked it on begin play and it actually blocks my entire input. I think my viewport may be busted? and only after refocusing it stops working
Edit. Scrap that, if I add .2 delay it works fine
Hi guys I would like to know how I could make an system that Tilts the Player character slowly head down and gives an velocity higher as more head down he is
Is definitly something with common UI, if I remove my parent widget I can regain normal control. Is like common UI input overwrites enhanced inputs'
Hello fellas, currently I am dealing with a problem regarding my characterβs mesh while it plays a montage (see video for reference).
The left mannequin is the simple preview of the animation dragged into the scene, thatβs how it "should look like".
The right mannequin is my character, playing the same animations as a montage and triggered through the characterβs BP (pressing space/jump). As you can see, the mesh gets deformed for some reason.
Now my question is: Why does the mesh of the character get deformed while playing the montage?
My theory is that the AnimationBP of the character does interferes with the montage, which is why I post my question/problem here. But I do not know what i am doing wrong exactlyβ¦
If needed, I would add some further images of some BP Code-Snippets and settings of the animations. But the code is realy simple and regarding the animations there is nothing special I did as far as I know (this project is relatively old).
In the characterβs BP I just trigger the montage. In the AnimationBP, I created a StateMachine for the locomotion, air-movement, and on-ledge animations. Maybe i did just set up something wrongly or did miss some other things to change. Does someone has any clue where to begin with?
@serene wharf i know u're over this already but...
what did you do differently?
maybe u had the box with some relative location offset?
because i can confirm this works for me
Here is an example i would do:
Create a timeline and trigger it when ever you want to start your rotation. The timeline needs a "curve", which you can setup the duration of the timeline. I would recommend using "float" as the main variable-type for the curve because, as you can see in my BP-picture, you can use it for both, rotation (float value * SinD) and velocity (float value * VelocityFactor)
The benefit of the timeline is thse usage of a "timespan" (adding values for a defined timeperiod), and you can also use it in reverse for going back into the standard mode of your Character/Actor.
Don't get irritated by the "static mesh" in my example, it wa sjust the fastest way for me to make an example for you.
Hope this helped
How do you safely rename an asset? I renamed a GameMode asset, and now I have all kinds of problems. First, it didn't delete the old one so I had to manually delete it. But now when I go try and assign the newly renamed asset, the editor thinks its a reference to the old one:
Every time I try to set MainMenu_Entry, it just switches to _old
do fix up redirectors
How do you do that?
do any of you guys know about ue5 ai
Thank u awesome solution but one more question how could i get it working in the State machine So that it plays animations
for ai related questions, you'd prolly wanna ask in #gameplay-ai
i did

What are you planing btw.? How is your question related to the StateMachine? E.g. do you have an Animation in your SM which you need to be synchronized with the Tilt-Value in your BluePrint?
Ok so I have had an super old game(it was from 2007) it was like an BASE jump Game Iβm trying to remake it but with better assets and all that new stuff now I need to find out how u can make the Falling system they used
But i am still not sure how StateMachine is related to all that. Do you need a transition between 2 animations regarding the Tilt-Value? Or how does the SM belong to the Tild-Value?
Yeah I would like to have an system that automatically changes animations when the player goes down headfirst and then to have an full 8way of movements
BTW you can see the game on YouTube itβs called BASE jump simulator pro edition
hmm okay so editor works now, but when I right click the .uproject and Launch game, it launches into a black screen. Any ideas what could be happening?
set the editor default map
The Editor startup map?
yes
yeah that's set
oh haha no worries
i'm guessing main menu entry is some empty map that redirects u to the actual main menu?
no its the actual main menu itself, should look like this:
do u know how to open the console command?
oh wait it was working.. it just takes like 45 seconds to load the map. that.. can't be right can it?
i guess so
its like.. slowly popping in lights and stuff still. For something so basic?
Running standalone?
gonna create shaders and stuff
just package it
Hmm... what you can do to affect your "8Way-Blendspace" in your StateMachine is to alter two Float-Variables (for "Roll" and "Pitch" of your rotation) in your AnimationBlueprint via your Character/Actor Blueprint. In your StateMachine you can attach these two variables to your 8Way-Blendspace.
Thi first image is an extension to my previous snippet. When you change the velocity value in your AnimBP, you can use that to alter the 8Way-Blendspace values like in the second image
Ohhhh is that what packaging does. Okay, yeah I see "preparing shaders, 4000+)" lol
Thank u appreciate it
I have AIController for the AI units, and PlayerController. They are very similar, except some extra logic for AIController.
So everytime i change something in the PlayerController i have to change int he AIController too.
Aren't these 2 supposed to inherit from one parent class? Or this is just normal.
wdym?
if you're applying changes to subclass A, they won't propagate to subclass B
Don't mix up PlayerController and AIController. AIControllers are meant for NPC's and are an extension to your AI's BP regarding everything movement related. A PlayerController is meant to be used for any Player-Driven Character.
You can see the NPC's AIController as an equivalent to the Third-/FirstPerson's PlayerController
Hey
I made a hexagon PNG file, when I import it and try to use it, it is just a black square. Any idea why?
Looks like a hexagon when I open the texture up.
Isn't the background of the preview-thumbnail black? So when you load an image like in your case, someone would assume the entire texture is black. Did you try another color for your hexagon just to be sure?
A white just turns completely white instead.
Gradient full gradient π
Something is messed up with alpha information maybe?
I understand but its like, you have the npc and the human. The human, attacks, builds buildings and retreats.
But the AI controller also does all of that, plus some other things.
so basically i have a duplicate code
in the PlayerController and AIController
so everytime i change something in the player controller
almost always have to open the AI controller to do it too
Because they are very similar
the only difference is that the AI Controller is the AI and does some more things that are automated
Both those controllers are AActor and an actor can have a thing call ActorComponents
you can make your shared behavior into an actor component and apply to both of them
AControllerExtensionComponent for example
If you wanted to share functionality between an AI controller and a Player Controller, you'd do so at the controlled pawn level.
Eg. You can have Input Events on the pawn that a human would activate, but then you also need to have events that your AI Controller could activate on its own to trigger the same logic.
why your uvs don't say zero ?
try another node
same thing just a new one
it should say [0]
uvs? In the teture window or material window?
Never looked liked that for me before. On UE 5.0
try another texture, see if just that one
i would also try a fresh material to see if it is doing it in that as well
usually it's best to narrow down a problem especially if it's odd
Could someone look up my problem too by any chance?
it looks like your jumping higher than the other character
Yes because I am currently experimenting with MotionWarp-Plugin. But this still happens without motion warp, as plain "PlayMontage"-Function.
how do u make use of the Blueprint Debugger? Specifically the Watches section?
Any tips on how I should handle the possibility that the 'Start' Index is less than the End cell so that the for each decrements by 1?
It's all 3 materials, but it certainly is keeping some alpha information even though it does not look like it in the thumbnail.
Ah yes, I had a similar problem in the past, Just work further like that. The Thumbnail can be irritating sometimes.
swap them if the other one is greater
use a select node or smthg
Uh, is this related to my question? Because I am not sure what you mean
nah
where is it mentioned on that page?
i thought they are for something else π
debugging the execution time
but i guess u do that with the exec flow
Hey Guys i need help with a issue, im trying to "refresh" my inventory as of it now the inventory Size Array represents the Child Slot Index of the "uniform Grid"
if they array is
1=false
2=true
3=true
4=false
5=false
i wanna update it so
1=true
2=true
3=false
4=false
5=false
any advice on how :/?
that would have been so easy in c++
aye but this is Bp only >)
but for bps u gotta make two for loops i guess
have one set the values to true up to a desired index, and the other one setting the values to false after said index up to the last elem of the arr
are you trying to transform an array of booleans from that first set to the second ?
im trying to set all true at the begining of the arrays basicly
@steady night
I want armor with certain effects when you wear it.
should I learn GAS
or implements my own system?
that's the last index you'd like to be true
here it would be 1 (you start counting array elem from 0, so 2-1)
u might wanna reconsider how are u storing the inv size
yeah thats what im thinking aboujt
different way as well
never seen it done with bools like that, except if u want some slots in-between to disappear at runtime
mine is cleaner smh
ya i'm still working on cutting down on all the lines, still learning
well yeah its my 2nd time doing a MP inventory system so obviously its not as it should be
but 10x times better then the first one atleast :p
you also usually don't want to alter the array your looping through
but i think in this case it should work just fine
but we are doing a different thing here
modifying existing elements and not adding new ones
thats why i said in this case it should be fine
Yes, adding/deleting from an array while looping is bad, bur altering values should be fine
guys I need some suggestions I am trying to predict where my bomb will fall with this feature but its really moving a lot and it looks bad check video , green crosshair below plane is bomb cross
it is jumping like mad, any tips?
u could make it lerp to the next loc, but that would make it less reliable
ye I thought about it
Are you tracing the ground? Isn't the ground "uneven" (bumpy)? That might be the reason for the trembling.
should be not like that idk I am using unreal engine function for prediction check image
π
it is considering ground
it's always gonna be "jumping like mad" if u want it to be accurate i guess
@undone sequoia does it get better/worse if u change sim params?
exactly. therefore @undone sequoia needs some substitude. Like... an invisible plane that gets traced instead of the ground itself.
@undone sequoia I see you are tracing for "WorldDynamic" which might be tracing the bumpy map of your level. As a substitude solution, you could create an invisible, but traceable plane as big as your map. After that, create another TraceChannel (In ProjectSettings > Collisions), e.g. naming it "BombPredictionArea" or so, and attach that channel to your new created plane.
Some downgrades would be that the hills wont be traced anymore, but for that, you could create some more objects like cubes, cones etc with smooth surfaces and attach them also the new created TraceChannel.
what if I set trace channel to visibility
should solve it
That would trace "everything" visible on your map, that would be even more messier
but bomb should hit anything what is visible
I mean
if there will be plane above ground
it can hit plane
and kill
thats not the point
uh i forgot... with "plane" i was refering the geometrical object "plane" (not the flying vehicles)
ah true sorry
is this on tick ?
seems like it
it is
it should be visible whole time
smoothly moving over map
just found problem is in my velocity... which I am calculating when I put there forward vector its smooth
It getting some weird numbers, my velocity
my velocity output, numbers are weird I dont get why I calculate it right
1418 then 1420 but before is 1465
@lofty rapids Here is another example without MotionWarping, just the plane "PlayMontage"-function of the character's BP.
My theory is that the StateMachine of the AnimationBlueprint interferes with the montage's animation...
Anyone knows how to solve this issue?
Here is the StateMachine-Graph of the AnimBP
that's #animation stuff
whats the best way to call a custom event from a level blueprint?
none, why do you want to call something from the level blueprint?
and what do you mean "call a class"
custom event I mean
then you don't
in general the Level Blueprint is a piece of legacy from UE3, and now only really functions for quick level specific actions for game designers, like triggering a cutscene for example.
you wouldn't put gameplay code in it, and even it's legititmate uses are dubious, and will normally be better in a reusable class
tnen how can I essentially do this in my actor instead? I have a audo commponent in my level and I need to change the msuic when I start an event
make an actor of the audio component and add an overlap trigger (with a sphere collision for example) reference the audio component in your event system
no its a button press, I'm trying to make it so when my player interacts with an object to activate target practice the music changes
then make the button change the music
thats what I'm trying to figure out
make an variable on the button actor which can hold a reference to the audio component (the class type is visible in the details when you select the audio component in the editor)
and click the eye next to the variable name, then when the button is placed in the level you can select the audio component to store a reference
in the button use that variable to access the audio component and to change the music
theres a clicked event
well, is it an UI button or a world object? (i've assumed the later)
I'\m trying to figure out how I can refrence my Music Player audio compoent, also World Object
i saw button i immediately thought ui
how can I refrence an object in another objects blueprint?
in the blueprint you can't
in the BP you make a variable of the class, then with the actor placed in the level you can place a actor reference in that variable field
With the Epic MegaJam just around the corner, this week we wanted to focus on the groundwork - how to prototype quickly so you can get to the detail work fas...
watch this and what he does with the TargetActor
best idea is to watch the whole video... since it's pretty much worth every minute
What is the Camera Shake class named now?
hi
I have a widget and in it I have 10 positions on the X axis, I want to check which position of these 10 is closest to the mouse cursor, how can I do it?
I use On Mouse Move
function
@tight pollen you always ask weird question, I can't tell of you are trolling.
Arnt u the guy that want to do mmo with 3000 actors in bp. And also want over two thousands widget element?
this is so weird... i had to look it up... and it's "only" 1k widgets but replicated π
1k widgets... I've already dealt with that one ;p
So I have a while loop and I want to run the contents continuously, but looking stuff up, the reason why its crashing on execution is because it runs more than once per tick, I can't use a branch into a custom function with the contents like some suggested because I use delays a lot in this graph. Any ideas?
this question is normal, what's wrong with it?
check the distance from the position to position of each one, probably not the most efficient but you get the lowest distance so that will the closest, for 10 it wouldn't be bad
Hang on he has 1k widget in his wbp. Are u saying to iterate over 1k widget every frame?
no
He mentioned "OnMouseMove"
But yet, if 1000 player move their mouse at the same time, it would be "every frame" alike
this is not related to it at all
This feels weird as well, using a while loop, but I can't really think of another option
Loops happend in one frame
I could put a big ass delay at the beginning I guess but jesus that is nasty
are you running a while on tick ?
Putting delay not gonna do anything
I'm taking a continous input from a thumbstick, so it runs more than once per tick presumably
You can use "OnGoing" instead of a while loop. You can set up your EnhancedInputAction, the specific button or stick, so that while "holding" the button it will trigger the following function as long as you are holding.
Don't use a while loop there
I guess I could hook it up to on tick, and just set the vars from the thumbstick inpout
why are you using a while ? and not just a branch if it's continous
Loops happend in one frame, if the loop iterate the maximum specified limit. You will just crash
It's a blocking operation
Triggered should continually fire once per frame if you've set up a trigger for your input action correctly, so that in itself gives you a continual execution rather than using the while loop.
Any logic you want to block or change behavior can be done so by using a branch with a boolean.
Not gonna go to next frame until either the loop finish or u crash
I was under the impression that triggered runs only once while the button is held down, which is why I wanted the while loop
Except for if u put a "delay" in it, then it will trigger one loop each frame again!
It will delay the inevitable
Gotcha, I have another issue then, I was under that impression because my BP doesn't seem to work when continuosly firing, it only really works when repeatedly triggering it, like by rapidly pushing and letting go of the thumbstick
If u put delay for 2 seconds then you will crash after 2 seconds.
This depends on how you did setup your Inputs. You can change the behaviour so that it registrates when you are holding and releasing
A loop stops blocking the tick as soon as you put a "delay" in it, e.g. delay "0.001". Not sure if this was only meant for For-Loops when i learned this but i assume this is true for While-Loops too.
I don't think that's the case. You are just blocking for the duration of the delay.
A lot of ppl misunderstood loops and tries to Put delay in their loop.
Try to print string in for loop (1 to 10) to test and add delay of 2 seconds. What happend is after 2 seconds u get 10 print string instantly within a frame
This is all a while loop does. Basically it continually calls the loop body output until something sets the bool to false, then it calls the Completed output.
Putting a delay in the loop body cannot change this behavior. It will continue to call the loop infinitely until the input bool is false, and if this is done for longer than one frame, it assumes that you have an infinite loop running, and causes the halt.
i think infinite loop detection works different (since you can raise the limit, so i guess it rather goes by iteration count)
For & Foreach loops are slightly different in that they iterate over a finite set. So long as you don't have logic that takes too long, they will execute within 1 frame and not cause the halt.
You're probably right Ben.
i'm not 100% sure, so unless you are, both might be true π
since i feel like i also hit the infinite loop detection with less iterations than set in the project settings
here is an example of one of my inputs which i setted up in my InputMapping-Asset
I think I should probably explain what I am trying to do, because I have a sinking feeling that I am doing it wrong.
When the thumbstick moves, I want to trace from the thighs down to the ground, and solve for that in my IK.
The New Trace variable is used to trigger solving and lifting the legs etc. So, the workflow is simple here.
Clear everything at the beginning, trace down, set the foot location which is used to get the knee location later, and set the variable. I want to wait until turning off the left leg solving though, cause that way it looks like they are staggered. That's where I am really confused, delay seems to work differently than I would expect. thoughts?
get rid of the delays
as was explained to you, on Triggered, they will not work as intended
Then the legs will move at the same time, which is why I want to figure out an alternative that does work. It looks unnatural
Makes sense why it was broken though
you can prly use set timer by event instead
It also needs some delay either way, or else it is ripping the legs apart lol, its to fast
.
Yeah let me take a look, i'll get back to you in a few
i'll try converting it to that
thanks for the tip!
I had a nice resource of how it worked a while back, but I can't find the link, is it triggered whenever an event is triggered?
if you use looping, you can also clear and invalidate the timer by handle when you want it to stop
you can prly do this on Started instead so it doesn't reset the timer every time
I just checked it out and you are right. It delays the loop and then loops it trough to the end.
But the interesting thing here which I tried to tell is that even though it is used in the TickEvent, it does not block the game. Instead it jumps over the loop for the delay duration and triggers it again afterwards. My misconception here was regarding the While-Loop. It does not seem to work with it in combination with the TickEvent since it returns an "Infinite-Loop" error.
P.S.: Just ignore the "DeltaSeconds" string printed to the screen, should be EstimatedTime instead lol
Shit I also did exactly that
i want Get Local Top Right
This also feels wrong tbh, I am trying to slowly go from 0 to 1 here, but obv this won't work, and its also messy
Is there not a function for that?
nope
thats really weird
You can make your own delayed for loop. Look at the insides of the For Loop and insert a delay before each call of the Loop Body before it calls the next iteration.
The event I use to start does not have an event output delegate, whats the solution here?
so...inelegant π
I was thinking that to, but if it works, it works
that's not how that works. you make your own custom event that does whatever you want it to do. you plug that into the event delegate pin
and as long as it's safe, i don't give a fuck lol
okay, so like this, whenever Completed triggers Set Timer By Event, it waits one second, then executes CustomEvent?
correct.
Perfect, thanks
hmm
can someone refresh my memory
im trying to "If ANY is true" then true
what i can remeber the "or" is wrong
or is correct
I have a dash montage with 3 sections - start, loop and end. Start and end have root motion enabled and loop does not. I want to move the character manually while in the loop section by setting the movement component velocity. The problem is that the character movement is overridden by root motion even though i'm not in a root motion section. So i'm not able to move at all if i'm in the loop section, unless root motion is disabled for all sections. Is there any way to get around this or am I gonna have to make three separate montages and write logic for switching between them?
New issue! This timer never runs because it gets triggered like 2 every second, so it constantly overrides the original and starts a new one
Promote the return value to a variable. Check if the variable is a valid timer handle before allowing the set timer by event node to be called.
On tick the most recent spline point is at an offset from the actor's location. When I add another spline point at the same location I'm getting a curve between the points, and that extra curve is longer the greater the distance since I've added a spline point. I've tried setting the most recent spline point type to Linear, Constant, Clamped with no change.
Try setting the previous one to linear
also play with the tangent strength or whatever it's called
"Leave Tangent" seems to be the culprit. Thanks.
dumb question... If i have an actor added to an array and that actor gets destroyed does the reference to it in the array get deleted too or does it turn null
okay thank you
will have to occasionally do a for each on the array and do a is valid then remove if not valid
Hi all, how the heck do you update items in a List View? I tried updating the object, but it seems the entry's OnListItemObjectSet only happens once. Is there no way to update an item? I tried removing then adding a fresh item, but that doesn't maintain list order (and seems quite wasteful?)
How do they get in the array?
I'm a little rusty on the listview, but the On List Item Object Set fires when the entrywidget is generated for an item. So if you scroll, as the entry widget gets scrolled in to view, it should fire. Does it not?
Or do you want to update an items entry that's always visible? Edit: "Regenerate All Entries" might be of use for you.
does IK rig allow a "look at" function where you can get character's head to follow a target?
Yes, correct, but I want it to update when I click
using perception adding them to an array of enemies in range
For example, in my inventory screen, if a user clicks an item, it should equip or unequip (the leftmost column)
Here, I'm just setting a bool to my data
but how can you force ListItem to refresh its widgets?
oh, let me try that
It's not an ideal node for this usecase, since it updates all of them. But might be an easy solution. I think the more proper thing to do would be to tell the entry widget to update. To tell it to Get the items data and update the text property.
@elfin hazel yeah that works (and is inefficient as you say)
you can get an entry widget from an entry somehow?
Is there anyway to remove the slight delay in the "Timeline" node Finished pin? I have a 2 second timeline but the finished pin doesn't trigger until like 3 seconds
that's not normal
show us your timeline curve
finished calls as soon as the timeline is finished
Just a simple linear curve
hmmm
can you show us your use of the timeline?
By use you mean how I'm using it?
This is just called from the press of E
There is a video, you see the delay after it flicks back (god game bar recording is awful)
Seems surprisingly difficult to get the corresponding Entry Widget for an Item.. I'm looking in to it. I guess your entry widget doesn't have something that detects the click, but use the listviews "On Item Clicked" event?
if you put a print on finished
is it also delayed
Yup
print string and update and on finished (make them separate strings)
then record a new vid if you can


