#blueprint

402296 messages · Page 700 of 403

onyx token
#

so i can == it with a "Interact" string- and if it's true, i can pick up the item

#

or is that not how things are done?

sacred minnow
#

i felling like an idiot... im new to what comes to blueprint/coding... i might having trouble atm

onyx token
sacred minnow
#

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

onyx token
#

aren't horror games REALLY code intensive? rooThink1

sacred minnow
#

every game if code intensive, i think

#

is*

half crypt
#

@sacred minnow I'll suggest you learn a little bit of coding. Dont doubt yourself, trust me you can get it

stray wagon
#

Hello any idea why the Export To Disk node tells me my texture is invalid althought i can see the texture in game ? Thanks

sacred minnow
half crypt
#

@sacred minnow it takes time, but it's not impossible

sacred minnow
#

yeaaa

sand shore
#

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

onyx token
stray wagon
onyx token
#

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"

stray wagon
onyx token
#

ok neat, thank you guys! rooVV1

stray wagon
#

This is what it outputs

onyx token
#

yeah, i was searching for "line channel output" thinking the channels just did that and i was gonna use them as a mask

stray wagon
#

I recommend using the hit actor pin to recognize what object it is

faint pasture
#

Maybe but I fail to see the difference between that and a general trace channel like Visible.

stray wagon
#

+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

onyx token
#

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? rooThink1

#

masking by this?

faint pasture
onyx token
stray wagon
#

exactly

#

You probably want all your itneractive things to inherit off a "IneteractiveActor" actor

#

And cast to it

#

And call the common "interact" method

faint pasture
#

Press E -> Sphere Trace -> select closest InteractionComponent -> DoStuff

onyx token
#

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

faint pasture
stray wagon
#

Sphere trace wont let you interact precisely if you have more than one item in your FOV

onyx token
faint pasture
#

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

faint pasture
onyx token
#

yeah i'm using a LineTrace currently

faint pasture
#

@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.

onyx token
#

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 rescBlank

stray wagon
#

+1 for Adriel, an interface/component is a good idea

onyx token
#

maybe i could make a custom Actor Component? rooThink1

#

and just slap that onto anything i want picked upped?

#

picked uppable
pick uppable
english rooMad

onyx token
#

OhIPanda ooh this seems interesting

bleak rose
#

does anyone know why Add Force has the Accel Change option but Add Force at Location doesn't?

onyx token
#

thanks so much for helping me!

stray wagon
# bleak rose

PRobably because the bone interaction cannot affect the actor's movement? just guessing

bleak rose
#

hmm okay

#

thanks for the help!

real garnet
#

what is dot?

sand shore
bleak rose
stray wagon
sand shore
#

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.

stray wagon
#

Wouldnt visibility work with the nook? It's not using simple collision box is it (sorry if i misunderstood what you mean)

sand shore
#

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"?

sacred minnow
#

i managed to display the text, ty guys

onyx token
#

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 rooWtf

#

and if i wanna reload it, it says-

#

wut? wtf

#

oof
So apparently, Structure variables are just fundamentally fucked in unreal engine

true valve
#

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

faint pasture
#

@real garnet dot product

#

@real garnet

real garnet
#

thanks i understand @faint pasture @bleak rose

zealous moth
true valve
candid blade
#

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

faint pasture
#

Use a select color node based on enum, I'm assuming your rarity is an enum

trim matrix
#

please help me i have a 4gb ram pc with intel pentium, some reccomendations to run ue4?

faint pasture
#

Do you have a GPU or integrated graphics?

trim matrix
#

intel hd 4000

faint pasture
#

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.

trim matrix
#

when i tried to switch to low settings UE crashed lol

#

i'll try again

faint pasture
#

Turn off realtime viewport and set all engine scalability settings to low

trim matrix
#

thank you

faint pasture
#

If UE4 just runs too bad on it, look into Godot

trim matrix
#

does it have something like blueprint?

#

i don't know anithing about coding languages

faint pasture
#

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

trim matrix
#

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

faint pasture
#

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.

trim matrix
#

i'm helping my mom at work for 10euros a day, maybe by some months i'll be able to buy a decent pc

cerulean fog
#

Is there a way to stop Added Components From Becoming Trashed when Updating a Value during Runtime?

faint pasture
cerulean fog
faint pasture
cerulean fog
celest oar
#

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?

faint pasture
celest oar
#

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

main wren
#

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

faint pasture
#

@main wren What is supposed to be firing that event?

main wren
#

I've set it to fire whenever the player's head goes "under water"

faint pasture
#

Ehat calls HeadEnterWater? Anyway you should not be copy pasting code, subclass a base character class.

faint pasture
#

I guarantee you are not calling that event on blueprint B

main wren
#

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?

faint pasture
#

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

main wren
#

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.

faint pasture
#

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.

main wren
#

Nice, I'll try that. I found this video

faint pasture
#

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?

main wren
#

Both are custom components

dense citrus
#

sorry for the delay, got pulled away, about 45 or so

faint pasture
gentle urchin
#

Probably just adds a layer of confusion by mentioning delegates 😅

main wren
#

Both BlueprintA and BlueprintB share the same parent.. Actor Component

faint pasture
#

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

gentle urchin
#

Curious to why both components need to have an event fire when under water?

main wren
#

Sorry, I don't know enough about UE4 to communicate the issue probably. I'm trying to work through that.

gentle urchin
#

Flip the question

main wren
#

One handles floating and one handles swimming

gentle urchin
#

What are you trying to do

#

Ah

#

Bouyancy and velocity force or whatever its called

faint pasture
#

Those should both be the same component. Is the actor that they are on based on character?

main wren
#

Yea, they are both inherited by my player blueprint

faint pasture
#

Or are you using physics here?

main wren
#

I have disabled physics for now. I'm just trying to communicate binary changes between the blueprints

faint pasture
#

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.

main wren
#

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

gentle urchin
#

Makes it confusing and unessesary dependency between them

#

Totally not the concept behind a component

faint pasture
#

Having a separate component for swimming and for floating is like having a separate component for walking and for running. It makes no sense

main wren
#

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.

faint pasture
#

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.

main wren
#

Ok, I'll try to re-approach the problem with that perspective

faint pasture
#

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.

main wren
#

Thank you for the feedback everyone.

thin owl
#

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.

faint pasture
#

@thin owl you need to get a reference to the actor

dawn gazelle
thin owl
#

@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.

pure marsh
#

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:

thin owl
#

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

quasi frost
#

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?

pure marsh
burnt edge
#

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

candid blade
faint pasture
#

@thin owl if it works for your design, just have the turret inspect the gun and the barrel and calculate all the numbers

faint pasture
#

And your items struck, you presumably have a field for the items name, just make another field for the enum representing the item rarity.

faint pasture
candid blade
#

would this be fine to do?

burnt edge
#

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

maiden wadi
#

@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.

candid blade
#

I ended up being able to set widget text color for every enum I needed by doing this for anyone interested.

dawn gazelle
#

This looks like a bind - there should be an output pin where you'd want to connect the color and opacity instead.

candid blade
dawn gazelle
candid blade
#

oof thats wayyyy easier than the mess i created

#

where would I plug select into though?

dawn gazelle
#

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.

faint pasture
candid blade
#

weird, cant connect it to the node when target is the text i need changed

dawn gazelle
candid blade
dawn gazelle
#

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.

candid blade
#

nice got it to work with make slatecolor instead of whatever I was doing beforehand! thank you so much

elfin inlet
dawn gazelle
#

index 4 = item #5 in an array. If your length of the array is only 4, you can't access index 4.

elfin inlet
#

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++...

dense citrus
#

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)

sand shore
elfin inlet
#

i guess averaging normal+that black vector should give you that purple one

dense citrus
#

i think so, but i'm sorta messy with vector math so woo, which is sorta my issue xwx

elfin inlet
#

vec+vec then vec/2 should do it

#

you can operate on vectors with floats afaik

sonic frost
#

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

sand shore
fathom cobalt
#

Can I make this timeline longer than 5 seconds?

sand shore
fathom cobalt
#

nevermind

#

now it's working for some reason

sand shore
fathom cobalt
#

I think I might have had the simulation paused instead of stopped

#

I keep making that mistake lol

faint pasture
#

@insert#1020 project gun vector on to normal plane

tight schooner
# sonic frost Is there a way to make event tick independent of frame rate? I need an event tha...

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.

rugged trellis
#

anyone have any idea why the collision of the actor isn't going away after it is destroyed?

uneven lake
#

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?

paper galleon
#

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

uneven lake
#

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?

elfin inlet
#

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

worthy tendon
#

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

worthy tendon
#

@elfin inlet this will take values from first map and add them to second map for matching keys. is this what you need?

knotty bane
rugged trellis
knotty bane
#

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?

elfin inlet
elfin inlet
vapid ibex
#

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...

dawn gazelle
vapid ibex
#

Oh, thanks!

dawn gazelle
#

There's a node for remove too, and also add/remove for axis mappings.

vapid ibex
#

Will it rewrite a button if it's already assigned to another action, or that's something I need to check manually?

dawn gazelle
#

You can have multiple binds to an action. So, it's something you'd need to manually manage.

vapid ibex
#

Hm, ok, so is there a way to clear a button from all actions?

sonic frost
#

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.

vapid ibex
#

Do you want the head to always be looking in the direction of the arrow?

sonic frost
#

@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

vapid ibex
#

Bones have different axes, IIRC, and you want to make a LookAt rotator.

green eagle
#

Anyone have any good resources on sleepers/Physics sleep states? in blueprint?

thorn ermine
vapid ibex
#

This is how I've done it :

#

You don't need to break rotator, you can just adjust the bone axis inb this node

thorn ermine
# vapid ibex This is how I've done it :

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)

green eagle
#

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..

thorn ermine
# green eagle Any advice on Finding the bounding box dimensions of a static mesh > Using that...

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

green eagle
#

I miss Houdini right now

green eagle
thorn ermine
green eagle
#

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 ..

thorn ermine
green eagle
#

ah now its twerkn

#

Yeah the collider that I thought I removed wasnt fully move

#

d

#

get local bounds makes it a little easier

green eagle
#

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?"

lime fulcrum
#

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?

tough plume
#

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

lime fulcrum
#

@tough plume Did you create a variable in your blueprint as the struct you made?

tough plume
#

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?

lime fulcrum
#

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

tough plume
#

is there some guide to naming conventions? for the prefixes like BP

lime fulcrum
#

It's up to you. I do use BP as for blueprint

#

BP_MyObject

warped cloud
#

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?

tough plume
#

how would i expose parent variable to a child @lime fulcrum ?

lime fulcrum
#

You already find them there

#

You might need to check this flag

warped cloud
lime fulcrum
#

but you don't need to, if you do Get Variable, it will show up

azure briar
#

let me try to loop through the results...

tough plume
#

when trying to find something by class, why it doesnt show custom blueprints on the list?

green eagle
#

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.

civic scarab
#

does anyone know how to get the last known input of the player?

#

like the last known inputaxis or something?

green eagle
#

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

thorn ermine
green eagle
#

yeah I feel ya there

regal canopy
#

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

green eagle
#

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

onyx violet
#

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?

green eagle
#

and run the series by the number of divisions you get

onyx violet
#

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

onyx violet
#

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

thorn ermine
regal canopy
#

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

onyx violet
thorn ermine
#

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

onyx violet
#

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

tough plume
#

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

onyx violet
#

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

heady burrow
#

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

green eagle
#

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

worthy tendon
heady burrow
#

design patterns in blueprints?, first time I hear of it

onyx violet
#

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

heady burrow
#

any reference?

green eagle
# heady burrow 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

heady burrow
#

example I'm seeing now, when using SphereOverlapWithActors, you then iterate over the results and cast it to your character, if valid -> do something

green eagle
#

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

heady burrow
#

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

green eagle
#

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

heady burrow
green eagle
#

wait

#

4

#

think its only 4

heady burrow
#

any way to add there my type?

earnest tangle
#

is valid is 8 bytes of data
...huh 🤔

#

what does that even mean?

green eagle
#

pretty sure

#

its either 4 or 8

earnest tangle
#

you mean the is valid node takes 8 bytes of space in the BP file or what?

green eagle
#

its 8 bytes of data to compute

#

familiar with bitwise operands?

earnest tangle
#

oh, how did you come into that conclusion? I'm just curious really because I've never heard of this before

green eagle
#

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..

earnest tangle
#

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)

green eagle
#

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 >.<

earnest tangle
#

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

heady burrow
#

alright, so is there a way to make SphereOverlapActors to filter from a custom list and not the default enums one?

green eagle
earnest tangle
#

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

green eagle
#

BRUHHHHHHHHHHHHHHHHHHHHH

#

Ive literally been using that as an excuse not to start back on my cpp tutorial shiit!

#

Thanks

vapid ibex
#

Are your user control changing function also looks something like this? =)

real garnet
#

how do i start this in game?

candid nest
#

hey guys do anybody know much about low poly fps pack

maiden wadi
#

Just that it's low poly and doesn't have much to do with programming.

onyx token
#

is there a way to convert an enum into a string? rooThink1

#

like when i have an enum that has "Enum1, Enum2, Enum3" - i'd like to give out the string "Enum1"

onyx token
#

wait wut rooWtf

#

am i blind

#

Turns out

#

i'm blind. Thanks Lorash!

maiden wadi
#

Do be careful with that It's not very good with gameplay stuff. There are packaging issues with enums as strings sometimes.

onyx token
#

no? Well i'm using it to display the "type" of item in my inventory rooThink1

#

like this rooVV1

maiden wadi
#

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.

onyx token
#

yeye i'm using a text, converting enum to text

#

not string

maiden wadi
#

I would package your project really quick and make sure that the text is still what you expect it to be.

onyx token
#

oh god vvScared

maiden wadi
#

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.

ocean pollen
#

Is it here i ask for help with blueprints lol?

maiden wadi
#

Usually.

ocean pollen
#

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

maiden wadi
#

What is calling this execution line?

ocean pollen
#

a custom event

#

and post process only

maiden wadi
#

Do you have any warnings about invalid access or anything when exiting PIE?

ocean pollen
#

mmmh nope

#

nothing, works just like fine

maiden wadi
#

I would put a print before the delay and after the delay, and check what ItemsGather is in both places.

ocean pollen
#

item gather is the score

maiden wadi
#

Is that after the delay?

#

Or on the same line.

ocean pollen
#

its on the pickup item blueprint

#

here ill show my bps

maiden wadi
#

You need to test this execution line you posted to make sure it's even being ran.

ocean pollen
#

what should be the string attached to it

maiden wadi
#

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.

ocean pollen
#

so I should all link it together?

maiden wadi
#

The function can't run if nothing calls it.

ocean pollen
#

So the custom event is basically useless?

#

in this case*

maiden wadi
#

If you don't call it, yes.

ocean pollen
#

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

maiden wadi
#

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.

ocean pollen
#

right

#

but then the bp seems so clustered

maiden wadi
#

Not quite like that.

ocean pollen
#

but i guess if its all linked, it is indeed logical to do it in one go

maiden wadi
#

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.

maiden wadi
#

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.

ocean pollen
maiden wadi
#

No. Right now your two actors are using their own overlap events.

ocean pollen
#

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

maiden wadi
#

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.

ocean pollen
#

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

maiden wadi
#

Also something that may help you with that effect are global material parameters. Very useful for that sort of thing.

ocean pollen
#

Global material parameters?

#

with the effect of black and white?

maiden wadi
#

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.

ocean pollen
#

Can i include it in my blueprint or would it need to be used as a texture bp?

maiden wadi
#

You change it via blueprints. But the setting is used in materials.

ocean pollen
#

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?

maiden wadi
#

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.

ocean pollen
#

at the end of the line linked with the blendweight right? lemme check that

#

or you mean like a variable float?

trim matrix
#

yo i'm with a lil problem here in my User Interface, is this the right chat for it?

ocean pollen
trim matrix
#

it does, so i think it is, if it isn't i'm sorry lol

maiden wadi
#

@ocean pollen

ocean pollen
maiden wadi
#

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.

ocean pollen
#

mmmh but my event tick is taking something already ahaha, unless i can make more of em

maiden wadi
#

Just sequence it.

trim matrix
#

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

maiden wadi
supple dome
ocean pollen
#

ooooh so thats what the sequencers for! gotcha

trim matrix
trim matrix
#

oh it worked! i'm not gonna question what that node does, i'm just gonna mark that as a fix

ocean pollen
maiden wadi
#

Not sure I follow?

ocean pollen
# maiden wadi <@!425518417945165824>

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 ?

maiden wadi
#

@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.

ocean pollen
# maiden wadi

that target weight blend doesnt appear on my options? is it normal?

trim matrix
maiden wadi
#

It's a custom float variable.

ocean pollen
#

i am aware of that

#

even if i look for a target or something, no options appear to link with the post process

maiden wadi
#

Drag off of the PostProcess pointer and do "Get BlendWeight"

ocean pollen
#

it targets self and doesnt allow me to connect

maiden wadi
ocean pollen
#

It still shows me that it targets self, and wont let me connect post process to it

ocean pollen
maiden wadi
#

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.

ocean pollen
#

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

maiden wadi
#

That is your ScoreAddSaturation event.

ocean pollen
#

right so I shouldnt touch anything from that bit

#

any idea why the post process "self" target then?

maiden wadi
#

The what?

ocean pollen
#

at the bottom

#

"self target" it doesnt let me connect the post process

onyx token
#

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

ocean pollen
#

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?

#

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...

pastel ibex
ocean pollen
vague dome
#

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

rugged trellis
latent basin
#

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) ?

near yarrow
#

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

open crypt
#

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)

high ocean
#

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 gazelle
#

Just use a select node and output as text

high ocean
#

@dawn gazelleheh, nice hack, never thought of that, ur right 😄 thanks!

heady burrow
#

how did you make the lines like that?

#

not curvy but recty

open crypt
#

heresy!

dawn gazelle
#

Electronic Nodes - Paid Marketplace Plugin

heady burrow
#

😛

open crypt
#

What am I doing wrong here? this value is wayyy too high

supple dome
#

use normalized directions

ocean pollen
#

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?

open crypt
candid blade
#

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?

supple dome
#

you used dot on a location instead

open crypt
supple dome
#

that entirely depends on what youre doing, that would compare if both actors are looking to the same direction

vast kindle
#

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?

white field
#

how do you change the current player controller?

elfin inlet
true valve
#

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?

true valve
#

Sorry I got it fixed

#

I had other nodes before that causing the issue

elfin inlet
#

1- which pawn is the main one
2- which pawn gets possessed

desert juniper
#

Anyone experience this glitch?

desert juniper
#

got it. darker nodes glitch

vast kindle
#

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

desert juniper
vast kindle
#

I tried that with a for and a while loop, and what it ended up doing was just rapid fire executing them 😦

dawn gazelle
vast kindle
#

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

vast kindle
#

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?

dawn gazelle
#

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.

dawn gazelle
#

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.

ocean pollen
#

a Do once with a resetting loop of some kinda linked to the delay

dawn gazelle
ocean pollen
#

ngl i didnt understand his question so fair enough lol

dawn gazelle
#

So like, a stacking buff, where each stack has its own individual timer

ocean pollen
#

AH!

#

i thought he had a hard time having the potions being taken in account for my apologies

dawn gazelle
#

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.

vast kindle
#

How does it handle in terms of efficiencies for multiplayer games - using Gameplay Abilities

dawn gazelle
#

Probably THE best way if it's multiplayer.

candid nest
#

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

dawn gazelle
#

Has client-side prediction built into it as well, and handles a lot of replication for you.

vast kindle
#

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?

dawn gazelle
candid nest
dawn gazelle
candid nest
#

okay

vast kindle
#

Roger that, thanks for the info 🙂

thorn ermine
# candid nest hey guys i bought a low poly fps pack in which i want to change weapon but the w...

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 )

candid nest
#

thanku bro but the problem is not fps animation problem is else the all guns have their own game modes

thorn ermine
candid nest
thorn ermine
candid nest
#

i wanted the gun to be pickup when i pres a key and the hand mesh remains same

thorn ermine
candid nest
#

when i pick gun the game mode changes

#

okay

thorn ermine
# candid nest when i pick gun the game mode changes

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

candid nest
#

yes i want this only

thorn ermine
candid nest
#

i dont want equip animation i just wanted the player to do that animationa nd that hand ik which weapon is he holding

thorn ermine
candid nest
#

i had watched this one he is using dt and some other tags which i can tuse i am the subcribe rof him

thorn ermine
candid nest
#

okay i thanks i am watching this again as it contain minor problems which can be solve

thorn ermine
thorn ermine
# candid nest okay i thanks i am watching this again as it contain minor problems which can be...

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

candid nest
#

thanks man thanks a lot

thorn ermine
dense palm
#

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?

earnest tangle
#

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

livid vessel
#

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.

earnest tangle
#

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

gritty elm
livid vessel
gritty elm
#

how do you want to update, can you explain?

#

you need to explain in details, your question in unclear

livid vessel
#

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

gritty elm
#

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

earnest tangle
earnest tangle
#

The one you use to update it

fading wren
#

hello, how can i make smooth rotation of player? Smooth mean like with inertia

livid vessel
earnest tangle
#

Have you verified the function is actually getting called when you move the point?

livid vessel
earnest tangle
#

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

livid vessel
#

Nothing happens only if I trigger the construction script by manually changing values in detail panel

earnest tangle
#

Can you show the code you're using to call the function when you move the other mesh

livid vessel
#

Calc Roadmesh gets called. I tested with print

earnest tangle
#

Hmm

#

What if you just have Calc Roadmesh rerun the construction script?

livid vessel
#

nothing

earnest tangle
#

That's odd 🤔

livid vessel
#

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

earnest tangle
#

there's a C++ function called RerunConstructionScripts but not sure if that one's exposed to BP's

livid vessel
#

nope

livid vessel
earnest tangle
#

I'd imagine you can just wrap it in a function in a BP function library and that'd work

livid vessel
earnest tangle
#
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

livid vessel
#

thx

worthy tendon
#

this is probably safer

#
{
    Actor->RerunConstructionScripts();
}```
earnest tangle
#

Yeah good idea

#

Might run into a recursive loop otherwise by accident :P

worthy tendon
#

without null check editor may crash as well if you pass null and compile the blueprint

livid vessel
earnest tangle
#

What are you trying to do? Those are just implementations of the function in different classes, they don't matter

livid vessel
worthy tendon
earnest tangle
#

^yeah you need to create a new C++ class which inherits from UBlueprintFunctionLibrary

worthy tendon
#

yeah

livid vessel
#

ohhhhhh ok a new one. So dont override one XD

worthy tendon
#

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

livid vessel
#

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?

worthy tendon
#

what did you do?

livid vessel
#

creating the Bp function

worthy tendon
#

is this set to Developement Editor in visual studio?

vale grove
#

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

elder robin
#

regarding runeqs is there something i need to do to get query results as actors, geting results as location does work ?

last abyss
#

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?

sand shore
#

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

surreal peak
#

Maybe a custom thunk thing

sand shore
#

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

formal wren
#

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?

worthy tendon
sand shore
#

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

worthy tendon
#

once per output wire. oh yes. Sorry man. I just woke up 😵‍💫

sand shore
#

I appreciate your enthusiasm to spread knowledge though

latent basin
#

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?

maiden wadi
#

@latent basin Sounds like you're trying to RPC from an object that is not owned by that client.

latent basin
#

what does that mean?

warm ermine
#

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?

maiden wadi
#

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.

latent basin
#

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?

maiden wadi
#

Preface, do you know how interfaces work in general?

latent basin
#

interfaces?

#

like BPI?

maiden wadi
#

Yep.

latent basin
#

i do

maiden wadi
#

Just a sec, then. I'll make a quick demonstration. Will be a little clearer than my droning paragraphs.

latent basin
#

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.

maiden wadi
#

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.

latent basin
#

like that?

#

it still doesnt work..

maiden wadi
#

Is this being called on the pawn?

#

In^

latent basin
#

yes

maiden wadi
#

You can probably just set it to Self then. I'm 99% sure that'll work.

latent basin
#

the owner?

#

thats what i did up until now...

maiden wadi
#

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?

latent basin
#

no, make weapon is called on each client

maiden wadi
#

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.

latent basin
#

hmm, why cant i spawn it on the client?

maiden wadi
#

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.

latent basin
#

so how come i see the weapon mesh on the server although it was spawned on the client?

maiden wadi
#

Are you calling this code on Beginplay?

latent basin
#

yes

maiden wadi
#

Server version of the Pawn runs Beginplay too.

latent basin
#

oh rightt

#

so i should spawn my weapon from the server?

maiden wadi
#

Yep. You can probably just do it behind an IsServer branch check.

#

Don't forget to set the weapon actor to replicates=true

latent basin
#

Great, that makes a lot of sense, thanks a lot!

green eagle
#

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..

maiden wadi
#

That is a lot of copied variables in one area. What are you trying to do? Or how are you checking the values?

green eagle
#

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

maiden wadi
#

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.

green eagle
#

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

maiden wadi
#

What is the addition node you have there?

green eagle
#

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

desert juniper
#

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

surreal peak
#

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.

desert juniper
#

cause that is a Pointer, even if Epic calls them References.
Did not know this. 🤦‍♀️

surreal peak
#

Yeah AccessedNone is a Nullptr exception basically

#

If you ever get that error

#

But again, do you know the difference between ref and value?

desert juniper
#

i don't think so

lime fulcrum
#

Hey! How do I remap 0 to 360 deg to -360 to 360?

#

Is there a function for that?

surreal peak
#

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

desert juniper
#

darn. I thought I was mitigating that by specifically getting a ref in the get node

surreal peak
#

Yeah you should theoretically

#

Hm

#

You are also returning by ref

#

Also is that a ue4 skin? threw me off haha

desert juniper
#

it's the darker nodes extension off the marketplace 🙂

green eagle
#

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

surreal peak
surreal peak
#

Structs in BPs are ugly

#

You can try to get the array

desert juniper
#

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

surreal peak
#

Add to it

#

and then use "set member" on the struct return

desert juniper
#

oh the struct is actually in C++. may or may not have something to do with it 🤷‍♂️

surreal peak
#

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

desert juniper
#

🤔 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

surreal peak
#

In C++ it should work a lot better

#

There you just have stuff like

FSomeStruct& GetEntryAsRef() { return Array[0]; }

#

+- some range checks etc :D

lime fulcrum
surreal peak
#

180 * 2 - 360 would be 0

#

Which is correct as that's the middle point

#

0 -> 180 -> 360
-360 -> 0 -> 360

lime fulcrum
#

The problem is, my input is 0-360

desert juniper
lime fulcrum
#

it just jump from 0 to 359 as the angle goes under 0

#

in stead of negative number

surreal peak
#

that has nothing to do with the equation I gave you though

#

Then the input is something else

lime fulcrum
#

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

surreal peak
#

Ah, idk if there is a function

#

If not you would need to handle that cause yourself

lime fulcrum
#

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

loud cipher
#

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?

lime fulcrum
#

If it's for the player step sound, I think you will be fine

#

or whatever trace lines are not that expensive

loud cipher
#

Oh, thank you

lime fulcrum
#

unless you use 10000 each frame 😄

loud cipher
#

Hahaha thats dope

#

I thought they hit on performance lol

desert juniper
lime fulcrum
#

if line traces are a performance problem it means you're doing something really wrong 😄

desert juniper
#

They did a test and although performance did take a hit, it wasn't till there were 1000's of traces happening each frame

loud cipher
#

Thats so cool

desert juniper
#

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

#

@surreal peak Got it working in cpp. just going to stick with it there to avoid unnecessary issues. Thanks for the clarifications

white field
#

how do you change the current player controller?

#

you can change it on the fly, right?

hoary gazelle
#

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.

earnest tangle
#

Reduce its acceleration

maiden wadi
#

@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.

white field
#

hmm I see

maiden wadi
#

Not saying it cannot be done. But you're looking at C++ most likely I would assume.

white field
#

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

trim matrix
#

How do I multiply something by a float? I don’t see that node anymore in ue5

maiden wadi
trim matrix
#

Its a blueprint question

#

But sure

maiden wadi
#

The ue5 channel exists because ue5 is in beta. Most people here won't touch it for quite a few more months at least.

heady tartan
#

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

white field
#

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

white field
#

fixed it, huzzah

zealous moth
#

can an actor component contain a construction script?

maiden wadi
#

Doesn't look like it. Just Actor.

worthy tendon
pulsar path
#

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?

dawn gazelle
pulsar path
#

i have a node in both, since id like to be using the node in both places. is that not possible?

dawn gazelle
#

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.

gilded swan
#

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 ?

pulsar path
#

oh, it seems the child class doesnt get updated when i save/compile the parent class

#

thats... lovely

#

maybe???

#

idk ill google it sorry

dawn gazelle
#

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:

zealous moth
trim matrix
#

Hey,Im copying the state machine from the third person character animbp

#

anyone know what the Third_personJump Asset is?

zealous moth
#

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

pulsar path
zealous moth
#

though i'd recommend you retarget

trim matrix
#

where does it get it from tho?

#

wait I found it I think

gaunt fractal
#

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

zealous moth
#

yes you can. though it would be better to set your casts on beginplay and pass it as a variable

white lynx
#

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);```
fleet cedar
#

Can anyone advise me on how to ignore the player capsule but still interact with the player mesh on a physics object?

tawdry pawn
#

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

maiden wadi
#

@fleet cedar Collision channels mostly. Set the capsule to ignore the channel you want to interact on. Set the mesh to block it.

fleet cedar
#

Okay thank you!

tawdry pawn
fleet cedar
#

@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.

ivory brook
#

on a third person character, is there a way to change the "use Controller Rotation Yaw" from False to True during runtime?

ocean pollen
#

add controller yaw input in the blueprint of your character

#

you can choose what will activate it vs what wont

ivory brook
#

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

ocean pollen
#

or the game will transition from third to first at some point?

ivory brook
#

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

ivory brook
#

I think I've got it, I just had to search for Yaw after all of that, there is a pre made Bool

ocean pollen
ocean pollen
ivory brook
#

Yeah, takes me back to mirrors edge

ocean pollen
#

you could link it up to a branch and an interactinput to change it too

ivory brook
#

still one of my favorite games

#

that's what I was thinking, great minds and all that XD

ocean pollen
#

alright your turn to help me XD I'm joking

ivory brook
#

I'm down to try, what's the problem

ocean pollen
#

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

ivory brook
#

could I see the BP?

ocean pollen
#

its a long one but sure XD

ivory brook
#

I'll try my best

ocean pollen
#

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

ivory brook
#

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

ocean pollen
#

oh youre right ahahahah