#blueprint

1 messages Β· Page 360 of 1

scarlet hamlet
#

Thanks will update now

#

So the Add exe node can remain unused ?

crimson briar
#

The right pin? Yes. It is inside the loop, so the loop will end on it and continue with the next iteration from the start. Or go to Completed if there are no more elements

crimson briar
# scarlet hamlet

Code wise, seems okay, yes.
One advice though. Try to keep your code cleaner. Otherwise it will be a pain to debug some more complicated things later. Just keeping the connections straight and avoiding crossing the wires (when possible ofc) improves readability by a lot. You can double click the wires to create a reroute node, to avoid hiding important wires under other nodes

warm elm
#

guys, related question

#

Is there a good example of FPS character with the new Mover plugin?

#

I can only find TPS in the Mover example, and they're C++. I find these hard to reverse-engineer into a BP-only FPS pawn

#

(And I'm looking for a physics based pawn πŸ™‚ )

#

If you know a good example of Mover FPS implementation anywhere I could study, it'd be appreciated!

scarlet hamlet
dark drum
lost eagle
#

hey guys how can i input a custom property into the create event node

#

its binded to a float value function but i also wanna pass something in

crimson briar
#

You can't, the signature needs to match. You need to edit the other end of the binding first

lost eagle
#

so i need a way to locally store or pass in the name but creat event creates a completely new function and i cant pass in the string

#

so ive hit a large roadblock here

crimson briar
#

I'm not understanding what is the point of this, but if the OnValueChanged is not what you need, you can make your own dispatcher with additional variables. Bind to it and call it whenever you need it.

narrow sentinel
#

Anyone know what the default value is for AO ?

lost eagle
#

this was the way, thank u so much

#

handy to know ❀️

dark drum
#

So to confirm, you want a popup for picked up items added to the inventory?

+1 apple
+3 oranges
+2 lemons

lost hemlock
#

right now it's just gonna say +1 apple and that's pretty much it, no matter what I do

dark drum
lost hemlock
waxen quarry
#

Is it bad practice to handle player input outside of the player controller?

white parrot
dark drum
dark drum
# waxen quarry Is it bad practice to handle player input outside of the player controller?

It depends what what it is.

Handling a jump input on the player character, sure no issues here.

Handling jump input on a coffee machine, don't do that.

Handling jump input on a launch pad as a trigger, sure if it makes sense in your project.

As a general rule, inputs on the player controller are inputs that would apply regardless of the character being controlled. Inputs on the character would be inputs specific to the character. Handling inputs on other actors, whilst not strictly wrong should be a last resort and only as long as it makes sense.

ancient iron
#

i wanna made some kind of advance hit reaction (obserber =view this is not HardπŸ˜… frekingFresers) like hit someone from up attack play certain montage that could be controlled by us
have any idea
like if this notiy trigger we want to do something
Image
Great Brother

light forward so the hit actor play forward animation or any stuff

timid ivy
#

Not sure if this is the right channel for this, but I have a crash log I could reallyt use some eyes on.

I tried to introduce sub levels for sub level streaming and it led to my main level becoming unsaveable because a lot of grouped actors were "illegal references" to private objects that belonged to an external map. So I ungrouped the objects which resolved that one by one. Until the last error I had to solve was an illegal reference to the sub-level, which was referenced by 'LevelStreamingDynamic_0' (at '/Game/CSConceptLevel.CSConceptLevel') in its 'LoadedLevel' property (private object belongs to an external map).

The only way I solved this error was to return everything in the sublevel to the persistent level and delete the sublevel. This let me save the main level again. But Now I get this error and it crashes on run time start:

Script Stack (0 frames) :

[2025.10.24-04.19.30:617][ 7]LogWindows: Error: appError called: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\Array.h] [Line: 783]

Array index out of bounds: -302333536 into an array of size 31

[2025.10.24-04.19.30:617][ 7]LogWindows: Windows GetLastError: The operation completed successfully. (0)

#

If I delete ALL the actors from that area that I made a sub level for, it no longer crashes, so if I have to I can one by one delete them to find the "corrupted" actors.

#

I'm not sure why assigning grouped actors to a sub level was such an issue for the engine and I'm not sure how to solve this or avoid it next time otherwise. I've validated all assets, updated redirectors, rebuild my saved/intermediate/etc. and still it crashes unless I blanket delete the actors from that area I made a sub level in.

#

This is the crash log. I have a lot of errors, mostly about a plugin I've half ripped out, but those aren't relevant to this new error and crash issue.

spark steppe
#

duplicate the level asset, and try to open the copy

#

usually unreal skips over invalid stuff on duplication

#

@timid ivy

smoky solstice
#

I'm making a fps game (original, I know) and I'm trying to figure out how to make more "responsive" or "snappy" movement. UE5s first person template has very slippery movement and I'm not a huge fan of it. I'm trying to make something more like quake 3 or ultrakill's movement where it feels more snappy and jumping is less floaty. I've been searching around on the internet but can't really find anything on this and making my own movement system has been... Difficult, so I figured I'd ask around a bit here.

dusky cobalt
#

I had it today and installed symbols pointed me to exact place this error was taking place and it was something weird like I had comment in my header file with a lot of @@@@@@ and it couldn’t parse that

hardy merlin
proud magnet
#
violet bison
hushed topaz
#

FYA - New 5.5 functionality, incase anyone hasn't seen it yet. Phat Bools!

ancient iron
crimson briar
#

Dispatchers are used in One to Many communication. Which means, when you call the dispatcher on your Player, EVERY event bound to this dispatcher will execute. So both enemies take the hit.
Instead you should call an event only on the actor that you get from the Event Hit. Either by casting to it and using the current event you have (Hit Enemy_Event) or by creating an Interface and a function inside it. You need to implement it on the Enemy actor and call this interface function on the HitActor from the Hit Event instead of the dispatcher

ocean gate
#

Hi! I'm using level streaming to stream in new levels in my game, but for some reason the game is now crashing (only in compiled build, not in the editor) sometimes when I load in new rooms during level transitions. Any ideas? The error I get says the following; ```"Assertion failed: IsInGameThread() [File:D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\StrongObjectPtr.h] [Line: 27]
TStrongObjectPtr can only be created on the game thread otherwise it may introduce threading issues with Grbage Collector

Crash in runnable thread FAsyncLoadingThread"```

dusky cobalt
#

Also sometimes? so it's only from some level to another (specific level?)
also do you use hot reload or live coding?

ocean gate
# dusky cobalt Do you mean it crashes only in packaged version?

Sorry I should have been more specific! Yes I meant packaged build. But it's fine I figured out what the problem was just now, it was because of the EasyMultiSave plugin I was using which was set to "Multi Threaded". Disabling that fixed the crashes! πŸ˜…

dusky cobalt
gusty oasis
#

hello, quick question. I'm trying to make the light fade in when the player get close and fade out when they leave. but it stays on when I play the level and it turns off when the player gets close to the collision.

worn dune
crimson briar
gusty oasis
dark drum
gusty oasis
#

nvm i figured what you meant thank you

bronze mirage
#

is there any way to draw a debug sphere in an editor viewport at design time (not at runtime)? I have an actor component that does stuff in a radius, and I need to easily visualize what that radius is... super annoying to have to keep running the game over and over again to see what my debug sphere looks like....

crimson briar
#

You can also make a function be accessible in the editor, to manually trigger drawing something

bronze mirage
#

actor components don't have construction scripts though

crimson briar
#

Or just add some visible sphere collision and delete it on begin play

bronze mirage
#

actor components also don't have components πŸ™‚

crimson briar
#

Well yeah, they don't "exist" in the 3d space. They need to have a connection to something else

bronze mirage
#

right- thus, a debug sphere that I can set a location for

sand shore
#

You might be able to rig something up so that every actor with that type of component needs to do special support to kind of visualize things (with extra components), but even if you get that down to a single function call in the construction script, you still have to remember to add the extra components and that call to every actor type using it

bronze mirage
#

bummer

odd compass
#

Does anyone know the point of making blackboard structs if you can't even get their values?

crimson briar
odd compass
#

You can

#

It's one of the value types when creating a new variable

crimson briar
#

Oh, seems like it is new in 5.6, I was looking at an older project. Yeah, weird they added it without access via Blueprint

odd compass
#

Yeah very weird, but a normal thing epic would do. I'm adding it into the engine code in c++ though so my projects can access it

#

Just hate that I have to go through extra steps because they didn't either think it through all the way or just didn't implement it fully

opal quail
#

Has anyone managed to get CoreRedirectors working with renaming C++ for BP references in order to migrate assets from something like Lyra?

proud magnet
#
jovial bramble
#

Hello, so i got this problem and i don't even know the reason of why it's doing this, i gues it's probably dumb but i fon't get it :
for more contest, i'm making a small game and this function is for equiping a weapon, so i start in the player controller and then go to the actor of the wepaon for conditions and all, but it's calling the event, can someone explain me.
thanks πŸ™‚

jovial steeple
lethal pollen
#

Hi!

#

How can I create the animation for the node Pulse Health Anim?

#

Thanks!

surreal peak
lethal pollen
surreal peak
lethal pollen
outer brook
#

Hello. Is anyone here who knows how to successfully detach a component from an actor and attach it to another one?

I am currently trying to detach a Audio-Component from ActorA and attach it to the Root-Component of ActorB.

Somehow it doesn't work and I cannot see why.

What I do:

  • Spawn an ActorB
  • Use "DetachFromComponent" on Audio-Component
  • Use "AttachComponetToComponent" to attach the Audio-Component to the Root-Component auf ActorB
  • Destroy ActorA

I have tried different approaches like with "AttachActorToCoponent" or use "AutoAttachParent"-Object on the Audio-Component, but i coudln't make it work.

barren tangle
#

Hello Guys, i have an issue

#

i use the trace

#

yo draw a sphere for colision

#

i don't touch...

#

is there a way to fix that?

#

Is it because i'm low FPS PC? and the drawing of the Trace is not fast enough to cover all the attack surface?

dusky cobalt
#

I'm blind or I don't see the sphere trace beeing even spawned?

#

can you set debug and see where it gets spawned?

#

also you probably want Sweep and not just normal trace (unless you want to have 'aoe' around your character simplified)

barren tangle
#

maybe it's my logic which is not good

dusky cobalt
# barren tangle

It hits so it's working actually, the problem might be with logic that is next?

crimson briar
#

The positions of the traces definitely look like it can miss some hits from time to time due to how fast it is.

barren tangle
#

i will rework it πŸ™‚

barren tangle
crimson briar
#

With this speed maybe you should trace for a cone hit instead of the line trace

barren tangle
#

it's a sphere trace

#

why a cone?

crimson briar
#

But cone tracing is not in the default engine, you would need to make it yourself

crimson briar
#

Since the speed is so fast I don't think you need granularity like the line trace

barren tangle
crimson briar
#

What I'm saying is - the weapon moves so fast, tracing between it's points may miss some hits, depending on the angle.
Tracing the hit in a form of a cone in front of the character would detect hits properly, no matter the fps - unless you have more than 1 hit per tick lol

barren tangle
#

i mean i touch if the monster is into the cone area?

#

that's what you mean?

crimson briar
#

Yeah, sort of

barren tangle
#

ok i understand the idea

crimson briar
#

Basically tracing on tick won't work properly with this speed

#

You could also move to OnHit event, there is an option to use Continuus Collision - but this would require reworking how you handle the entire hit interaction, since switching to OnHit would need collision adjustments etc

#

But I never tested it with a speed like this, so not sure how much better it would be

dusky cobalt
barren tangle
#

move to onHit event?

outer brook
dusky cobalt
crimson briar
# barren tangle ok i understand the idea

And in case you need it. The rough idea for a cone trace works like this:

  • you add a notify to the swing animation when the trace is supposed to happen
  • on notify start you do a sphere overlap centered on the player, to detect every actor in range
  • then foreach actor you do some math to detect if the actor is in front of your player and in range and if so, deal damage
    I'm attaching my old blueprint for this - it is not entirely mine, I think I got parts of it from the internet. And it is old, I don't remember most of it xd
    https://blueprintue.com/blueprint/ygf_taez
outer brook
crimson briar
# barren tangle move to onHit event?

There are a few ways to detect hits. Using overlap events, tracing and using Hit events. All of them work slightly differently. OnHit approach uses collisions of the objects to fire an event when they hit eachother.

dusky cobalt
dusky cobalt
#

also by not working do you mean that you don't see these components dissapearing in viewport and beeing added to new actor ?

outer brook
dusky cobalt
#

might also keep location rule to local

outer brook
#

and it is not the first time i've tried this. I never made this kind of "Switch Component between actors" logic to work... Which is why I ask myself if that even works?!

gentle urchin
#

It does normally

#

An alternative is spawning and destroying :p

dark drum
#

Attaching a component to another component doesn't change who owns it. (Or the actor it belongs too)

gentle urchin
#

Sounds about right

#

Atleast partly

outer brook
dark drum
gentle urchin
#

pretty sure it should work

#

gimme as ec

outer brook
# dark drum What's your end goal anyway?

I want to attach the component to ActorB and then destroy ActorA. The reason is the SoundFX playing in ActorA. When destroying ActorA, the sound immediately disappears too, which I don't want. So I thought, attaching the component to ActorB temporarily would be a solution to that.

outer brook
rain orchid
#

Hey, sorry for the late reply. I have seen this function and tried to make it work with some connections but it seems like it doesn’t work or I may be doing it wrong

#

I will provide a screenshot to show how I did it, again not too knowledgeable in BP

dark drum
outer brook
outer brook
gentle urchin
#

If you really need it

#

you can use the "Rename" function

#
Epic Developer Community Forums

During gameplay, I spawn a new component using the code below. UStaticMeshComponent* pComponent = NewObject<UStaticMeshComponent>(pActor); if (pComponent) { pComponent->RegisterComponent(); } The problem is, it can ONLY be attached to its owner (or any <USceneComponent> owned by the same Actor). Not to any other Actor. How about a β€œ...

#

but its c++ only

dark drum
gentle urchin
#

an alternative is to spawn a specific sound actor, which simply is an Actor with a sound component

#

that you attach to whichever actor you need it to follow

outer brook
gentle urchin
#

then it'll have its own lifespan

dark drum
dark drum
gentle urchin
#

Still the custom actor is the absolutr best way to handle this

#

No messing around

#

And easily done in bp only

lost hemlock
#

Hi, I have an open world game and Im trying to make a save and load system... the problem is the game is tooo big and tooo complex to save, so there are around 25 thousand actors almost, its open world survival crafting sandbox, and many things can be changed... So it's just like minecraft almost on a 4k x 4k map...

So the player can build, farm, gather resources from the world etc, and turn them into other resources. Everything is ready so far, the only thing left about this game is the save and loading system...

#

the loading is going to be kinda hard because if the player collects a rock then I'll have to generate the world the next time he loads it, with that specific rock missing

#

so for example if I had to make it, I can think of one funny way to do this, might be ghetto way, might not be very optimzed, but I could do this with multiple line traces or sphere traces... so the trace is gonna smite all those things it finds that shouldn't be there on the begin play of the load

gentle urchin
#

Noo

#

Guid / hash / id for each thing

lost hemlock
#

yeah, it's just an idea, I could also destroy all actors in the game... and then recreate them...

dark drum
lost hemlock
#

Or I could copy paste my level so I can have the sculpted landscape duplicated, and then I could have an empty landscape only with the necessary actors on it...

gentle urchin
#

Id spawn everything as normal, then remove based on some id / guid thing

lost hemlock
# dark drum Is there procedural generation?

yes I used PCG volumes to generate my actors and my static meshes and my HISMs, but now they're no longer PCG volumes, because I used the pcg only for generating each batch of actors & folliages

lost hemlock
gentle urchin
#

Post spawn yeah

#

Unless you can intercept the spawning process ofc

#

Better if you dont have to spawn it in the first place but the limits are what they are

#

If the spawn id is the same as the guid ypu can check it pre spawn/creation

lost hemlock
#

so when I press play I go on to the same level which im gonna play at when I press New Game... Im using level streaming... Ive put a blur behind the menu and the camera jjust moves over that world... when I press new game I will just go spawn on it..... the landscape is already full of these actors.... But if I press load game I wanna try to somehow destroy all the actors that should be destroyed and spawn the new actors that the player's has created with his buildings etc.

#

on play with others, it's gonna be a different level

#

yesterday I also implemented a plugin for the loading screen... when its simulated

lost hemlock
gentle urchin
#

Manually spawned?

lost hemlock
#

25 thousand actors in a giant landscape... rocks, plants, animals, etc.

gentle urchin
#

Assumed pcg,/procedural

lost hemlock
#

not manually spawned... they're already spawned in the level...

gentle urchin
#

Gotcha

lost hemlock
#

hmmm.... its hard to explain

#

when you place PCGs, these volumes just create the actors, but then you can delete the PCG, and create a stamp, so this is what I did.... the actors remain there permamently. Even if the PCGs are all removed... I removed all my PCGs once I was done with them

#

and I can still use more PCGs to add more folliage... etc, which I probably will but thats pretty much it... The player only interacts with actors.. so static mesh folliages shouldnt matter

#

he cant terraform folliages

gentle urchin
#

Gotcha

#

Yeah ive done that too

#

So on load then i guess

dark drum
#

This should make it a little easier to handle loading saved data.

lost hemlock
# dark drum I would separate your static and dynamic stuff into separate maps. That way you ...

gotcha, so I would make a new level only containing static meshes or actors that are never affected by the player or actors that shouldn't have any data saved, like caves... or swimming_water_blueprint, and then when I press load I will only spawn again each and every actor that has to be created, aka the remaining actors that haven't ever been affected by the player... like wildlife, livestock, rocks, boulders, stones, woods, trees, and generally plantlife.. and then how would you manage the other actors?

this is some old draft code I had made some months ago to visualize how I did it before... I was able to generate at best, the character location, and stats, and then load some placed items that the world created on the world... but that's pretty much it... and that's on a good day. This load execution had many errors and right now if I implement this janky code it will completelly crash the engine on load.

#

and this is the other half of it

gentle urchin
#

Youd probably want to frame slice it

#

...Aswell

lost hemlock
gentle urchin
#

Blurprints tends to dislike large arrays

#

You come aroumd that by frame slicing

#

Spreading the work over multiple frames

lost hemlock
# gentle urchin Blurprints tends to dislike large arrays

Let's talk about unreal's GUID system, which you can use to label your actors, components or any other object you may want with a unique identifier that you can use for a wide range of different uses. In this example, i'll show how I personally use it to have item picks remember if they should be destroyed or not between exiting and entering le...

β–Ά Play video
#

I was able to find this which seems very useful for what im trying to do

#

but I couldnt find any resources on frame-slicing

#

not sure if it's a C++ thing but im sure you can do multithreading and other things on C++

gentle urchin
#

Pretty sure i got a snippet

#

Its not c++ no

#

With a 1 frame delay between batch exec and step(outside the macro)

lost hemlock
#

from what I understand Unreal has a cap-limit for how many iterations can do on a for each loop per second, and if it does too many iterations then it will crash the engine... I think the limit is 30 but someone told me people can raise or lower it etc... im not sure if thats true

lost hemlock
gentle urchin
#

No

#

Step is "start next batch"

gentle urchin
#

But theres like 15 caveats to that number

lost hemlock
gentle urchin
#

Just copy the macro 1 to 1

#

And set the "ElementsPerFrame" to 500 and see how it goes

#

You might increase or decrease it depending on how much you do for each entry

#

The input should say ElementsPerStep, not per frame πŸ˜„

last peak
ocean gate
#

Hi! So I'm making a game where you quickly move from level to level, and I've encountered a problem where if you hold a move key as you load into a new level, Unreal won't register / know that you're still holding the key in the new level, so you'll just stay stuck in place unless you release and press the same key again. Does anyone have any idea if there's a way to fix this?

jovial bramble
sick sky
#

very dumb but for some reason my player character (spawned using the gamemode and playerstart) is possessed by AI (but i disabled the ai auto possess on the pawn)
any ideas what can it be ?

dark drum
lost hemlock
gentle urchin
#

Its indirectly setting a value (the target Which is reference (diamond pin))

#

Which is a reference

#

E.g. a direct pointer to the target input variable

gentle urchin
#

Sorry, that was a sloppy mess of an explanation

lost hemlock
#

besides the 500 elements per second

#

I will set it to 500 soon

#

also should these be turned into variables?

lost hemlock
gentle urchin
#

Yes

#

Batch complete -> delay one frame -> step

#

And elementsPerSecond is set to some value atleast for testing and seeing how much you can handle

#

Id start at 500 and work downwards if it causes bad hickups

lost hemlock
gentle urchin
#

This should be a macro btw, not a collapsed graph

lost hemlock
#

anyway, what I have right now is hooked up to regenerate only the player transform & the actors that the player generated...

lost hemlock
lost hemlock
gentle urchin
#

Why would you do that πŸ˜…

#

Think you could just copy paste the macro from the forum aswell..

#

"Copy full snippet"

lost hemlock
#

I did copy the full macro but cant paste it into my panel with the macros list, I have to paste it into the graph and then work the connections etc.

gentle urchin
#

Ah ok

#

Refreshing them aint enough?

lost hemlock
#

anyway I will try to go with another method

lost hemlock
#

βœ…

#

but I will do what pattym said

#

I will copy paste and create an empty level for every level that I have

dark drum
# lost hemlock anyway I will try to go with another method

Spreading stuff across ticks can be useful, especially if you're BP only.

I use this sort of setup a lot. I store the data in an array for what needs to be processed and then just get and remove index 0 from the array. Using the DoN to control when it should start a timer for the next tick if it reaches the batch limit.

#

Just to add, you'd be surprised what you can hide with a 1 second black screen before fading in. πŸ˜‰

barren tangle
dark drum
# barren tangle

The way you handle the traces would need to change. Instead of performing them from the bottom to top of the weapon, you need to keep track of there position and then the following frame/tick you trace from T1 to T2 and B1 to B2. You can add segments in between like in the image if required.

dark drum
barren tangle
barren tangle
dark drum
crimson briar
#

Oh yeah, that is also a good idea - to trace between the weapon position on previous and current tick, instead of along the weapon.

dark drum
barren tangle
#

so i guess the idea is to put multiple socket on the weapon and trace betwen their location

#

i will try, it sounds fun πŸ˜„

dark drum
# barren tangle i will try, it sounds fun πŸ˜„

It's definitely a fun project. This was something I worked on a while ago. (Ended up spending longer on it than I thought I would) Make sure you test at the lowest (acceptable) frame rate though as this can affect things.

https://bsky.app/profile/mpattym.bsky.social/post/3lhvokbl4pc2l

So what I thought would be a quick project turned into something that took far longer. So here's what I've been working on.

In short, it's a 'frame stable' weapon trace system. I would have liked to have implemented a hybrid approach but 5 days later it's time to move on. πŸ˜…

#UE5 #GameDev #IndieDev

β–Ά Play video
atomic hollow
#

And we can also do multiple correct traces steps using this even at low frame rate

gentle urchin
#

Now if only we could bake this info

#

Bake the offsets so you can querry them at any given animation position / time

#

So you'd bake it at say 30 or 60 fps, and just go from there

#

Then you can simply use deltatime to figure out how many traces you should do to catch up, accuratly

atomic hollow
gentle urchin
#

Still even cheaper to just get it from some asset directly

#

Traces can be reduced to single traces , baked at whatever precision you deem necessary

#

Tho line traces are dirt cheap

#

Also means the server could get away with less processing for animations / blends

hardy merlin
#

Why not spawn a capsule collider instead of doing 10 traces per frame?

gentle urchin
#

Cheaper with 10 line traces

hardy merlin
#

It it?

gentle urchin
#

I cant recall thr relative cost of the different shape traces vs line traces , so 10 might be off

#

But the cheapest trace type is line trace

dark drum
dark drum
gentle urchin
#

Id just store that too in some dynamic variable

#

Along with e.x. sword length if they share the anim

#

So you can manipulate them as you'd need them

dark drum
gentle urchin
#

Add more points etc

hardy merlin
dark drum
# hardy merlin What if you pooled the collider?

Unlikely, traces are actually pretty quick. I would imagine the pooling system would just add unnecessary overhead without really saving anywhere. Feel free to build the system and profile it though.

atomic hollow
dark drum
gentle urchin
#

The microscopic memory cost is nothing to talk about in any case

dark drum
#

I attempted to dynamically get the previous location from the anim data directly but ultimately failed. crying All the helper functions epic has for it (which makes it really easy) are all editor only functions.

tropic torrent
tropic torrent
#

So, how does number of nodes influence performance? when I was working with them I was super worried I might be adding too much lol

crimson briar
#

Each node adds a slight overhead due to how blueprints are handled

#

BUT

#

In vast majority of cases your design and what the nodes do matters way more than the overhead

tropic torrent
#

ic ic

#

one thing I did for fun while in class was just make a simple cooldown (i'm a beginner), which was just delay -> print x5, total of 10 things just for the countdown

#

though there is probably an easier way lol

crimson briar
#

You shouldn't worry about it. Unless it is inside a large loop, like 10000+ for loop

tropic torrent
#

nice

dark drum
tropic torrent
#

it does animate them when they're active, i'd imagine something like that happens

#

my profesor said a variable with a delay for the actual cooldown aspect was the way to do it for now so i did it like that lol

dark drum
tropic torrent
#

E press -> stuff for the ability -> set cooldown true -> [print -> delay] x5 -> set false

tropic torrent
#

every time i try something on my own i learn the way he taught us is either not efficient or not working lmaoo

dark drum
#

I personally would favor timers over delays.

tropic torrent
#

It sure sounds perferable

#

I'd have to tie cooldowns to a UI element regardless, so its not like the prints are needed

dark drum
# tropic torrent It sure sounds perferable

As a quick example. The great thing about timers is can can store the timer handle so you can pause or cancel it if needed. With a delay, once triggered, there's no way to pause or stop it.

tropic torrent
#

hmm, how does the event node work? the red boxes connecting

#

If there is a video explaining the node types (don't know the terminology otherwise i'd look) that'd be nice actually

#

My knowledge is all over the place lmao

last peak
dark drum
# tropic torrent hmm, how does the event node work? the red boxes connecting

The red square is to indicate a delegate. So when you start a timer you have to specify what function/event you want it to fire when the timer has elapsed.

A delegate is pretty much a function. A delegate might require specific inputs so the event/function must have the same types to be accepted.

Alternatively, you can use the create event node which allows you to select a function. This will only show you the functions that are compatible.

last peak
#

Ah fancy with a dispatcher

tropic torrent
#

oh wow, didn't really think it would go left

tropic torrent
last peak
#

You could also do set timer by function name

#

Then put in there the name of the event

tropic torrent
#

Create event is also really nice to know, biggest cause of my messy blueprints was events lol

tropic torrent
last peak
tropic torrent
tropic torrent
dark drum
#

Try to avoid the by function name one though unless you actually need dynamic function names. They can break very easily if you rename a function. πŸ˜…

last peak
tropic torrent
#

what are white and the box red?

#

i'll try to memorize these lol

last peak
#

If you create a new variable inside yur blueprint you can look at all the data types

#

White is execution

tropic torrent
#

ah

last peak
#

the red boxes are events

spark steppe
#

you can hover over them and it shows you the type...

last peak
#

True there should be tooltips for every node when you hover them

tropic torrent
#

yeah, they just tend to be different on the same color

#

would you recommend dissecting the existing stuff on the engine?

last peak
tropic torrent
#

wdym by data types?

last peak
#

What is
A vector, a int, a rotator, a boolean, a float, a reference, a string

#

Try to start classic with a hello world

On button pressed-print string to the screen

#

When you have that - on button pressed - print string hello world but in another actor not in your player

tropic torrent
#

thats easy, key press E event -> print string

#

on another actor?

last peak
#

now in another actor

#

the print string node is in a second character

#

In your player you press e -> now in the second actor the print string has to get executed

#

In this video you'll learn everything you need to get started with blueprint communication. If you're struggling with this in Unreal Engine, make sure to watch till the end to get a full grasp on how this all works!

#gamedev #unrealengine #unrealengine5

0:00 - Intro
0:20 - What is blueprint communication?
0:28 - Direct communication
2:05 - Ca...

β–Ά Play video
tropic torrent
#

yee i know cast to

dark drum
#

Its always baffled me why people lump casting into blueprint communication. It's just a type check lol.

last peak
#

It shouldnt be in blueprint communication

#

Its more like the event that you call that is the true "communication"

dark drum
last peak
#

Ah easy - get all actors of class πŸ˜‚

tropic torrent
#

i always get stuck on what to put for object tbh

dark drum
last peak
#

For example a sphere collision

dark drum
last peak
#

You can do get all actors of clas then get a copy of 0 if you only have 1 single thing in the level you want to cast to

#

but its dirty

tropic torrent
#

i have made actor -> static mesh -> custom event -> print string

maiden wadi
last peak
#

Oh really ?

#

hmm

tropic torrent
#

and on the character Keyboard Event E -> Cast to BP_Hello_World -> Hello World (custom event)

last peak
tropic torrent
#

so i assume the static mesh for the cube is not a good enough object reference

tropic torrent
last peak
#

You either need a sphere collision on your player

tropic torrent
last peak
#

Or you do a linetrace

#

If you want to cheat you can do get actor of class

#

But that wont help you most of the time

dark drum
tropic torrent
#

add sphere collision to the player instead?

tropic torrent
#

ye i know how to

last peak
#

Think of this sphere as your field of view

dark drum
#

'How to get a reference' is the key phrase. There's 3 main ways, either: (there might be more)

A: store a ref as soon as it's created of which you can then pass it around when needed. (assuming you have a ref to the thing storing the ref πŸ˜… ) or

B: Perform some sort of trace into the world to 'try' find what you want.

C: There are some overlap/hit events that also return a reference to the object.

#

Which you would use can depend entirely on what you're doing.

last peak
#

Best to plug it on a tick

dark drum
last peak
#

To make sure

tropic torrent
#

have a sphere collision on player, now what?

last peak
#

now when you press e

#

Or whatever key you have

tropic torrent
#

what do i do with it though lol

last peak
#

You drag in the sphere of your panel into the event graph

#

or you right click in the event graph and say get "SphereName"

tropic torrent
#

dragging it worked

last peak
#

this is a reference now

#

a reference to your sphere now drag off your reference

#

And say get overlapping actors

#

it will return you an array with all actors in this sphere

#

from there you drag off and say get(a copy)

#

Thats your object for the cast

tropic torrent
last peak
#

now add another event in your player call it answer
Event answer - Print string

dark drum
#

The reason why you cast is because the object type it returns is of type actor, which is anything that can be placed in the world. Most BP's you would create to place in the world would be a child of actor so the cast is like saying, 'Hey, i've got this object, is it a Chair?'. If it is, the cast is successful and it returns an updates object ref. If not, the cast fails.

tropic torrent
#

customm event?

last peak
last peak
tropic torrent
#

no errors but no prints

last peak
tropic torrent
#

yes

last peak
#

ah you are maybe detecting yourself

#

In get overlapping actors

#

select the class hello world

#

Now your sphere will only look for this actor

#

Also the answer Hello should be called in your second actor

#

Not in your player

tropic torrent
#

need a cast to, right?

last peak
#

Its very easy to get the player object

#

get player character

#

and you can cast with that

tropic torrent
#

works

last peak
#

This are the absolute basics of blueprint interactions

#

This was only a cast

#

you also need to know how to do that with a delegate / event dispatcher
And how to do it with a blueprint interface

tropic torrent
#

definitely strengthened what i knew

#

what does that mean lol

last peak
#

Different ways of communication
THe problem with casts is that they create a dependencie, a hard reference

As long as your player exists your hello world will be loaded into your ram now

dark drum
#

Learn about hierarchy and function only base classes. And then about actor components and composition. πŸ™‚

last peak
#

Which is obviously really bad

dark drum
#

And before anyone says it, interfaces aren't a replacement for casting. πŸ˜… If you want memory management, hierarchy and soft references should be your main go to.

tropic torrent
#

trying to figure out how to lower memory usage atm lol

#

want to try to optimize games, not to the extreme level the nintendo switch has, but yknow

last peak
#

Thats something to worry for way later

dark drum
last peak
#

But it doesnt hurt to get a good habit from the get go ...

tropic torrent
#

probably, im in the combat preset for 3rd person gamemode

last peak
#

Main rule of thumb is
Avoid casts
Avoid Tick

#

Untill you know what you are doing

tropic torrent
#

avoid casts 😭

dark drum
dark drum
last peak
tropic torrent
#

keeping it lighter as i go does mean it will be easier to fix up later

last peak
#

Having a chain of ahrd references in your code is main beginner mistake

dark drum
tropic torrent
#

and since i don't have the most optimal set up, i won't run into things that slow it down

last peak
#

You can always cast to your player without problem, you should however not cast from your player to other classes

tropic torrent
#

yall got some general advice for improving performance? unreal likes to tell me that my video memory hates me XD

#

thats mainly when i add visual things though, default level seems fine right now

dark drum
# tropic torrent keeping it lighter as i go does mean it will be easier to fix up later

So hard references aren't always a problem, it just depends what its too. The trouble makers are things that contain things like textures and sfx. These can get large and might not always be needed so having them always loaded can cause trouble.

This is where hierarchy comes in. You can look at the character class as an example.

This goes:
UObject -> Actor -> Pawn -> Character -> ThirdPersonCharacter

Most of the core logic is inside of character which can be safe to hard ref because A) it has a small footprint because it doesn't reference large assets and B) would most likely be loaded anyway.

Doors can be a great example of creating your own hierarchy.

UObject -> Actor -> DoorBase -> BirchWoodDoor

The door base wouldn't contain any references to things like meshs, materials etc... but might setup empty references that can then be setup in child blueprints. This base class however would contain all the core functions like 'OpenDoor', 'CloseDoor', 'LockDoor' etc...

This means if you have a door, you can store a reference to a door using the base class without much of an issue.

Then there's soft references but getting hierachy down first will make soft refs easier to understand and work with in the future.

last peak
#

Unreal only uses 1 gb of your vram by default

#

you can incease it like this in the engine or you change up the editor ini i think it was

dark drum
#

If i remember correctly, in a build UE automatically detects available VRAM. You can change the PoolSize in the editor if you want to test at the given amount.

last peak
tropic torrent
last peak
tropic torrent
#

with the starter content

last peak
#

uff thats rough

#

what gpu do you have ?

tropic torrent
#

good question

#

the device does suck lol

last peak
#

win + r
Type in dxdiag and hit enter

tropic torrent
#

Memory: 8192MB RAM

last peak
#

next to the system tab you have one for your gpu

tropic torrent
last peak
#

display1

tropic torrent
#

should be fine to do a full screenshot right?

last peak
#

sure

tropic torrent
last peak
#

ah damn

#

can you show me display2 ?

tropic torrent
last peak
#

Ouch i see

tropic torrent
#

my second "monitor" is a chromebook + capture card lmao

last peak
#

4 gb vram

#

that is bareley usable for unreal engine

tropic torrent
#

πŸ’€

last peak
#

You can disable nanite and lumen in your project settings

#

that will give you a boost

tropic torrent
#

what do they do

last peak
#

My old machien had the same gpu and i did work in ue5 with it

#

Lumen is real time lightning

tropic torrent
#

yeah i don't need that LMAO

#

im not the lighting guy

last peak
#

Nanite is a automatic lod system

#

very heavy

tropic torrent
#

im mostly going to use placeholders lol

dark drum
#

4GB is fine. Just depends on the game. I ran a GTX970 with only 4GB for years.

last peak
#

Ahh its fine for most things

#

Niagara will be hard with it XD

#

Tried to do niagara fluids with it, no chance

tropic torrent
#

honestly i think games going super detailed as possible was a mistake but unreal having it as an option is based

#

I like it looking not fully realistic

dark drum
#

Also, Hogwarts Legacy was build using UE and its minimum is 4GB vram. Just got to be smart with you're textures.

tropic torrent
#

the highest level of graphics i'd consider for personal projects would be around Dark Souls 3

#

looks amazing, i still here people complain about it lol

#

this feels so much smoother lol

#

so on the previous topic about cast tos, what would you recommend instead?

#

I'm going to do a spell system for this mini project, how would you go about that?

#

Organization wise I suppose

dark drum
tropic torrent
#

so referencing things lower on the hierarchy? or did i understand wrong

dark drum
# tropic torrent I'm going to do a spell system for this mini project, how would you go about tha...

I would create an actor component that handles casting spells. This can handle checking any requirements before performing the relevant animation and spawning in the various SFX.

I would probably create a custom uobject that stores the data for the spell and possibly some core logic that all spells should have. This would allow you to create children etc...

Soft references would be great here for the heavy assets such as particles, animations and SFX.

tropic torrent
#

hmm

dark drum
tropic torrent
#

so do or don't reference base?

#

making sure i have it 100%

dark drum
# tropic torrent so do or don't reference base?

Reference at the level you need but try to design so you don't need to reference the heavy levels.

For example:

Spell -> FireSpell -> BlazingInferno

Spell would have the core functions for things like CastSpell.

FireSpell might have additional functions for things like applying burn damage to a target.

BlazingInferno would be the actual spell thats cast and would specify your particles, sounds and animations.

Casting to Spell and FireSpell should be fine but you should rarely (if ever) cast to blazing inferno.

#

If you have spells in you're game chances are it'll be loaded anyway and if there's a chances its not needed, because it's a lower footprint, it doesn't matter if it's few KB are loaded.

#

As an FYI, building systems is more involved than just making something happen so don't get discouraged when things don't work.

Have you made an interaction system yet?

tropic torrent
#

wdym by interaction system?

#

player -> cast to spells -> cast to fire spells -> cast to Blazing Inferno
this makes it so its checking cast to spells and no further until it succeeds, if i understand correctly?

next hollow
#

Hes not saying that.

If you need to tell the spell to explode, or spawn, just cast to spells
You don't need to know what a blazing inferno is, just to destroy it sorta deal, so why cast to it.

tropic torrent
#

i understand that muchm just seeing how it works

dark drum
# tropic torrent wdym by interaction system?

No, an interaction system is a system for querying the world for things the player can interact with and providing a way to then handle an input to trigger the interaction. They can be a good thing to learn as a beginner. They can range from really basic to over the top complex as sh...

last peak
#

Inheritance bahh

tropic torrent
dark drum
tropic torrent
#

then yes

dark drum
tropic torrent
#

it was a lesson i did in class

#

we did a sight line that generated when pressing f

last peak
#

A linetrace ?

tropic torrent
#

yes

last peak
#

works best for first person games

#

A interaction system with linetraces

tropic torrent
#

rip

last peak
#

Can work for other genres too tho ^^

tropic torrent
#

unrip

dark drum
# tropic torrent it was a lesson i did in class

Ahh cool. I would recommend also looking at some tutorials on YouTube as well for them. The reason why is because there's a lot of different ways you can set them up all of which have their pros and cons.

I find its the easiest example to understand what the differences are doing.

The main ones are Trace and overlap based. However, the way you set these up can change drastically. Single line trace, maybe a line trace with a secondary sphere trace. Interface based or component based. The list goes on.

This can be a good project to learn how to build systems as opposed to just making something happen.

last peak
#

From my experience the first few projects are just for learning anyways

tropic torrent
#

real

last peak
#

halfway trough you will see you made really bad mistakes and its easier to start again

tropic torrent
#

the final for this class (which will be "make an FPS") and what im working on now

dark drum
tropic torrent
#

and after these im going to work on one with a group, see how that goes

tropic torrent
next hollow
#

Be sure to make it all client authoritative. πŸ˜›

tropic torrent
#

what does that even mean 😭

tropic torrent
dark drum
#

I wouldn't recommend doing multiplayer as a beginner. πŸ˜…

tropic torrent
#

definitely

#

no multiplayer for sure lol

dark drum
next hollow
clear solar
#

Hey guys, I have a question about level streaming. So I have this layout of two rooms and a corridor rn. The player starts in the left room (room 1) and after some gameplay the door opens and they walk down the corridor to proceed to the room on the right (room 2), after they interact with room 2 I want room 1 to unload and a new level on its place to load (room 3). I want this logic for every new room to load and unload seamlessly like the rooms change by themselves. I tried using level streaming and having the corridor be the persistent level and in the level blueprint load room 1 on begin play, however when I'm trying to unload it from a blueprint inside room 2 it doesn't unload. I'm aware the problem might be that I'm accessing it through 2 different blueprints but I don't know how else to load the first room and having the player also start from the same room. Any help would be appreciated, I'm fairly new to unreal and this little issue is driving me crazy!

tropic torrent
#

the school computers are probably more powerful than his computer, but i could put separate levels in it just in case XD

dark drum
#

Can you provide more context?

tidal ridge
#

hey quick question, i know the Boolean Not Node is used to convert if the variable is true but NOT node turns it/ switches it to false but if it involes a Function like a pure function or impure how do you know if this function is set to true or false and if i need the NOT node to convert it or switch it to either one?

crimson briar
tidal ridge
#

no, sorry im trying to understand how this node works, this one i mean

#

im trying figure out how dose the NOT Boolean Node work with Custome Functions when you cant Convert the functions true or false?

dark drum
#

Can you share more about how your character is setup?

dark drum
clear solar
leaden pumice
#

new to Blueprints and I'm trying to understand how the enhanced input system triggers behave. I have a test where I'm trying to set a bool to true on pressed, down, and released when I push a button. Pressed and Down both work correctly as I expect, but released just doesn't want to fire. I have the appropriate triggers set to each of those input actions in the IMC.

My expectation is that the trigger would fire when the button is released, but that doesn't seem to be true?

dark drum
#

You'll most likely need to disable controller rotation yaw before you start rotating the character and set back to true when complete.

dark drum
dark drum
brave quest
#

hey everyone, I need some help, does anyone have advice on learning and understanding unreal's gameplay framework things like - Game Modes, Game Instances, Player and Game States, Save Games, (or even other more complex stuff) ... - and knowing how and when to use them properly. Like any vids or docs you watched? I've been seeing some videos but they dont really show much practical way to use these (especial on how to use them in a full game). I've been on unreal for some time and made some small games, but my blueprints were kinda messy and never really had any structure, so since I want to upgrade my games I though this is something important to learn

clear solar
#

I'm just using a box collision so when the player enters it the level loads

#

I cannot unload the first room though

sand shore
#

Any one trigger type can give you multiple callbacks, though, including a tick event while it's active

tropic torrent
#

time to see if my device can run unreal TWICE

worldly sparrow
#

blueprint noob here. hopefully not a totally stupid question. i made a BP, put my static mesh in it. added my health logic, and at the end if health =0 it does s destroy actor. i then added a FAB product BP that does fancy volumetric fog. that works fine and follows the destroy actor. i then added a FAB AI Spawner BP, it works but ignores the destroy actor. why will one BP child destroy with the parent and the other won't? haev i done this the wrong way?

lunar sleet
worldly sparrow
lunar sleet
worldly sparrow
#

where the components are

lunar sleet
#

Spawning an actor does not cause actual inheritance. all you’re doing is setting an owner that you can basically call on later on

worldly sparrow
#

oh, ok, but is the bp_fogtool a child actor of this BP?

lunar sleet
#

It is a child actor component

worldly sparrow
#

yes

lunar sleet
#

We generally try to avoid those as they’re known to be broken

worldly sparrow
#

thats what i mean

lunar sleet
#

CAC and Child Actor are not the same thing btw

worldly sparrow
#

ok, so how do i do it properly?

#

oh, ok so cac is this type of "child" whiel a normla child is when we press on a BP and choose make child of?

lunar sleet
#

Yep

worldly sparrow
#

ok, got it, sorry very noob at BP, am used ot PCG

#

so how do i do CAC properly?

lunar sleet
#

We’ve all been there

#

I’d stay away from CAC but in this case you’re saying that part works fine but the AI bp is ignoring the destroy command

worldly sparrow
#

yes

#

exactly

lunar sleet
#

So you want destroy actor to destroy the AI system ?

worldly sparrow
#

yes

#

to destroy the ai spwn

#

so the bp is a "monster spawner" that can be placed by pcg, spawn monsters, and the player can go destroy the monster spawner. like bug holes on helldivers 2

lunar sleet
#

so why not just do that and call the destroy from the AI spawner bp

leaden pumice
worldly sparrow
#

but the AI spawner BP doesnt have a hit box, health etc.

#

woudlnt that mean i need to add that stuff to it as well?

sand shore
lunar sleet
tropic torrent
worldly sparrow
#

wooow, ok, that feels like you jsut went way voer my head.

leaden pumice
#

I'd really like to try to get it to work so I could know when / how to use these

worldly sparrow
sand shore
#

Well that bool is, by my understanding, asking if the input is active? Could be that the release trigger doesn't stay true long enough to be observable in your tick?

lunar sleet
#

Pretty much, but your target has to be the AI spawner not the self

worldly sparrow
lunar sleet
#

See bp coms video in pins

tropic torrent
worldly sparrow
leaden pumice
tropic torrent
#

ahhh there is a secnd part

#

ooo there is a third part

lunar sleet
last peak
#

i cant really read the nodes

tropic torrent
#

ye was just showing it lol

#

bro im forgetting how to do the dang node anchor point lmaoo

#

google is annoying to use

last peak
tropic torrent
#

double click yeah

last peak
#

Its a goddamn joke, their docs look like a 12 year old with adhd has written them but their streams are some of the best learning material i have found XD

worldly sparrow
tropic torrent
#

first thing i simplified with unreal's method

#

the (?) is because i don't know if thats true or not

#

maybe we didn't need to current health -# to be able to do shields (the shields was an assignment in class instead of a requirement too)

last peak
tropic torrent
#

oo clamp keeps it at a minimum of 0

#

should move the disconnect to before clamp

last peak
#

you recieve dmg 10 hitpoints

Now you need to do current health - dmg recieved
Clamp sets 0 as the lowest possible float

tropic torrent
#

yup

last peak
#

But what your doing now is
You recieve dmg
Then you set your health to the dmg you recieved

tropic torrent
#

current health -# is the unneccessary part when AnyDamage already tells us how much damage we're taking right

last peak
#

Seems wrong

tropic torrent
#

ahh

#

i see

#

well the 50 we put in it is wrong then?

last peak
#

you recieve dmg with a amount

tropic torrent
#

damage into - makes more sense right?

last peak
#

you need to subtract that from your current health

tropic torrent
#

like this

proud magnet
#

Can anyone explain why the captured scene from a SceneCaptureComponent2D is almost always way darker and higher contrast that the normal player camera? I'm using RTF RGBA8 SRGB for the RenderTarget, Final Color (HDR) for the CaptureSource, and I've got my PPV's identical. First photo is the world view from the perspective of a SceneCapture, second is the RenderTarget it outputs.

last peak
tropic torrent
#

okay will let him know to have the event's damage connect next time

jaunty geyser
tropic torrent
#

wonder if he intended to do healing with negative damage if the clamp is there, or if negative HP broke something

#

okay custom eventing death makes more sense but i can't blame him for not doing that lol

#

unreal makes me laugh sometimes

#

did i accidentally break this- should the execute nodes be connected??

cerulean mortar
#

Does anybody know why the camera mesh from the SceneCapture2D doesn't get displayed? When I add it to an actor blueprint it's hidden but if I add a Scene Capture into a level it's visible, If I add the actor into the level it's still invisible, I don't remember it behaving that way in UE4 and I can't figure out how to fix it

#

It only seems to happen in UE5.6

tropic torrent
violet wagon
#

is there a way to change my cursor sensitivity? Similar to how League how their mouse speed setting

tropic torrent
#

okay am i allowed to ask stupid simple questions lol

proud magnet
#

it still seems like its giving it contrast for some reason...

jaunty geyser
#

Is that the view of the render target itself, or the render target applied to a material?

jaunty geyser
proud magnet
#

First photo is multiplying by Pre-Exposure Property, second is multiplying by InvProperty.

#

Pretty much the same thing

jaunty geyser
#

Do you have any post processing in the scene?

proud magnet
jaunty geyser
#

Override exposure settings on the scene capture without setting them, likewise override all color grading related settings without setting them. Just click the checkboxes to enable them

jaunty geyser
#

Yep

proud magnet
#

i might try making a new project and doing some testing to see if this still happens

#

seems to be happening with all my SceneCaptures, they are all darker than they should be

tropic torrent
#

i wonder why i didn't just add a vector arrow + launch character, why did i do all of this

gentle urchin
#

Happens all the time lol

#

Once a system is done and you know the exact scope, easier ways reveal themself

tropic torrent
#

oh i knew beforehand, just wanted to try it this way lol

#

hmm im forgetting how i did it and i don't have the file on me

#

made an arrow, it went into something that had a light purple, that went into something that gave me a vector, and the vector got multiplied by launch distance i wanted

#

oh i have it on my slime

#

tbh idk how much better this is

tropic torrent
#

okay checked it out for all features, with the arrow it is one less action

#

now i don't think i need THAT level of optimization, one action surely doesn't make a difference, but it is cool to see

devout drum
#

wp.Runtime.OverrideRuntimeSpatialHashLoadingRange -grid=0 -range=X

Unable to execute this command and no loading range value is changing. Any lead her eplease

tropic torrent
#

I spent a lot of time in blue prints today and tbh idk if it was worth it, but I think I learned something from it

spiral meadow
#

Hey. I just added the Interact Interface in elevator blueprint but it didn't seem to work. Can anyone help me

spiral meadow
#

its working fine in every bp but this one it didn't pass or print anything

last peak
#

bad reference most likeley

barren tangle
#

Hey, inside a notifyState (Tick event) it's ok to cast on all tick to get the character?

barren tangle
#

i'm asking because inside the begin event i can't set the global variable

last peak
#

player is already global

maiden wadi
barren tangle
barren tangle
last peak
#

Get player character - cast to MainCharacter

#

it 100 % is very dirty to do a cast on tick

#

Just do it on begin play

maiden wadi
#

It's really not.

barren tangle
last peak
#

It is you dont need to cast 60 times a second

maiden wadi
#

Casting is nothing but an IsValid. You're going to want to IsValid it on tick too. So what's the issue?

last peak
#

that its dirty

maiden wadi
#

And the reason for that is because...?

last peak
#

Because your not supposed to do something 60 times a second when one single time at the start is enough

maiden wadi
#

But again. You're going to do it anyhow. You need to validate it before you use it in the function scope.

barren tangle
#

So it’s why I do the cast on the tick… but maybe with your knowledge you have a better approach

crimson briar
barren tangle
last peak
#

Isnt this notify event part of your Anim bp ?

crimson briar
#

If you are worried about it casting to unnecessary things - you can use "IsA (soft)" since 5.5 or 5.6 or something. And only cast if true

barren tangle
crimson briar
#

But if it is bad to cast on tick - it depends. If this is one actor doing it - completely fine. If you have 100 actors doing it - it can start being noticable. Casts are not that heavy, but it all depends on the scale

last peak
#

You can also just drag in the variable and say - get
Then you right click and turn it into a validated get
On true - continue your code on false do the cast

white parrot
maiden wadi
#

They should really fix BP const. You can do so many things in const functions you shouldn't be able to do.

barren tangle
#

Or maybe the logic of the gameplay should not be inside those notifyState... maybe that is my mistake

#

i should just use them to communicate to the concerned "class" what they have to do

last peak
crimson briar
#

Yeah. But after thinking a little longer it wouldn't improve performance either way, since then you use 2 nodes, and checking the class is probably almost the same as casting to it - perfromance wise.
It helps with not creating random hard references though. But it is irrelevant to the current question

last peak
barren tangle
#

but if i get the owner and i use interface i should be able to communicate to my main character without cast... if i can

last peak
#

Like i still dont fully understand the purpose of soft refs πŸ˜„

crimson briar
last peak
crimson briar
#

As I said, it is irrelevant to the quesiton here

#

It was not about hard references

last peak
crimson briar
#

But yes, a cast in a class adds it to the dependenscies of this class

last peak
#

But then again i dont see the purpose of it
Like what does it do better than a hard ref from the get go

#

I need to do some googling

sonic schooner
#

Hey guys, I'm looking for any leads to making a reloading setup for multiple weapons in weapons system component. I can't get my head around how I should make it work for multiple weapons. I've got data assets setup for the guns, with magazines, capacity, damage etc.

last peak
#

On reload pressed - get equipped weapon - if current clip < 30 && ammo in inventory > 0

#

Do the reload stuff, remove ammo from inventory put it in the current clip

spiral meadow
last peak
spiral meadow
#

i am calling it from here using e key

#

and here i have set it up

#

in elevator bp

last peak
#

before you do on interact just do a print string and hook up your actor that you get from the linetrace

spiral meadow
#

Okay

last peak
#

what does it print ?

spiral meadow
#

Tue bp actor name

#

Not the component one

last peak
#

it prints "Tue bp actor name" ??

spiral meadow
#

Yes

#

Ufs

#

It's elevator bp which is printing

last peak
#

WHat is the exact name that its printing ?

spiral meadow
#

BP_Elivator_Old

dusky cobalt
#

maybe you forgot to put interface on that thing?

spiral meadow
#

And if I turn back to wall or floor and try again its pring the same

#

On wall or floor

last peak
#

What happens if you only do a print string with hello in your elevator old ?

spiral meadow
#

The elevator bp name

#

It prints now

#

But give the error in branch on component hit

last peak
#

your component is invalid

spiral meadow
#

Not a UClass error

#

I am using isvalid? Now

last peak
#

ye print string - is valid only if yes you continue your code

dusky cobalt
#

more interesting is this

last peak
#

you check if the component is valid

dusky cobalt
dusky cobalt
#

you have like 2 functions with different returns and one has no return connected to it?

spiral meadow
#

Yeah valid but giving error after DoOnce node and then bp on component hit

tropic torrent
#

I did clean it up tho!

last peak
# dusky cobalt

how tf is it even printing the actor name in the first place lmfao

dusky cobalt
spiral meadow
#

Just fixed the hit component wire and it just pass and not giving error

#

It's just that I use hit result on the interaction interface it is not working but I use primitive hit component and its worked πŸ˜…

#

I want to ask when we use line trace by object and channel, what is the difference in them?

dusky cobalt
#

for channel you can have only 1 channel that you are trying to hit, for objects you can specify array of object channels,
in both cases the actor/object you try to hit must block that channel/object response

spiral meadow
#

When I try to get the elevator to the first floor at 337 at Z Axis the elevator just stop at below the floor and when going back to ground floor it just goes under the ground floor, where it is at 25 at Z Axis value

heady wasp
#

UB

spiral meadow
#

but its going deeper down below the ground floor

royal viper
#

Hypothetical question: ~~Say you have your PlayerCharacter, and when he gets close enough to an ingame item, you want your SphereTrace to catch that item & show a widget that gives you the option to "Pickup". Very standard stuff, but what is the most efficient way to do this do you think? Do you....run the character's SphereTrace off EventTick? Have a CollisionBox on the item, that triggers the character's item Trace when he enter's item's collision? There are lots of ways to implement this....What do you think could be the most efficient method?

spiral meadow
dark drum
dark drum
spiral meadow
dark drum
dark drum
crimson briar
# royal viper Hypothetical question: ~~Say you have your PlayerCharacter, and when he gets cl...

I would recommend first deciding what you want to happen.
Individual collisions on each pickup can make it hard later to change what is pickable based on distance - like if you have 4 items near each other, when they have individual boxes you can be inside of all of them at once and it will be more work to determine which to pick up. And the widgets can overlap While using a sphere around the player would easly give you an array to check which one is closer.
But doing a line trace in front of the player cursor gives you a precise way to show only the one item info the player is looking at.
So I would say it depends more on what you want to achieve.

spiral meadow
dark drum
spiral meadow
#

Just posted above

#

If I put x and y value too then it just going in slide slant not straight

dark drum
chilly root
#

Can anyone help me with stopping a projectile movement in the third person template? I am using Unreal sensei's game tutorial and after losing the game, the widget kicks in, stops character movement and time from ticking but the projectiles keep traveling which might end in hitting a target and a win screen appearing. I've tried searching how and what to call in the Game mode class, but nothing came of it

crimson briar
chilly root
loud igloo
#

Hi, I was wondering if there is any way to setup the value values of an array in unreal to be the same values of an enum instead of manually having to put every single value and selecting it

crimson briar
#

You can also pause the entire game, but it may interfere with other things, depending how you have everything set up

chilly root
crimson briar
chilly root
#

i assume i can somehow call the max speed from the details of the projectile movement component

crimson briar
#

The type changes in the top example are int -> byte -> Enum

crimson briar
dark drum
chilly root
crimson briar
#

Oh boy, blueprint communication again. That is why I suggested to just GetAllActorsOfClass and destroy them

#

pattym wrote one option of doing it above

chilly root
dark drum
crimson briar
#

It is a tool to use, using it for cleaning projectiles after the end of the game seems better to me than registering every bullrt during the game with a dipatcher

#

Personally I would block changing the state of the game after the game ended and just left projectiles alone

dark drum
dark drum
maiden wadi
lost hemlock
#

Hi I have a problem. I followed Ali enzoheri's tutorial.. Saving & Loading system

crimson briar
#

The only other possibility is that you created the save file with a different Save class previously and didn't delete it from the project files. And it loads the old, different version, ergo fails to cast. Changing the SlotName would let you see if this is the case

lost hemlock
lost hemlock
lost hemlock
crimson briar
#

Well changing the slot name would create a different file, so it would have the same effect.
The saves themselves in editor are located in the folder Project/Saved/GameSaves or smth like that

lost hemlock
#

should I do something with them?

#

its a bunch of gibberish πŸ˜‚

#

I'll delete them for now and see if that fixed the problem

crimson briar
#

This is just settings, you want to look for the one with the name you had in the SlotName

lost hemlock
#

they're all gibberish inside πŸ™

crimson briar
#

Well yeah, you aren't supposed to read them as plain text

#

But the point was that if you want to clear saves, you delete them from this folder

lost hemlock
#

I can regenerate them, can't I?

crimson briar
#

ProjectName/Saved/SaveGames - yes. They are the actual files created when you use the save to slot function in editor

lost hemlock
crimson briar
#

Yes, because you deleted the file itself. After that check if it will load after saving

lost hemlock
#

I mean it executes all the way

#

but it spawns my character on 0,0,0,0,00 if the map

#

waaaay waaaay outside

#

and I don't even see ym character being spawned, perhaps im not possessing it

#

Ohhhh yeah

crimson briar
#

Well I'm going to eat something so good luck

plush jackal
#

Hi. I'm trying to end a "MoveTo" task, and I'm saving the AsyncTask reference on my character. For some reason the reference is being invalidated once it reaches this point. I'm saving the async task in two different situations and one it works the other the reference is lost. Any ideas why? One is being set in a GameplayBehavior (the one that doesn't work), the other one in a State Tree task (the one that works)

lusty pilot
barren tangle
#

Finnaly πŸ˜„

proud magnet
#
#

Can anyone with any knowledge on SceneCapture/RenderTargets comment on this?

barren tangle
#

it's not as beautiful as you but the idea is there @dark drum

jaunty solstice
#

In a Blueprint Actor Viewport, is there any way of changing the default camera settings, ie focal length, and optionally switch to Ortho from a Perspective view?

barren tangle
#

but i guess the shape of the trace show that i have a bad computer πŸ˜„

dark drum
prime stump
#

I'm using an interface to communicate from an Actor to a players Player Controller to keep everything decoupled.. In the image I am calling 3 separate interface functions on the same interface which then calls their respective functions/events on the Player Controller, in terms of performance would it be better to have 1 interface function in place of those 3 functions that calls all the same functions/events on the Player Controller or does it not make a difference either way? and I don't mean 'does this particular example make a difference' but like overall using this as a framework of communication, especially for multiplayer

dark drum
prime stump
dark drum
prime stump
#

What I was thinking was 1 interface function 'Set Up CCTV' or something, which takes the Actor reference, the Display bool and Name inputs in and just calls all 3 in one interface function on the Player Controller instead of 3

dark drum
prime stump
dark drum
#

Anyways, what's the CCTV camera array to pull the name from?

prime stump
# dark drum Interface functions everywhere. πŸ˜… I take it you've not learnt about actor compo...

Not sure what you mean? I've set up my player interaction as an actor component but not the actual interactable actors themselves, they're still set up as child classes of a 'BP_Interactable_Base' class

The CCTV Cameras array is an Actor array of type BP_CCTV, its editable so the BP_CCTV's can be placed around the map and then on the BP_CCTV_ControlPanel (which is where the first SS is from) you add each BP_CCTV into it

#

Also all the code does work btw πŸ˜‚ everything works as expected I just don't know from a performance standpoint whats better

neat stream
#

I'm having an issue with my health shrine logic and replication. When any player triggers the health shrine it is only healing player 1 (Listen server). How would I go about getting it to replicate to the player that instigated the healing, not the server?
Here's my setup:

  • Images 1-3 are called on player bp.
  • Image 4 is in the health shrine bp.
dark drum
prime stump
# dark drum Ah ok, then you can boil it down to a single function where you pass in the cont...

Purely for decoupling reasons if I'm honest, the player controller is where the widget is kept and I need to communicate from the control panel Actor to the Player Controller to display the widget and update the camera name and keep hold of the control panel Actor reference while the player is using this control panel Actor, if I don't use an interface I would have to cast to the Player Controller directly to call the display widget, update name events but then I would be coupling the control panel Actor and Player Controller classes together which I want to avoid because realistically there is no need for them to be coupled like that

dark drum
prime stump
dark drum
# prime stump Im not sure, having inputs (IA_SwitchCameras for example) on an Actor feels wron...

If you aren't wanting to put the input actions directly in the actor, I'd funnel it through the interaction system instead.

If you do this you could remove all 3 interface functions. πŸ˜…

For my interactions I normally pass a gameplay tag through that I can use to control what sort of input was pressed to trigger the interaction. You could have your main (inital) input that starts the interact and then addition (secondary) inputs that can be triggered during the interact.

civic urchin
#

Kind of re asking this here

Inside of blueprint how do I read from a string table to get its entry? The only function I can find returns a string (the function is named source string i think)

I need to dynamically select the text at runtime though

prime stump
# neat stream I'm having an issue with my health shrine logic and replication. When any player...

I would guess its the 'As BP Adventurer' reference, in your BPI_Interaction interface add an input to the Interact function of type 'whatever type your player BP is' called 'Player' or something, then in your server RPC event plug 'self' into the new input, you'll then have a reference to your player BP to be used in the class that implements the Interact event (health shrine in this case), then call HealPlayer using the reference passed through the interface instead of whatever As BP Adventurer is

neat stream
prime stump
neat stream
neat stream
#

NM That fixed it.

prime stump
# neat stream Thank you

No worries mate, this method does however create a coupling between your Player BP and the Health Shrine Actor by passing a direct reference of your Player BP through the interface but if you're not worried about that then this method is fine

neat stream
#

Nothing else should be able to use the shrine except for players.

prime stump
# neat stream I wasn't worried until now. Is there anything wrong with doing it this way?

It really depends on your set up honestly, whenever you create a direct reference to any another class it couples the classes together, if you right click on your BP and click 'reference viewer' it shows you everything that depends on that BP and everything that BP depends on, this means that all classes the BP depends on must be loaded into memory in order for that BP to function correctly.. have a look at 'dependencies' & 'decoupling classes' if you're unsure.

So again whether it matters or not depends because if its just a Health Shrine BP coupled to your Player BP and that's it then it prolly doesn't matter too much, but if you plan to have loads of different actors all implementing the Interact event then they'll all be coupled to your Player BP (shown in the reference viewer).

neat stream
prime stump
# neat stream Thank you for the information. I appreciate it. However, the videos you posted a...

Updated it lol

The solution to decoupling is essentially using more interfaces or creating actor components, if you want to decouple what you've just done you can create a new interface 'BPI_Player' or something, create a function on it called 'Heal Player' that takes a Float input, implement the new interface on your Player BP class, implement the 'Heal Player' event and have it call your 'HealPlayer server RPC' event, then on your BPI_Interaction interfaces 'Interact' function change your 'Player' input type from your Player BP to just 'Character' or 'Pawn', you can still pass 'Self' into the interact function like you already are because whatever your Player BP class is it'll derive from ACharacter or APawn class, then lastly in your Health Shrine BP use the Player reference and call the Heal Players (Message) function on BPI_Player (or whatever you name it)

Doing it this way takes advantage of the base classes (Pawn/Character, which will already be loaded into memory anyway) without using your own custom BP (BP_Player or whatever you've called it) and still being able to call the functions and events on the class without creating a direct reference to the class itself, keeping it decoupled.. this will make more sense after you watch those videos πŸ˜‚

neat stream
prime stump
lost hemlock
ruby ivy
#

how can i make to arrows make look each other

normal furnace
#

Quick question about maps - If I'm looping through the keys of a map, and I want to alter one or more key/values as I go through, can I just add that key back again without affecting the loop, or will any key I add in again reappear again at the end of the loop?

#

AI says this:

crimson briar
crimson briar
ruby ivy
crimson briar
ruby ivy
crimson briar
#

Then do it only for one of them

#

Apply the rotation to the one that you want to look at the other

ruby ivy
#

Okey thanks

hybrid iris
#

after check index 0 loop is getting stopped

dark drum
# prime stump Updated it lol The solution to decoupling is essentially using more interfaces ...

There's a lot to digest but I just wanted to add (for those following the conversation) that you should be careful with overusing interfaces.

It can be the fastest way to make your project unmanageable as it scales. (Not often discussed and overlooked)

It's important to remember that you decouple the system not the elements/components that make up the system. Interfaces can be great for system to system communication but shouldn't be used when communicating between different sections/elements of the same core system.

An interaction system getting information from a stats system. Good candidate for an interface.

An interaction system calling a function on an interactive component. Don't use an interface.

A stats system getting buffs from another pawns stats system. Don't use an interface.

Pretending interfaces don't exist and only using them as a last resort can help foster better decisions when it comes to building gameplay systems and the flow of events.

dark drum
# normal furnace Quick question about maps - If I'm looping through the keys of a map, and I want...

For the most part this is fine. When you get the keys of the map (to perform the loops) the return value is cached so doesn't get any new keys unless you call the function again.

(This is me assuming you're doing a for each loop of the values provided by the get keys function)

Edit: I've just remembered they added a for each loop specific for maps so I'm not sure if it applies to that node as well.

crimson briar
hybrid iris
#

yes

crimson briar
#

This is why it exits after index 0

#

Return leaves the function.

hybrid iris
#

Ok

crimson briar
#

Usually if doing a loop inside a function tto find something you return only on one of the branches - so only when you find what you were looking for. The other branch doesn't lead to anything

crimson briar
# hybrid iris

In your case you probably want to leave the True execution as is. And connect what you have now on False to the Completed pin on the Loop instead

north bobcat
#

how would I achieve this

#

this is so confusing

crimson briar
#

But what do you want to do? Using less with texts is not something you do often

north bobcat
#

its a timer. I want to make it so if the timer is under 5 seconds the color is green and when it isnt red

#

or whatever

crimson briar
#

Then use an int/float for it? And convert to text only for displaying

north bobcat
#

oh yeah

#

my bad

#

I was using the text in my ui instead of the float I already have

#

bruh

north bobcat
#

now my colours arent working

#

dont think thats the same colour

#

why

dark drum
#

I've already found 2 pieces of work on your 'Portfolio' stolen from someone else. Also wrong channels.

#

<@&213101288538374145>

dusky cobalt
#

I have question about Instanced Static Meshes.
If I have 200 actors and each of them has Instanced Static Mesh, and they use the same Static Mesh, is it correct way to use it? Or should I have 1 actor with ISM and other actors add instances to t hat component so they are visible in the 'game'?

crimson briar
#

The point of ISM is to minimize draw calls. If the meshes are instaces of the ISM, they are drawn all at once, which helps greatly with performance.
If you have several ISM, they will all be separate draw calls, even if they use the same static mesh as a base

#

And as to if you should have 1 actor - it depends what it is for. If it is like a building - yes, it is better. But if the actors are independently moving pawns for example - not sure, since all instances of the ISM share some settings and behaviors, like culling

dark drum
dusky cobalt
crimson briar
dusky cobalt
#

maybe simpler question is - is Instanced Static Mesh Component* on each Actor literally the same as just putting Static Mesh on each Actor?

dark drum