#blueprint

402296 messages ยท Page 861 of 403

gentle urchin
#

Teh, i had issues at a few hundred but oh well

steady orbit
#

Same^

odd ember
#

depends on draw calls

#

as well

#

but you can do fairly lightweight actors

steady orbit
#

Using low res spheres

#

With lod

gentle urchin
#

Regular AActors, moving

twilit heath
#

I mean you can put a skybox with 256k texture on ut and cry, too

gentle urchin
#

Untextured boxes with basically nothing in them

#

Dunno how i can go much lighter tbf

twilit heath
#

We run over 100k on some levels and game is multiplayer

#

Most are just SM actors

gentle urchin
#

What magic hat did you find the framebudget for that amount

odd ember
#

good culling probably

gentle urchin
#

Wrote your own nav system ?

twilit heath
#

No

#

Can run 200 AI, but heavily optimized

gentle urchin
#

100k moveable actors, right?

twilit heath
#

No

#

Maybe 500

gentle urchin
#

Alright that sounds better

twilit heath
#

Well, with attached actors more

gentle urchin
#

100k, even 10k moveable would be impressive to say the least

twilit heath
#

Depends how they move

odd ember
#

diagonally

twilit heath
#

But if i were to say go and simulate a star dystem in detail

#

Id probably have all celestial objects move from world subsystem tick

#

And turn off ticks on the actors themselves

gentle urchin
#

Yeah makes sense

#

Thats somewhat what im doing aswell, except subsystem part

#

And obv not star system but anyhow

#

So as it is now the 'npc' register at the manager and is assigned an ISM, by a reference and its index. On hover i ask the manager to cycle all npcs and return the first one with the correct ism ref and index.

random plaza
#

can you get all actors of class and cast in the construction script?

twilit heath
#

No guarantee actor youre looking for ids akready there @random plaza

random plaza
#

i know for a fact the actor exists though

#

i placed the skysphere actor in the scene, just curious if rotating my directional light will update the skysphere

#

yep it does

odd ember
#

why not hard ref it at that point

#

or better yet, handle that inside a single actor

random plaza
#

the bp_skysphere needs an actor reference not a component reference

#

ive tried to get it to work but it refuses sadly

odd ember
#

you can make your own actor

#

I'm not sure what a skysphere is

#

but the sun_and_sky BP exists

random plaza
#

it is working, thank you

tiny frost
#

what is happening here

#

its saying that 2 is wrong

#

its the 2 button

dawn gazelle
#

Your array doesn't contain the index it's trying to access.

tiny frost
#

oh ok

#

worked thanks

#

havent learned all of the errors yet

lusty badger
#

How do I cast an Actor in BP to an interface I created in C++? It's not showing up as a "Cast" option.

mental trellis
#

Did you use UInterface?

lusty badger
#

I mean, it has a UInterface that was automatically created but I put my stuff in the IMyInterface part

mental trellis
#

So you used UInterface to make the interface, alright!

lusty badger
#
// This class does not need to be modified.
UINTERFACE(MinimalAPI, BlueprintType)
class UInteractableInterface : public UInterface
{
    GENERATED_BODY()
};

/**
 * 
 */
class PROJECTFROG_API IInteractableInterface
{
    GENERATED_BODY()

    // Add interface functions to this class. This is the class that will be inherited to implement this interface.
public:
    UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, meta=(ToolTip="Should return false if the interaction failed."))
    bool Interact(class AController* Instigator, AActor* Interactor);

    UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, meta=(ToolTip="This is the tooltip displayed to the player."))
    void GetInteractText(FText& ActionName, FText& TargetName) const;
};
mental trellis
#

That should be it. ๐Ÿ˜ฆ

lusty badger
#

The actor reference that comes out here allows me to call my Interact function but I can't return an "IInteractableInterface" reference. I can't cast Actor to my interface in order to return it:

dawn gazelle
maiden wadi
#

Holy fudgesticks batman. A correct use of interfaces in the blueprint channel. ๐Ÿ˜ฑ

trim matrix
#

How do i make players see an object in different colors without duplicating the object and network stuff?

maiden wadi
#

What is the correlation to the colors you want them to see?

trim matrix
#

One player should see an object red the other ones in the other color

#

And it should be able to switch the player that sees it red

maiden wadi
#

Without networking each object, you'd need to bind those object's to a delegate somewhere and network a value of some kind somewhere maybe like GameState to decide who sees what.

#

Almost sounds like a selected playerstate pointer in gamemode maybe. Unless you already have that data on the clients.

gentle urchin
maiden wadi
#

Interaction is one of the few things interfaces are actually good for.

#

Considering in a normal game you can interact with many different things. Light switch, vehicle, npc, pickups. All wildly different base classes, etc, etc.

gentle urchin
#

And this you figure from a single screenshot?^^

maiden wadi
#

Shit. I missed a perfect opportunity to come off as psychic. ๐Ÿ˜ฆ

gentle urchin
#

What doc says and what people do tends to be wildly different ๐Ÿ˜‚

trim matrix
#

I wondered whats the easiest way to do it. My first thought was to make two materials on the object and just change who can see it. But i there is not a setting like for the collisions, that you can give a group the authority to see them.

maiden wadi
#

Wait, collisions or colors?

mental trellis
#

You could use the beginplay of the actor, which will be called on each client, and set the appropriate material / material params there.

trim matrix
#

I can give specific objects the authority to collide in some ways with the object. But for visibility there is only "Owner can see" and something else

maiden wadi
#

Generally if you want to just change a bunch of object's colors, your'd just have a material instance(not a dynamic one) and set it's property value. It'll change everywhere that instance is used.

trim matrix
#

So i could just give every character the instance of the object and change material there so its only been changed clientsided?

mental trellis
#

Each object will already have a unique instance on all clients

trim matrix
#

Good to know

mental trellis
#

Each client is a separate copy of the engine, objects aren't shared. They're just copied and then kept up to date between clients by the server and a network id.

#

Technically, you could have each client have a completely separate view of the world

maiden wadi
#

Basically the material itself is machine wide. If it's on three actors on a machine and you change it's value, it'll change on all three actors on that machine. But as Daekesh mentioned, that makes it only valid on that machine. So setting it to red on client 1 and blue on every other machine allows you to easily change a ton of actor's, with a globally accessible pointer to a material instance without even having to access the things the material is on.

#

Not to mention it's also a ton cheaper to do than having a bunch of dynamic instances, so major wins all around.

trim matrix
#

The object is been spawned and destroyed then respawned many times during the game. So i guess i still have to give an instance once spawned to every character bp

maiden wadi
#

You can also just make it a default on the mesh.

mental trellis
#

What do you mean by "giving an instance to every character bp" ?

odd ember
trim matrix
#

A variable type of this object class, to tell all character bps the object they have to change the color for

trim matrix
maiden wadi
#

Sec

mental trellis
#

So each character sees 1 specific object in a different colour?

trim matrix
#

One red the other ones maybe blue or white idk.

#

And the object spawns and eventually gets destroyed and a new one of that type spawns

mental trellis
#

But it's just 1 object? When that variable has replicated (use an onrep) just change the colour of that object! (and reset the colour of the old object)

trim matrix
#

Usually its just one that spawns, but im looking forward to make it so that more object could spawn

#

In that case i think i have to make an array of that type on the character class, if this solution works

#

onrep=repnotify?

mental trellis
#

Yeah.

trim matrix
#

But wdym by reset the old object color

mental trellis
#

Well, you replicate a variable pointing to an actor and change its colour. Then you replicate a different actor and change that actor's colour. But the old actor is still red because you haven't told it to change back to blue or white or whatever.

trim matrix
#

Im gonna try it as i understood ๐Ÿ˜„ Hopefully it works!

#

My eng isnt the best, sorry

odd ember
#

uh oh

#

that looks like a black hole

swift pewter
#

How does the Completed pin work on PlayMontage? Does it just set a delay with the montage duration as the delay duration?

mental trellis
#

The completed pin will execute when the montage is completed...

odd ember
#

irrespective of time

swift pewter
#

Got it. I'm trying to achieve something similar in c++. I though using a timer would be fine but there seems to be a tiny delay after the montage has ended

odd ember
#

even a delay functions the same way

random plaza
#

is anyone here having an issue where the editor's panels begin to flicker and you have to restart the editor every half hour or so?

swift pewter
#

Yup I'll just go ahead with that then

odd ember
#

I don't know what kind of template you're using, but it seems correct apart from "up" being a thing. however if it's a top down template it would make sense

#

then it's correct

#

well is the player possessed?

#

did you change anything?

#

in the player controller or in the scene?

#

then... change it back, if it worked before?

#

go into your project settings under maps and modes

#

there should be a bunch of default classes there

#

can you screenshot that

#

Is TagBP a pawn derived class? is TagController a PlayerController derived class?

mental trellis
#

Surely you wouldn't be able to set them if they weren't?

odd ember
#

well one would think so but stranger things have happened

#

my concern is that they didn't work from the get go

#

and the fact that your player character is a circle and not a character

#

is tick enabled in your controller?

faint pasture
#

Is that a screenshot?

odd ember
#

that is correct though. can you show which functions you have in your game mode?

faint pasture
#

That looks awesome. What actor class is that black circle? Find references to it

odd ember
#

those aren't functions

random plaza
#

this is for the skysphere. this converts the 1440 minutes in a day into 360 degrees, but after it hits 180 it starts flickering from one side of the sky to another.

faint pasture
#

Press shift escape to eject while the game is running and figure out what actor is associated with that black circle. Are you sure it's not an artifact of your rendering system and you're really not just controlling a empty pond around?

odd ember
#

on the lefthand side of the event graph I believe?

random plaza
#

is this the right channel for this kind of thing?

#

i can provide a video that demonstrates it

odd ember
#

what thing?

random plaza
#

the BP i posted

faint pasture
#

You want time to be on the roll or yaw

random plaza
#

thank you

odd ember
# random plaza the BP i posted

chances are your sphere is a hemisphere. I haven't worked with that BP you're using. like I said I'd recommend using the sun_and_sky bp

#

it probably means your pawn class is invalid

random plaza
#

where would that bp be?

odd ember
faint pasture
#

@humble sage Is TagBP what you want players to be controlling?

odd ember
#

I'd create a new pawn class and assign it

random plaza
#

i'm writing everythiing from scratch, not using a template. it it in the engine content?

odd ember
#

ensure that it has the correct logic for movement

odd ember
random plaza
#

i just fixured it out, its a plugin you have to enable

faint pasture
#

What class is spawning in and being given to the player instead?

#

Try make a pawn real quick and test if that works. Just set it as the default Pawn in game mode

odd ember
#

create a new pawn

#

and try setting it

faint pasture
#

Are you sure you're even using this game mode?

odd ember
#

and give it some movement logic that you see

#

and see if it moves

#

there is one, in world settings

random plaza
#

is the sunandsky bp supposed to be extremely bright?

#

my scene is completely white

#

nvm i fixed it

random plaza
#

time display code is fixed, babey

tropic pecan
#

Hey there, I've been analyzing level streaming and it was an interesting idea for AI crossfade JRPG though I'm not entirely sure if its the right setup for the turn based JRPG I'm making but I'll give it a try. My reasons for using level stream is for cross cade level loading in battle level. The AI must crossfade along with the level and the level it was from must un-load though I have reason to believe the AI will un-load along with the level it's from though it just needs to be in the other level for a short time after the other level is un-loaded. Can anybody have an idea for AI character to stay in the loaded level stream after the level it's from un-loads? I've heard some ideas say it would have to be loaded by game instances by chances.

mellow folio
#

AI should be in the persistent level.....

#

So they can't get unloaded

tropic pecan
# mellow folio AI should be in the persistent level.....

I've had some idea that would be the case though other AIs would have to be disabled and only have the one that was triggered. So what I'm saying is there's a lot more AIs then one to worry about. But I'll consider your current statement.

feral ice
#

is it possible to turn off rendering like can i just pause everything in the game? I want to take two screenshots but the leaves are moving so the screenshots are different

astral epoch
#

These errors show up when a non-host player turns up.

#

BeginPlay should be client-side and not replicated to server though right?

#

The Character Cards are meant to be children of the GUI so likely their read-none are just a result of the first error.

lusty badger
#

Can you use an interface as an input to a function in BP? Or make a "template function" (like C++)? I.e., i want to make a function that finds actors of an interface which you pass in

jaunty summit
#

This is probably what you looking for

jaunty summit
astral epoch
trim marsh
#

there's how i can use a interface to call one time a funcion into tick, now i have a trouble xD , this only work for 1 actor , the variable "is in screen", only take 1 actor , how can i add it to a multiples actors

astral epoch
jaunty summit
#

If it's in another event that is fired on the server then yes

astral epoch
#

Controller blueprint but I know that's run on server and owning client.
Added switch authority to that too and cleared up last of errors.

#

Not actually seeing GUI but I think that's just my poor understanding of how to make GUI so I'll work on that.

#

Cheers~

jaunty summit
#

And make the IsInScreen variable per actor. Not sure what you're trying to do, so that's a wild guess

grizzled sage
#

I'm new to unreal engine and playing around with a tutorial series learning, but when I went to change character mesh, it doesn't let me edit anything. not sure if this is how it's supposed to be or a setting i need to check off. any help?

mellow folio
grizzled sage
mellow folio
#

Yeah, if it doesn't let you change it, that might mean that that particular actor has some Construction Script logic which is resetting it

#

It could also mean you have 2 windows of hte editor open simultaneously

grizzled sage
#

Oh wow... I just closed and reopened the window and now i can edit it

#

Thank you and sorry for the stupid question

hollow steeple
#

Not sure if this would be done though blueprints or ai. But im trying to get dolls that are pickups however run from the player when they get close. Any idea on how i can achieve this?

faint pasture
hollow steeple
faint pasture
#

Before smooshing 2 things together, try doing them seperatly. I'd make Picking something up an interface, and make the doll a pawn with that interface

#

so it's an AI that runs away that can be picked up

#

Rather than a pickup that runs away

hollow steeple
#

Alight thanks, i will see if i can manage that.

trim matrix
#

I can get the display name of an actor but can I set it? I'd like the names to match a variable that's auto-generated so that I can keep better track

Alternatively I can make that variable match the display name but that's more work

#

I'll do it the alternate way, it's fine

earnest tangle
#

The actor names are mostly for organization purposes in the level

mild crystal
#

Hi i need some help. when i play a animation my character do it and after that it goes back to the point where he was. I have enabled root motion but isnt working can someone tell me how root motion work and tips to do it correctly

spark steppe
#

if an animation moves the root bone, it will affect the actor location when root motion is enabled

#

otherwise the actor location wont change @mild crystal

charred berry
#

having hard time finding on overlap end in bp's, what is key search to find it ? ;0-0

faint pasture
#

Also you should be able to see the delegate when you have the collider selected

charred berry
#

and I get , get render bounds, nothing else

#

HM

#

oops

#

sorry, going back and forth between sequences, forgot to select the right one ;0-0

#

argh ;)(

#

ty

trim matrix
#

For a blendspace, how do I actually get if the character is moving left/right or forward/backward?

#

My main code is in c++ but for the blendspace I need a reference in the bp

jovial charm
trim matrix
#

How do I get the value of an axis mapping in bleuprint?

abstract pumice
trim matrix
#

Why can't I add inputs to a math expression?

#

I literally don't have the + icon

jaunty summit
jaunty summit
#

Then you get the states of the Button(Normal/Hovered/Pressed...)

#

Which are structs you have to split and then you can find the relevant property you want

keen shard
#

is there an blueprint event for "FellOutOfWorld"?

jaunty summit
#

No

jaunty summit
trim matrix
#

not in the animgraph

#

not even if I cast the charactert

jaunty summit
#

Oh

keen shard
#

such a straight forward event. i'm surprised.

jaunty summit
#

I'm not into anim graphs sorry

jaunty summit
#

Well you get over it by putting some volumes around the map

#

And doing overlap checks and stuff

abstract pumice
jaunty summit
#

Yes

abstract pumice
#

Thank you

trim matrix
#

Can I substitute an Image in place of an Object? I would like to replace my ball with an image of something else but I don't want it to be a texture just the flat image in its stead.

keen shard
tiny frost
#

Boy put those carpet grippers away

#

@fiery escarp

night herald
#

@keen shard

keen shard
#

@night herald

night herald
#

@keen shard

keen shard
trim matrix
#

so I go into the material and find "Texture2D"?

#

oh I gotchu

#

but is there any way I can just make it the picture?

#

without having to change anything about the ball?

jaunty summit
#

Texture2D is the type for pictures

#

I'm not sure what you mean

trim matrix
#

I got it figured out myself

#

I just made the picture a 2D sprite placed it under my ball and hid the ball

true valve
#

When a player possess a character then unpossess. How can I let event begin play to reinit.

jaunty summit
#

You can't. BeginPlay fires only when level starts

#

What you need is an event called OnPossess

dawn gazelle
true valve
whole sedge
#

Does some one know how to use this node to toggle visibility of layers in sequencer?

civic mountain
#

Should I be using timers or event tick? Seems to be some disagreement here: https://forums.unrealengine.com/t/executing-every-second/18789

gentle urchin
#

Depends on usecase

#

Never had issues with timers crashing anything

#

Maintain the timers? Not sure what that even means tbh

icy dragon
#

Shit, I misread it as Timeline

icy dragon
#

That is actually worse than Event Tick because it can execute more than once a frame.

gentle urchin
#

Timers are more userfriendly for flowcontrol compared to tick.

#

Due to their interface

icy dragon
#

Timer is NOT a loophole to Event Tick

gentle urchin
#

Atleast imo

#

I still prefer using tick in many cases , but depends on what im doing

maiden wadi
icy dragon
#

Also if you want to have better performance, might as well sideload the ticking job to C++ altogether.

gentle urchin
#

^ Key!

civic mountain
#

I'm trying to keep things to blueprint for now, trying to implement spell cooldowns and the like

#

Putting a bunch of checks on event tick will slow the framerate, right?

maiden wadi
#

It's like an argument over a static mesh or skeletal mesh being better. Seen that forum post too. :/ Some twit thinking that animating static meshes in code was better than an "overly expensive skeletalmesh".

gentle urchin
icy dragon
gentle urchin
#

What do you imagine a timer does

#

Internally?

maiden wadi
#

Also for ability cooldowns I don't recommend either tick or timers honestly.

civic mountain
icy dragon
civic mountain
#

That's why I'm asking lol

#

Maybe I could have a map with the spells to timestamps, when spells are cast I can calculate the timestamp for when it will be available again; then when they try to cast run a check if the current timestamp is past the cached cooldown timestamp

#

The question still stands for match timers and stuff though

maiden wadi
#

Nah. You don't need anything ticking for that. You need a framework that simply checks a last cast time versus current game time. It's much cleaner to do that and tick UI than deal with complex fuckery in gameplay code.

#

Gameplay code doesn't need to do anything but run the ability and set the last time it was used.

gentle urchin
#

๐Ÿคฃ

civic mountain
#

That's close to what I was saying, right? Might be misunderstanding

gentle urchin
#

Nah it is^

icy dragon
#

The comparative game time check might work if it's a Souls-like game and no real pausing happens

maiden wadi
#

Game time is affected by time dilation.

civic mountain
#

Going for an fps

#

Good flag though, thanks

gentle urchin
#

Comparative game time is a lot like timer internals

#

Just exposed, instead of hidden behind the FTimerHandle

icy dragon
# civic mountain Going for an fps

FWIW you might as well wrote the function and calling them in Tick in C++ altogether. The BP's job is just calling non tick functions and change variables around that C++ code reads

gentle urchin
#

Performance wise there should be no difference

#

But ease of use is a quality you wanna keep around

icy dragon
#

Asset loading can be hell in C++, and exposing the reference variable to BP can make life much easier.

civic mountain
#

I'll keep things to the time stamp check for cooldowns
If I need to do a lot of event tick stuff I'll write a C++ function
Thank y'all

gentle urchin
#

Still I wonder what the fuzz maintaining timers was about

icy dragon
gentle urchin
#

Hmm yeah i guess

frail meadow
#

Can someone tell me how to fix audio not playing correctly when repeated very fast?
Im trying to make a 23 bullets per second SMG but the audio doesnt wanna play correctly at that rate

gentle urchin
#

Code?

#

Spawning/playing sounds every 2-3 frames shouldnt be impossible id imagine

#

Albeit not how id imagine it set up

#

Id have one sound for single fire, one sound for the burst mode(if that exist) and one looping sound for continous firing ..

undone surge
#

how would i replace the default running animation with the defult walking animation ?

maiden wadi
#

Should be as simple as swapping out the animation in the animation blueprint.

undone surge
#

is it the main ThirdPersonccharacter BP ? @maiden wadi

maiden wadi
#

Nah. Click on the.. Mesh? I think it's called.

#

Sec, editor not open.

#

Yeah. Click on the mesh and look at the details panel. You should see the Anim Class.

#

Click the little magnifying glass next to it to find that and open it.

undone surge
#

is it in the same place for ue5?

#

ok let me c

maiden wadi
#

Dunno. I'm not insane enough to try using UE5 yet.

undone surge
#

xD

#

i started learning on ue5

#

but thanks ill look into it

maiden wadi
#

I'd assume it should be relatively similar. Pretty core functionality.

#

But then they have done quite a bit of UI overhaul. Who knows.

undone surge
#

yes i am watching ue4 vids if i cant find ue5 and then trying to find the same stuff in ue5

#

it has worked soemtimes

frail meadow
#

I have this system for weapons, and i want the firerate to be framerate independent, because right now if you have a low FPS your fire rate is also low
The way i calculate the bullets per second is a variable called
Fire rate
, and so if i set my fire rate to 14 it will do 1/14 = 0.07142857142
0.07142857142 being the amount of delay between each shot. But on lower FPS the delay between shots is way higher, so how do i fix this?
Image

gentle urchin
#

Youd need to catch up

#

So next frame youd fire several bullets.

left niche
gentle urchin
#

^ was about to say

undone surge
#

how would i make a blueprint so that if i hold shift my character moves at a certain speed and if i press shift and then space he moves even faster

#

will i do same thing but add AND operator ?

maiden wadi
undone surge
#

ok thanks i will try that

willow aspen
#

hey what is the difference between pasting a cube from the add actor tab then adding a blueprint to it AND creating a blueprint first then adding a cube to it? in the first variant i dont have the cube as accessible component in the blueprint editor, why is that?

mental trellis
#

The difference would be inheritance.

#

In the first instance, the cube belongs to the parent class.

#

You might be able to edit it if you enable 'show inherited values' or something. It's been a while since I did anything with bps.

willow aspen
#

@mental trellis thank you

white elbow
#

How do you make a character detect ledges that it can vault on?

spice ibex
white elbow
#

I will, ty

icy dragon
#

Though take YouTube tutorials with a grain of salt.

More specific tutorials tend to present questionable setups than can backfire when scaled up.

white elbow
#

I just want to understand the logic behind it

#

Why can't I artificially rotate camera?

#

Is there some checkbox that prevents it from having any Roll?

icy dragon
white elbow
#

no, the camera that's a part of the first person character

#

I can change it's relative position no problem, but not the rotation

#

For example I want to add a slight roll when you move left and right

maiden wadi
#

Very likely trying to use control rotation

#

The camera I mean. There's a setting for it to use control rotation.

white elbow
#

ok I managed to set up the control rotation to rotate the scene component instead

#

What's the function that turns a negative number into a positive one, but not the other way around?

earnest tangle
#

Abs

#

it's called the "absolute value", that's why it's "abs"

gentle urchin
#

Just removes the sign, doesnt it ? No other magic is applied

#

Datura๐Ÿ˜‚

maiden wadi
#

It's just a basic ternary that uses a unary minus operator if it's below zero.
return Number >= 0 ? Number : -Number;

odd ember
#

yep

gentle urchin
#

thats... surprising, but does the job

maiden wadi
#

It's template safe. Which makes it work on many differing systems without issues. If a system handles numbers differently, you can still expect their unary minus and >= functions to return same values and on many differing types.

odd ember
#

it is good codeโ„ข๏ธ

gentle urchin
odd ember
maiden wadi
#

It's less about that and more about each system's lower level implementation of type comparison. Probably less of an issue these days, but not every system checks >= the same way for example. And it also accounts for types since it's templated. You can use the same function on a float and an integer.

gentle urchin
odd ember
gentle urchin
#

imo there's no need to do a comparison at all

#

regardless of the number you simply mask out the sign

odd ember
#

sure if we're on graphics hardware

#

but yeah it could be masked

#

although it would essentially be the same thing

gentle urchin
#

Yeah it would

#

result would be the same

odd ember
#

return Max(-Number, Number);

gentle urchin
#

heck it might cost the same aswell

odd ember
#

but yeah on graphics hardware avoiding the comparison would definitely be better

maiden wadi
#

I dunno. ๐Ÿ˜„ If I was doing lower level hardware programming I'd care more. ๐Ÿ˜„ Makes me want to go play Stationeers though.

humble flume
#

hey i am using random sequence player can anybody tell me how to stop my animation looping i also used do once where i set the command to play anim

odd ember
white elbow
#

why does Crouch command do nothing? It's at least supposed to make you move slower

maiden wadi
#

It should change your capsule's height.

earnest tangle
#

you just need to enable it from there and it should start working

white elbow
quartz mural
#

I made a room by for-looping a bunch of floors and walls. Is there some way to recognize the floors and walls as "one object" so I can move it as a whole?

earnest tangle
#

If they are separate actors you can attach them all to a shared root, such as the floor actor. Alternatively you could instead use components

jaunty summit
#

AI Ref is null

#

It's probably not being set properly

jaunty summit
jovial charm
jovial charm
sinful gust
#

Hey! I have one question

#

I'm creating the combat system for a project, and I've seen one video where the guy uses a component for the combat stuff

#

Should I do so? Which are the best practices for this?

maiden wadi
#

Need a better definition on "Combat stuff" Not sure if you're talking about visuals, abilities, stats, or what.

sinful gust
#

The combat system itself (at blueprint level)

#

The logic behind, for example, holding and releasing click to shoot a bow when the bow is equipped

#

Or attacking with left click

maiden wadi
#

I'd say it depends. If you have access to C++, some things are better put in simple UObjects as a throwaway logic similar to an AI BT's Tasks. Other things like shooting a bow are best done in a separate actor that is spawned on equip.

#

Very highly depends on what kind of game it is for as well.

sinful gust
#

Nay, the shooting logic is inside the bow blueprint, I mean, I have to define the controls and logic for the bow, attack etc and activate them through the player controller

#

Right now, the player controller has an event that is fired whenever the "Fire" (LMB) button is pressed, that calls an interface set on whichever object is selected

#

The fact is, i don't know if I should move that logic to a component, and have it to store stuff like attack, shoot, dodge etc or to have them all inside the controller

#

It's a weird question, idk if I expressed it correctly ๐Ÿ˜…

maiden wadi
#

It is perfectly fine to keep that in it's own actor like that. There are too many moving parts to correctly move it to a component.

grand valve
#

this is just a semantic question, but what you would call it if you implemented a way to get index + 1 of an array, but if it was at the end of the array, it would cycle back to 0? Just trying to think of a good name for a boolean variable that would allow that behaviour lol

earnest tangle
#

Wrap?

grand valve
#

Nice! perfect

earnest tangle
#

Yeah I remember seeing that used in some similar circumstances :)

trim matrix
#

I'm trying to get the relative rotation of an actor's controller, how would I accomplish that?

maiden wadi
#

Controllers don't normally have a transform.

trim matrix
#

A PlayerController does though?

#

Basically I'm trying to get the "look" velocity (so x and y with the mouse) without casting the actor

#

doing it in a "reference-free" way

maiden wadi
#

From a Pawn?

trim matrix
#

no, in an anim bp

#

so technically yes, from a "try get pawn owner" node

maiden wadi
#

I wouldn't advise this "cast free" ideology. You're going to make things much harder for yourself. APlayerController CDO is literally always loaded. Casting to it has zero implications.

trim matrix
#

I'm trying to make it so the same animations for an actor's skeletal mesh can be used both in a player controller actor or an ai controller actor

#

if I plug my player's variable (literally getting the axis values from the input) then the blendspace would only work if a player is controlling it

#

I found a way to avoid this for the movement but for the look blendspace I still have trouble finding it

maiden wadi
#

Depending on your gameplay setup. You could probably do this with the control rotation. That is from the base Controller class. If you cache a control rotation in the anim bp, and delta it each frame for your values.

#

Would work with AI that way as well since they use the same control rotation when set up for it.

trim matrix
#

exactly - so from "Try get pawn owner" i do "get control rotation" but that is still relative to the world space

#

not relative to the actor itself

maiden wadi
#

Shouldn't matter if you're only after the delta from it. It'll be the same in local or world.

#

If you need the local though, you can easily inverse transform it.

trim matrix
#

inverse transform it?

#

also you're right, get control rotation can be used for this - the only thing I don't understand is why the "pitch" is inverted - if I look up it goes negative and if I look down (from 0) it goes to 360 and counts backwards

maiden wadi
trim matrix
# maiden wadi

this works only for pitch, I don't get any change when panning (so yaw)

trim matrix
#

How do I actually get an actor's transform in that specific delta time?

#

Even if I put a delay between two variables it gets the same value and then sets it on execution

stoic palm
#

One message removed from a suspended account.

trim matrix
#

this somehow returns the same value in both variable, even if there's a delay between setting them

native willow
#

its not connected

trim matrix
#

...yeah I know, I disconnected it for the screenshot

#

I assure you even if I connect it I get the same value on both variables

#

even if I put a 10s delay between them

native willow
#

if you dont rotate the actor it wont change

trim matrix
#

I do rotate the actor

native willow
#

show the code for it

trim matrix
#

That's the code

#

if I exec that and print the two rotators I get the same exact value

native willow
#

show the code that rotates the actor

trim matrix
#

it's the default rotation code, so it adds controller yaw input

#

but getactorrotation does return stuff, the problem is that even if I rotate it the two variables are always the same

#

if I press play and swing my mouse like a madman obviously getactorrotation changes, but rot1 and rot2 get an equal value stored, even though there's a delay between setting them

native willow
trim matrix
#

Try get pawn owner

#

I'm in an animbp

native willow
#

pawn owner will be a controller?

trim matrix
#

Yep

#

either a playercontroller or an ai controller

#

right now I'm testing with my character

native willow
#

controller wont connected depending on settings

solar sequoia
trim matrix
#

look, this is every 0.5 delay between setting the two variables

#

how is it possible that they are the same?

#

obviously I was moving around when these values were printed

rough blade
#

Is there anyway to fix this or will I have to find a work around?

gentle urchin
#

Flow control being keyword

trim matrix
#

exactly @gentle urchin , how do I make them read at different time?

gentle urchin
#

I believe you need two variables for it

#

One for current that is read every half sec

#

And one for last current, read before updating current

trim matrix
#

those are two variables

gentle urchin
#

Yes but you're reading the same one

#

And its not properly flow controlled

#

Read from var first, then update var

trim matrix
#

Doesn't "getactorrotation" return the same value regardless of the node?

#

like this?

gentle urchin
#

Get actor rotation returns its current state

#

Not ehat it was 0.5sec ago

#

It will only be true half sec ago right before you update it

#

During the same frame that the update happens

trim matrix
#

I'm not getting it, would you mind providing an example of this?

gentle urchin
#

2 sec

maiden wadi
# solar sequoia Could you elaborate on this? I'm doing well with Blueprint but I realize that I ...

There is a lot of bullshit surrounding casting that people throw around. So every time someone says they're trying to avoid casting, I assume it's because of that. They go as far as to create interfaces to avoid casting. The real problem is that the people who have experienced the casting issue have made idiotic posts about it and have not actually learned anything from their mistakes. They just blame it on casting and ditch it entirely instead of taking ten minutes to understand stuff. The core basics are that Unreal loads the data from disk once to create a CDO(Class Default Object) for everything you cast to or have a normal pointer property or class property to in your classes. This is because the engine needs direct fast access to that stuff at runtime to be able to create new versions like spawning new actors or reading default data, etc. Normal code only classes are extremely small and take up exceptionally small amounts of RAM. But stuff like assets, such as sounds, meshes, textures, are all massive. A large enough game being all loaded into memory at once causes major problems and chances are the game isn't even using half of it at runtime but it still has to load it all because of your coding. Understanding the way Unreal loads these CDOs and the way that Hard and Soft pointers work can solve all of that with correct architecture.

trim matrix
#

I actually don't mind casting at all, I use it a lot in c++, but for my example here I'm trying to make the animbp independent from whoever it is assigned to, and usable by anyone (and anything) (obviously anyone that uses that skeletal mesh)

trim matrix
maiden wadi
#

Yeah, I didn't mean to imply you. ๐Ÿ˜„ I'm just quick to jump on it in this channel because there are a stupid amount of people who end up in here with dumb interface messes who are avoiding casting.

gentle urchin
#

the name "current rot" is actually bad. Its a decaying/ageing rot

maiden wadi
#

Like.. They make interface events, which give the same hard pointer to an object back, and don't even understand why they're trying to use the interface. They just do it cause some twit on Youtube said "Dur Cast Bad"

carmine iris
#

People, hello) Help with a trifle, I'm still poorly oriented myself (

There is a function by which I destroy trees, activation, as you can see, goes through an overlap, that is, a Persian, or rather, I have it ai, went up to a tree, cut it down, found another tree, cut it down, etc., what I want. Since I have trees in a separate spawn blueprint, there are a lot of them, and ai goes in order, sometimes crossing those trees that do not need to be cut, but the trigger is launched. Question!) How to add a time limit with such a function at the beginning, like if the Persian or the Persian trigger is in the activator for less than half a second, then we donโ€™t turn on the function, if we turn it on more, Iโ€™ll be glad to help)

rigid storm
#

Hey I don't know if this is an appropriate time to insert an unrelated question. And this might be a dumb one, but..

Does anyone know if you can control paper2d sprite flipbooks with the animBP interface, like a statemachine and such?

Im guessing there answer is "hell no"

trim matrix
# gentle urchin

Thank you, it works - but I have yet to grasp why a delay doesn't work but this does

#

I'll try to understand that before I use it

quartz mural
#

I have this actor's "SetActorLocation" updating every tick, but it's not moving, even though the debug log says it's at a new location each frame.

gentle urchin
trim matrix
#

but is it important to have a new getactorrotation node every time a value is read?

#

or is it okay if they all flare off the same node?

gentle urchin
#

Getactorrotation will be your very current rotation. So you need to store it in a decaying variable. The decaying variable (Time2 rot) is 0.2 sec behind when the delay executes again, and must thus be read before updating with a fresh rotation

#

Not sure i explain it well but

trim matrix
#

yeah no I get it, it makes sense

#

but one thing I still don't get - "Get Actor Rotation" for example -> if I flare it off the same node do I get get same value regardless of timers/delays or is it relative to when the value is being read?

gentle urchin
#

Yes

#

it just gives you the very current rotation

#

it doesnt know about the delay

trim matrix
#

this is your version, and it works

#

would this one still work?
the only difference is that I'm using the same getactorrotation node

#

for setting Current Rot before and after the timer

gentle urchin
#

because you've cached the value

#

and you read the cached value before updating it

trim matrix
#

Thank you

#

I wonder how much performance gain/loss you get for having multiple nodes of the same type

#

like, having Get Actor Rotation once per blueprint instead of 10 times

gentle urchin
#

Each wire has a cost

#

1 or 10 doesnt matter

#

but if that means 1 vs 10 million, we're talking big gains

#

not that anyone would reach such numbers but

maiden wadi
#

This depends on whether you mean editor performance or runtime performance.

#

Runtime performance there is zero difference between using one node on a million other nodes vs using a million different nodes on another million different nodes. It's all processed the same way. In editor, there is the slate drawing cost and some minor overhead from K2 Node code.

trim matrix
#

I meant runtime

#

I have another problem... I got the value I wanted (when I turn my mouse I get the delta yaw value between old and new)

#

but the issue is that when I do a full spin suddenly it shoots up to -350 or whatever (normal delta is around +/- 20, depending on my mouse speed)

#

I assume this is because I'm doing a full circle, but is there any way to avoid t his?

#

Hi, I have a system where when I wallrun, my camera tilts. The current tilt is an instant snap and I was wondering how I could make it smooth. I thought using FInterps would help but it doesn't

quartz mural
#

What node do I use to make this thing move around? It doesn't seem to respond to any of the move to location nodes and I don't need it to have physics, since it's just me translating it to a new location when it spawns in.

foggy escarp
#

Set actor location should do it.

quartz mural
foggy escarp
#

Are you using a interp or lerp?

quartz mural
#

No, just updating it every tick. I don't need it to animate at all, I just want it to move to the new designated spot.

foggy escarp
#

Then wouldn't it be better to do this on begin play?

quartz mural
#

I need it to all happen in a specific order, I'm procedurally building a house so that I can iterate and randomize it during play. I think I got something working tho, thanks for the response!

#

perfect

willow aspen
#

hi i am watching a video tutorial and the guy says: adding a blueprint class of the type actor... i dont get it, i thought actor is a class, what is the difference between actor class and actor type, is there also a blueprint type and actor class of the blueprint type... very confused here

keen shard
#

i think what they mean is "lets make a blueprint class that extends from the actor class"

willow aspen
#

are you sure, sorry for this "stupid?" question i have no clue so i will memorize this but i need to be sure

#

so there are blueprint classes that extend from other classes than actor classes, meaning they have another parents then the actor class?

#

he literally says blueprint class of the type actor, over and over again

trim matrix
#

this is what you get when you try to create a blueprint class, look at all the choices

#

blueprints are just abstract c++ code so they can be "child" of any class really, even the ones you create

willow aspen
#

so blueprint is not a "normal" class?

#

i thought there is a fixed hierarchy of classes, so how can the blueprint class just hop between the parent classes?

#

so my question is there a basic difference between the blueprint class and for example the actor class, in the way that actor class is fixed in the hierarchy and blueprint class not?

trim matrix
#

the hierarchy is dictated by the parent-child relationship

#

if I have class A which is parent of Class B, then Class B is the child

#

but nothing stops me from creating a blueprint class, call it "Class C" and make it a child of Class A as well

willow aspen
#

can i make a actor class and make it child of a pawn class?

trim matrix
#

No, the actor is already the parent of the pawn

willow aspen
#

that is the point of my question

trim matrix
#

You can make a class that is the child of the pawn class

#

a blueprint class

willow aspen
#

so the blueprint class is not yet placed already?

trim matrix
#

there is no "blueprint class" - a blueprint is literally a file you create

#

and who it belongs to (as a child) depends on what you decide at the creation of it

willow aspen
#

now i get it

#

thanks

dire storm
#

GAS in blueprints any idea how do I use that ?

desert juniper
dire storm
#

after enabling it I saw this thing in the asset creation

desert juniper
#

yes, but the setup needs to be done in cpp

dawn gazelle
# dire storm

There is configuration that you need to do within C++ in order to get it functional.

dire storm
desert juniper
#

if you want to avoid cpp as much as possible, GasCompanion on the marketplace is a great plugin for GAS/Blueprints

#

otherwise, you'll need to set it up in cpp

dire storm
#

can't pay don't have money i'll just make it do with the CPP and learn that thing in some guide xD

desert juniper
#

so you may not be able to extend it until you're more familiar with cpp

dire storm
#

yeah I've last done coding about two years ago
and last done CPP coding like 6 years ago

desert juniper
#

though you can create the actual abilities in the editor as you discovered

dire storm
#

and since I'm not good at maths I always tend to avoid programming as much as possible

desert juniper
#

if you're working with blueprints, you're already coding

dire storm
#

but guess it's not bad time to learn it again for this system

desert juniper
#

not like using a typed programming language magically has you using math all over the place.

dire storm
desert juniper
#

good luck

dawn gazelle
#

return true;

dire storm
#

exactly xD

#

UE4 Gameplay Ability System for Blueprint Programmers is a series which allows you to leverage the UE4's powerful Gameplay Ability System, without any C++ knowledge.

In this video I will show you how you can implement UE4 Gameplay Ability System in your own project. We start by creating the very basic classes inside of C++ and then check the fu...

โ–ถ Play video
desert juniper
dire storm
#

THanks

trim matrix
#

Does anyone know how to make two blueprints share the same functions and code?

#

Without them being necessarily child of eachother

#

In particular, two animbp with different skeletons

#

I need the raw code that I built for one to work with other eventually, it's just for variables generation anyways

solar sequoia
#

I went through it a while back and little is explained when it comes to methodology or reasoning

steel sequoia
#

Hi im updating an old game to use line traces instead of projectiles for all my guns but i can't figure out how to do penetration with the bullets (as in one bullet can go through multiple people) any suggestions?

#

i was trying this

#

but it doesnt work

supple bane
#

Im trying to learn animation stuff by just copying the base one, the original has this event happen every tick

#

but mine only happens at the start

#

this is mine /\

#

this is what works /

solar sequoia
steel sequoia
#

just into a loop for the rest of my line trace code

#

i.e. tell the npc its taken damage

solar sequoia
#

Try printing the names of what's being hit

grand valve
#

you need to give it object types in the object type array, just type make array, and add object types like static and dynamic

steel sequoia
#

i have but it just hits the first object it collides with

#

and doesnt read the rest

#

this is what it looks like abit more zoomed out

#

what is this error?

#

like how do i get a reference of the object i want

grand valve
#

i just told you, pull from that green array pin called object types, type make array

#

and give it some inputs

trim matrix
#

Can someone tell me how to get the Character Instance of this controller?

grand valve
#

pull from AsPlayerController, type get controlled pawn, cast to your custom character if you need to

steel sequoia
#

thanks vassili

trim matrix
#

I will try

steel sequoia
#

thx guys

trim matrix
#

Cast bp_character cast fails

grand valve
#

well after thinking about it its highly likely that the controller may no longer control any pawn at that point

#

what are you trying to do? You might want to look into the Event Unpossesed on the player controller, since that returns a pawn reference

trim matrix
#

I want to remove the player character from an array when left

willow aspen
#

hi i am watching a tutorial and see the tutor creating first a blueprint of the the type actor and then adding another components to it. what if i paste a cube actor and then press the ADD button at the cube and add a blueprint to it? is there a reason to do this like that? what is the difference to the first way? the tutor never did that the second way.

grand valve
#

you might just have to add the pawn to a variable on that controller when you possess it

#

So on player controller, event possessed, Set Pawn variable to that

#

then you will still have access to it on event logout

#

its just im betting that on event logout, there is no longer a controlled pawn for that actor, because theyve already run the unpossess

trim matrix
#

So do i have to make a custom player controller class then?

grand valve
#

to do what i just said specifically, yes

#

but also look into the player state, i think the player state array in the game state, has always accurate information of the players in the server and their pawns if any

trim matrix
#

Okay i think i will do the custom player controller. I would guess i can easily copy all settings from player controller to the custom one

#

Hopefully this works

mossy mist
#

anyone know the blueprint alternative of this?


World->OverlapMultiByObjectType(Overlaps, Origin, FQuat::Identity, FCollisionObjectQueryParams(FCollisionObjectQueryParams::InitType::AllDynamicObjects), FCollisionShape::MakeSphere(DamageOuterRadius), SphereParams);
mossy mist
#

ty

grand sky
#

Hey guys, is there a way to combine the position and rotation of the actor to create a new location information?

charred berry
#

using flipflop ( not sure it will work for this instance) and 'play' on one, with play reverse on the other. Player walks on trigger, presses a key and block moves up to a landing. The 'reverse', I thought, is player walks back on trigger and presses key again and blocks goes back down, for the reverse. That seems wrong, so if not flipflop what would I use for this block moving ?

#

I just started using BP for this trigger stuff so I'm not fully aware of all other ways of doing things

earnest tangle
charred berry
#

sorry pt 2 : trigger executes a level sequence which moves block up, or back.

#

suppose to anyway ๐Ÿ˜‰

grand sky
earnest tangle
#

I don't know if character movement component supports impulse at location

#

With "regular" physics based actors you can use "apply impulse at location" I think it's called

#

If you just want to apply the impulse in the direction of the hit, apply it using the Hit Normal. You can simply multiply it with some large number and use that as the impulse

grand sky
#

actually supports it. but when i hit the actor from x direction it adds impulse based on world position. not based on actor rotation

#

I wonder if we combine the x or y information in its rotation with the information in its location, can I solve this?

#

I'll have to explain a little more. I hit the actor from the opposite side, I add impulse from the opposite side, but since it stays on the right side according to the world position, it adds from the right side. I couldn't do it according to the direction the actor was looking at

earnest tangle
#

if you want to do it into the direction it's looking at, use Get Actor Forward Vector

grand sky
willow aspen
#

hey i have two cubes with physics and gravity. then i change the location of the lower cube, so the upper cube should fall, but it stays in the air, like if there was no gravity simulation for it, why is that?

#

i just changed the location of the lower cube

manic knot
#

Hey everyone I got a tough question!: How can I best find the player with the most points?

I have player zones that track points with an Array of Structs, the struct contains: PlayerAwarded (Actor), and Points. How could I more efficiently determine which player has the most points?
My initial thought was to make a Map of Player and Score, but then I would have to compare every player score against each other player score, and if there are 100 points or more I imagine that would not be efficient. I considered a Map but I donโ€™t think that would help. I need to find each unique player in the array of structs, calculate the total of each player and compare all of them to determine the one with the most points. Help! Iโ€™m stumped!!!

faint pasture
#

You just iterate through every ayer and see if their score is g
Higher than the highest score so far. If so, they're the new high scorer. Once you're done you'll have the dude with the highest score.

#

It's O(N) not O(Nยฒ)

manic knot
# faint pasture Shouldn't Score live in the PlayerState?

Yes, but each โ€œZoneโ€ stores and replicates its own score. And each player โ€œscoreโ€ can be more that 1 โ€œpointโ€. It could be 1.001 or 100+ points scored per player at one time because of any multipliers, bonuses etc.

manic knot
#

So I somehow need to calculate the total for each player. Then compare all the players totals. But that seems Iโ€™d have to dynamically make possibly hundreds of maps/arrays to calculate and compare

#

I have an idea??
The way Iโ€™m currently doing it: each time a player scores in a zone it builds a struct and adds it to the replicated Array called โ€œScoreโ€.
I could instead of adding a new struct to the array each time a player scores, instead see if a entry already exists in the array and add the new Score to the existing Score field in the Struct and if it doesnโ€™t exist then add it

thick marsh
#

Hello. I'm trying to store a single integer index value that is replicated on a PlayerState. It looks like there are supposed to be functions GetPlayerID() and SetPlayerID() for this purpose: In the blueprint I only see the GetPlayerId()! However it looks like set should be available as documented here unless I'm reading it wrong: https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/APlayerState/SetPlayerId/ -- Unless there is a difference between "PlayerState" and "APlayerState" ? Does anyone know why I can't see this function?

Sets the value of PlayerId without causing other side effects to this instance.

misty kindle
#

What is best way to apply damage to an object on impact? Ex. Car hitting a wall or an object being thrown to the ground.

waxen knot
#

so im trying to make a function where when a button on a widget is pressed then it will call an event from a different actor but I cant seem to figure out what I have to cast to in order to make it work

solar sequoia
solar sequoia
# waxen knot

You need a reference to the camera actor in order to call your "Camera On/off" function, because it needs to know which one to call the event on

#

So you need to find some way to get a reference to the object that's being hovered over, whether it's a line trace, collision, or if there's existing functionality for hover events, I don't know

fair magnet
#

I'm not sure if it's ue5 specific or caused by any plugin I'm using but whenever I start PIE (seperate window, 2 players, listen server) immediatly focus the client window and press WASD before it's ready setting up I loose connection to host

dark crow
waxen knot
#

its an actor that will move when an event is triggered

dark crow
#

Is it the player or just a random actor?

waxen knot
#

random actor

dark crow
#

Then you need a reference to that actor somehow

waxen knot
#

so get actor?

#

heres my code

dark crow
#

If that's in a widget, don't think that would work

waxen knot
#

ya all this is in a widget

#

so then what do I use

dark crow
#

Well, you need a ref to the Camera Actor, you gotta get it some way or another

#

Depends how it all plays out

keen schooner
#

If the camera is a child of the player blueprint, you could get player character, cast to your player class instead, and get a reference to your camera actor as a child of the character

foggy escarp
#

Get component by class, and get a copy if you have only one camera.

solar sequoia
# waxen knot so then what do I use

it seems like you're trying to set it up like you would a click event or something. You need to figure out how you're going to interface between the player input and the actor

#

what it really comes down to is that your widget needs to have references to the actors you're interacting with

vast kindle
#

Heya everyone - by any chance is someone any bit familiar with the Tree View portion of Widgets and how best to leverage them? I cannot seem to find any good information on them for the life of me and am wanting to try to build out a series of collapsible lists for quest logs and such (think similar to how many MMOs like WoW does for separating out 'area' and underneath it, the quests within that zone). Any help or insight would be greatly appreciated ๐Ÿ™‚

haughty meadow
#

Is there a better way than this to detect if the input axis mapping is triggered from a keyboard press or the game pad?

white elbow
#

maybe a boolean that detects it at begin play? Or every tick if you want to be able to change it mid-game

haughty meadow
#

this is every tick, but I am just allowing both options for the player, but when it is the keyboard I need to modify the data, it works but I was wondering if there is a node or something to say what was used

white elbow
#

actually I like the way you did it, it changes to reading the controller input only when the said input is present

#

I can't see how it could backfire tbh

haughty meadow
#

I don't think it will back fire, it just feels a little bit clunky

white elbow
#

any gaming platform is a calculator on steroids, I'm sure operations such as this barely cost anything

haughty meadow
#

yea, but if I was boss of unreal and this was a mapping then the Yaw event would return 1 or -1 for keyboard input, and the actually gamepad stick value if the gamepad was used

#

or have I set that up wrong?

fiery glen
#

that config looks fine to me?

worthy carbon
#

please help me

gentle urchin
#

Reactive input mappings, or a simple menu option for the player is some of your options

haughty meadow
#

I'll carry on as it is then ๐Ÿ˜„

gentle urchin
#

Im not sure why games try to be so flexible towards the inputs tho, (beyond supporting other input methods),

#

Is it common for players to swap mid game from keyboard to gamepad etc?

#

Its something that has never crossed my mind ๐Ÿ˜…

#

Then again its probably not that much extra work, and it feels nice for the player

white elbow
swift gull
#

Hi so I entered my ai in the world I created from scratch and it works fine but when I stop playtesting I get this error and when I check everything it looks normal but I'm not sure what this means.

white elbow
#

what if somebody decides to and they encounter a BUG

gentle urchin
haughty meadow
sturdy herald
white elbow
#

I figured how to make a character perform a vault jump mid-air and I'm super proud

#

How do I make my character move forward and backward independently of where you look?

swift gull
white elbow
#

if you look straight down for example you cant move forward at all

sturdy herald
swift gull
sturdy herald
# swift gull I connected it to the "Set as float"

u get the error for the patrol path var, so u need to check that. For this u can use the is valid node with exec inputs, outputs or the "is valid" function with a branch or u can right click the variable and "Convert to validated get".

gentle urchin
gentle urchin
# swift gull I connected it to the "Set as float"

Do note that using IsValid doesnt "fix" it if it's a running error. It removes the error if this is purely a flow control issue, and the variable gets set at a later point than its first read ๐Ÿ™‚

swift gull
maiden wadi
#

@swift gull Light blue variables in blueprint are called memory pointers. Memory pointers are just a number that point to a location in your RAM. When you try to call a function on a pointer, it uses that number to find the actual object in RAM and apply the function to it. If you do this on a pointer that has a number that points to an incorrect object, or a pointer that has not had it's number set, you will get an invalid use error. By default, pointers are null and point to nothing. Some of them are set by default. The ones that you yourself manually create are never populated by default and will be null until you call Set on them and pass in a valid pointer from an existing or newly created object.

haughty meadow
#

this is the better way, in stead of using left and right just use the axis for the stick then the axis value is analog for game pads and no need to test for keyboard or gamepad

solar sequoia
# worthy carbon please help me

Is the issue possibly related to you leaving the spawn collision on "default"? You're trying to spawn an actor inside another, and you may be having issues with it being prevented

swift gull
#

Thanks, everyone for the help. Turns out all I needed was to add another blackboard to it.

white elbow
#

Do I need a separate blueprint for each and every prop?

maiden wadi
#

You can just drag them into the level as is without putting them in a blueprint.

white elbow
#

but it only applies to basic shapes right?

maiden wadi
#

Applies to any shapes as they were imported to Unreal.

#

The only time you need a blueprint is if you want to group multiples together or randomize them.

swift gull
#

hey, how can i add collision to my wall textures that are in my level?

white elbow
#

So make a prop in blender or similar program?

#

what if I want to make different kinds of bottles that have the same properties like breaking on strong enough impact?

#

but in different shapes and sizes

#

do I use several blueprints or just one but assign different models to them?

humble flume
#

hey i have a third person chararacter which i turned into first person using camera but the problem is whie running i cant see the arm can anybody tell any solution for that

hushed topaz
#

If you want to swap between 1st and 3rd person, you should have two sets of meshes which are each visible depending on the mode. Check out that template and see what I mean

hushed topaz
humble flume
#

Ya I know that but I am using a third person template and all my animation are compatible with third person template only

#

I change the camera position to the head and make it look like the first person but I want like when I run i can see my hand when i slide my camera goes inside my body how to fix that issue

trim matrix
#

Hi. Trying to make AI for car. Need to determine is the target location is on the left side from car, on the right (-1 0 1)

gentle urchin
#

Compare direction with right and right *-1 vector, smallest dot product is the winner

foggy escarp
# trim matrix Hi. Trying to make AI for car. Need to determine is the target location is on th...

I'm not at a pc rn, but I believe this would work:
You can do this with a little vector math.
You need to direction vectors.
The first being the forward of the car, the second being the side the character is on.
To get the characters position relative to the car, you'll need to use the GetUnitDirection node. Plug in the cars position and the characters position.
Now that you have the direction of the character relative to the car, you can now calculate if the character is on the left side or the right.
This can be done with a Dot Product vector node.
Plugin the cars forward vector and the previous calculated direction.
With the output, you can determine which side its on. The output will be negative or positive and between 0-1. I'm not sure which one would be the left or right, but you could figure this through testing.

#

.... Ehh maybe you don't need that other calculation, yeah @gentle urchin that should work too.

gentle urchin
#

I guess you only need to compare once

trim matrix
#

@foggy escarpThanks that a lot of new info. Going to study

gentle urchin
#

Compare to right vector, and if dot is below zero its on the left side

#

The same can be done with forward vector if you also need to know if its in front or behind the car

foggy escarp
gentle urchin
#

Right vector is relative to the cars heading direction

nimble ember
#

does anyone recognize this dialogue system asset?? That would really help me!

foggy escarp
gentle urchin
#

Unless ur insane and turning the mesh only ^^

foggy escarp
#

So you'd need to calculate the direction with a get unit direction node.

gentle urchin
#

Yepp

foggy escarp
#

Ahh, I just got done working on a runtime transform gizmo, so now I dream in vector math lol.

gentle urchin
#

๐Ÿ˜‚

#

So dot product between GetUnitDirection() and GetActorRight

#

Positive = right side, negative = left side

#

And the same if you wanna chevk in front or behind. Dot product between GetUnitDirection() and GetActorForward(), where positive is forward, negative is behind

hexed glade
#

I've started on level transitioning and I'm wondering what would be the best way to transfer over the data to the next level (character health, equipment, selected characters in party, etc.) Creating a game instance is fine, but I'm asking if there is a better way than having a set function for every single variable tied to the instance.

gentle urchin
#

Id stuff it in a save slot

#

Savegame object

agile hound
#

Hey everyone, wondering if you can help.
Iโ€™m working on a turned based RPG, my combat is coming along but iโ€™m stuck for critical hits.
I want the player to press a button at the right time to give extra damage on the attack (critical hit).
With Anim notify state i was able to do this, i give it a small window to press the button and I print string โ€œCritical hitโ€ and itโ€™s working fine. Where iโ€™m stuck is we canโ€™t set valuables in the anim notify state. How should i give the information that there is a critical hit on the attack?
I have a combat component where the damage is calculated so it would need to communicate with that i assume.
Any help is welcomed and appreciated ๐Ÿ™‚

gentle urchin
#

What to you mean cant set valuables?

#

I assume you're already telling the cimbat component to do a regular attack at some point? Perhaps during a notify?

tough yoke
#

yo, is there a way to flip these during runtime depending if you stand inside or outside trigger volume?

agile hound
# gentle urchin What to you mean cant set valuables?

In the anim notify state you can only get valuables. And yes in my combat component i have an attack command event but it doesnโ€™t know if the player pressed the button at the right time for a critical so that i can multiply the damage ๐Ÿ˜›

hexed glade
jaunty drum
#

Hi all, I'm using Map Range (Float) to control a cutoff frequency in MetaSounds. The function maps the range linearly, but I need a different kind of curve (logarithmic?) so that it sweeps the lower part of the frequency range slower. Is this easy to achieve?

gentle urchin
#

Manually, percent * percent @jaunty drum, nvm this is for quadratic, not log

gentle urchin
gentle urchin
tough yoke
#

okay thnx

maiden wadi
hexed glade
#

Okay, so just a regular save then. Still trying to find out how to load the character afterwards.

maiden wadi
#

What are you saving here?

limpid wyvern
#

Hi I have been trying to find out how I can pause my game for the steam overlay with (Tab+Shift) and a gamepad home button using blueprints and I also need a blueprint for when a controller gets disconnected to pause the game please help

and just to let you know I'm kind of new to blueprints still so if you can send me a picture that would be appreciated

hexed glade
limpid wyvern
maiden wadi
#

What are you saving though? Structs and pod or pointers?

hexed glade
maiden wadi
#

Pod variables yes. Pointers, no.

#

pod = plain old data = integers, floats, FName, String, GameplayTag, etc.

#

References no, because anything they point to is deleted and recreated at a different memory address when you load the game.

agile hound
#

Haha i said valuables when i meant variables ๐Ÿคฆโ€โ™‚๏ธ

hexed glade
# maiden wadi Pod variables yes. Pointers, no.

Ah, then I see. Most of the stats should be fine then. The equipment I would have to reference as a name I think and then re-add upon the next level start. I'm a bit unsure of how to do the inventory then as for the moment it is a structure inside an inventory component belonging to the player controller.

plain pewter
#

There ain't an easy way to add buttons to blueprint detail panels, right? I've been adding a bool "Do The Thing" and making it Instance Editable, and on Tick I check if it's true, and if it is I set it false and do the thing I wanted. The bool kinda acts like a button there. Is there a cleaner way to do this?

icy dragon
plain pewter
#

That's EXACTLY what I was looking for! Thanks!

maiden wadi
hexed glade
maiden wadi
#

If you want a really easy way to handle data that will save you a serious migraine later, then make a single system around loading a savegame file and create functions in your classes to read/write to it instead of saving stuff in the classes. You don't have to do this for everything, but if you do it for anything savable, it makes your classes really easy to manage. An example. I have one subsystem that loads with the gameinstance. Loading a game from the main menu or starting a new game creates a savegame file into this system. Because it's part of Gameinstance it persists level loads. I read/write all game data to this object that I need to save through the course of gameplay. It never gets written to disk until you actually call Save, so you're free to alter this savegame object's state all game long and still reload back to where you started or even load a whole different game, etc. But more importantly it's available long before beginplays and such. All of my classes like a FinanceManager, EmployeeManage, etc etc all just have functions to read and write data to this object instead of saving it on themselves and then writing it to the Savegame object before saving. I find it very clean. It's only drawback is of course you can't network those states, so it only works in singleplayer.

#

So far like 80% of my personal project code is all just 7 subsystems handling data from that one savegame object. ๐Ÿ˜„

hexed glade
jaunty drum
odd ember
wicked crag
#

So I created an AI behavior tree and made a child BP from it. But it takes on the exact same BT of the parent BP. How do I alter the BT for the Child, because I want different AI types but all under the same Parent.

odd ember
#

you can't inherit from the BT itself

#

in the end a BT is just a data structure to pointers

#

what you can do is run subtrees

maiden wadi
#

I need to start that at some point in this project too. AI ๐Ÿ˜ฆ

odd ember
#

have a subsystem for it

#

I did that

#

I basically have a component that I put on AI that registers them to the subsystem, and the subsystem then acts as the high level director (which makes decisions on a macro level)

#

individual AI still retain their own perception (and decision making on a micro level)

maiden wadi
#

Yeah. Right now I'm just simulating matches randomly from a different map. ๐Ÿ˜„ Haven't even started working on that side yet. Half of this project was created in the attempt at doing a better version of the new CommonUI plugin. Made a little plugin that wraps most common widgets. Applies a default style to them that can be set at the project level, and allows setting a small data asset pointer in each one to style it. Very useful little plugin.

odd ember
#

tbh I should think about moving logic structures into plugins as well

maiden wadi
#

Next goal is a colorable blur. Bugs me having to wrap it in a border every time.

odd ember
#

just for that extra portability between projects

odd ember
maiden wadi
#

Kinda. To do it in basic UMG you have to either use an image with your own blur material you can color. Or you can use the BackgroundBlur and wrap it in a border, set the border's opacity lower and to a different color. I find myself doing that a surprising amount for styles, would be nice just to have it as a colorable blur widget.

odd ember
#

makes sense

gentle urchin
#

Or is that just "shitty luck" scenario

gilded hazel
#

hey all - is there a way to disable collision events while moving? i want the character to still simulate physics and be able to move but i only want to fire events when velocity is zero. is this doable?

odd ember
#

you'd have to replace the collision with some other collision while moving

maiden wadi
odd ember
#

setting up delegates would be the first step, so you know when your character is moving and when not

#

just to be clear: BP save games aren't written directly to disk

#

they remain part of the game binaries

maiden wadi
#

Yeah. Setting a property on the SaveGameObject doesn't write it to disk. That stays in RAM until you literally call SaveGameToSlot on it. So I can load a savegame slot, alter it to death and then just reload it and be back where I was before all of those alterations if I don't actually call SaveGameToSlot.

wicked crag
maiden wadi
#

If you still want the main tree, you still need to consider subtrees or some form of logic switching on blackboard values.

wicked crag
#

How do I make subtrees? Is that an option for BT or do I need to do it manually?

odd ember
#

or even the same tree

#

any tree can be a subtree

wicked crag
#

Ok

#

I just need to figure out how to connect them to whichever AI I want it to be connected with

#

Iโ€™m new to BTโ€™s

odd ember
#

I'd keep it at a sketch level of 1 BT for now

#

and just use decorators to prevent branch execution

#

then later you can consider moving to subtrees once you know the full extent of your BT

swift pewter
#

As part of a traversal system I do a bunch of checks on Jump to determine what traversal state should be activated. Currently I'm checking all states in an order based on priority. Is there a better way to set this up without a bunch of if-statements?

wicked crag
# odd ember then later you can consider moving to subtrees once you know the full extent of ...

Appreciate thatโ€ฆI am a fast learner and already have a good understanding of how BTโ€™s work. That being said I want to do the subtrees. The problem is when dealing with a child BP, it does not show the event graph. Or the AI controller thatโ€™s connected cannot be accessed either from the child, you know where you tell it to run a โ€œspecificโ€ BT. So my question is, how do I tell the child to run a specific BT that I make for it? Where is that decision made?

odd ember
wicked crag
#

You know how when you right click on an actor BP then at the top it says create child?

odd ember
wicked crag
#

The event graph for the child just has a node connected to begin play that is just a reference to the parent

#

Nothing else

odd ember
#

right yeah, that's expected

#

the graph runs its parent functionality through the parent nodes

trim matrix
#

@gentle urchinThank you a lot. I don't think that I could figure out something like this in a short time.

odd ember
#

however you are free to call functions and events as you would on the parent

wicked crag
#

So I need a reference to the child in the parent event graph?

grave relic
#

Dose anyone know if you can store a data structure as a variable? Cause right now it dosent work for me. And i just have to know if you actually can store data structures as variables or if im doing something wrong.

odd ember
#

show your code for you parent graph and tell me what you want to do it with it

odd ember
#

or the row name contains empty data

wicked crag
#

Right, I understand and I appreciate the responses. Donโ€™t worry about the event graph I was just using that as an example. Because the AI controller is where you run the BT correct?

grave relic
#

Oh it can, all that works, its just now that im trying to redo a system it stoped working ๐Ÿ˜› Before i too the out row and put it straight into my "Add to inventory" but now i want to store it as a variable when the item spawns, and then when the player picks it up add it to the inventory.

wicked crag
#

So letโ€™s say I create a subtree by duplicating the BT Iโ€™m currently using. How do I connect that subtree to the child?

odd ember
grave relic
odd ember
grave relic
#

Yeah thats what i thought, so then its wrong somewhere in the code not in that a data struc cant be set ๐Ÿ˜›

odd ember
#

which is why I said keep everything in 1 tree first

#

then branch once you know all the variables

wicked crag
#

Right gotcha

odd ember
#

this may seem like an "optional" step but the idea is that you don't know when you actually want to subtree certain things until you have the full scope

odd ember
odd ember
grave relic
maiden wadi
#

Members == Variable == Property

dapper bobcat
#

Anyone know if there is a way to do wildcard maps in macros? Both keys & values will always output as whatever the Key type in the map is.
edit: The values don't even seem to be passed through

sinful gust
#

Is there any practical difference between using interfaces and using event dispatchers? Is it recommended using them in different situations?

maiden wadi
#

There is no correlation between a delegate and an interface. They are completely differing systems.

#

Delegates are used to subscribe an event to a function call without the caller having to save all references and loop over them and cast to them and call their functions, etc.

Interfaces are used to call the same event on classes that cannot share a base class. Typical use case is interaction, like opening a door, and opening an NPC dialog screen from an AI, or toggling a light on and off from a switch, or picking up something from the ground all just from pressing F and calling the interface function on the hit actor without caring what it's cast to.

sinful gust
#

The fact is, I have a character that can hold different weapons (which all inherit from a BP_Item or child). This is set by a child actor slot that can change its content (for example, change holding a bow to hold a sword). Right now, when I use the attack button, I fire an event and call the interface of the child if available, and let the child actor to manage the rest. For this case, would it be better to use dispatchers, interfaces or it doesn't matter?

blissful moat
#

I am looking to get all these splines into an array in the MainGrabPoint child blueprint.
The functionality should be within the child blueprint itself. Anyone knows how to do this? I can't figure it out, I've been staring at this for the entire afternoon ๐Ÿ˜„

maiden wadi
#

You don't need an interface or a dispatcher. You've said yourself that they all inherit from a single class. Put a function in the base class and override it in the children and call it on that.

small halo
#

how do i create a save game for a level. So if the player has never player before level 2 will be locked but if he completes level 1 they will unlock level 2. if the player closes the game and reopens it, level 2 will still be unlocked

blissful moat
#

I tried this just to test it but it doesnt print out anything

steel sequoia
small halo
#

i did but they are all int stores

steel sequoia
#

Save & Load Game! Unreal Engine 5 Compatible!

โ˜… Come join the Team Beard Discord: https://discord.com/invite/hhv4qBs โ˜…

โ˜…Check out my Marketplace Asset: https://www.unrealengine.com/marketplace/en-US/product/flexible-combat-system โ˜…

โ˜… Ways to Support The Channel โ˜…
Patreon: https://www.patreon.com/JonBeardsell?...โ€‹
Buy Me A Coffee: https://www...

โ–ถ Play video
#

this guy seems to know what he's talking about using integers

#

srry if its no help

small halo
#

ill check it out

zinc swift
#

Hey guys, I have a specific question about "splines".

Is it possible to control the sections of the splines (i.e. the "point sections" of the spline route) (using blueprint).

So I want to create a big spline route and drive to the single "point sections" (the points that you copy and move for the spline route) of the spline with a cube.

I want to create a spline route and drive to spline point 3, stop there, then drive to spline point 8, etc.

How would I implement this (via blueprints)? I have not found a function to control (or find) the coordinates of the spline points.

Thanks in advance

blissful moat
#

There is also a node to set the tangents

#

But the math for how those will be handled will probably be very custom to your scenario

zinc swift
icy dragon
south pier
#

Quick question: is storing a variable for how many secrets are on a level within the level blueprint a good idea? I want to be able to use that variable to show up on the viewport when I press tab and then to disappear when I press tab again. I've read that you can't really call variables from level blueprints. So where should I store that variable instead?

#

I also want to do the same thing for how many enemies are left in the level

icy dragon
south pier
#

Okay so create a gamemode and have that level use that gamemode? And then just store all the variables and information in there itself?

icy dragon
#

Yeah, and then Game State would read those value over for the client

#

Though my knowledge on multiplayer specific is rather spotty, so I might be wrong in that regard

Still, feel free to experiment with that around and see if that works out

blissful moat
river isle
#

Hi guys i was wondering why this specific part of code is making it so when i jump to try and grap onto a ledge it snaps my camera to the side?

#

im trying to make it so when he is in the hanging state it limits his camera yaw and pitch

chrome harness
#

hey guys, I found this nice tutorial for bullet holes https://www.youtube.com/watch?v=gmMPcLSlhHU Thing is I'm pretty sure this method only applies a sticker to the surface. Is there a way to give that sticker uv maps so it has depth to it?

Download:
https://drive.google.com/file/d/1KL8TBg9LlcE9YYz_6dFcI7Pk0nrW6zHO/view?usp=sharing

In this tutorial I am going to show you how you can make bullet holes very easy.

Subscribe to our newsletter:
http://eldstormgames.com/

Engine Version: 4.19.2

Don't forget to like and subscribe!

โ–ถ Play video
fast cosmos
maiden wadi
round plume
#

does anyone know how to have a great camera movement like that?

mossy mist
#

Hi if i make 2 eqs tests one being a grid one being a donut

#

only donut shows up

#

if i delete donut

#

nothing shows up

#

grids are not working

#

circle test works too

#

but pathing and simple grid dont show

#

cone also doesnt work anymore

#

nvm fixed it for some reason nav mesh wasnt built

vale torrent
#

is it possible to cast soft classes?

#

e.g. actor soft class to something more specific

spark steppe
#

load the class asset and cast it or use child of on whatever

#

but your question isn't really specific

vale torrent
#

yeah can load for sure, but using soft refs to avoid loading!

spark steppe
#

do you really need the class if you have an object?

#

could just get the class from the object and do a ischild of check on the class of the actor

#

but i have a hard time understanding what is loaded/what not and what should be checked against what and why

hexed glade
#

Have some trouble with saving. For some reason, upon loading, the game reads none for all the saved variables. Any ideas of what is happening here?

vale torrent
#

and I have helper functions to query the soft objects for info, mostly assetregistry stuff (i store weight and stuff in asset data)

#

the functions could in theory expect soft classes of certain actor subclasses, but I cant cast them

#

so I think my helpers just need to be actor soft classes and not specific

mossy mist
#

Hi now i have a different problem

#

get query results as location

#

is always failing

wet surge
#

hello I've been searching for ages to do this, im trying to do an app in unreal engine that allows you to control all of the arduino pins from unreal, im using serial port for that, but as you can see thats kinda inefficient so i discovered firmata protocol to do that instead of building my own protocol, the question would be if theres any way to implement firmata protocol into unreal. thanks in advance

icy dragon
#

It's not something that's doable solely with just BP

finite gazelle
#

Hi guys, I'm currently trying to figure out how to get the surface area of each wall inside a standard box shaped building, 4 walls, a floor and a ceiling. I'm trying to calculate the RT60 of the room using the Sabine equation, and for that I need to work out each materials total surface area. Using line tracing, what would be the best way to go about doing this? I've seen 'Get Component Bounds' mentioned online, but i'm unsure where to go from there. Any help would be greatly appreciated!

undone willow
#

can I cast to the level blueprint from an actor blueprint? I cannot find the option

jaunty summit
#

You can, using GetAllActorsOfClass, but it isn't a good approach.

#

You should be using EventDispatchers instead

spark steppe
#

@undone willow nope, level BP is not available to actors

zinc swift
blissful moat
#

Glad I could be of help! ๐Ÿ˜„

odd ember
#

high fps first person camera

round plume
#

High fps first person camera how do i make such thing?

odd ember
#

just increase the framerate

round plume
#

Ah okay gotta check in unreal engine

odd ember
round plume
#

Yeah lie 90 ps

#

More than 60 fps

#

I usually use 24

odd ember
#

well if you use 24 fps that's the problem

#

if you use 60 you normalize that

#

anyway there is no magic here it's just increasing the fps to get less stutter

signal zealot
odd ember
#

cross posting is frowned upon

signal zealot
#

ok well Ill keep them here then...?

odd ember
#

your call

fast cosmos
#

OK glad to hear it!

maiden wadi
#

What does the widget reflector have to do with this? Don't see a mouse on the first screenshot.

signal zealot
round plume
#

but i think this has special blueprint

round plume