#blueprint

1 messages · Page 374 of 1

crimson briar
#

Is there some way to make child shape collisions in blueprints? You can't inherit a class from them like you can from a static mesh component for example but it would make constructing actors way easier. I could just bundle my custom collision channels and tags into the shape class itself crying

dreamy mountain
#

anyone know why the turret is aiming above the head of the enemy rather than directly at him? been banging my head against the wall with this for a little bit

crimson briar
hearty rain
#

Shoudl'nt you use the muzzle actor location rather than the self one ?

strange owl
#

Thuper Thort..

dreamy mountain
narrow sentinel
#

Wouldnt i need instance data cause the items player picks up which is added to inventory would have different values to their default over time like durability, fluid level etc

#

Or would i just add these properties into the struct whether the particular item uses them or not ?

somber minnow
#

I'm trying to write the character's weapon animations inside the weapon components. All my other interfaces work, but this one just won't work. What should I do?

crimson briar
narrow sentinel
#

so what would I be best to do in my case ?

crimson briar
#

Depends on the structure of your items. If the items are only an entry in an array for example, I would go with an object that contains the data asset entry and various mutable variables per item.
If the item is an actor or a component you can just add mutable variables to it together with the data asset

dark drum
#

Does anyone know if you can make data assets edit in line? So if you select one in a class somewhere, you can edit it without having to open the data asset itself (and update the changes to everyone else using the same data asset).

crimson briar
narrow sentinel
crimson briar
#

By Object i Mean UObject

narrow sentinel
#

arr no the items are a AActor

crimson briar
#

The simplest thing that everything in unreal inherits from. It can contain data

narrow sentinel
#

which technically is a UObject

dark drum
crimson briar
#

If they are already actors, you can just add variables for the mutable data on the actors themselves

somber minnow
#

I can show

narrow sentinel
narrow sentinel
#

single player game yeah

dark drum
narrow sentinel
#

i'll take a look

dark drum
# narrow sentinel i'll take a look

As a quick summary, you're items are uobjects and they're what you move around and place into inventories. You then have a separate actor (world item) that you can pass an item object to which it uses to update itself so it looks how it should in the world based on the item provided.

Of course there's lots of way you could handle this depending on your project but it should be a good start in understanding some of the pieces.

somber minnow
#

I need to retrieve character mesh information inside a component using an interface, but I haven't been able to do it yet. Is there something I should be paying attention to? Am I missing something?

narrow sentinel
dark drum
narrow sentinel
#

so that was a thought I had tbf which was having the item save it's specific data to save game with a fguid to identify it's data for when it needs to retreive it, tbf it might end up being what I have to do

dark drum
narrow sentinel
#

so at times yeah

#

whether the levels would be streamed in and out is something I'd decide when i have a reasonable sized game to profile

#

but i'd be setting the levels up in a way where level streaming can literally be a flip of a switch if I do end up needed it

silk bane
#

Hey, I got some repeating issue that happens from time to time in blueprints.

When I am editing nodes, at some point, randomly Unreal blocks me ability to delete nodes(I can create/move, but not remove them in any way). Only restarting editor helps to bring ability to delete.

Does anyone know why this may be happening?

dark drum
# narrow sentinel whether the levels would be streamed in and out is something I'd decide when i h...

I would settle on whether you want to use it or not sooner rather than later as this could also affect how you handle some parts of the inventory system. I have a Hybris series where I recreated someones inventory system using a lot of the concepts in that tutorial. Hybris uses level streaming and I encounted a lot of things that you might not even realize is something you need to think about.

For example, making sure you're item objects are created using the persistent level and not a streamed level. 😅 Then how world items spawned at runtime are handled, especially when they cross streaming boundaries.

worldly trail
#

Hi everyone! I’m currently building a horse game in UE5 based on a tutorial, but I’ve run into some issues that I can’t seem to fix.

My Issues:

Mounting Logic & Start Condition: I want to ensure the race only starts if the player is actually mounted on the horse. Right now, the trigger starts the race even if the player is on foot. Also, I’m looking for a way to trigger the "Mount Animation" automatically at the start of the race if the player isn't already seated.

Grateful for any help or advice you can give! Does anyone have experience with this or perhaps a screenshot of a working logic for these three points? Maybe has something similar with a car which you can replicate/ copy and paste on a horse?

Thank you so much in advance!

narrow sentinel
narrow sentinel
worldly trail
# worldly trail Hi everyone! I’m currently building a horse game in UE5 based on a tutorial, but...

This is the Blueprint for my race start… I'm currently trying to solve this with the help of Gemini and ChatGPT, but I'm still stuck. I suspect my boolean setup is the problem. Since the horse is a complex preset with many built-in events and booleans, I'm struggling to find the right one. I created my own 'IsMounted' boolean, but I think it’s 'empty' because it isn't properly communicating with the horse’s actual state.

dark drum
narrow sentinel
#

arr right okay thats fine then

dark drum
narrow sentinel
#

yeah, jsut i already got my inventory system in place where I was using ustructs in the inventory

#

this was before I decided that i wanted the items to have individual data that can be different to the defaults

dark drum
# narrow sentinel yeah, jsut i already got my inventory system in place where I was using ustructs...

I think struct based inventories can get really messy and cumbersome. They are however a lot easier to replicate if you're in a BP only project compared to uobject based ones though.

One nice thing about uobjects is setting up the UI stuff can be easier. Because you can store a ref to the object itself, the UI can just pull it and bind to event dispatchers (on the item) for when things are updated. This can be trickier with structs as they are always a copy in BP.

Swings and roundabouts as they say.

frosty heron
frosty heron
dark drum
worldly trail
dark drum
frosty heron
#

True modularity

#

I'm using fast array and instanced struct

dark drum
frosty heron
#

Fast array cuz mp

frosty heron
frosty heron
#

Game play tag would be my go to

#

But try not to use bool in case you want more than just mounting a horse

dark drum
frosty heron
#

In general just pick from DA

#

But its soo easy to expand

#

I will never go back to normal struct for inventory

dark drum
#

(I need to look at actually making a replicated inventory system at some point)

maiden wadi
# dark drum Have you come across any issues with using them? My use of them has been increas...

My only complaint is their ability to bundle load out of the gate. I don't know if this has been changed since 5.4. But if you put them in a PDA similar to how you'd do an instanced object, doing Bundle tags on them doesn't work by default. You had to write your own implementation in your asset manager which was kind of stupid.

I love them, but for that reason I avoid using them as like an array of instanced editables. Meanwhile my savegame stuff has an array of structs each object can save with that both saves data into the struct and restores the data from it. Meant to be able to extend classes you can't touch easy. Like one example is I made it to it for actor's Transform.

worldly trail
maiden wadi
#

@dark drum My only honest issue with Instanced structs. Outside of this they're awesome. #cpp message

maiden wadi
worldly trail
maiden wadi
#

"You may not participate without a designated carrot muncher."

frosty heron
#

Thats about it

#

I haven't handle save and loading yet

#

But the inventory already work for multilayer. I'm just waiting for my brother to finish up with the description UI

#

Then I will handle changing the backpack index locally so player dont need to ask server to organise their backpack.

maiden wadi
#

Just need GUIDs or something. Then you don't have to sort anything on the gameplay side. You should never need to sort the actual inventory array to display it sorted in UI for example.

frosty heron
#

Yeah i don't touch the inventory array at all. The items have instanced struct with index :p

#

They also have guid but only for the purpose of networking.

#

So when I need to find relevant item, I look up by the guid.

narrow sentinel
#

so i'm watching this video and it seems their doing everything on construction of the world item, imo that doesn't seem right as the construction graph doesn't run does it in runtime so wouldn't I do this logic on normal graph so begin play etc ??

maiden wadi
#

I keep getting tempted to redo my inventory into structs. I still need the client side UObjects though. Maybe when I have some free time next and I'm not fixated on a game.

maiden wadi
near wolf
#

Hi, how to expose a variable from the "add spline mesh component" node ? I tried with setting up a static mesh node, but it's not working like that. I wanna expose the mesh to the viewport

narrow sentinel
maiden wadi
maiden wadi
narrow sentinel
#

thats fine then just wanted to check cause on their world item they are doing mostly everything on construction script so setting quantity of the item etc

#

for some reason i didn't think that was right

maiden wadi
#

Yeah, likely for instanced editable stuff. So that it updates when you alter the actor's details panel.

narrow sentinel
#

fair enough

maiden wadi
maiden wadi
#

Drag off of the AddSplineMeshComponent and do SetStaticMesh from that, populate it with the StaticMesh property you have.

dark drum
maiden wadi
#

Yeah. Essentially the easiest way to memorize it is "This is called once for the final set values it was given in the editor."

near wolf
maiden wadi
#

Nope. did that work okay?

near wolf
maiden wadi
#

Depends. Should be roughly the sameish over all.

near wolf
#

I think with PCG it's easier to control

barren tangle
#

Hey small question, do you if a Timeline node has the tick of the objet? or it has its own tick?

#

If instead of using a Timeline i use the delta time of the tick event, is it the same?

frosty heron
#

You use timeline when you have a fixed length.

#

Tick when you need something to run every frame.

Example for tick : interpolating to a value.

#

Elevator that go up and down? Use timeline.

Trying to smooth the gun rotation to where the player look at? Tick it is.

floral stump
#

playing with this override in character class, noticed that it calls before character reached the ground

#

its a bug or is there any distance adjustment to make it call only when character actually landed?

frosty heron
dark drum
barren tangle
dark drum
barren tangle
dark drum
#

Timelines are actually just a special uobjects with some fancy node wrappers. So when you add a timeline, it creates a timeline object for the actor.

You can manipulate timelines from functions by using the timeline object ref.

floral stump
dark drum
#

As an example for the timeline thing.

floral stump
#

sound will play 1.5 sec earlier before character reach the ground

#

or does it related to the jump animation?

dark drum
floral stump
#

Yeah I did a custom trace and it works fine

dark drum
floral stump
#

I think it can be animation related, the jump animation is going high and internally the jump ends early

dark drum
frosty heron
#

If you have the landing anim. I will just sync it with the foot with anim notify

frosty heron
floral stump
#

Increasing the jump Z velocity to 600 fixed the issue

dark drum
floral stump
frosty heron
#

' show collision

floral stump
#

yeah it go out capsule

#

and character is ignoring the capsule channel

#

I have plan to totally remove the capsule from character class

dark drum
floral stump
dark drum
dark drum
floral stump
#

Ofcourse it has

dark drum
floral stump
narrow sentinel
#

Tbf at the moment my thinking is when player picks up the item they simply add a refernece to the uobject that exist and i destroy the world item

#

Saving is gonna be a nightmare

#

Cause ill have to do stuff like checking if that item was picked up and if so destroy the linked view actor

dark drum
# floral stump Speed it up?

No. I'm not sure of the terminology but the animation has been animated without using the root bone. This means the hips move more than they should for the type of animation.

The jump (if not using the root bone) would need to be animated in place. (similiar to the walk cycle)

dark drum
narrow sentinel
#

Awsome that makes it easier then

oblique smelt
#

So I have an issue with UE 5.5.4 - When i used EnhancedInput in my WBP_Menu (Inventory Menu) I get this error essentially blocking input. I did some research online and it said to create the input in a parent of the Menu. I didn't really get what they meant by that as the WBP_Menu is the highest level of menu I have.

So I made the functionality run in my InventoryComponent, as thats what the Menu is calling from for all its data anyways. HOWEVER, I need to cast to the Menu... for the life of me I cannot figure out what the object is supposed to be. Any ideas?

dark drum
oblique smelt
#

All i'm trying to do it make it so I can navigate my UI with a controller 🙁

dark drum
oblique smelt
#

Yeah I get that, I was working around an issue with UE5.5.4 where it freaks out if you try to use input in the widget itself. Where would you control the UI?

Honestly I'm new to doing UI stuff so learning as I go. Any advice is appreciated

dark drum
oblique smelt
#

Yeah thats the issue - UE5.5.4 has a bug where setting up INPUT in the widgets doesn't work. They've still not fixed it in UE5.7 which tells me they're not prioritizing it because its incorrect to build it there.

Very frustrating for a learner haha

dark drum
oblique smelt
dark drum
oblique smelt
#

This isn't that, my input is set to Game and UI Mode so that shouldn't be an issue really

#

I did some research and people did some weird stuff to get it to work - stuff I can't really understand as they're using super vague language (because they know their stuff and I don't)

dark drum
oblique smelt
#

How strange... yeah I mean I just deleted it all, rebooted my editor and rebuilt it and now its not showing the error.. CLASSIC Unreal shenanigans

dark drum
#

I would use these instead as they'll honor the widget focus system.

strong fulcrum
#

hi, i'm a bit of noob in game dev, could i ask for some help/hint/tip? im using UE 5.5.4 and i have in my project "multiplayerInventory" plus ultimate interaction manager. separately they work perfectly but when i want to for example make doors that would check if a player have a key in the inventory everything falls apart. is there a way to check if the player has the key? results i get from this set up: dont have key when i don't have it (host) 2 item not in a table (host/client has water) any idea where the eq should be checked and verified on a player to avoid casting ?

dark drum
strong fulcrum
#

should do as it is brand new project and the water works perfectly fine in other scenarios i can use it drop pick up etc

#

as host or client

dark drum
strong fulcrum
#

how do i check that?

barren tangle
# oblique smelt How strange... yeah I mean I just deleted it all, rebooted my editor and rebuilt...

In fact it depends how you want to handle that process of input on the screen, in my last project i set the controller to sent an input through an interface. and the conserned element react to the input base on the interface. like that it was easy to handle the UI with enhance input system. Today i will prefere the On Key Down approach... simplier to put in place. But i don't feel it's a good way to do with that because it's overwrite a fonction + hardcode input...

dark drum
strong fulcrum
#

coud it be this? as it is "private"?

barren tangle
deft pivot
strong fulcrum
#

that is strange .... well maybe someone know any inventory system that includes handling keys for doors etc?

faint pasture
deft pivot
faint pasture
deft pivot
faint pasture
barren tangle
#

For my new project I did everything into the game mode for the prototype. I will move it into the hud later

dark drum
strong fulcrum
#

the issue is taht it is only on client side so the dorrs dont open and later even i dont have the key it still says i have the key. i will do it diffent way i thinkand skip the inventory

dark drum
strong fulcrum
#

i thionk i will just add virable keys to player and if you ty opening doors it will just burn the key and permanently open the doors

#

game will be like coop so if someone wants to chat it will be bad for his/shes friend only

#

cheat

dark drum
strong fulcrum
#

how do i check the inventory sever side? do i do it in player controller?

dark drum
strong fulcrum
#

tbh i weas looking at the framework and i dont get it, i do stuff it works perfectly and then it dose not work for some reason like in a character i can do custome event replicate it and it works fine but then in a actor (door for example) i cant do it because the actor is not a sever and i cant get it to be this server... why the actor cat be as sever? i sent the owner and it still works half way ....

crimson briar
#

Look through the pinned posts on the #multiplayer channel, they have some resources with good explanations

strong fulcrum
#

i watch some yt videos one person is saying that other is saying something different and then i end up with like 10 different ways of doing stuff that sometimes work sometimes not

gentle urchin
#

Mamy if the YT ive seen is basically unknowing people tossing stuff at the wall, seeing what sticks, and calling it a tutorial

deft pivot
crimson briar
#

It is not connected to anything so I'm not sure what other problem you could have with it

spice viper
#

How do I do Radial damage that is NOT blocked by anything in the world? i.e. damage through walls, actors, anything. If you're in the zone you take damage.

narrow sentinel
#

Anyone know what this error would mean ?

#

is it cause i'm passing through a user widget reference on it or something like that ?

errant snow
narrow sentinel
#

arr yes it is haha i didn't realise that barewith I know how to resolve

errant snow
#

Yeah, it's a bug with the "create event" option. I've fixed it in my engine. I need to make a pull request for it.

narrow sentinel
#

forgot I was in a function haha

frosty heron
#

Most common misused is running state full entities with multicast.

If something need to be in sync, don't use multicast.

narrow sentinel
#

i'm right in saying when i go through saving the data of the item I only need to save the data which would change, the stuff that would remain as it was when set initially doesn't need saving ??

#

@dark drum sorry for the ping so on this video i've been watching the one you linked to me. They are going through serilising the stuff to be able to save it to disk. Does a save game object not already do this in terms of if I create a save game with matching values and set the values and save the save game to a slot ?

dark drum
# narrow sentinel <@430016173694779402> sorry for the ping so on this video i've been watching the...

And yes it does. The reason why it's done here is to turn all the different var types into a single variable type (string) so it can be stored in the SGO.

Because of hierarchy, items could have different variables so manual serialising the data puts it all into the same type so regardless of the item, we can store it's mutable data together with other items of different types.

Alternatively, you could use an instanced struct array instead. It's not shown in that specific series but there is an episode in the Hybris series where I go over the instanced struct method.

narrow sentinel
#

my normal go to method would prob be a struct tbf which i populate etc but stick with series for now

dark drum
narrow sentinel
#

thats what i was thinking is I can look into switching afterwords if I feel thats a good option

#

oh what if I switch to using instanced struct instead it'd break and pre exisiting data ?

dark drum
narrow sentinel
#

makes sense tbf

dark drum
#

You could keep the logic for both methods for backwards compatibility but unless you had already released a game and didn't want to brick player saves I wouldn't worry about it.

narrow sentinel
#

so i've had to do that

#

for simple fact of it seems happy to convert to string but when converting back stuff like bool and FGuid it doesn't like not unless i use them specific functions you see in the screenshot

#

same for owning inventory one, its happy converting to string but not sure the method of converting it back

crimson briar
#

Sorry for butting in - It is a bad practice to make Names from strings/text on runtime. If you want a switch, you should use an enum

narrow sentinel
#

not even for this situation which would only happen once

crimson briar
#

Names use a special way of storing them for quick access. But the quick access depends on not bogging the global array down with unnecessary names.

crimson briar
narrow sentinel
#

fairs

crimson briar
#

In most cases it is harmless but it is good to remember the difference between names and strings

narrow sentinel
#

pretty sure you can switch on strings can you not

#

so if needed I can just swap the switch on name with switch on string instead

frosty heron
#

Gameplay tag pls

#

No dumb typo and have hierarchy.

#

Power to filter, to type check. Etc.

narrow sentinel
#

ohh right

dark drum
#

@narrow sentinel how are you finding using uobjects for items so far?

narrow sentinel
#

granted at the moment I have to make sure the object is references by something else garbage collection will try to take it

dark drum
narrow sentinel
#

only issue is I need to somehow serialise the owning inventory because stuff like the player, other inventory containers could hold items which would be tracked

dark drum
narrow sentinel
dark drum
narrow sentinel
#

fairs i'll not jump ahead haha

#

out of interest the location of the item do they end up saving that data as well cause they don't seem to be so far

dark drum
#

If I remember correctly, the GUID is used to get the relevant data so when the inventory is loading the data, it recreates the relevant items and assigns them to itself which in turn would update it's owning inventory.

dark drum
narrow sentinel
#

so i'm on pt10

#

they have multiple save game objects for each thing which has inventory would it not be better to have all stuff that has inventory add it's save data to a map where maybe a guid is used to identify whos data is whos ??

#

also hate it when they do pur BPs and I'm doing cpp for inventory system anyway

dark drum
narrow sentinel
#

i just think if I have a save game object for each actor that has an inventory thats possible gonna fill up save game folder with loads of seperate save game files for each inventory

#

where as it all being in one save game object and TMap seperating the data with as I say guids for the ids of whos is whos seems to me at least better

dark drum
#

Ideally you'd have it per chunk or region based on level streaming so you're not loading unused data. This isn't always easy to setup straight away though.

narrow sentinel
#

i think I might do it where I have all the inventorys add themselves to a map which is their guid and the saved information just to not confuse my head with doing different save game

dark drum
narrow sentinel
#

hmmm i'll keep ear out for that bit

dark drum
#

When dealing with level streaming you can have all the relevant saved data saved into specific folders based on the level it belongs to.

narrow sentinel
#

plus I'm having to do this in cpp so this is turning out to be a little fun challange on bridging gaps where I can between cpp and BPs

narrow sentinel
#

And ill prob just put a flag on inventory which marks it ready once all the items that need to be loaded are

crude helm
#

Lol I thought that it was a bug with Set Mass Override Kg node when using at construction script. But then I realize it works fine until I alt + drag to duplicate in editor. After duplicating it, it the editor will forever ignore any changes in both original and duplicated actors.... like does it make any sense? There are so many lurking stuff in this engine that I want to ask first if this is intended behavior

It make no sense to me, but maybe alt drag cause it to store or set something that can be cleared somewhere...

damm that was 3h trouble shooting the wrong thing because of this....

frosty heron
#

@crude helm moving the actor will cause the construction script to be run again.

steady night
#

hey

#

im using the Buff effect

#

but its getting like 50% transparent when used ingame

#

it has to be something in the material right ?

maiden wadi
steady night
maiden wadi
#

Hmm. Niagara does have it's own opacity stuff. But usually it's 1.0 by default unless you've messed with it.

Can you put it on like a flat plane near the character and show the difference?

steady night
#

done

maiden wadi
#

That still looks the same alpha I think right?

steady night
#

y

#

so should be the material then ?

maiden wadi
#

Definitely the material then. Can you open that Multiply after the radial gradient?

maiden wadi
#

I mean just click the arrow thing on it and show it.

#

Density feels low.

steady night
maiden wadi
#

Does it help if you bump the density on that up to like 10?

steady night
#

i mean some i guess but not alot

maiden wadi
#

From your Alpha on the texture to the far left. Multiply that by like 3, and then do a saturate, then plug that into the Add.

#

If that helps, your texture needs a better alpha probably.

#

Leave the Density at 10 for the moment too.

steady night
#

i mean its better but looks cl umby

maiden wadi
#

Yeah. So you'll probably want to work with the radial gradient to make sure only the edges are blurred. And then fix that texture's alpha maybe. Unless other rendering settings help there. Not used to world style mats, I usually only handle them in UI.

#

Unlit maybe too. Seems shiny

steep sonnet
#

don't understand why this doesnt work, i am trying to make it so that my movespeed is impacted by the slope im moving on, it should print +1 when going downwards and -1 going upwards afaik but it is always at 0 regardless of a slope

maiden wadi
#

Doesn't CMC have settings for that already?

steep sonnet
#

i think theres only max angle you can walk on

maiden wadi
#

Yeah. Looks like. But uhh.. Code wise I think you'd want to compare something more like... Floor's Normal to like... VectorUp? The further away from 1 it is, the more of a slope it is.

#

Well, fair that only helps to tell if you're on a hill. Velocity might help with the rest. You could use the VectorUp test to see how hard to slope is. And test Velocity against the flattened direction of the slope's normal to dot against the flattened normal of velocity.

steep sonnet
#

now it seems to be doing up to -/+1 kinda

#

with up vector, idk if i was doing something wrong but it only went to 0.85-something even on a very steep slope

icy imp
#

For my RTS camera, I am using the common approach with a pawn with camera and spring arm. I have a check for when the camera exceeds the bounds only apply the movement input and if it in range. This works fine for when the camera is moving slow. I have an acceleration on the movement and when moving quickly, it allows the movement outside the bounds. Any suggestions?

manic fulcrum
#

Is there something that resembles an interface but for event dispatches? Interfaces promise that the target object contains a function that can be called, it'd be great if something similar exists for event dispatches that you know that something can be subscribed to without knowledge of the full class.

thin panther
#

Interfaces don't promise that the function exists. They just don't crash and burn when it doesn't.

There's nothing similar for event dispatchers though, set up a base class for it, or you could possibly do something with interfaces to bind the dispatcher

dark drum
thin panther
#

I'm not sure, that's why I said possibly :P

It wouldn't surprise me either way tbh

crimson briar
#

Binding needs to know the parameters of both sides, so I don't think there is a way around it in blueprints

frosty heron
thin panther
#

Huh?

frosty heron
#

I thought I get linker error when I inherited from interface but didnt implement a function.

mental trellis
#

Well you have to implement pure virtuals.

frosty heron
#

Hmm I see

thin panther
#

Oh you misunderstood. I'm saying an interface isn't a promise because you can call an interface on an object that hasn't implemented it

#

But yes if it's a pure virtual you have to implement it as mentioned

frosty heron
mental trellis
thin panther
#

Well that's just nice and wonderful

#

We love it

frosty heron
#

I dont know somewhere on my brain. My teacher said interface is like a contract.

#

That made me believe that they have to be implemented but np. Just misunderstanding.

manic fulcrum
#

Via Blueprint, doesn't default C++ code get generated? What happens when you call something that returns a value, wouldn't it return the default value for the retrun type?

thin panther
#

Blueprint doesn't generate any c++

#

Blueprint is it's own language, it's just built with c++

#

Kinda like how python is it's own language, but it's made with C

#

I'd assume if it was an object ref you were returning it would be null. But as for any other type, good question, not sure how bp handles that.

I'd probably opt to be safer anyway in all cases by checking DoesImplementInterface

thin panther
manic fulcrum
#

Yeah, I think when in Blueprint land it just creates a default bit of Blueprint, I suspect it wouldn't just stop the execution flow. 🤷‍♂️ 😄

I've decided to go the route where both side have an interface, it's just not as sexy.

icy imp
crimson briar
# icy imp I did try clamping in Tick for the camera, but it was very jerky,

I don't know how people do it, but an idea: when applying input, check if it is over the border. If yes, zero the input and continue to next step -> if input is zero and location is over the border, interp to the border location.
It should look like the player goes over the border, but then can't continue further and the camera slowly (or quickly) goes back to the limit. It should look better than just clamping.

narrow sentinel
#

@dark drum so got a question which is i'm on the pt 10 over your series and I've come across and issue where you go through transferring items between containers and saving them and loading them. I have an issue though where if I say transfer item from container A to B and the all containers save their inventorys and then exit and go back into game the item now in Container it was transferred to seems to have issues loading because i'm having to bridge a gap between cpp and Bps

#

would there be a way to save a soft class reference to the specific class which that bp derived class is ?

#

so when cpp goes through loading the items into the container it can set correctly stuff like the name, the Object etc

faint pasture
#

For an RTS cam there's no reason not to just do your own movement, then you can enforce bounds trivially

narrow sentinel
#

so figured out my issue, somehow in the cpp code I was loading the base class and not the bp derived versions

dark drum
icy imp
narrow sentinel
#

yeah took a bit of looking at what I was doing but yeah I was loading the UItemBase class rather then pulling the BP generated cpp derived one

#

at least I think that was the issue and fix, will soon find out

faint pasture
#

don't check then disallow movement, do the check when actualyl updating position

#

a character isn't disallowed from walking through a wall by disallowing input when overlapping the wall, they just aren't allowed to have their position updated to be inside the wall

maiden wadi
# icy imp I am doing my own camera movement and bounds are not hard to detect. The quest...

In Atre: Dominance Wars, we just use the movement component's tick to check if it's outside of the gameplay bounds box. Reset it to the closest point on the box.

FBox2D GameplayBounds = Generator->GetMapGameplayBounds();
FVector2D CurrentLocation = FVector2D(GetOwner()->GetActorLocation());

if (!GameplayBounds.IsInsideOrOn(CurrentLocation))
{
    GetOwner()->SetActorLocation(FVector(GameplayBounds.GetClosestPointTo(CurrentLocation), 0.0));
}```
icy imp
narrow sentinel
maiden wadi
narrow sentinel
#

do you in your series at all change this to use something like a guid as the key or something like that ??

dark drum
# narrow sentinel so may have found something a bit a miss in your series. When you make add the r...

I don't no. The items don't have stack limits so there'd only be one of the class type. If this is something you need you would need to make the adjustments yourself to account for it.

Using a GUID is a good option. You'd just need to make each item object have one, and as you said, you'd be able to use that as the key instead. The value would then be the item class and the mutable data. (Might have to make a custom structure for it)

narrow sentinel
maiden wadi
#

Go C++ and just save pointers. 😄

dark drum
narrow sentinel
#

wrong channel apolls but below is what I have which is interprated from obvs the bp code you put together

TMap<TSoftClassPtr<UItemBase>, FString> UInventoryComp::GetSerializedDataAllItems()
{
    TMap<FGuid, FItemSaveMap> LocalMap;
    TArray<UItemBase*> AllItems = Inventory.Array();
    
    for (UItemBase* Item : AllItems)
    {
        if (Item)
        {
            // GetClass() returns the specific BP class at runtime, not the C++ base
            TSoftClassPtr<UItemBase> ItemClass(Item->GetClass());
            FString SerializedItem = Item->GetSerializedData();
            // ... your logic to serialize the object to string ...
            LocalMap.Add(ItemClass, SerializedItem);
        }
    }
    
    return LocalMap;
}
#

the main issue is when you add to your local map in your series you are only adding one type of class for the 3 items in the world so it works fine. however if you have picked up multiple items say bottles which are all from a ItemBottle class when you add to the local map it overwrittes the previous one added cause they are same itemclass in terms of the key even when taking the class into a soft class ptr

#

there should be a channel setup for where Bp and Cpp branches over 😆

maiden wadi
#

People in the BP channel don't mind C++ as much as people in the C++ channel mind BP.

dark drum
narrow sentinel
narrow sentinel
#

which when it gets to that function in the cpp above is when the map doesn't add each one on as a unique one put overrides previous ones cause the keys will be matching and not unique

dark drum
narrow sentinel
#

that is whats happening

#

which was the reason for suggesting a change to using a guid or something for the key as it's defo gonna be unique for every item regardless of the item class object

maiden wadi
#

He isn't merging the items like you are, so he has multiple of the same type.

dark drum
narrow sentinel
#

well its more so some items I'm not gonna merge as for some stuff they will be a singular so a Fuel canister you'd have one and then another etc

#

where a ration pack you might have 4 rations in one item as it were

dark drum
# narrow sentinel well its more so some items I'm not gonna merge as for some stuff they will be a...

I would just add a GUID to the item base then you can do something like this for fetching the data to save. It's not much different from the original. You need to remember to generate the GUID on the item object when one is created.

Just be aware, it might also be worth adding an additional variable as well that stacks if an item can stack at all and then update the logic in the add item function.

narrow sentinel
#

oh no wait I'm mis reading

dark drum
dark drum
steady night
#

hey how do i unbind the F1,F2,F3 key in the editor -.-, im using those keys ingame but in PIE im changing visibility status etc.... cant find where to unbind those

gentle urchin
#

if you hold shift, you dont trigger unreals iirc

#

but it'd be in editor settings -> keybinds

steady night
#

its not tho

#

these are all on F2 for instance

#

none is related to "show stuff"

icy imp
gentle urchin
#

e.g. playercontroller 'suggests' to camera manager to move in a direction. camera manager validates the input

unborn anchor
#

Trying to implement local multiplayer but when I add a new player their screens look like this. Any idea whats going on?

steady night
#

try removing it and test

unborn anchor
#

same thing with it off 🙁

steady night
#

hmm i dont remember but i had that issue once before it had something the pp or some lightning settings or sum

#

try removing all lightning in the level and se

unborn anchor
#

okie dokie ill dig around

#

found it

#

this setting was set to the Screen Space (Beta) selection, when its on none the problem goes away

midnight night
#

guys, I just started UE 2 weeks ago and I'm trying to add force to the Offroad Car, so it has a lot less air time so I tried to do this, it's not working 🙁
what's the right way?

normal raft
#

i am here

#

if you hover the error we can see what it said

#

also visible in the message log

#

i didnt want the whole planet rotating thing

#

so i went for a material

unborn anchor
#

Im trying to make it so the UI for each player is referencing each players unique stats, right now Player 1 controls everyones HUD.

#

how do I correctly make it so each players HUD is tied to their specific stats and not just player 1's ?

#

this is my code for setting the player pawn in the HUD Widget BP, I know I probably would need to specify which index for the player pawn but I cant figure it out

faint pasture
#

You can just get the game mode, start with that

#

then each hud needs to know WHICH pawn it cares about, not just the first one in the array of all pawns

#

Hint, HUD can get to owning playercontroller, and playercontroller can get to its possessed pawn

unborn anchor
#

Ok I got it working, each player shows their own stats on the HUD, Thanks!

#

is this proper? ⬇️

faint pasture
unborn anchor
#

just left over I guess, didnt know I could cast to directly off the get controlled pawn. Got rid of the controlled pawn var

frosty heron
#

Game mode will be null on client, you will not make it to the first cast.

#

Also client only know their own controller as well.

#

If you test with clients you should get a bunch of null error

#

"Player 1 controls everyone HUD"

Also misunderstood. Each machine gets a HUD , they r not replicated.

Players will only know their own HUD and no one else.

If you need Player to know the state of other players, you will need to get the data via replicated actor.

For Player stats, player state is a good place.

unborn anchor
#

at least for what I need it to do, im not making this an online game

frosty heron
#

@unborn anchor ohh didnt c its a split screen. Thats pretty much single player. Yeah you do be fine then.

rigid bay
#

Can someone tell me why my breakpoints aren't working? When I put a breakpoint on the node circled with a check, the breakpoint fires, but when I put it on the one circled with an X, it doesn't.

next hollow
#

Just to check random weirdness.
Have you put a breakpoint on both at the same time?

rigid bay
#

I can. Gimme a sec

#

Okay... When I put a breakpoint on both, neither of them fire.

next hollow
#

lol

#

Make sure you aren't debugging something in that top-middle, dropdown.

#

Else, it'll block the breakpoints, cuz the thing its debugging has likely expired.

rigid bay
#

I'm not, and now the first breakpoint isn't firing.

#

I'm doing something wrong, too bad I'm as sharp as a rock to figure out what it is.

#

Okay I figured it out, Now I have a new problem. Is there a method to interpolate an integer that doesn't use a timeline? I'm using a Widget in this code, and I don't think a timeline can be used/I don't want the interpolation to be based on a timeline.

next hollow
#

You can do manual interpolation with a timer, or tick.
But, yeah.
No automatic timeline, like method exists for widgets

rigid bay
#

If I set the interpolation speed to 1, it works, but when it's higher, it starts skipping numbers, and misses the mark it needs to hit. I should probably change the branch condition from equals exactly to greater than or equals to. That should fix the issue, and allow me to change the interp speed.

faint pasture
rigid bay
#

Yeah, that's what I've been doing, but the branch check before it was set to check if the value equaled another value exactly, but because the interp speed was higher than one, it caused it to skip numbers, passing the equals exactly check. I set it to greater than or equals to, and that fixed it.

faint pasture
#

You don't need to make "if far from target, move towards target", just make "move towards target"
If you're already there it'll do nothing.

rigid bay
#

The problem is, that value is set to character experience, and when the value hits the value to level up, it needs to reset the progress bar, so I need something to check to see if the value is at the value to level up the character.

deft pivot
#

If i'd want the player to slow down from the starting point, have movement reduced as if walking over a ledge and regain speed once exited the area, would you guys suggest a trigger box and edit the BP there or some other way?

coarse condor
#

Earlier today my OverlapSphereActors were working just fine. Closed out of the project and reopened it today, now none of the OverlapSphereActors are working. I'm very confused of what could even be causing this.

tidal ridge
#

hey guys, is it true that blueprints in unreal engine breack games?

next hollow
#

lol?
Never heard this?
What do you mean?

harsh nebula
frosty heron
quaint fable
#

hey there! I was just wondering what I could use to create a loop? I tried DoOnce but that doesn't seem to work. One second and I'll show screenshots of what I tried

#

I wasn't sure if this should go here or go in Paper 2D. I'm working in Paper ZD using the Paper ZD character blueprint. The animation sprite I'm working with has 500 frames, so to cut back on CPU usage, I divided it into 5 different animation states which each have 100 frames. I'm trying to make it so that when one animation finishes, it transitions seamlessly to the next animation, so I just used a delay of 4 seconds since there are 100 frames at 25 frames per second.

It transitions just fine since I use a boolean variable to let the Animation Blueprint know when to transition into the next animation. When I try to loop it back to the first animation after the 2nd animation is complete (to test if it works), it does nothing. Is there a different function I should be using? Also, this is all being done within the animation blueprint event graph, and then I use a state machine to communicate with that and the animations. I created a variable called "Reset Loop" and tried checking if it's true as the rule for transitioning back from the 2nd animation to the first.

#

oh I should be using a For Each Loop huh?

#

well, a for loop I think?

narrow pulsar
maiden wadi
frosty heron
maiden wadi
#

A game like Fortnite having 34562547894 BPs for random little things or abilities, or etc is understandable. Very designeresque. You're still going to see a lot of core C++ though for sure.

frosty heron
#

For me always core in cpp.

Anything high level or scripted territory can go to bp.

#

Soo far dont have spaghetti. Every bp probably made of 20 nodes at most.

sand shore
quaint fable
quaint fable
# sand shore You ever set any of those bools to false?

I couldn't figure it out so I just increased the resource pool to 8GB in the console command. There's only one sprite that will have that many frames so I think it should be fine? But if there's a better way to optimize this that would be great

frosty heron
#

Doing 2D in unreal sucks

narrow pulsar
#

I'm going insane but essentially it's messing up the variable reset state because of running twice for some reason

frosty heron
#

How many instance r u running?

#

If this happend when you only run on instance, perhaps you may want to look at your montage que type or w.e thats called.

#

Also confirm with print string if both actually fire, disregard the wire.

narrow pulsar
#

yep both fire

narrow pulsar
#

oh you mean combo stuff

frosty heron
#

Show how the event is called / binded.

Then go to montages that you bind detail panel and check the montage que / tick type.

frosty heron
#

Show the code where you broadcast it

narrow pulsar
#

you mean this?

frosty heron
#

Damn that looks cooked as f to me

#

Especially with delay

#

First of all you are relying on 2 replicated variables.

narrow pulsar
#

they both get updated at same time in the same place

frosty heron
#

And in multilayer theres no guarantee if both replicates to client when needed.

narrow pulsar
#

ah i see what u mean

frosty heron
#

I dont know man, with packet lost and all that. It looks cooked.

#

You may get away packing them with struct

#

However when it comes to attack you want to client predict the action.

narrow pulsar
#

this is for AI not player

frosty heron
#

Then you dont need to replicate those attack index or enum.

#

All the client needs to know is the montage being played.

#

You handle the entire logic server side for A.I.
Client simply play the montage that gets replicated.

narrow pulsar
#

yea im gating everything behind authority and I dont call any server rpcs so I dont think this is gonna fix the issue im having but I do appreciate the tips, will change those now

frosty heron
#

Yeah totally not why the function gets called more than expected

#

I can't pin point from here without debugging.

There are times where things get called twice on montage though.

Something to do with the montage tick / que type.

narrow pulsar
#

hmm if I dont replicate the index it seems like the AI just spam the attack that's on index 0

#

always

steady night
#

Hi i need tips

my inventory got 14 pieces with each piece a "itemstats" struct how is the best way to combine them all right now im using a function to just add all of them but it will be 500 lines to combine them all Advice needed!

crimson briar
steady night
#

exactly....

crimson briar
#

Separate the behavior in a function

#

Make a funciton to add one struct to another and return the second one

frosty heron
#

Why aren't they an array?

steady night
#

oh lol i just did an array...

crimson briar
#

Then make another funciton with a loop. Loop through the structs calling this first function with the sum struct and the next one from the loop, assigning the result to the sum struct

steady night
#

so simple..

#

had a brainfart

crimson briar
#

Yeah

midnight night
#

hey guys, can someone help me to make Downforce for a car? I'm trying with ChatGPT, but it's all lies.

I'm curently here...it's probably BS...not a BP 😅

quaint fable
cloud token
#

Chatgpt only takes information available on internet already. Its like you research yourself but this takes just few seconds.

midnight night
#

yeah, I've been trying to make SOMETHING with it for days now and nothing works. I can't find tutorials on the subject either and yeah, I feel stuck.

crimson briar
#

The more niche the question, the higher the probability for getting hallucinations

cloud token
#

Should be easy to find information about it though

midnight night
#

I thought so...but nope 😄

maiden wadi
midnight night
#

I used Gemini 3 Pro and it gave me step by step perfect tutorial on absolutely everything I had to do...and it worked...I'm mind.blown.

it made only one very small mistake and it fixed it fast and pointed out the dynamic nature of the nodes and context sensitive stuff

crimson briar
#

Hm, I don't know which movement you use for cars, but aren't there settings in the movement component to tweak how it behaves in the air? There are in the CMC at least.

midnight night
#

I'm like 2 weeks into UE so I don't know. I've watched, read, asked...and I never got an answer. All the videos and articles tweak the same settings and never mention air behavior. I tried searching and reading through all of the values and couldn't find it. I knew tweaking world gravity wasn't IT.

frosty heron
quasi folio
#

Hi everyone. I'm trying to run an audio file in runtime using media player, but for some reason, I can't seem to open the file. I'm using this forum post as a guide and so far I've got this setup in my Actor blueprint. https://forums.unrealengine.com/t/is-it-possible-to-dynamically-import-files-i-e-wav-during-runtime-using-blueprints/326723/20 - Can Play URL always seems to return false, however. Test filepath is currently set to D:\LauncherAudio\Xenoblade2.mp3

Epic Developer Community Forums

Yes, you can load .wav (and other media) files dynamically at runtime using only blueprints. This will work both in the editor and in builds. In the content browser, create a “Media Player”. Open it and ensure that “Play on Open” is checked. Create an actor blueprint and open it. In the “Components” pane of the blueprint (...

maiden wadi
# midnight night I used Gemini 3 Pro and it gave me step by step perfect tutorial on absolutely e...

While I'm not a fan of GPT and I'll criticize it any chance I get, if you prompted it with the same information you've put here, I can understand why it didn't give you good answers.

Downforce in relation to a car is usually the push down from the car moving forward and having air force the car to grip the ground better with that force.

What you're describing as needing is just more mass or a heavier gravity effect. Your asking for downforce here is confusing.

That said. I'm not at all surprised Gemini gave better answers. I personally prefer Claude, and people have praised Gemini as well. None of them will be ultimately fantastic with blueprints though. The node based design makes it much harder for an LLM to contextually follow than basic code. You might benefit more by asking it to write out what it expects you to do in written out pseudocode and try to make blueprints based on that.

midnight night
# maiden wadi While I'm not a fan of GPT and I'll criticize it any chance I get, if you prompt...

you are right, downforce is not the right term, but again, GPT gave me that term. I was asking it how to reduce air time and that's one of the methods it suggested, adding downforce with nodes.
but it's also on me, because I'm not at all familiar with car terminology, especially in English what means what and does what, so yeah.
I found some amazing blueprint series on youtube, but they're like 20, each 1 hour long, so it will take some time to watch and remember even 10% of the information. I guess I'll combine learning and Gemini for now, so I can slowly make progress on my project while learning.

maiden wadi
#

Haha. Go through them anyhow. I did the same thing with a little city builder when I started. Went through it a few times. My first time through I was just blindly copying the same nodes. Second time through I actually paused it and tried to look up and understand what they were doing. Took me like three days to fully realize that an enum was just a named number. The practice is good though. Familiarity is the greatest teacher.

frosty heron
#

Some time some problem came too soon for me.

#

But there are like 4 or 5 other todo list. Imo its fine to work on something else when you get stuck on one.

maiden wadi
#

For example I have this file in this folder.

#

And to get it true my URL is file:///D:/AudioTestFolder/2026-01-05 21-28-20.mp4

#

Though it does work with two / as well. Which makes me wonder if you have your media player set in the component.

icy imp
icy imp
maiden wadi
# icy imp <@143471961723371520> I would like to inquire what you are using for camera. Ar...

I meant to get back to you on that earlier, got side tracked. But I did notice those little stutters you mentioned before. I had to clamp my FPS to 30 to fully notice them though.

To answer your question though, yes. It's a Pawn same as yours with a spring arm and camera.

It has a camera component I subclassed from UFloatingPawnMovement to negate any time dilation on it originally and added that bounds correction to. Later I'll most likely override it's consumption of movement and just do the math that keeps it within the bounds rather than relying on the corrections.

#

If you're in BP only, I'm not sure how I'd approach that. Movement components are a kind of C++ area for their overrides. If you are BP only you could probably attempt a Mover solution. It exposes a bunch of BP stuff for movement.

icy imp
#

@maiden wadi Thanks for the reply on this. Would it not be simpler to have a blocking volume that blocks the pawn?

maiden wadi
#

Probably. In a hand built world I'd say yes as long as your level designer is 100% aware of this. But I personally have to assume this camera can be placed in dynamic places, even in pocket worlds. And I don't want to have to follow designers around making sure they've placed camera blocking volumes. Our maps are 100% procedural and change size, plus we have some subworlds that are way off to the side of the main map, etc. So it gets complicated.

icy imp
#

Makes sense. I tried adding a blocking volume, but the pawn went right through it.

maiden wadi
#

The root component of your Pawn needs to be a primitive with collision.

#

Most likely you'd want to make a special CameraMovement collision channel that your volumes use and your pawn's root component blocks. That way it doesn't interact with anything else in the level

icy imp
#

That did it!

#

My levels are dynamically built, but I can set the blocking volumes

faint pasture
#

If you want downforce, just add force, down

#

Tick -> addforce(Car.UpVector * SomeNegativeNumber)

#

There's more to it but get that to work first.

still wigeon
#

I have a persistent level, with a few level instances added. Those Level Instances stay loaded and are not streamed in and out. I created this BP_GraphicConfig to try to pass some values to blueprints in the level instances, but this does not work, liklely due to the get all actors of class. Any suggestions on how I can communicate to the actors in those level instances

surreal peak
#

What is BP_GraphicConfig?

still wigeon
surreal peak
#

Does that need to be an Actor in the scene?

still wigeon
#

This is the actor in the Level instance that the interface call should be going to.

surreal peak
#

Are you using BPI_Animators on anything else than BP_Animators?

still wigeon
#

I have a BP_Animator in each of the Level instances to turn on or off tick on some actors.

And was looking to just globablly send to each of those BP_Animators, from the persistant level.

surreal peak
#

I would suggest you create an ActorComponent instead of that BP_GraphicConfig, unless there is a need for it to be an Actor, and then put that Component on your GameMode or GameState.

And then you use BeginPlay of your BP_Animator to get the GameMode (or GameState), cast it, get the Component from it, and add the given instance (self) to an Array.

Then the Component has an Array of all current and future instances (can use EndPlay to remove from Array again) and it can call stuff on it.

still wigeon
#

Ok so basically register it with the game mode, gamestate or subsystem.

surreal peak
#

There is no need for GetAllActorsOfClass and there is no need for the Interface if it's the same class anyway.

#

Yeah

still wigeon
#

Understood yeah less expensive and more direct.

chilly root
#

Can any one help with line trace by channel not hitting simple sphere shape?? I have tried everything i can think of and noting works. Line trace succesfuly hits landscape and the default floor mesh but nothing else i place from the default or modeled shapes.

frosty heron
#

Is that your own mesh? Have you checked if it has collision?

chilly root
#

wait, here it's set to ignore.. my bad, but still.. it's set to block now and it's the same

frosty heron
#

Show your line trace code

chilly root
surreal peak
#

Can you please double check that this mesh actually has collision?

frosty heron
surreal peak
chilly root
chilly root
royal vale
#

Can someone point me in the right direction for something im running into .

Im running my game in editor via standalone mode . When i move the game window around the screen ( left mouse click the top bar of window and move around my mouse) , my game essentially pauses (stops ticking) tmk. It seems like this may be default behavior , how can i get my game to continue to run im the background and not pause when this occurs .

(Not BP specific , just don’t know exactly where to ask this )

surreal peak
frosty heron
# chilly root

If you click on the static mesh comp, does it show the same setting?

#

Because it look okish from here

surreal peak
royal vale
chilly root
surreal peak
frosty heron
# chilly root

What if you dont change the scale soo much. Try to place default sphere with blocking channel to camera ground without editing the scale

surreal peak
royal vale
crimson briar
#

Wasn't there some weird interaction with simple sphere collision and scaling the sphere non-uniform?

frosty heron
#

Probably want complex collision for that particular case.

#

But try to see if default shape simple collision block at all

frosty heron
#

Can't have too many edges

#

Look at the collision doc

surreal peak
#

I think you can't non-uniformly scale the simple sphere collision body.

frosty heron
#

Complex collision is more of per poly. Much more expensive.

chilly root
surreal peak
#

Na, the mesh, not the material, but nvm

chilly root
#

so the only thinkg i can do is either have very simple shapes or expensive complex collision?

frosty heron
#

Well what r u trying to do? Why do u want a flattened sphere as a floor?

chilly root
#

i want to do a line trace so the camera actor can follow along hils and valleys etc and ignore small items and characters

frosty heron
#

Hills and valleys would be the landscape though

chilly root
frosty heron
#

You shouldnt have issue hitting the collision of a landscape

quasi folio
#

Not sure how you made yours work then.

frosty heron
#

I can run mp4 with the media component

#

Plays movie

chilly root
crimson briar
#

Also this problem applies only to spheres and capsules. Squares and other shapes scale okayish

#

Sphere collisions are a center and a radius to the engine. This is why they can't be scaled in a non-uniform way

frosty heron
#

Create land scape and dont over think it.

surreal peak
#

May I note that collision isn't limited to the basic shapes. 3D models usually have custom convex collision if they need to.

chilly root
crimson briar
#

Yup. You can also use multiple shapes for one object (like adding two simple box collision for a cross shaped mesh). Not sure if it impacts performance in any way though.

chilly root
royal vale
surreal peak
#

I rarely ever move a window or play in window mode to begin with, so I actually can't say.

next hollow
#

New world exploits. 😛

slim prairie
#

My landscape grass type is showing on every layer. I want it on the grass only. How do I fix this?

sage glacier
#

Hey guys, anyone got any good animations for sword fighitng or way to get them?
making combat similar to mount and blade

narrow pulsar
#

Opinions on a behavior tree like this? Is there any improvements you might suggest?

#

UpdateAttackDecision picks the next attack & gets the range the AI needs to execute it

RangeCheck checks if it's within range & updates "CanAttack"

If within range -> Attack -> UpdateAttackDecision again
If not within range -> Move to range -> Check Range Again

If no target set -> Idle / wait / Roam

lean schooner
#

we cannot use Named Reroute in normal BP graphs yet right? just in materials?

knotty falcon
#

I have a probably pretty simple bug in my game I was hoping to get some help with. I have all the blueprints a screenshotted uploaded and nicely organized. I’m just having an issue with the order in which I’m assigning variables and stuff leading to some unpredictable results. I’m happy to compensate you for your time

maiden wadi
lean schooner
maiden wadi
#

You can always make a custom event. for it if needed. Though honestly I can say that I've been doing this professionally for quite a few years now and any time I've ever even thought about using a ForEachLoop with break, you almost always want to actually make a function with a normal loop that returns early with whatever value you were trying to do something with.

maiden wadi
knotty falcon
maiden wadi
#

Lol. No one's said anything in the last half an hour. You're not really taking over the chat. It's very common here to throw a wall of test and a dozen images out to express an issue.

knotty falcon
#

lmao okay.

I mean the concept is simple, you control a bp_cube and try to stack it on top of another bp_cube. Once you stack it, you lose possession, your ok cube stays there, and a new controllable bp_cube spawns off to the side again. You now have to stack that cube on top of the other 2 stacked cubes and so on and so on.

The issue is, I use a bp_stackzone to act as a trigger to recognize when the controllable cube is in the zone. When a player scores/stacks in the zoneIt’s supposed to then respawn on top of the new goal cube giving the player a new zone to land in. The issue (I think) is the order at which im storing references to the controlled cube or the goal cube, and what’s happening is the bp_stackzone is spawning over the newly spawned control cube vs over the recently stacked block.

I have screenshots of all the blueprints. The only blueprint I didn’t mention here is a bp_gamemanager which handles most of the logic of the game.

https://drive.google.com/drive/folders/16wIKZH0-aokVIFA5Qfk8NG4ViPMytwDF

#

It works and spawns in the right spot on event start, it’s just after the first time it needs to be destroyed and respawned it isn’t spawning in the right location

#

I also included a screenshot of the viewport when I start the game, as well as a screenshot showing the trigger zone spawning in the wrong place after I score one cube

sand shore
#

taking over this chat with a bunch of images.
Could make a lil thread for the context

#

Having opened that gdrive folder though, I get it, that won't easily translate to discord

knotty falcon
#

haha i just wish there was an easier way. would be cool if there was a plugin that could export a screenshot of your entire event graph. Thats why im willing to throw some money at someone

sand shore
#

blueprintue exists but it doesn't really help with properly structured bp

#

really good for huge event graphs tho

knotty falcon
#

ive spent 15 hours trying to solve this issue (granted im only a year in on UE) but I just have 0 people in my life that I can ask any of these question. This dev shit can be lonely and send you spiraling in your own brain lol

sand shore
#

nitpick: I always use different names for stuff like this

knotty falcon
#

totally valid. I was at that stage where I was rage coding and just trying to get smoething to work when i did that I think

#

I got most of the way and tried to use ai to help and i think it just put my project in a worse position then it originally was. Think i might just need to start from scratch. for the 3rd time lol

sand shore
#

Well, how familiar are you with debugging / the debugger @knotty falcon ?

knotty falcon
#

im familiar just in the sense of putting a print string on everything to try to figure out where my issue is

#

but maybe we are reffering to different things

maiden wadi
#

Hmm. Not seeing how that is possible unless the finished timer thing triggers afterwards. like running twice. First spawning the new cube, then triggering again and moving the spawn thing somehow.

sand shore
knotty falcon
#

ok actually yes I am.

knotty falcon
#

it almost has to be, because when i init the scene in the gamemanager, i call 'spawnnewstackzone' and everything works fine

#

so its something in the scoring/timer i would imagine

sand shore
#

I would think multiple calls into the stillness check from the timer would be protected by the state of the candidate overlapping variable, but I wonder if there's some weird interaction with spawning the new stack zone directly touching the old controlled cube?

#

Diagnosing the specific issue here is going to be a lot easier with the debugger than just tracing screenshots, though - which is why I asked if you're familiar with the debugger. You can just set breakpoints everywhere haha and see the order and frequency of calls, you can step over or into functions, it's pretty great.

#

If you're not wanting to practice debugging, if you're just looking for something to try to get any amount of traction, I'd suggest fully moving the possession of the new cube (and assignemnt of the controlled cube variable) to be before updating the new goal actor and spawning of the new score zone

knotty falcon
#

I appreciate your input

#

I will dig into that

knotty falcon
#

but also let me know if your looking to make a few bucks and ill send the project over to you lol

#

im so frustrated its going to probably be a few days before i can open it and look at it again

faint pasture
#

Since you're running the whole logic through gamemode, just make stack zone a dumb thing. Also no need to respawn it, just move it.

#

have gamemode keep track of which cube is which. It should have the current target cube, and current possessed cube

knotty falcon
faint pasture
#

Hell you can do the whole thing without a stack zone

knotty falcon
#

Initially i tried to use a zonecollision that was part of the cube and reposition that but i was having the same issue as i am now. but i switched to this verison basically because i thought it would solve my original issue

faint pasture
#

Tick -> if PlayerCube.Position is in the valid stackable range vs TargetCube.Position, and PlayerCube.Velocity < SomeNumber -> call Stacked

Stacked -> PlayerCube.DisablePhysics -> TargetCube = PlayerCube -> Spawn actor -> PlayerCube = SpawnedCube -> have controller possess PlayerCube

#

valid stackable range being if x distance is < somenumber and y distance < somenumber and Z distance is positive

#

you can also move the collider around but I wouldn't even bind to events, just tick/timer to check if overlapping AND if velocity is near 0

knotty falcon
#

or instead of Z distance positive could i make the required zdistance be the target cubes half height? because i worry about being able up next to the cube

#

instead of on top

faint pasture
#

if x and y are below some number and z is positive, it's above and somewhat aligned

#

but sure keep using the overlap area if you want, just remember to move it on Stacked

#

I'd make it small so the only way to overlap it is to be surface to surface stacked

knotty falcon
#

i honestly would probably prefer to not have the overlap zone

faint pasture
#

I wouldn't even bother with events, just tick/timer check if overlapping AND if not moving

#

ok then yeah do the positional check

knotty falcon
#

ok got it. im gonna give this a shot right now

knotty falcon
#

this already feels so much easier

knotty falcon
#

hahah. im pretty sure i just enjoy pain at this point

narrow pulsar
#

lmao I came across the weirdest bug to date no joke

#

this prints every single ability besides the 2nd one

#

and the last one prints just fine then prints an extra time as empty

#

but it performs the second just fine even though it doesn't print it

#

and the last one doesn't do it even

icy imp
#

I am trying to project the screen view onto a mini-map. The camera is angled. I am using this for the coordinates, but the values are not correct.

steady night
#

Hi Question, i have this asset with a full body skeletal mesh, but i also have a seperate part for the arms only, is there a way to use the arms to make them remove the arms on the full body asset / hide ?

knotty falcon
#

why do you want to use the arm asset vs just hiding hte asset on teh skeletal mesh?

steady night
#

well i got some arm cloth armor that clashes with the arm so i have to hide the arm when i equipp it,

knotty falcon
#

ok so last question i have now that i got everything working. I have a camera that is supposed to smoothly track the controlled cube up or down on the z axis (which it does) but my only issue is little micro stutters and shakes. Im assuming i need to do somethign to the actual z value vs just smoothing after the fact. anyone have any advice?

knotty falcon
knotty falcon
steady night
#

if i use the full body mesh and apply the armor then it collides

knotty falcon
#

open up the skeletal mesh and hide the arms.

#

hide the bones*

steady night
#

but the skeletal mesh is thw whole body, i need to remove the arms from the whole body and use the arms seperetly

knotty falcon
#

you can hide or unhide bone by name

steady night
#

hm hide the bones.... how do i do that xD+

#

hmmm dident know u could do that ./

knotty falcon
#

you can do it in the skeletal mesh or do it from blueprints. the terms i would google is "hide bones on skeletal mesh". theres actually some great tutorials based around how to use armor or clothes on an existing mesh as well.

skeletal meshes have a lot going on and i would reccomend just spending time learning about them. If you are going to use that armor in place of the arms and hide them, it needs to be rigged the same way that the arm is or you will run into issues

#

the armor doesnt know how to behave and deform when its bent and moved like the arms do.

steady night
#

yeah i got that covered

#

its just i always had seperet skeletal mesh assets for parts that i show/hide

#

dident know u could hide bone like this

#

this would have saved me hours of work xD

#

ty

knotty falcon
#

👉Get The RPG Inventory Course : https://bit.ly/4cSYsBh
👉Get My Free Unreal Engine Beginner Course : https://unreal-university.io/freecourse?video=sF8rcYWCC94

👉Armour Models : https://bit.ly/3zrKl73
👉Community : https://www.unreal-university.com/community/home
Timestamps
Introduction 0:00
Importing The Armour 0:37
Creating Helmet Soc...

▶ Play video
steady night
#

ty

steady night
#

thats he´s solution...

knotty falcon
#

Sorry I haven’t watched it but I know there’s a video that addresses it. Away from. My desk so I can’t look too hard right now

#

But putting armor on a skeletal mesh is a very common concept so there’s gonna be a ton of resources around it

steady night
#

aye the only way i did it before was to blender the orinial body and seperate it

icy imp
faint pasture
#

since when?

#

I'm guessing it just chooses a weight cutoff and hides the verts there?

steady night
knotty falcon
#

Hah you made me doubt that it even worked from your response

#

Sorry dude

#

Yeah it likely will have to be done in blender then

steady night
#

bah... such a hassle

knotty falcon
steady night
signal bane
#

Within Macros, what does Assign do?
Is it like creating a variable only within that macro?

Figured it out. Needed to define local variables as well

icy imp
#

Correction, I have my projection sort of working. It is supposed to be a trapezoidal shape. The lower right and left corners are proper, but the top right and left seem to extend as far they need to be. What do I need to apply to the world position for these to get the world planar points.

frosty heron
# steady night

Clipping has always been an issue to me. My go to solution atm is to apply alpha on where the cloths would be.

#

Kinda annoying but theres always some skin sticking out otherwise.

knotty falcon
frosty heron
#

Not really, I dont know how others do it but even when cloths are skinned to the character, some clipping can still occur.

It just suck that every time I am setting a new armour or cloth, I have to change the corresponding skin material.

#

And for this reason I dont make my armour system modular. They are just one set.

steady night
frosty heron
steady night
#

ah of. i see

frosty heron
#

if I don't hide the skin like on the left, they will clip.

fading raptor
#

Hello everybody ! I'm trying to look through an array to see if all energy sources are fully charged (checking their boolean) to then activate an interface event to activate elements. But from what I see with my code, it always does the "completed" part but I want it to do so only when all bools of actors in array are true. Can i do so and if yes how ? thx in advance !

frosty heron
#

if false, function will return false.

#

if all check goes through the function can return true.

fading raptor
frosty heron
#

if false return false

#

On Completed, Return True.

fading raptor
#

it works now, thx !

frosty heron
molten pike
#

I'm using hidden=true/false swap between two identical meshes with different shaders to get a shield effect on damage... because changing the overlay material parameters also doesn't seem to do anything. The audio activates on damage, and I've confirmed through print string debugging that all of the blueprint nodes are reached; but nothing changes visually in-game. Any ideas?

steady night
#

Hm setting a value in a struct that a member of an array of structs dosent uppdate it :/?

#

so im my function when im trying to get a value i have to update the make an array in the function

#

if i preset it and change a value in a struct it dosent update :/?

crimson briar
steady night
#

oh.. hmm

#

so the default values has to be set in the array

#

how would i do that?

#

i just wanna save some preformance without resetiung the array each time in the function

crimson briar
#

You update the copy struct and place it back into the array with set element by index

steady night
#

so basicly this would set it ?

crimson briar
#

Yes

#

Something like this

#

I'm not sure though if there is any way to update the original variable that you used to create the array

steady night
#

yeah well this is not working either so :/

#

hmm

crimson briar
#

You probably have a copy somewhere inbetween, show the full code

#

Unless you say it doesn't update the original variables, not the array - then yeah

steady night
#

well this is the whole code

#

and im using it to just combine the structs to a local struct in a function to get the value

crimson briar
#

Set members doesn't do anything there, since you create a whole new struct. But it shouldn't affect anything either, how is the result used though?

steady night
#

struct arry in + local array resault the local array that combines the struct form the input array

#

so not doing anything with it

#

except breaking them and getting the value

#

the set member is for the local array also so not even related

crimson briar
#

Other than deleting the set members and connecting the create struct node straight into the set - I don't see why it wouldn't work

#

Also I got confused by a single variable named Array

steady night
#

the array is the one im comibing all the values to

#

so array of struct has 10 members im getting infrom forom all of them and adding the mto "array" variable

#

to get the combined values

crimson briar
#

Yeah, but it is a single struct, not an array od structs 🤓

steady night
#

ah yeah, its a single one since i just want combined value of the forlooped structs* sorry

#

explaining badly

frosty heron
#

🙂‍↔️ 🔫

crimson briar
#

Anyway, it should work, unless the bug is further along

steady night
#

yeah idnno what the issue is since this is all its related to, and if i update the array in the function it works so something is messing with the set part

maiden wadi
#

Having an array of a struct that is a Key/Float would make this much easier to manage.

crimson briar
#

Did you test if it is the same without set members?

steady night
#

welll the set member is for the single local struct cant be related to this tbh :/

#

but yeah that had no effect either

white parrot
#

Isn't there a way to pass by ref in bp?

#

i'm pretty sure there is

crimson briar
#

In some places there is, but not everywhere

white parrot
maiden wadi
#

As long as you stay in functions.

crimson briar
#

And don't use the variables to create an array

steady night
#

how would i add them otherwise :/?

maiden wadi
#

What is this for? Like adding equipped item's stats to your own?

steady night
#

jupp

maiden wadi
#

In short your items have stats. Your character has stats. You need a function that runs whenever an equipped item changes that refigures your stats.

In the end. When it gets kind of complicated you end up with like...

CharacterBaseStats + CharacterTalentStats + CharacterBuffStats + ItemStats= CurrentGameplayStatsForCharacter

And anytime any one of those things changes you just rerun the function to set up CurrentGameplayStatsForCharacter again.

#

Writing that out makes me love GAS.

steady night
#

basicly yeah, im storing all the stuff in function for each stats so the Tic is going hot

#

yeah i know ppl love GAS ive never used it, since that will make me dumber and not learning anything tbh, i like doing it myself

#

obviously gas is way better but i just prefer to try myself

maiden wadi
#

Not to belittle learning, but at that point you may as well go write your own engine. Cause using UE is the same as using GAS. It's a prebuilt set of things that help you achieve your goals. And I'd even argue that using some of these more battle tested systems helps you learn better.

#

Still. I would start by removing your hard coding. You should do your things in arrays. If a helmet increases strength and armor. There's no need for it to have a dexterity, charisma and hit chance stat too.

steady night
#

hmm that i can agree with

maiden wadi
#

Then your update of CurrentGameplayStatsForCharacter is literally just... iterating over every array to do a simple add based on the attribute key.

steady night
#

i will look into GAS eventually thats for sure but im just not there yet id say

#

but i have it as a backupp

lean schooner
fair pecan
#

Hello friendlies!
Long time since I visited this server but I just gotta ask about this cause its twistin ma head. Currently trying to make the platform turn upside-down when player walks on to the button, and turn back again when button is pressed once more etc. I first assumed that I just put in the value of 180 degrees for the Timeline+AddLocalRotation-node when button is pressed. However, as u can see the platform is twistin like a crazy banana, and inconsistent in where it stops too..what am I missin?

crimson briar
#

You are adding rotation per timeline tick. So each tick it will add the value it gets from the timeline curve at given time

#

On second 1 it will be 32, which is already a lot of rotation to add per tick

crimson briar
#

For this sort of behavior I think lerp would work better

#

I mean, lerp instead of a timeline

fair pecan
#

I should've understood this seeing the Local Rotation Node says "Delta Rotation" but it didnt click in my head I guess haha...thanks for notifying me about it though.

crimson briar
#

But if you want to keep the timeline - either SET the rotation instead of adding it - but it is sometimes weird when crossing a certain plane, but with rotation of 180 maybe it will be fine.
Or make the timeline curve way smaller

fair pecan
fair pecan
crimson briar
#

Yeah, setting rotation might be buggy when you rotate on a specific axis, while other two axis work fine. I don't remember which one was the problematic one though

fair pecan
#

I got it to work concistently now though, albiet without the animation that the timeline added. But I'll figure it out when that times comes! Thanks again for givin me the heads-up and providing valuable knowledge! 🙏

trim matrix
#

if i have an array of actors and i wanna sort them in ascending order along a spline to auto assign id’s to each actor instead of manually having to set each id, how could i do that?

#

i was looping through each actor, and setting their id based on a for loop’s index. but that only worked for some of the actors, the ids would count up to 4 then the one after the 4th would be labled id 10 instead of 5

crimson briar
#

Or some actors are added multiple times, so the second time their id change it is overwritten

trim matrix
#

all i do is get all actors of class add them to an array, use a for each loop then assign an id to each inside the array w a for loop

crimson briar
#

Show the code

lost hemlock
#

im trying to think if there's a better way to do this that doesn't involve tick

#

I have it right now on tick

maiden wadi
#

There's not.

#

You need to move the object every frame. Tick happens every frame. Don't avoid tick for the things you need it for.

maiden wadi
lost hemlock
#

shark. eagle. etc.

maiden wadi
#

If you're having a real performance issue you could move this to Niagara I think.

I'm not sure on the animations or skeletal meshes but you might need to turn those into static meshes using the uhh... thing where you bake animations into texture data.

#

If you only have a few it's probably not worth the effort though. You'd need several dozen at the least I think.

worthy frost
#

cant smooth properly without tick, which is why all movement is done on tick

#

else your shark will look janky moving, might be ok if its far away

#

but you know you can adjust the tick rate? and still use tick, it acts a bit more like a timer then

icy imp
candid oyster
#

How do I make a CHOO CHOO CHARLES like train system?

narrow pulsar
#

how do you update plugins in your project when you change engine version

patent magnet
#

I'm driving myself insane so rather than that, thought I'd ask here see if anyone can help me. I'm making an icon creator for a project, done it before no problem. Making this one in 5.7 (only difference to the usual), set up the blueprint, created the RT2D texture and that's fine, created the material and that's fine, added the material to a plane in the icon creator blueprint and... Nothing. The plane becomes transparent as it should but there's no image being shown, even though the material preview in every place it can be seen is showing the object. I feel like I'm going mad, the answer is probably staring me in the face but I can't see it for love nor money!

patent magnet
#

Creating the static texure from the Render Target still works so it's fine, just weird that the material preview doesn't work

wide beacon
#

hello, i am trying to perform a line trace for an item to drop as physics completely breaks my asset., im using a timeline to animate the drop but the tank just stays in the air where the drone was killed. thanks.

wide beacon
lusty hedge
#

can i get images to stretch up and left ?

#

instead of down and right?

#

they NEED to spawn on the bottom right slot

unborn anchor
#

This is in "On Hit Event" Node.

I am trying to make it so this sound plays faster when I move faster and slower when I move slower. I seem to have it working but in the inverse way. How would I flip the output float around so that big number = small and small number = big?

trim matrix
narrow pulsar
#

how do you update plugins in your project when you change engine version

errant snow
crimson briar
# trim matrix

What even is that. Why do you loop twice through the same array to assign an ID. Either the foreach or the for should be enough

#

I'm kinda surprised you didn't get the same ID on each element though

crimson briar
trim matrix
crimson briar
trim matrix
#

i just wna not have to manually assign the ids for each checkpoint bc courses will have alot of them but ig i can just deal w manually assigning n keeping track of them

unborn anchor
#

somethin like this

narrow pulsar
#

and I know there's a 5.6 version out so yea

errant snow
narrow pulsar
#

dont think so

#

Also any ways to update it when the project is already at 5.6?

errant snow
#

Maybe just go in to the project plugins (if that’s where they are) and delete them and reinstall.
You should figure out where they’re installed I guess.
Sorry I do the engine from source so things work a little differently.

narrow pulsar
#

Wont I lose saved settings and stuff that I'm already working with in said plugins if I delete them then add them abck?

#

its the only worry I have

narrow pulsar
#

I mean, you can always upgrade it to source engine later is what I mean

errant snow
#

Settings should be in your project configs and not in any plugin file.
No, there are other reasons to work from source.

maiden wadi
idle crescent
#

Does anyone know why my remove instance from an instanced static mesh doesn't remove the instances despite the bool saying it did? I am trying to delete PCG instances on runtime, mind you

#

My code. I made the PCG ISM as movable.

#

I'm trying to remove grass from an area on a code execution.

maiden wadi
# idle crescent

For a start. Don't trace. You have a sphere area. Just get the instances from the ISMC in that area.

idle crescent
#

Ok.

#

But, even if I did it that way, shouldn't it remove all the instances the way through a trace too?

maiden wadi
#

Not necessarily. For a start the grass shouldn't have collision. That trace shouldn't hit anything.

Secondly you're not sorting the instances and removing them backwards. If you have 417 instances and you try to remove instances 13 and 17. If you remove 13 first. You're actually removing instances 13 and 18.

idle crescent
#

I want the grass to block visibility, that's what it's doing.

#

What do you mean not sorting the instances?

#

Oh I see.

#

So as one is removed, everything is indexed down?

#

That's why it's better to use the remove instances and get them all at once, isn't it?

maiden wadi
#

Just call GetInstancesOverlappingSphere for gathering them. Then call RemoveInstances with the array that outputs. It'll simplify your code a ton.

#

Also quicker, no physics query.

idle crescent
#

Wait. Is that a function specific to ISMs?

maiden wadi
#

Correct

idle crescent
#

Oh. I never noticed it. Thanks for the tip, let me look into it.

#

It is, LMAO. Thanks for telling me.

maiden wadi
#

That said. I just wanted to start with that because learning other ISM handling is nice.

But PCG is a thing of it's own. I wouldn't remove things from PCG this way. If you end up in a case where you need to refresh your PCG, or it refreshes on it's own from runtime tracking your stuff will probably break.

Instead, you should make your PCG graphs clear for certain things. Spawn an actor at that location with a property on it that PCG can read like a radius. Then clear points from your grass in that radius.

idle crescent
#

I need to do something similar to that I think. I was also going to add a code that for that radius it spawns an actor or something so PCG can't run that spot after anymore too.

#

That did it much better. Thank you. Never knew that function name. XP Thanks.

#

Wouldn't have asked otherwise, for sure.

maiden wadi
#

😄 Yeah. Good to learn. You'll be dealing with ISMs outside of PCG too for world building a lot.

idle crescent
#

Probably. In any case, thank you.

#

Are there any functions for similar shapes, like box or such? For ISMs?

maiden wadi
#

I believe there's a box one.

idle crescent
#

I didn't check. Ah, that's probably sufficient then.

maiden wadi
#

Yeah. GetInstancesOverlappingSphere and GetInstancesOverlappingBox

idle crescent
#

Nice. Thanks again. XD Wish I'd known before.

arctic viper
#

Hey everyone, some of you might know the game Granny. How can I create an inventory and interaction system for it? Can anyone help?

arctic viper
#

yeah but

#

you can do it in unreal

full badge
arctic viper
#

idk how to do it

frozen hedge
#

See the UE documentations and tutorials

frosty heron
inland escarp
#

Is there a reason that AActor is not seen as a child of UObject?

#

Asking bc I'm running into an issue where I made a function for UObject, but wanted to handle if/when an actor class gets passed in there.
And it doesn't ever succeed the cast...

knotty falcon
#

https://www.youtube.com/watch?v=eQ5HjjA7ML4

im making a simple roguelike that involves stacking cubes. Before I start on a few systems I was wondering if anyone had any advice on what unreal tools to use for them.

The biggest thing is there will be items you can collect that will have different passive or active on use effects. What would be the best way to store and organize all this data for all the different items?

knotty falcon
# arctic viper Hey everyone, some of you might know the game Granny. How can I create an invent...

Theres not any one answer that anyone can give here that will answer your question. Im about 2 years in to unreal engine at this point (working 2-12 hours in the engine every day) and I would certianly struggle to make an inventory system myself. Reality is, if your looking for a shortcut to make games fast this is not the right engine for you. Theres lots of engines/game creators that are a bit more "on rails" so to speak if all your looking to do is just make a game. Unless your interest is in learning Unreal engine first and making a game second you are going to have a tough time

pale girder
#

Hi! im relatively new to ue5 and am in the midst of making a wave based zombie fps game, im sorting out the wave system and zombie spawning and im getting an error that is genuinely hurting my brain trying to figure out. Basically, spawning is handled by taking the current wave (1) and multiplying it by 4, then setting the total number of zombies for that wave to 4, then once the amount is set, a for loop handles spawning at the first location, which is where im having my issue. The game spawns 3 zombies, which to get 3 from dividing 4 by 2 should be mathematically impossible. Basically in the first location 1 zombie spawns and in the second location 2 zombies spawn. I am at a loss for words i am so confused right now and any help would be greatly appreciated

frosty heron
#

So your end index for the loop is total - 1

pale girder
#

im so sorry i dont particularly understand? my first array starts at 0 and the second starts at 1? what is making it go to -1?

frosty heron
#

An array is just a container.

Its index start at 0 right? So if you have 3 elements whats the index of the array?

It do be 0, 1 , 2.

What you are doing above is first index 0, end index total zombie.

So if there are 4 total zombie, going with your logic that will be.

0, 1 , 2 , 3 , 4. A loop of 5 times.

If you want to run the loop as much as the number of total zombie then its first index 0, end index, zombie total - 1.

Resulting in 0, 1 , 2 , 3

last peak
#

Inventory however is WAY harder

pale girder
frosty heron
#

I dont know what rule set you want to give that dictate where the zombie should spawn.

#

And i dont know the purpose of the 2nd loop here.

#

Do you want to distribute it equally?

#

Like zombie[0] goes to spawn 1
Zombie[1] goes to spawn 2
Zombie[2] goes to spawn 1 ...

pale girder
# frosty heron I dont know what rule set you want to give that dictate where the zombie should ...

sorry for not explaining sooner, basically, after each loop when the zombies do spawn they spawn at location1 in the first loop, and on the second loop they spawn at location two. Hence the need for two loops.
i need them to distribute equally as if it doesnt the wave system doesnt work as if the number of total zombies when divided isnt a whole number, the system breaks as it relies on checking if the number of zombies is equal to 0

last peak
pale girder
#

so from what ive tested, when the zombies are distributed unequally, e.g. one at spawnlocation1 and two at spawnlocation2, then the criteria for the wave to be advanced after you kill all the zombies is messed up because somewhere in the blueprint the math is going wrong and generating a decimal

pale girder
last peak
#

Now it spawns a zombie at each spawn point

pale girder
#

if theres something ive misinterpreted in the first image please lmk

last peak
pale girder
#

thats for the max amount of waves required to trigger a win screen, right now it doesnt do anything but print a string, but its default value is 3

last peak
#

🤷 the stuff in the loop shouldnt affect the wave increment in any way

#

besides this

#

this would mean in wave 1 you would have 4 zombies but this loop also runs 4 times now

#

Each run spawns 2 zombies
So you end up with 8 total zombies but your integer only counts 4

last peak
#

You should increment total zombies int after each spawn

#

and not calculate it manually at the start

faint pasture
#

Then make an event that figures out how many zoboids to spawn and calls the spawn x zombies event.

#

Then you have a nice logical A to B system instead of whatever human centipede thing you got going on.

south warren
trim matrix
#

hey i have this suspension setup (not rly sure what im doing) but im not sure how could give player control of it

#

its just a pawn w four line traces

knotty falcon
trim matrix
#

ive not done anyhting w pawns outside the third person template i just wanted to make a kart without using the bulk of the vehicle template

knotty falcon
#

if its not a character with a character movement component its going to be very tricky and unique. I would reccomend spending lots of time with just the default unreal character

trim matrix
#

i wanted to just use the default character but i didnt know if i could do like karts and characters in the same bp

#

idk how to explain, my thinking was just to make the characters and kart bps seprated

knotty falcon
#

your gonna have to spend some time watcing some tutorial videos and reading up. Theres not any one answer here that will be able to assist with that

#

your gonna have to build a movement component from scratch and thats no simple task

#

just watch videos on how people before you have done it.

trim matrix
#

ive been following tutorials, but i cant get the movement working

knotty falcon
#

Okay, what cna you not get working? Youre gonna have to focus your question a bit to get anything useful

trim matrix
#

letting player press a button to accelerate, letting go of the button to stop,

knotty falcon
knotty falcon
#

theres a thousand ways to do it so youre gonna have follow down the path of many tutorials to see some ways of doing it

trim matrix
#

when the player pressed the input nothing happened

knotty falcon
#

I think you just need to spend some more time with the engine. You nmight be getting a bit too ahead of yourself.

#

On button press -> Add force

#

but again, that info isnt going to help you much until you spend a lot of time researching and studying

#

You have to give us screenshots or something to help us help you

trim matrix
#

im doing that, are u able to help without sounding condescending lmao 😭 , like even if its not meant to sound that way, imo it is coming out that way. i already said ive not touched pawn shit outside the third person template n been trying to follow tutorials, this has the player moving forward slightly now but then thres issues w any collision w anything flips it over, and then stopping acceleration when button is no longer pressed, and it moving while meant to be static

knotty falcon
#

one of the things the documentation will tell you is you can check accel change and it wont be affected by mass

#

ill leave you with that because honestly im probably not gonna be able to avoid sounding condescending to ya. Its just tough when youre looking for a shortcut to learning when there isnt one. Theres not any one mistake here to help fix, theres just a lot of concepts and things that are important to learn to succesffully do this and it feels like you are jumping some steps thats all. But I wish you the best of luck

#

ive sat at my desk for 2 years trying to learn unreal engine and personally i wouldnt be able to accomplish what youre trying to do easily (or maybe even at all)

lofty rapids
lofty rapids