#blueprint
402296 messages ยท Page 887 of 403
Add a particle system to the bullet actor
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
@formal parcel
im using line trace by channel
Thanks Panther
what are you using to draw that Alexey?
is it part of one of those 2 actors?
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
gotcha, lemme try that sir, thanks
@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
yea i think i get it the rotation is the tricky bit but
look at will generally provide you the best result
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++.
yeah...add one via construction script
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
@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
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
@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)
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
in the mesh itself
there is an import transform settigns, thet let you transform the mesh
gotcha
you need to reimport one ofc
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
how do I spawn a system from the gun barrel
here is what I did
and it spawns from the world origin
I'm so confused - is there no way to save the cylinder as a new mesh?
You can navigate to it in the content browser and duplicate it, or you can export it as an FBX and then import it.
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?
all the code to shoot isnt here but all you should need to do is make a scene component and put it at end of muzzle, then use it as the spawn location
for rotation can probably just get forward vector from the muzzle scene component
can always give it a try
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
you need to set value and press reimport
i do but then its asking for some source file
yep, just point to exported one
uasset isn't an option
export it
uyghhhh how?
it worked thanks!
@wispy star lmao so it looks good in the editor... but then nothing at all changed in game
still sideways
awesome np ๐
axis looks the same as urs
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?
Spawn another actor of the same class?
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?
i really cant understand what ur asking man
but if you need another instance of the same class, as sipes said, spawn another one...
@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
@formal parcel how's the mesh looking ?
@jolly oriole blueprints are class objects. You can put all logic pertaining to it inside. You don't need an actor for every component.
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
@formal parcel i mean literally, how is it looking in viewport of the mesh inspector
well i was just testing something else but one sec
ignore models just trying to get the concept
it it aligned along Y axis?
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
look at will align X axis of the object so it should be x axis
it doesnt
@formal parcel where the pivot in this scene?
which should be the end of the object
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
oh... just divide the distance to length of cylinder
"length" of cylinder isn't defined anywhere in the mesh editor
where do i find that
top left
np
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
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
@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
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
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
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 sounds like incorrect header
A header file?
yeah sorry the include is what i meant
Nope still broken, included the file specifically for that struct
What do you mean? The variable was not defined as out put unless I am messing something here. The only return type that should be on that function is a bool.
how do you make a player start in your game
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.
thanks :3
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
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
This is how I did the code according to what I could understand to you on the LVL transition blueprint I have
https://blueprintue.com/blueprint/2lm-f50q/
Still didn't work.
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.
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
huh yeah that does seem pretty simple from looking at the diagram. Can you post you bps?
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
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.
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
Okay i tried it but I'm afraid the contents still are deleted when opening the level
https://blueprintue.com/blueprint/esjh9v6q/
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?
That probably hasnt loaded the level yet
Do it in the begin play of the char or smthn
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?
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
Okay I tried it and now I can't add items to my inventory after that, like I can't pick up items anymore
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
How can I destroy an object with chaos physics when it is hit by a bullet
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)
To me it sounds like you might have a mess of spaghetti code going on if you really are having all these issues just from setting and resetting a variable.
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.
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.
Get length or distance or something like that. Might have a vector2D flavor, otherwise the vanilla 3D will work
Distance 2D
Oh, didn't notice question got stealth answered
Cool, ill try that our when I get home in a few hours.
Even still, nice to get a couple answers
If not, good old Pythagorean Theorem works ๐
My monkey brain forgets these things can actually be applied lol
Whats the difference between a blueprint and an actor?
Actor is a built-in class in UE, and blueprint is UE's visual scripting/programming system
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
Is the base class of a blueprint an Actor? or are they totally different things?
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
Yeah I understand that, but in terms of inheritance the base class of a blueprint class is an Actor
just like StaticMesh inherits Actor
I think object is the base class? IIRC there's stuff more fundamental than Actor...
and there are things like Game Mode, Game Instance, data assets
that you can subclass with BP that aren't actors
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
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.
actually this page here has a really good example
So the SceneComponent is what enables endless parent/child relationships?
no, an actor can have components... it's modular. A scene component is a component that has a transform, like a static mesh component
Epic's own example: https://www.youtube.com/watch?v=qr4ZjieAQKY
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
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
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
UE has no prefabs
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
Post it here, don't have time for DMs
It could be helpfull for others aswell
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?
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
So I tried to make a blueprint component however it only seems to be the logic, not the physical representation
You can have the component add another component tho, cant you
So I made this component right, thinking hey, if I can get a static mesh spinning, we're already half way there:
yeah, a blueprint component is just code. A scene component has a physical existence (a transform), and either way they need to be hosted on an actor to truly exist in the world
I never tried but probably...
spawn another component and attach to self
I did that for my interaction component (with a collision volume i bound up to)
You can do that but for starters it's probably too much
Fair enough
The screenshot from Raecast suggests that there is a huge knowledge gap
Not sure that's easily fixable by this example
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
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
So UActorComponents are ideal for general logic/backend, whereas USceneComponents are basically designed to be able to use in world
More or less yes
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
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
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
With my guitar pedal thing, it sounds like those modular dials and buttons need to be custom scenecomponents, is that a fair statement?
I can't really picture what you want to create with the guitar pedal
Do you have an Image of a real life one?
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
This could be one actor with 4 components
As long as that looks proper in terms of graphics
I just want a dial component I can slap into a blueprint, configure, and reference in the logic
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
you can make a BP subclass of static mesh too... I've done that somewhere in my project
Of the Component?
yeah
Right, maybe it's exposed by now (exposed means someone in C++ marked the Class/Property/Function to be available to Blueprints)
yeah it is exposed from what I have here
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
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
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.
Show your BP
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
This is the result if I just do this.
isn't that what I was already doing?
I mean like,
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
Thanks, it works now
@tight schooner is there anything necessary for something to be registered as hit by the linetrace?
sorry idk offhand for Line Trace By Channel
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?
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!
You might want to look into putting AnimNotifies in your combat animations to trigger the VInterp or something
$d*
Are you certain that the first trace from camera is hitting the wall? Cause that looks like it's still trying to go to the end of the first trace, but past the wall.
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?
Boolean on the char sounds way cleaner than some random variable sitting in a level BP
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
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
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
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
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?
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
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
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
Interesting, so the base features every character has is in the base, and the unique added features are in the sub classes.
effectively yeah, your movement (controlled vs pathing) would be left up to the child class
or w/e
Turns out I was using the wrong vector. I did however end up making perfect Third Person Weapon Trace from the Muzzle to Camera Center https://blueprintue.com/blueprint/ddb4h30g/
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
you could even make a child of your current character and override any damage to not do anything in the child
Feels odd to use both parent and child for different things in my head ๐
Id have two children, one for each scenario ๐คฃ
I think of inheritance like layers lol
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
yeah that makes sense too for less code running in the character
so really seems like a matter of stylistic approach
See I plan on having a huge variety of characters, and I am not really sure what I would make the base character have.
I am making a party game with a ton of gamemodes, and I need different characters for different gamemodes. Like a character who flies, one who drives, one who has fighting moves (most is this), one who can only walk
For the base character it wouldn't have movement because the movement would be different per character
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..
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
Nah that would still be up to you
ye
Youd probably want a layer that has this functionality tho
well yeah my main player character would be a child of BaseCharacter with the WASD + space added
I use each child to add more functionality. the parents have less but basic, shared features
Master_char -> Master_basic_moveChar -> many char childs
Yeah precisely. The thing is the WASD movement isnt a shared feature among my characters
so you wouldnt put that in the top parent
If its among several id make a new layer just for that
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
but you may want several children under a parent with WASD inputs
for this I would have base character > wasd character > those several children
yeah exactly
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"
the base may just be like an interface and nothing else lol
Yes I like that actually
Stuff like pause menu goes under player controller though right?
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
The Player always keeps a Controller during a Session, but may change Characters during Gameplay
What about between levels? By session you mean game start to game quit?
online game session start to end
there will be very little in common
Fair enough then!
within map/server
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?
you can have an EOS or Steam Session for Friends, Matchmaking etc
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
Yeah you can do that
you can't use steam session for a game unless its on steam right? This game is private for me and my friends so I was just gonna do normal port forward host
where would I put the UI and customisation stuff? I was going to put it in player controller but if that doesnt exist till host/join
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
You could save that locally, even in an ini file
ah nvm then
I was just going to locally save stuff like settings + username and skin choice as there is no progression etc
A whole save game system is a bit much for choosing which outfit you're wearing.
and because its a party game there is no game states to save
Main Menu is its own Level with its own controller
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
haha yeah, Im assuming a typical Online unlockable clothing security scenario
or could I have player controller grab skin / username from a local ini file (and if empty choose a default)?
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.
Yeah you need a way to Set and Get the Clothing variables between and outside of maps, Game Instance I believe
Anything you set as a "config" variable will be automatically saved to an ini file locally.
well I was going to have Set exclusive to the main menu level customisation widget, for get I am not too sure. It would have to get it upon opening the customisation widget which is exclusive to main menu
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
If you want to persist between maps you need to use the Game Instance I believe
wouldnt player controller persist through maps/levels?
No they are destoyed and recreated
Oh, interesting
wouldnt that mean if you went to a new level you would need to re-host and re-join?
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
what about this though?
would opening a new level end the multiplayer instance and reset it so you need to rejoin each other
You can always store persistent data on a game instance
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?
What do you mean by "takes you to the game levels"... where you aren't changing maps?
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
A map/world contains many levels
Or, well, can contain many levels. It always has at least 1.
So my current levels are "MainMenu" "Lobby" "Game", what are all these levels apart of?
just the world as a default?
I don't even know how to explain that would be bulletproof.
I'm going to move over to the #multiplayer because my questions aren't really blueprint questions anymore
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?
@light pilot well its definitely firing off the point increase 3 times, given the print string occurs 3 times. Where is this event occurring?
This is the full blueprint
I'm quite new to this so just following the tutorial and this is what he did
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
That fixed it!
Great, thank you so much!
Awesome! Glad I could help ๐
I had made a little character using 2 cubes and they had that ticked on so that was causing it
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
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
So Iโm making a side scroller using this tutorial playlist: Point Scoring - #6 Creating A MOBILE Endless Runner Unreal Engine 4 - YouTube I just finished episode 5 and am now able to switch from side to side in my project, I didnโt like the camera moving along with the character on al axis so I followed a forum online to have it only move on on...
Is the camera connected to a spring arm component?
yes
Another guess here, but what happens if you turn off the occlusion detection? (I forget the name of the checkbox)
is that on the details panel springarm
Ayyy I know some stuff lol
Thank you man appreciate it
No problem, glad to help!
I'm doing this for a school application so is it okay to take some screen shots from this conversation to use for documentation?
Yeah I don't mind at all!
Great thx
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
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
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
Does what work?
yea MW that will throw some errors
needs to cast to specific type before calling methods in it
If you're referring to the == not being able to call, they didn't ask for that lol
there isn't a "TypeOf" operator in UE?
instance never == the class, idk though I'm new to the BP magic
@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
magic
under the hood its prolly doing a typeof check
not an actual equality comparison
I'll have to try it again. Remember doing it a long time ago and it didn't work
but regardless, the real way would be to cast it
^ true
casting, the cause of and solution to all BP problems 
Huh you might be right, could've sworn I'd done something this way before
so I'm new to UE - is there not a way to do like a switch on the typeof an object?
I'll verify, hold up
i mean the better way is an interface but just for my own curiosity
Select
select is only 2 outputs tho
As many as you like
I don't think so.
so the real UE solution is prolly implement an interface and just call the interface method
select allows you to add pins. But in terms of type of I don't think so
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
just keep in mind that a select node will evaluate all options, even the ones not used
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
Thats unexpected
because == is an equality comparison and it is valid to ask if anything equals anything else
But to allow entry of a generic reference
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
looking at your screenshot that should work
It would be equal if the instance ref was correct
no
Well at any rate I'm glad I'm not alone in thinking it would
because an instance of an object is not equal to the definition or type of an object, it is only equal to itself
I just tested, it does not work
the type isn't checked, it's the pointer that is checked
Is there a way to get the Z height of an actor within blueprints?
But again, weird that you can enter generic info if it's not valid
SecondFavorite, bounds of the mesh
if you want type check use get class
@formal parcel tyty
Actor type reference is not == to thrid person type ref
So if you cast
If you checked two actor type references they would
Yeah
it should regardless
Right
debug it using breakpoints
I learned something new today
so you can see what is going on
get class returns the instance object CE
still not seeing a method to actually get the type as string or whatever
Get display name for a string
get class will return class type
of the instance
but like I said it should work regardless
my take is that it's something else overlapping
yea this is silly
I expected it to aswell, so surprised if it doesnt
and select wont use a string
Unless it's casting in the background idk how it would
just cast the damn thing ๐
Yeah this works
ughhh
why are you getting string there?
But for real lol casting is the obvious way here
why not an interface that implements whatever you're trying to do in the first place?
rather than all this logic for type checking
Sometimes the task isn't gonna be reused enough to go that route
It's always case by case
interfaces do implicit type casts too
yes they do CE but then you dont have to worry about it
and they are more expensive than a cast
you just define the behavior
If you're just entering the engine and testing stuff, you don't need to do that
and they are annoying to work with
I'm just saying
No they are not more expensive
the real use cases for interfaces are very few and far between
they absolutely are
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
you do a cast inside the interface PLUS a vtable lookup
The virtual look up overhead was fixed forever ago and literally every one of the 40 built in events uses virtual functions
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
see this is why I stayed in managed languages
๐
enterprise business apps, who cares about vtables?
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
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
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
Either way interfaces let you reduce dependency which imo is worth a minor performance cost
basic separation of concerns
Direct casting is for single use on objects i know exists
what is better than an interface is to have an interaction component that handles interaction logic
no need for repeat code
what do you mean? using an interface gets rid of repeat code?
other than non-siblings doing identical behavior but... meh
maintainability > less code
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
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?
Interaction implies everything behaves different so repeating isn't much of an issue
exactly
except it happens all the time
in bad code...
bad architecture i mean
if you're ever checking the type of an object to dictate logic... you should refactor
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
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
it's nonsense to think an interface solves your issues here, it just moves the issues to be at a hierarchical level
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
Interface HandleEvent - Class: Implement Interface -- Process: Call Interface....
its not nonsense...
I'm not. I check for if a component has an interaction component and handle the logic through there
that's it
so what do you get all components and foreach typeof them?
Well at any rate, the guy asking this question definitely doesn't know what any of this means and wont benefit lol
LMAO
So you're looking up the component. Might as well lookup the vtable
aint that the truth
yeah except the logic you have to write is so similar you can consolidate it. If this is the first time you use unreal I urge you to look into actor component
bunch of senior engineers and architects in here theory crafting interface implementation in a basic help channel
except the logic comes prewritten
Yeah I'm sitting here like "What did I start..."
@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
I'm hobbyist all the way lol
i do need to read more though
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.
Soft object references maybe..
That type of ability stuff is more GAS territory tho
yeah GAS is worth investigating.
You can do that too
I see, so when player presses F it runs "DoAbility" and it performs the ability attached as a separate component?
yea kinda a joke we just had a big interface discussion
but to solve this is interface territory
And you will be investigating GAS. It's not small
GAS is a system that handles this basically
As for GAS I think its overkill as my game is turbo simple. You only get one ability
it's expansive though
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.
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
Just put a bool on the input then and only let it fire once you have granted it
If its just one minor ability
this way you dont need one megaclass character
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)
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
Yeah. It's not scalable but for simple game its fine
That was my original intention but it seemed a bit messy as my main character would need the nodes for every ability and there could be 15 classes. There may be 2 or 3 abilities too
My explanation isnt great but each class has 1 ability, but the ability changes depending on gamemode
shortcutting yourself is a surefire way to develop problems later on
@wise tide
When you said interface I thought you meant like, an interface like main menu
the abilities implement interface
no, the actual top level OOP concept called an Interface
a menu is an interface too technically
I am not familiar with that type of interface
@odd ember Fair enough, I'm clueless when it comes to most of this
Mopzilla - look up "interfaces" in any OOP
Yeah I am looking at the UE docs for it right now
So each class would be its own interface which stores the abilities
just to be clear, interfaces aren't an UE concept
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
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)
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?
I am trying to wrap my head around it, let me put together what I think it looks like roughly in paint
@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
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
eh not exactly, one sec
Interfaces for that feel weird. Why not just an ability base class?
Yeah, it just seems like regular inheritance but with extra steps
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
yeah I am trying to understand it
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
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.
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
Exactly, so don't use interfaces.
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"
Why do you need a giant class?
why dont you learn what we're talking about and what the problem is before contributing
Inheritance is a thing.
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.
If it's meant to be scalable and you wanna check a bunch of stuff you're leaning toward GAS and gameplay tags again
aight, i tried, good luck peeps
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
keep avoiding learning how to use a foundational part of OOP
life will surely be easier
I'm not against anything, I just don't really understand how interfaces work
then you should spend the next 2 hours learning them
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
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
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
but they actually simplify so much stuff
You can just use inheritance instead of an interface. Inheritance is a foundational part of OOP too, and would better suit this use case.
You actually need both Wolf, you need to INHERIT a base class which IMPLEMENTS the interface
anymore basics?
Lol no
Why would you need an interface? The functionality is defined in the base class that is being inherited.
You don't need an interface for this.
Yeah currently im using inheritance for a lot of my stuff. Like how the racing variants of map A might have a racing track, but it still inherits the beach and the trees
heh, thats not inheritance
Interfaces are great, this is not a good use case for them
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
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
+1 to the suggestions for components for abilities. It's a much more sensible approach and legit simpler
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
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.
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
It probably won't be nice long term tbh. Easiest to get started with though, which is a valid choice. Might still be best fo go for an actor for the ability though. That way you can have components inside it and asset references to a hat / icons that can be read from the ability. I don't think that necessarily the best way, but a way that will work
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.
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
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
You could take the leap into unreal's gameplay ability system. That is built to be super modular and extendable
Component would be a better idea to store data for abilities
@wise tide this is comedy for me... learn the damn interfaces this is literally the situation they are for
It's not
rtm, it is.
Id do Inheritance of a virtual function, interface, or GAS before I made a component, but any of them can work
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.
what do you use if not force delete ?
What do you mean?
What is a virtual function?
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
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?
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
Interesting
like how do i delete something ? because everytime they say dont use force delete on this object
a megascan asset for example
oooh
Force delete is just asking are you sure. As long as it is in use (even in the undo buffer) it will ask
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
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
Reference finder is handy for cleaning up before hand to avoid breaking anything
i see
ah nice never used it
Only way to figure out what's going on in marketplace projects
reference finder seems to only work in the current blueprint for me
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
Hello, does anybody know how I can make the character look at my mouse cursor ?
how can I smooth that abrupt transition between the camera shake and the camera's normal transform?
Don't crosspost.
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...
does casting to another object reduce performance?
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!
what is the type of your sorting list? what ever the type is you should be able to just drag off your get and break it to get its variables.. or if has another object you want to access just drag off and get 'object name'
it's an object reference, awesome thank you, I'll try getting the info from there!
you might need to cast to your specific object first before the variables show up, not sure on your use case
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
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?
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
Does anyone know what the easiest way to change camera shake parameters at runtime is?
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
For more great videos about games and game development, please support our Patreon at https://www.patreon.com/GeorgiaGameDevs. Any and all support goes right to improving our AV abilities and presentations. Thank you for your help.
The Georgia Game Developers Association represents game designers, programmers, artists, audio engineers, compose...
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.
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
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?
Depends on if the equip could get triggered before the item is ready, that's how I see it anyway
Probably with the 3-4 direction values you were already thinking of. That or location values.
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.
anyone use something like this? seems the second click isn't always captured
As long as you are doing right then nk
The only time it causes oerformance issues is if you misuse hard references
Guess I'll give it a shot. Just feels like the "wrong" way to go about this to me, even if it'll work
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?
Yeah I don't know the actual way, but I'd try your idea and see if it's good.
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
I typically leave ui stuff to the HUD class
is the HUD class created when the game is booted and persist through multiplayer like joining a server?
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)
Here's a clip of the result I'm getting right now as well as the blueprint where the translation from control yaw to character roll happens. Sorry for the horrible video quality, idk why it's doing that.
you can see the roll actually works how I want it to, just only when I look backwards and only while flying in a specific direction.
Dont think so although yiu shouldnt have a need for persistent ui
I see, I am just trying to wrap my head around UI. I have almost all the interfaces I need made as separate UMG objects (although submenus in the options area for example are within the same UMG).
I am just trying to figure out how to actually "open" the UMG objects and swap between them
I reccomend reading the network compendium for multiplayer stuff
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
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
im looking at it right now, I will give this a read for sure. Right now though I am trying to do the singleplayer UI (main menu, settings, single player play etc).
You can either create and destroy them, hide or unhide them, or out them in other widgets, like my in game screen may have UMG_LevelBar and UMG_SuperEpicOtherUi
So I could have a main menu UMG object which contains all my main menu interfaces as UMG objects. I then toggle the different UMG objects from within the main UMG BP?
ok, gotcha. So like rotating the mesh instead of the capsule
Can do ye
I have a pitch control that rotates the entire actor, and it works perfectly though
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
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
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
Not sure if ung auto autoupdates across widgets, last i checked it was buggy, but yes, if you jeed you logo in game why not just drag it in as an inage
Then update the texture2d
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
You can change capsule shape like that?
I mean theres nothing saying you cant but i would certainly prefer to use images imo
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
Is there a reason you're using capsules specifically?
The mesh didnt come with collisions
But I mean capsule vs cubes or whatnot
Also you can get rudimentary collisions in engine if you open up the mesh
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
I wouldnt
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
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
Whatever menu it is in, although a server browser may also be a good one to reuse
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?
:< doing it in blueprints tho
Yes but its a multiplayer question
fair point actually
@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
So my main menu contains each of the buttons laid out manually, when the settings button is pressed however, it creates the settings widget
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?
I would either make the server prowser a tab in the widget switcher or create it on top
is a widget a UMG or are they different things?
I see
that is incredibly useful to know. Can a tab in the widget switcher contain its own widget switcher?
So my main menu is index 0, if i click single player it will take me to index 1 where that stuff is etc.
Dont see why not
In fact i think i do that
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
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
Oh so the main menu isnt even a UMG, its just within a switcher
Yup
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)
Yup although most of your pause menu will be settings, resume and quit i think
Where are those michelin man lookin prototype characters from?
yeah, I was thinking of putting an "are you sure" on quit which I will just throw in the switcher.
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
Make sure that quit only goes to the main menu
That's how you get ppl to love it.
was gonna have both in my pause menu, one for return to menu and one for quit (the are you sure one)
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
how do you check if the player is stuck inside a wall?
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
@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
@hard sigil Funny enough that's a question I have! I'm currently doing it this way but I'm sure there's a better way
I think the better way of doing the check just boils down to "running into a wall" vs "unable to move"