#blueprint
402296 messages · Page 700 of 403
i felling like an idiot... im new to what comes to blueprint/coding... i might having trouble atm
oh don't worry, i'm with you in that same boat 
like im trying to develop a horror game, and i suck at coding, i only know to make the scenes, but what comes to coding i just suck
im currently using horror engine pack from the epic store and im still having trouble
aren't horror games REALLY code intensive? 
@sacred minnow I'll suggest you learn a little bit of coding. Dont doubt yourself, trust me you can get it
Hello any idea why the Export To Disk node tells me my texture is invalid althought i can see the texture in game ? Thanks
im trying to learn but it just so complicated
@sacred minnow it takes time, but it's not impossible
yeaaa
You set up the collision properly so your objects block that channel. Then you tell Line trace to use your channel instead of visibility
Have you read the docs on the collision/trace system?
That'd be a real good place to start
hm alright, seems to be a bigger topic, i thought it'd just be a small lil thing.
Alright, i'll go read up on everything and watch some tutorials, thanks! 
oooh now i get it
It's not that it shows the name
it's just that the linetracebychannel just doesn't fire at all unless it hits that
ok that makes sense
i thought it'd just spit out the name of whatever it hits, and i was busy trying to like "Name equals xyz string"
ok neat, thank you guys! 
This is what it outputs
yeah, i was searching for "line channel output" thinking the channels just did that and i was gonna use them as a mask
I recommend using the hit actor pin to recognize what object it is
Maybe but I fail to see the difference between that and a general trace channel like Visible.
+1
You dont necessarly need a custom channel, the only time it would be useful is, if you want to push a button throught water, but then you might get away with using camera maybe
The actor itself can tell you if an object is interactive
Okay, but now i'm basically masking between "can be interacted with" and "can not be interacted with"
So the question is, how do i mask those?
Like, if it's an item, that can be picked up, i want different stuff to happen rather than if it's a chest or an NPC or something
is this dumb? 
masking by this?
I have an interaction component
like
exactly
You probably want all your itneractive things to inherit off a "IneteractiveActor" actor
And cast to it
And call the common "interact" method
Press E -> Sphere Trace -> select closest InteractionComponent -> DoStuff
yeah, that's what my item is. I have an item, and i make a bunch of children off of that item called "Bread, cabbage, carrot, etc. etc."
stuff the player can pick up
Nah u don't want that. Use an interface or a component
Sphere trace wont let you interact precisely if you have more than one item in your FOV
well i don't want the closest to do something tho
I want only the one i'm directly looking at to do something
Otherwise you get halfway through making your game and then you realize you want to interact with a character, then what. Either use an interface or a component. The reason why I use a component is so interaction can have state without having to re-implement bCanInteract everywhere
Also so interaction can happen at a certain point like a button or handle
Well just modify how you select the interactable. Line trace, sphere trace with dot product, however you want.
yeah i'm using a LineTrace currently
@onyx token if you at all think that you might have interaction do more than just picking up items, then you need to make it an interface or component.
but idk if just keeping an empty Scene called "ThisIsAnItem" inside my item, and then doing an if contains _thisisanitem_ do stuff - is smart or dumb 
+1 for Adriel, an interface/component is a good idea
well i am using an interface
maybe i could make a custom Actor Component? 
and just slap that onto anything i want picked upped?
picked uppable
pick uppable
english 
ooh this seems interesting
does anyone know why Add Force has the Accel Change option but Add Force at Location doesn't?

thanks so much for helping me!
PRobably because the bone interaction cannot affect the actor's movement? just guessing
what is dot?
@stray wagon Okay, but there's AI vision and then there's things you want to interact with. Another thing you could do is alter the presets so things don't block Visibility.
@real garnet the Dot Product (https://www.mathsisfun.com/algebra/vectors-dot-product.html)
Math explained in easy language, plus puzzles, games, quizzes, worksheets and a forum. For K-12 kids, teachers and parents.
thx i am looking now
fair enough, but that's pretty edge case no? Like a glass bottle may be ?
You don't want AI to see through walls. Do you want a wall that has a little nook to mean players can't grab things from the nook
This isn't some niche arcane thing
Write your game how you want, but the tools are there to be used
It wasn't apparently working with Visibility for whatever reason. Introducing a new channel might help.
Wouldnt visibility work with the nook? It's not using simple collision box is it (sorry if i misunderstood what you mean)
I guess. Which isn't good enough for the systems I write. That's probably true for most wall/nook combos but do you want to leave that "in the wind"?
i managed to display the text, ty guys
so i deleted a value that i didn't need out of a structure-
And suddenly none of my blueprints have the item structure as a variable anymore - and if i want to add it back in - i can't add it as a pin type 
and if i wanna reload it, it says-
wut? 
oof
So apparently, Structure variables are just fundamentally fucked in unreal engine

https://answers.unrealengine.com/questions/584850/structure-variables-get-corrupted.html?sort=oldest
And this is a thread from over 4 years ago, and it's apparently still not fixed
Is it possible to smooth movements using Play MOntages with rootmotion anims?
So If I take Scale value and World direction from Input forward and Input RIght then use Play Montage. But I'm trouble smoothly playing the animations. Using In Blend Out helps but still not smooth
thanks i understand @faint pasture @bleak rose
what is it you want to do? Like swing a sword and have it blend in and out?
I was trying to create movements for my horse using root motion anims. Since I want it to work in multiplayer so I don't want to use Blendspaces. So I only have montage as my option.
hey y'all, got a question I couldn't find a tutorial for.
I have a pretty simple inventory system that works off of a datatable, with an item structure that has some things influenced from enums. In this case, I have an item rarity enum with 3 different rarity options, and I'd like to be able to control what color text shows up in the inventory hud for each rarity
right now in the item tooltip, this is how I get it to show what the item rarity is in the first place
how it shows up in the hud
I'd just like to control the color of the item rarity text
You can set the text color in the widget. You would do it much like the same way you're setting the text.
Use a select color node based on enum, I'm assuming your rarity is an enum
please help me i have a 4gb ram pc with intel pentium, some reccomendations to run ue4?
You're gonna have a bad time.
Do you have a GPU or integrated graphics?
intel hd 4000
Oof
You will be able to MAYYYBE learn the engine by starting from an empty project and slowly making something simple, but your computer will shit itself if it tries to load up any of the bigger example projects. It will be possible to run but performance will be bad at anything above low settings.
Turn off realtime viewport and set all engine scalability settings to low
thank you
If UE4 just runs too bad on it, look into Godot
You'll have to learn to program no matter what. BP is programming
Godot is much simpler than UE4 C++ but not quite as simple as BP.
I mean have you tried just downloading the engine and firing up a template project or is this discord your first stop on this journey
yes i just fired up the project and tried to lower the settings
i watched some tutorials to use blueprints
every tutorial i watched sayd that blueprint is easyer for beginners
It is. If it can run it then I'd stay with unreal.
You'll want a better computer tho for sure. My laptop is a Ryzen APU and it does ok. I wouldn't want to be GPU shopping right now.
i'm helping my mom at work for 10euros a day, maybe by some months i'll be able to buy a decent pc
Is there a way to stop Added Components From Becoming Trashed when Updating a Value during Runtime?
I've never heard of that happening. What do you mean by trashed?
Whenever I change a Public Value during runtime In the simulate play. The Added Components I added to an Array Get Replaced with this
I'm not sure but that might be just so things can get cleaned up when you stop simulating. Are you wanting to edit the game during run time and then have those changes saved to the level?
No I'm just using it for testing. If that problem only happens during simulate then it probabaly wont be a problem
hey guys, the animation channel is not helping, im having an issue with animations, they work fine in the asset viewr but when i use them ingame they are distorted, any faced this before?
Are you using an animation blueprint or testing by just playing the animation at runtime in game?
im using an anim BP
and the animation montages were good before
something happened that i dont know
dragging the animation directly also works fine
i found out that if i remove the aimoffset it works properly
what am i doing wronf here
Hello, I'm having some trouble... I have "BlueprintA" and "BlueprintB". I have a custom event in BlueprintA that works for everything INSIDE BlueprintA, but if I try copy / paste the Custom Event into BlueprintB it never fires. Is there a way I can get a custom event I created in BlueprintA to communicate with BlueprintB?
For example... If I put this logic in BlueprintA
I get this:
If I put the following logic in BlueprintB it never triggers the breakpoint
@main wren What is supposed to be firing that event?
I've set it to fire whenever the player's head goes "under water"
Ehat calls HeadEnterWater? Anyway you should not be copy pasting code, subclass a base character class.
Show how you do that.
I guarantee you are not calling that event on blueprint B
Yea I know that part but I don't understand UE4 enough to know why
Are there any good tutorials that cover the issue I'm running into?
But anyway call me you should not be doing things like this. You should put all the common functionality for your characters in a base character class. What you actually spawn in can be a subclass of that with different mesh or variable values etc
It's literally the most basic thing about unreal engine, so any blueprint tutorial will do it. But you don't need a tutorial. Just make a new subclass of whatever class you have that is working, and work from there. Instead of making blueprint a and blueprint b, make blueprint a, and then make b a child class of blueprint a
Is there some other way I could get them to communicate without making a subclass? There's a lot of stuff in each of them individually so it would be difficult to merge them together.
Just reparent them both to a parent class and move whatever functionality needs to be common to that parent class
They don't need to communicate with each other, you need to trigger that event the same for each one.
Nice, I'll try that. I found this video
In this tips and tricks episode we are going to see how you change the parent of a blueprint class in Unreal Engine 4 and Unreal Engine 5.
But what exactly are you trying to do here? Are blueprint a and blueprint B both pawns or is blueprint B like a weapon or something and you want to just let it know that the head has entered water?
Both are custom components
sorry for the delay, got pulled away, about 45 or so
Wait a second, hold up. What exactly do both of them do? This sounds super screwed up
Probably just adds a layer of confusion by mentioning delegates 😅
Both BlueprintA and BlueprintB share the same parent.. Actor Component
What do they do? Like is one supposed to be a health component and the other is supposed to be some sort of thing or what are they? You're not giving us a lot to go off of
Curious to why both components need to have an event fire when under water?
Sorry, I don't know enough about UE4 to communicate the issue probably. I'm trying to work through that.
Flip the question
One handles floating and one handles swimming
Those should both be the same component. Is the actor that they are on based on character?
Yea, they are both inherited by my player blueprint
Or are you using physics here?
I have disabled physics for now. I'm just trying to communicate binary changes between the blueprints
The character movement component already has a swimming mode.
To tell the components that the head has entered water, the actor should just get each component and set a Boolean on them or call an event.
But that sounds like the least of your problems. So you have three components that influence the movement of your character.
That's what I have done also. I was going to try to call the boolean variable itself from the parent but I thought it would be easier if there was some way that I could just call BlueprintA's event inside BlueprintB
Makes it confusing and unessesary dependency between them
Totally not the concept behind a component
Stop calling them blueprints if they are components, you keep using all the wrong words and making it very confusing. Anyway, the proper way to do this is to use the swimming mode in the character movement component or make one component that handles all movement in water
Having a separate component for swimming and for floating is like having a separate component for walking and for running. It makes no sense
Yes, I am using one component that handles all movement in water currently, but I'm using a custom collision system to detect if the player is in a liquid.
ForceOnCharacter = BuoyantForce + SwimForce
Anyway, the major takeaway here is the communication between components should be handled in the actor. That's the whole point of components, that they are small independent bundles of functionality.
Ok, I'll try to re-approach the problem with that perspective
I am working on a fluid mechanic system and we just have one component that is used for drag, buoyancy, everything. Just sum all the forces together at the very end of the update step. So it might look something like:
BuoyantForce = (0,0,1) x Depth
SwimForce = (InputX, InputY, 0) x 500
OutputForce = BuoyantForce + SwimForce
Of course you'd have much more involved math but that's the idea. Calculate your terms and sum them.
Thank you for the feedback everyone.
Hello, I apologize for my ignorance. I am still very new to blueprinting.
The blueprint highlighted has variables that i created for it. I need access to those variables and i dont know the vocabulary to google/youtube search to find this answer.
I know if i try and get actors of class, it would be as if i am spawning it in, but its already here. I know this isnt what i need.
i just need to gain access to the 2 variables in it. can someone please point me into the correct direction?
setting it seems like the logical first step, but when i search for the variables, they dont show up... unless i uncheck 'contexst sensitivity. then it wont give me access to them anyways.
if i get it, the variables still arent here.
thank you for direction.
@thin owl you need to get a reference to the actor
That's a child actor component. To get the values out, you need to do a "Get Child Actor" and from there cast to the appropriate class of the child actor object.
@dawn gazelle @faint pasture This is progress! It is clear that I have access to what i need, thank you.
Im calling the vars through the 'set' commands and i have my own vars in this BP that i am overriding... the thing is, they arent overriding. i feel like i missed a step.
OH I THINK I GOT IT
damnit. thank you guys. I need another boost if you can please.
TURRET BP:
BARREL BP:
BULLET BP:
so basically, i have the bullets velocity being overridden by the barrel, and i want to override the barrel in the turret.
inside the barrel BP, the velocity is set to 1000, but im overriding it in the turret, and its velocity is set to 0, just to test it. its still moving at 1000
the rate of fire variable works btw, just the velocity doesnt.
how do i spawn an NPC actor with the references in the details panel linked?
this is how i'm spawning the actor in the level blueprint:
I fixed my issue. I found out that the way i had it coded, the barrel wasnt overriding the bullets velocity. i had to insert an override in the barrel for a new velocity, not use the set command.
everything works
Hey guys, so I made this to spawn a spark effect when a bullet hits something. This works perfectly when hitting another actor, but not when colliding with walls or anything else. How do I tell it to do this when colliding with ANYTHING?
still new at this, but maybe you can do a line trace and break the hit result to get the hit location?
heyd does anyone know if its possible to world align a skeletal mesh socket?
i have some modular armor pieces but the pivots are not aligned to the bones so the relative rotations are wrong
how would I set that up? like where would I get enum names on in the blueprint?
@thin owl if it works for your design, just have the turret inspect the gun and the barrel and calculate all the numbers
The same way you are already getting the name of the item, just get its rarity as an enum then use that enum to select the color.
And your items struck, you presumably have a field for the items name, just make another field for the enum representing the item rarity.
You should be able to just go into the character mesh or skeleton asset and move the socket around
yeah i was doing that but its tricky to align the shoulder and arm sockets so the armor sits correctly on the character. feels like something i shouldnt be doing manually as well because my artist modeled the pieces in exactly the right position
was trying to copy the world rotation of the bones then paste to the socket and multiply by -1 but that doesnt work for all the pieces
@quasi frostTechnically you're not doing that when colliding with anything. You're doing it when overlapping. If you want it to work with hit collision, use Event Hit as well, but projectiles are often done on hit and not overlap.
I ended up being able to set widget text color for every enum I needed by doing this for anyone interested.
This looks like a bind - there should be an output pin where you'd want to connect the color and opacity instead.
ended up getting it to work in the above post. thanks tho!
And don't do this. Use a select node instead.
oof thats wayyyy easier than the mess i created
where would I plug select into though?
Your enum value
err
Connect up the return value where you want it, that'll set the inputs to what you need.
Then you can feed in values to the inputs.
Ya that's what I'm talking about.
Connect the return value first to the set color and opacity.
As you already have a "Color" defined, that sets the return value output type.
start fresh
Drag off from "In Color and Opacity" and type select:
Then you'll need to use "Make SlateColor" nodes to set the options.
nice got it to work with make slatecolor instead of whatever I was doing beforehand! thank you so much
🤔
index 4 = item #5 in an array. If your length of the array is only 4, you can't access index 4.
length 4 = 0,1,2,3
index 4 = 4
yes. i need a coffee.
the keys array should be 5 with the last index of 4 though
i think i used a length node instead of last index somewhere
🤔 🤔 🤔
i should've done this in c++...
anyone know how to add/multiply these two vectors to get it so that the movement will be on the purple axis? (i'm using a linetrace every .15 seconds, so i can use the normal)
All of that container madness? Yeah
normal goes... up, right?
i guess averaging normal+that black vector should give you that purple one
i think so, but i'm sorta messy with vector math so woo, which is sorta my issue xwx
Is there a way to make event tick independent of frame rate? I need an event that constantly runs and doesn't slow down or speed up with framerate to control my characters movement
You can't really, that's the point of delta time
Can I make this timeline longer than 5 seconds?
Best you could do is make a timer that ticks at a specific rate, but those are checked at fixed points tied to Tick
were you playing in editor?
I think I might have had the simulation paused instead of stopped
I keep making that mistake lol
@insert#1020 project gun vector on to normal plane
It's actually possible to change the tick rate (see the Class Settings panel, or use a node to dynamically set the tick rate). The result though will be equivalent to using a looping timer event (Set Timer By Event node). Blueprint doesn't really run independently of the frame rate AFAIK; it'll always be quantized to frames... except for audio playback where you can use the Quartz timing system.
anyone have any idea why the collision of the actor isn't going away after it is destroyed?
Hello guys, I am really new to UE4 and I followed the tutorial from "Intro to blueprint" by Unreal Engine.
on Part 9, or 8 on their original playlist, I have removed the level blueprint programming but i got this error:
PIE: Warning: AttachTo: '/Game/UEDPIE_0_BPTutBasics.BPTutBasics:PersistentLevel.SmolHouseBP_4.Wall+Door' is not static (in blueprint "SmolHouseBP"), cannot attach '/Game/UEDPIE_0_BPTutBasics.BPTutBasics:PersistentLevel.Wall_Door_400x400_8_GEN_VARIABLE_StaticMeshActor_CAT_1449.StaticMeshComponent0' which is static to it. Aborting.
what does that mean?
It's in the mobility settings of the actors involved. You cannot attach a static actor to a non static actor. Think of it like trying to attach a building to a car, won't work, would it?
You have to change the mobility settings of Wall Door to moveable or dynamic, I think?
@uneven lake
I just changed every actor in the blueprint all of them to static on the details menu.
Then the problem solved.
Sorry on the blueprint windows, on the details of each of the actors.
Can I know is there any future problem if I just clipped my actors
For example, I just clipped the walls together (like sandwiched them) and compile it.
Will there any problem? Rendering or something down the line?
ignoring the spaghetti (prototype), is this for each loop breaking the "pass by ref" ?
because everything comes out as zero from this function
do i need to re-construct key-value pairs and then add them directly to the "add to" map?
because apparently, values array is not working with references
its not relevant to foreach node. Its KEYS and VALUES node. they essentially create new arrays so you are referencing to newly created arrays. @elfin inlet
so you want to take from a map and add to another map? @elfin inlet
@elfin inlet this will take values from first map and add them to second map for matching keys. is this what you need?
your disabling collission on the mesh, not on the actor. depending on what follows after your destroyactor, I don't believe it is destroyed immediately
destroy actor is the end of the chain (except for a debugging print node)
then it should. may be active show collision flag in viewport, breakpoint on destroy and do frame by frame to see whats happening. how does it show up that it doesnt go away?
yes i was suspecting them >_<
exactly, then i zero the first map (optional)
so i need to do this, thanks @worthy tendon
Are there any info on how to make system for players to be able to change their input defaults? I've located "get input settings" and "get action mapping by name, but there seems to be no "set action mapping by name" node, so I've stuck.
and all marketplaces examples of settings screens with that functionality cost money...
Oh, thanks!
There's a node for remove too, and also add/remove for axis mappings.
Will it rewrite a button if it's already assigned to another action, or that's something I need to check manually?
You can have multiple binds to an action. So, it's something you'd need to manually manage.
Hm, ok, so is there a way to clear a button from all actions?
Can someone help me figure out why my socket rotation isn't being added to my neck rotation rotator variable. It defaults to 0 and causes the Neck3 bone to lay flat instead of its original rotation.
You get the rotation of bone Neck3, and then you apply that rotation to your bone Neck3? What is the expected result?
Do you want the head to always be looking in the direction of the arrow?
@vapid ibex I'm trying to apply a z(yaw) rotation but keep the x(roll) and y(pitch) the same. This is for my characters head to follow the direction the camera is facing, but for some reason my character wants to look down. Heres the result
it follows the cameras z(yaw) fine btw, I'm just trying to figure out why the x(roll) and y(pitch) change
I think maybe it has something to do with the Get Socket Rotation function coming back null, but I don't know how to debug that to see if thats what's actually happening
Bones have different axes, IIRC, and you want to make a LookAt rotator.
Anyone have any good resources on sleepers/Physics sleep states? in blueprint?
We did it by finding a lookat rotation in the AnimBP ( we also had to break the rotator, and modify its values to accommodate for the bones having different axis than world ) and then using LayeredBlendPerBone to apply only to the head, and then calling Transform(Modify)Bone in the AnimBP
This is how I've done it :
You don't need to break rotator, you can just adjust the bone axis inb this node
Yeah, but you will still need to do transform to get it into the space you want (as you are doing, in our case break and recreate worked better as we also clamp). As in Up/Down means different things at different times, we use this for not only head look, but also aiming the entire body while blocking with a shield 🙂
And we only transform one bone as it applies to the children automatically, no need to transform the entire child chain in our case (FK)
Any advice on
Finding the bounding box dimensions of a static mesh
Using that data to find average positions
using that to create uniform spawn points
Trying to make it where when "Object B" is destroyed a number of "Object As" spawn within the space it left..
You can get the bounding box of an actor (in editor or runtime) using
//const FVector location = actor->GetActorLocation(); // The actor we are spawning on location
const FBox box = actor->GetComponentsBoundingBox(); // actor bounding box
const FVector location = box.GetCenter(); // The actor we are spawning on location
const FVector extent = box.GetExtent();
BP Equiv could be: https://docs.unrealengine.com/4.26/en-US/BlueprintAPI/Collision/GetActorBounds/, in stead of using actor component bounds.
As for avg pos that is a case of adding stuff together, and dividing by how many was added, or if you are looking for finding the total extents (or level bounds) then its more a case of finding and remembering the extreme extents to find the level bounds
Uniform spawn points you can probably achieve breaking your spawn bounds into a grid, and using the center of each grid position as a spawn point
I miss Houdini right now
Thanks. Yeah trying to figure out how to get the data in BP isnt the easiest so far. That is what I was figuring. Thanks a bunch
Also, maybe checkout this, seems to be a blueprint only solution for spawning stuff based off of tiles. May be useful or give you some ideas as to come up with your own uniform grid system
https://forums.unrealengine.com/t/video-new-update-2-rts-real-time-strategy-example-using-blueprints-only/5082
thanks
some how a 1mcube at 0 0 0 has a center of 0 0 10 and there is nothing else on the actor.. itd just be too easy ..
mmm.
I get 50 for extents. Which is correct as I believe it is 100x100x100
LogBlueprintUserMessages: [test_bounds_C_0] X=50.000 Y=50.000 Z=50.000
ah now its twerkn
Yeah the collider that I thought I removed wasnt fully move
d
get local bounds makes it a little easier
man this math.. got me like.. "if i have a finger but 3 toes and 4 hairs are on the ear, then the car bought milk?"
Hi Guys,
How do you check angle in range? Like between 350 and 10, so it does the shortest path and not the whole from 10 to 350. ?
how do you get the smaller angle between the 2 angles?
how can i initialize and keep different structs?
im trying to understand blueprints coming from programming background
i have made a gun struct, and i would like to instantiate different versions of them, like you would in code
@tough plume Did you create a variable in your blueprint as the struct you made?
not yet, im trying to figure out how to make a system where i can predefine different guns and then switch them
should each gun be a child of some global gun blueprint?
Yes
I mean, it's easier that way. You make Events, variables for base functions
like Fire, Ammo, etc..
then you just redefine them on each BP based on the MASTER one
or global
you make like BP_Gun_Base
Then you just change variables
This is also good if you need to implement a generic function in all your guns. You just do it in the master and not every time in each gun
It's a time saver and a lot more organized
is there some guide to naming conventions? for the prefixes like BP
Hi, I’m using the ‘Get random reachable point in radius’ node which is working well, but it seems to have a hidden limit on the radius. No matter how large I make the radius it always seems to find a point close to the given origin. Any thoughts?
how would i expose parent variable to a child @lime fulcrum ?
You can't see them by default but if you right click and search they'll be there
but you don't need to, if you do Get Variable, it will show up
let me try to loop through the results...
when trying to find something by class, why it doesnt show custom blueprints on the list?
Anyone familiar with dividing cubes into equal parts? Or fitting specific volumes into a set three space?
CubeA is 10 10 10 to -10 -10 -10
Every 10^3 of space a CubeA can spawn, that value is how many segments(spawn points) the SpawningVolume needs to be divided into. Giving the vector location for each available spawn point..
so a 100 100 100 -100 -100 -100 SpawnVolume can spawn 10 CubeAs
What are and how do you get the data for each spawn point?
Anybody familiar with how to get this data?
Sure that quickly gives us the 10 cubes we know can fit in there. But they need to spawn without overlap and we have to tell them where to spawn. That part is seeming a bit more complicated than I expected.
does anyone know how to get the last known input of the player?
like the last known inputaxis or something?
pull off of that
think every input has that and you can have it set a variable "lastinput" so its updated at the start of every input action
then reference "lastinput"
hope that helps
You can use a simple method like if you know the center, and the extent, you start with 3 loops, (in this example I am only doing 2, as I am actually doing something semi-related at the moment, but this example should translate )
pseudo:
for x = -extent, x <= extent; x+= cellsize
for y = -extent, y <= extent, y+= cellsize
for z = -extent, z <= extent, z+= cellsize
spawn (x, y, z)
Having trouble following the pseudo code.. but I feel like I think I might have a possible thought flickering in that direction..
yeah I feel ya there
Guys I want to make this turret look at player and change its rotation only along the X axis but i am unable to do this please help
its the loop body part that im struggling to understand in the psuedo I assume using negative positive extent to get each segment of it and the loop series is gonna populate each quadrant effectively or something along that. But the values I am way out of depth on
anyone good with math? I have to make a value from 0-1 exponential. it's hard to explain exactly. would anyone be willing to hop in a call with me to help me with it?
and run the series by the number of divisions you get
yeah basically how can i make a float in range of 0-1 exponential
i feel like im prob not explaining this that well lol
it's hard for me to explain exactly
lol i know man mb trying to think how to word it
hmm ok let me check that out
any help here guys?
basically i need to have this float value that's in range 0-1, if it's at 1 then it will output as 1 but if it's less than 1 it will be exponentially less powerful
are you thinking of min max normalize?
where a scalar value, becomes normalized between a 0 - 1 range, given a minimum and maximum kind of thing?
I used it but it acted weird
the value of look at rotation around x axis almost to zero every time
With yaw it happens like this
im honestly not sure im bad at math don't understand the terminologies. ok so basically right, I'm making this soccer game, the problem is that when a player kicks the ball with low power, it still curves too much. I need it to take the kick power (value of 0-1) and make it so if your power is less than 1, it will curve exponentially less
yeah, i think Lorash idea is good, raise it by a power then. it should give you what you want. it should be exponentially weaker below 1. As you dont want linearly
so do i just use the power node?
ok and i do this using that power node you mentioned?
lol why is that a question
how would you add a bullet trail with raycasting? i have tried using beam with niagara, but it doesnt have an option to set start/end point
im big dumb mate sorry
idk bro im stupid sorry. thank you for the help 🙂
seems to work well ty @trim matrix and @thorn ermine
I'm starting to see this pattern, where people use the cast->valid thing for evertything
is there a cleaner way to work?, seems like a hack
I've read something about using interfaces, not sure if it addresses the problem
like not casting?
You dont have to cast to use is valid
and you shouldnt use casting as best you can
interfaces do address that pretty well
look into design patterns
All you need to do is to combine Yaw with some other rotation offset
design patterns in blueprints?, first time I hear of it
personally i just cast once, then set the casted actor as a variable so i don't have to cast everytime i need access to it
any reference?
Design is computational logic and mechanics. So the practices and methodologies from most any programming and design you come across are translateable across each other syntax is where it might get fishy
just google design patterns cpp
example I'm seeing now, when using SphereOverlapWithActors, you then iterate over the results and cast it to your character, if valid -> do something
or design patterns ue4 but like you noted "most people cast"
well if valid/is valid are great at making sure there is no empty value and can be useful at preventing redundancies and load
seems like those awful null checks that usually are a symptom of bad architecture
solution for this case: let me add a filter list that includes my specific actor type
so if the overlap doesnt identify a valid actor than the code stops right there instead of running through with an invalid param and nothing but behind the scenes data usage is happening
is valid is 8 bytes of data that can save sooo much
any way to add there my type?
you mean the is valid node takes 8 bytes of space in the BP file or what?
oh, how did you come into that conclusion? I'm just curious really because I've never heard of this before
just from my experience programming
running bitflags to "optimize" and stuff goes into how much each little int "cost"
so using an int to register 4 - 8 different bool values can save you 32-256 bytes and if its trhough functions that run constantly or often on like a server with 100s of people it can be the difference between a 30g load when ever spell caster decides to cast magic missle or a 10m one
that was an extreme example
now im curious about the back end..
afaik Is Valid is roughly equivalent of a nullptr check in C++... however you need to also keep in mind that blueprints have a small abstraction cost, so it's not directly comparable to how much a C++ x == nullptr would cost
(but it is cheap nevertheless, it should never be a problem to use it if you need to do that check)
right! its just good practice. Yeah looking at it in BP the way its set up it might be a little more. seems it does a reference than bool rather than a smart pointer but it might some reason it wont load up the IDE when I click on the function in there ive been having the issue for awhile now
says its loading it up in the bottom right corner but then nothing happens
then i get too lazy to fluck with it further >.<
yeah it seems to sometimes not quite work, make sure you have the symbols installed from the launcher, that made it work better for me
alright, so is there a way to make SphereOverlapActors to filter from a custom list and not the default enums one?
from the launcher? Do tell more.. that might be something I missed when I was setting thing up on this new rig
click the little arrow next to launch in the engine versions list
in options it has debugger symbols as one of the options you can install
BRUHHHHHHHHHHHHHHHHHHHHH
Ive literally been using that as an excuse not to start back on my cpp tutorial shiit!
Thanks
Are your user control changing function also looks something like this? =)
how do i start this in game?
hey guys do anybody know much about low poly fps pack
Just that it's low poly and doesn't have much to do with programming.
is there a way to convert an enum into a string? 
like when i have an enum that has "Enum1, Enum2, Enum3" - i'd like to give out the string "Enum1"
Do be careful with that It's not very good with gameplay stuff. There are packaging issues with enums as strings sometimes.
I tried to do it for some localization stuff. And you can get around it. but in the end it was just easier to make a enum argument, ftext out function to convert the enum into one of many FNames for datatable lookup.
I would package your project really quick and make sure that the text is still what you expect it to be.
oh god 
Just make yourself a conversion library or something. Make a function with your enum as an input, do a simple Switch On Enum and return some directly typed text.
Of course who knows. Maybe Blueprint Enums are full of black magic and work well that way. I'm used to C++ defined enums.
Is it here i ask for help with blueprints lol?
Usually.
Perfect! ive been struggling with this problem since yesterday
So, lil context, im quite new to blueprints, i figured trying to work on it myself would be the better way to learn. So: I'm trying to do a game that starts black and white.
I found i just had to turn the saturation down from post process and the blend weight at maximum.
My game contains "items" which are required to bring back the color as the game progress.
I've tried making a lil blueprint linking the score to the blend weight, without results
Since I'm quite new like I said, I have no idea what's not working. The score still goes up for every item, but the blend weight doesnt move, colors doesnt change
What is calling this execution line?
Do you have any warnings about invalid access or anything when exiting PIE?
I would put a print before the delay and after the delay, and check what ItemsGather is in both places.
item gather is the score
print string?
You need to test this execution line you posted to make sure it's even being ran.
What is calling your Custom Event?
Nothing you showed is calling it. I assume it needs to be called by the same line setting the score.
so I should all link it together?
The function can't run if nothing calls it.
If you don't call it, yes.
You sir
or maam
is a fricking genius
I made it 😄 thank you so muuuch
i didnt think the sequence would be so easy to make, but im learning
oh thats such a damn relief
Haha. Give it time. You'll pick up a lot quicker than you realize.
On a side note. You should do all of your logic in one go.
Not quite like that.
but i guess if its all linked, it is indeed logical to do it in one go
You have your pickup doing a destroy on itself and a special effect. And then completely unrelated, you have your character doing other overlap stuff that relates to score. If for any reason one runs and the other doesn't, then you'll end up with bugs.
Instead, you should have a custom event in your Pick base class, and call that when the player overlaps, then set score, then call the visual function.
pick base class?
So your player overlap would be OnEventOverlap->CastToPickup->DestroyPickup->SetScore->DoVisualStuff.
Then in the Pickupitem, you have the custom event DestrtoyPickup that does Destroy on self, and visual effects.
yup thats exactly how it is right now
No. Right now your two actors are using their own overlap events.
OH! oh! i get it!
so the destroy pickup from the event overlap of the character IS the custom event?
So i can start a custom event from another part of a blueprint line? right?
if i understood clearly thats how you use them
Gotchaaa
man, im learning more about every stuff on here than with tutorials or explanations on youtube
999,999 times out of 1,000,000 the way you have it set up won't be a problem. But that 1/1,000,000 chance leads to frustrating to track down bugs.
right
now, i linked it too hard on the score - blend weight, the 1 score brings the blend weight to a full 100% dammit ahah
Also something that may help you with that effect are global material parameters. Very useful for that sort of thing.
They're basically global variables that will be project wide, that your materials can pull and do visual effects on a level wide scale.
You see them used a lot with like seasonal change materials and such.
Change one value and every material in the level can change with it.
Can i include it in my blueprint or would it need to be used as a texture bp?
You change it via blueprints. But the setting is used in materials.
damn damn, alright, ill remember, for now my brain is not memorising that xD
oh, also, is it possible to make the blend weight, sort of gradually go up?
instead of boom. ,25 boum ,50?
like smoothly fade or something?
You could just put it on tick most likely since it's probably going to be changing so often. Make two values. TickBlendWeight, and TargetBlendWeight. On tick do InterpTo or InterpToConstant.
at the end of the line linked with the blendweight right? lemme check that
or you mean like a variable float?
yo i'm with a lil problem here in my User Interface, is this the right chat for it?
if its related to the blueprint, most likely i guess
it does, so i think it is, if it isn't i'm sorry lol
@ocean pollen
Should i remake it like so?
Instead of setting the blend weight directly, you set a target value, and use that target value to calculate a new blend weight every frame.
mmmh but my event tick is taking something already ahaha, unless i can make more of em
Just sequence it.
so here's the problem, in my user interface i'm trying to use Event Tick to update my UI when i switch my weapon, although for some reason it's giving these errors, i clicked and took to the User Interface, but i don't understand what's wrong in there
it means at some point GunCurrent is not valid, you can place a Is Valid node before using it
ooooh so thats what the sequencers for! gotcha
it takes me to these graphs, but i don't understand, everything is working fine in the game, and if i switch to Event Construct it does update the ammo, but does not update when i switch my weapon, so the UI is still the one from the first weapon
oh i'll try that
oh it worked! i'm not gonna question what that node does, i'm just gonna mark that as a fix
do i make a 3rd pin for the delay?
Not sure I follow?
from there the delay, but in the 2nd pic, the then 0 sequencer goes to the stuff i was already using the tick for and then 1 is for the lower part of your example
oh wait
they arent linked nvm
the top part of your example, should i do something like that or its just a quick example ?
@trim matrixYour issue is that the blue variable in your last screenshot is a pointer. It points to an object that you're trying to get the value Ammo Current out of. If that pointer has not been set to point at something, it will be null or invalid. By using IsValid first, you're asking if that pointer is valid, if not, you're just returning a blank "" text.
that target weight blend doesnt appear on my options? is it normal?
gosh, i didn't knew that, welp, that is gonna fix my bugs! thx
It's a custom float variable.
i am aware of that
even if i look for a target or something, no options appear to link with the post process
Drag off of the PostProcess pointer and do "Get BlendWeight"
Also, shouldnt that custom event be linked to something else? Because now im just the more confused
Event tick runs once for every frame drawn to the screen. So if your player is running at 60FPS, event tick runs 60 times per second. What you're doing is having the player collide with an object, then setting a value immediately, like you were with the blend at first. Then tick will come along and slowly move that value to your target value with the FInterp.
I get what the event tick is. I'm talking about your "ItemsGathered" custom event right above it
And i cant do the event tick one, because like i said, the PP on the left cant be linked as i showed already. So now im stuck
That is your ScoreAddSaturation event.
right so I shouldnt touch anything from that bit
any idea why the post process "self" target then?
The what?
lol.
So apparently
When you convert an enum into a string, and then into a text - it gives out the name of the enum.
But if you convert an enum into a text immediately-
It gives out the number of the enum

unreal engine truly is magical
nvm apparently it decided to wkr
work*
But i just made these 2 float variables (blend weight and blend value) , dont they need something to also change?
okay now its all messed up...
I just put the post process back to full, so its greyed out. I dont think your solution is working?
- Why is it full color once i press play
- why does it go to grey back to color in mere seconds?
I put blendvalue as 1 and blend weight as 1 too, so now its full grey like needed but it just suddenly jumps as colors
its not being a fade or anything
nothing makes sense to me at this point...
hey lads, I'm having some trouble with implementing dynamic splines
i'm just getting an array of vectors, then adding the spline points at the correct index
however, I've noticed that the curves are twisting into themselves, I think it's something to do with the tangents? not sure
https://cdn.discordapp.com/attachments/816640056335794209/868583198181957632/unknown.png
https://cdn.discordapp.com/attachments/816640056335794209/868583262111563816/unknown.png

Why doesnt it continue to add color and just go back to black and white?
Im currently working on making a console the player can interact with (fps perspective), that puts the player in a top down view over the map, where he can place blueprints on the level in a RTS style way. I was wondering what the best way to go about this would be and if anyone here had some good ideas of how to structure this and what elements will be needed
I assume the console could just be a pawn that the player can possess when he gets close, which has a camera above it that can take inputs for movement
i figured out the collision problem. I had to go into the project settings and make runtime generation dynamic (which i swore i already did at one point to try to fix this very problem)
Hey guys, is there a way for me to rotate each pose in a blendspace independently? so that each pose appears as a different, rotated pose (although its the same animation) ?
any body else have trouble getting cooked fft data
i have enabled it in the sound but the bool on the node returns false no matter what i do
Sorry forgot to past this here
Trying to determine if they are LEAVING the street or entering the middle of it - My plan is to use a sphere in each cross walk and use DOT product between the pedesterian and the sphere and any neg values mean it's leaving the street - but if there is a way I could use a single one that's just as reliable, I would like to know that too - I confess I'm poor when using forward vectors when it comes to pairing them up to something else - (like I might be able to use a Get Right Vector and then take a range between a certain value but I"m not sure how I would normalize that for all crosswalk (and just the general implementation)
Hey, what's the safest way to convert an enum's text value into text that would not break in cooked builds? I only need it for widget display purposes. From what I read, enum to string gets messed up in cooked versions.
@dawn gazelleheh, nice hack, never thought of that, ur right 😄 thanks!
heresy!
Electronic Nodes - Paid Marketplace Plugin
😛
What am I doing wrong here? this value is wayyy too high
dont do dots of locations
use normalized directions
Okay hum: So i've made a blend weight turning back from grey to colors depending on the score, but my problem is the change doesnt fade in slowly, its too abrupt, does anyone have a way to fix that?
So you mean just compare the two forward vectors?
hey, I got a really basic inventory made with a datatable from item structs and enums for a bunch of item classes. upon picking up a certain item, i'd like to be able to press it to form a use/discard widget but I can't figure out how to get the use function to work based on which item is pressed, obviously each item has a different use.
how do I find which item is being pressed on in order to be used, from the datatable?
no i mean a dot product only have a -1 to 1 range when used with unit vectors (like GetActorForwardVector etc..)
you used dot on a location instead
So that's what i mean just get thrle forward vectors of those two items, right?
that entirely depends on what youre doing, that would compare if both actors are looking to the same direction
Heya all - is it possible to reference a variable on a class without knowing what it is until run time?
For example, I am working on consumables and their impact on stats that exist on my character. I have in an enumeration that I matched up that has the literal variable name, and I have my player character (and class) reference. Is there a way I can drop in my Player Reference variable and say "Get x" / "Set x" where x is the value I have in this enumeration?
how do you change the current player controller?
there was something like get class default, maybe thats what youre looking for
So the player possess another character that works. When I try to possess back the prev character it doesn't work. Any idea what could go wrong?
cough BP graphs?
That works
any idea?
Sorry I got it fixed
I had other nodes before that causing the issue
1- which pawn is the main one
2- which pawn gets possessed
Anyone experience this glitch?
got it. darker nodes glitch
Hmm... anyone know of a way to create a while loop with a delay on iterations?
I am trying to create a 'heal over time' effect, and have worked out that the duration of this effect should last 12 seconds. I want to be able to dictate a health increment every second, until the total elapsed time (or iterations) equal 12. Which would then stop the looping condition of my while loop.
The downside is, I am building all of this within a function library so I do not have access to the 'delay' tool which would make my life much easier here
I haven't tried it in a blueprint function lib but you may want to check out the Set Timer By Event node
I tried that with a for and a while loop, and what it ended up doing was just rapid fire executing them 😦
You can't create functions that have latent nodes in them. The closest thing you could do is create a macro library, but that's only for specific classes.
Yeah I am running into the issue all over for this one now - really putting a serious damper on being able to get these "over time" effects to work properly
Looks like function libraries don't recognize macro libraries either
So I semi worked out a solution - getting closer but hitting a new wall now.
I created an event (Executing on Server) on my parent class of my character - then on "use item" from the function library, it will call this event, pass the variables and I am using a for loop with delay.
From a single use perspective, this works great. However... it does not seem to permit me to run multiple instances of the same event at the same time. Is there any way to allow for it to be multiplied?
From a testing perspective, as a player - I can drink 5 regeneration potions, but only one of them (at the time) will take effect on the event. From what I was reading, if one character drinks the potion, then another one does a few seconds later - it will terminate the first event and continue through the most recent event (I haven't tested to be true, but it makes sense seeing as I cannot run the same event multiple times at once)
Any thoughts on how I could get it to accept the unique instances of running the event?
You're getting into the territory where I think you may want your effect to be its own object, or perhaps a component that is added on to the player and self-destructs.
Well think about it.... You make an object (not an actor) and fill it with whatever functionality you want it to have. It has some exposed variables, like who it affects. When you create it (similar to spawning), you feed in the player who the effect is supposed to affect, then your logic within the object can use that do what it wants with that reference.
When it's done with whatever timers, Destroy Self.
maybe a doonce with a reset would work?
a Do once with a resetting loop of some kinda linked to the delay
Not for what he is looking for. He was talking about wanting multiple instances of the same effect.
ngl i didnt understand his question so fair enough lol
So like, a stacking buff, where each stack has its own individual timer
AH!
i thought he had a hard time having the potions being taken in account for my apologies
In my opinion, the possible better solution is not to try and devise your own method of effects and abilities, and rather look into using the Gameplay Ability System which has this stuff built into it already.
Just more work needed to get it working and time to understand how it works.
How does it handle in terms of efficiencies for multiplayer games - using Gameplay Abilities
Probably THE best way if it's multiplayer.
hey guys i bought a low poly fps pack in which i want to change weapon but the weapon changes with game mode i want to change weapon only with animation of there partiular weapon can anybody suggest me the best way or refer a tutorail
Has client-side prediction built into it as well, and handles a lot of replication for you.
Nice, I'd be interesting in learning more on that - would you happen to know of any good sources to get started on learning how to leverage that?
Check the pins in #gameplay-ability-system
telling to me
No, that was to Azure.
okay
Roger that, thanks for the info 🙂
How to perform equip animations *basically do it through the anim blueprint, here is one example of how to drive equip animation, there are quite a few out there, and it is pretty much the same workflow
setup animation blueprint, play equip montage/once off based on some kind of user/ai input using variables to drive the state in the anim bp
https://www.youtube.com/watch?v=67Av71Z7KFk, another one https://www.youtube.com/watch?v=sKMK-d3_RL0
Use fps equip animations ( you probably want fps equip animations as they will differ from 3rd person ones, depending on how you setup your fps character )
thanku bro but the problem is not fps animation problem is else the all guns have their own game modes
assets (seketal meshes) are not actually tied to any game modes. 🙂
you can use assets independently of any game mode.
simply attach them to a socket at runtime while playing the equip montage.
see this
yeah, my above answer still the same 🙂
i wanted the gun to be pickup when i pres a key and the hand mesh remains same
yeah, use attach to socket. play the montage/once off using the animation blueprint.
look at the examples i gave. and then see. it does just that.
I would recommend using the animation blueprint to drive your equip animation, the showcase provided is a reference/guide to show of the various weapon types and their fps locomotion animations that go with it
on key/action you attach to socket, and play your equip animation once off, then from there your animation state should change to whatever type of weapon you are holding and the locomotion with anim blend states animations for that type of weapon should kick in
changing the game mode is probably not what you want, they do that as a demo
yes i want this only
then I would recommend check the tutorial on playing the equip animations 🙂
i dont want equip animation i just wanted the player to do that animationa nd that hand ik which weapon is he holding
ok, then it sounds like you just want to attach to socket:
maybe look at this tutorial here, attach to socket is quite simple really, it will attach the weapon to your hand, and "equip" the weapon without any animation.
https://www.youtube.com/watch?v=gO_KeX8A-gM
i had watched this one he is using dt and some other tags which i can tuse i am the subcribe rof him
have you equipped any skeletal meshes before? or i guess not. you dont need to use tags at all. you can attach to socket any skeletal mesh that is in the content browser, or in the game scene
okay i thanks i am watching this again as it contain minor problems which can be solve
You can of course do things in many different ways.
So I know of 2, but there are probably more.
-
Use sockets
https://docs.unrealengine.com/4.26/en-US/WorkingWithContent/Types/SkeletalMeshes/Sockets/ -
Use parenting and set master pose component *( this is my preferred method, as it does not require sockets )
https://www.youtube.com/watch?v=eXngYhI_ZBI
I also strongly recommend looking at the Shooter Game example from epic.
https://docs.unrealengine.com/4.26/en-US/Resources/SampleGames/ShooterGame/
They do weapon switching in there via action button. A great place to start
Specially if you have not done any equipping before, using a showcase level as a starting point for an fps like game is probably not what you want.
Changing the game mode means [re]loading a map as well, as currently the engine does not support changing the game mode at runtime without loading a map, as maps are tied to the game mode, not assets. 🙂
So you probably dont want to use the low poly fps showcase as a base for your fps
thanks man thanks a lot
cool man, all good.
I am working through some basic tutorials of the ball game kind, I want the cat on top of the ball here to face the direction that the ball will be rolling to (which is controlled by WASD input), but i cant work out how to get the right rotation values from the calculations i am making...i tried some of the "make rot from" etc nodes but i cant get it to work right. any advice?
I don't know if it would give you the exact result you want, but maybe you could get the current velocity and convert that into a rotation? That should at least have it face towards the direction it's currently rolling to
Is there a way to force an actor to update in runtime via BP? So when I manipulate a splinepoint that this actor gets an update.
Update how?
If you want an actor to react to something, you'd usually need to have a custom event on the actor that you then call, or use an event dispatcher which the actor listens to
make a function which update your code, and call that function whenever you want to update, also custom event as well
This do not update the Actor for me
how do you want to update, can you explain?
you need to explain in details, your question in unclear
I call this function on construction script and it updates the mesh. When I call it manually it wont. So I added a checkbox in the details panel to trigger the construction script
this is because the your construction script runs before actor spawn, you are spawning new actor, and then you are executing checkbox, that's why it do not update, but when after spawn you click on checkbox and then it works
How are you calling it manually? From moving the spline point? If so, maybe try enabling "run in editor" if it's not enabled (this should be an option on the function node if you click it)
Which function?
The one you use to update it
hello, how can i make smooth rotation of player? Smooth mean like with inertia
Dont work
Have you verified the function is actually getting called when you move the point?
Its getting called and when I press the button (Call in Editor) nothing will change
if it's getting called maybe try logging or breakpointing it and see if the mesh is being put between the correct points or not
I'm reasonably sure this should work if the code is correct
Nothing happens only if I trigger the construction script by manually changing values in detail panel
Can you show the code you're using to call the function when you move the other mesh
Calc Roadmesh gets called. I tested with print
nothing
That's odd 🤔
and the problem is that a custom tick wont fix the problem. Because calling isnt the problem
I tried everything. I changed location and spawned components to trigger construction script in Bp but nothing
there's a C++ function called RerunConstructionScripts but not sure if that one's exposed to BP's
nope
Is there an easy way to make that one public to BP?
I'd imagine you can just wrap it in a function in a BP function library and that'd work
Ok thx I will try with my non existing CPP skills XD
UFUNCTION(BlueprintCallable)
static void RerunConstructionScripts(AActor* Actor);
void UMyFunctionLib::RerunConstructionScripts(AActor* Actor)
{
Actor->RerunConstructionScripts();
}
Something like that should work I think, the two first lines go into the .h the other goes into the .cpp
thx
without null check editor may crash as well if you pass null and compile the blueprint
Sorry to annoy you but which one is the right one private or classes?
What are you trying to do? Those are just implementations of the function in different classes, they don't matter
So paste your code in both of them?
^yeah you need to create a new C++ class which inherits from UBlueprintFunctionLibrary
ohhhhhh ok a new one. So dont override one XD
once you create that, you end up with two files. one ends with .h and the other ends with .cpp
put the function signature inside .h and put the implementation inside .cpp
yea I know only wasnt sure about override or not thx for your help guys
ERROR: 'G:/Games/Epic Games/Projekte/LP_Urban/Intermediate/Build/Win64/UE4Editor/Inc/LP_Urban/Rerunconstructionscript.generated.h': Changes to generated code are not allowed - conflicts written to 'G:/Games/Epic Games/Projekte/LP_Urban/Intermediate/Build/Win64/UE4Editor/Inc/LP_Urban/Rerunconstructionscript.generated.h.conflict'
Change to CPP?
what did you do?
creating the Bp function
is this set to Developement Editor in visual studio?
is it possible to modify the terrain at runtime?
for example, just raising the terrain ever so slightly where the player has placed down an actor
Editor Apply Spline
regarding runeqs is there something i need to do to get query results as actors, geting results as location does work ?
Very interesting, thank you
I got a question, usually when we're just getting values we don't need an exec right? so how come when using a map these 'keys' and 'values' nodes require exec pins?
nodes that don't have an exec are evaluated once per output wire
Getting the keys or values off a map requires you to loop over the map. Rather than make it possible to accidentally call it a random number of times, instead now you're able to specify where it is called
There is a get random element node that has two pins and is pure. I always wondered how epic ensures the index and element aren't two different ones
Maybe a custom thunk thing
I'm not real sure 🤣, have we checked to make sure it's not two different results?
it'd have to have very special treatment outside the thunk
Only way I know how to ensure only one call is to make a struct to hold all return values and assign it
GetClosestPointOnCollision gives me the location on the surface of a primitve body closest to a point when I input a point which lies OUTSIDE of the body. Is it possible to do the same if my point lies INSIDE the body?
thats not correct. they are evaluated every single time. here is a quick proof. the result will be two different values.
Did I not say that they would be?
I said if you wanted to have a multiple return pure node only be execute once, you'd have to make a struct that could store the many results and use a Make Struct
Then you'd set a struct variable to the newly made struct
once per output wire. oh yes. Sorry man. I just woke up 😵💫
I appreciate your enthusiasm to spread knowledge though
Hey guys, in my code i am triggering an event on an object, from a pawn on the client side, in that event i am triggering another event that should run on the server. but for some reason, the triggering of the server event only succeeds if the initial trigger was initiated from the server itself! so if i were to trigger the event on the object from a client, the second event just doesnt trigger! does the object need to have some authority to trigger events on the server side or something?
@latent basin Sounds like you're trying to RPC from an object that is not owned by that client.
what does that mean?
I have a glitch with my walking animation. If I press my walk key - it will play the running animation instead. Anyone know how I could fix this?
By default, the only object that a client has ownership over is their own controller. Possessing a pawn will set that pawn to be owned by the controller, which means that the client will gain ownership of that pawn. Now lets say the server spawns a replicated weapon, but does not set it to be owned by the pawn or it's controller. The client would not be able to RPC through the weapon. It would have to call an RPC through it's pawn or controller and have that call events on the server version of the weapon. You can get around that by setting the Owner variable on the weapon to the pawn or pawn's controller. Then the weapon can call Server RPCs from that client, but no other client.
For this reason, most interaction stuff is done via a server RPC in the pawn or controller. Like say a chest you want to open. It shouldn't be owned by anyone. Player should just press a button, button calls a local event, that local event gets the local pawn or controller and calls a Server RPC, server RPC runs interface function on the object, then it finally does something.
so the event "open chest" should be called from the client or the server? and should it be run on the client or the server?
Preface, do you know how interfaces work in general?
Yep.
i do
Just a sec, then. I'll make a quick demonstration. Will be a little clearer than my droning paragraphs.
ok, thanks!
Thing is, the code goes like this :
The Character blueprint holds a weapon object, whenever the player presses some button in the Character blueprint im activating an event on the Weapon called Fire, which is not replicated! the Fire event just handles ammo and delay and stuff the server doesnt care about. but inside the Fire event im also calling another event called Shoot, which is responsible for the raycasting and bullets and damage and can also be overridden by derived classes. And the Shoot event needs to run on the server, but thats when the authority doesnt accept.
In general it sounds like your weapon just needs to have it's ownership set when you spawn it. Since you spawn it on the server, just get a reference right after that and set it's Owner variable to be owned by the pawn you're probably attaching it to. Since that pawn is going to get possessed by the client's controller, they'll then own the weapon as well.
yes
You can probably just set it to Self then. I'm 99% sure that'll work.
Hmm. And this is a traditional FPS style pawn that is getting possessed, or?
Make Weapon is called only on server, and the weapon actor is replicated?
no, make weapon is called on each client
Then the weapon won't replicate, so the weapon can't call RPCs. If you want an object to network, it has to only be created on the server, and set to replicate to clients.
hmm, why cant i spawn it on the client?
If you want to use C++, and connect it via name, you can. But for things like this, it's really best just to use the default networking style.
Objects created on the client have no networking power. Server doesn't recognize they exist.
so how come i see the weapon mesh on the server although it was spawned on the client?
Are you calling this code on Beginplay?
yes
Server version of the Pawn runs Beginplay too.
Yep. You can probably just do it behind an IsServer branch check.
Don't forget to set the weapon actor to replicates=true
Great, that makes a lot of sense, thanks a lot!
Maybe its tunnel vision.. but..
Can anyone tell me why this X value DOUBLES between these executions?
Its 2350 till it passes to the "Last Xpos"
Then it doubles..
That is a lot of copied variables in one area. What are you trying to do? Or how are you checking the values?
checking with strings.. just went through trying to see when exactly the variable is doubling which I found the exec point that it changes.. im baffled still
Well, nothing there would double it. So I would just go through step by step from one print to the next in logical order. Notably any place the value is set. If this is the only place it is set, then check for any place that Box Origin is set.
if i disconnect there.. it reads the origin value.. well.. it reads the proper.. but if it connects its doubled.. exactly doubled which is weird
What is the addition node you have there?
its adding like 250 to the "last point" which the "XTempPos" reads > XLastPos then gets updated too 2x the ORIGIN X value! which like.. if it doubled the 250 plus last point would seem that it "doubles" which still would be wrong but at least would make more sense
which it is cut off past that point so the issue has to be something flucky right there
cant think of what else to check
So i Had "XTemp" plug into a "new var" new var reads out proper... plug new var into XLast from the screen shot.. doubles Origin XLast..
disconnected the B on the flip just to be more sure the code itsnt running past that point.. and still bugging out
in case theres something noticeable to someone
Thats on event begin play also
omfg like ffs its just gets more unreal
Reads 248(the value added to XLast = 0) out of "xtemp" if the exec is pluggd and the var returns null.
If the exec is unplugged and var isnt updated it reads 2568(correct)
and XLast gives a correct
I have an array of structs.
I'm trying to create a helper function to retrieve one of those structs
It seems that if I break this out into a function (as I've done here) it seemingly creates a new struct, and returns that, instead of the referenced one
Does Not work:
Does work:
not quite sure whats's happening. both functions are on the same actor component
Do you know the difference between Value and Reference?
And I don't mean the light blue variable Reference, cause that is a Pointer, even if Epic calls them References.
cause that is a Pointer, even if Epic calls them References.
Did not know this. 🤦♀️
Yeah AccessedNone is a Nullptr exception basically
If you ever get that error
But again, do you know the difference between ref and value?
i don't think so
Basically when your function returns the Struct it is returned as copy of the original one
It's literally a second version in your memory
So when you start adding to the inner array, you aren't working with the original inventory anymore
Although your function suggest you marked it as ref
But the other image below looks like a copy
Strange
darn. I thought I was mitigating that by specifically getting a ref in the get node
Yeah you should theoretically
Hm
You are also returning by ref
Also is that a ue4 skin? threw me off haha
it's the darker nodes extension off the marketplace 🙂
By passing the loop stops it from randomly 2x that value.. but thats the only value that gets doubled and it doesnt make any sense still that its doing it
tried seeing if the loop is just running it up with the iterations and the plus 248 but that comes out to like 6700 which is way over.. so... still lost
x * 2 - 360 ?
Yeah so, not sure, could also be the break node that copies the array :<
Structs in BPs are ugly
You can try to get the array
yeah not quite sure what else is going on. I'm seemingly having a similar issue in C++ and tried getting around it to vizualize the issue in bp
oh the struct is actually in C++. may or may not have something to do with it 🤷♂️
and override the array
With a local one in between
Doubt
It's just how BPs handle references
They copy by value a lot
Try to save the array into a local variable
Add to it
And then use SetMember to set the array of the element again
🤔 does get a big ugly, but I can try that.
I believe I'm having a similar issue in cpp
Was trying to see if I could visualize/conceptualize in BP
In C++ it should work a lot better
There you just have stuff like
FSomeStruct& GetEntryAsRef() { return Array[0]; }
+- some range checks etc :D
Not really, cause this way it will do a 180 angle showing 360
180 * 2 - 360 would be 0
Which is correct as that's the middle point
0 -> 180 -> 360
-360 -> 0 -> 360
The problem is, my input is 0-360
yeah, currently have
FInventory& UInventoryComponent::GetInventory(FGameplayTag InventoryTag) {
for (FInventory& Inventory : Inventories) {
if(Inventory.InventoryTag == InventoryTag)
return Inventory;
}
throw("Inventory was not found");
}
let me see if I can reproduce or just find my mistake there instead
that has nothing to do with the equation I gave you though
Then the input is something else
well, my bad, I didn't explain the problem properly 😄
sorry 😄
I'm trying to detect the "angle range" in degrees to highlight my Pie menu, but as I calculate the mouse position to get rotation using "Atan2" it just goes from 0-360
IF I do check if the angle is in range, let's say 350 to 10, it will highlight all the menu instead of checking the shortest path between 2 angles
I think I'll offset the 0 to be the first slice of the pie menu. Probably the best solution
so the last will be 360
How cheap is linetraces on performance?
Im worried that having a linetrace check what kind of material i am on every 0.01 second is expensive?
If it's for the player step sound, I think you will be fine
or whatever trace lines are not that expensive
Oh, thank you
unless you use 10000 each frame 😄
@loud cipher https://www.youtube.com/watch?v=2LP5shWCnhc&t=5066s
if line traces are a performance problem it means you're doing something really wrong 😄
They did a test and although performance did take a hit, it wasn't till there were 1000's of traces happening each frame
Thats so cool
though they concluded that was mostly because they were drawing them. if you don't have to render the linetrace (red line) then it's even less of a performance hit
better timestamp i think https://youtu.be/2LP5shWCnhc?t=2540
@surreal peak Got it working in cpp. just going to stick with it there to avoid unnecessary issues. Thanks for the clarifications
how do you change the current player controller?
you can change it on the fly, right?
Hey everyone, is there any kind of tutorial that teaches how to make a character build speed while walking and it goes into running.
Kind of how like in Sonic games where you start walking, you go into a jog and then start to sprint then run.
Reduce its acceleration
@white fieldThat's pretty atypical. You usually define different controls and whatnot in Pawns and possess them. The controller should be for much more gamewide specific functionality.
hmm I see
Not saying it cannot be done. But you're looking at C++ most likely I would assume.
yeah I had a cpp routine I wanted to use and the only way I could get it working was to put it in the controller iirc.. and it works ok but seems to have broken the functionality where another actor is getting the look at rotation to it.. not really sure why
How do I multiply something by a float? I don’t see that node anymore in ue5
The ue5 channel exists because ue5 is in beta. Most people here won't touch it for quite a few more months at least.
Hey there. I'm looking for a little help as this is my first major foray using UE. I've been playing around and slowing building up my collection of assets and now want to learn more. Using the Sparrow from the Paragon set I've pieces together a simple WASD top down movements where the character is always facing the cursor (I used two different tuts on YouTube, I tried to incorporate them both but it didn't work, lol). Now I want the character to be able to aim high or low and this is what's stumping me. Any help would be greatly appreciated? Thanks
ah, I broke my stuff a different way, it's not the player controller. huzzah? :p
actually I didn't change anything there.. but if I put the play controller back those functions are still broken. arg
fixed it, huzzah
can an actor component contain a construction script?
Doesn't look like it. Just Actor.
No, but one way is to add custom event to your component and manually call it in construction script of your actor.
i have 2 character blueprints;
-the parent blueprint, which holds methods and stats universal to all character classes, including movement/hp/etc
-the child blueprint, which holds methods and stats that are class specific
the piece of code i attached seems to only run if its inside the child blueprint, but not when its in the parent blueprint (when playing as the child blueprint) despite everything else such as movement working properly.
anyone know why this happens or how i can get it to trigger in my parent character class?
If this is in the parent blueprint, are you removing the "InputAction Attack1" event node from the child?
i have a node in both, since id like to be using the node in both places. is that not possible?
When you have it in the child, you're overwriting the parent's functionality. You have a checkbox available on inputs like that to "Override Parent Bidning" - if you uncheck this, then the parent's should also execute.
Hi is there a way on getting the foliage paint tool all the instanced foliage data in general is it possible to get data from the foliage paint tool ?
i tried that and it didnt change anything :/
that seems like it should do the trick though, i wonder why it didnt work ;-;
oh, it seems the child class doesnt get updated when i save/compile the parent class
thats... lovely
maybe???
idk ill google it sorry
Works on my end. Have an input binding that is both on parent class and child class where the parent prints "Parent" and the child prints "Child". The child has the "override parent binding" unchecked. When in game and pressing that input binding, I get the expected output:
that would defeat the purpose of it being an actor component :/ but thanks! I might just smash it all into the beginplay routine
Hey,Im copying the state machine from the third person character animbp
anyone know what the Third_personJump Asset is?
it's the remaining time ratio. If it has a duration inferior to that number, the jump will end
you can always load it from the template

i get two child outputs ;-;
these are my only calls to the input action, with the childs override parent option disabled
though i'd recommend you retarget
Can you cast from inside a function? I moved some blueprint into a function and it is no longer casting, as far as I can tell
yes you can. though it would be better to set your casts on beginplay and pass it as a variable
how do you work on Bitmasks in Blueprints?
I mean; I declared my Bitmask Enum & all in C++
I have a BlueprintNativeEvent that intakes a the bitmask integer that represents an enumerator bitmask value
But I don't see the C++ equivalent of things like "EnumAddflag", EnumRemoveFlag, HasFlag, etc
this is my C++ function declaration ```cpp
UFUNCTION(BlueprintImplementableEvent)
bool DisplayCreateSessionError(UPARAM(meta=(Bismask, BitmaskEnum=EMyWidgetErrorEnum)) int32 ErrorBistmask);```
Can anyone advise me on how to ignore the player capsule but still interact with the player mesh on a physics object?
hey guys so i need help the time marked in red represent the level time but from some reason its not moving this is an UMG blueprint
@fleet cedar Collision channels mostly. Set the capsule to ignore the channel you want to interact on. Set the mesh to block it.
Okay thank you!
@maiden wadi having an issue with Perforce being weird I think and not letting me add custom collisions. I checked out "defaultengine.ini". NVM I guess I had to delete and re-add the object.
on a third person character, is there a way to change the "use Controller Rotation Yaw" from False to True during runtime?
with what? camera?
add controller yaw input in the blueprint of your character
you can choose what will activate it vs what wont
sorry, yes. I want to swap from a Third person camera to a well placed first person camera. I need the third person to not have the yaw controlled by the camera and the first person to have it set.
Thanking you muchly, I'll give this a go.
I'm doing this while tired which I think is the real mistake here XD
So you basically made a game from third person and want to change the camera to first person? correct?
or the game will transition from third to first at some point?
I want the player to be able to select what they want, but I prefer the "True" First person if you get what I mean, where you can see the legs and torso as well
like this?
I think I've got it, I just had to search for Yaw after all of that, there is a pre made Bool
ah yes, as a boolean it would make much more sense xD
Yeah, takes me back to mirrors edge
you could link it up to a branch and an interactinput to change it too
still one of my favorite games
that's what I was thinking, great minds and all that XD
alright your turn to help me XD I'm joking
I'm down to try, what's the problem
funny enough i just understood how Action key works
I got a little problem so: I've made a blueprint line where an interactable object has a sphere collision. When E is pressed, the blend weight/post process is changed and the object is supposed to be destroyed, problem is, if i click it and move out of the collision sphere, the item won't disappear
**Note that I also added a 5s delay to destruction
could I see the BP?
its a long one but sure XD
I'll try my best
Also, Im trying to find a way to disable so they cant just spam E to bring the color back, i was thinking a gate or some sort of way to loop back or delay the input, but im relatively new so im not sure
I think you and I are in the same boat, both (relatively) new, both testing different things.
The BP looks like it should work to me, though I did struggle to read some of them.
The only thing that doesn't look right, but doesn't affect anything is there is a second sequence node that only has one thing in it, but other than that, I can't see anything
oh youre right ahahahah
