#blueprint
402296 messages Β· Page 733 of 403
Azure is nice !
Still requires 3rd party software tho, doesnt it ?
Atleast when i was using it ..
The git integration wasnt superb
well right now i'm just using github desktop 
i've got an enemy who moves towards the player, is there a way to get him to simply carry on going in the direction he is after 5 seconds instead of continuing to follow the player?
Using SourceTree with it
(enemy.location - player.location).normalize() + distance
you could make a distance around the player, upon entering said distance - a 5 second delay will happen until the next player find update 
@odd ember @onyx token Ah, good ideas! Thank you, I shall try these out. :)
if you're talking about having an AI lose sight of player realistically, you'd need line of sight
well, the character is more like a homing missile, where it homes in on the player but then, after a while of trailing them, i just want it to continue going straight (so the player has a chance to avoid it) until it collides with a wall.
the formula I gave is for the direction of the player from the enemy at a given point
how do you initiate the player following?
so at the end of your missile lifecycle, you can calculate that once, and move in that direction
if it's AI logic you could just put a delay of 5 seconds after your start action and cancel the follow activity
is that onTick?
well, there's like a trip wire, so it's 'On Component BeginOverlap' with the tripwire, then the missile begins following the player.
as i'm curious if that method selfupdates with the new location if the player moves
well, actually i just realised the tripwire is apart of the missile
so, yeah it's overlap with it.
so, put a delay of 5 seconds behind, and create a new Ai MoveTo action where you put in a destination instead of the actor
you can calculate a destination by using the current forward vector of the missle (current missle world location + forwardVector * 10000) for a goal 10000 units away
so something like this?
I figured one solution to detect unconnected reroute nodes at least, using advanced search
Nodes(ClassName=K2Node_Knot && Pins(PinCategory=wildcard))
I wonder if you can make a blutility for that
there should be a get forward vector node for the current actor (which should be the missle)
which takes the actor reference instead of a rotator
Oh, this one?
@spark steppe seems to have a good effect, though for some reason it seems to go to the centre of the map instead of continuing to move forward which is weird.
or not use reroute nodes 
keep dat shit confusing 
no other shall read my blueprints
just buy electronic nodes
Hi. any comments on this macro I made for adding more randomization on spawning an item? if this is ok or if there are better alternatives. I am adding a luck variable stat to drive the a certain select based on the random weight by bool. Thank you
or use parameters and variables as much as possible. it's what I do
maan i can't find it on google 
How can i add more of these again?
why a macro? why a bool?
well if you want true randomness, you could just take the last 5 float digits of the current characters position 
project settings > collision > channels
You could use Seeds aka Streams for proper randomness
I looked up blutilities but it seems it can spawn stuff, but not really do things like delete nodes from your blueprint, right?
I don't know, I've used blutilities minimally
aaaaah that was it! thanks so much!
I do want to implement some level editor functionality though
so that I could just hook the output to the spawn actor without hooking any input. Sorry not a programmer. hehe
use functions, not macros
^ nah, just collapse it and copy and paste everywhere
Although i want randomness, I wanted to add weight on it since my character has a luck variable stat so that it would be favored on one set of items.
ok thank you will try to use functions π
I mean instead of Random Integer you can use a Stream with Streamed Random Int
Way less patterny
using a function library is probably your best bet if you want to use this wide. but tbh I would create an item manager subsystem that works out the details of what spawns
I see. I will read about then, I have not yet tried that node. thank you
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/UserGuide/RandomStreams/
Explanation of random streams and how to use them in Blueprints.
Not too hard
Is there a way to have save frames work with different blended cameras? Right now my Issue is that it will stay true only to the viewport camera
probably better off asking in #cinematics
Well I would like to access it via blueprint optimally, so I can change the percent in game
But might be worth a try, thanks
Hi! I have a really complicated problem. I have a projectile which movement is controlled by a timeline. My problem is start when i shoot multiple projectiles, because the timeline cant start a new track for another projectile, so the last projectile disappear/stop in movement. Can I set somehow the timeline to start new tracks for new projectiles? Or any idea what can I do in this case?
use projectile movement instead of timeline
Value difference/speed
Ended up using timelines instead ππ»
Oh thanks!
is there a way to create a component that's already been destroyed?
well, one of my Character's components gets destroyed, but I want to to create it again at a later point.
I can't seem to find a 'CreateComponent' or 'SpawnComponent' or anything like that from what I've looked up.
AddComponent
Ah, thank you! :D
you have to multiply this vector by something, e.g.: 10000, and then add the world location of the missle to the result before you feed it to the moveAI Node
the forward vector is just a normalized vector with the length of 1, so if you use that as world location its pretty much the center of the map
Ah, thank you! :) That makes sense, I'll try this out! :D
OOOOH, I see now.
Not getting further with the Safe Frame, Is there a way to get the Screen Size of an Actor inside the Game?
not in blueprint, I think you'd need access to the renderer
f me then, but thanks for the hint
there's some blueprint code in there you could try copy pasting
but I have no idea if it works or not
oh yeah def, I'm still digging trough it, might be worth building it from scratch with the formula he provided e.g. the blueprints in case someones interested
in a third person game, using the default character blueprint, if you walk off a ledge, the jump animation will play before the falling animation.
I've tried setting Booleans when I jump and making the jump transition depend on that variable but it requires a target in the animation blueprint.
has anyone tried getting rid of this that could help me out?
it's worth noting, if you need to explain something to me, treat me like a six year old, I'm still new(ish)
If you have a public bool property on your character (say bIsJumping) then you can access that from the animation blueprint in EventBlueprintUpdateAnimation and update your animation properties accordingly.
I think that's already the case
I'd even think that it would be setup so the falling animation happens only after the apex of a jump, and that the jump animation only happens pre apex
at least that's what I remember last I messed around with that
the only thing I've had to change was to ensure the falling animation worked infinitely
Hey guys, I want to create a trail with collision behind an object, currently I am using a splint but itβs super bad for performance. Any suggestions on a better way to do this?
You're using a spline? Depending how accurate you need this collision trail to be, maybe make a Hierarchical Instanced Static Mesh Component with collision enabled (and non-relative transform), and on a looping timer event (i.e. periodically recurring) you create a new HISM element at the actor location and delete the oldest one, effectively leaving a decaying trail of collideable meshes. It wouldn't be super accurate but it would be cheap I think. Maybe there's some better solution but this is just something I came up with off the top of my head.
A HISM would look weird if it were to be going up or down a hill though no?
Like it wouldnβt really look attached to the mesh in front of it would it?
is it static? dynamic?
Static
What exactly is the thing? My idea assumed you only cared about the collision
I guess you could imagine a wall being built behind it
I gotta admit I'm having a hard time picturing what it is even when you say wall
so it's not like a fence or something?
Sure fence works as well. Really I just need something visible with collision behind it
spline should be fine given your parameters. could it be the collision you're using is expensive? or the object itself is expensive?
if not, feel free to post a screenshot
I think it'd clear up things
Not sure sure I am still messing around with it, just started working with splines today so itβs also possible Iβm just implementing it poorly
You have a point, now I see
Using reroute nodes actually makes it more messy
It makes things much more difficult to move things around since you always have to remember about also moving and adjusting the reroute nodes
nonono
that's the wrong approach
you see
the more spaghettio you have
the better your code is

that's my code

so far i got a camera
Reroute nodes are good, I'm not quite sure how they make things more messy π€
and if you want to move groups of things, you'd just drag-select the whole thing... which would also select the reroute nodes so I don't really see how it makes moving things harder either...
I've got a big function and I've organized it all nicely with reroute nodes
But I noticed that if I were to want to move things around then I'd have to really take into account all the reroute nodes all over the place
I guess it's just me and how I prefer to organize things
I guess it depends on how exactly you're using them
at least for me I usually just use them to make sure the lines are more cleanly organized, but it's still reasonably close to the nodes so if I drag select the whole thing, I just make sure to drag the box large enough to get all the lines in and that gets me the reroutes too
note that you can also hold down shift if you drag select, so you can for example do a small selection first, and then hold down shift and drag some additional selections to get the rest of it
is there a way to respawn a component within a BP after an even where the component is destroyed?
use one of the spawn component nodes
I don't know if this is a common usage pattern for this though, so ymmv
sorry for the late response.
that's basically what I thought I'd have to do, but is I try to use the public Bool as shown here, it always needs a target, but nothing seems to be compatible with it.
do you know what the target would need to be?
This is all I've done to set the Bool so far
first pic is in AnimBP the second is in CharacterBP
tried that but didn't work, sadly. there's no option to spawn the components that get destroyed
What component are you trying to spawn?
There's definitely nodes such as "Add Static Mesh Component" which spawns a new component
This is how I am currently adding to the spline
is it the movement component?
it's a particle emitter and a box collition.
Yeah I'm pretty sure you can just use Add Box Collision and Add Particle System or whatever the nodes are called
Depending on what you're doing it might be easier to just spawn these as actors and respawn new actors in and out when needed though
Yeah, I wanted to do that but I needed them to be attached to a Character but I was told there was no way to do it and to use a component instead. Is there a way to attach actors to characters?
I assumed that because it is set to true in the characterBP that, as a public variable, that state would be copied across to the AnimBP.
I can't get anything to do with the character movement in the AnimBP
OH MY GOSH THAT WORKED
Thank you! I've been trying to do this all day
nice :)
does this mean the target can only be something from the characterBP?
Specifically from the Horse Char BP
Oh you are in an AnimBP, you can create a bool in the AnimBP itself and set it to equal the bool from the player. To do this you can go to event graph and cast to your player from the try get owner pawn
@lapis zenith so the trail never gets culled? It just keeps getting more points and meshes and once you have a lot of them performance tanks?
I actually just realized the issue, with my current BP I think I am making the whole spline each time I call it
Awkward timing lol yeah i think I create a brand new one every time with that code?
So I think that is causing the issues just not sure how to only add on to the last point
that appears to have done it thank you
No problem!
You could probably figure out some debug logic that checks if the spline meshes spawned correlate to the no. of spline points. Are you spawning too many?
I don't have experience with updating very large splines at runtime. Is that the source of slowdown or is it something else? @lapis zenith
If it's the updating of the spline itself, like maybe if it's ballooning to hundreds of points over time, you'll either have to cull the old spline points (not sure if this affects the meshes) or break up the spline when it grows to a certain size.
But at the outset I think the task is figuring out what part of it is draining performance exactly
The performance takes a hefty hit after only adding a few points so I believe it is related to it adding meshes from the start of the spline each time instead of just adding on to the last point
can you do anything like a reroute node in a state machine?
this is already messy as hell, I guess I could have multiples of the same state in different spots to make it a bit neater
not a lot better but it makes more sense to me at a glace
a reroute node feature still makes sense to me though for this
definitely remaking the spline each time
Yeah reroute nodes in state machines would be nice
so your slowing down because you've effectively got too many splines in the level?
Basically, as the spine expands it is creating it from point 1 each time instead of the last point which is causing freezing since every time it gets called it is adding a ton of points
I need to figure out how to add on from the last point as opposed to the first point
I'm not the best, but splines in realtime is one of the few things I've actually taken a proper look at.
could I see the blueprint? I may actually be able to help for once rather than ask all of the questions
Splines is something I just started learning today so the solution might be simple but I'm clueless lol
I'm trying to find a specific tutorial that I remember reading when I was looking into splines where the guy clicked on a spot and a spline was drawn around obstacles and the character would walk along the spline but I can't find it for the life of me
still trying to wrap my head around what you're doing with them
but if it's just a static thing then yeah just new spline points
@lapis zenith
This one could possibly help
https://www.artstation.com/artwork/DxV46R
This is a blueprint set up that generates a mesh along a spline path.
Made as part of my major project: The Contingency, I needed a way to quickly generate lots of plague "tentacles" in engine and adjust them to morph the environment.
Features:
- Will only generate a new mesh after a certain distance (to avoid stretching textures)
- Adds a begin...
has a clear beginning middle and end for the spline components
What I am trying to do now to simplify things is make a spline go to the hit of a linetrace and if one already exists add to it
yea
Thanks will check it out
no I mean, what is the general idea behind your concept... not what you are currently trying technically
is it like a grenade arc or something?
Ah, imagine tron bike lines
the screenshot makes it look like he's making a rail or possibly waypoint thing
oh
trails?
Yeah trails is the goal
yeah I think splines will be fine then
could you not do that with niagara and set the trail to stick around for a really long time?
basically you gotta do something like
I could but I want it to also have collision
guess you still need to make the path for the particle though
the collision is part of the mesh you use
is that the UE5 UI?
my recommendation is to have a fairly vert dense mesh (if you're looking to do a lot of smooth movement)
nah some UI pack
it looks really cool
Sorry that reply was for the Niagara suggestion
I mean niagara can do collision as well, but atm probably your best bet is splines
Your screenshot is basically what I am already doing no?
well not if you're creating new splines all the time
This is how I am currently starting it
are you adding spline meshes?
Yeah right after that
and that's not technically the same
you might get overlaps afaik if you don't do whole numbers, but I leave that to you
The main issue right now is that every time I update the spline it creates a new one rather then adding on to the existing one
ah
so everytime the actors position changes instead of grabbing the last spline point it starts from the beginning again
you're probably using it per input then
make a singleton
so if a spline hasn't been created, create one, otherwise use the existing spline
you can consolidate that into a pure getter function
well I am already only spawning one, it is just that one spline draws meshes from the start point each time
so update the start point to be at the end
basically in the for loop, the first number is the start point
so if you change that when the loop finishes, you should start at the end
Any idea how to do that, when I tried I just got blocks of disconnected meshes
what I tried was adding a new point then setting the start point to be equal to the number of points -1
in the screenshot you always start at 0
yeah that is because I removed that logic due to it not working I can take a screenshot of that if you want
IMO it's a question of spacing
if the meshes are disconnected
but again I can't tell because a lot of this is a visual problem, not a programmatical one
this is the issue when I try doing the -1 solution
it only draws the spline at the location I wanted it to move to instead of adding on to the pre existing spline
yeah I said do it at the end of the loop
not when you start it
otherwise you just do one segment
and like I said, I'd recommend you do whole and remainder division instead of normal division
to avoid spacing issues
Ah I missed to put it at the end
That seems to be working thanks a lot
Final question, what did you do with the W&R division values to fix the spacing issues?
the idea is that you have a mesh that is about 100 units in length to begin with, then use a spacing that reflects that
then scale the spacing based on how big the mesh needs to be in the end
the reason you use whole and remainder is that you eliminate floating point errors as much as possible, and use the remainder only between the last two points
(as a scale value)
Hey guys, i'm really new to unreal engine and i'm faced with a bit of a design choice with the way it is layed out for the combat.
I currently am using this to check if I can attack or not, should I rather use a simple "can attack" boolean instead. I understand I would have to reference that same boolean pretty much everywhere but maybe it would make it more readable and easy to follow? wrapping my head around these AND statements is kind of a mind fuck tbh
just thought I'd ask for your opinions?
you should most definitely just have a single boolean for this
you can use a function return
to encapsulate your logic in this case
Yeah I could just collapse it but that isn't really going to change anything under the hood
generally you should probably have a component or a manager class take responsibility for combat
and query it every time you want to attack
idk what those are π¦
classes you make yourself
don't fully understand, im pretty new
have one place where you can have all the logic for combat, including all the checks you need to make it happen
a component is good for this
then, when you want to query anything about combat, you ask the CombatComponent what its opinion is
and it will tell you if you can attack or block or what have you
would that component just do this same thing?
or you could broaden it to be an ActionComponent that has responsibility for all player actions, so any time the player wants to do something, you ask the component if it's possible
or would it be different
ill look into making a component for combat, that sounds like a good idea
so you think I should just use a simple "can attack" boolean
?
that I would reference everywhere necessary
yes
and that pure function would be stored in the combat component
yes
you basically query the combat component for anything combat related
you'd have similar checks
once you got it working, you can always see what you can whittle away to make it work better
6 enums is possibly overkill
I see
ill give making this component a go, sounds smart
that way I could extend that component onto any actor correct?
Do you have a tutorial to reference or a screenshot of this?
exactly
lol
one last question, bit stupid but have to clarify
all of the logic would be stored in that component yes
I just call attack function
well you can have both the attack function and CanAttack function working side by side, and allow the actor that the component is on to hook into that
because while an AI character may use the same combat component, it may not have player input available, so it has to do attacks based on other logic
but yes
to answer the question
I do but it's not pretty
I didn't use a tutorial for my splines unfortunately
but it's a basic check like
if (LastIndex)
{
Spline.Tangent.Scale = Remainder * Spacing * UserScaleValue;
}
@odd ember just starting to find out about making components changes everything oh my
thank u sensei
nvm thought I figured it out lol
@odd ember one question, if I were to split up the combat into, attack component, grapple component etc, would I be able to do something like, cant attack while grappling?
would they be able to communicate?
they would always communicate through their actor
generally I'd say go for one component to start with and the split it up if necessary
so how would I go, ok attack but not if grappling
but if they are seperate components, how do I reference the other components in that canattack function?
if its stored within its own component
what is UserScaleValue in this equation?
that's why I am saying start with it being one component π
I really want to doe π¦
a user exposed value that can scale the entire spline basically
it might not be necessary. if combat includes grappling then, that should be part of the combat component
but what if I wanted some actors to be able to grapple and some other not
otherwise you'll always have to find a way to make the components communicate
for instance, when instantiating them
well just have grappling disabled for those characters
a grapple is just, in the end, an attack type, no?
So is that necessary in my case?
you can leave it out if you don't want it
atomize it. at its simplest it an attack type that corresponds to a character state, right? if you get hit by a grapple, you are being grappled
it's probably worth writing out on paper what the rules are for each type of attack
Street Fighter's rock paper scissors system is a great example of how the system would work
if you're blocking, you can't attack, but you can be thrown. if you're attacking, you can't block, but you can be thrown. if you're throwing, you can't block, but you can't be thrown.
Is this suppose to happen after each loop or should I be doing this for the end tangent each loop?
tbh it might not make sense for your particular scenario. I made my spline mesh for use in editor, not for runtime use
this is what I am setting in that
and the distance is what...? also your tangents should probably be using GetDirectionAlongSpline or whatever it's called
Is There a way I can get the name of this struct?
distance is index * section length
Type name
BPs don't support that level of reflection for structs I don't think
for both?
Dang. In C++ I can use StaticClass()::GetFName
But I need to be able to do it in blueprints as well so I can check if Entity has component by name
type name
the end is Index + 1 * section length
I guess since the components are defined in C++ anyway I can just give list of component names to designers to use.
do you mean components like actor component derived, or something else?
Its a ECS system I wrote. Components are just structs.
same issue
hard to say what the issue is then, this is basically the setup I have
how does it fare with straight segments?
I use ECS with actors, actor components and subsystems
Same issue
You mean linear memory?
I was responding to the spline generation issue
always a gap between the start and end
ahh
debug it and see where it breaks down
and if I place it to close to the last one it gives a really small mesh
I don't know what that means
Ah I got it working
I just made it so it can only add a mesh if it is the full size of the segment and it fixed this issue
Not sure if it is the best fix but i works for this situation
perhaps because it is runtime you need to scale the last segment with the remainder properly for it to work
but also, make sure that your mesh is setup to be a spline mesh
as in, it has enough vertices to not get stuck
something like this should work (modified copy of similar functionality from my project):
static void GetStructName(FName& OutName, uint8& Struct) { check(0); }
DECLARE_FUNCTION(execGetStructName)
{
P_GET_PROPERTY_REF(FName, OutName);
Stack.MostRecentProperty = nullptr;
Stack.StepCompiledIn<FStructProperty>(nullptr);
void* RawValue = Stack.MostRecentPropertyAddress;
const FStructProperty* StructProp = CastFieldChecked<FStructProperty>(Stack.MostRecentProperty);
P_FINISH
OutName = StructProp->GetName();
}```
something like that
the void* line is probably unnecessary actually
i dont know which one you need, but there are a bunch of options
Thanks
Is there a way to replicate player game state across multiple levels? When I load a new map, the variables in the player game state reset, which is unintended behavior. Is there a way to keep these variables across the levels, or do I need to move them to a game instance for that to be possible?
Hey can anyone think of a way for Apply Radial Damage to only apply damage in a Half Circle?
Consider store important values into your custom GameInstance everytime you open a new level or loading a save file.
dumb question, im trying to make a door open when i walk into a box, and close when i walk out.
but if i copy the thing above and use On component end overlap it doesnt work and the door just slams up and down rapidly.
whats wrong with it?
this doesnt work
Addendum:
GameInstance gets created in memory when the game application is started, any values in it survive through level change, and only gets cleared when quitting the game.
Yeah, repeat a line trace using Set Timer by Event/Function Name
I am using a timer
Maybe I should re-phrase;
I want the start of each trace to reach the end point over time
OK and you set Timer at Begin Play? then you can Toggle the Trace by setting a Bool, that you check for in the beginning of the Function on a Timer.
Thats not the issue.
Its one fire for each bullet
The trace is instant, im trying to figure out how to make the line trace itself go from the start pos to end pos smoothly over time
Maybe hacky way of fake tracer with projectiles?
Because going from point A to point B over time sounds like a primitive projectile to me.
Cant because the damage is being applied by the trace itself. I am not wanting to use a projectile
Its crazy to me..... How can something that seems so simple not be anywhere on google
Perhaps because you're not creative enough to problem solve it.
For all I care, you can use an invisible projectile as a slow tracer.
I never asked for opinions on my creativity
thanks though
You don't have to adhere to the rules of physicality (that's what I refer to rigid approaches), and using projectiles as slow tracers is not an alien trick.
If for whatever reason, you need to detect something in between before the tracer reaches the end point, do a linetrace every frame from the startpoint to the flying invisible projectile until the latter reaches the endpoint.
hey i am facing a issue i have a level in which i get 40 fps when i move in viewport but i get hardly 10 when i play plz help
Thats too broad.
Could be a bunch of badly done stuff/code in tick.
Could be effects in the level that are started at runtime.
Could be a huge list of things. Including your hardware
yes my hardware is bad and i am making it for android
Did you turn down your scalability settings ?
yes after turning it down it works perfectly but then graphics u know right
lol yeah, looks like you need both optimization and maybe some new hardware
yes i optimize it to max like itss been a month i watched almost all vedios on youtube i optimized mesh and material both
i did not test it yet on androdi maybe it work there my laptops hang even though my chrome hangs can this be the reason
Sounds like aggresive ticking to me. Make sure you're testing it in Standalone mode, because editor overhead can be misleading.
Type in stat Unitgraph in the console command and see which thread took up the most.
okay thanks for the information i will definatley test it
If the highest frametime goes to Game thread, then might be an aggro looping BP.
If the highest frametime goes to Draw, then might be few materials have bad shader instruction counts.
If the highest frametime goes to GPU, then might be the potato hardware.
well i see many vedios but i never gut such information it is good man very good i definatley testing it and tell u the results
just found out that actor components dont allow timelines... π¦ halp
Can you use a Child Actor component?
Yes, but compared to attaching by code, it's more finicky.
Only real difference is you need to cast to Child Actor, or you could setup an Interface
hey bro results okay i understand of harware one but i am not using any material how to fix that one
It's either potato, or the lighting.
Normally for mobile, you want to use as much static lighting as possible, and less dynamic lighting as possible.
i am using only 1 light taht is sky lighting i just change the direction so it looks like evening
how can i optimize the sky light for android it is movable i have directional light and sky light
Make it static, and build the lighting.
Also make the directional light static.
okay they are movable also i want that it is evening only so if i build where are they now it wont affect any thing
Are you using BSPs?
If it's night time, you won't need directional light, just a static sky light with a faint night sky cubemap.
okay
me no i am not using bsp geomatry i am using blocking starter pack
Hey bro if i make the sky light to static some bulding shadows are becoming more dark and i cant move in that place
Might anyone have been able to get something resembling multi crits? What I mean is say you have 150% crit chance with 200% crit damage. 100% crit would always land doubling damage. But with a 50% chance of landing a double crit that would be 400% crit damage.
you could just use a loop
and loop amount would be ceil(crit chance / 1.0)
this way you can just use random to calculate if it's a crit or not, and then multiply damage by amount of crits * crit damage
so on first iteration, your crit chance would be 100%, so that's a crit (+1 crit amount)
second iteration, you have 50% chance remaining, 1/2 times this will be a crit (+1 or +0 crit amount)
end of loop, crit amount * crit damage * base damage
you can do a line trace every frame by the distance it should move during a frame
im not sure whether the physics tick is the same as game tick but it should be good enough for your use case
Hi. how do we mathematically convert a fire rate float variable to a rounds per minute (RPM) for FPS? I am using a set timer by function name and attached the fire rate float on the time input for the fire logic. Thank you
Bit stuck on the math for this one, I'm trying to calculate a mesh size depending on the FOV of the camera, but I'm getting the mirrored results that I want. For example, FOV 50 should return 2, but returns 0.5, FOV 200 should return 0.5 but returns 2 - How can I invert that?
@trim matrix Ah yeah now that I see it it makes total sense, was overthinking it a bit, thank you π
1 / period = RPS. RPS * 60 = RPM. Is that what you mean?
so if your firing rate is once every 50ms, you'd do (1 / 0.050) * 60 = RPM
(in that example, it's 20 RPS or 1200 RPM)
Thank you so much. I was kinda confused since I had an old fire rate logic that has an opposite float (using 7 for a machine gun) hehe
The new firing logic is using 0.1, so that is 60/0.1 which is 600 RPM.
So to make it easier to compare with real weapon RPM how do I setup the variable with the math instead of trying to calculate and just adjust the float directly on my weapons, sorry so dumb trying to find out how to convert it
wow thanks, ill try to sink it in
yeah 60/period would give you RPM
you could make a custom "pure" function that converts the period (in seconds) to RPM or vice versa
quick primer on pure functions: https://www.youtube.com/watch?v=8tVmCXMAJ7M
well the video might be confusing lol so the tl;dw is pure functions are nodes without execution pins
which is useful for things like conversion nodes
And if you want that conversion node to be universally accessible (as opposed to class specific) you can put it in a custom function library @storm vigil
can someone explain to me what this means? i have started using the profiler today, i am the guy with the airship project and at the end of the graph there are like 8 flying ships at once in the scene.
I'm no profiler expert but some things can be deceptive, like wait/stall/etc. means that it's idling while some other task completes, so the things in red in your screenshot aren't necessarily the source of slowdown. You should look up a guide on how to interpret it
I have the weirdest issue, I have something set up to rotate but at certain parts my rotation slows down
it's the same part every time
here's a video showcasing it happening each time seemingly in the same spot
would anyone happen to know what could cause this because i'm really confused
it is a set actor rotation
i have an system that changes the speed but i made sure to use a print string to check if it changes
and the speed variable stays the same
and yet.. i slow down every time at that one section
<@&213101288538374145>
Every time that node gets called it executes your rotation math/logic. So my first question is; why are there four execution lines going into it? Is there a chance it could execute multiple times per frame? Make sure the execution flow is working the way you think it is.
My second question is: are there "ticked" events driving that logic, such as Event Tick and Axis Event (IIRC)? The thing about ticked events is they fire once every frame, so if your framerate changes, the rate at which the logic is executed changes, which can result in variable movement. The way to counteract that is to scale your math by the frametime -- Get World Delta Seconds. For example, if you're adding a flat offset to rotation each frame, you should multiply the input offset value by the frame time before adding it up to the final rotation.
You don't have to answer those questions to me per se, but I'm just giving you a couple leads to look into.
thank you i'm going to save this comment
yeah i'm using branches basically and each branch gives a different value
The framerate thing is definitely something to look into aswell if all else fails
Right now i'm kinda assuming my navigation system is interfering with my rotation, because when i leave the navmeshbounds I no longer seem to have this issue edit: nvm I guess it may be framerate instead
Trying to convert raw accelerometer/gyro data (XYZ vectors polled every 0.1 second) into βArm Swingβ event (like, repetitive big motion that is similar to a series of previous motions). Any pinpoints how to approach it?
Like for vr? Since you didn't get a reply yet the way i did something a little similar was using inrange, and comparing my initial position with my current position. You could start this based on a button press but maybe also with a fast movement I don't know
although in my case it was using multiple inrange's with branches and a int gate to make specific motions
is there a way to get the main camera used by the player controller?
I'm trying to avoid using the player character component and would rather see which camera is being used by the player controller
yeah that should work
Is there a way to plot a changing variable in blueprint editor (like on the node) in real-time?
Hi guys, can anyone help me for working on triggering open level when my Health Bar UMG reaches 0%? I'm in VC now
how to add an "event" parameter into function, like in SetTimerByEvent ?
Just open the level if health <= 0 in your player when it takes damage
yeah but it's not that easy in my case
hmm, it's hard to explain in word actually. I'll try but if u still dun understand then pls join me in vc if u avalaible.
So in game level, I have Terminal Actor and Health UMG, both are separate BP. Once the UMG progress bar reaches zero, that means Actor is dead n game over. I've set bullets which decreses 3.5 point to decrease health bar. I've successfully decreases the health but fail to open level.
I tried to use Event Dispatcher but it still doesn't work
Singleplayer or multiplayer?
If ur using float make sure ur not trying to == 0.0, inaccuracy and all that
A VR singleplayer game
Then you can directly open the level from the Terminal
No need to dispatch to the player
If the terminal is the game condition
yes but noi working, i tried to put it in Terminal but one bullet just one hit KO terminal without decreasing health point
Then you're having a way bigger issue
Never store stats in the UMG
If you're doing that
Like the actual terminal HP in the HUD
welp bcoz it's VR, so i dun put it in viewport instead i put it at specific spot
in order to do that, i put the widget in a bp
in here?
No
in bp
something like this?
No
First of all
<=
Not >=
Then the Bool into a Branch
True -> Open Level
And how are you calling Game Over
Where is that
You should check it directly after Terminal took damage
So after Overlap
I imagine in your case
a custom event
And what is calling it
Is that in the UMG?
No nvm there's BeginPlay
In what class is that
UMG BP, yeah that was done b4. im working according to ur help
Show me where Terminal takes the damage
This is the bullet BP, I set it as decreasing the health of terminal collider
u mean put it in bullet BP?
I would personally not, but for debug, you can try
Then you can design it all better, lol
lets hope this works, but do i put it b4 print string or what?
orite let's see
orite first u're genius, but half lol
it does works, but it seems like the collision is not reacting immediately. My health bar goes 0 for a couple second then i was sent into the certain level
which means i almost there lol
Fundamentally a design flaw
yes it's a flaw, it made me headache for several days
i nvr use that lol, although it explains plainly what it does
Are they? π€
Never heard of it getting deprecated tbh
I use GAS too so not up to date with that one :p
What I'm trying to get at tho is that the Projectile setting directly the Health of the Terminal feels like a violation of concerns
But if those are getting deprecated, RIP tons of tutorials xD
hey man, u still available to help?
Will see lots of where is this node questions
im sorry for bothering cuz it gave me headache
What's up
How can I set a position offset for a texture? I know you can use a panner but I want just a static offset, not one which is moving.
i just tested the bp, its open level delayed 10 sec n the bullet not destroyed when in contact. which not what i wanted.
you just add the offset to the Texcoord (UV)
How do I do that? When I mess with the values of texcoord it adjusts the scaling, not the position
How do i randomly assign a role to players in a game im making a murder mystery type game, but i dont know how to randomly tell players if they are a Killer or an innocent. i know i can make a tags and have the tags tell the player character what to do with it. but actually giving the players the tag or variable randomly is out of my knowledge. please help
@dark crow if in ur game designm how would u setup the mechanic
I've tried texcoord into an add node and then plugged into UV but I'm still not getting any changes
Is there a way to create a custom UI control for a public Blueprint variable? Use case: a string field that has a dropdown button on the right that lets you select from a list of sample values (e.g., from other values currently in use), or type in a new one.
show a screenshot of your material
20,20 is wayyy to much offset
UV is 0-1
Numbers are arbitrary, I'm just trying to see some movement so I can work out what to do
so try adding 0.2
ah gotcha, let's give it a go
Brilliant, I figured even if I was going above max value I'd still see something! Also if I take the output and plug that into a panner node, that should still essentially start from the same position shouldn't it?
well, 1.2 is the same result as 0.2
and i'm not familiar enough with panner node to answer the last one
And presumably 20 is the same as 1!
No worries, you've got me on the right path. Thank you!
Let the terminal remove its own health, projectile should just say how much damage it does, basically handle all health removal in the class that is getting its health removed
So if you ever want to create new projectile types in a future, you can use the same event to apply damage but only give a different damage value
ive been trying to get this AI spawner working for awhile now, I got it to spawn in NPCs at a random point, but for some reason its roaming script breaks, and I've tried multiple ways to get it working but just seem to be stuck;
ive searched up and it leads me to a rabbit hole, and asking some other folk in other places they just tell me to watch a 2hour video on how BPs work.
it asks for a target, that target being the Actor in another BP
i have tried casting to actor and also making a varible but both lead to no results
Well yeah you need a ref of it
If there's only 1 in the world you can use Get Actor of Class for easy access
what kind? ones ive used hinders no results. including. actor of class
what are some reasons why a cast fails?
if i get this variable
comiples no prob
but then get this
actor of class isnt compatible
same with casting to the BP itself
i'm casting to ThirdPersonCharacter and the object is get player character. that usually works no?
ok thx.
Why is your spawner doing the ai? That makes no sense.
its only spawning them in, not doing the AI,
Hello can anyone tell me why when i press space to jump my character stops following the move to location i clicked and drops straight down?
That is how i move it will be a single player game the possed pawn is just from a tutorial on how to move with mouse click
You're not even selecting a class
How do i get the data out of the an interface from an actor?
i determined it is implementing the interface
but idk how to call the functions on the actor
i see
ah yeah
i derped and made it an input not an output
oops
i forgot to set it, though it still dosent trigger the custom event
after setting
I have some text boxes in ui im trying to set like this:
i am getting the error accessed None trying to read property NameLabel
but it definitely exists
Try renaming your text object temporarily.
i think its beacause my parent ui doesnt have the latest version of the widget, every time i change i child widget do i need to re add it to the parent?
yeah i readded it to the parent, it works now
is there anyway i can make variables for a bp from a editor utility blueprint?
Anyone know how I can freeze the camera position in my player character?
can I switch from one camera on the player to a camera on an enemy?
yeah probably. You can use pawn possession to do that
Oh, that's a good idea! I'll try it, thanks.
I'm having some trouble making star fox style roll control where the L and R triggers bank the player ship. I have a setup here where the player ship automatically pivots, around based on movement input for the sake of aiming and feeling good to move around, but I'm trying to apply the manual rolling on top of that
What I keep getting is a result where the manual rolling creates this really fast spinning, when I'm basically just trying to add an interpolated extra 90 degrees of roll left or right to the ship's existing rotation
This is my blueprint setup for this so far, the first set relative rotation is used for smooth automatic pivoting from player movement, and the second one is meant to add additional roll values
I feel like this is the completely wrong way to do this
So I'd appreciate some advice. I'm aiming to handle the ship's pitch and yaw rotations separate from the position and movement to give consistency with the retical movement between rail movement, all range, and other methods of flight control
tbh it should probably just be an animation with root motion, but
grab the right (or left) vector when you start the roll, use something like a timeline or a timer to tick said vector in the direction you want for however long you want it to move, then overlay the rotatation in the same timeline (or timer).
so I can overlay timelines together? That's good to know, thank you!
if you use a timeline, you can use the float track to create an alpha value you can use to lerp between for both distance and rotation
no not overlay timelines
overlay functionality
you just need one timeline
in fact, just one track in one timeline
oh fascinating
and this could layer on top of the method I'm using to automatically pivot the ship for aiming?
I have no idea what other systems you're using
but this is really simple and can be done without any interference with other systems
are there any examples around of timeline overlay functionality? I'm not super experienced with timelines within blueprint
just extend the execution thread
save the alpha value/promote it to a variable
it's really nothing special
so as the timeline is doing its thing, it updates both location and rotation, but separately
Is there a better way in blueprints to check if the renderprocess of taking a screenshot is finished other then checking the target folder ,,repeatedly,, if the specific screenshot is inside the folder?
no idea. any file writing to disk should be handled by cpp tbh
well sadly cant do any c++ atm, im doing it like this
If the node doesn't have a latent pin you can use, checking on a timer every few seconds is probably best
whole thing seems a bit questionable seeing that high res shots can be quite demanding to do, so if there's no async support having this done in BP and putting a timer on top of it seems heavy handed
I'd look for a plugin first to see if it's possible at all, either through BP threads or just something that handles the operation wholesale from the side of the plugin
Tbh it doesn't seem that bad, it's just a "does a file exist" check which shouldn't really be that demanding if you run it every couple seconds
it's a bit iffy if you can't just get a delegate for it but Β―_(γ)_/Β―
if it's not async I'm not sure if the timer will run in time
in a BP, how do i access variables from other BPs?
you can cast to the BP you want, or if you need something from a specific BP in level you can create a variable for that BP and set it to expose on spawn, then in the editor select the BP you want to access as the target of the variable. Then you can make a "get [variable]" node to access whatever you want to find
So i have a flashlight mesh attached to a first person camera, and when i walk/run the flashlight moves weirdly because of the intensity of the camera shake
Is there a way to make the flashlight not be affected by any camera shake?
in your player actor, is the flashlight part of the same hierarchy as the camera? can you screenshot your hierarchy?
Yes it's part of the camera hierarchy
But if i wanted to make the flashlight always appear on the screen, how will i do this if it wasn't attached to the camera?
there's different ways of doing it. but your camera follows the transform of your player actor, so even if the camera and mesh aren't part of the same hierarchy, they should still follow the same movement by virtue of being on the same actor
also why I asked for a screenshot of the hierarchy
that would make it easier to show where it could be placed
Oh sorry I'm not on my pc right now
hi, so I have a quick question. I am creating an interaction system and I need to know what is hit and what to do based off of what is hit (like a door or an item). Now I got a hit output but how would I handle this? Like how would I execute the correct function based off of the output.
Create an interface. Pass in your hit actor into the target for the interface. Then implement the interface in any relevant actors.
and then they just check to see if its itself?
either an interface, or if you have logic that is common for all interactions, I'd suggest making an InteractionComponent that you can add to any actor that needs to interact with players
ultimately each actor will still have to respond to the interaction based on what they are (e.g. a door would open, a document would get picked up, a person talked to etc.)
okay, should I have one interface or multiple per interaction?
or like per function
if i were to use it again
one interface can have multiple functions
but if you have specific cases of an interaction being different every time you interact with it, you might want to think about how to build a system around that
alr thanks for the help
is there an event I can use to perform a save before the game/app closes (including in editor)?
Hi, i'm using a simple AI system with the navigation mesh and i want to update the navigation mesh in a BP is that possible ?
i know i can change from static to runtime in my project settings but that is not exacly what i want
this exists
but I'm not sure that's exactly what you're looking for
I do attached for sword but i don't know how to do blueprint in my character to drop the sword
I want help what the best blueprint that can make a character drop sword in character
anybody ever had this problem ?
im trying to make a gear system, when i equip armor (skeleton mesh)
chest mesh takes the new skeleton but it doesn't show
Unreal Engine 4.22
Do you like it?
Please Subscribe & Patreon me:
patreon.com/sorosmark
I do all this blueprint for attached sword
But I want help what the best blueprint that can make a character drop sword in character after I attached sword
how can i change this line trace to a projectile?
is it possible to have a collision box set to "on component hit" but only have it active once you press a button on ur keyboard?
detach
Example, control it however you like.
awesome! thank you so much!
was aving trouble with global slow motion, but now working on a sphere around the character
I'm so confused I'm literally dying
When I add my interface I get this error
By the way, it's a default 3rd Person Character, literally NOTHING in the event graph has been changed, and there is not an already existing "Gained_Collectable_1" within it
I'm confuseddd hhh π°
Lol sometime unreal be like that
It sure what the error is tho
Other then just one of those ok unreal moments
so ive made my character in the "pawn" class and am unable to use the "character" functions, ie. jump, launch character, is there any way to make these available to my "pawn"
Add a Character Movement Component.
is it that simple?!
Had a feelinggg :'}
Probably need to restart it : (
@icy dragon i cant seem to find it in the "add component"
Tried typing "character movement" in the search bar? IIRC it's not exclusive to Character.h
yoyoyo does anyone know how to access an individual keyframe value at runtime and change it on a timeline?
Cant do that
Ussualy if it involves keyframes then cant change at runtime
is there a way to reset the settings of a child back to that of the parent
for a specific component or whatever
like i changed some stuff in my child BP's capsule component, and i want it to just inherit from the parent again
i just reparented it
For any particular value you've changed, there should be a yellow arrow next to it that reverts
is there an easier way to move the players camera? so I have it at its main view atm, but when player walks into a trigger I want the camera to move in/out to change the perspective
system I have currently is reliant on switching to different cameras, which works but is clunky.
that reverts to default for the setting, not to the parent's setting
^
Reparent to Character or implement Jump yourself.
Why are you not using Character?
How to reparent? Will I have to remake my character?
I was following a blueprint course and I didn't want to remake a character, as I am finding it hard to make a sphere "character"
I'm super new to this stuff
If you want it to behave like a walking character, use Character. If you need something Character or the CMC can't do, then roll your own Pawn.
I whipped up a trio of classes to see how it actually works... Test_base --> Test_child1 --> Test_child2 with a variable that each child overrides. Hitting the yellow arrow on Child2 resets the value to Child1's default and not Test_base's default.
In Niagara (particle systems), that UI actually provides two arrows -- green and yellow -- to reset to a value to the immediate parent or base (module) default. Too bad BP doesn't have that.
is the anyway I can Run EditorUtilityWidget from AssetActionUtility?
the specific thing i was messing with was collision settings, and hitting the yellow arrow would set it back to the default setting for the preset rather than the specifics i picked in the parent bp
is this a place to ask noob questions?
If they're about blueprint, yeah
I'm trying to get "Get Mouse X" green node to work, but it returns 0.0, at least if I hook it up to Print String
I was following a tutorial and realized my BP is just not moving/working, hooked up that node to Print String and assumed thats why
I assume that's probably a basic mistake somewhere?
Are you using a binded input axis for your mouse x ? Or just "get mouse x" node ?
Materials - I have a texture pans in one direction. I know how to alternate the direction using sine/cosine but how do I have the texture pan in one direction for, say, 2 seconds and then reset to the original coordinates and start again (in the same direction)?
Just get mouse X node
I think to use the node you have to make sure input is not disabled for the actor
how do I check that?
First you have to actually have an axis binding setup for mouse x
Otherwise it will always be 0
If I'm not mistaken
Try adding an "enable input" node, you'll need the player controller as well
If you're posessing a pawn it should do that by default though, perhaps it only does so for inputs you've created in project settings
just makes me wonder why would that not be mentioned in the tutorials.. alright let me see where this takes me
For debugging I would add enable input on event begin play
Two questions:
1: When you duplicate a Blueprint in a world, can you instance a new copy of the blueprint itself, so each blueprint actor has it's own logic? Instead of creating a new Blueprint Asset.
2: Why can't blueprints reference actors in the world, when you can in the level blueprint? Personally, I think that's bad design.
Because a Blueprint is meant to be a class, i.e. a template for an instance of something you use later.
So no to both questions ultimately
is there a way to make a glitch effect for umg widget tiles?
with bp or do i have to go with niagara
?
is there something like this node for a regular bp to make different things happen depending on the int value?
@rose elbow It's called Switch: https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Blueprints/UserGuide/FlowControl/
yeah found it now, thanks man π
Anyone knows if there is a way to cast to a specific class that comes as a parameter?
That's not how casting works
most likely you can solve whatever you need that for either by using interfaces or by using some base class which you can cast to instead of a parameter class
What I meant was:
instead of having it fixed in the node, having it as an input pin
so I can hook it up with for example a string variable
@heady burrow what are you trying to achieve that would require that? There is probably a better way to do it than what you are envisioning.
in a RTS'ish game I'm building I have a spawner building that uses an array of strings as base of units to spawn, in waves
for some things I need to cast the result of what I build
yes I can use interfaces
but, wanted to know if there was a way to cast more dynamically
Something like this:
There isn't. If you have a limited number of cases you can use a Switch to select which cast to run or you can cascade multiple casts until one works. Otherwise interfaces are probably the way to go.
Ok, I will change my approach, thanks.
Hello. I am new dev and i am trying to create a Notepad for my actors (with a widget with editable testboxes) so players can create notes inside them. Something like what you will see in the next picture:
My first issue is that i want this note widget to have in the field "model name" the name of the actor which is parent
I create this bp but it didn't worked. so could anyone say to me what i am thinking wrong
Thanks for your time (and really sorry about the bad English π )
@kindred marshyou need to apply some basic debugging to understand where it goes wrong. Did you use Print String to print the value of ToString to make sure it is what you are expecting? Did you add a break point to your SetText functions? Do you get any message in the log saying something is wrong? Or nothing?
Well i have i print text and it works fine ( when i push play i can see the name of the actor in my screen but it doesn't seems to "set it" in the field of the editable textbox. i also have this messages which i try to understand them
it seems like the function SetText(Editable Text) that i am using is wrong so i am trying to find what is the correct choise
is the anyway I can Run EditorUtilityWidget from AssetActionUtility?
I tried this, but doesn't open it, though it actually creating it, since i can print the ObjectName
these references to some GAS attributes are constantly breaking, and when I add a new one it doesn't let me select a default value, anyone know what's up?
this is the warning msg
figured it out
Ah, yeah, I think that's what I was looking for, thank you! :) I knew there was a way to do it but couldn't remember how. XD
You need to read up on what casting actually is.
Casting is basically asking the question "Is this object an instance of this class? If so, let me treat it as that class."
I know for a fact that's not how casting works in other languages (i.e, you can put a breakpoint in the constructor and gets called), is that different in UE4?.
I don't know of a single programming language where you can choose the cast target type dynamically
What are you talking about? What does that have to do with downcasting?
you are saying that casting doesn't change anything about the object, but in my experience when you cast, it creates an object of the class you specified and uses the data as input.
Casting definitely does not change the object, nor does it create a new object
if that works differently in UE4, thats fine, I'm not an expert by any means
I don't think there's any language where casting creates a new object of some type
might be misremembering then
Ya I've never heard of that happening, but I've only worked with C likes
Dynamic languages like JavaScript can take a value and treat it as another kind of value, eg. take a number 1 and use it as a string... but this does a type conversion, not just a cast
Yeah, you're not making a new object when you're casting, you're changing how your code perceives the object?
I do remember while playing around a few years back that the constructors got executed when casting, and then I thought it was a common practice
No no, constructors definitely do not get called.
disregard my comment then
Maybe you modified something else which triggered it, for example compiling or saving in editor could trigger constructors if for example a construction script was triggered
Hey Mates
does anyone know how can i implement checkout page into mobile app with blueprint?
The Client aslo gave me some information like:
Hmac key , Key ID and Gateway ID (this infos bllongs to a real bank account)
I would highly recommend seeing if you can achieve it by embedding it into a browser widget or something
If your application directly touches things like credit card information, welcome to the wonderful world of PCI-DSS compliance
Please add this to the Check out page so actual money can flow in the app. This is attached to real bank accounts
Although if you create a form in your application which just forwards the information to a payment gateway, and it never goes to your server or anything like that, you might avoid being in scope for it
that's what client asked me
You would probably need to start by looking at the documentation of the payments gateway they want you to use
There's no general advice for it other than usually they work via sending an HTTPS request with a specific set of parameters, to which they produce some kind of response
but the parameters and response depend on the gateway you use so you need to look at their documentation
i guess i need to forward infos
cause they sent me a website which is interface
the webiste is Payeezy
i'll do
is it possible to handle it with blueprint?
Maybe, not 100% sure. I know there's a plugin called VaRest which allows you to send HTTPS requests from BP's, but I don't really know anything else about it
Oh got it
yes i know Varest as well but not sure how to use it
UE has a builtin HTTP module, but I think it's only available from C++, so unless you've got some plugin or know how to write C++, might be tricky
Sounds like a client who's just begging for legal problems lol
is there anyway to change a variable from a editor utility BP?
Change/create
In your case it sound better to respawn it, but it shouldn't make much of a difference. TP the player, do a "load game" and you'll be right back at it
I use the Prefab Plugin to spawn Prefabs. So now what does this error mean?
AttachTo: '/Game/Game/Maps/UEDPIE_0_Endlessrun.Endlessrun:PersistentLevel.PrefabActor_0.PrefabComponent' is not static , cannot attach '/Game/Game/Maps/UEDPIE_0_Endlessrun.Endlessrun:PersistentLevel.StaticMeshActor_0.StaticMeshComponent0' which is static to it. Aborting.
How to call equivalent of C++ Constructor in BP?
@ruby meadow Err, do you mean the construction script which is also OnConstruction(), or the actual class constructor?
If you mean the class constructor, you cannot call that in blueprint. You simply set variables in class defaults, or add components in the components list.
Oh, thanks.
Are they equal? So, they are using for a specific placing of Actors and on in the world?
Ye?
PrefabActor_0.PrefabComponent has movement set to Stationary / Movable while StaticMeshActor_0.StaticMeshComponent0 is Static
@ruby meadowOnConstruction override and the Construction script are the same thing. A Class Constructor( Such as AActor::AActor() ) is very different. Similar, but very different.
Class Constructors are more used as class wide setup of a newly instantiated object of the class.
Construction Script is used to modify instances after they've already been instantiated, usually used by the editor when placing or moving objects for level design, but it has other purposes.
Everything is set to movable
@heady burrow It's likely that you might have hit a breakpoint in a class constructor if it was never referenced. Class constructor will be ran for the CDO. Casting for the first time to a class can cause this to load in the editor since it needs the CDO at that point for the editor to use it's data. So technically it does create a new object when casting, but only once, not each time you cast.
Oh I see, interesting
Yeah I don't think I tested it more than once
Hello. i cant with Cast to aMouseRotate blueprint.
can someone help plase?
dead server
Hey there guys , i have a quick and somehow basic question , i want my blueprint actor ( not the main character wich is als ) to check if the main character is moving , and if it does so to destroy it
structs and struct arrays are massively broken in BP
@odd ember any ideeas regarding my question aswell ? sorry for bumping on you
yeah please dont ping me
like i said , sorry π would be glad if you could help though
Random question, but does anyone know how the performance relating to physics actors work? Like say I have a physics actor not moving and interacting would it eat performance?
maybe to a limited extent checking for collision events?
You can get the velocity from the CMC and if it is > threshold destroy the main character
Physics actor which are not moving nor interacting are usually put to sleep. When they sleep their overhead is minimal.
ah nice that's good to know thanks
This said, they will still be checked for collisions because this is one of the conditions to wake them up.
Yeah that makes sense
this plus you need to find a way for the other actor to communicate with the player actor
Hi, I'm trying to make a blueprint that displays images from the internet on a set of cubes. I have a map of 'image URL' strings each corresponding to a Material Instance Dynamic. This is how I try to download each image and apply them to the materials:
However, the changes are all being applied to the same material instance. I can see one block cycle through all the downloaded images when I press play, and the rest of the blocks keep the default material instance image.
Is there a way to fix this? or have I taken a terrible approach
well the delegate gets overridden every time you re enter I'd imagine
I think this comes back to the notion that stuff like this needs to be done in cpp
what with access to Futures
I added in a print for before and after and it is giving me the correct number of downloading + success messages
oh, I just checked that and yes it is
i'm just not sure how to make it not do that since i've tried checking through the map contents before the downloading takes place, and there are all of the image URLs corresponding to the correct materials
the issue isn't the images (yet)
maybe I can try setting a local variable to one instance each time, or would that probably not make a difference?
the issue is that you're using latent nodes inside of a loop
so the for each does not wait for each download before continuing?
no it does not, as said previously
each time the delegate either gets overridden or stopped out (I don't know which, I'm not familiar with the boilerplate)
is there anyway i can change variables with editor utility?
instead of a loop you could manually use a GetNext type construction that gets you the next iteration as soon as the previous one has gone through @hasty spear
what do you want to do?
yep, that is what I am sorta working on right now
For example i want to have a widget editor utility that makes/change variables
i didnt
ie this sort of thing
I would do something like this perhaps
(really I'd do it in cpp, not BP)
you probably want another check for if it's the end of the array as well
yeah this seems to be turning into something that would be easier to write as code heh
but I will see if this thing I'm doing works, nearly there
any time you're dealing with latent nodes outside of delays or very simple AI movement >> cpp is the answer
cpp code sorry
if the texture is null, presumably
another quick question, do you really need to connect the two execution in/out thing in Map 'Keys'? what for?
this
why it not just um
get them like everything else
yeah you're making an impure operation on a map
ahh
the map has to collate all the keys
ok yeah i see
is there a set class default ? so i can change variables in editor
are you talking about making variables instance editable?
and it's working now! not the prettiest looking thing and I probably could manage without the counter, but it helps me think about it lol
thanks for the help and thanks @trim matrix as well
If you're setting the class defaults, then you want to set that value in the blueprint itself in the class defaults.
If you're wanting to change the value when it spawns, then make the variable "Expose on Spawn" and "Instance Editable" and you'll then have a a value you can input on the spawn node.
Where's can be problem.
I have a simple first person movement.
I have a problem, that when I rotate camera, my rotation doesn't change.
So, rotation cords still the same.
As origin.
Camera rotation is relative to the pawn... I'm hoping you're rotating the pawn?
Well, it says "use pawn control rotation" on that checkbox...
Camera probably shouldn't be a child of the mesh I'm guessing.
If not, still the same problem.
@ruby meadow your controls update ControlRotation, correct?
@faint pasture
This is C++ code, but maybe here I made a mistake.
Pretty simple code.
you're talking in #blueprint right now π
Yes, but I think that this is BP problem.
Where are you SETTING the control rotation?
Do you mean control?
This is built in feature.
It's not magic, I'm assuming you're calling Add Controller Yaw from the axis events?
Well, I will try another method, get GetViewRotation().
Sorry, for the C++ code, I thought that this is BP's problem.
I can rotate camera.
I mean, when I move, he takes origin rotaion.
Not actual.
That I have, from my View.
you're using set control rotatation?
Damn.
I have no clue what you're saying there. What do you mean takes origin rotation? Is the camera following the control rotation? The way you have things set up, you have the camera and the pawn copying the control rotation.
is there some hack to save the WorldContext reference to a variable.
The one you e.g get when calling GetEditorWorld
Well.
I found solution.
To use, also, built in method, GetActorForwardVector().
Damn.
Why would they prevent it?
I want a local var in my function so I dont have a wire going every which way
How does one get around the fact that if an asset is referenced by another, they both need to be loaded. So far so good. I have a FL containing helper functions I'm using throughout the project. They are referenced virtually by the whole game. Does that actually mean all the assets referenced by the function library get dumped into memory? π
function libraries use static functions
and assets in BP that are being manipulated are mostly pointers
use soft references to only load something that is actually needed when its needed. Regular references will load everyhting they reference into memory
so for most people their entire game will load into mem on start, don't think I have ever really seen a tut anywhere where thats mentioned
But but... π soft refs seem so complicated and I never used them...
I mean it only eats up ~800 mb RAM, but idk..
I was gonna say
meh, depends on your game anyways. For my game most things need to be loaded anyways so I 90% of cases I dont bother with soft refs either. If the game was bigger it would become more important
true, but no one else is making tutorials so π
mine is roam+turn based battles. I see no reason to hold all the units+meshes+fx+anims+mats etc in memory if the player is in a level where he will never encounter them...
Someone should define the opposite Dunnin kruger effect. When you know too much and think you know it all
you dont see physicists being all "I know everything about black holes". it's usually "well we can't be certain..."
Hey guys. I'm new to UE. I am trying to get it so I can change my player's speed in the details panel. I'm still trying to understand how to use the nodes, variables, and etc. This is what I have atm:
I have a variable "Speed" and I know that by clicking the eye, it makes the value editable. The problem is that I don't know how to use it.
hey guys, I am doing replication so when my character picks up an item it disappears for everyone, but when he drops it, only the character that dropped it can see it, no one else can... any ideas how to fix that?
your speed is defined in your character movement component
Right. I think I'm misunderstanding something. brb.
bit of an odd request, but how would one go about recreating the bullet bills from super mario galaxy
missles that launch out of a cannon and follow the players path
so a homing missle
an actor with a bullet esque mesh that update their destination to the player's position each tick
iirc theres stuff for that builtin the engine
can be done with projectile movement and some vector work
