#blueprint

402296 messages · Page 795 of 403

grave relic
#

Exactly :p

#

Never played it just got inspired to try something new

desert juniper
#

looks like an ad for one of those '99.9% of people wont beat this level'

#

but then the game is something completely different

obtuse lotus
#

😂 nah man its a coolmathgames classic

desert juniper
#

that's what they want you to think fry

odd ember
#

is this that roblox thing

vocal bobcat
#

Are there any gotchas with passing an array from client to server function? The same pattern is working fine for non-array type parameters, like PlayerName which is a string, but when I pass an array of SkeletalMeshComponents for instance, the server doesn't seem to get them. If I print out the values that the server "receives" inside the function I'm calling it shows different values than what was passed.

unique yoke
#

Watching a tutorial and the instructor does a simple trace feeding it the Get Actor Location of the player capsule as the start, and the ((forward vector*100)+Capsule location) for the end. I’m a little unclear on why he added the capsule location to the forward vector result.

At first I thought it’s because the forward vector is in local space from the player but the epic documentation says they’re both in world space. Unless I am misunderstanding that term.

maiden wadi
#

@vocal bobcat What you're passing is an array of pointers. The component itself has to be replicated, and part of a replicated actor or the server won't know what object you're talking about.

#

@unique yokeForward Vector is a 1.0 length vector. It is a point that is 1 UnrealUnit distance away from a ZeroVector (0,0,0). You use this to point in a direction. Multiplying this vector by 100 turns that 1 length to 100 length. So say you're facing the X direction in world perfectly. Your vector would be 1,0,0. Multiply each of those three numbers by 100 and you have a vector of 100,0,0. In world space, this is only 100 units away from the world center though. So you displace this vector away from the world center by adding it to the capsule's current world point. Now you have a point that is 100 units away from the capsule's location in the direction of the original ForwardVector.

unique yoke
#

Thanks! The addition is what’s throwing me off since both are in world space? Why would the forward vector result need to be added to the actor’s location? Maybe I have the definition of world space wrong. I assumed by it being in world space the forward vector result starts from 0,0,0 (world origin) and not the player origin.

full elm
#

Does anyone know how to replicate camera rotation, other than unlocking pawn rotation by pitch? Talking about an fps camera

maiden wadi
#

@unique yokeBecause the forward vector isn't in world space, it's a local space direction.

odd ember
#

when dealing with a vector direction/unit vector (vector length 1), spaces don't matter

#

it's not a physical location, it's a translation of a rotation

#

so when you're creating a range from a unit vector, you're saying, "I want to move x amount of units in that direction". you then add it to a location to say "I want to move x amount of units in that direction, starting at this position y"

unique yoke
#

Got it. I think I confused world space with the concepts of whether or not the vector was starting from the world origin.

#

Is there a term for what I’m talking about? Relative vector vs …

odd ember
#

layered spaces exist

#

it could be that the rotation of a capsule is different than its root component, making a relative rotation difference. that would mean that the capsule directions will be relative to its rotation, and not the same as the actor rotation

winged sentinel
#

If I were to have a bunch of actors like a wall actor and a door actor to make modular building out of, would there be a performance drawback using BP vs having regular Static meshes?

odd ember
#

so generally you can think of spaces as being absolute or relative. and for each type of physical space, each will have absolute and relative locations

odd ember
winged sentinel
odd ember
#

yes

winged sentinel
gentle urchin
#

World location is relative on the worlds 0,0,0 location. Local would be relative to the actors position, which in turn is relative to world

#

If an actor is at 100,0,0 world position, A local position for that actor of 200,0,0 would be at worlds 300,0,0 position

#

If that makes any sense 😅

prisma pebble
#

I feel like I've been making the same noob mistake for years, somebody please explain to me the correct way to rename/reorganize one's content browser?

#

Say for the sake of example, I migrate content from one project to another, how would I rename the migrated content to obey my naming convention without crashing my entire editor?

odd ember
gentle urchin
odd ember
#

world to level(s)

gentle urchin
#

Ah

#

Ofc.

odd ember
#

I had to prove this through math/logic to a programmer

#

that relative world existed

gentle urchin
#

I dont think i've experienced world relative yet ? Level(s) as in streaming levels ?

#

It makes sense for it to exist tho

odd ember
#

if you open a level, its world is relative to the levels origin

#

if you open it as a sub level, it is relative to the parent world's origin

gentle urchin
#

Isnt this handled by the engine and world abs so you dont need to worry about it ?

odd ember
#

that you don't need to worry about it doesn't mean it doesn't exist

gentle urchin
#

True that

odd ember
#

if you open a level as a primary level and edit an actor's position, then save that level, then open a parent level and import the previous level as a sub level, that actor will still be relative to the previous level's origin, but the previous level's origin will be relative to the new parent world's origin

#

you could say that world relative is "level" space technically

#

on the regular, UE doesn't make a distinction between these and treat both as "world space". but it matters if you start spawning in levels at specific coordinates

#

equally if you would have to move things between levels dynamically, it could also start mattering

#

but there is very little exposure for BP on this particular topic

#

perhaps for good reason

gentle urchin
#

Maybe ill see more to it in cpp at some point

#

Ty for the info/elaboration👌

trim matrix
#

Is it possible to animate and use ui elements with the game paused? Like for example pausing the game and popping up a ui window that plays a short video then unpauses the game.

split dagger
#

Does anyone have a link to a good tutorial on RenderToTexture? I'd like to put strings and other things on a models material.

shadow crescent
#

is there an efficiency cost difference between collision boxes and line traces?

odd ember
#

yes

#

by orders of magnitude

shadow crescent
#

line traces more expensive?

#

I am build a city and working on traffic and pondering ways of having thousands of cars not cost too much when they're making logic choices

odd ember
spark steppe
#

they have to be evaluated each tick^

shadow crescent
#

oooh, I expected it other way around

odd ember
#

a line requires two points, a box requires... 9?

spark steppe
#

yes, 8 corners and 1 for the lord

odd ember
#

1 for the center afaik

shadow crescent
#

good to know!

odd ember
#

a sphere is the cheapest non linear shape

shadow crescent
#

so line trace is then 🙂

odd ember
#

then capsule, then box

shadow crescent
#

for the cost of one box in front ... I can measure 4 sides (with line trace)? lol

odd ember
#

roughly

spark steppe
#

the real question is what kind of decision you are talking about

trim matrix
#

So this isn't a good idea then?

spark steppe
#

your cars gonna have collisions anyways, so i wonder what you want to deal with

trim matrix
#

Hmm is a good way to do enemy sightline to build a collider on the actor bp and set it x distance away from the sprite, and if the player is overlapping it attack?

odd ember
#

a sphere going over those points might be cheaper than 4 line traces

shadow crescent
#

I once heard an unreal dev complain that too many gates are bad, but I have always wondered, how many gates IS too bad?

spark steppe
odd ember
#

what do you mean by gates

#

the actual flow control gate?

shadow crescent
#

logic gates

trim matrix
#

Wanted to ensure the enemy can see the player even if they are above or below them

odd ember
spark steppe
#

so you want them to notice the player through walls/ceilings/etc.? then you can use a sphere collision

odd ember
#

there's a bunch of stuff you can check before even having to line trace

shadow crescent
#

we do the least likely checks first, right?

spark steppe
#

i would do cheap checks first

shadow crescent
#

this is how I do it, so it has a chance to ending earlier if it cannot complete

#

ah, I will mix in the cheaper vs expensive checks

odd ember
#

is the player within vision distance? is the player within vision cone?

trim matrix
#

Its a 2d game with somewhat basic enemies. Either they are melee only and only attack if x distance to x distance away or they are both and do one or the other if in range of one or the other

shadow crescent
#

I loooooooooove pondering logic

odd ember
#

but before then it doesn't make a bunch of sense

spark steppe
#

or just use the tool the engine gives to you :>

#

it's less likely that you'll come up with some better solution

odd ember
#

nah it's worth trying to create your own system

#

forces you to think about things

#

also gives you full control over what you're doing

#

and even if that system is shittier, maybe the next time you do one it won't be

#

the engine isn't infallible either

#

perhaps especially in the AI department

odd ember
#

thank you for coming to my ted talk

shadow crescent
#

looooooooooool

#

and thank you for the tips!

trim matrix
#

Cool

prisma pebble
#

sorry if wrong place to ask, but I really would like to know how to rename things without the editor crapping it's pants lol

#

like renaming a blueprint in general just breaks things and I've never been able to figure out why in my years of using the engine. Though admittedly, I also know very little about how UE handles dependencies under the hood.

icy dragon
somber panther
#

Anyone knows how to set up blueprint for projectile to move in center of crosshair?

prisma pebble
icy dragon
prisma pebble
#

avoid renaming folders with several types of asset in them? I have content from a way messier project I want to reorganize and clean up and I can't rename the folder for one of my larger systems without an editor CTD

prisma pebble
odd ember
prisma pebble
#

same idea for moving content? sorry, I've always used this engine as a scene editor, never really cared about proper naming conventions or consistent organization beyond what I needed to be able to navigate.

odd ember
#

fixing redirectors saves a bunch of pointer nonsense

#

which may well take up extra memory as well

terse elm
#

anyone know how to get favorite nodes to show up on right click in graph editor? ive edited the palette but they still dont show up on right click. guess its a setting somewhere.

#

nm found it!

austere aspen
#

What are the best resources to learn how to create a game that has upgrades to do automated tasks that the player would need to do manually? Like where would be a good starting point for that? I legitimately have no idea what kind of search terms I'd use to find something like that, so any links or help would be greatly appreciated.

odd ember
#

isn't an automated task from the player's perspective just that whatever is being produced just spawns after some time?

#

instead of the player having to manually produce it?

austere aspen
#

Something would need to be there instead of the player doing it themselves, I'm not sure what though, as it might just be a timer with random intervals

odd ember
#

I mean what would need to be there?

austere aspen
#

Actually yeah coming to think of it that makes sense

odd ember
#

I'm thinking if the player has to press a button to do the task

#

or if certain resources are required and then a button has to be pressed

#

maybe that could be upgraded to only needing the resources

modern musk
#

Anyone know how to get the world location of a child actor (outside of walking up the chain, getting the parent's location and then offsetting based on chlid)? seems like "GetActorLocation" just returns the child actor's relative location?

odd ember
#

then you could consider conveyor belts

#

no but I would recommend not using child actors

#

and just spawn actors and use attach actor to actor

austere aspen
#

It's like a shop counter, a customer comes up and the player would need to go behind it to check out the customer. An employee would automate it so I guess it'd just be some kind of timer

odd ember
#

well if you want to do that

#

the customer could have queries

#

and the employee just responds to the queries

#

customer wants 1 wheel of cheese. employee checks stock. if it's there, sells wheel of cheese. otherwise either says there is no wheel of cheese or produces one etc.

#

that's more AI though

austere aspen
#

yeah, do you know of any tutorials that have that kind of thing?

odd ember
#

nope

#

I can't imagine it being very complex though

#

a query is just a data object

austere aspen
#

I'm sure it's not, I'm just not a programmer person 😅

odd ember
#

inventory could be a room. make a collision that fits the room to check if any items of the type are in the room. sell them

#

some BT logic and presto

#

ok I do make it sound a bit simpler than it is

#

I remember learning BTs was hard

austere aspen
#

aight I'll try some stuff, thanks

odd ember
#

do feel free to ask more complex AI level stuff in #gameplay-ai though

worthy rock
#

Will the compiler optimize these TrapDoor references into a single get and not three separate ones?

maiden wadi
#

@worthy rockThere is no such thing as a single or multiple get. They're all multiple. Even if you use the same node in the graph and attach it to three things, it's still three calls. Also doesn't matter because getting a pointer is probably the cheapest thing you'll ever do.

worthy rock
#

I guess I'm just scarred from using SGI's IDO 5.3 compiler for C. (It required a lot of hand-holding back in the Nintendo 64 days)

#

There's no reason not to do simple logic in BP right?

#

Like moving meshes around. Trigger Volumes, etc.

#

From a performance perspective?

gentle urchin
#

Movement should be done in c++

#

Door interaction? Bp could be just fine

#

Depends on a million things really

worthy rock
#

Does the engine tell you how long a BP took to run?

icy dragon
worthy rock
#

Is there a video or doc that goes into more detail where BP shines and what scenarios to avoid doing in BP?

icy dragon
odd ember
#

so, cpp masterrace, bp peasants, got it 😉

#

aye true

worthy rock
#

This BP will run every 1-2 minutes. Which opens or shuts a door. Theoretically, I might have 20-50 of these. And only 30-50% of those will actually activate at a given time.

#

Is this the kind of thing I should do in cpp?

odd ember
#

it's got a timeline

#

so probably not

#

also no, not at all

#

your usage parameters are way too infrequent

worthy rock
#

Thanks for the input everyone!

#

Much better approach than the Nintendy 64 devs: Hack the code into whatever strange syntactical ways you can think of to make the compiler run good.

gentle urchin
#

Stat uobjects is also helpfull if you got a ton of bps or heavy functions running on tick or tick-like

#

But there's probably more in depth profiling tools avaliable

#

Havnt explored then all yet

#

Trying to avoid the itch of optimization

#

Beyond the basic 'dont do stupid stuff on tick' kinda thing

glacial eagle
#

Anybody managed to get a BP Macro to properly determine wildcards for TMaps?

#

Doesn't matter what I do with it, it can't seem to figure it out properly

gentle urchin
#

Doesnt work very well, no

#

Could prob do some c++ macro for it

glacial eagle
#

Yeah it's a lot of C++ for one node though

worthy rock
#

How much C++ is it to fix their booboo?

glacial eagle
#

Not really sure, the C++ TMap functions have some very bespoke markup in C++ as it is

#

Works perfectly fine with TSet though, despite it being the least useful of the containers

#

Presumably it can't parse nested wildcard properties

odd ember
#

a for each map macro is a bold attempt though

glacial eagle
#

Can probably get it working with custom C++ but urghhhhhhhhhhhhhhhhhh

#

custom nodes is arse at the best of times

odd ember
#

right there with you

gentle urchin
floral drum
#

How would I go about limiting the rotation to a -90 to 90 on the character sprite? so when I move the character left to right he just free spins from the axis value from the input. im working on like a 2.5d game

gentle urchin
#

Are there any inbetween state?

#

Like.. 0?

odd ember
gentle urchin
#

Could it stay at 0, or would it always flip completely?

random plaza
#

here's my code for dialogue box options, is this considered spagetti code or am i doing the right thing? i cant find a way to have it all be one thing since its a different text for each copy

floral drum
gentle urchin
#

Clamp float could definetly work

floral drum
gentle urchin
#

If its a fluid state between 90 and -90

random plaza
#

what would you recommend i do instead of this?

floral drum
#

@gentle urchin clamp float beofre make rotator?

odd ember
random plaza
#

only problem is that the reason for all the nodes is because its setting the variables for 4 different buttons, but i'll try that

gentle urchin
odd ember
random plaza
#

ok, cool. i'll do that

floral drum
#

@gentle urchin clamp float isnt doing anything 😦 lol

gentle urchin
#

It is

#

Show code :)

floral drum
odd ember
floral drum
gentle urchin
#

What in the world happened, this is not what i described 😅

#

Also win+shift+s

#

Shortcut for snippet

#

Avoids screenshotting your discord etc

#

Guess my description was bad

#

Its not easy talking in bp's with just text imo

floral drum
#

Yea I know, also am kinda newish. been learning the unreal for the past 6 months. still learning the core

floral drum
gentle urchin
#

The rotation of the paper flipbook would be local

trim matrix
#

https://youtu.be/Rr9gYK50IuY @floral drum this really helped me

UE4 2D Platformer:
In this playlist, we'll create a simple 2D platformer in UE4 using the Paper2D systems inside of the Unreal Engine.

Consider supporting the channel on Patreon: https://www.patreon.com/devenabled

Chapters:
00:00
00:10 - Intro
02:17 - Project Setup
03:00 - Default Window Location
04:02 - Auto Exposure
05:33 - Folder Structur...

▶ Play video
#

In the video he does the flipbook rotation on the entire capsule and sets the camera to use pawn rotation, and checks the x velocity on tick to see if you are going left or right and sets the flipbook as needed

steel zealot
#

Hey guys. Im trying to figure out why my 'Return to Game' button in my in-game settings menu isn't working. We have a pause key button mapped and that works fine, but I want to add a button as well. Here's the BP. Any thoughts would be appreciated!

floral drum
#

@gentle urchin when I type get local rotaion I get "rotation in local space"

woven saddle
#

I have the weirdest bug ever, never seen something like this.

Basically when I call a custom event, I just change the materials for my mesh, but for some reasons it spawns a gigantic version of the skeletal mesh instead lol

#

but then I do the exact same thing in another custom event and it goes fine

#

no idea what's going on

#

funny af though

#

they're the same mesh reference too

gentle urchin
#

The stuff ur showing doesnt change mesh tho

woven saddle
#

exactly

#

it's so weird

#

let me try to get a clip

maiden wadi
#

@steel zealot Why the widget creation that's not being used? If you have a function that already has the logic you want, don't redo it. Make both inputs call the same thing.

desert juniper
#

Looks like you're trying to hardcode data in a BP that should be left to data containers instead

#

that's no bug.. that's a feature

#

😉

woven saddle
#

but it's really weird

#

I'm trying to debug it

#

and honestly having a bit of a hard time

desert juniper
#

honestly though, that looks awesome

random plaza
desert juniper
#

@random plaza Anything that can hold the data for the dialog.
Json, csv, etc

maiden wadi
desert juniper
#

then make a BP that parsees it and branches and acts accordingly

#

oh, is that not for the dialog choices? my b

keen wedge
#

Hi all, quick question...

I have a widget blueprint on which I wish to expose to an array (instance editable). I want the designer to be able to set the values within the array, but not add more array items. I can't seem to see any options to do this? Is there a way to limit the size of the array when its exposed?

#

Use-case is allowing the designer to set the text for a boolean option, so they can configure "Yes / No" or "On / Off" etc etc... but obviously I dont want them adding 3+ options.

random plaza
#

i just wasnt thinking, and i coded this earlier on in my project. i have the actual dialogue not stored on data tables, but inside of a array on NPCS themselves.

maiden wadi
mint magnet
#

Is it possible to use Breakpoints when using Interfaces? This Blueprint functionality works but the Breakpoints do not trigger.

maiden wadi
keen wedge
maiden wadi
mint magnet
maiden wadi
#

I'll double check but I'm 99.9997% sure it works.

desert juniper
keen wedge
maiden wadi
#

@mint magnet Breaks fine.

desert juniper
#

rooThink1
yeah other solutions seem kinda hacky, but sometimes it's what you have to go with 🤷‍♂️

mint magnet
#

I wonder what I'm doing wrong

maiden wadi
#

Initial guess would be bad pointer.

keen wedge
#

Thanks for the sanity check guys, and happy new year... see you again soon (when I have my next problem! :D)

mint magnet
#

I got my Character BP and the FlashlightBP is a Child Actor inside of it.

zealous fog
#

If I want to give enemies the same abilities as my main character (for example, the jumping or jetpack ability) how would I go about it? I cant really just make it a child, because it wont have the same events since there is no input from the ai, or am I missing something simple?

worthy rock
#

Thanks for linking these. That video is great! Cool seeing BP beside x86. So much more complicated than mips asm.

shadow crescent
#

does it matter that I am getting doubles?

terse elm
#

anyone know why my nodes grey out when selecting any node. its not in a function or anything. its like i toggled a setting on accident. i click any node and all the rest that arent connected grey out

#

its only happening in certain bps as well.

#

maybe ones with macros? hmm

terse elm
#

hmm interesting. is that a per bp setting? let me check

maiden wadi
#

It is.

terse elm
#

ahh k. wonder how that got set. i dont have a hotkey for it

#

and default is not checked hmm

#

oh musta clicked it up top. weird

#

thanks for the help

maiden wadi
#

Turned it on a few times myself by accident. 😄

terse elm
#

yea i musta clicked on accident. it didnt really bother me, cause it started happening when i was going hardcore with macros and i thought it might be related. then i checked another bp and i was like... waaait a sec

#

while we are on the subject of unrelated/disabled nodes: do you know of a way to set a node to disabled/enabled without setting a hot key?

maiden wadi
#

None that I know of. Can't say I've ever used it. I just delete the original three anddisconnect ones I don't use.

terse elm
#

yea lol thats what i do

mint magnet
#

@maiden wadi after restarting my project the Breakpoints worked. 🤷‍♂️

maiden wadi
#

Haha. Odd.

mint magnet
#

Was driving me crazy. I recreated the logic in a new scene and it was working.

#

The good old turn it off and turn it back on trick.

sonic oak
#

Alright I'm going crazy. For some reason Add Controller [Yaw/Pitch] Input doesn't work, even though I can confirm I'm giving it non-zero values.
I just have the custom PlayerController which has the inputs, and a Character which actually does the movements.
And I have this checked on the Spring Arm Component https://i.imgur.com/jsbCSyr.png
And even tried it on the Camera https://i.imgur.com/x7kqf3A.png

Nothing seems to work Sadge

#

It was working when the input was in the Character's class, but I wanted to move it into Player Controller and then it broke 😛

lapis helm
#

I don't understand why unreal won't let you make local variables for events, is there a good reason behind this limitation? ( don't tell me because they're part of the EventGraph, that's a user interface issue which we can have workarounds for... )
I can literary set temp variables and use them, why not allow local-for-event variables? not having them makes the graph messy as hell!

raw karma
#

Has anyone attempted to program taking a picture in game? My character is a journalist and I've been hunting for tutorials on how to create an ingame system where the player can take a picture and that image can be stored and shown in a journal, but haven't come up with anything.

Any guidance would be greatly appreciated!!! Thannk you so much!

mint magnet
#

@raw karma I'm about to start working on the same feature. Let's keep in touch.

icy dragon
warm ermine
#

Any videos about communicating from player to training dummy blueprints about fighting-style grappling?

icy dragon
icy dragon
warm ermine
#

@icy dragon That works - Thank you 🙂

tight schooner
# lapis helm I don't understand why unreal won't let you make local variables for events, is ...

I suppose the answer is ideological (maybe not the right word but regardless)... A function is meant to execute the instant its called, and when it's done and produces output, its internal state is destroyed. A local variable makes sense because it can't exist outside of an instance of a function being called and executed — it's local. Whereas with an event graph, you can have lines of execution criss crossing every which way, and latent nodes like Delay. There are fewer rules and thus no context for something being local.

#

It does mean I end up making variables that are specific to events, so yeah, I feel your pain ofc

lapis helm
#

Do you have a proper naming convention for those variables?

tight schooner
#

I'd like to know that as well, lol

#

If there's some industry standard convention

brazen merlin
#

camelCase for local and PascalCase for public is what ive always used, cant recall if i picked that up on the job or from somewhere else

#

unreal doesn't make it too friendly to view in bp though, so i tend to just use whatever for local since they never go outside of that function. Like a single letter or abbreviated term (dmg for local vs damage for public)

gentle urchin
#

I usually just do localDamage in that case, even if its silly

candid nest
#

Hey guys i watched the matt apaland chasing ai vedio i want to make a system like subway surfer in which ai swipe the lanes as well as it get away after few seconds can anybody help me out there

late blaze
#

Hey I have an issue when it comes to the math expression node. It doesn't want to work if the formula is something like N^3. Any solution to this?

tight schooner
#

iirc exp or pow is possible in a math node

#

There's always N * N * N alex

icy dragon
lapis helm
#

What?, I meant naming conventions for variables tied and should only be used in specific events

#

Like a prefix

icy dragon
#

Still the same answer.

terse elm
#

is there a way to prevent being able to influence the character during a Launch Character. I set ignore move input before calling launch character. moment i finish the launch, i cant move (as expected), but i can still influence the direction during the launch even with ignore move input

plucky copper
terse elm
#

i turned that to 0 before i started (and checked after). still getting the control, and my char is grounded, or at least thats what i thought

#

hrm very interesting/tricky lol. wonder whats up.

zealous fog
#

I spent a half a day making an interface work that would send properties to a spawned projectile

#

Yesterday someone told me you can just expose those values on the spawn node 😂

#

Atlwast I'm happy I made a struct for it so I won't have to refactor too much

humble vine
#

I'm moving something in blueprint simply by timelining it's location towards the goal. Problem is that on certain directions there is another actor on the way and this simple method results collision. Is there some simple 3D pathfinding method to allow going around this obstacle? This happens in space so there is no floor, gravity or such

smoky marsh
#

Move it along a spline?

terse elm
#

is it possible to get the length of current anim playing without using a montage, or remaining time of current anim playing

#

or conversely, a way to get a reference to current animation playing

smoky marsh
#

I dont think so, what do you need it for?

#

Well a ref to current anim should be possible but I don't think what frame its on is possible

terse elm
#

trying to manually play a single anim without a montage, then soon as it ends, set a value. so for example i set up a test dash animation. im forcing it to play with a key, say "E". i press E, it plays, but i cant find a way to tell when its done so i can set it back to my actual animbp state

#

theres nodes like get length, but i cant find a reference to the anim currently playing lol

smoky marsh
#

I'm confused as to why you wouldn't wanna use a montage, but if it's a specific animation then you can have a notify on it

terse elm
#

i know i can just manually go look at the time of the anim, and set that value in. just trying to automate it

smoky marsh
#

To broadcast when it's ended

terse elm
#

yea i guess i can use montage if all else fails. seems like extra work when all the core functionality (otherwise) is in the anim directly. since i can set notifies and states directly on the anim. always wondered why you have to put an anim in a montage, even for a single anim, just do to almost the same thing but with a few more features. im sure theres a reason lol

trim matrix
#

Can someone tell me how many textures I can plug into Landscape Layer Blend node?

Whenever I'm vertex painting with displacement (it doesn't matter anyways as I've tried without displacement) the landscape component goes back to default grey checkbox. I know I need to use Sampler Source to :Shared Wrap but I still have the issue. Please help on either removing the limit/changing the limit or fixing this issue. I am currently using 46 textures (46*2 compressed).

Please help ^^
Image

Please Ping me if you reply, thanks!

terse elm
#

hrm trying with a montage. wont even play the anim. hmm

#

oh wait. i think i know why lol

#

forgot to setup slot 😮

smoky marsh
#

Montages are good because they're played in their precise slot on command so you have a greater degree of control if they're bound to something that isn't state

amber cairn
#

Quickie: whats default FPS on tick........60?

#

hmm I'm doing a clicker game that has an output per second....plus whatever you "make" by clicking. I basically want to have my display of numbers constantly rolling up by dividing this per second output by "frames" on tick, then adding that sum every frame so it looks like its asmoothly rolling upwards

#

what is deltaseconds exactly?

#

yeah but.......I am making far far upwards of quin-sept-duedecillion that kinda stuff........PER second........I dont want to add the sum on that second......I want it rolling

#

thats whats going on right now....im adding per second

#

but it looks static

#

Everything is fine so far with the bigint plugin

#

so we are now going away from what I actually requested 😄

#

exactly this is only for the display........

#

even if i just hardcoded it at 60 (like divide my prodpersec) and add that to the screen on tick......wouldnt it look right?

#

i gotta delay everything because straight tick is way to fast

gentle urchin
#

Thats one way of looking at it

amber cairn
#

no...its per second right now but thats not a rolling number i keep saying this........

#

i need like 60 updates per second to make it rolling

gentle urchin
#

What you prob want to do is interpolate the number from last second to this second over tick

#

Adding deltasecond together, reseting on "cash tick" (the one sec timer you already have rolling)

#

Or reset whenever targetamount changes really

#

Probably need a custom interp for bigints?

#

Possibly provided by the plugin already

#

Yeah true

#

Yepp

amber cairn
#

bigint does not come with interps

#

lorash is right.......

gentle urchin
#

It appears so

amber cairn
#

Thanks guys and cheers!

outer pewter
#

how can i link a variable to a progress bar. most tutorials force you to do a ref to character, but for me its an item thing so i just want to link a variable to this progress bar

icy dragon
outer pewter
#

i managed to link it now i ll just have to find a way to make it decrease

amber cairn
#

deltaseconds * output per second = output since last tick is doing nothing different that what I already have.........its adding my per second gains....per second........not spread over 1 second on each frame

#

One sec I did make a mistake

prime stump
#

Hi, anyone know what these errors are caused by? they seem to happen when i start looking around with my mouse, if i move around enough it'll just get stuck printing those warnings in the log and only stop if i interact with something

outer pewter
#

whats the command to reduce 1 from variable every 1 second

#

how? i have a variable linked to a prograss bar and i want that variable to decrese by 1 every 1 second

amber cairn
#

Ok now it's obviously hooked up right but doing very strange things...mainly keep it at 0 and flipping out........no longer counting up unless I move my mouse outside the screen to type here for example. If i click back in jumps to a very low number and flips

outer pewter
#

i ll check it out thank you

amber cairn
#

Keep in mind this is a binding in a UMG Widget

#

that bigint IS calculated elsewhere as a per second outüput

#

the entire crazy ass math shit is going on....per second

#

they will not work for bigint

#

what i want is visually show them smooth like all of these games do

#

but the real number is straight up ADDED togeter every second........this is just the "visual"

#

even if the numbers are low it should be smooth rolling

#

As I mentioned in the beginning.....diving my persec by 60 and adding that to the displayed amount per frame if framerate was locked at 60 would make it look right 😄

#

i know its hypothetical

#

yeah

#

Thank you.......but that c++ is chinese to me

#

it will not work with bigint and it diesnt have a clamp unfortuantely

#

ah

trim matrix
#

hi, i need to destroy or set collision disable to veichle when my ai is getting hit, i have multiple enemies that are child of it

#

i made this logic and i'm using ragdoll and then destroy the cpsule comp

amber cairn
#

It does.......but see I have this far more4 complicated unfortunately.....BigINT has +-* etc...........but I made a struct for remainders so i use split BIGINTR

trim matrix
#

the enemy1 is parent of another class

#

i'm trying to disable collision also on that class but not working

amber cairn
#

I had to make a bunch of operations like this

#

This clamps and fixes bigints with incredibly large remainders....just an example

#

so anyway.......I need a local var thats incremented only for the display...gotcha

outer pewter
#

is this how i say if this variable is on call this timer or no?

#

what should i connect this to to make it run whenever that variable is on

#

wont runing this forever have fps issues ?

#

cant i turn it into an event and call it whenever the booster item is used ?

odd ember
#

you can do whatever you want

outer pewter
#

how can i make it check a float variable condition

#

for example if its = or bigger then 0 then run this

#

if not, do nothing

odd ember
#

I mean it may not work properly but don't let that stop you

odd ember
#

though you should probably consider cases where it does something, not where it doesn't

outer pewter
#

like this ?

odd ember
#

ah like that

#

use min float instead

#

sorry, max float, with 0 being the other number

#

otherwise you need a branch

outer pewter
#

how do i call for that. im still new sorry

#

i couldnt add a branch to a float variable

odd ember
#

you have node menu. I'm giving you the keywords. I am expecting you can put 2 and 2 together here

odd ember
#

which is where a branch comes in handy

humble vine
#

don't draw from your float, draw from you function execution pin and add branch

#

then make your clause whatever it is linked to the boolean on branch

outer pewter
#

im getting so confused haha

humble vine
#

all you need to do is type "branch" to your node select menu

odd ember
#

or press b and click the graph

outer pewter
#

but then link the brqnch to what

odd ember
#

well now

humble vine
#

and it has condition, boolean input

odd ember
#

align the colors

#

red wire goes into what color pin?

humble vine
#

Maybe go to youtube and search unreal sensei, do his beginner tutorial, that should cover most of the ground

outer pewter
#

i ll try that, thank you guys

icy dragon
#

Well, compared to an Unreal Sensei video at least

neat stream
#

What is the good way to Overlap with foliage ... I've set the foliage on a Foliage channel and put a sphere coliision on my character but It doesn't seem to register any overlap nor hits.... any clue?

#

I wanted to swap nearby selected foliage in a radius by their BP or skeletal equivalent

odd ember
#

bp foliage is very expensive

neat stream
#

I think we can do this without having them as BP

#

Same way UIPF plugins and others do

amber cairn
#

custom collision channels

icy dragon
trim matrix
#

@maiden wadi Hi Authaer , sorry for the ping i wanted to ask you something on the logic you made to help me for the enemy waves , i have switched the enemy arrays to pawn class array as i need to spawn different child of enemies, same ai just different skeletal mesh , and of course i screwed now the wave size count , at the moment it count me 5 enemies when spawn wich is the default lenght of my array

#

do you know how can i pass the correct spawned number to the hud?

maiden wadi
#

@trim matrix You'll probably want that to be an instance array of pawns, not a class array.

odd ember
#

or an array of classes to instantiate

fiery swallow
#

Anybody got an idea on how characters leap in some games? I want the character to jump to where you click but his height should increase based on the distance traveled. I'm not sure what method is typically used for this sort of thing but it really doesn't seem to be as simple as it should be

trim matrix
fiery swallow
#

launch character could probably work, but I imagine it wouldn't be very stable? 🤔

odd ember
fiery swallow
#

I'm looking for a way to travel from point A to Point B with height manipulation

odd ember
#

I wouldn't use physics either

#

I'd say the best way of to increase some sort of alpha value with button held

#

and use that as a multiplier for jump height

maiden wadi
#

@trim matrix The original array you had before was an array of the instances you spawned. It was just of the class you were spawning. You can have an array of Pawn instance pointers and still store any instance pointers in it that point to instance that are children of Pawn.

odd ember
#

your jump functionality needs to be incremental though

fiery swallow
#

I plan to do calculations for height manipulation, but do you know if launch character is the best way to achieve what I want?

#

the character needs to always hit the ground by the time he reaches his location

maiden wadi
#

Some games do a spline creation for that that and path along the spline. I imagine that's a little more difficult than some math for launch character as that'll bring up more issues.

odd ember
#

I wouldn't use splines for something like this

#

I don't know launch character very well

#

can't even remember if it takes parameters

trim matrix
fiery swallow
#

🤔 maybe I can turn the character into a projectile and shoot him like a ball lol

trim matrix
#

can i do like that?

#

and reference the entire parent class?

fiery swallow
#

jk but yeah it's a little complicated I guess

odd ember
#

let CMC do its job

fiery swallow
#

yeah jokes, but I am indeed looking for the most reliable method. A few things I have tried look a little weird

#

and from a multiplayer perspective it can sometimes look super jittery

odd ember
#

oof it's multiplayer too

#

yikes

fiery swallow
#

that's what makes it even more crucial yeah

#

but it's the challenge I've been looking for tbh

odd ember
#

that changes the ballgame

fiery swallow
#

yeah I'll try and find something stable enough for single player, and then try to ask for help in multiplayer , thanks for your time though

raw karma
raw karma
odd ember
#

you should look for what works in multiplayer first

#

your options may be much more limited

fiery swallow
#

Very true, I am more used to doing things in single player, then converting it to mutiplayer, it really is a bad habit I should unlearn.

odd ember
#

honestly if this is just a learning project I would ditch the multiplayer

#

or ditch very complex mechanics and keep multiplayer

zealous fog
#

What if he wants to learn multiplayer stuff 😋

fiery swallow
#

I'm pretty bored, I've been scripting in unreal for a few years now and there isn't a whole lot scripting wise I can't accomplish

odd ember
#

do you know system architecture

fiery swallow
#

I also work for a studio handling replication, but you know the urge to learn new things

#

No I'm unfamiliar with that, I just make scripts

odd ember
#

then I would suggest focusing on that

fiery swallow
#

Occasional systems when my lead programmer doesn't want to

odd ember
#

scripting is simple, but making it fit into systems is where things really start to shine

#

making modular systems

#

which arguably you'd need for what you want to do anyway

#

unless the online subsystem can handle it

#

a lot of this would be happening through cpp anyway

#

if you're looking towards multiplayer

#

and you're probably stuck with CMC in some capacity for that as well, since you're wanting to do multiplayer

fiery swallow
#

I'll look into that actually, im always trying to figure out what the next step is. I appreciate it.

#

I was just wondering how items are stored and equipped and updated properly in games like league of legends

#

I assume system architecture can answer that question

odd ember
#

I wouldn't know necessarily for league of legends, since it's not built with UE

#

but replicating an inventory over MP is somewhat a standard thing for inventory systems nowadays

#

(assuming a game has inventory and multiplayer)

#

anyway my experience with MP code is fairly limited. I try to stick with SP because MP alone is a massive can of worms

arctic radish
#

damn

fiery swallow
#

Ah multiplayer isn't thaaat bad :p. But then again I've only ever made multiplayer projects so I have nothing to really compare it to. I'm on my 4th year currently of self learning. I reckon I could make a fully replicated and working inventory system, What I have been struggling with overall is doing it correctly

odd ember
#

delve into system architecture

fiery swallow
#

Because I kind of learned everything through trial and error, it is quite likely I am not doing things professionally

odd ember
#

you won't regret it

#

it's going to make your code so much more elegant

fiery swallow
#

right yes I really appreciate the point in the right direction 🙏

lone eagle
lone eagle
#

thats me

#

looking at this tutorial

#

this guy somehow gets a value on his character through a pickup, and transfers it to the Widget as a stored value

#

i think that box i made is what he did

odd ember
#

I can't see your box

lone eagle
#

but he doesnt even zoom into it in this tutorial

odd ember
#

in fact I can't see any of your code

lone eagle
#

thats not my code

odd ember
#

I see

lone eagle
#

As request from you guys, i made a tutorial about Augmentations Widget / Skill Tree / Upgrades Widget. In this tutorial you are going to learn how make a widget where you can upgrade the statistcs of the player character.
Of course everytime we want to upgrade our character we need a credit, and that's why you are going to learn how to do that t...

▶ Play video
#

9:07

zealous fog
#

Probably watch the video on basic bluepr8nt communication. First @lone eagle

#

It'll teach you how to send variables to other blueprints

odd ember
#

what it sadly doesn't teach is MVC, which is probably what's necessary here 😔

lone eagle
#

im short on time sadly, if possible could you point me in the right direction?

#

sorry if im asking for too much

zealous fog
#

Look at the thumbnail

#

It's a cast

odd ember
#

if you're short on time then certainly there isn't enough time to explain this to you either

zealous fog
#

That's an easy way to communicate

odd ember
#

look up model view controller

zealous fog
#

But I can't explain blueprint communications quicker than unreal can sorry

#

😂

lone eagle
#

its alright

zealous fog
#

I watched that video about 3 times before I really understood it

#

But you cN always watch at 1.5 speed

#

And use the time stamps

lone eagle
#

i have a prototype deadline in a few days, and some life things that make it hard to work towards

#

ill try to make time for it

#

just not today i think

#

i just need to transfer a value to another blueprints variable but i have no idea

maiden wadi
#

If you want a few dozen explanations on pointers and casting, just search my name in here with Memory Pointer

lone eagle
#

ill try that

maiden wadi
#

Also random fun fact since I happened to read over one of those. GetAllActorsOfClass is not actually that slow. Would not use on Tick. But for generally grabbing actors of a type it's actually incredibly efficient.

maiden wadi
#

It's not actually iterating over all actors in a level. It's more like a Map.

crisp lance
#

I want to draw a box, except it's not for debug (so no draw debug box, although I'm looking for a similar result) but something players should actually see. Is there a BP for that?

maiden wadi
#

@odd ember I had a test where I was using the same method to gather the player controller. In the same time you can do these other two functions to get the player controller. It's a notable disparity for sure, but not nearly the amount expected. I assumed the other two would have an extra zero or two on how many times they would run in comparison.
1x = TActorIterator
45x = GetPlayerController(0)
85x = GetGameInstance->GetFirstLocalPlayerController()

maiden wadi
#

Alternatively, if you want something materials can't handle. I tend to do my stuff like that in Niagara.

#

I more or less remade the DrawDebugBox into a niagara emitter with ribbon emitters.

crisp lance
#

I guess a mesh should do the trick. Never learned Niagara, would probably be overkill to learn all that just for this.

maiden wadi
#

I absolutely love Niagara. And if you ever have any particle aspirations in the future, I would consider ditching Cascade if you're using it. Probably not at release, but there's been mentions of Cascade getting deprecated in 5.0.

opal pulsar
#

helo
im trying to make a lerp independent from framerate, but doing GetWorldDeltaSeconds * LerpSpeed makes it only worse
its called every tick

#

one of the values in the lerp (B in this case) is taken from InputAxes

#

and the other one is just the current value of a property

maiden wadi
#

That sounds more like a usecase for FInterp or FInterpConstant

#

Linear Interpolation is more for.. You have two constant values, and a timeframe, and you want to go from point A to B and get the points between that time. FInterpConstant will just calculate from current point you have(CurrentValue) to the point you're after(Axis).

#

Course you can move the points in Linear Interpolation, but it's a rarer use.

#

^

opal pulsar
#

oh okay

#

thank you, ill try it

odd ember
#

this is the second time today you mention the InterpTo family, and it's beginning to sound like a company brand recommendation 😅

opal pulsar
maiden wadi
#

Are you just trying to interpolate a separate value towards the current InputAxis?

opal pulsar
#

no, im interpolating the current X control rotation to a new value which is the mouse X

#

anyways realized mouse input doesnt need to do the * GetWorldDeltaSeconds and it can just use a normal lerp 😄

astral epoch
#

Okay this might sound weird but is there a way to create an async blueprint function so I can have a completed exec pin for several async operations?

What I'm currently doing is using the Async Load Class node for several different soft references. It validates and then attempts to spawn different characters for a group. I figured I'd use the "complete" pin on these to do the spawning (since the data needs to be loaded first) but use the regular out pin to start the next async load so they are done simultaneously, hopefully speeding up load times. The problem is I need a completed pin that covers all of these async ops together, so when they are all completed I can do the next thing that requires all characters (at least the valid ones) to be in existence.

#

Does any of that make sense?

#

I'm using blueprints for the moment just to get prototyping done fairly quickly... get a build up, see if its fun, etc.

#

Though I guess in that regard, load times shouldn't be too much of a concern anyways.

#

I'm up for using C++ though, I plan on it later.

#

That actually sounds a lot easier than I was expecting.

#

Right. I'll look into that one because like I said I plan on using C++ later on anywyas.

late gorge
#

is there a simple way to get scientific notation of a float?

#

and shorthands for them? so 1e3 -> 1k, 1e6 -> 1m, 1e9 -> 1b, 1e12 -> scientific notation only

odd ember
#

no but you could write a function for that

late gorge
#

yeah... it's not pretty :\

#

was really hoping something was built in

odd ember
#

nah

#

or at least nothing exposed

#

I know that transform numbers will sometimes do that

#

boom

late gorge
#

project im working on is bp only and trying to get as much done before i have to deal with the bullshit that is visual studio

odd ember
#

rider is for kid tho

late gorge
#

yeah i've tried it out, it wasnt even able to get me to compile successfully

#

for kid?

odd ember
#

for kid

#

#cpp has the best memes

odd ember
#

perhaps the only memes

#

worth learning cpp only to hang out with the cool crew

#

lord and savior

late gorge
#

i've been programming professionally for like 5 years, mostly python, c++ gives me nightmares not because i can't understand how it's written

#

but because getting it to run is... ugh

odd ember
#

UE4 cpp is like cpp with training wheels

late gorge
#

like i can read and modify a working environment, i can't set one up

#

... you say that, my experience has been: set up some c++, break everything

#

because i work with existing c++ stuff (kinda have to, working with existing frameworks or marketplace content)

#

you make 1 small change and it wont compile anymore

#

oh. so that's what's causing me to sometimes lose 8h of work coz i dont check stuff in to p4

#

good to know

#

only happened like 3x but when it did

#

oh boy

#

the corporate side of things i work with has a more or less functioning p4 workflow

#

i am trying to use it for my own stuff

#

i honestly cba

#

will probably have to look into git for large files shudder

odd ember
#

so what's your source control preference?

late gorge
#

git obviously

#

but git for binary files is kinda big nono

#

so u need LFS

odd ember
#

git is so not friendly for game projects

late gorge
#

did they finally make it possible to not corrupt your entire repo if u hit 10gb?

#

yeah that's the large files support

odd ember
#

as in, it is a feature that your repo corrupts after 10gb, got it 😎

late gorge
#

but i couldnt get that to work properly on a personal install

odd ember
#

I don't use git

late gorge
#

not that i really tried much, gave up after a few hrs (perforce wasnt that big of a pain then)

#

i mean i use git coz i write pure text code (python)

#

best thing for that

odd ember
#

I use RTC, but people will yell at me for it being weird

flat coral
#

I've had pretty good experiences with PlasticSCM. There's also a #source-control channel 🙂

native ferry
#

hey I'm back with another question: i have multiple guns with a weapon structure with a variable called "weapon icon", so every weapon has its own icon displayed on the screen when equipped, but I don't know how to set the image on the widget for every weapon, can someone help?

odd ember
#

what is the icon file type

flat coral
native ferry
odd ember
#

then your icon is empty

#

😔

#

you may get better results if you post your code

native ferry
#

wait I'll do it

flat coral
#

Yeah let us see what's creating these widgets

native ferry
#

5mins

flat coral
#

Also I have a stupid question for a stupid idea:

Is there a way, in Blueprints, to make a Material instance bright fuckin red, but preserve everything else about it?

late gorge
#

change the base color?

flat coral
#

(Basically I've got logic that supplies a generic bullet decal if the hit object doesn't have a recognized physical material, but if my game's running in debug mode I ALSO want to color that decal bright red so I know I've got a broken object)

#

It can't be. Not base color at all.

#

That's part of the problem

#

I think my main problem is I dont really know enough about materials, and these decals are all multi-layer Material-instance structures and I'd rather not fuck with them too much just to support this use-case, because frankly this code shouldn't ship

#

I want to spread it around as little as possible so it's easy to delete later

native ferry
#

here is the scrip in the widget bp

#

and the icon isn't empty

odd ember
#

well it must be if it gets parsed as empty

#

or maybe the weapon isn't valid

#

and so it passes an empty image

#

😔

flat coral
#

they do validate the weapon itself though

odd ember
#

yeah but what if the weapon is empty?

flat coral
#

But not the weapon structure. I wonder if the WeaponStructure is empty inside the weapon

native ferry
#

well

#

i just used a print string in the not valid pind and yes

#

when i pick up the weapon it isn't valid for one frame

flat coral
#

oh cool you got a race condition

native ferry
#

what's this

flat coral
#

A race condition is when two parallel code paths are reading or writing the same value, and it matters which one gets to it first but that order isn't well-controlled

#

Basically you got one code path that's setting up your weapon, and this code path which is reading its values. You need the setup path to get there first, to "win the race". But it's losing, this path gets there first instead and reads an empty value

native ferry
#

should i use a delay?

flat coral
#

https://en.wikipedia.org/wiki/Race_condition they're famously hard to debug

A race condition or race hazard is the condition of an electronics, software, or other system where the system's substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of the possible behaviors is undesirable.
The term race condition was already in use by 1954, for example in...

odd ember
flat coral
#

I wouldn't use a delay, because you can make sure the steps happen in the right order. The problem is that you already HAVE a delay

odd ember
#

you should set up your architecture so race conditions don't happen

flat coral
#

something is making your weapon setup take a frame, and calling htis first

#

(I actually suspect that your weapon setup and widget setup calls are on the SAME frame, but the problem is you're accidentally doing the widget setup FIRST)

native ferry
#

yeah i'm doing it first

#

i think

late gorge
#

one good way to fix race conditions is to emit events when x is finished

#

then on construct of widget, bind event that will do whatever you need to do to that event, then call the event itself

#

that way, if construct finishes first -> you wait for the event and if event happens first, you called it in construct

desert juniper
#

quick q
Is there any way to override a OnRep function in a child class?

odd ember
desert juniper
#

isn't it a general BP question?

odd ember
#

no

desert juniper
odd ember
#

do you want an answer or do you want to argue

late gorge
#

basically blueprint is your final destination if nothing else fits

desert juniper
#

😉

haughty nymph
#

i want to cast to my ai but what can i put in the object in a widget

odd ember
#

philosophers have been pondering that for years

flat coral
flat coral
#

So you put in the object you're trying to cast

odd ember
#

I'm pretty sure "in a widget" is important somehow

#

but as I don't understand the question I can't give an answer

flat coral
#

Good point. I might be misunderstanding the question too

#

Post the code 🙂

native ferry
#

okay so i don't really understand how to fix it (i understood the problem tho) i'm not really good at bp scripting but do you guys know if there is another way to set the image?

odd ember
#

callback

#

event dispatcher

#

when the weapon is picked up

#

call OnWeaponPickUp

#

the widget can then implement this. or the controller can implement it for the widget

#

however you want

native ferry
#

the target is the widget?

odd ember
#

there is no target

#

the idea is that the weapon tells the correct class that it is ready

#

as in, it is not null anymore

#

and based on that fact, any other functionality can be begin

astral epoch
#

Okay another question because I'm noticing discrepancies in my array sizes.
Does the "insert" node for arrays just slot new data in at the given index and increase the size, or does it replace the data at said index?

maiden wadi
#

The first.

#

SetArrayElem is to change an index's data.

astral epoch
#

Cheers.

sonic oak
late gorge
#

is your camera using "use control rotation"?

sonic oak
#

Tried the same with the boom, as well as a combination of the two.

I originally had all of the input logic on the character itself and everything worked fine, but I wanted to put the input logic onto the player controller and since then, rotation doesn't work anymore Sadge

native ferry
#

@odd ember i don't find the "bind event to on (event name)" function in the widget bp

#

when i'm casting the the weapon component class

odd ember
native ferry
#

I have two widgets: the weapon icon/ammo one, and the main ui wich contains this widget and other ones related to the weapon so when i pick up the weapon i create the main ui widget (in the weapon component)

odd ember
native ferry
#

how?

odd ember
#

create a variable for a weapon component inside your widget, make it editable and expose on spawn

#

then refresh your create widget node

#

also protip, function parameters are already local variables inside functions, you don't need an additional variable to contain them

umbral ginkgo
#

I have a trigger and I want to make it so collision does not register with a specific actor. Any ideas on how to do that?

brazen merlin
umbral ginkgo
#

Bpi standing for blueprint interface?

brazen merlin
#

Mhm

sonic oak
#

eh not really a bug I guess

#

Actually shows that I have a design problem myself, as I should just be using the input axis turn event and applying that, rather than applying on every tick

bright frigate
#

Sup guys! I have a small number Im getting from VARest aka json request and its 1.575e-09 but integer and float gets gives me zero instead of 1.575e-09 any thoughts?

dapper bobcat
#

<@&213101288538374145> sorry bout the ping, but we got one of those again ^

twin chasm
#

someone beat me to the punch

#

never be sorry about pinging us for that 🙂

worthy frost
#

sorry was cleaning up

#

manny missed some

astral epoch
#

Okay I think I broke my character spawning by trying to make it into a macro.

#

Array shows up as correct length (four special characters + ten generic), outliner shows they all spawned, console says they have all been loaded probably from their soft references (they're all the same class for the moment anyways)

#

But those final four lines in the console show that only the special characters loaded.

#

Sizing the array to store all characters in this squad. Again the 4 specials + whatever count of generics.

#

Using the spawner macro for each special works fine.

#

Same macro seems to struggle with the for-loop here.

round basin
#

Didn't you mean to put "0" for the first index of the loop ?

astral epoch
#

I should show the way its reading and spawning

#

Same macro is used for specials and generics and it sets the array element. Both types share same array here.

#

With first four values being for the specials. Array elements after those four are generics.

round basin
#

uh okay my bad*

astral epoch
#

Just tried printing the array value though and for some reason on that for-loop everything is coming up as 14...

#

Which is just out of bounds.

twilit gull
#

Hello guys!
I was trying to organize the things in my bps and moved functions from child to parent, but now my child vars are not being updated in child instance or anywhere else after being processing in parent functions. How can i solve that? ;(

#

That var is inherited from parent class aswell and simple cast to dont even give and option to cast to it

astral epoch
#

So this one... might need explaining quickly

high ocean
#

Is this as expensive as get all actors of class? I'm kinda lazy to setup a chain of refs, so i'd do this instead. Should I go out of my way or is it decent performancewise - i'm calling it when the player adds an inventory slot (so it's not called often).

astral epoch
#

I put a print string after the loop but before the read character.
And another just inside the read character.

#

Somehow its losing the loop index value when going into the macro?

#

oh god dammit I just figured it out.

#

Loading the soft reference is an async operation done inside the macro that may take multiple ticks.
Loop calls this multiple times but keeps counting up its own index.
By the time the async is done and is setting the array value, said index is no longer what it was when async started.

#

Do macros have internal variables?

odd ember
#

@maiden wadi I'm looking at the code for GetAllActorsOfClass and I see it using an iterator. but I mean, it's still going over all the actors?

#

so it's definitely still expensive

odd ember
high ocean
# odd ember <@!143471961723371520> I'm looking at the code for `GetAllActorsOfClass` and I s...

idk why, even w/o knowing any cpp, i just assumed it's going through all actors and just filtering the selected class 😕
My question is related to this, since I was just asking if get all widgets of class is as expensive, but if it goes through the same process, I don't wanna know. Even though, having only 4-5 widgets and leaving first level only ticked should iterate fast & throw out the filtered one

odd ember
#

or actually, no

high ocean
#

oh lol, was just writing that in the meantime 😆

odd ember
#

it's the same type of iteration

#

but it does do extra steps

#

so technically, yes it is more expensive

high ocean
#

😮 🤦‍♂️

odd ember
#

but perhaps not by much

#

my answer was a response to an earlier statement

high ocean
#

aaanyway, i gave up on the lazyness already and was looking to see other solution since the widget I'm trying to reach is child in child but i missed that lol

odd ember
#

top level apparently only refers to if the widget is in viewport or not

#
if ( TopLevelOnly )
        {
            if ( LiveWidget->IsInViewport() )
            {
                FoundWidgets.Add(LiveWidget);
            }
        }```
high ocean
#

🤔 So, nested widgets (widgets in other widgets) will not get iterated through then - right? Since they're not added to the viewport, they're added in other containers/etc inside a widget which is

odd ember
#

I wouldn't recommend get all type functions anyway

#

what is it that you want to do

high ocean
odd ember
#

like what is your intent

high ocean
#

I have an "add slot to inventory" button. But if I have some other widget open and one of the items is socketed outside of the inventory widget, since I virtually destroy and remake the whole inventory when that button is pressed, the item's button is switched back to enabled - it's something simple really, I have lots of ways to communicate between them but now I'm just thinking of the best one in terms of - when I get back to my code I don't want to not understand wtf are those functions there, seemingly unrelated to anything 😐
I struggle/waste time with crap like this always, only to anyway forget why I was doing things lol

odd ember
#

hard for me to visualize

high ocean
#

I know, dw, obviously - it's pretty convoluted.

#

Then again, sometimes I wonder if this distructive way of updating is what I should really be doing but I've seen this virtually everywhere. It was among the weirdest things to get adjusted to - for instance, when working with arrays, it's cleaner and easier to just destroy and reconstruct the whole thing instead of changing values (inside structs within structs) at indices which opens up bug possibilities. But sometimes I still wonder if updating an inventory by destroying everything, getting all items and re-creating it is a good idea...

odd ember
#

it's more costly to destroy and remake widgets than to just collapse or hide them

high ocean
#

Ofc it is, especially with large ones, but trying to work with updating individual items, adding, subtracting, doing various array operations was such a pain in the arcshlong that I just went with this 😅

odd ember
#

are you doing all of that functionality inside the widgets?

high ocean
#

item struct arrays are in the gameinstance since I switch levels a lot. The clearing of children and spawning of item widgets are handled in the widget, yes.

#

Should I handle that somewhere else? In a corresponding bp? Is there any reason? 😕

odd ember
#

widgets are mainly supposed to be cosmetic

#

and reactive to functionality

#

rather than being the functionality

#

this is so you can quickly and neatly replace one widget with another and retain functionality beneath it

high ocean
#

well, I don't see how else I would implement drag & drops, and interaction with the items unless i switch the whole script over to a widget manager bp or something

odd ember
#

sure if it's stuff that's pertaining to the widget it's fine

#

it's more that it pulls and read functionality for the game, but doesn't impact it

high ocean
#

Well, it does in the sense that it handles indices for items for instance. So, if you consume something in the widget, it will send comms to the GI or PC which pushes things where they should be

#

Or if you swap two items' places in the inventory, or d&d things into some other widget that can accept drop

#

My game is pretty UI heavy id say, so there's alot of that

#

For instance, like this crafting UI:

high ocean
odd ember
#

MVC is a generally thing to keep in mind but it seems like you've done that already

high ocean
#

oh... never saw that, but it just made sense in my head to separate things as much as I could, didn't do it on purpose per say 😆

#

I still wish there was an easier way to update and handle widgets or UI in general - I think I've spent at least 30% of my time - if not more - doing various UI stuff

odd ember
#

exactly why I avoid widget UI as much as possible and have a focus on making things diegetic

#

the more time players spend in the game world, the better

high ocean
#

Depends on the game really 😛 Some games are supposed to be "played" smashing ur head against some UI elements, trying to figure out what would work best.

odd ember
#

sure, absolutely

#

I just prefer game worlds over UI

#

I don't want to sit in menus all day

#

or I'd play mobile games 😎

high ocean
#

I would too, I just lack an artist to properly support my work, so I gotta design my games around that 😐

maiden wadi
#

@odd ember Hmm. Maybe it does now that I'm looking through it more. I'm somewhat unsure because someone told me that it used the FHashBucket to manage it. But all I'm personally seeing is a binding that runs when Actors are spawned in a world and added to an array of actors which is iterated over via IsA()

odd ember
#

my thought is do the design first and make it rock solid

maiden wadi
#

Either way. Still surprised by the speed considering what it does.

odd ember
#

then hire an artist that is enthusiastic to finish it

#

then release, ???, profit, build an empire etc.

high ocean
#

easier said then done, and u know it 😛

#

most tend to be ahem lazy AF. I'm doing 75% of that quality in 1 day, they need 7-10 days

#

unreasonable imho

odd ember
#

I mean I'm also not relying on it as my day job

#

this is just a passion project

maiden wadi
#

@high ocean That being said to CE. If I'm right, then GetWidgetsOfClass is MUCH slower. GetWidgetsOfClass iterates over all UObjects. For which there are many many more of those than Actors, and also include all actors.

high ocean
#

now if that's not BAD, idk what is

maiden wadi
#

However. That's besides the point if it's an event driven thing. Once every second or more is not something to care about.

odd ember
#
// Skip any widget that's not in the current world context or that is not a child of the class specified.
        if (LiveWidget->GetWorld() != World || !LiveWidget->GetClass()->IsChildOf(WidgetClass))```
high ocean
# maiden wadi However. That's besides the point if it's an event driven thing. Once every seco...

Not really so. When I started my turn-based game 2 years ago, I thought of making a "LiveWidget" Interface and whenever I want to update widgets, i'd just get all of them and send an update - it lagged my game when 6 units were getting hit by an AOE and had all of their widgets and sub-widgets + floating damage widgets update. Checked profiler and that function was killing my game.@maiden wadi

odd ember
#

nice find

maiden wadi
#

I dunno. I use the TActorIterator often for setup after map load. I've never personally ever used GetAllWidgetsOfClass, and programming in widgets is my dayjob.

#

I'm actually sort of surprised that doesn't get the viewport and return children that are widgets.

high ocean
odd ember
maiden wadi
#

I think recursive searching through a tree of widgets would be faster than iterating over all UObjects first to get the widgets. You'd think anyhow.

odd ember
#

it would absolutely be faster

#

but I guess that's assuming that the widget you need is in viewport

terse elm
#

is there a way to get length of current anim or montage playing. or if not, remaining time in current anim or montage playing?

odd ember
#

but tree traversals are incredibly fast

terse elm
#

oh wait thats the return value in play anim montage i think lol

maiden wadi
#

I mean if you wanted an easy system and don't mind subclassing all of your UUserWidgets, you could have a constructor that adds that instance to a map. But you're already dealing with a stupid mass amount of objects when you handle widgets. Pointer upkeep is pretty essential.

wraith violet
#

So I'm working on a basically 8bit style graphic game but in 3d and Im trying to figure out how to do the animation. Right now i have 3 models i made in magikavoxel to be a test walk cycle and can't figure how to do essentially a sprite sheet animation but in 3d. Anyone know of any tutorials out there on how to do this? Ive been trying but idk if im just googling the wrong stuff or what but not finding much

odd ember
#

look at this though

high ocean
#

@wraith violetUnless you do it inside a material and use the model virtually as an imposter, I don't know if spritesheet animations for 3D exist or would even be possible. Make a skeleton for your models and skin them - afaik, there is no other way around it.

maiden wadi
#

@wraith violet Like all of your assets are blocky 3D models you mean? If so, you can probably just change the blending of the animations.

wraith violet
odd ember
wraith violet
#

Ive seen a devlog where somebody did what i wanted to do and basically had a timer and just cycled through the models, I was like well that works but didn't know if there was possible a better way

maiden wadi
#

For real though, if your assets are actually 3d and not textures, you likely just need to change the blending on some assets to only snap to certain poses instead of blending between them.

wraith violet
#

https://www.youtube.com/watch?v=Kp6LP-G-DGs for reference this is literally the style im going for

I Made The Legend of Zelda but it's 3D... People seemed to really like what I did last time when I Made Super Mario Bros but it's 3D, so I decided to do the exact same thing again, but this time for the Legend of Zelda. This time I went all out because I recreated the entire overworld, including enemies and items.

Extended gameplay video:
https...

▶ Play video
high ocean
#

@wraith violetOh, but that's exactly what @maiden wadi said. Nothing's smooth there - it's jus "states" and each corresponds to a mesh in an array probably

odd ember
#

voxels you guys

maiden wadi
#

Yeah, looks like the same thing. Just snapped animation states and directional clamps to 45 degrees.

odd ember
#

and uh... not sure how it's related to blueprints

brazen merlin
high ocean
terse elm
#

when creating a montage from an anim, shouldnt the montage be the same length as the initial anim? i have an anim with like 35 frames but when i rightclick, create montage, the montage has like 17

#

maybe the anim had some cutoff time in it. lemme look

high ocean
#

@terse elm

wraith violet
terse elm
#

checking now! thx for the reply. let me look

ornate linden
#

Is there a way to add like dynamic timelines?

I'm using a singular timeline to make a tile in a grid move from low opacity to high opacity and back on loop.

but now i want to be able to do that for an arbitrary amount of tiles that i don't know the number of until runtime. How would i go about that? Or is there an alternative to timelines that achieves the same effect and can be done dynamically?

wraith violet
#

Well you struigglnig to understand isnt my problem lol

brazen merlin
high ocean
odd ember
#

I think you'd struggle to make it work in code IMO. it'd be very expensive

wraith violet
#

meh, i asked a question and you are complaining about my quesation rather than helping soooo

odd ember
#

right, pointing you to places where you can get help is not helping

zealous fog
ornate linden
wraith violet
brazen merlin
wraith violet
#

but its apointless arguement lets move on

odd ember
ornate linden
brazen merlin
terse elm
#

@high ocean i set the stazrt to 0, end to 1.0. it increased the montage length to 30, but for some reason the anim (which has 38f) still shows as only 30f in montage and stops animating within the montage at like 22f (which is probably the original .66 end time that the montage imported the anim as lol). even saving didnt seem to fix

#

oh maybe cause its showing the montage at 30 fps but the anim is 60? wonder if thats a thing

#

yea for some reason the end time is showing as 0.633 in the montage (when highlighting the anim). even tho i set it to 1.0 and saved it

#

looks like its a default sequence length within the anim. is that baked in? hmm

odd ember
#

perhaps worth asking people in #animation about that? seems to be more animation specific anyway

terse elm
#

ill try yea. figured might be a bp setting. ill go try

zealous fog
#

I accidentally put my camera in a parent class which I use for enemies as well. Is there a performance cost to those cameras if theyre not controlled by players? If so, would destroying the component on beginplay solve it or will I have to refactor it?

terse elm
#

hrm ok new question. without using a montage, is there any way to get length of animation playing, or time remaining on animation? need it to spit out a variable. only reason i thought of using montage is cause i couldnt figure out how to get time remaining on a single anim

high ocean
#

@zealous fogI've been using cameras on each npc - I've had 40+ in a level at a time and have never seen any problems/significant additional costs whatsoever. But destroying them given you are sure you're not using/reffin them would be no problem

maiden wadi
#

@zealous fog There is a small performance cost. All scene components have an inherent performance cost because all are updated on every single move of a parent. So every time that AI's CMC ticks, it's an extra component or two moving. You can get rid of that cost by destroying it. Possibly not a real issue with only a few extra components.

high ocean
#

Good to know this 🙂

#

That's why I love hanging out here whenever I slack 😛

maiden wadi
#

This is also a good reason to use getter functions and make variables protected/private. If you had a getter, it and the class constructor is the only place to change. You could pass nullptr back, mark it virtual and then just override it in the player pawn.

high ocean
#

Ok - that's chinese 😔 They've just put up a video "c++ for blueprinters" some days ago, checked it out and I think I was the only one who just didn't get any of it. I just can't learn cpp

zealous fog
#

Cheers for the answers!

odd ember
terse elm
#

hm

zealous fog
#

So if you dont know the syntax at all it wont make much sense

#

But if you just know the syntax its quite easy

#

compared to other videos

terse elm
#

CE true yea hm... wonder how i access that. trying to get that value to pass through to a lerp

odd ember
zealous fog
#

You could maybe add an anim notify state

terse elm
#

CE thats what i had hoped. ill keep diggin around ty

odd ember
#

I was thinking anim notify too but that's giving a specific point in time

maiden wadi
# high ocean Ok - that's chinese 😔 They've just put up a video "c++ for blueprinters" some ...

Haha. When you access a variable directly you reference it. Meaning you cannot change that variable's name or remove it without fixing those references. This applies to BP as well. Using Dean's case, if you had a "GetPawnCamera" function in the base class, and just pass nothing back, you can override it in the PlayerPawn class and pass back that pawn's camera. This would save the headache of refactoring because places that still use that GetPawnCamera function won't break files(May break functionality but you should have been nullptr checking anyhow with IsValid)

odd ember
#

not how long is left

high ocean
#

Well, I always get lost in translation - functions are methods? - I think, variables are properties, and I just can't seem to figure out how to properly translate bps into cpp - possibly because you can't w/o understanding the concepts behind cpp, which makes the video pretty useless for 100% "blueprinters" only?@zealous fog

terse elm
#

i mean i know theres a :"get length" (target is anim single node instance) but i cant seem to get the info in my bp properly

odd ember
#

or well

#

variables are variables

#

but C# properties are 👌

#

functions are methods in C# too

high ocean
#

@maiden wadioh, now that makes sense and "of course" 😅

zealous fog
#

But there should be an easier way lol

high ocean
#

@terse elmok, look: afaik you can't. I was looking for the same thing some time in the past, and couldn't find anything on it except repeated statements that you can't.

zealous fog
#

Im the guy that spent a day on an interface not knowing you could expose properties on the spawn node so yeah

odd ember
#

well it does exist in the animBP

terse elm
#

i was looking for this

odd ember
#

arguably not accessible directly because it's on the anim thread

#

buuuuuuuuut

terse elm
#

but i cant pass that info through lol

#

i cant figure out what the single node instance is. no matter what i drag off target

maiden wadi
#

For a slightly better question. Out of curiosity, why do you need to know the length of an animation?

zealous fog
#

get anim instance?

odd ember
#
if (UAnimSequenceBase* SequenceBase = Cast<UAnimSequenceBase>(CurrentAsset))
        {
            return SequenceBase->SequenceLength;
        }```
terse elm
#

yea im just trying to get the current anim playing (lets say for a dash) and then say, ok i have xTime remaining. use that time to feed into a lerp

#

then i can adjust the distance of the dash through the lerp being driven by the time of anim etc

maiden wadi
#

AnimNotifies are a much better case at handling things happening at a particular time of an animation. And there are bindings for animation finished.

odd ember
#

it's in cpp so it could be exposed no doubt

terse elm
#

yea so like if the dash animation is 30f. i want to drive a timeline to go from 0-1 over that duration

high ocean
#

@terse elmso you are basically into re-inventing anim montages - did i get this right?

maiden wadi
#

What is the Timeline for?

terse elm
#

i tried to do it with montage and couldnt get it to work. cause i cant call a montage in an animbp

odd ember
#

why not have a start, process, end animation and blend between them?

#

then you can just time it to however long you want to be in process

high ocean
#

just wrap it inside an animmontage and tweak your interp and do whatever you want with it.

odd ember
#

infinitely extendable

terse elm
#

i guess id have to take the dash out of the animBP then and just have it forceplay when input is triggered

high ocean
odd ember
#

not at all

#

just trigger the conditions for the dash

terse elm
#

i cant use anim montages in the animgraph

#

hrm ok ill see if i can get that to work

odd ember
#

but like

#

why would you?

#

you got the anim graph

terse elm
#

maybe i dont need to use the animgraph for what im doing. i have a very basic idle/walk, which can go into dashF, dashB etc. maybe i dont need the dashes in there. and can just use default pose to play the dashes

odd ember
#

well the anim graph can be configured in many ways

high ocean
#

@terse elmI'm doing all theese with montages and animmontage notifies - why would you close your possibilities and divorce gameplay from animations? What if it gets interrupted for instance? animmontage is great at handling a hundred things for u 🤷‍♂️

terse elm
#

let me take a look.

#

duke just experimenting and trying to get something to work first, then figure out how to make it work best lol

#

ok i might have to rescript this

high ocean
#

well, that's @terse elm - just a jk 😛

terse elm
#

🙂

#

i guess i didnt really need the individual dash anims in the animgraph at all

odd ember
#

that's literally my animgraph

terse elm
#

interesting ok hmm