#blueprint

402296 messages ยท Page 887 of 403

elder mango
#

how do i spawn a bullet trail which is a particle system?

mellow folio
blazing scroll
#

it is basically a custom for loop with a delay since the normal loops do not support delays

#

I changed the order now and query the skill before it gets into the loop

#

that works

wispy star
elder mango
blazing scroll
#

Thanks Panther

formal parcel
#

what are you using to draw that Alexey?

wispy star
#

line is a box mesh

#

that is aligned along X

formal parcel
#

is it part of one of those 2 actors?

wispy star
blazing scroll
#

just one final question if I need to check if an actor was hit by a niagara system component. how would I do that? the collision on hit and overlap event do not trigger

formal parcel
#

gotcha, lemme try that sir, thanks

wispy star
#

@formal parcelwell you can see the tree there (A and B are spheres)

#

the length variable is the length of the source mesh...i've set it to 100 as it's the length of the cube by X axis

#

you can get the length of the object from Bounds, but it's better to set it manually

formal parcel
#

yea i think i get it the rotation is the tricky bit but

wispy star
#

look at will generally provide you the best result

civic herald
#

Is there a way to make a Component not show up in Details panel on an Actor in Level. If the Component is added via Blueprint not C++.

wispy star
dreamy yacht
#

Hi, got a problem, which I don't know how to fix. I am making a top-down arcade racer with obstacles and player / A.I. respawn. The problem is: when a A.I. car overlaps some obstacle, which destroys the AI car, the AI car respawns correctly at transform place, but has no throttle nor steering input ( input which at the beggining of game is driven by: a) set throttle input ( 0.55 ) -> vehicle movement component and b) steering input -> get path along spline [ a custom find spline function ]

#

will respawn, but will not move by it's own anymore

#

The car get's destroyed when it overlaps the obstacle

#

the code

formal parcel
#

@wispy star its looking like its working well but the wrong face is pointing towards me, my line is sideways, how do i reorient that?

#

i've tried setting rotation but no luck

dreamy yacht
#

I even tried to cast to AI car directly and fire the custom event

#

still no throttle or steering

#

can anyone help ?

#

I've been struggling with it for days

wispy star
#

@formal parcelsimple way will be to update the mesh itself
option 2 is to add some intermediate component in between
option 3 is to combine rotators, but the latter should be done with orientation transformed from local to world, and by default ue4 has no simple nodes for that (i'm not aware of this)

formal parcel
#

so i just added a cylinder to the original actor but thats what i was saying, I change the rotation but then nothing happens

#

i'm guessing because we're just setting that same rotation per tick

#

i dont know how to set like the default orientation of a mesh

wispy star
#

in the mesh itself

#

there is an import transform settigns, thet let you transform the mesh

formal parcel
#

gotcha

wispy star
#

you need to reimport one ofc

formal parcel
#

nothing updates when I change the values, do i have to guess a bunch of times?

#

(ignore timely autosave)

#

oh i see i think i need to make a real mesh cant just use a generic one

elder mango
#

how do I spawn a system from the gun barrel

#

here is what I did

#

and it spawns from the world origin

formal parcel
#

I'm so confused - is there no way to save the cylinder as a new mesh?

storm elm
#

You can navigate to it in the content browser and duplicate it, or you can export it as an FBX and then import it.

formal parcel
#

it keeps wanting me to finds the source file for something

#

when i try to reimport

#

yea i'm so confused right now... i duplicated a mesh, open that, save it, close it, reimport... and its like where's the source?

haughty temple
#

for rotation can probably just get forward vector from the muzzle scene component

elder mango
#

I have an arrow

#

does that work?

haughty temple
jolly oriole
#

I'm new to Unreal from Unity and trying to wrap my head around the general design pattern blueprints use.

Let's say in this game there are unknown amount of panels which the player can plug cables into, turn dials on, etc. For the sake of the example, let's just say the game has ten unique panels, all which require turning dials and sockets for cables to plug into, which feed back into some unique logic for that panel alone.

Would I create a BP_Panel to host the unique panel StaticMesh that artists have made for each panel, then add some kind of DialComponents and SocketComponent into BP_Panel? Would the components then reference the dial mesh itself so it can be spun etc? Or do I need to make a unique blueprint for each panel, each dial, each socket, and then reference all these different actors? That doesn't feel very modular or a smart way of implementing.

Any guidance here would be so helpful, just not sure how to achieve this 'modular' kind of design pattern in Unreal

wispy star
formal parcel
#

i do but then its asking for some source file

wispy star
#

yep, just point to exported one

formal parcel
#

uasset isn't an option

wispy star
#

export it

formal parcel
#

uyghhhh how?

wispy star
formal parcel
#

oh my goodness it worked

#

thank you

elder mango
formal parcel
#

@wispy star lmao so it looks good in the editor... but then nothing at all changed in game

#

still sideways

haughty temple
formal parcel
#

axis looks the same as urs

drifting peak
#

anyone know how to reuse/duplicate a blueprint when the first spawned one is already running? For example, an ability that is spawned and still active in the world(needs to remain active), but you want to reuse the ability again. How would I re use the ability without destroying it?

storm elm
#

Spawn another actor of the same class?

drifting peak
#

if I do that it still grabs information from the blueprint

#

so like variables it grabs the location of the spawned blueprint

#

is there a way to make it independent at each spawn?

formal parcel
#

i really cant understand what ur asking man

#

but if you need another instance of the same class, as sipes said, spawn another one...

zealous moth
#

@drifting peak there is an industry trick called scale 1 to 0 where you can reuse the same script or mesh and scale it to 0 when done. In your case looks like a web. I would keep it either as 2 things or as an actor component based logic bound to a central container like the character

wispy star
#

@formal parcel how's the mesh looking ?

zealous moth
#

@jolly oriole blueprints are class objects. You can put all logic pertaining to it inside. You don't need an actor for every component.

formal parcel
#

i cant get it :/

#

i've got the base one correct and looking the way yours did orientation wise

#

like by default when I drag it in its perfect

#

but I still have the same issue

#

in fact it hasn't even changed orientation at run-time

#

and i've changed it twice now

wispy star
#

@formal parcel i mean literally, how is it looking in viewport of the mesh inspector

formal parcel
#

well i was just testing something else but one sec

#

ignore models just trying to get the concept

wispy star
#

it it aligned along Y axis?

formal parcel
#

it is now, I just changed it to test

#

i had it the other way a second ago, one sec lemme put it back

#

lemme show you results too its weird

wispy star
#

look at will align X axis of the object so it should be x axis

formal parcel
#

just put it backj

#

so i have 2 issues

#

this pic explains:

thin panther
#

it doesnt

formal parcel
#

that should be pointing at me, but its not... and also it is rooted in the middle

wispy star
#

@formal parcel where the pivot in this scene?

formal parcel
#

pivot?

#

the purple dot is the ball from the other pic

wispy star
#

0 of the object

#

ok

formal parcel
#

which should be the end of the object

wispy star
#

se you probably scaling wrong axis

#

should be x

formal parcel
#

ur a genius

#

i was

#

i miswired the make vector

#

now last part i dont understand

#

is that scale value

#

i dont understand what the length of a model is

#

er, mesh

wispy star
#

oh... just divide the distance to length of cylinder

formal parcel
#

"length" of cylinder isn't defined anywhere in the mesh editor

#

where do i find that

wispy star
#

it is

formal parcel
wispy star
#

top left

formal parcel
#

oh 100x100x100

#

gotcha

#

thank you so much

wispy star
#

np

formal parcel
#

i'm an old programmer this 3d stuff is kinda new to me

#

and yes, this is a far better solution than the cable. its frame-perfect at high speed

#

thanks again for all the help

round moth
#

hey yall. still learning blueprint. i have a line trace from my camera and all that, but im not sure how to do stuff with it, like making gunplay or whatever. like is there a "if hit by linetrace" or something like that? tad lost atm

tight schooner
#

@round moth on your line trace node there should be a hit result pin. You can break this pin (drag pin out and use break node, or right click on pin and break) and do stuff from there

#

For example you can Branch (node) based on whether anything was hit

round moth
#

ooh pog thanks so much

#

while im learning, im trying to make some sorta game, like rn its just jumping around and wallrunning with the scuffed wallrunning i made lol. learning line trace seems like it could be cool

#

make targets or something

sleek urchin
#

Is there some variables that are only allowed to be output nodes in bps?

#

I have a function I defined in CPP that for some reason is always defaulting to being an output

trim matrix
#

sup guys can someone help me with my issue

#

idk If I should post it here aswell but it has to do with AI

sleek urchin
zealous moth
#

@sleek urchin sounds like incorrect header

sleek urchin
zealous moth
#

In the cpp

#

The .h

sleek urchin
#

yeah sorry the include is what i meant

zealous moth
#

Your variable was defined as an output

#

Hmm don't think so

sleek urchin
#

Nope still broken, included the file specifically for that struct

sleek urchin
zealous moth
round moth
#

how do you make a player start in your game

sleek urchin
# zealous moth Hmm check in <#221799439008923648>

came across the fix. For some reason on somethings you do have to put UPARAM(Ref) in front of the reference if it exposing it in bps. No reason why thats worked in litterally every other function until now tho.

storm elm
round moth
#

thanks :3

fickle dune
#

Alright guys I've been trying to get this Inventory to work across levels persistently for 4 Months without avail.
If someone would be willing to help me I can provide screenshots or get on a stream to get it working lol I'm literally dying here guys haha

thin panther
#

I told ya what you need to do

#

Keep the inv in the game instance

#

Copy it to game instance before you leave a level

#

Load it from game instance when you enter a level

#

So before you switch levels, get your inventory from the component and set the game instance one to it

#

Then when your character loads, get inventory from the game instance and pass it to the component

fickle dune
thin panther
#

You just set the inventory compnent to a variable

#

Read what im saying

sleek urchin
# fickle dune Alright guys I've been trying to get this Inventory to work across levels persis...

That or you could get into serialization and saving and loading stuff to files. I am not certain how that gets done in bps I did it in CPP. brothers way would be faster since there is no reading/writing to the disk. I think you may even be able to serialize stuff and save it to say a variable in the game instance, but quite frankly I didn't/haven't got that far with it. You might look into the game instance subsystem and make some calls from to that in from say the game world.

thin panther
#

Yeah i leave saving and loading for across play sessions

#

Even then this is unnecessary

#

Its like 4 nodes

#

Just set the array of inventory items to the one from the component before level transitions, do the reverse on loading a new level

sleek urchin
fickle dune
#

This is what I changed now and it didn't work still

thin panther
#

Are you retrieving that at any point

#

Or are ya just settinf it

#

Cause you need to get it back into your component at some point

fickle dune
#

that's my issue, I don't know what nodes to use to retrieve

#

I'm literally a newbie at coding and I'm learning as I go

#

took me forever to even get the inventory to work

#

just trying to get it to work across levels now.

thin panther
#

Do the same thing you did there in reverse

#

Set the inventory in the component to the one un the game unstance

#

Literally a switcheroo

fickle dune
formal parcel
#

gonna take a crack at adding a ghost replay feature.. was thinking of just storing an array of the inputs every frame, is this a proper approach?

thin panther
#

Do it in the begin play of the char or smthn

formal parcel
#

well, prolly a queue not an array but - the general idea of storing inputs every frame and then replaying them frame by frame in a separate instance - does that make sense or will hit syncronization issues?

long whale
#

hello, when packaging game, I got this error. Is there a way to figure out which part is causing it?

#

seems like some asset migration issue

#

some forum posts suggests adding for detailed log, but I still can't see anything related what is causing the problem
[Core.Log]
LogStreaming=Verbose
LogConfig=Verbose
LogProperty=Verbose

NVM used notepad++ brute force search and found the result

fickle dune
#

Like it broke my Interface

#

tried it differently and it fixed the interface but now when i press tab the hud doesn't work as if the inventory component doesnt exist anymore

cobalt gulch
#

How can I destroy an object with chaos physics when it is hit by a bullet

covert schooner
#

is it possible to create a blueprint that has multiple execution paths? Ie something that can expose something like foreach, with an inner and a completion?

#

actually nvm, I guess its a feature of macros (which allow you to specify it along with other output types)

sleek urchin
covert schooner
#

How do you set a local variable (for use in a macro). I need to create a local boolean to control a while loop. So I have a "Local Boolean", but "Set" only appears to work for exported variables (not usable in a macro) and not for local variables.

terse moss
#

Anybody know a way to get a 0-1 value for a thumbstick being tilted in any direction? Like 0 being centered and 1 being full tilt. Thought you might be able to just take the absolute values of the X and Y values, add them, and clamp to 1, but that'd send false positives for diagonals so I'm not sure.

#

@covert schooner any reason you deleted that message? It seemed like good info. For some reason I keep forgetting vector length is a thing, so that never occurred to me. Not home atm so can't test, but that certainly sounds right.

tight schooner
#

Oh, didn't notice question got stealth answered

terse moss
#

Even still, nice to get a couple answers

tight schooner
#

If not, good old Pythagorean Theorem works ๐Ÿ˜‰

terse moss
#

My monkey brain forgets these things can actually be applied lol

jolly oriole
#

Whats the difference between a blueprint and an actor?

tight schooner
#

you can make a blueprint child class of an Actor

#

but you can also make a blueprint child class of a static mesh component, or a lot of other things

jolly oriole
#

Is the base class of a blueprint an Actor? or are they totally different things?

tight schooner
#

no, they're different things. The base classes are made in C++

#

and then you can make a blueprint subclass that adds new functionality over the base

#

so your custom blueprint actor inherits all of the C++ Actor class functionality, but then does new stuff

jolly oriole
#

Yeah I understand that, but in terms of inheritance the base class of a blueprint class is an Actor

#

just like StaticMesh inherits Actor

tight schooner
#

I think object is the base class? IIRC there's stuff more fundamental than Actor...

jolly oriole
#

UObject is the base class I believe

#

Then there's AActor

tight schooner
#

and there are things like Game Mode, Game Instance, data assets

#

that you can subclass with BP that aren't actors

jolly oriole
#

Is there like a diagram of this kind of thing anywhere

#

It would be so helpful while I'm trying to learn the framework lmao

tight schooner
#

in UE if you make a new BP asset, there will be a list

#

asking what you want to subclass

#

and you'll see that Actor is just one of the many trees available

#

like ActorComponent --> Scene Component etc.

tight schooner
jolly oriole
#

actually this page here has a really good example

#

So the SceneComponent is what enables endless parent/child relationships?

tight schooner
#

no, an actor can have components... it's modular. A scene component is a component that has a transform, like a static mesh component

#

so like, a car might have numerous static mesh components for the body, the four wheels, light components for the headlights & tail lights, etc.

#

a non-scene component that just contains code, like for vehicle physics

#

which can be shared between different actor classes (a car, a truck, etc.)

#

I never used unity so I can only speak in general

surreal peak
#

I would suggest to not use Unity when learning UE

#

Just, don't try to apply anything of Unity, simply act as if you never knew about it

#

It's a waste of time trying to search for everything unity had in ue

#

Epics own transition guide is really misleading in my eyes

#

So I wouldn't look at that either

#

E.g. blueprints aren't prefabs

jolly oriole
#

Yeah I haven't really used unity in ages, mostly C# dev work in general, just trying to translate that to how the engine expects me to structure stuff I create

surreal peak
#

UE has no prefabs

jolly oriole
#

Mind if I DM you @surreal peak? I have a very specific thing I'd like to create and your answer would probably clear up most of my understanding in a few minutes, just don't want to flood the chat with back and forth too much

surreal peak
#

Post it here, don't have time for DMs

gentle urchin
#

It could be helpfull for others aswell

jolly oriole
#

Sweet, in that case

#

A good example is a guitar pedal. Guitar pedals have dials, and they have buttons. So already I can see the need to make a configurable 'dial' object and 'button' object to attach to a 'pedal' object.

But say, 5 weeks down the line, I want to make 9 other new guitar pedals, each with their own bespoke logic in the 'pedal' object.

In my mind I would basically be able to have these modular dials and buttons reference back to the pedal to feed their float value or whatever. And once the pedal is designed, I would have a object/prefab I could just deploy in the world.

In my way of understanding (not just unity, but in most software I've ever worked in) that would look like me adding "dial objects" inside the UE blueprint editor, laying it all out, hooking up the logic and then deploying the finished pedal blueprint in the world.

But if you had a gun to my head and told me to get something working, what I would do is create a configurable BP_Dial, BP_Button, and each pedal would have its own bespoke blueprint. Ie. BP_RevebPedal, BP_DelayPedal. But that feels REALLY weird, because then the dials and buttons and pedal bases/logic would be floating and really decoupled in terms of logic but also actors in the world itself.

So I'm trying to wrap my head around the whole idea of modularity and not copy/pasting my work, but also how that works with blueprints, components, etc.

#

Does that make sense?

tight schooner
#

You can make class hierarchies of components, so like... you can have a fundamental, uh... can't think of a good root word for dials and pedals. Physical controls? You have a physical controls parent class (which is perhaps a subclass of Static Mesh Component) and then child classes like Dial and Pedal. The parent class has the code for communication with the host GuitarPedal actor class (such as via an event dispatcher, or w/e you prefer)

#

and then the Dial and Pedal child classes have the things specific to them

#

and then you can have different varieties of GuitarPedal actor classes that have different arrangements of these Dial and Pedal components

#

that's my top of head idea anyway. There are a lot of ways to structure it

#

the only real limitation is components can't have their own components

jolly oriole
#

So I tried to make a blueprint component however it only seems to be the logic, not the physical representation

gentle urchin
jolly oriole
#

So I made this component right, thinking hey, if I can get a static mesh spinning, we're already half way there:

tight schooner
tight schooner
#

spawn another component and attach to self

gentle urchin
#

I did that for my interaction component (with a collision volume i bound up to)

surreal peak
#

You can do that but for starters it's probably too much

gentle urchin
#

Fair enough

surreal peak
#

The screenshot from Raecast suggests that there is a huge knowledge gap

#

Not sure that's easily fixable by this example

jolly oriole
#

I've gone through so many tutorials and they just keep it too simple or they "just do things" without explaining the actual backend itself of how everything fits together

#

so yeah, big knowledge gap

surreal peak
#

You should try to understand how Objects, Actors, ActorComponents and SceneComponents relate to each other

#

Blueprints are just as class in Form of an asset in your content browser, so just act like they are a class that inherits properties and functions from other classes.

#

Imagine them as text fwiw

#

UObjects are the base class that Epic uses to make sure you don't have to deal with GarbageCollection and to enforce some reflection aka they can track a lot of things, but also not really beginner stuff.

AActor is a UObject child which can be placed into the World/Level. Everything in the level has to be at least an AActor.

UActorComponents are UObject children which can be added to an AActor. This is meant to be code that you want to add to multiple AActors which don't share a Parent Class.
They don't have a 3D Transform and only house logic (functions and variables). Their Owner (Get owner()) is the AActor they sit on.

USceneComponents are UActorComponent children which additionally have a 3D Transform.
They can have a Parent Component which relates to their 3D Transform. Aka move parent and child moves with it while keeping it's relative offset.

#

Epic provides you with several Components to extend your actors. E.g. collision based ones, mesh ones etc

jolly oriole
#

So UActorComponents are ideal for general logic/backend, whereas USceneComponents are basically designed to be able to use in world

surreal peak
#

More or less yes

jolly oriole
#

Not saying that as a hard and fast rule ofc

#

but the jist of it seems to be that

surreal peak
#

A Manager that keeps track of other actors, like an Enemy manager would be an ActorComponent

#

One big thing is that your Actors (and thus UObejcts) can have code and variables on their own

#

It can be that you make an actor that has 0 components despite a root one for it's 3D transform

#

That's something that differs a lot from Unity where you usually add scripts to the empty game object

#

Not sure if they have new things now, maybe scriptable game Objects or so. Haven't used it in ages

#

But most of your actor specific code stays in the actor

#

And most of the reusable code goes into components

#

But you can use Components to just declutter your actor code too. E.g. put all he interaction logic into your own Interaction component, even if you only use it on one specific actor

#

That's even preferred when working with UE5s new modular gameframework

#

Cause then you can add and remove logic from your actor during the game by adding and removing the component

#

But that's also a bit too advanced

jolly oriole
#

Right, yeah, I understand what you're saying in general

#

It's almost like components are really flexible C# interfaces which guarantee logic or behaviour with no overhead or other requirements

#

Out of the blue question

#

In unity I'd be able to make this a prefab and just instantiate it when I please, however I want

#

How is this done in unreal?

#

Without manually reconstructing it all using code or bp

surreal peak
#

Prefabs don't exist in ue

#

The only thing you can do is try to select those, rightclick them and search for some "Make Blueprint from this" button

#

But that is not a prefab, that will make a NEW Blueprint Actor Child and turn the 5 StaticMeshActors into Components.

#

So you either place those 5 Meshes by hand and copy paste them

#

Or you make a BP Actor and add 5 StaticMeshComponents to it

jolly oriole
#

With my guitar pedal thing, it sounds like those modular dials and buttons need to be custom scenecomponents, is that a fair statement?

surreal peak
#

I can't really picture what you want to create with the guitar pedal

#

Do you have an Image of a real life one?

jolly oriole
#

oh yeah, easy - here's 3 dials and one button

#

but you can already see - I don't want to make 3 bespoke matching dials haha

surreal peak
#

This could be one actor with 4 components

#

As long as that looks proper in terms of graphics

jolly oriole
#

I just want a dial component I can slap into a blueprint, configure, and reference in the logic

surreal peak
#

Otherwise, a single StaticMesh

#

With imported MorphTargets

#

So 3 Targets for the 3 rotating ones and 1 Target for the Push Button

#

If you need it to be modular, then you can of course put more and more components on it

#

Or you make each of the knobs actors themselves

#

If they need logic

#

But then they would probably be runtime spawned and not nicely configured in the BP

#

Unless you use ChildComponents, but they tend to be quite buggy

#

One problem you will have/notice is that if you make a new SceneComponent, it doesn't represent a Mesh

#

But it's own thing. It's not the dial mesh

#

You can, in C++, inherit from UStaticMeshComponent

#

And work around that I guess

tight schooner
#

you can make a BP subclass of static mesh too... I've done that somewhere in my project

surreal peak
#

Of the Component?

tight schooner
#

yeah

surreal peak
#

Right, maybe it's exposed by now (exposed means someone in C++ marked the Class/Property/Function to be available to Blueprints)

jolly oriole
#

yeah it is exposed from what I have here

surreal peak
#

Yeah you could theoretically use that

#

To combine the visuals with your logic

#

Your Actor can then call functions on it, get/set varaibles

#

Etc.

#

But that goes a bit more into the actual implementation code-wise which I have no time for :P

jolly oriole
#

yeah that sounds like it just needs a layer of code to enable that functionality to inherit scenecomponent and staticmesh so I can go back and use that to make a scene component bp

limpid bronze
#

This is gonna sound stupid

#

but how do you shoot a raycast out the side of a 2D character?

#

I'm trying to use the world location and it's forward vector but it's just giving me these weird arc lines.

limpid bronze
tight schooner
#

sorry, I'm actually kind of baffled why your start location wouldn't be consistent

#

no matter what, it should be coming out of the capsule location acc'd to that graph...

#

end location should maybe be like...
(Capsule component forward vector * desired length of trace) + Capsule world location = End vector

limpid bronze
#

This is the result if I just do this.

limpid bronze
tight schooner
#

pretend that Default Scene Root is your capsule component

#

and the 1000 is your desired length (255?)

#

the forward vector is just a vector with a length of 1

#

like a line that points in a direction that you can multiply

#

I suppose they call that a "normal" vector

limpid bronze
#

Thanks, it works now

#

@tight schooner is there anything necessary for something to be registered as hit by the linetrace?

tight schooner
limpid bronze
#

Ah okay

#

Needed to set the actor's collision to BlockAll

jaunty jolt
#

I have a bunch of rabbits talking and fighting with each other. When they collide they move unto each other and interact.
Then when fighting im using vinterp to sometimes.
But that is interfering and it delays the fighting calculations.
How can i make this in different "thread".
So that they vinterp to, and move, but at the same time on the background that doesnt interrupt the combat?
Should i create an blueprint actor that manages all the combat?

manic knot
#

Could anyone lend any pointers on how to fix my Weapon Traces? The end point is slightly off still. I'm using 2 traces: 1 from camera dead center out x 10,000, then 2: from Muzzle socket location to End location from Trace 1. But it seems its off in relation to player being off to one side or something? Im stumped!

manic knot
sweet silo
#

$d*

maiden wadi
wise tide
#

I want to have a playable lobby menu character that is the exact same as the normal character but with differences such as the inability to die and having an increased walking speed. However I don't want to make a separate character because if I make changes to the main character I would have to update the second one.

What's the proper way to do this?

#

I was thinking having a boolean to say if you are in lobby or not but there has to be a cleaner way

#

the main menu and game are separate levels from the lobby bp so maybe I could change those settings in the level BP?

jolly oriole
wise tide
#

I see, a boolean on the character is also how I handle death as I disallow dead characters from being able to interact with anything and they just walk around as a ghost

#

the reason I do death with a boolean though is because death occurs on every level except the main menu level and lobby level, so I figured making a boolean just for 1 level that sits in the character BP is messier than having it in the level

jolly oriole
#

I think the job of maintaining what the character does should rest with the character, not with something unrelated

#

You could expand functionality to be an entire "is disabled" or "is viewmodel" and allow it to reference a level bp which informs it of the position it should take in the world, along with other relevant level setting type data

wise tide
#

I see, so for example when the character is spawned within the level BP it will automatically be set to "isLobby" within the level BP?

#

or would that be where the gamemodes asset (not really looked into those) comes in

jolly oriole
#

maybe it could LOOK inside the level bp to see if it should be enabled

#

and each level bp can be set as a lobby or not

#

which also allows other things, not just your char, to know if its a lobby in the future too

wise tide
#

Sounds like a really detailed and modular solution as it allows me to set other things to lobby in the future, but what if I know with 100% certainty the only time I use this feature is within a single level/gamemode and other objects aren't affected - just players?

jolly oriole
#

it sounds like the character can be customized yeah

#

is it possible to just take that data and apply it to a second lobby char specifically for the lobby screen

wise tide
#

Yes, however I plan on changing the character a lot and I don't want to manually change the second character to match is

#

Is it possible to have the second character just be an extension of the main but with changes inside the copied character BP?

#

like inheritance or something

jolly oriole
#

you could have a bass class of the char, and then two sub classes, one as your pawn and one as the lobby version

#

so that the char feeds down into both

wise tide
#

Interesting, so the base features every character has is in the base, and the unique added features are in the sub classes.

jolly oriole
#

effectively yeah, your movement (controlled vs pathing) would be left up to the child class

#

or w/e

manic knot
wise tide
#

If I were to go with that approach do you think it would be worth having the ghost as a child of the base class and when the player dies it destroys the character actor and recreates them as a ghost actor

#

as opposed to using a bool for it, because the bool approach is messy IMO with how other actors interact

manic knot
gentle urchin
#

Feels odd to use both parent and child for different things in my head ๐Ÿ˜‚

#

Id have two children, one for each scenario ๐Ÿคฃ

manic knot
#

I think of inheritance like layers lol

gentle urchin
#

Well yes, thus not using some of the layers in game :p

#

Prob just me tho

#

Cant see anything actually wrong with doing as you suggesed really

manic knot
#

yeah that makes sense too for less code running in the character

#

so really seems like a matter of stylistic approach

wise tide
#

For the base character it wouldn't have movement because the movement would be different per character

gentle urchin
#

Would they not all use cmc ?

#

Either you do, or you must ditch it entirely

#

Unless you dont want a single parent class, ofcourse

#

But then inheritance is not there, if that was key

#

Sounds to me like it would be but..

wise tide
#

Probably yes, but within the BP where it sets for movement with WASD + jump, I wouldnt want that in the base class I use

#

otherwise I would have to overwrite it a lot

gentle urchin
#

Nah that would still be up to you

wise tide
#

ye

gentle urchin
#

Youd probably want a layer that has this functionality tho

wise tide
#

well yeah my main player character would be a child of BaseCharacter with the WASD + space added

manic knot
#

I use each child to add more functionality. the parents have less but basic, shared features

gentle urchin
#

Master_char -> Master_basic_moveChar -> many char childs

wise tide
#

Yeah precisely. The thing is the WASD movement isnt a shared feature among my characters

gentle urchin
#

Among some of them?

#

If not it resides in a single child

manic knot
#

so you wouldnt put that in the top parent

gentle urchin
#

If its among several id make a new layer just for that

wise tide
#

yeah exactly

#

so I can just leave the base class empty in the BP?

#

and if I decide to add functionality for all characters I add it there

manic knot
#

but you may want several children under a parent with WASD inputs

wise tide
manic knot
#

yeah exactly

wise tide
#

I see

#

this does sound like a good approach, I like it

#

would it be easy enough to swap between characters during the game. For example if all players start as "Fighting Player" but when they die they become a "Ghost Player"

manic knot
#

the base may just be like an interface and nothing else lol

wise tide
#

Yes I like that actually

#

Stuff like pause menu goes under player controller though right?

mental trellis
#

Is there a lot of commonality between characters that don't share the WASD input?

#

Because you could set up input as a component rather than at the class level

manic knot
wise tide
manic knot
wise tide
mental trellis
#

Fair enough then!

wise tide
# manic knot online game session start to end

I see, my game is multiplayer so this is something to consider. When the player hits "host" they get given a player controller and when a player joins that game they get given a player controller too. What about before this?

manic knot
#

you can have an EOS or Steam Session for Friends, Matchmaking etc

wise tide
#

My game has a customisation tab where players can change appearance and name (outside of session) and I want the character to upon session (by host or join) gets given these settings

manic knot
#

Yeah you can do that

wise tide
wise tide
manic knot
#

You need a SaveGame system and if you want to store the Player specifics Online, you need to look into EOS or a Custom Server

mental trellis
#

You could save that locally, even in an ini file

wise tide
mental trellis
#

A whole save game system is a bit much for choosing which outfit you're wearing.

wise tide
#

and because its a party game there is no game states to save

manic knot
wise tide
#

Interesting, so when a lobby is made and you are assigned a player controller I would have it grab selected skin and username from the MainMenu level

manic knot
wise tide
#

or could I have player controller grab skin / username from a local ini file (and if empty choose a default)?

mental trellis
#

Even then I'd only pass that data to a central server which saves it in a database, not a save game format. ๐Ÿ˜›

#

You could do that, yes.

manic knot
mental trellis
#

Anything you set as a "config" variable will be automatically saved to an ini file locally.

wise tide
#

can I just have it get the settings on lobby host/join (player controller made) and it stores that data in the player controller as a variable which is read whenever the player is spawned

manic knot
#

If you want to persist between maps you need to use the Game Instance I believe

wise tide
#

wouldnt player controller persist through maps/levels?

manic knot
#

No they are destoyed and recreated

wise tide
#

Oh, interesting

#

wouldnt that mean if you went to a new level you would need to re-host and re-join?

manic knot
#

you can however retrieve data somehow

#

and re-populate the character

#

Basically On Join the Characters Inventory etc is retrieved from Save Game, Ini file, Online or other storage means

wise tide
#

would opening a new level end the multiplayer instance and reset it so you need to rejoin each other

mental trellis
#

You can always store persistent data on a game instance

wise tide
#

I was going to have the lobby level be a game selection area which takes you to the game levels. If going to a new level resets multiplayer however maybe I should merge those into the same level and only change maps?

mental trellis
#

What do you mean by "takes you to the game levels"... where you aren't changing maps?

wise tide
#

I am sorry but I am not too familiar on the difference between "levels" and "maps".

What I was planning was "lobby level" which has multiple "lobby maps" (just changes appearance like for christmas etc).

When you click play in the "lobby level" it will choose a random "game level" (minigame) to open such as "hide and seek level" or "race to the end level".

These levels will have separate maps. So for the hide and seek level it would load a random map from a list such as "haunted house map" or "beach map"

#

However I might be using levels and maps wrong, I saw levels as the game and maps as what you play the game on

mental trellis
#

A map/world contains many levels

#

Or, well, can contain many levels. It always has at least 1.

wise tide
#

So my current levels are "MainMenu" "Lobby" "Game", what are all these levels apart of?

#

just the world as a default?

mental trellis
#

I don't even know how to explain that would be bulletproof.

wise tide
#

I'm going to move over to the #multiplayer because my questions aren't really blueprint questions anymore

light pilot
#

Hi I'm following the third person endless runner tutorial form a few years ago, (https://www.youtube.com/watch?v=YLEoRuN1T18&list=PLL0cLF8gjBpoTwM62rvhgmsk_Xp1_G1Vn&index=6)
I'm at the point scoring episode #6 and I'm just applying the first part of the video to my game but there seems to be a problem my game counts in 3's not 1's the value of the point multiplier is on 1 so I do not understand why it's doing this it also seems to be in relation to the tiles spawning in because they are also in numbers of three at a time where it previously was only 1.
Anyone have an idea on how to fix this?

terse moss
#

@light pilot well its definitely firing off the point increase 3 times, given the print string occurs 3 times. Where is this event occurring?

light pilot
#

This is the full blueprint

#

I'm quite new to this so just following the tutorial and this is what he did

terse moss
#

Possibly multiple components triggering the overlap event? Could be 3 different things in the player character that all overlap in rapid succession. I'd check overlap settings for the player character components

#

There should be a checkbox in the properties tab for each component. Something like "generates overlap events"

#

I could be completely wrong but it's possible

light pilot
#

Great, thank you so much!

terse moss
#

Awesome! Glad I could help ๐Ÿ˜

light pilot
#

I had made a little character using 2 cubes and they had that ticked on so that was causing it

terse moss
#

Yeah I figured it was something that you took creative liberty on while following along lol. It's a great way to learn this stuff though

light pilot
#

Yeah I'm having fun with it for sure

#

I do have one other problem, I posted it on the unreal forums: https://forums.unrealengine.com/t/camera-briefly-clips-into-character-when-i-move/537207?u=jopjolo.
You can take a look if you want to see if you can solve this one to haha, it's of minor convivence tho so no worries

terse moss
#

Is the camera connected to a spring arm component?

light pilot
#

yes

terse moss
#

Another guess here, but what happens if you turn off the occlusion detection? (I forget the name of the checkbox)

light pilot
#

is that on the details panel springarm

terse moss
#

Should be I believe

#

Looking it up, I think it's "camera collision"

light pilot
#

that was it

#

you hero

terse moss
#

Ayyy I know some stuff lol

light pilot
#

Thank you man appreciate it

terse moss
#

No problem, glad to help!

light pilot
#

I'm doing this for a school application so is it okay to take some screen shots from this conversation to use for documentation?

terse moss
#

Yeah I don't mind at all!

light pilot
#

Great thx

sweet silo
#

how can i tell this trigger to accept the thid person BP + the enemy

#

thx

surreal peak
#

If they share a base class then just to that

#

If not, you may use the CastFailed of the first Cast to perform the second

#

Not reeaaally ideal but well

#

You could give them both a interface and have the Overlap event check for that

terse moss
#

Yeah, as with most stuff, there's a lot of different approaches that will work fine. CastFailed into the second is definitely the easiest.

#

Or you could go this route if you wanted, given that you aren't using functionality through casting

tawdry surge
#

Does that work?
Its just returning an actor reference. Pretty sure you need the cast to make it the right object type or it'll always fail since you're not checking actor == actor

terse moss
#

Does what work?

formal parcel
#

yea MW that will throw some errors

#

needs to cast to specific type before calling methods in it

terse moss
#

If you're referring to the == not being able to call, they didn't ask for that lol

formal parcel
#

there isn't a "TypeOf" operator in UE?

#

instance never == the class, idk though I'm new to the BP magic

tawdry surge
#

@terse moss I mean your == check will always fail since the event isn't passing a specific actor class. Just a base actor reference. So it will never equal a specific child class

gentle urchin
#

No

#

If the incoming actor is correct

#

It will succeed

#

Despite not casted

formal parcel
#

magic

#

under the hood its prolly doing a typeof check

#

not an actual equality comparison

tawdry surge
#

I'll have to try it again. Remember doing it a long time ago and it didn't work

formal parcel
#

but regardless, the real way would be to cast it

gentle urchin
#

^ true

odd ember
#

casting, the cause of and solution to all BP problems kappa

terse moss
#

Huh you might be right, could've sworn I'd done something this way before

gentle urchin
#

Say whaa

#

No way

formal parcel
#

so I'm new to UE - is there not a way to do like a switch on the typeof an object?

terse moss
#

I'll verify, hold up

formal parcel
#

i mean the better way is an interface but just for my own curiosity

tawdry surge
#

Select

formal parcel
#

select is only 2 outputs tho

tawdry surge
#

As many as you like

formal parcel
#

switch (typeof(whatever)) {

#

nothing that is equivallent?

formal parcel
#

so the real UE solution is prolly implement an interface and just call the interface method

odd ember
formal parcel
#

oh I see CE, i think I've only used switch on bools so far so it limits to 2 outputs in that case

#

good tip

odd ember
#

just keep in mind that a select node will evaluate all options, even the ones not used

terse moss
#

Yeah I guess I'm wrong here. A little confused why you can even specify the == object in that way if it straight up wont work though

formal parcel
#

because == is an equality comparison and it is valid to ask if anything equals anything else

terse moss
#

But to allow entry of a generic reference

formal parcel
#

but the reality is the instance of an object will never be == to anything else

#

thats why you need type checks

#

or better yet, interfaces

odd ember
gentle urchin
#

It would be equal if the instance ref was correct

formal parcel
#

no

terse moss
#

Well at any rate I'm glad I'm not alone in thinking it would

formal parcel
#

because an instance of an object is not equal to the definition or type of an object, it is only equal to itself

terse moss
#

I just tested, it does not work

gentle urchin
#

Exactly

#

Equal to itself

#

A ref to itself == self

odd ember
#

the type isn't checked, it's the pointer that is checked

karmic sonnet
#

Is there a way to get the Z height of an actor within blueprints?

terse moss
#

But again, weird that you can enter generic info if it's not valid

formal parcel
#

SecondFavorite, bounds of the mesh

odd ember
#

if you want type check use get class

karmic sonnet
#

@formal parcel tyty

tawdry surge
#

Actor type reference is not == to thrid person type ref

tawdry surge
#

If you checked two actor type references they would

gentle urchin
#

Followed by ==

#

Then it would ?

tawdry surge
#

Yeah

odd ember
terse moss
#

Which is pointless, given the cast failed output

#

But yes

gentle urchin
#

Right

odd ember
#

debug it using breakpoints

gentle urchin
#

How about if you do get class first

#

That would work, right ?

terse moss
#

I learned something new today

odd ember
#

so you can see what is going on

formal parcel
#

get class returns the instance object CE

#

still not seeing a method to actually get the type as string or whatever

tawdry surge
#

Get display name for a string

odd ember
#

of the instance

gentle urchin
#

So that would work

#

Get class == thirdpersonclass

odd ember
#

but like I said it should work regardless

#

my take is that it's something else overlapping

formal parcel
#

yea this is silly

gentle urchin
#

I expected it to aswell, so surprised if it doesnt

formal parcel
#

and select wont use a string

tawdry surge
#

Unless it's casting in the background idk how it would

formal parcel
#

just cast the damn thing ๐Ÿ™‚

terse moss
#

Yeah this works

formal parcel
#

ughhh

odd ember
terse moss
#

But for real lol casting is the obvious way here

formal parcel
#

why not an interface that implements whatever you're trying to do in the first place?

#

rather than all this logic for type checking

terse moss
#

Sometimes the task isn't gonna be reused enough to go that route

#

It's always case by case

formal parcel
#

famous last words

#

i can tell you dont work in enterprise ๐Ÿ™‚

odd ember
#

interfaces do implicit type casts too

formal parcel
#

yes they do CE but then you dont have to worry about it

odd ember
#

and they are more expensive than a cast

formal parcel
#

you just define the behavior

terse moss
#

If you're just entering the engine and testing stuff, you don't need to do that

odd ember
#

and they are annoying to work with

terse moss
#

I'm just saying

tawdry surge
#

No they are not more expensive

odd ember
#

the real use cases for interfaces are very few and far between

odd ember
formal parcel
#

no i'm just saying whatever ultimate process is being determined by checking these types in-line... most likely should just be a shared functionality implemented at an interface level

odd ember
#

you do a cast inside the interface PLUS a vtable lookup

tawdry surge
#

The virtual look up overhead was fixed forever ago and literally every one of the 40 built in events uses virtual functions

odd ember
#

there is no fixing a vtable lookup overhead lol

#

it's part of how it works in cpp

#

if you didn't have a vtable lookup you wouldn't have virtual functions

formal parcel
#

see this is why I stayed in managed languages

gentle urchin
#

๐Ÿ˜‚

formal parcel
#

enterprise business apps, who cares about vtables?

tawdry surge
#

Well they fixed in the early 2000's or something according to a software engineer i know from Microsoft and unreal is built on them so best to bite the bullet

odd ember
#

anyway stop thinking of interfaces as a good way to circumvent casting or other such logic. interfaces should be used sparingly, not as a ghetto delegate

formal parcel
#

CE I didn't mean to use interfaces to drive that logic

#

I meant to actually implement the process properly

#

whatever is happening that needs to know the type of the object that triggered it, probably should just have that object implement the behavior

tawdry surge
#

Either way interfaces let you reduce dependency which imo is worth a minor performance cost

formal parcel
#

basic separation of concerns

tawdry surge
#

Direct casting is for single use on objects i know exists

odd ember
#

what is better than an interface is to have an interaction component that handles interaction logic

#

no need for repeat code

formal parcel
#

what do you mean? using an interface gets rid of repeat code?

#

other than non-siblings doing identical behavior but... meh

#

maintainability > less code

odd ember
#

no, interfaces create repeat code due to how you'd have similar code between different hierarchies. A component absolves you from this

#

there is only one code, and that is the component code

formal parcel
#

well if the objects had identical behavior (such as a component), then an interface isn't needed

#

I'm assuming they have different behavior as he is checking the type....

#

whats the point of knowing the type if the same process is going to happen?

tawdry surge
#

Interaction implies everything behaves different so repeating isn't much of an issue

formal parcel
#

exactly

odd ember
#

except it happens all the time

formal parcel
#

in bad code...

#

bad architecture i mean

#

if you're ever checking the type of an object to dictate logic... you should refactor

odd ember
#

I have one interaction component that handles interaction logic over 3 hierarchies

#

and I would have to repeat code for some of those if I hadn't done it like this

formal parcel
#

i'd almost go so far as to say if you're ever checking the type of an object manually, you need to refactor

#

but i'm sure we can find valid edge cases

odd ember
#

it's nonsense to think an interface solves your issues here, it just moves the issues to be at a hierarchical level

tawdry surge
#

Inheritance is still a thing with interfaces. If you have the base of each hierarchy assigned the interfaces you shouldn't be repeating much that way either

formal parcel
#

Interface HandleEvent - Class: Implement Interface -- Process: Call Interface....

#

its not nonsense...

odd ember
#

that's it

formal parcel
#

so what do you get all components and foreach typeof them?

terse moss
#

Well at any rate, the guy asking this question definitely doesn't know what any of this means and wont benefit lol

formal parcel
#

LMAO

tawdry surge
#

So you're looking up the component. Might as well lookup the vtable

formal parcel
#

aint that the truth

odd ember
formal parcel
#

bunch of senior engineers and architects in here theory crafting interface implementation in a basic help channel

odd ember
terse moss
#

Yeah I'm sitting here like "What did I start..."

formal parcel
#

@odd ember fair enough, I am new to UE so I know theres stuff I dont know but I have been coding for 20+ years

terse moss
#

I'm hobbyist all the way lol

formal parcel
#

i do need to read more though

wise tide
#

I have a class system in my game but its extremely simple. I heard people create a child of the main character to handle all the different classes and you spawn the character associated with their class. However in my game the only thing that changes is your ability (only one) and your appearance a bit.

Is there a better way to do this? I was thinking when you are spawned in game it adds a component to your character depending on your class, with this component containing a model/particles to indicate your class. For the ability I was going to get the component name and when you press F it runs the ability related to your class.

Issue is this means the character will have the blueprints for every class, even if they are only playing one class.

formal parcel
#

heh... interfaces....

#

Hey mop, make a BP for just this ability

#

for each ability

tawdry surge
#

Soft object references maybe..
That type of ability stuff is more GAS territory tho

formal parcel
#

they all have a method called "DoAbility" or whatever

#

i'm scared to continue...

odd ember
#

yeah GAS is worth investigating.

tawdry surge
#

You can do that too

wise tide
#

I see, so when player presses F it runs "DoAbility" and it performs the ability attached as a separate component?

formal parcel
#

yea kinda a joke we just had a big interface discussion

#

but to solve this is interface territory

tawdry surge
#

And you will be investigating GAS. It's not small

odd ember
#

GAS is a system that handles this basically

wise tide
#

As for GAS I think its overkill as my game is turbo simple. You only get one ability

odd ember
#

it's expansive though

wise tide
#

My game is just a party game, and I want you to be able to choose the gimmick ability you have. The fighter does a kick and it knocks back a bit etc.

formal parcel
#

Character is assigned the appropriate ability blueprint (via interface) and holds a reference, each ability implements same interface... each ability blueprint handles its own exection and your character only has to call the "DoAbility" method on their interface

tawdry surge
#

Just put a bool on the input then and only let it fire once you have granted it

#

If its just one minor ability

formal parcel
#

this way you dont need one megaclass character

wise tide
#

I am from Unity that uses components, not sure how Unreal hands it but couldnt each class be a component that contains a model (like hat for a wizard or helmet for warrior) and the ability blueprint (which ability to run when called in character)

terse moss
#

Correct me if I'm wrong since I'm outclassed a bit here lol, but wouldn't it be fine to have all that logic coexist without separation, and have that be handled by a enum switch?

#

If it's as turbo simple as I'm picturing

tawdry surge
#

Yeah. It's not scalable but for simple game its fine

wise tide
#

My explanation isnt great but each class has 1 ability, but the ability changes depending on gamemode

odd ember
formal parcel
#

@wise tide

wise tide
#

When you said interface I thought you meant like, an interface like main menu

formal parcel
#

the abilities implement interface

#

no, the actual top level OOP concept called an Interface

odd ember
#

a menu is an interface too technically

wise tide
#

I am not familiar with that type of interface

terse moss
#

@odd ember Fair enough, I'm clueless when it comes to most of this

formal parcel
#

Mopzilla - look up "interfaces" in any OOP

wise tide
#

Yeah I am looking at the UE docs for it right now

formal parcel
#

thats your solution to avoid a mess

#

its pretty easy

wise tide
#

So each class would be its own interface which stores the abilities

formal parcel
#

no

#

you'll have one interface

#

IAbility

odd ember
#

just to be clear, interfaces aren't an UE concept

formal parcel
#

each ability class will implement it and at least that single "DoAbility" method

#

then your character will call DoAbility on the interface, while passing in the ability object you've saved

#

no need to determine type

#

so then all you need to do is have your character hold a ref to the ability object you've given it

wise tide
#

Can I pass multiple parameters? It will have 1 ability but that ability changes on gamemode. So I would need to pass my class type (warrior, wizard etc) and the gamemode (racing, fighting, etc)

formal parcel
#

you can have params on the interface

#

think of interfaces as a contract

#

you're saying: "My class will always have this method with this signature"

#

then you can pass objects around as the interface

#

so like... DoAbility(IAbility ability)

#

but that ability is really one of your ability instances

#

it implements the interface though

#

make sense?

wise tide
#

I am trying to wrap my head around it, let me put together what I think it looks like roughly in paint

formal parcel
#

@wise tide here i added more to the picture

#

this might help

#

then implementation in pseudo code is like.... new Ability1 - Character.DoAbility(Ability1)

#

Ability1 can be ref'd as its concrete type, the interface part is automatic, yay compilers

wise tide
#

this is how im kinda seeing it, the player on spawn gets the class from game instance (thats where I store player class), and when the character does ability it passes the class.

In the interface it runs the ability associated with that class and that gamemode

#

so if I did the fight ability on the mario kart -esq gamemode it would instead throw a punch forwards

formal parcel
#

eh not exactly, one sec

maiden wadi
#

Interfaces for that feel weird. Why not just an ability base class?

sly relic
#

Yeah, it just seems like regular inheritance but with extra steps

wise tide
#

I don't know. Originally I was just going to store the class as variable string and all the abilities are stored in the character BP and it runs the associated ability.

But that is messy as I store them all in the character and I will have tons of different classes

formal parcel
#

pseudo code:

#

@wise tide ^

wise tide
#

yeah I am trying to understand it

formal parcel
#

basically you're just setting it up where you can call "DoAbility" on any object that is passed into the method irrespective of its type

#

the only requirement is that obeject implements the IAbility interface

maiden wadi
#

Really, I would just make an ability component for it. Have the game mode populate that with the related abilities, and then just use them by calling base class functions.

formal parcel
#

the benefit of my OOP approach is you can easily add new abilities in the future and the code follows proper encapsulation

#

otherwise you're going to be checking types a million times in a million places

maiden wadi
#

Exactly, so don't use interfaces.

formal parcel
#

blinks

#

ughhh

#

yea sure just make a giant class with shitloads of procedural code, what could possibly go wrong

#

"dont use interfaces" lol

#

"dont use design patterns", "dont use brains"

maiden wadi
#

Why do you need a giant class?

formal parcel
#

why dont you learn what we're talking about and what the problem is before contributing

maiden wadi
#

Inheritance is a thing.

wise tide
#

Let me try to tl;dr the game maybe that will make it easier to explain this stuff.

Party game, you can choose your "class" and that will change what your ability is (activated by "F").

The game and map is chosen at random. For gamemodes I have a couple planned, for example a boss fight game where you need to survive against an AI boss, a racing gamemode where its the first player to the end and a fighting gamemode where you need to kill each other.

When you enter the game as your class I want your model to change to represent your class (like wizard getting a hat, warrior getting a helmet), I want your UI to change (the ability icon changes to represent your ability) and your ability needs to change.

When you press F it performs the ability. So on the boss fight gamemode Wizard might make you fly a bit so you can avoid the boss, and fighter might make you not take damage.

On the fighting gamemode and race gamemode the Wizard might make a frost explosion to slow players, and the fighter can ragdoll players with a kick.

In Unity (my most familiar) I would do this by adding a component to the player depending on their class. This component would contain a model (like a hat), a UI element (ability icon) and the code associated with the class.

When you press F it would call to this component and run the ability associated with the current gamemode.

tawdry surge
#

If it's meant to be scalable and you wanna check a bunch of stuff you're leaning toward GAS and gameplay tags again

formal parcel
#

aight, i tried, good luck peeps

wise tide
#

Sorry if thats too long to read, my shortened version is multiple gamemodes, multiple classes, 1 ability that changes based on class and gamemode. You can choose class in main menu

formal parcel
#

keep avoiding learning how to use a foundational part of OOP

#

life will surely be easier

wise tide
#

I'm not against anything, I just don't really understand how interfaces work

formal parcel
#

then you should spend the next 2 hours learning them

wise tide
#

I have used OOP before in college but it was at a basic level. My main area of work is webdev which doesn't use this

formal parcel
#

they are part of programming 101

#

well now you're working in a 3d engine which does use them, heavily...

#

again, you can write shitty spaghetti code and never need an interface

wise tide
#

Yeah I get that, do you know of a good tutorial personally I can watch or should I just lookup any unreal blueprint interfaces guide that isn't related to visual interfaces

formal parcel
#

but they actually simplify so much stuff

sly relic
formal parcel
#

You actually need both Wolf, you need to INHERIT a base class which IMPLEMENTS the interface

#

anymore basics?

sly relic
#

Why would you need an interface? The functionality is defined in the base class that is being inherited.

maiden wadi
#

You don't need an interface for this.

wise tide
formal parcel
#

heh, thats not inheritance

torpid hound
#

Interfaces are great, this is not a good use case for them

formal parcel
#

i hope your track isn't inheriting from trees

#

or vice versa

#

anyways, I'ma get back to work sorry I couldn't help

#

but an interface is your simple and best solution Mop

wise tide
#

What I mean is I have like 3 children maps that add changes. So the maps are all the same but the race map adds a track, the fighting map might add health pickups. If I want to change the map a bit it will change on all

torpid hound
#

+1 to the suggestions for components for abilities. It's a much more sensible approach and legit simpler

wise tide
#

Can I change multiple things in a component such as UI, model, particles and within the component have the ability BP?

#

so when I add that component to my character it adds all the other things necessary with it

torpid hound
# wise tide Can I change multiple things in a component such as UI, model, particles and wit...

This is kind of a much more complicated thing than adding an ability. You could have a component that references all those things but at this level of complexity (models plus particles plus widgets) you're likely to need a whole ass actor, with multiple components inside it (as you would for a weapon or whatever). Or a data table with definitions of all the things that your ability requires.

wise tide
#

well for the model I was thinking just add a hat to the head bone, keeping the default model. For the UI I just wanted to change the ability icon to a different image (so instead of a sword image its a fireball image for mage)

#

I could maybe do the UI outside the component, but it would be nice to have it all done with 1 thing

torpid hound
wise tide
#

I see, I just want the game to be very modular so if I decide to add something in the future it doesnt require me to rewrite a lot of stuff

#

Right now I have a customisation tab where the user can change their name, skin and was going to add a class selection option. When the player is spawned it pulls their skin (texture) from game instance and applies it to the model (and saves in player controller). The name displayed is set in player controller and grabbed from game instance.

torpid hound
#

I don't want to sound mean, but if you're not sure how to approach making your game very modular already, you are absolutely going to have to rewrite a lot of stuff by the end. It's also not a bad thing to be rewriting a lot of stuff as you go, that's just par for the course in any large project

wise tide
#

Yeah for now I was working on a test version of the game. I have had to rewrite a lot of stuff so far and will definitely have to in the future. Its just if I plan out stuff before making I can make it a bit easier for myself

torpid hound
#

You could take the leap into unreal's gameplay ability system. That is built to be super modular and extendable

icy dragon
formal parcel
#

@wise tide this is comedy for me... learn the damn interfaces this is literally the situation they are for

formal parcel
#

rtm, it is.

tawdry surge
#

Id do Inheritance of a virtual function, interface, or GAS before I made a component, but any of them can work

icy dragon
#

Personally I'm suck at GAS, so I used a custom made ability component storing things like anim montage (or rather sequence, since I have other stuff going on) to play, damage type class, damage amount, and whatnot.

I'm sure some people can tell it's fucking shit even in compiled build, but eh, I have yet to see some major spike in potato CPU.

sweet silo
#

what do you use if not force delete ?

icy dragon
tawdry surge
#

Force delete just means are you sure

#

Overridable event @wise tide

wise tide
#

So I would have an ability function in my character that for example just does a basic action, and I can override that depending on the chosen class and it will change it to do the class ability

cerulean ibex
#

The title of comment bubbles no longer shows when zoomed out in UE5. I checked show comment bubbles when zoomed out setting. Is this bug or anyone know a fix?

tawdry surge
#

Yeah. Just like begin play or any other built in event.
Override it in the child class cast to the gamemode and use that to determine which ability fires

wise tide
#

Interesting

sweet silo
formal parcel
#

what is the something?

#

dont use force delete

#

what are you trying to delete?

sweet silo
formal parcel
#

oooh

tawdry surge
#

Force delete is just asking are you sure. As long as it is in use (even in the undo buffer) it will ask

formal parcel
#

just delete that shit

#

its probably complaining about it being inmemory due to undo steps

#

if you're sure you want it gone just force delete

#

i thought u meant like deleting something in-game

sweet silo
#

ah ok cool

#

because for something in game you would first replace the references ?

formal parcel
#

well, i actually like to just delete it and then go fix everything that throws errors

#

but i guess technically thats a bad practice

#

depends on what it is I guess

#

if its a core system build the replacement first and replace, if its some random variable thats referenced in 2 places just delete and go fix IMO

tawdry surge
#

Reference finder is handy for cleaning up before hand to avoid breaking anything

tawdry surge
#

Only way to figure out what's going on in marketplace projects

formal parcel
#

reference finder seems to only work in the current blueprint for me

tawdry surge
#

There is one for the content browser that shows asset connections and if you click the lil binocular icon on the find results in the BP it will check all BPs

sick onyx
#

Hello, does anybody know how I can make the character look at my mouse cursor ?

umbral ginkgo
dire flame
#

im trying to update my player ui widget on collision with my pickup but i cant pull it off (still a ue noob).
so my thinking is get the PickUpLetter Component of the hit object and update the player ui to the corresponding Letter...

elder mango
#

does casting to another object reduce performance?

karmic sonnet
#

Hi Folks - I'm trying to organize an array of objects by the z bound size. I'm using object references as my variable type. My current issue is that I do not know how to grab the staticmesh or actor info from the current object I'm working on (those two big blank spaces.) Am I using the wrong reference type entirely? When I tried doing it with the actor type it wouldn't let me add my objects to the initial array. Thanks for any assistance!

ornate trail
karmic sonnet
#

it's an object reference, awesome thank you, I'll try getting the info from there!

ornate trail
#

you might need to cast to your specific object first before the variables show up, not sure on your use case

karmic sonnet
#

It's run from this - all of my objects are static meshes currently - I was thinking that when I got the "CurrentTarget" variable I have defined, it would return what type the object was

#

but that's where I am confused - how to get the "CurrentTarget" variable to return that the object is a static mesh. Hopefully that makes sense

ornate trail
#

Well from what I can tell you are setting the sorted list to be an array of meshes. If this is the case then they are for sure, the index on the 'Get' is just which mesh you want.. index 0, 1, 2 etc

#

I'm not really sure what that current target logic should be doing tho

#

if you're just trying to create a condition for your loop maybe you don't want to be using a 'get' to grab one of your meshes there?

karmic sonnet
#

ok, so as my for each loop runs through my list of objects, I want it to get the bounds of the staticmesh and add it to the array, the condition should be checking the Z height of each one to see if it is larger than the one before, and then putting it in the new array accordingly. That's what I want it to do ๐Ÿ˜… I am a beginner at sorting arrays and found this method, but it was done with vectors as opposed to the bounds of an object

red lark
#

Does anyone know what the easiest way to change camera shake parameters at runtime is?

late scaffold
#

Hey! I wanted to quickly drop this in here for anyone who's interested and is free right now.

In about 45min (noon EST) I'll be doing a live streamed presentation on editor blueprints through the Georgia Game Developer's Association. It's super beginner friendly and if anyone needs BP help in general or has questions about the presentation, I'll be in GGDA's discord afterwards.

Live stream will be here v
https://www.youtube.com/c/GgdaOrganic

mental trellis
#

Wouldn't that be better off in #events or something?

late scaffold
#

Ah, true. I'll put it over there. Was a bit worried that was only for larger events and not things that are happening right this instant.

terse moss
#

Anybody know a good responsive way to detect when a character quickly turns in the opposite direction? Basically trying to get a Mario 64 style backflip. I have it working, but I currently have it only checking the current direction and comparing it directly to the frame prior, which means you have to move the stick very quickly and it leaves no wiggle room.

#

I feel like I could brute force some leeway by having an array of like 3-4 direction values that get overwritten each frame, and if any of those are ~180 degrees different than the current frame, it activates, but this seems sloppy

#

Plus it doesn't account for quick rotations so technically would give false positives

#

I guess the follow up question would be how do I detect the travel "shape"

#

IE through the center or around it

wicked osprey
#

Guys, such a stupid, but at the same time incomprehensible question. I have the Equip and UnEquip logic, which should be triggered when equipping and hiding an item, respectively. And so it is clear that they should call at the beginning and at the end, in other words on Begin and Destroy. But the question is, isn't it more correct to call Equip and UnEquip already directly directly, rather than hang them on Begin Play and Destroyed?

woeful pelican
#

Depends on if the equip could get triggered before the item is ready, that's how I see it anyway

woeful pelican
red fossil
#

I'm really confused on control rotation and actor rotation. I'm trying to get the character to roll according to their camera/control yaw. So when you look left or right, your character will roll left or right. But it only works at certain angles or when looking backwards at your character. I think because actor roll goes from around -90 to 90, while control yaw is something like 0 to 360. I have no idea how to make it translate correctly and also be in the direction I'm facing.

ornate trail
#

anyone use something like this? seems the second click isn't always captured

thin panther
#

The only time it causes oerformance issues is if you misuse hard references

terse moss
wise tide
#

I can control all my UI within the game instance correct? And with UI that is affected by the server I can have the server cast to the individuals game instance to change the UI?

woeful pelican
thin panther
#

The cast itself is free but hard pointers have all associated data loaded with them. Si if you cast to an unloaded asset, and that asset has a data table with 10000 meshes that arent soft refs then yeah its an issue

thin panther
wise tide
#

is the HUD class created when the game is booted and persist through multiplayer like joining a server?

woeful pelican
#

Anyway I got an issue of my own: how would you go about checking if a player can't move, for instance when they're between two meshes?

Currently doing it by using overlap spheres inside the player, but there's probably a better way of doing this.

#

(using Event Hit here)

red fossil
thin panther
wise tide
thin panther
#

I reccomend reading the network compendium for multiplayer stuff

red fossil
#

It's a character yeah

#

I'm trying to take the control yaw, aka where you're looking left and right with your camera, and making the character roll based on that

#

It works, sorta, but just not in the correct direction lol

cobalt gulch
#

Is there a way to fix the collisions of a mesh in an actor because I have this door with barricades but the collision capsule expands to the outer parts, even though the collision capsule should be the same size as the barricades

wise tide
thin panther
red fossil
#

Oh ๐Ÿค”

#

I'm using character movement so that you can also land and walk around

wise tide
red fossil
#

ok, gotcha. So like rotating the mesh instead of the capsule

red fossil
#

I have a pitch control that rotates the entire actor, and it works perfectly though

wise tide
#

Interesting, also I made my branding/logo a UMG object so when I want to change my logo I just update the UMG its inside and it will auto change elsewhere. Is that a viable use case for UMG? Seemed weird to me

cobalt gulch
#

Is there a way to fix the collisions of a mesh in an actor because I have this door with barricades but the collision capsule expands to the outer parts, even though the collision capsule should be the same size as the barricades

red fossil
#

ah ok, I don't think I'll be making full unlocked rotation/barrel rolls so its probably ok. If I do barrel rolls it'll be faked with an animation and not real rotation. I just need to get steering in

thin panther
#

Then update the texture2d

wise tide
#

I see, I just saw a random reddit post with someone saying they made their logo and buttons etc all UMG objects and just dragged in the UMG objects. Didnt know if I was supposed to do it that way because it seemed weird

red fossil
#

You can change capsule shape like that?

thin panther
#

I mean theres nothing saying you cant but i would certainly prefer to use images imo

wise tide
#

I see. Would you say having the different pages for my settings menu as their own UMG objects? Like Graphic, Controls, Game etc

#

and have those UMG objects within the Settings UMG

terse moss
cobalt gulch
terse moss
#

But I mean capsule vs cubes or whatnot

#

Also you can get rudimentary collisions in engine if you open up the mesh

woeful pelican
#

Yeah you probably want to add collision to the meshes

#

Easily do-able

terse moss
#

I'm gonna be honest, I've been exclusively using the in engine collision creation and I know I'm a dumbass for doing it this way, but I've never had issues

red fossil
#

gets kinda messed up at certain angles

thin panther
#

Think about whats gonna be reused

#

A settings menu will but individual graphics tabs wont

#

So have 1 widget wuth the graphics audio game settings on a widget switcher then reuse that

wise tide
#

I see, what should I contain elements I dont plan on re-using in? For example the server selection menu is only accessed from one place

thin panther
#

Whatever menu it is in, although a server browser may also be a good one to reuse

rotund marlin
#

Are you able to handle a Multiplayer inventory with a map for item name > item id, or do have to make a construct table for multiplayer?

thin panther
rotund marlin
#

:< doing it in blueprints tho

thin panther
#

Yes but its a multiplayer question

rotund marlin
#

fair point actually

wise tide
#

@thin panther what does your main menu contain? I am struggling to understand what you use that isn't a UMG and how it is laid out

thin panther
#

So my main menu contains each of the buttons laid out manually, when the settings button is pressed however, it creates the settings widget

wise tide
#

So lets say you click a button that takes you to an area to host or join a server through IP. How does it do this? Does it hide the button container and show the server container?

thin panther
#

I would either make the server prowser a tab in the widget switcher or create it on top

wise tide
#

is a widget a UMG or are they different things?

thin panther
#

Wdym

#

A widget switcher?

#

Is a compinent

wise tide
#

I see

thin panther
#

Each child of it is a tab

#

And you can change an index to set which on is displayed

wise tide
#

that is incredibly useful to know. Can a tab in the widget switcher contain its own widget switcher?

thin panther
#

So my main menu is index 0, if i click single player it will take me to index 1 where that stuff is etc.

thin panther
#

In fact i think i do that

wise tide
#

Yeah I think I have been making my menu in a silly way. Will definitely use a widget switcher. I assume anything I want to display outside the main menu is a separate UMG such as settings and the main menu itself

thin panther
#

Not necessarily

#

I woukd do settings separate as its reusable

#

But the main menu will just be the first index in the switcher

#

For my case

wise tide
#

Oh so the main menu isnt even a UMG, its just within a switcher

thin panther
#

Yup

wise tide
#

I see, thanks for the help

#

Also I assume the pause menu when in game is a UMG, and if that has separate pages they are within a widget selector (with the exception of settings and anything else I want to display in multiple places)

thin panther
#

Yup although most of your pause menu will be settings, resume and quit i think

faint pasture
thin panther
#

ALS4

#

Thats where theyre from

#

Think its the default for their projects

wise tide
faint pasture
# limpid bronze

You are/were getting the forward rotation of your location, which doesn't make any sense. It'd just be a rotation looking away from the origin

faint pasture
#

That's how you get ppl to love it.

wise tide
#

was gonna have both in my pause menu, one for return to menu and one for quit (the are you sure one)

trim matrix
#

is there a way to create a bool in my AI controller and then get it from my normal mesh AI bp

#

?

#

trying to activate my running animation if the AI sees the player

#

but since my Anim BP ref was created in my normal AI bp it wont pick it up

hard sigil
#

how do you check if the player is stuck inside a wall?

trim matrix
#

so I was thinking maybe I put the detection bool there

#

and then if its true

#

I activate the running bool in my master AI bp

#

how can I acheive this

grand valve
#

@trim matrix Pawn has a node called Get Ai Controller I believe. If you use that, and then cast to your custom AI controller, you can access that detected variable

woeful pelican
#

I think the better way of doing the check just boils down to "running into a wall" vs "unable to move"