#blueprint

402296 messages · Page 640 of 403

fervent temple
#

so i can delete the music float?

#

all i need is the currenmusicvolume float and the savedvolume float

dark crow
#

If Music is not used for anything other than an attempt to SaveGame then yeah

lapis leaf
#

yes, and in your bottom line where you're saving the game object, you'll need to cast to sliderSave and use that to "set SavedVolume"

#

you're basically walking the value back and forth between the two blueprints

fervent temple
#

ah ok

#

is this what u mean?

dark crow
#

Nuuh

#

Where is SavedVolume from

#

Is it a Widget Variable?

fervent temple
#

yes

dark crow
#

It doesn't have to be

#

It has to be a SaveGame variable

#

If you enter it you can create variables

fervent temple
#

savegame variable?

dark crow
#

SliderSave

#

Enter it

#

Double click

fervent temple
#

ok i opened the slidersave bp?

dark crow
#

Ye

lapis leaf
dark crow
#

It should be completely blank if you didn't add anything

#

It works like a normal BP

#

You can add Variables to it

fervent temple
#

yeah its blank

lapis leaf
#

my drawing there isn't 100%, you'd also want to have the cast in the bottom line doing 'as slider save' > set Saved Volume, not pulling 'saved volume' from the local bp

fervent temple
dark crow
#

Oki, you see Variables top left, In SliderSave

#

Click the +

fervent temple
#

yeah ik how to make variables

#

i just got confused by all the save games and stuff

dark crow
#

Create a Float in SliderSave

#

That's your saved value you gonna use

fervent temple
#

ok

#

ah ok so now when i drag out from cast to slider save

dark crow
#

Shortly the process is

You Create a Save Game Object, Cast to Custom SaveGame, Set Variables you want to modify from inside the Custom SaveGame, SaveGameToSlot

fervent temple
#

slider save is the variable i made in the savegame bp

dark crow
#

To Load shortly

LoadGameFromSlot, Cast to Custom SaveGame, Get Variables from inside Custom SaveGame, use them somewhere to Set something where you need

#

You can add a safe check for Loading too

Check if the Return of the Load Is Valid, if not Create Save Game Object

dark crow
#

So Set Current Music Volume

#

You may wanna give it a Default value too btw to Slider Save

#

So the first time you start the game and it Loads it's gonna use that value as Default

fervent temple
#

right i gave it that already

#

value of 1.0

dark crow
trim matrix
#

How to set player to constantly run forward?

dark crow
#

So like just goes one direction and never stops so constant speed forward?

leaden isle
#

Hey there. Is there anyway to search every occurrence of a visual scripting block within the whole project ?

dawn gazelle
#

That would be because you have this code running on tick which is normally set up to execute every frame.

#

The quickest fix is to place a "do once" node after your branch.

leaden isle
#

@dawn gazelle nope : I meant, can you find every occurrence of a specific block within every BP present within your project ?
example :
I want to find every occurrence of a "function" called GameOver() within the whole project

#

the situation : I'm debugging something for a friend but there's this function that is called somewhere and I don't know where it is

dawn gazelle
#

Yeah that should work using that search with the binoculars thing. It'll list off all places where GameOver exists, whether it be a function declaration or usage of the function.

#

Just not in C++ of course.

leaden isle
#

ok, and where is this find result tab ? ^^"

dark crow
#

Window -> Find Results

dawn gazelle
#

^

dark crow
#

Or you can Right Click the BP and click Find References

leaden isle
#

thx

#

works like a charm
Another thing : is it common to change a BP, save, compile, but the behaviour is not changing on preview ? is there some kind of cache that could produce this behaviour ?

flat raft
#

There are 2 bones called IK footLR on the mannequin. What are these 2 bones for?

#

how do I setup foot locking with IK

faint pasture
#

Event tick should be nowhere near that functionality.

pulsar lodge
#

apparently 50 <= 0

smoky rivet
#

how would i go about connecting this

#

im trying to attach an ironsight on a gun i spawned

#

nevermind

crude spruce
#

How can i reliably test if this works? print string at various positions always outputs so i assume that means it "works".

However, on the actor that is receiving the event, i cant get a debug output. The interface is linked. This is executed in a behaviour tree.

#

this dosnt print

dawn gazelle
crude spruce
#

Yes

#

I know i get into the node in the first picture since i get prints to screen

#

No

#

THe ai controller simply does run behaviour tree. The ai controller is put on the enemy actor

dawn gazelle
#

You're saying the controller is the target that should be executing the Melee Attack BPI function.

#

Perhaps you need to hook the target on your Melee Attack interface to the Controlled Pawn pin from your Execute AI event?

crude spruce
#

ok let me digest this

#

ok damn. It works. I redid the exact same nodes in the same order as the tutorial and now it works

#

Thanks! 😄

weary prism
#

just curious when it comes to replicating aim offsets like looking up and down where can i call this other than event tick? reason i ask is cause event tick makes all the other players them glitching out

#

so im just curious if i need to call this to the server and multicast to replicate it or what either way it has to be on a loop when the person is aiming so everyone gets the correct player rotation

#

ive already tried the animation blueprint but that does not seem to replicate it at all

stray island
#

Is this good implementation of duplication?

#

For Loops expert Datura needed

clear sierra
#

I have figured out, i have deleted the question

winged jolt
#

Hi has anyone encountered this before:

Spawned AI not working but when placed into the world, it works. Yes I already set the auto posses to when placed or spawned, I also tried putting it only spawned. I also tried to manually spawn a controller and possess manually. Yes my navmesh bounds area volume gets updated and refreshes every time. I cannot for the love of God figure this out and I've been stuck on this for the past 3 days now

scarlet timber
winged jolt
#

I've tried that, also doesnt work :///

#

And just to add more info, I spawn the AI whenever a tile gets spawned (endless runner game) and that's how I think it doesnt work

scarlet timber
#

are you having any logic inconstruction of AIController?

white crypt
winged jolt
#

This is how I spawn the AI btw. I think this is the part where I messed up. I just treated the AI like how it was in the pickup tutorial

scarlet timber
white crypt
#

what if you used spawned actor or ai, instead of adding a child

scarlet timber
winged jolt
#

It would spawn everything in only the first tile and none for the new ones

white crypt
#

but did it work for the first tile correctly?

winged jolt
white crypt
#

hmm weird, to start with i've never tried adding AI as a child actor component. i believe you should either use spawn actor or ai and move from there

#

you could try simplifying your logic first, make sure that you can spawn ai correctly without the tile system first and see if that works

white crypt
#

that will help narrowing down the problem

#

maybe some other logic is interfering, it wouldnt hurt making a simple spawn system in an empty/clean project as well

#

@winged jolt also while playing you can type this into console "show navigation" , and it will show you if the place you are spawning your AI has the nav mesh

winged jolt
#

So just a quick update, I think it's a controller problem?

#

I moved the logic to my zombie actor and now it works properly

#

I think the controller wasn't possessing the Zombie that spawned it

white crypt
#

it should have auto-posses by default

#

strange

winged jolt
winged jolt
stray island
#

When reseting my mesh location through a timeline , it doesn’t teleport even if i check it teleport

But instead it moves too quick to the reset location , looking too glitchy

winged jolt
# white crypt it should have auto-posses by default

I FIXED IT FINALLY. Thanks for letting me bounce ideas off of ya 😄 I added a delay in the Zombie controller. I think the binding of the controller happens a little earlier than the actual zombie spawning so it wasn't able to bind to anything

trim matrix
#

i have a bp that is a box that is spawned, how to make it so if it is overlap or hit by itself it will destroy last version of itself

winged jolt
trim matrix
#

i tried that but it only detected if my character did it, not if was itself,

spark steppe
#

how would it overlap itself?

trim matrix
#

i has to enable physic simulation and use hit, i solved it

spark steppe
#

im still curious how something would overlap itself

late kraken
#

Hello!
Is there any way of moving camera while the game is paused? 🙂
I put Tick while paused but it still doesn't work 🙂
Thanks!

late kraken
#

Or just move any actor while the game is paused? ;-;

hollow drift
#

hi. Did anyone worked with "Set Camera Constraint Distance" before? The docs mention that the "PlayerCameraManager's PhotographyCameraModify function" needs to be activated? Cant find it

pastel garnet
#

Anybody know the difference between a player controller and a character?

maiden wadi
#

A player controller is an actor that processes the player's input through the engine. It houses the actual InputComponent. It also has a lot of functions to get data from stuff like viewport and whatnot. It's the player's in game soul so the speak. The Character is the physical body that moves around and has a physical representation in the world.

pastel garnet
#

Ah, thank you a lot!

#

So would you recommend using a controller or a character?

#

Because I always use a character.

maiden wadi
#

You require both.

#

Or are you talking about input?

pastel garnet
#

Just general gameplay

maiden wadi
#

You'll need both. Controller is how the player interacts with the world. Without it you can't input keys or mouse, or any other input. Characters are optional. Sort of. You can not possess anything. Or you can use a basic Pawn.

pastel garnet
#

Ah okay

maiden wadi
#

It's worth noting that despite what I said about controllers and the input, that was specific to the InputComponent on the Controller. You should still handle your Character's movement, jumping, other character specific stuff in the character. What happens is when the character is possessed by the controller, the Character will get the controller's InputComponent and bind events to run in itself when input is processed through that controller.

pastel garnet
#

Right

dense tulip
#

Does someone know how to get the following node?

pastel garnet
#

Might be a custom

maiden wadi
#

@dense tulip Right click the normal Get node and convert to ValidatedGet

pastel garnet
#

Ah okay, that gives a clearer view!

dense tulip
#

oh ... thanks

pastel garnet
#

So the player controller allows access to more input events than the character?

#

?

#

Ohhhhh

#

So the character has a player controller inside of it?

#

Or just a normal controller

#

Ah okay

dense tulip
#

Thank you @maiden wadi !

pastel garnet
#

Right

#

Ah

#

So the character controls the camera movement and the controller controls the player movement?

#

oh

#

Yeah

trim matrix
#

if i enable physics, my actor dissapears how can i fix this?

pastel garnet
#

Right

#

Ooohh ok

#

That’s the controller

#

Ah okay

#

So the controller handles the input events?

#

Then why do people use player controllers if it includes one in the character?

#

Right

#

Oh

#

Yeah

#

Ohh okay

#

And the controller is the thing controlling it?

#

Epic

#

So

#

True

#

Does ALS use player controller for it’s camera system?

#

Right

#

True

#

So, would you recommend a character or a player controller/pawn for general feel?

#

ok

dawn gazelle
#

When you press the play button at the very bare minimum you are a player controller - there is no way around this.
A character is something that you as a player controller can possess or "take control of". When you possess a pawn, you still exist as a player controller, but now you also control the possessed character.

pastel garnet
#

Thank you a lot

pastel garnet
#

Ah right

#

Is it kind of like an all in one?

#

Ah

#

So just a better pawn

#

Would cars be pawns or characters?

#

And you use the player controller to possess them?

#

Epic

#

I will take a loot at that in a bit

#

From what I’ve been taught is that player controllers are really good at inputs and what not, so can you make a “character” entirely based on player controllers? Or do you still need the character for physics and animations

#

Can I use the player controller for input and the character for animations/physics?

dapper cradle
#

Hey guys,
How could I use the collision of a mesh to create an overlap event instead of using a collision box component ?

maiden wadi
#

Controller has no physical form. It exists in the nowhere.

pastel garnet
#

Alright, thank you all for your help! :)

dapper cradle
#

Ill check

pastel garnet
#

It’s not an overlap event but as soon as you touch the mesh collision event hit will fire

maiden wadi
#

@dapper cradle make a staticmeshcomponent, set that mesh to it's display mesh, and change the overlap settings to what you need, likely OverlapAllDynamic or something, and then use that component's OnBeginOverlap.

dapper cradle
#

tyvm

pastel garnet
#

Right so the controller only handles the input?
And the character is the physical representation?

#

Okay

maiden wadi
#

@dapper cradle Try not to do this too much though. StaticMeshes are much harder to calculate overlaps for than simple shape collisions. If you need this for more than a couple dozen things, I'd consider a simpler shape. You'll run into problems if you're doing this hundreds of times in a map.

pastel garnet
#

And how would I go about linking the two together? Is there a drop down?

#

ok thank you very much

dapper cradle
#

tyvm @maiden wadi

pastel garnet
#

So before I leave:

Player controller is the brain
Character is the body

#

in simple terms

maiden wadi
#

More or less. I always envisioned the controller as a TV style ghost that just possesses what it wants to move. But brain works too.

pastel garnet
#

Ok, I will be switching from purely character form to player controller and character, thanks guys!

#

Just customizing?

maiden wadi
#

All of this stuff happens already for you by default. You already have a player controller, GameMode spawns it for you.

pastel garnet
#

Ah ok

#

But if you want more freedom with inputs you can make your own player controller?

maiden wadi
#

You can subclass it and extend it and set that class in the game mode for it to spawn for you to use, but you are already using a player controller.

pastel garnet
#

Right

#

I will give it a shot in a bit

#

Yeah

#

Yep

#

Epic

#

I will try out customizing the player controller

#

Thanks!

dawn gazelle
#

Maybe better to think of it like this: If you have multiple things you want to control in your game, but you have specific controls that should work with all of them, place those inputs in the player controller. If you have specific things you want characters to respond to and they have their own way of responding to it, place it in the character.

pastel garnet
#

Is there a “Is possessing (certain pawn)” node in UE4?

dawn gazelle
#

As Lorash said, stuff like UI control, great to place in Player Controller. Stuff like moving a character or a car - the character/pawn.

pastel garnet
#

ok thank you

dawn gazelle
#

You can get a reference to what pawn the controller is possessing:

pastel garnet
#

Ah okay, can that node be used in character or only in the player controller?

#

Or both

dawn gazelle
#

^ this will work directly in the player controller. There would be no point in using it in the character as you need to feed it a controller reference.

pastel garnet
#

Ok, thanks a lot!

surreal peak
#

"Target is Controller"

#

Do yourself a favor and learn those basics a bit.

dawn gazelle
#

I should rephrase that... There is a time and a place where it could be used in a character/pawn, but in the context of the conversation we're having right now, you probably wouldn't need to get the controlled pawn from within the character right now.

earnest tangle
#

It doesn't really make a huge difference

#

It might be easiest to keep track of it within the player character

#

For example if you later decide you want to sometimes reset it or such, then it would be probably easier to clear it out from the character

surreal peak
#

The trick is to not destroy the character on death, but reuse it for respawning :P

earnest tangle
#

The HUD in controller seems reasonable - you can easily have the HUD access the character directly to read the weapons list info

surreal peak
#

You can also always define specific widgets in the Character if they are character related. Or simply have assets in the character that the HUD reads, like an avatar image or so.

#

There are situations where it makes sense to keep the inventory elsewhere, like when persisting data between level changes or so

earnest tangle
#

Yeah that's a good point

surreal peak
#

Why?

#

Are you recreating the Character?

#

That would be against you trying to save the inventory

#

How are you accessing the HUD?

#

BeginPlay of Character/Pawn has no connection to any Controller

#

It's too early

#

Casting what

#

What do you cast to the PlayerController

#

Casting requires an Object

#

Right, is this a Singleplayer game?

#

Then stop using BeginPlay and just use "OnPossessed"

#

And then use GetController->HUD

#

Then you are on the save side of having control of the pawn/character

#

despite that, are you getting any errors after stopping to play?Specially accessed none errors?

#

No

#

BeginPlay gets called when the Character is created.

#

That doesn't mean you possessed it

#

It might not cause a difference for your specific scenario

#

But the correct way is utilizing OnPossessed

#

Could be, yes

#

Not sure what your SaveGame stuff is doing

#

You aren't utilizing the loaded savegame

#

For the HUD part, idk why you fail to recreate it.
Put PrintStrings into place. Utilize breakpoints. Check where it fails

#

Learning how to debug is important

proven mason
#

I have a collision detection issue. I've imported a Pinball SlingShot with two collision meshes the problem is that the ball is supposed to hit a certain area of the slingshot so that area can give the ball an impulse. However, it's not doing that.

I already have a set up that detects the collisions present within the slingshot but the output for Hit Item is always "-1"

#

You can see in my debug that MultiTraceForObjects has found 2 collisions; however, whenever I loop each Out Hit element and break every element, it's Hit Item property always prints out "-1".

#

So at this point I'm stuck on trying to fix this. The last resort is to import another mesh with one collision and add it to the slingshot.

dapper cradle
#

Hi,
When My character picks up an item to inspect it is added to the view port in a widget form.
When the player presses B to close it, I am currently using a 'Remove all widgets' node.

The problem is now that I am also using a widget as a UI to count items the player has collected etc, The UI is also removed when a player exits the inspect mode...

what could I do about this ?

earnest tangle
#

Don't use Remove all widgets?

#

There's another one you can use to remove just a specific one

dense tulip
#

How is root motion affecting animations and when is it not used ?

maiden wadi
#

@dapper cradle This is one reason why people usually have a class where they store their widget creation and holding logic. I use HUD Actor for a lot of mine. Some people use the PlayerController. On beginplay or where ever you can add your counting UI. It can be saved into a variable on the HUD if you want. Then when you do your inspection widget, what you would do is have one event that creates that widget, and populates it into a pointer variable, displays it on screen, and then another that gets that pointer checks if it's valid and removes it from screen, and you would call the second on your B press.

dapper cradle
#

Its not much of an elegant solution but I just took the exec from the remove all widgets and created the widget, then added it to the viewport again.

maiden wadi
#

The reason people often use HUD and Player controller for this is the ease of use for local UI. You can always get the local controller with GetPlayerController0. And HUD is one step away with GetPlayerController0->GetHUD

dapper cradle
#

thank you, I will see what I can do with that info then.

maiden wadi
#

@dapper cradle For a bit of help, consider doing something like this.

proven mason
#

I have a collision detection issue. I've imported a Pinball SlingShot with two collision meshes the problem is that the ball is supposed to hit a certain area of the slingshot so that area can give the ball an impulse. However, it's not doing that.

I already have a set up that detects the collisions present within the slingshot but the output for Hit Item is always "-1"

#blueprint message

maiden wadi
#

I'm not certain what else that is used for, but I've only ever used HitItem from FHitResult in ISMC, HISMC, and FHISMC stuff.

stray island
#

How can i make instanced meshes pan / scroll up looping
Like water bubbles as transparent spheres moving up and coming from down over and over

#

Silimar to this , but with real meshes , so it shd look seamless and dissapear up

maiden wadi
#

@stray island That kind of stuff is MUCH easier in C++, but in short, this is what you're trying to do I believe.

#

Of course this is the simplest version that just goes up. You also need checks to see if they're too high, if so, set their position back to the bottom instead of upwards.

stray island
#

Oh thanks i will try this out , i only tried it with a looping timeline , and it was glitchy not sure why

maiden wadi
#

It's not a small task. You also need to incorporate delta time factors for framerate independence as well.

hollow drift
#

How can i restrict a camera for a 2d top down game not to go out of the gamearea?

#

I use an add movement input when moving the camera with right click

#

i tried to limit the movement by

#

by simply checking if its location has reached the maximum distance and make a boolean. issue ofc is, that i get stuck then on its axis and cant get back

stray wagon
#

Does that mean this function is replicated, if yes how do I make not replicated?

maiden wadi
#

@stray wagon That means that it's cosmetic only. Or more correctly that it is meant for client only stuff.

stray wagon
#

okayyy make sense thanks

dapper cradle
#

What would I need to plug into the object pin ?

This lives on an actor BP (an NPC)
This actor has a skeletal mesh using an animation BP

the cast is to that Anim BP in order to flip a bool, alowing the NPC's animation to change based on true or false...

#

I have watched several videos and done some reading but I can seem to grasp what the general rule is for 'Knowing' what would go into the object pin of a cast node in any given situation...

maiden wadi
#

The NPC should have a mesh that the animbp is on. Get the Mesh, then get.. I think It's GetAnimInstance, or something? Then use that for the cast.

dapper cradle
#

seemed to work !

still abyss
#

Here's a crazy question: if a distribution executable can be decompiled into its source code by a bad actor, does that mean that a blueprint, which exists in binary, can also be deompiled into its source code by a bad actor? In other words, is the binary that Blueprints exist in effectively another layer of security?

still abyss
#

Was just a random thought I had recently

dapper cradle
#

is there a genral rule though ? which would make it easier for me to figure out what I would need in the object pin depending on the cast ?

sand shore
#

You wanna make a spike trap, but it only affects one type of actor? You know you'll need the cast... but what events can give you the actor that might need to explode?

#

You're trying to interrogate the type of a specific reference. You don't have it. How do you get it from what you do have?

#

it's a skill you build over time

sand shore
#

Anything custom would be more difficult

dapper cradle
#

@sand shore
Hmm, it would help if I understood this.
is it possible to know what would need to be plugged in based on a simple factor like...

I am casting to ThirdPersonCharacter, so ______ goes into the object pin
I am casting to an Actor, So ______ goes into the object pin
I am casting to an animation BP, so ____ goes into the object pin..

and I mean in general terms.

sand shore
dapper cradle
#

I understand that a cast is to gran access to the BP and variable etc withing what ever you are casting to.

sand shore
#

it's how ARK modding first got off the ground

#

@dapper cradle but there isn't

#

Okay so. For casting to an AnimBP theres basically only one way to get them anyway. Do you have a reference to a skeletal mesh? Get the anim instance

#

the other two, dozens of ways to get a reference that might be a player

dapper cradle
#

That is how I got my solution in the end but I fumbled around to find the solution.
Its not something I knew to do right away.
But it is something I will remember.

sand shore
#

PlayerState, PlayerController, GameState, etc all can lead you to a players pawn eventually

#

Take some time to learn the game framework

#

take some time to understand the structure of your project as it stands

#

watch the BP communication video from pins

dapper cradle
#

I am very happy to do so.
I am currently trying to improve my math daily.
Trying to learn to code daily through a couple of online courses.
Using the unreal online rseources and completing courses.

Its just so broad of a subject and I am the kind of person who learns by doing.
I have never been very academically strong but I am trying to improve 🙂

#

and regarding the the project, This is me learning by doing, making use of the things I have been learning and trying to figure out the things I get stuck on,
all I m doing is figuring out how mechanics can be put together and work in a 'playground' level.

#

@sand shore

sand shore
#

Yeah you're gonna have to fumble around a lot more

#

Not cause I want you to, per se, but more because I'd you don't, you won't learn to do it on your own as effectively

dapper cradle
#

True.
I am constantly fumbling. I pop in here when I need to talk to someone in order to organise my thoughts or when I have simply run out of ideas XD

maiden wadi
#

@dapper cradle Embrace that feeling and don't let it overwhelm you, but get used to it and try not to let it frustrate you too much. You're going to be fumbling for a while. Can't speak for anyone else here, but I've been at this for about a year and a half, and every time I get comfortable in realizing that I think I'm competent enough, there's always a new hurdle. Unless you really specialize with a job somewhere, and even after that I recommend it, you are going to be picking apart this engine for a while. It's been in development for over 23 years and there's constantly stuff changing and being added, removed. There are a ton of things to get your head around, and that's after the basic fundamentals of coding and design theory.

crude spruce
#

Is there some basic way to do damage between actors that everyone defaults to?

#

Ive stumbled into notifies and custom events and interfaces

#

and flags

#

I understand each solution offers some comfort in various structures

#

but for learning purposes i would like to do the most basic interaction that resembles a scaleable structure

tame pecan
#

@crude spruce You can always make a component that handles health for all actors you want to have health.

#

And you can control that with a interface 🙂

crude spruce
#
  • googles component *
tame pecan
#

There you go

#

Actor components are awesome. Don't need to inherit classes all over when you want the same logic on multiple classes

#

🙂

crude spruce
#

ok

#

i will check

sand shore
#

@maiden wadi 2 years at my most recent studio, I mostly know how to figure things out, but I still have to figure things out. @dapper cradle

tame pecan
#

@crude spruce let me know if you run into something 🙂

crude spruce
#

i run into it working (or me somewhat understanding it)

tame pecan
#

You sure you want to use an integer for health?

#

Float is usually go to

dapper cradle
#

totally @sand shore and @maiden wadi its a lot to take in but very rewarding too

crude spruce
#

no idea, im just trying to figure out my first scaleable method for transfering damage

#

but humour me, why health in floats and not integers? Isnt that for the mechanics to decide?

tame pecan
#

It is, but you leave out the possibility for dmg that deals decimal damage

#

So if you want scalable, float is more scalable

crude spruce
#

gotcha

#

Im not sure what i want really. i think(?) i want a common interface/component that each actor relies on

#

1.7 weeks old in unreal engine so bit fresh 🙂

#

i barely float

tame pecan
#

I would use components, otherwise you need to inherit all your classes that needs health from the same class

paper galleon
#

Dude. You wanna kill him. He's only a few weeks into the Engine

crude spruce
#

its a nogo if i need to go into the c

sand shore
#

GAS is hard if you don't already have solid OOP and encapsulation foundation

paper galleon
#

😅 I've been figuring out the system for months now

crude spruce
#

i dont want the best method from a CS perspective

tame pecan
#

I would not recommend GAS for one who's 1 week into Unreal.

crude spruce
#

just the minimum viable scaling 🙂

tame pecan
#

Just use a component.

crude spruce
#

any opinion in any programming channel is best method from CS perspective 🙂

paper galleon
#

But you can try gas. If you get someone to write out the boilerplate code for you and tell you how exactly the system works

crude spruce
#

I will look into GAS

keen wedge
#

Hey all, just a quick one, has anyone used the Tobii Eye Tracker with Unreal Engine? I'm looking to setup/configure for very basic movement control (left/right) in a 2D platformer. Currently waiting on a response from Tobii regarding their SDK as it looks like its on older versions of UE4 at the moment (4.22/4.23 maybe)... would appreciate any info anyone has - thanks in advance 🙂

paper galleon
#

True also. It depends on how sustainable his health system is going to be

tame pecan
#

Yea, but it leaves out the possibility of implementing armor/resistance. That's why I would put it in a component

crude spruce
#

I currently attack an enemy with an interface. The enemy attacks me with apply damage

tame pecan
#

Otherwise you need to inherit all your classes from the same class

#

@trim matrix Even resources, buildings, props?

#

Sounds annoying

crude spruce
#

they didnt get drafted

tame pecan
#

Yea, but I was specifically talking about a component that handles health and resistance. I think it's better to put it in a component

#

Yes

#

Like we have put SignificanceManager in a component, it's wonderful

crude spruce
#

Can i put an event in a component, put it on an actor and trigger the event from the behaviour tree?

sand shore
#

you'd have to handle the reference, but yee

#

tasks are just normal BP mostly

cosmic basin
#

hello, why my script marked in yellow circle is not working? I can't make reference to BP_lever like that? I created BP_lever variable in BP_lever3. I'm stuck, dont know why its not working

crude spruce
#

What i currently do is from the tree, check for interface and then execute that. And pick it up on the actor

tame pecan
#

I would fire the damage interface event from the behaviour tree, not the actual compoent event

#

@crude spruce

sand shore
#

@cosmic basin tells you the problem right there

#

read your errors

#

in this case warnings

cosmic basin
#

yea i have read this plenty of times

sand shore
#

what do you think it says

crude spruce
#

@tame pecan Im not sure i follow. Sounds like i should have a component and interface?

tame pecan
#

Yes

cosmic basin
#

it doesnt working with static mesh things?

tame pecan
#

So perform the interface function when AI attack

sand shore
#

in BP only I might even prefer a function library and a component@tame pecan @crude spruce

#

function lib can internally get the component via get component and silently fail, like interfaces, but also can do other cool things like default functionality

#

can't do that in BP interfaces

cosmic basin
#

so i should replace static mesh component with something else?

sand shore
cosmic basin
#

ah, thats why its working with funciton "get actor of class"

#

got it

tame pecan
#

You can do that with a component too.

crude spruce
#

Hmm ok. I need to take a step back and digest this. No simpler way than the other, only more or less something something

sand shore
#

@tame pecan the point of the interface is to not have to reach for the component, no?

cosmic basin
sand shore
#

Or are you saying you never explicitly call the components API, because you have a IVitalsComponent ?

halcyon grove
#

quick brainstorm if I may, I'm building a targeting system and I'm trying ot use "find look at rotation" to turn the player towards their target executed via "set actor rotation".
However I want the turn speed to be based on the "rotation rate" in the "character movement component", any ideas on how I can achieve this?

tame pecan
#

Why would I put it in a interface because you can put logic before (if you want) the damage event on the component.

If you put the damage event into a function library that gets the component and does damage, you have that logic everywhere. You can put that logic inside the damage event instead

#

If you put it as a function library, you can't put custom code before the damage event in each actor

halcyon grove
crude spruce
#

Ah ok makes sense

halcyon grove
#

you can still work in whole numbers but you will need to convert to float at some point...

crude spruce
#

I havent done anything yet, the interger was simply for me to interface with a component visually 🙂

#

print string

halcyon grove
#

and its really easy to do with "normalize to range" node

tame pecan
#

I would not recommend a function library for damaging actors. You can perform less custom code for the damage event

halcyon grove
#

because further the UMG for health takes a 0-1 value...

#

so you take the max and min health normalize to range and that converts it into a 0-1 value

#

i just did my own damage tree with lots of functions

#

it was fun (not fun)

#

but I used many functions

#

and libraries to transfer the scripts between blueprints

crude spruce
#

health mechanics are only after the fact that i can resolve attack and hit. from and to. Im not making a game 🙂

#

im just trying to understand it

fallen glade
#

how do you properly remove an item from an array with a delay ? this is not working, I think by the time the remove is triggered the previous component to remove is been replaced

halcyon grove
#

call the array, find the index of the item from that array and then remove the index and set the array again

#

so, I'm building a targeting system and I'm trying ot use "find look at rotation" to turn the player towards their target executed via "set actor rotation".
However I want the turn speed to be based on the "rotation rate" in the "character movement component", any ideas on how I can achieve this?

#

😅

willow phoenix
#

the spline is rotated, but the track does not get rotated at all. any ideas what to look up? i tried the "transform" at spline but that messes up the track

#

its disconnected because if i connect it it does this:

spark steppe
#

which is basically a FIFO buffer 😉

lime ridge
#

@willow phoenix Where is the origin point on the mesh?

fallen glade
#

thank you

spark steppe
#

you could do a isvalid check before you remove it, and print to screen if its not valid, that way you can figure out if thats the problem

lime ridge
#

@willow phoenix I also believe you need to clamp the vectors for the tangent based on the length of the mesh you are using. I have an example using DistanceAlongSpline but it should work the same using the spline points:

pure tulip
#

Would anyone happen to know why one WorldAlignedBlend has it's node port things in a white colour and the other has them in a more greyed out colour and with a (V3), (S) or (B) at the end?

EDIT: Nvm, I still don't know why it happens but I just copy and pasted the bottom one and it works fine now.

north igloo
#

Hi friends, this is a bit of a far-fetched ask, but does anyone know if there is a software that allows mocking up of blueprints outside of unreal or a way to run UE in some sort of blueprint-only mode so I can work on those from my laptop?

spark steppe
#

i think the gray ones are optional, the white ones are required

pure tulip
#

I'm trying to blend a grass texture with a stone texture and that's what that top blend does. However it only shows the stones no matter how extremely I change the values. I thought it was because of that greyed out issue but it doesn't seem to be. :/

crude spruce
#

actor > play montage > notifystate
How do i get the value ofa variable on the actor into the notify state in this flow?

stray island
# maiden wadi

So I couldn’t get this working , idk where to connect it event tick or begin play

#

How to check if my static mesh component is overlapping with a box collision component when both are inside one actor

proper wyvern
#

hey folks, not sure if this is the right place to ask, but.. is it possible to have a curved progress bar?

devout lodge
#

yes

proper wyvern
#

something like this

#

instead of this

devout lodge
#

try setting up a rotation, not only position movement

proper wyvern
#

a rotation?

#

angle?

devout lodge
#

angle i guess

#

and shear

proper wyvern
#

Not sure I can get a good effect with those

#

like, it already fills nicely since I'm using the fill image

#

but I cant seem to fill it at an angle

#

maybe I need a different kind of image?

devout lodge
#

if possible, try to make an animation of your progress bar fill and code it so it fits the timing

proper wyvern
#

oh I see

#

so I change the angle/shear/position depending on the percentage of the progress bar?

devout lodge
#

yes

devout lodge
#

i think

stray island
#

Doesnt work

devout lodge
#

ok

stray island
#

I need components overlapping event inside an actor

devout lodge
#

look

#

can i ask for help

#

ive been looking for it for weeks

#

i mean

#

i dont want to be impolite at the same time lol

#

just asking if its ok

stray island
#

Yes sure why not

devout lodge
#

hello everyone!
i have a problem
I cant find a normal widget dialogue tutorial on youtube
so
basically
i need your help on making one

stray island
#

I can help finding one

devout lodge
#

i want it to look smth like this https://www.youtube.com/watch?v=srZdDAJbHfc

Fangamer and 8-4 are proud to present a very special 5th anniversary online concert broadcast of the music of UNDERTALE
Arranged and performed by MUSIC Engine, filmed in May 2019 in Tokyo, Japan and remastered with new content for this digital stream

undertale.com
fangamer.com
musicengine-info.net

♥♥♥♥♥♥♥
Credits:
UNDERTALE and all original mu...

▶ Play video
#

so

crude spruce
#

typewriter text?

devout lodge
#

when the player approaches the actor mesh and presses E the dialogue starts

#

player also can ask actor questions

stray island
devout lodge
#

its not an npc

#

here it is

stray island
#

Same logic tho

#

Heres in depth one

devout lodge
#

oh no

#

it doesnt work

#

i checked

#

its horrible

#

i killed 3 days on it

#

and it failed

#

a lot of times

stray island
#

Then maybe point out its problems?

devout lodge
#

ok

#

look

crude spruce
#

actor > play montage > notifystate
How do i get a variable on the actor into the notify state in this flow?

devout lodge
#

heres the dialogue

#

idk how to make it work

crude spruce
#

are you an undertale character

devout lodge
#

no

crude spruce
#

Obiously the receive notify tick gets skeleton information because i can get the socket name and position

#

but how do i get the actor that plays the montage into a notify state?

#

i assume i want to transfer some base properties like what kind of damage it does. how much, etc.

devout lodge
#

i feel like im a very beginner cause i dont even know what notify tick does

crude spruce
#

im asking the channel

stray island
devout lodge
#

a

#

well

devout lodge
#

he taught how to make an actor display only 1 text

#

and when he went further

#

somewhere at the part 4

#

there was a problem that the dialogue box wasnt showing up

#

also

#

i want that typewriter effect so i can use this sound

stray island
#

How about the advanced version https://youtu.be/3uW7CgmrKAo

This is the start of a new series covering how to make a more advanced dialogue system than the previous one I had made. This one features questions and responses all using the behaviour tree as a make shift dialogue tree. In this first episode I show off the final product and start things off with setting up how to show a interact message such ...

▶ Play video
#

And then add this functionality

devout lodge
devout lodge
dusky stirrup
#

so i made this simple take damage for when you get on an area with fire

#

like a burning ground

#

but the armour gets restored even if we are still on the burning ground

#

is there a way so each time we enter this area, armour doesn't restore itself until we leave the area?

#

i just started coding a few days ago so i thought using a condition, but not sure how to make it work 🤔

#

i have that, if we exit area armour gets regenarated

#

and if we enter we take damage

#

but thing is that while we are still in the area, we take damage and armour gets restored at the same time so it goes up and down

#

and i have it 🤔

#

oh shit you right

#

😅

undone wing
#

I want to create a wind effect on cloth a character is wearing. Used SimpleGrassWind but can't change the wind direction. It seems like a wave from left-to-right but I need it from front-to-back. How to fix it?

hidden badger
#

I have a noob question. Is the "time by event" suppose to stop once it is not called again? Or it keep reiterate constantly?

ocean bluff
#

Hello, would like some help for adding enemy death ragdoll, for some reasons the enemy won't ragdoll every time i try to kill it

faint pasture
#

@ocean bluff probably don't destroy the capsule, just disable collision on it.

old carbon
#

What is the best approach to reuse an animation blueprint and blendspace across several stances (unarmed, shield/sword, dual wield). In all cases I have the same state machine, transitions, blendspace; just the individual animations are replaced.

ocean bluff
#

@faint pasture got en error and and the capsule compenent is not compatible

faint pasture
timid apex
#

Not sure if this is the right chat but I need help with some blueprints, I think it’s probably to complicated to post here but if there’s anyone out there that can help me I’d be willing to trade art (3d or 2d) for blueprint help

stray island
#

Try to explain it here

timid apex
#

Well I’m using a prefab project as a base for my project, it’s a combination of ALS, DCS, and rpg inventory and interaction menu. I’m working on a title screen and character creation menu. My problem is When I drop the character into the character creation level the character somehow over rides everything and forces the hud onto the screen. I’ve tried setting the auto possession to disabled. And I’ve tried a million other things to get it to not immediately take control of the character. I’ve even tried making a new game mode with a different actor as the default. It still possesses the ALS character. My original plan was to make a proxy character in the cc and send the values of my morph targets to the character on level start but since I’m using level streaming I’m not sure how to do that.

#

I’m a character artist I don’t really know what I’m doing which is why with this particular problem I think it would be more easily solved in vc or something where I can show what I’m dealing with in greater detail

steep holly
#

What is this node called? It is in materials (Sorry for bad photo

tight schooner
#

@steep holly float 4 or something. Ask material node graph questions in #graphics cuz the node graph isn't BP

steep holly
dusky stirrup
#

@trim matrix

#

what have i done?

#

well whatever it kinda works but it just does the recover armour only once

#

🤔

#

also i may have commited war crimes against code

#

but bear with me, i started coding today

drifting bronze
#

hello i am trying to make some AI and in the behavior tree when i click new task i get this

#

it wont let me make a new task

#

any idea why>

dawn gazelle
# dusky stirrup <@456226577798135808>

The gate you have is basically pointless - you have tick firing into its open, meaning that it's constantly going to open itself, so even the boolean that's connected to "start closed" won't do anything. Perhaps you meant to connect the tick to enter and the onoverlap to the open and disconnect the boolean?

dusky stirrup
#

the armour recovery and the take damage make the bar go up and down against each other

#

i just don't get what to do and went with my own logic

#

made a mess that works once then never again

dawn gazelle
#

You probably don't need to be using tick for that. You could be using timers if you want to have something being periodically refreshed, and even check the status of said timers before allowing it to run. How much of a delay do you want between taking damage and armor being regenerated?

dusky stirrup
faint pasture
#

@dusky stirrup every time you take damage, set armor recovery to 0, and fire a retriggerable delay that sets it back to base

dusky stirrup
#

player keeps burning alive while recovering armour

dawn gazelle
dawn gazelle
#

It's absolutely about timers - if you don't want the player to regen armor while taking damage, that taking damage event is instantaneous, it doesn't linger per se, so you must define a "timeout" period where the armor won't regenerate.

#

What I've made above should allow a player to regenerate armor while not taking damage (so long as you hook up your damage events correctly) and so long as they don't take damage for 3 seconds.

dusky stirrup
#

@dawn gazelle call me an idiot but i don't get some things you made 🤔

#

did you create a function where you had refresh timer set to a defined value?

dawn gazelle
#

The top node is just calling this event. I like to keep begin play as clean as possible

dusky stirrup
#

so it's not a function aside gotcha

#

it's just a create a function for the take damage and i thought i had to create one for the timer too

dawn gazelle
#

And this is just storing the timer in a variable. When you overwrite the timer variable, it resets the timer. If you didn't store the timer as a variable, then if I remember correctly, it would just create a new timer and not touch the old one.

dawn gazelle
fading raptor
#

So im trying to hide a widget once an anim montage plays, so i set a boolean to true once the montage plays, then in the level blueprint i cast to where the montage plays and set up a branch, where if it comes back true, it hides the widget

#

but for some reason the widget doesnt hide

#

I debugged to see if there was a problem with hiding the widget so i put a delay in place of the cast to and branch and it worked

dusky stirrup
dawn gazelle
fading raptor
#

What do you mean? im fairly new to programming so bear with me

#

its a begin play if thats the right answer

dawn gazelle
#

Begin Play only fires once the relevant actor comes into play. Casting to the widget and checking if the value is true only happens once as well, as soon as the node is triggered by Begin Play.

fading raptor
#

So how should i make it so it sees that the anim montage played and i can hide the widget?

#

i see what you're saying but im not sure what to do from here

#

In other words i want to make it so once the player presses a certain key, the widget becomes hidden

dawn gazelle
fading raptor
#

ohhh so i do it directly from where i play the montage instead of the level bp

#

thank you so much!

dawn gazelle
#

There's other ways to do it, but it gets complicated.... Like using the AnimGraph and using Anim Notifies, but I'm not good with that stuff.

fading raptor
#

yeah me neither

dawn gazelle
#

You put the start on the tick.

#

You want it on begin play.

dusky stirrup
#

still nothing

dawn gazelle
#

And you need the top timer set to looping

dusky stirrup
dawn gazelle
#

What doesn't trigger? The stopping of the regen?

dusky stirrup
dawn gazelle
#

Set it to true by default

dusky stirrup
#

can't do that

#

if i do that it will always trigger

#

no matter if we keep taking damage

#

🙃

dawn gazelle
#

No. Set it to true. When you take damage, the "Take Damage" event should be called (by you, somewhere in where you've defined how the player takes damage) which sets it to false, waits 3 seconds for no damage, then sets it back to true so it can resume refereshing your armor.

dusky stirrup
#

either way im gonna try find a solution

slender wolf
#

Anyone have suggestions on how to attach a scene component to a dynamic specific part of a mesh mesh without using a socket? I guess this would be a similar way that one might attach arrows into an enemy character. Open to any suggestions here, though. For context, I am not attaching a static mesh or anything, I just need to attach a scene component to track it's movement while the skeletal mesh animates. (The idea being, if I attach it to the forearm of a character, it would move with the surface of the mesh on the same point. Yknow, as one would expect in real life 🙂 )

fading raptor
#

How do i cast from a variable in the level blueprint? I cant find a cast to

#

Basically i want to get the duration of a sequence i put in the level blueprint, and convert it to a variable so i can use it elsewhere

#

According to google i cant, but is there a way to get the duration of a sequence without playing it?

indigo bough
#

Hey folks, so I have this unwavering idea in my head that Event Tick is the devil.
I know it has it's uses, but I always struggle to know when it's appropriate.

Currently, I'm trying to check a float's value and if it's below a certain amount, play a sound on loop until it's no longer below that threshold.

Obviously I could just attach this to a tick, output a bool from the result and 'jobs done'. But is there a better way to do this? There are multiple reasons the float could go below this threshold.

I could add the check to all of those events, but that feels like a lot of floating logic, potentially even coming from external sources.

Would the better approach be to have a function which is called when I want to update this float value, which includes a check after the value is updated?

faint pasture
#

Event tick isn't the devil but it should be used for when something has to continually be done every frame. Lerping a camera, sure. Checking if something happened, nah.

indigo bough
#

Awesome, thanks 🙂

#

I obviously can't run a custom event out of that same function, so how would I trigger an event when my float goes below that threshold?

#

((Run them in functions instead of events)) 😄

faint pasture
#

If number under threshold, call DoSomething

#

Why can't you call a custom event from that function?

indigo bough
#

I tried making it inside the function... Maybe it's time for bed 😄

odd plume
#

How would you be able to concatinate two strings or text in blueprint? Trying to get something like Text: (Value of Text) into the UMG designer

#

Like in here

mental sail
#

search for "append"

#

I'm having issues with "Find Look At Rotation", I have an AI/NPC character that has an Aim Offset that I use to set vertical and horizontal offset to make the character upper body look at Player. This seems to work fine with one exception: when the rotation of the AI is facing towards -X axis in world space, and Player position switches from -Y to +Y on axis, causing the Look At Rotation value to flip between +180 and -180. (note, I am interested only in Yaw rotation at the moment)

valid widget
#

how would i find a flat spot on a generated terrain in runtime

brittle ember
#

what would be an ideal way to remove all widgets from my clients as the server? this solution does not work

valid widget
#

i use PTG so after generated i need to find a flat spot a certain size

dawn gazelle
# odd plume Like in here

If you're using text, Format Text is a great node to use as you can also set up variables within the text, so the format can be something like "{valuename}: {value}" and you'll get pins for those variable names.

valid widget
#

that my tardis can land by

valid widget
#

anyone know how to do that

dawn gazelle
brittle ember
#

ah that makes sense!! thankss

odd plume
#

Are these numbers and text centered? This is after I used the format string method

drifting bronze
#

ok so i need the non pure version of this

#

how do i do that

#

i dont see an option for it

#

ok well i reworked it a little i think this still works

#

i think

mental sail
#

Also, isValid? all the time...

drifting bronze
#

?

dense tulip
#

Is it possible to clear the Message Log :

#

Maybe a command ?

mental sail
flat raft
#

Key

#

anyone here animbp savy?

elfin badger
#

Is there a way to detect when the open level node is fully loaded? I would like to have a loading screen that goes away that is not a fixed on delay value but depending on whether the level is actually loaded

proper wyvern
#

Can anyone tell me what I'm doing wrong here? 😬

elfin badger
#

cant use that one because my level are using different gamemodes

proper wyvern
flat raft
#

are you telling it to start from where you left off?

proper wyvern
#

I think so

#

I use "GetAnimationCurrentTime"

#

is that the wrong node?

flat raft
#

print the value

#

is it doing what you expect?

proper wyvern
#

it is

#

just checked 🤔

proper wyvern
#

reverse at the specific current time?

mental sail
#

Probably want to get the current time from the Return Value, store it in a variable, and use that value on playback

flat raft
#

sorry no idea

#

lol

proper wyvern
#

@mental sail doesnt seem to work either

#

"HideBraking" always starts it from the end

#

I fixed it, thanks anyways guys

#

since we're reversing, need to get the time backwards

mental sail
#

can you plug in "target" into ""return value" on your animation node?

proper wyvern
#

why? 😁

flat raft
#

did you get it working? @proper wyvern

mental sail
#

Instead of Event Tick, did you try connecting the Exec output of PlayAnimation node?

tender ermine
#

hey i know this is an unreal discord but i dont have any unity discords

#

i was wondering if anyone could help me with some unity stuff

proper wyvern
#

I'll pm you the link @tender ermine

#

Yes @flat raft, I sent a screenshot

tender ermine
#

thank you!

rugged trellis
#

Hello, I need some help figuring out why this doesn't work, When the "Reticle View" variable is 1 it prints 1 to screen but doesn't change the image colour. When I break the connection to the "Reticle View" and set the switch to 1 it prints to screen and changes the colour fine.

eternal tiger
#

hey guys. does anyone know a way to make a 1D aim offset that has 360 aim and will interp from the minimum axis value animation to the maximum value without having to go completely back around the other way? like if the player aims 180 and goes to -180, the character interps straight to that frame in the animation rather than bouncing back in the opposite direction.

smoky rivet
#

how would i make a rendertexture?

#

im trying to make dual render scopes (aka 3d scopes)

#

is this correct>

solid grove
#

Why does the emitter only spawn on the listen server?
The damage and the destroy actor seems to work fine
this is in a bomb blueprint btw
its just a sphere with projectile movement

dawn gazelle
solid grove
#

@dawn gazelle but I am destroying the actor after spawning the emitter

#

and it does run on the listen server

#

just not on the client

dawn gazelle
#

When you destroy on server, you're saying destroy on clients as well.

solid grove
#

@dawn gazelle I'll be damned it does seem to work if I remove the destroy actor

#

When do I put the destroy actor then?

#

where*

dawn gazelle
#

You can do it where it is, but do it with a life span instead of destroying. Give it a second or two before destroying itself.

solid grove
#

uhuh thanks

lime ridge
swift coral
#

Good Morning! I hope you understand the problem im now trying to explain. Im a unreal newbie and I need to create an Unreal prototype. I have a like basic building system, where the player chooses one of 6 Blocks and can place these afterwards. I accomplished this via a simple Spawn Actor from class (the class is a variable - changed by pressing a button). The block always spawns at the same location. Then the player has the arrow keys and the numpad to move the block (via Teleport actor node) and he hits enter to place it permanently. When I spawn a new one and move this one again, obviously every actor gets moved - and the "permanent" block doesnt stay in its position. So I want to change the class of the actor as soon as I hit enter. Then the "permanent" blocks will be stored in a separate class that isnt affected by movement. So TL;DR: can i change the class of a static mesh component, and if yes, how? or are there simpler ways to accomplish my desired result?

spice merlin
#

Good morning. Why is the written logic in the parent controller not copied to the children, only part of the logic is working, all the actors are on the stage.????

twilit heath
#

@swift coral spawn actor from class returns an AActor*

#

you just stash it into a variable, you move only that referenced Actor

#

and you set the variable to null as soon as you hit enter

#

without calling Parent function?

spice merlin
#

the logic is copied only to one children, the rest only walk, there are no health parameters, etc.

#

All NRSs are of the same type and all have one controller and they have one common parent, I have not changed the variables, the children are empty without logic.

spark radish
#

hi

#

anyone know what i have to feed into this node?

#

is there some sort of a functional test global object?

dawn gazelle
#

You can create functional test blueprints

spark radish
#

thanks, but how do i reference it in my blueprint?

dawn gazelle
#

Same as any other actor you spawn or place in your level.

spark radish
#

thanks

ancient spindle
#

Hi. I have a camera that should move on the XY plane when the mouse cursor is at the edges of the screen (RTS style movement). However, when I hit play, the bottom and right edges don't match my scene window's size, so the camera scrolls down or right almost at the middle of the screen instead of the edges. The up and left edges are just ok. Any idea of what I'm doing wrong?

dull gale
#

I'm unsure if I can help much but it's easier if you show the BP. If I were to take a guess it's something wrong with what decides when the camera moves

ancient spindle
#

Sure. This is my camera movement BP

dull gale
#

I can't seem to figure out what's wrong with it unfortunately, maybe someone who can help comes soon

mellow trench
#

[BP/Move Along Spline] Hi all. Has anyone any idea how I can manage to move an actor along a spline continuously? When reaching the last point the actor reverses direction instead of continuing. I'am using the GetDistanceAlongSpline node with a lerp in conjunction with a Timeline. Also I ensured that the spline is closed.

crude spruce
#

I want to create a damage system where any actor and weapon can damage any other actor.
Any tips on what to involve or where to start?

This is primarely a melee prototype

stray island
#

I need scrolling meshes version of this effect 😕

#

I can’t tell how to target it , looping timeline does it
But in a glitchy way

near flint
#

Is there a way to Rotate a SKELETAL MESH with BLUEPRINT? 🙂
I found a decent way to do that with a POSEABLE MESH, but i need the SKELETAL MESH to mix a rotation with animation 🙂

#

I tried to program it in the AnimGraph but the rotation went like crazy lol

pastel garnet
stray island
#

Wdym uuuu?

pastel garnet
stray island
#

Oh thats from a previous question

pastel garnet
#

Right

stray island
#

Uuu was a mesh

#

And when it hits a collision box

#

It shd destroy

pastel garnet
#

Why would you need to do “is overlapping” if it is fired when it overlaps?

stray island
#

I want to detect overlapping

#

Its a mesh component inside and actor and the collision box is inside the actor too

#

Same actor overlapping event , how?

pastel garnet
#

So uuuu is a mesh

stray island
#

Yes

pastel garnet
#

And what is the blueprint placed inside of?

#

Character? Actor?

stray island
#

Actor

pastel garnet
#

Is it inside the box at level start

#

Begin play

#

Overlap won’t fire if it is placed inside the box collision before game start

stray island
#

I set up a timeline to move the cube up

#

Which is uuuu

#

And i want the cube to be destroyed when it hits the collision cube

pastel garnet
#

It’s in the same BP right

stray island
#

Yes

pastel garnet
#

I don’t think it can detect its own collision

#

But I might be wrong

stray island
#

Oh

#

To be more accurate uuuu is instanced meshes , i will generate many cubes and when any hits that box they shd disappear which creates the bubbles going up effect

#

As i posted earlier

pastel garnet
#

Hmmm

stray island
#

But there could be better work sround

maiden wadi
#

inb4 VectorMath.

stray island
#

Authaer u helped me on this bubble effect earlier but it didnt succeed for me

#

I also don’t wanna do niagra

maiden wadi
#

Niagara would definitely be the easier and more performant way. But what didn't work?

stray island
#

I didnt know where or

#

I didnt know where to connect this

#

Begin play or tick

maiden wadi
#

Probably tick. Needs to happen a lot to smoothly update the locations.

stray island
#

And i didnt know how it works but i made the cube go infinitly up

maiden wadi
#

That's all that does is makes it rise. You need a check that gets the instance's current location and sets it back to the bottom instead of towards up if it's too high.

#

Out of curiosity, what's the Niagara hesitation?

stray island
#

I think niagra is more for

#

Particles

#

While these will be complex mishes

#

Meshes*

#

Not just bubbles

maiden wadi
#

Complex in what way? Do they do anything but move upwards?

stray island
#

No

#

😇

#

But they are big sized

#

And have geometry into it

maiden wadi
#

Random fun fact. The traffic in the Shootergame's example map is a particle system.

#

The distant flying cars. They're a mesh emitter.

stray island
#

Tbh i also know more about blueprints than niagra

#

But if niagra is the way

#

I will learn it

maiden wadi
#

Fair enough. The issue is this. To do this with a HISM, or ISM. You're taking time from your game thread to handle visual stuff. Now, these are fairly simple vector math calculations, nothing expensive if you're only going to have say... 30-50 meshes? Start getting up into 300-500 and lower performance PCs are not going to like that coupled with other game thread stuff going on. Meanwhile in Niagara, the majority of it gets done on the GPU, which is insanely more powerful and quick than most CPUs. So if this is a small project with a few other simple things going on, don't stress about doing it in Niagara. If you have larger plans, I'd just save yourself the trouble now and do it there.

#

Stop overlapping.

#

Then you can overlap again.

stray island
#

No it wont be 50 but could be 1000

#

But since grass is hism , why didn’t they make it gpu instead

#

I mean why grass isnt made in niagra

#

I meant foliage * not grass sorry

#

I assume collision is the reason

maiden wadi
#

Grass doesn't move. Unless it's shader vertex manipulation. The actual meshes stay still, and the instance transforms don't move, they're static. But if you run these calculations, you'd be doing them on the CPU. In C++, I wouldn't flinch at 1,000, or even 10,000 transform calculations, but in blueprint, that'll be a little rough.

#

The drawing and whatnot will still be done on the GPU, but your math to make them move upwards will be the CPU running it. Niagara does this on the GPU in particles with much more simplified and optimized math.

#

Well, some of it. Some Particles are CPU bound, but they don't run in your gamethread.

stray island
#

Oh I remember a problem , macs , (weak gpu/ strong cpu) can make hism a better option?

maiden wadi
#

It's kind of like the abstraction between a Skeletal Mesh and Animation. Animation is CPU, but it doesn't do most of that on the gamethread unless you mess up your animbp. If everything in the BP is fasttracked, it does animation calculation in a separate thread. Now, the AnimBP graph is done on the gamethread. It basically does the work of populating the other thread with necessary variables and then the other cpu thread does the heavy calculations with all of the bone transforms and such to find the correct poses.

#

HISM does sort of the same thing in a way. CPU says "I want a mesh at this location." GPU draws one. But until the CPU updates that transform, the GPU will just keep drawing it at the same location.

stray island
#

Thanks for the technical explanation, I will learn some niagra

lunar fog
#

Hi guys, I'm trying to do something quite simple - I want to spawn a foliage instances via blueprint using this script:

#

It works and It spawns in a cube as expected, but no new actors appear in the world outliner

#

Also, my foliage panel is empty

#

And what's more, when I reload the level, I get this warning -

#

If i hit "fix" the instanced meshes dissapear from the viewport and I can only assume the erroneus foliage actors have been removed.

#

What's the correct way to procedurally add foliage to the level?

#

To furter compount this, if I actually reference the instanced foliage already in the level like so:

swift coral
earnest tangle
#

I got a huge Contains node for some reason lol

crude spruce
#

probably cause one item in the array has a long name

#

If i want players and npcs do be able to do damage to each other, whats the topmost blueprint type to build from?

earnest tangle
#

yeah I would have thought so too but all the names are pretty short

crude spruce
#

no whitespace in the names either?

#

redo the node?

earnest tangle
#

nah, the options are Wall, Floor and Ceiling

#

and yeah it doesn't really fix itself, it's not really a problem, just thought it was kinda funny :D

crude spruce
#

If i want players and npcs do be able to do damage to each other, whats the topmost blueprint type to build from?

#

I basically want players and npcs to have the same features like equip thing. attack with thing.
And at some point i want either a player or AI to control the character

#

OKAY 😄

#

oh ?

#

So a non humanoid enemy like, scary mutantdog, would be which class?

#

hmm

#

But i could simply add the component to a pawn?

#

They look somewhat somiliar to me
Couldnt i just add the components to a pawn and get it working same?

earnest tangle
#

CharacterMovementComponent is riduclously complicated :P

crude spruce
#

i see

#

digesting

#

If i understand it correctly, what im looking for is an interace that connects them all. players, humanoid enemies, nonhumanoids.

elfin summit
#

hey! i have a question that i cant seem to find much about on the web, does anyone know if its possible to edit/generate a landscapes heightmap at runtime via blueprints? im currently trying to chunk my procedural generated world and this seems to be a grey area from what i've found

crude spruce
#

lets say players and humanoids use weapons and/or unamed animations to attack. Enemy vs enemy vs player. where would i want to resolve the collision and damage?

trim matrix
#

How can i set a key input action to variable as is setted up from the ini or the project settings

earnest tangle
#

basic movement logic is not hugely complicated to build tbh - I implemented Quake 3's movement algorithms in a Unity game once upon a time

#

but the character movement comp is pretty convenient if you don't necessarily need to have a certain specific feel with how things move

#

lol

crude spruce
#

@trim matrix does it change a lot if what i said would apply for multiplayer?

elfin summit
#

thanks a lot! i'd seen this image and it had me digging down the wrong hole all day

crude spruce
#

@trim matrix Ok then, so do i make a mastercharacter type of BP and derive down to player and nonplayer ?

#

vaguely unsure, depends on your answer? 🙂

#

one is ai one is player. differences in which mesh and animation blueprint sure.

#

some are unarmed some are armed

#

i figured

#

Ok

keen wedge
#

Hey all, I have a bit of a "maths" thing I'm struggling with and I wondered if you might be able to help...

Im using eye tracking which returns to the position of the gaze as pixels. The aim is to end up with a value between -1 and 1 which I then use for movement (horizontal).

At the moment, it looks like this:

GazePosition / ViewportSize - (0.5,0.5) x 2

That gives me values between -1 and 1.

The problem I have is that it requires the player to look all the way to the left, or all the way to the right to get to those maximum -1, 1 values. What I was hoping to do is effectively have a smaller area in the view port that would provide the same functionality but mean the player doesn't have to look so far in either direction.

I think the maths stays the same, but I can't quite work out whether I need to divide the GazePosition by 2 and the ViewportSize by 2 or whether I need to multiply them... (maths wasn't my strong point)...

If you think of say 1920x1080 - but halved and centred, I want that bit in the middle...

Can anyone help me with this please 🙂

crude spruce
#

@trim matrix last question, do you know any good videos that helps with this? Im sort of fresh on the vocabilary

keen wedge
#

Hey, thanks for such a prompt reply. So you mean the "final" number from the above etc, multply that and clamp?

#

Would that still give the same kinda "ratio" of increase/decrease in that smaller space? For example... if I look half way between the middle of the screen and the right hand side, I would have a value of 0.5... so, reducing the "box" that I want the player to be moving their eyes in, say by 50%, that would mean that at 25% across from the centre to the right, they'd have a value of 0.5 still, and then when they get to 50% from the centre to the right they'd be at a value of 1?

#

Sorry, that was as hard for me to think/say as it probably is to read

#

Yeah, thats what I'm after...

#

So I just need that multiplication then?

#

hmmm... not sure if thats what I want... one sec, I'll do a little diagram, I may not be explaining things quite right..

#

Sorry in advance for the arts skills (about as good as my maths clearly!)

#

perfect! 🙂

#

...if I change the actual viewport size for the fake one, in the division, do I still keep the original gazeposition or do I need to divide that by the same ratio?

#

well, thas another minor thing to build into this, as I want to take the position of the player character as opposed to the centre of the screen. They are "almost" exactly the same (using the 2D side scroller) but I'm not worrying too much at the moment for that... figure I need to plug it in somewhere to pretend to be the 0,0 etc..

#

Thats probably where I was going wrong then, as I was affecting both parts..

#

lol.. sounds about right... 😄

#

well done me 😄

#

Any thoughts on which stage I should take away the offset?

#

These are the nodes at present...

#

So, take that from the gazeposition value?

#

Yeah, was thinking the same... giving that a go now 🙂

#

Take it away from which bit though?

#

I think in the 2D side scroller the camera centres on the player character... it really is such a minor difference in values, but it was suggested I should probably make the eye tracking control relative to the player character rather than the screen just incase anything changes/went awry

#

I think I may need another step... it seems to hit 1 much quick on the right, than on the left... e.g. I still need to look at the far left of the screen for a value of 1, where-as I can look 50% of the way from the centre to the right for the value of 1 ..?

#

erm... getting a little lost now... sorry.... I did the fake viewport size by dividing it by 2 etc... to make it half the size..

#

feels like the inner box is 50% off in one direction perhaps...

#

ok, I'll give that a go.... so, drop the fake viewport size, and then multiple the final result, I'm guessing by 1.5?

#

Happy to try the above also in moment, just trying to get my head around it all...

#

yeah, sorry, when I say 1.5, I mean, I'm trying to get an invisible box in the middle that is half the size of the actual screen etc... so the player doesn't look too far from the character...

#

gah..

#

(I had a very late night... mind has utterly gone... so sorry)...

#

ok... I'll try the multiply by 2... and presumably still clamp..

swift coral
#

Hello. I got stuck at another problem: I have 6 different blocks to place. Each one has a certain weight. How can I assign the weight to this actor and add it to another variable whenever I place this certain block. So when I place a block (via the spawn actor node) I want to have the weight value assigned to this block. How can I do this the best way?

keen wedge
#

Yeah, that would be nice... this is for a research experiment for accessibility devices... I'm already a week behind, so I may just have to go "here's where you look" and leave the customisation out for the time being...

#

annoyingly the eye gaze plugin has a little widget that shows where you're looking, but doesn't seem to work in the 2d side scroller template, its just always in the middle, so it makes it a bit harder to diagnose a few things..

#

The multiplying by 2 has worked... deffo feels centred now...

#

yeah, I was doing that... the funny thing is is that every time I try to look at the values, it obviously changes them because I've moved my eyes! 😄 😄 😄 Had to start taking screenshots...

#

its like every part of this is a nightmare 😄

#

Hey Lorash, have given both of your suggestions a go now and both worked perfectly. Thanks for all of that help with the maths, really appreciated.. one step closer to having this done! Many thanks 🙂

summer apex
#

Hello guys! Newbie here. Doing a small project for school. I have a question concerning sound programming. I have a .wav loop around 3 secs in length and an Input event. What I want is: when player presses said button a random 0.5 sec piece of the .wav is played. How can this be accomplished? Thanks in advance!

keen wedge
#

You might be able to use the Start Time property...

#

oh... lol... sorry Lorash

#

🙂

summer apex
#

and then set in to randomize as I understand

#

i think i can do a small delay and cut it after

#

thank you so much Rob and Lorash! gl with your stuff too

keen wedge
#

It might not be a "nice" way of doing it, but you could set a timer to then be called after the amount of time you require to then stop the audio from playing... but then you'd want to use the SpawnSound2D so you can get a handle on the sound again

#

There's also a "StopDelayed" function you could call from that Return Value actually... you could enter your 0.5 in there I think

#

You'd not need the Timer I mentioned above then...

pastel garnet
#

we

languid bronze
#

Hello friends,

I was wondering if anyone here has come across / developed a good solution for either inverting gravity for the 3p player pawn (i.e. walking up-side down, so to speak) or straight up walking up-side down through trickery?

Would love to hear potential ideas and/or solutions :).
I have a situation where I want my 3p character to walk over a ledge, and a trigger volume executes the effect.

Thanks!

#

I was thinking at first I might raycast straight down and sticking the pawn to the normal of whatever is under me, but I have a feeling I'll bump into some interesting results as I walk over small 45-90 degree angles, etc.

earnest tangle
#

There's an adjustable gravity thing on the marketplace which is free

#

the default character logic seems to assume a specific gravity direction so modifying it for that is very complicated

#

unless you cheat it in some fashion

maiden wadi
#

It'd be fairly easy if you subclass the CMC and override some events. But that's C++ territory. If you're not intimidated by the idea, creating your own movement component would be a good solution. It's much easier if your game is single player.

earnest tangle
#

yeah been there tried that it's not what I'd describe as "fairly easy" :D

trim matrix
#

can I have some simple help, its an easy thing to fix im sure but im scrub,

earnest tangle
#

you need to ask a question if you want help

maiden wadi
#

There's a few check events you need to override as well. The point being to make it so that the logic can adapt for always using the Character's down rather than the world's down. Having said that, I'm not sure that the events I know about would make it networkable worthy. It at least works in single player.

trim matrix
#

isnt there a node that lets me have a the white go to both of these ? I cant remember the name

maiden wadi
#

Sequence.

trim matrix
#

thanks,

maiden wadi
#

Hold S and click as well.

languid bronze
#

Thanks for the input, I will do some research 🙂

maiden wadi
#

Having said that though. I do remember someone in here doing this with traces about seven or eight months ago. The video he posted seemed to work incredibly well. He was more or less making it look like 3D sonic. But his adaptation wouldn't work for your's. Walking off a ledge would need some extra checks.

fresh sand
#

How do i update the structure Value after this is used on the Enemy Player? so they use the new Health value

#

Well The health in the structure does change when that is called but the Enemy doesn't use the updated Health

#

It uses the default value

#

Since in that event I had a Print and it printed out the new values

#

That's how I know it works

#

It's just the Enemy doesn't use the updated Structure Value

#

Want me to send a screenshot of how the Player bot grabs the info?

#

This is how the enemy access the info btw @trim matrix

#

They're the same structure just different names

#

Does the variable name have to be the same as In the Widget for the Enemy?

#

In the widget it's called Bot and in the enemy it's called BotStats The actual Structure is called PlayerBot

maiden wadi
#

Also worth noting that the Set Members node is often easier for this.

#

@fresh sand

fresh sand
#

So instead of using break and make I use Set Members?

maiden wadi
#

This for instance would lower R by 1.0, and set B as 0.0

fresh sand
#

Am i doing this right? @maiden wadi

#

oh So i add a break

#

I thought I was supposed to leave the break out

maiden wadi
#

Set members will be your last node. Works the same as the direct set node. Working with Structs in blueprint is annoying for that reason. not so bad in small structs but SetMembers will save your sanity with huge structs.

fresh sand
#

I got this to work idk if i did it right

#

Still trying to figure out the problem where the structure does not Update

#

The enemy just doesn't wanna Update it's health when the Upgrade happens

#

I tried this

#

Then calling it like this but nothing

brazen prism
#

hello! im trying to add object references into an array and I cant seem to get it to work. im probably doing something obviously wrong but i cant seem to find it

#

it prints out a 100 objects but the array value is:
[0] None
[1] spawn_light99

raw dew
#

heya, how can i make my spawned projectiles ignore the one that shoots them? it seems like while im sprinting and shooting depending on where the animation is i shoot myself (and it looks like it registers multiple times with one bullet)

fresh sand
raw dew
#

linetrace wont help me with the theme for this project

#

gotta keep it as projectile

fresh sand
#

So it ignore Pawns

raw dew
#

will it not ignore the enemy team also?

maiden wadi
#

@fresh sand What you just did won't work either. You're setting the temporary struct from the MakeStruct. You have to set the actual variable.

#

Well. It will work, missed that last set node.

fresh sand
maiden wadi
#

But you don't need it.

fresh sand
#

The thing is It changes the value but only for the ui

maiden wadi
#

StructRef needs your Bot variable.

fresh sand
fresh sand
fresh sand
raw dew
#

all my players use the same blueprint tho

#

ill have a look into this

valid widget
#

anyone able to help me