#blueprint

402296 messages · Page 954 of 403

craggy hatch
#

how

loud parrot
#

use isValid node

#

macros

gentle urchin
#

repetitive code calls for function/macro

humble sleet
#

@gentle urchin so this (in menu pawn) takes my StartGame function from said pawn and binds it to the click event of the button within the widget

gentle urchin
humble sleet
#

and I don't need to make my own dispatcher

gentle urchin
#

Correct x2

humble sleet
#

brilliant

loud parrot
#

or right click on the variable and chose convert to validation...

humble sleet
#

I was mainly unsure about the Create Event, but I presume it lets you convert an existing function into an event thing that can be messed with using the delegate pin

#

honestly there is so little useful information on delegates

#

at least for beginners

craggy hatch
gentle urchin
#

You also gotta make sure that the event signature matches the dispatcher

humble sleet
#

how so

gentle urchin
#

So if you added something like a float to the dispatcher, you'd also need the float in the function for it to show up on the list of events

humble sleet
#

yep

#

so the inputs have to match

gentle urchin
#

yes

humble sleet
#

or else the function gets given arguments it didn't ask for

gentle urchin
#

Exactly

#

makes sense really

humble sleet
#

👍

gentle urchin
#

You can create the event (and signature) directly in the event graph aswell if you like ofc,

gentle urchin
#

i find that messy after a while, and the red wires going criss cross haunts my OCD to this day

humble sleet
maiden wadi
#

Interfaces are nothing more than the ability to call the same function in multiple classes. You can have the same identical thing with inheriting functions. So in a code base where you can insert that function low enough, interfaces are pointless. In a code base like Unreal, where we have stuff like InventoryItems as UObjects, and then InventoryItems as actors, and light switches as actors, etc that all require the same "Interact" or "Use" function, we have to create an interface and implement it into those hierarchies to use it. Meanwhile imagine being able to just open up UObject's file and add the function you want, then any Actor, or UObject base could just implement it.

loud parrot
humble sleet
#

and I don't have to mess around with strings

gentle urchin
#

yepp

craggy hatch
#

s

humble sleet
#

noice

craggy hatch
#

i think i found

#

i test wait

loud parrot
maiden wadi
#

@fiery swallowTo also put this into perspective. I've been working professionally for over a year now. I've touched one single interface at work, we have a little thing in the bottom right of the screen that spawns widgets that display timers and stuff. Most of these are UObject base, but a couple of them are from UActorComponent. We use some other interfaces in Gameplay code, but I've never once had to use them.

humble sleet
#

hell yeah

#

@gentle urchin my sincerest gratitude

naive stag
#

what is the best way to make a random object to be part of a chunk, so for example whenever I hide that chunk in game, the random object will hide with it.

fiery swallow
gentle urchin
naive stag
gentle urchin
#

Didnt we just have this conversation 4 comments ago 😛

naive stag
humble sleet
#

look up in chat

gentle urchin
#

we others did 😛

naive stag
#

uh

humble sleet
#

squiz and I did

naive stag
#

oh

#

can u reply to the start of the convo please?

humble sleet
#

sec

naive stag
#

thanks

humble sleet
#

here

naive stag
#

uh

#

I still cant find it

craggy hatch
loud parrot
#

this is where you are trying to access a non-valid actor

craggy hatch
#

but i have is valid

amber hill
#

I gotta actor move to loction or action function in a interface that is called when the actor is selected and another condition is met.

This executes but I have another exe I want to happen after the actor is arrived a the location rather than exe it straight away is there any way to do this other than the delay?

loud parrot
#

Get all actors of class is very expensive node, especially if using in a cycle

amber hill
#

Its plural

#

Theres only one per level as its voxel

craggy hatch
#

why is the target component the scene

#

i doesnt have a scene componennt

loud parrot
#

it doesn't matter, it goes through absolutely all the actors in the world until it finds the right one

craggy hatch
#

but its still fails

maiden wadi
craggy hatch
#

oh okey

shut escarp
#

Hello, i have a nametag widget attached to my character and i am using screen space. Is there any way to control the size of the widget when using screenspace? It gets too big when players are far away from each other. I tried adding a size box but it seems to have no effect

gentle urchin
#

Custom code for handling it

#

Scale by distance

#

perhaps it could be done in the material

maiden wadi
#

I made a userwidget and widgetcomponent class combo a while ago, I should add that functionality to it. I originally made it to offset widgets to better point at objects in screenspace. Like widgets hovering over something with an arrow, default implementations don't always point correctly, it requires some slight offset math in the widget. The userwidget was a base class that other widgets could inherit from. The component would pass itself to the widget when spawning the widget too, which meant there was no random requirement to set state from the actor that the component was in. Made it very easy to create nice widgets that could access their actor and have zero references to the widget from the actor itself by doing nothing but dropping the component on and setting a widget class.

ivory light
#

i think i'm bad @ googling but is there a built-in way to do exec pin a, exec pin b -> bool?

maiden wadi
#

Are you looking for an exec input pin to toggle a boolean?

tight schooner
#

@ivory light It's hard to suggest anything without a use case

#

if the graph was inside a function that had a boolean output, you could have two return nodes e.g. with differently set bools

#

If it's in an event graph, I guess you can set a boolean variable?

#

but it's an abstract question either way

ivory light
#

i have two events that both call a function with a single bool arg, event a calls the function and passes true, b calls it but passes false. it's obviously not mission critical but made me wonder if ue had a way to do this lol @tight schooner

deft totem
#

does anyone know how to make the control points of a InterpToMovementComponent visible? Like in this tutorial, only one that I found showing the feature, but neither my testing in various engine versions nor with other tutorials I was able to confirm its existence.
https://youtu.be/TNkX3DdwhQw?t=199

versed sun
#

you want Show 3d widget checked in your vector variable

trim matrix
#

so i could move my artylly up and down with s and w

and i made this https://www.youtube.com/watch?v=TAnzmz2AviY

i can move up and down intil i press f and shoot i can only shoot after i have press f i can not controll the up and down anymore

Hey guys, in today's video I'm going to be showing you how to create a system where the player can see a predicted path for the trajectory of the grenade that they are throwing.

You may want to experiment with the final delay values for spawning and deleting the trajectory line. Lower-end PCs may need it to be slower as it could cause lag. You'...

▶ Play video
loud cipher
#

anyone know how i can have root motion actually move my character?

#

Whenever i play a rootmotion animation, the player mesh only moves, the capsule collision stays in its original spot

fiery swallow
#

also #animation is a better place to get help for this

cyan bone
#

Im animating my soldiers in several places in my event graph. For this im now using a Timeline called Global_Lerp.
However, im having trouble going back to where the Global_Lerp was called from, after the timeline is finished.
Instead what is happening is, the Lerp happens and the rest of the nodes run at the same time.
So how can i only resume the nodes after the lerp is finished?

#

See this rotate to front node calls a timeline that lerps my units. But it doesnt wait, it goes straight to the Get Actor of Class

tawdry surge
#

Macro

#

They have latency (aka will finish before continuing)

faint pasture
cyan bone
#

I considered the set timer. but timeline was better you said 🙂

faint pasture
#

No I said to use tick

#

Anyway, you're probably gonna want a queu of actions

cyan bone
#

tick as you suggested would be great if moving 40.000 units

#

im moving the units inside my squads only sporadically

#

when reforming

#

attacking

#

its not at every tick. its hard to describe this

cyan bone
#

cant find anything

#

this is how i solved this in the past

#

it doesnt look like something a pro would do

#

it would need a new switch for every place i could potentially call the global lerp from

#

and an event to follow up

astral stratus
#

inventory system has to be the biggest headache ive delt with

junior hedge
#

Once it's done it's done

#

:)

limber parcel
#

if inventory system gives u headache already ure in for a world of hurt lol

faint pasture
sudden lynx
#

I am trying to detect whether the Android device the game is running on is a touchscreen device like a phone or tablet, or controlled by a gamepad or remote control like the Fire Stick

humble sleet
#

so I have a menu system

#

and I have a 'menu pawn'

sudden lynx
#

However, GetPlatformName only returns "Android" without being more specific.

humble sleet
#

is it worth moving that stuff to the player controller?

dawn gazelle
humble sleet
dawn gazelle
#

So you're spawning it in the world to get your menu to display?

humble sleet
#

I think so?

#

It's set as the default pawn class in the game mode so I assume so

dawn gazelle
#

So unless your menu is being represented in the world, I'd recommend you move it over to your player controller.

sudden lynx
# humble sleet is it worth moving that stuff to the player controller?

If your menu uses the viewport, like slate and UMG do, then the menu exists in the viewport and not in the world. Therefore it is better to not make it dependent on a thing that might not exist off and on during gameplay (pawn) instead of something that usually exists regardless of whether it is possessing a pawn (playercontroller)

sudden lynx
#

This still makes sense even if your are using a menu.that exists in the world like a widget component on an actor.

humble sleet
#

I may end up making a diegetic (?) menu which presumably would require a menu pawn to contain the camera

sudden lynx
#

Because your pawn could die while the controller is still alive (but maybe you want a menu that loses contact when the pawn dies...?)

humble sleet
#

this is just a main menu

sudden lynx
#

Ok.

humble sleet
#

the player pawn shouldn't die ever since it's a turn-based game

faint pasture
#

What events are bound to it in the menu?

humble sleet
faint pasture
humble sleet
#

and I'm trying to de-tutorialise it

#

originally the widgets were created in the level blueprint

#

thinking about it, if I put the main menu logic in the player controller then it sticks around for the entire game, is that a bad thing?

#

I don't seem to be able to switch player controllers and I don't know if I should want to

sudden lynx
#

Try to put as much menu logic into the menus themselves. Make classes handle their own stuff without having to know how other classes work.

Event delegates are a good way to say " if anything out there needs to know when I do something, then just listen for me to call this delegate. I dont care who or what you are, you will get the signal if you are listening for it."

maiden wadi
#

Personally speaking. UI should absolutely never be referenced by any actors or gameplay classes what-so-ever except for the HUD.

tawdry surge
#

I always stick it on the controller
Hud class I almost never touch

cyan bone
# tawdry surge Macro

"They have latency (aka will finish before continuing)"
Here its not working. It is not finishing.

#

@tawdry surge This is my macro. Its setting up a rotation to my instances. Then starts a Timeline. I need it to only go to the output after the timeline is done.

ocean meadow
#

Hi! I appear to be having an issue when dragging and dropping an inventory item over another item, it completely overlaps it and I guess deletes the already existing item, is there a way that I can get rid of this issue? below is my On Drop and Slot Swap functions.
Thanks!

tawdry surge
#

And it doesn't finish? @cyan bone

cyan bone
#

for context

limber parcel
#

can you even put timelines into a macro?

cyan bone
#

new macro 0 is calling a timeline inside it with Play from Start

limber parcel
#

they shouldnt let u put nodes in places where they wont work lol

cyan bone
#

i mean its not working because it has the issue

limber parcel
#

but u said its not finishing

cyan bone
#

i mean its finishing before the timeline.

#

im trying to make the timeline finish and only then move on to the next node

limber parcel
#

yeah because the timeline finishes instantly

cyan bone
#

macro also has this

#

interesting

blissful widget
#

It's called architecture. Rejecting architecture, more specifically. Everything goes in 1 BP, makes it easier to keep track of it all.

trim matrix
#

Hey Guys

shrewd hedge
#

hey

trim matrix
#

How could go about making a block placement System like Minecraft

faint pasture
#

Input -> Sphere trace in aim direction -> Round the hit location to your grid -> spawn actor there.

echo mist
#

What is the ideal approach in fixing situation where characters are loaded before level is? Because currently they will just fall through the floor that isn't there yet.

echo mist
limber parcel
echo mist
# limber parcel using the gamemode

Well currently the whole game begins with GameMode OnBeginPlay event, but that makes the server fall through the floor meanwhile clients are fine

icy dragon
civic badge
#

in bp I have a single enemy, and I want to have it so the player can provide their own models and stuff, so that when that enemy is spawned, using random chance it will replace the mesh/materials with the chosen one, but how would I go about having the models it pulls from be dynamic?

#

say they have them in a specific folder structure I provide in a specific location for example

sacred canyon
#

wouldn’t you just have an array of possible options and randomly get one from that

civic badge
sacred canyon
#

idrk what you’re using this for but you can add to arrays if needed

limber parcel
regal iris
#

so i want to make it when the player walks then this knife model i have in the BP_FirstPersonCharacter kind of moves around a little bit because it feels a bit to static and i was thinking maybe i can do this in blueprint but i don't know how i would implement it

limber parcel
#

thats a really good question, i want to do something similar for my wisps

civic badge
limber parcel
civic badge
#

nw

limber parcel
#

basically u just need to keep an array of models in your gamemode or something

#

and when a new model is loaded you add it to that array

civic badge
#

how do I set the array of models to correspond to a folders contents?

#

so if it has 3 or 4 meshes it still adds them to the array

limber parcel
civic badge
#

so probably need c++ then ig

sacred canyon
#

yeah there’s uh damn I can’t remember the name but a built in plugin for file tools

#

I needed it to get save files from a folder without using a specific name

civic badge
#

ahh I think I can just set naming conventions and use match wildcard string with get actors of class to get what I want roundaboutly unless I am mistaken
I was lmao

zealous moth
#

Is there an input method to detect mobile device orientation or shaking?

trim matrix
#

Hey Guys

#

How to Raycast with infinite distance

zealous moth
#

Raycast? This is not unity

#

We trace here

civic badge
#

who's gonna tell them 💀

harsh tartan
#

This is embarassing but i cannot for the life of me figure out how to make a gun actor that my character can hold. I cant figure out how to create such an actor, and then put it in my characters "hands", (not with animations or snapping to a hand mesh i just want it to float)

#

Anyone got a guide to that kind of thing?

#

If anyone recognizes me from other recent questions, this isnt about what i was trying to make then, Ill get back to that. This is for practice

#

I may be a relatively early computer science major in any case, but for some reason im struggling pretty bad to understand how unreal engine communicates between all its pieces, like how i make all these systems available to me talk to eachother ToT

visual crest
#

When I try to make my interface into an event this happens why?

trim matrix
warm summit
#

I am following the Epic created Your First Game in Unreal 5. I have created my Character BP, Player controller etc and it all works just like the tutorial. Following that the tutorial has you drop instances of the character into the level and assign an AI controller with a simple AIMoveTo node in it.

I have dropped characters in the level and assigned the AI controller, have created the Nav mesh, and Print Strings in the AI controller show me the Move to Note is firing. but when I play the game they never do move. Is there another detail I am missing????

trim matrix
#

Like in fortnite how are you supposed to make sure the trace hits something

visual crest
trim matrix
#

Like in fortnite long shots

visual crest
#

you can set distance to insane distancess

#

but if infinite you can shoot at sky and cause a infint loop

#

which = CTD

trim matrix
#

Unity has that option

visual crest
#

well maybe I am wrong then

trim matrix
visual crest
#

¯_(ツ)_/¯

#

When I try to make my interface into an event this happens does anyone know why?

junior hedge
#

how often is event hit? every frame?

visual crest
#

I got it I forgot to compile the interface

#

<-Face palms

trim matrix
visual crest
# trim matrix But then how do games like fortnite trace bullets?

https://www.youtube.com/watch?v=yOoFUOiZEKQ&t=340s has what I think your after he sets up a trace using vectors in first half of tut

In this video we go over adding a simple teleport ability and also add a cool zoom in/out effect to really complete the ability.
If you have any questions or comments please let us know. If you like the video and want to see more, go ahead and subscribe. Or consider supporting us on patreon https://www.patreon.com/titanicgames for more great tu...

▶ Play video
zealous moth
#

@trim matrix no you cannot. You can trace to the max float limit

trim matrix
#

Which distance would you use?

zealous moth
#

Are you using a projectile or an on trace hit deal damage?

visual crest
#

When my char gets hit I want this to knock the char away what nodes would I use for this

zealous moth
#

@trim matrix use a high float number like 999999. Most games fudge it with a range limit on weapons

#

Infinite cannot exist in computers since computers are finite

visual crest
zealous moth
#

@visual crest pawns are actors

#

They inherit actor properties

visual crest
#

I could cast to a specified actor but I want to make it so players can choose dif chars

zealous moth
#

You should only need to cast if needed. General actor properties don't need casting.

visual crest
#

needs a specified actor

dawn gazelle
visual crest
#

ok then how do I get it to move my currently controlled pawn

dawn gazelle
#

You'd have to cast to something higher than pawn as pawns do not have any primitive components by default.
If you're using Character as a base for all your characters, you can cast to character and get its Capsule Component and then add impulse to that.

visual crest
#

No my pawns have completely different animations and stats so I do not have a base chara like BP_Thirdpersonchar I have stuf like BP_YIN BP_JIN BP_ZIPY

dawn gazelle
visual crest
#

ok that sound do able but I have no clue How I would do that

#

What I know of Interface massages cant do that

dawn gazelle
#

If you use interfaces then you'll basically be adding more work for yourself as you'd have to implement the event in each one of the blueprints you've made and any future ones. You're better off having a base class that has the functions and properties that are shared among all characters.

To create a base class, create a new blueprint based on pawn. Add something like a capsule component or some other form of collider that has physics enabled. Reparenting is done in the class settings of a blueprint:

visual crest
#

ok now what?

dawn gazelle
#

Go into each of your classes that you want to add impulse to and set their parent class to your BaseActor class.

#

Looks like you might have trouble though as your "YinPlayerCharacter" looks as though it's already a Character class which is higher than pawn.

#

If you're using a Character class, then all you need to do is cast to Character and get the Capsule Component from it.

visual crest
#

Yea

#

Like I said I have many of them

#

can't just cast to one

#

and re parenting broke it but good

#

glade I made a copy before I did that or man that be hell

#

O well I am going to bed I'll have to try and figure out something els later

#

Thanks for the help

trim matrix
faint pasture
#

Or get component by class primitivecomponent and apply impulse

#

Although if you have actual Characters, they can already recieve an impulse

foggy sundial
#

is there a good way to scan my project for issues like this

gentle urchin
#

A non existing variable? No

foggy sundial
#

unfortunate. it's annoying that refactoring leaves little "suprises" like this instead of refusing to compile

gentle urchin
#

Doesnt it give you any warnings?

foggy sundial
#

Nope. I found this little gem after a couple hours of debugging

solar sequoia
gentle urchin
#

Would it then be an issue at all, beyond the visual existence ?

#

Doest look like something that would need debugging

#

Not for the purpose of finding that atleast :p debugging why the array was empty, sure

long whale
#

hello, new to procedural mesh. Is there a possible reason why generated mesh not displaying textures correctly?

#

sometimes but not always, normal/roughness map not displayed

tight schooner
#

@foggy sundial fwiw you can mark functions, variables etc as deprecated and that can help track stuff down before removing it because the compiler will give warnings. There's also some "search in all blueprints" tool

#

I try to resolve all those dependencies before removing stuff

gentle urchin
#

That sounds like a good tip

#

It also helps wrapping this into functions

#

"GetInventory" etc

trim matrix
#

how do i link the change of editable text on a textbox in a different blueprint

gentle urchin
#

Regular bp communication methods

trim matrix
strong turtle
#

Hey, this is my solution for custom gravity with the standard charactermovementcomponent, but it doesnt seem to replicate smoothly, anyone got an idea to make the velocity increase more interpolated?

surreal peak
#

Nothing you do with the CMC outside of it, especially in BPs will be smooth tbh

#

If you want this smooth, CPP is the needed solution

#

The replicated gravity from the GameState is also a factor that will cause corrections

#

It doesn't guarantee that server and client use the same value in the same move

strong turtle
#

btw, when opening a c++ file from blueprints, it only brings up the .h file, where do u find the source file?

junior hedge
#

It should open the cpp file

#

What exactly are you trying to open?

#

Just go to the explorer of the header they are in the same folder if you are talking about an actor

#

@strong turtle

strong turtle
#

Gonna try after work today but it always opens just the header file when i open character.h for the cmc, and in the solution explorer in visual studio there's nothing

junior hedge
#

Did you create the character yourself?

gentle urchin
#

Tried right clicking and go to definition?

strong turtle
strong turtle
dapper bramble
#

Hello everyone!

Interface/Architecture question:
I have a pawn that is being moved by forces.

I have another actor that is applying external force to everyone who implements a certain interface (think of a bounce pad).

I want to temporarily disable the ability to use force to move the pawn while the pawn is being bounced, but since I am using an interface I don't want to explicitly cast to the pawn and toggle some bool or something.

Is there an elegant way to do this without casting to the specific pawn?

gentle urchin
#

On bounce -> set bool true
On tick -> check velocity or whatever to figure out if it should be set false again?

#

Hard to say without knowing some context 😅

#

Are they all vertical bounces?

#

When can it be applied again? On Landed?

#

Or when z velocity goes below 0?

rapid robin
#

Hello team. I need to do a large number of automated hi res pretty promo screenshots. It is a static scene.

Is there any benefit of using Sequencer over doing it in blueprints via the TakeHiResScreenshot node with a CineCameraActor plugged into it?

icy dragon
rapid robin
icy dragon
#

Stuff like TAA, motion blur, and others, yes.

rapid robin
icy dragon
rapid robin
#

Because the logic of setting up each character (with lots of different armor combos) is happening in blueprints.

For context: I need to produce a large number of promotional/pro best quality images with a large number of possible hero/armor combos.

icy dragon
rapid robin
#

There are no animations, all still poses

burnt rover
#

is placing actors in a level a valid way to avoid some of the performance hit when spawning at runtime? i'm developing for mobile and i get a lag spike when spawning some things for the first time. i do have Async Loading Thread Enabled checked but it hasn't helped much. i feel like there should be a better way than having them all at 0,0,0 hidden or something

icy dragon
rapid robin
tawdry surge
#

@burnt rover instanced static meshes will help with draw calls. If the creation is killing your frame rate, you could try pooling objects as well and instead of destroying things and spawning new ones you just change visibility and move them around

maiden wadi
# burnt rover is placing actors in a level a valid way to avoid some of the performance hit wh...

Also, just enabling an async thread won't actually cause things to load async. It just enables the ability to load things Async. You still have to do that by correctly using softrefs and loading the class Async to then spawn it.

Also, loading an actor class Async won't help if you either have a huge actor class and are spawning several hundreds/thousands in a single frame. Or if your actor class has a lot of heavy sounds/textures which get blocking loaded from softrefs.

rapid robin
#

@icy dragon or anyone else that understands rendering/screenshots/Sequencer:

From a conceptual/high level PoV, how would I go about setting up a sequencer camera and telling it to take a screenshot in blueprints? (as an alternative to the TakeHiResScreenshot node)

gentle urchin
#

Well theres a manager assigned to it, in which you can trigger events 🤷‍♂️

gentle urchin
#

Youd add event notifiers to the sequence which would trigger an event in the manager, providing a reference to the scene actor. There youd set up one function call on the actor to an armor set/combo, then trigger a highres screenshot

#

Repeat for the nunber of screenshots you want?

#

If its all static except the armor im not sure id sequence it

#

Havnt used the highres screenshot node before tho, is it slow?

#

Like, latent ?

#

Doesnt look to be

rapid robin
#

The highres screenshot is a little laggy on my computer if I bump the resolution up to around 8K (poor thing only got a 1060), but in this case that's actually not a problem. As I'm also able to detect in blueprints when it's done. So can just wait for it to finish.

In other words, speed isn't important here.

rapid robin
gentle urchin
#

Got no good suggestion for that im afraid

cobalt bluff
#

Hi everyone I am trying to reach references of other components attached to an actor from a component how can I do that?

rapid robin
gentle urchin
rapid robin
trim matrix
#

i feel like its so easy to change text with variables but it doesnt do it

tawdry surge
#

@cobalt bluff components are meant to be independent of one another, and ideally the thing they are attached to.
If you need multiple components to communicate with each other, id rethink my approach

gentle urchin
#

Cmc uses capsule :p

cobalt bluff
#

I see so maybe I should inherit from the component I want to communicate

gentle urchin
#

Probably not

#

Which components do you need to comnunicate?

cobalt bluff
#

Scene capture component 2d

gentle urchin
#

For the purpose of?

cobalt bluff
#

I will add some actors to hidden actors automatically

#

but there different classes that has scene capture component2d

#

so I was thinking of creating component and add it to wherever I want

#

For example in character bp character movement has the reference of capsule right? How can I achieve that?

gentle urchin
#

GetOwner->GetComponentOfClass

cobalt bluff
#

is there a way to do that in blueprint?

gentle urchin
#

Thats how

#

Thats the blueprintway

cobalt bluff
#

ok thats perfect thank you