#blueprint
402296 messages · Page 795 of 403
looks like an ad for one of those '99.9% of people wont beat this level'
but then the game is something completely different
😂 nah man its a coolmathgames classic
that's what they want you to think 
is this that roblox thing
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.
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.
@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.
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.
Does anyone know how to replicate camera rotation, other than unlocking pawn rotation by pitch? Talking about an fps camera
@unique yokeBecause the forward vector isn't in world space, it's a local space direction.
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"
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 …
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
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?
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
static meshes in world are actors. there would be slight performance overhead on having them in a BP actor class, but this can easily be offset by using instanced meshes instead
thank you. can you use baked lighting on instanced meshes?
yes
sweet thx
Both world and local are relative to well.. world and actor respectively
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 😅
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?
there is world absolute and world relative, actor local space and component local space. and if you want to go lower, parent bone space and bone space
What is world relative to absolute?
world to level(s)
I dont think i've experienced world relative yet ? Level(s) as in streaming levels ?
It makes sense for it to exist tho
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
Isnt this handled by the engine and world abs so you dont need to worry about it ?
that you don't need to worry about it doesn't mean it doesn't exist
True that
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
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.
Does anyone have a link to a good tutorial on RenderToTexture? I'd like to put strings and other things on a models material.
is there an efficiency cost difference between collision boxes and line traces?
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
collision shapes are
they have to be evaluated each tick^
oooh, I expected it other way around
a line requires two points, a box requires... 9?
yes, 8 corners and 1 for the lord
1 for the center afaik
good to know!
a sphere is the cheapest non linear shape
so line trace is then 🙂
then capsule, then box
for the cost of one box in front ... I can measure 4 sides (with line trace)? lol
roughly
the real question is what kind of decision you are talking about
So this isn't a good idea then?
your cars gonna have collisions anyways, so i wonder what you want to deal with
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?
a sphere going over those points might be cheaper than 4 line traces
I once heard an unreal dev complain that too many gates are bad, but I have always wondered, how many gates IS too bad?
no, a good way is to use AI sensing
logic gates
Wanted to ensure the enemy can see the player even if they are above or below them
generally perception should only use line trace, and only after several other calculations have been done
so you want them to notice the player through walls/ceilings/etc.? then you can use a sphere collision
there's a bunch of stuff you can check before even having to line trace
we do the least likely checks first, right?
i would do cheap checks first
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
is the player within vision distance? is the player within vision cone?
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
I loooooooooove pondering logic
if both of these go through you can check if the player is visible via line trace
but before then it doesn't make a bunch of sense
or just use the tool the engine gives to you :>
it's less likely that you'll come up with some better solution
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
as many as you need, but not more than that
thank you for coming to my ted talk
This is possible, yes.
Cool
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.
Depends on how exactly you it crap the pants.
Renaming assets also involve resolving any references to the renamed asset.
Anyone knows how to set up blueprint for projectile to move in center of crosshair?
try fixing up redirectors first
I do [rename, save, fix up redirectors, save again] is that wrong?
Rename -> Fix Up Redirectors -> Save All
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
Word, will do this exact order instead. thanks.
I'd always try to fix up any previous redirectors and saving before renaming. but then again I've not experienced a crash from it
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.
I think most definitely for moving content
fixing redirectors saves a bunch of pointer nonsense
which may well take up extra memory as well
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!
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.
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?
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
I mean what would need to be there?
Actually yeah coming to think of it that makes sense
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
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?
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
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
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
yeah, do you know of any tutorials that have that kind of thing?
I'm sure it's not, I'm just not a programmer person 😅
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
aight I'll try some stuff, thanks
do feel free to ask more complex AI level stuff in #gameplay-ai though
Will the compiler optimize these TrapDoor references into a single get and not three separate ones?
@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.
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?
Movement should be done in c++
Door interaction? Bp could be just fine
Depends on a million things really
Does the engine tell you how long a BP took to run?
stat unitgraph will tell you frametime for Game thread to run.
Is there a video or doc that goes into more detail where BP shines and what scenarios to avoid doing in BP?
It really depends on what you're doing. Not really cut and dry.
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?
it's got a timeline
so probably not
also no, not at all
your usage parameters are way too infrequent
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.
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
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
Yeah it's a lot of C++ for one node though
https://issues.unrealengine.com/issue/UE-53169 "Won't Fix" GG Epic
How much C++ is it to fix their booboo?
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
a for each map macro is a bold attempt though
Can probably get it working with custom C++ but urghhhhhhhhhhhhhhhhhh
custom nodes is arse at the best of times
right there with you
Bold how?
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
a brave attempt to create functionality where none has been before
Could it stay at 0, or would it always flip completely?
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
it stays at 0 if I dont touch the input
clamp float?
Whats the intended behavior? What result are you after
Clamp float could definetly work
When I walk left, the 2d character looks left, then when I move to the right the character looks to the right
If its a fluid state between 90 and -90
some first class spaghetti
what would you recommend i do instead of this?
@gentle urchin clamp float beofre make rotator?
create a function you can over a loop for an array of structs
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
Setlocalrotation (get local rotation + make rotator(axis as input) -> break result -> clamp z axis from -90 to 90-> make rot. This would replace the addlocalrotation node
that's why I said create a function. then you can specify the parameter that needs to change
ok, cool. i'll do that
@gentle urchin clamp float isnt doing anything 😦 lol
that's never going to be above 2 lol
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
Yea I know, also am kinda newish. been learning the unreal for the past 6 months. still learning the core
This
@gentle urchin theres no option for get local rotation :/
The rotation of the paper flipbook would be local
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...
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
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!
@gentle urchin when I type get local rotaion I get "rotation in local space"
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
The stuff ur showing doesnt change mesh tho
@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.
holy moly
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
😉
haha
but it's really weird
I'm trying to debug it
and honestly having a bit of a hard time
honestly though, that looks awesome
by data containers you mean structs?
@random plaza Anything that can hold the data for the dialog.
Json, csv, etc
This is a good reason to use other UserWidgets inside of this UserWidget that you can pass the struct to and bind delegates from and call those delegates from button press that passes back the information you need or an index to look up the information you need. You're doing the identical thing four times. Could be the same logic once in a single second widget that is created and used.
then make a BP that parsees it and branches and acts accordingly
oh, is that not for the dialog choices? my b
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.
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.
Could probably just be three separate properties. I don't think even in C++ there's a way to limit an array's size like that.
Is it possible to use Breakpoints when using Interfaces? This Blueprint functionality works but the Breakpoints do not trigger.
Should be, as long as the game is running in PIE.
Hey, nice to see you again and thanks for the reply 🙂
Yeah, that's what I've done for the time being, "False Text" and "True Text"... just felt a bit icky...
Haha. Welcome to UI. Just enjoy the squishy feeling between the toes. It doesn't go away. You'll get used to it.
Just tried in PIE and they are not being triggered either 🤔
I'll double check but I'm 99.9997% sure it works.
What about making a custom editor with bluetilities to set values but not modify?
Probably more work thatn its worth
Thanks for the suggestion, I'm not familiar with bluetilities, so yeah, in this specific case probably more work than necessary etc. Just assumed I'd be able to have a fixed size array (like in the olden days), best I have is a resize option which would discard everything over the two entries, but that's a bit kinda of smoke and mirrors...
@mint magnet Breaks fine.

yeah other solutions seem kinda hacky, but sometimes it's what you have to go with 🤷♂️
I wonder what I'm doing wrong
Initial guess would be bad pointer.
Thanks for the sanity check guys, and happy new year... see you again soon (when I have my next problem! :D)
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?
Thanks for linking these. That video is great! Cool seeing BP beside x86. So much more complicated than mips asm.
does it matter that I am getting doubles?
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
Probably Hide Unrelated.
hmm interesting. is that a per bp setting? let me check
It is.
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
Turned it on a few times myself by accident. 😄
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?
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.
yea lol thats what i do
@maiden wadi after restarting my project the Breakpoints worked. 🤷♂️
Haha. Odd.
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.
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 
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 😛
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!
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!
@raw karma I'm about to start working on the same feature. Let's keep in touch.
Because they're part of event graph
And yes, I told you exactly what to not say 😛
scene capture
Any videos about communicating from player to training dummy blueprints about fighting-style grappling?
Local vars only possible in functions, and to lesser extent macros.
At least in BP. Obviously local vars can be anywhere in C++ like littering trashes, even down to just a scope.
Not exactly fighting style grappling, but it is inter BP comm
What is Blueprint to Blueprint Communication, or how do I call functions or get variables from other Blueprints, in Unreal Engine 4?
Source Files: https://github.com/MWadstein/wtf-hdi-files
@icy dragon That works - Thank you 🙂
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
Do you have a proper naming convention for those variables?
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)
I usually just do localDamage in that case, even if its silly
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
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?
iirc exp or pow is possible in a math node
It is funny though that ^ doesn't work even though it's in the official doc? https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Blueprints/UserGuide/MathNode/
There's always N * N * N 
In BP, it doesn't matter much, because the editor converts it to "friendly name" by default, due to BP var names aren't the "real" names. Hence why you can put in whitespaces in BP var name.
In C++, it's a different story.
What?, I meant naming conventions for variables tied and should only be used in specific events
Like a prefix
Still the same answer.
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
there is a setting called air control in movement component might be what u looking for
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.
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
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
Move it along a spline?
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
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
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
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
i know i can just manually go look at the time of the anim, and set that value in. just trying to automate it
To broadcast when it's ended
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
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!
hrm trying with a montage. wont even play the anim. hmm
oh wait. i think i know why lol
forgot to setup slot 😮
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
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
Thats one way of looking at it
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
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
It appears so
Thanks guys and cheers!
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
If the item stat is owned (or directly governed) by the charcter actor, you'd still have to go through the character reference, just with extra step of getting the current item.
It really depends on how you set the item system to begin with
i managed to link it now i ll just have to find a way to make it decrease
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
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
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
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
i ll check it out thank you
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
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
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
the enemy1 is parent of another class
i'm trying to disable collision also on that class but not working
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
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 ?
you can do whatever you want
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
I mean it may not work properly but don't let that stop you
= node
though you should probably consider cases where it does something, not where it doesn't
ah like that
use min float instead
sorry, max float, with 0 being the other number
otherwise you need a branch
how do i call for that. im still new sorry
i couldnt add a branch to a float variable
you have node menu. I'm giving you the keywords. I am expecting you can put 2 and 2 together here
no but you can't execute things only if a float is above a certain number
which is where a branch comes in handy
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
im getting so confused haha
all you need to do is type "branch" to your node select menu
or press b and click the graph
well now
and it has condition, boolean input
Maybe go to youtube and search unreal sensei, do his beginner tutorial, that should cover most of the ground
i ll try that, thank you guys
https://learn.unrealengine.com covers even more of the ground.
Well, compared to an Unreal Sensei video at least
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
bp foliage is very expensive
I think we can do this without having them as BP
Same way UIPF plugins and others do
custom collision channels
Project Nature (I think) only has one BP to rule the deformation
Yes.
@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?
@trim matrix You'll probably want that to be an instance array of pawns, not a class array.
or an array of classes to instantiate
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
mmm, i think i never created instance array of pawns , what does that mean? should i convert from pawn class to another type?
launch character could probably work, but I imagine it wouldn't be very stable? 🤔
wouldn't there be at least some level of tutorial for this out on youtube
Surprisingly no, I don't even need my hand held on this, just a reliable method. The only video I found on YouTube about it used physics which isn't a method I'm interested in, and it looked terrible.
I'm looking for a way to travel from point A to Point B with height manipulation
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
@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.
your jump functionality needs to be incremental though
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
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.
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
all of the enemies are parent with the enemy parent class
🤔 maybe I can turn the character into a projectile and shoot him like a ball lol
jk but yeah it's a little complicated I guess
no that's some fringe level thinking
let CMC do its job
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
that's what makes it even more crucial yeah
but it's the challenge I've been looking for tbh
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
Sounds great dude! I'll PM you on anything I find to tackle this.. The comment just below ours, "Scene Capture", has started my search in the right spot I do believe. Will keep digging on this.
Amazing, thank you!! I'll start researching this, appreciate the direction and your time 🙂
I don't think you understand the change in complexity
you should look for what works in multiplayer first
your options may be much more limited
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.
honestly if this is just a learning project I would ditch the multiplayer
or ditch very complex mechanics and keep multiplayer
What if he wants to learn multiplayer stuff 😋
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
do you know system architecture
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
then I would suggest focusing on that
Occasional systems when my lead programmer doesn't want to
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
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
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
damn
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
delve into system architecture
Because I kind of learned everything through trial and error, it is quite likely I am not doing things professionally
right yes I really appreciate the point in the right direction 🙏
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
I can't see your box
but he doesnt even zoom into it in this tutorial
in fact I can't see any of your code
thats not my code
I see
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...
9:07
Probably watch the video on basic bluepr8nt communication. First @lone eagle
It'll teach you how to send variables to other blueprints
Announce Post: https://forums.unrealengine.com/showthread.php?101051
This Training Stream takes a look at Blueprint Communication. We find that Unreal Developers of all levels can sometimes struggle through the concepts behind moving data between objects. So in this video we'll take a look at the different ways to make Blueprints talk to one an...
what it sadly doesn't teach is MVC, which is probably what's necessary here 😔
im short on time sadly, if possible could you point me in the right direction?
sorry if im asking for too much
if you're short on time then certainly there isn't enough time to explain this to you either
That's an easy way to communicate
look up model view controller
its alright
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
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
If you want a few dozen explanations on pointers and casting, just search my name in here with Memory Pointer
ill try that
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.
what makes it not slow?
It's not actually iterating over all actors in a level. It's more like a Map.
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?
@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()
Not really. A box mesh with a material is probably easiest. Engine has a 100x100x100 box you can use for easy scaling.
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.
I guess a mesh should do the trick. Never learned Niagara, would probably be overkill to learn all that just for this.
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.
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
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.
^
this is the second time today you mention the InterpTo family, and it's beginning to sound like a company brand recommendation 😅
I tried using FInterp, and it seems like most of them are fixed now
but the one using inputaxes is still inconsistent 😥
Are you just trying to interpolate a separate value towards the current InputAxis?
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 😄
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.
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
no but you could write a function for that
nah
or at least nothing exposed
I know that transform numbers will sometimes do that
boom
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
rider is for kid tho
yeah i've tried it out, it wasnt even able to get me to compile successfully
for kid?
perhaps the only memes
worth learning cpp only to hang out with the cool crew
lord and savior
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
UE4 cpp is like cpp with training wheels
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
so what's your source control preference?
git is so not friendly for game projects
did they finally make it possible to not corrupt your entire repo if u hit 10gb?
yeah that's the large files support
as in, it is a feature that your repo corrupts after 10gb, got it 😎
but i couldnt get that to work properly on a personal install
I don't use git
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
I use RTC, but people will yell at me for it being weird
I've had pretty good experiences with PlasticSCM. There's also a #source-control channel 🙂
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?
what is the icon file type
It's a tough thing to have a canned solution to. But, presumably, whatever is creating these widgets knows what WeaponStructure it's creating the widget for. So if you make a variable in the widget which holds the icon texture (or whatever) and expose it on spawn, you can have the widget creation logic fill in that value based on what's in the WeaponStructure it's looking at
it's a slate brush because I binded the widget image to a function, it works but I get an accessed none
sorry I'm not very good at English so it didn't quite understand
wait I'll do it
Yeah let us see what's creating these widgets
5mins
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?
change the base color?
(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
well it must be if it gets parsed as empty
or maybe the weapon isn't valid
and so it passes an empty image
😔
they do validate the weapon itself though
yeah but what if the weapon is empty?
But not the weapon structure. I wonder if the WeaponStructure is empty inside the weapon
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
oh cool you got a race condition
what's this
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
should i use a delay?
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...
no that's hacky
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
you should set up your architecture so race conditions don't happen
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)
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
callbacks, yes
quick q
Is there any way to override a OnRep function in a child class?
isn't it a general BP question?

do you want an answer or do you want to argue
basically blueprint is your final destination if nothing else fits
already posted in #multiplayer
though I don't mind an argue
https://www.youtube.com/watch?v=ohDB5gbtaEQ
😉
i want to cast to my ai but what can i put in the object in a widget
philosophers have been pondering that for years
Sorry if this comes off condescending, but do you know what casting is?
yes
im new
So you put in the object you're trying to cast
I'm pretty sure "in a widget" is important somehow
but as I don't understand the question I can't give an answer
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?
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
the target is the widget?
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
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?
Cheers.
Any ideas why Add Movement Input on the pawn works but Add Controller [Yaw/Pitch] Input doesn't seem to do anything? I've exhausted my options for figuring this out 
is your camera using "use control rotation"?
Yeah. I tried having it off/on, didn't make any difference
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 
@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
can you show me how the widget gets spawned and communicates with its parent class?
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)
if you're doing it like that, pass the weapon as a parameter to the widget as you're spawning it
how?
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
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?
Collision channels for collider type filtering, for example pawn only, then check the other actor on overlap with a class check ir isEqual check. Or learn the bpi system.
Bpi standing for blueprint interface?
Mhm
Okay I made progress..
This works: https://i.imgur.com/rsn6sSL.png
This does not work: https://i.imgur.com/p6AWLK7.png
Looks like it may be a bug, or just an undocumented design choice: https://answers.unrealengine.com/questions/55956/add-input-on-tick-not-working-why.html
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
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?
<@&213101288538374145> sorry bout the ping, but we got one of those again ^
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.
Didn't you mean to put "0" for the first index of the loop ?
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.
uh okay my bad*
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.
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
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).
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?
@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
seems like it may be more expensive
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
or actually, no
oh lol, was just writing that in the meantime 😆
it's the same type of iteration
but it does do extra steps
so technically, yes it is more expensive
😮 🤦♂️
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
top level apparently only refers to if the widget is in viewport or not
if ( TopLevelOnly )
{
if ( LiveWidget->IsInViewport() )
{
FoundWidgets.Add(LiveWidget);
}
}```
🤔 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
yea, I figured
like what is your intent
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
hard for me to visualize
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...
it's more costly to destroy and remake widgets than to just collapse or hide them
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 😅
are you doing all of that functionality inside the widgets?
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? 😕
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
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
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
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:
yeah this makes sense
oh, phew, thought it was yet another thing I've been doing completely wrong for years 😅
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
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
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.
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 😎
I would too, I just lack an artist to properly support my work, so I gotta design my games around that 😐
@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()
my thought is do the design first and make it rock solid
Either way. Still surprised by the speed considering what it does.
then hire an artist that is enthusiastic to finish it
then release, ???, profit, build an empire etc.
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
@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.
ROFL WTF?! 🤣
now if that's not BAD, idk what is
However. That's besides the point if it's an event driven thing. Once every second or more is not something to care about.
true, I guess it could be slower. but to be fair TArray is built on a heap, so traversal should be fairly fast
// 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))```
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
nice find
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.
😮 wow, nice dayjob, I think i'd enjoy that 😄
it does it in reverse, and only selects viewport widgets if you select top level
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.
it would absolutely be faster
but I guess that's assuming that the widget you need is in viewport
is there a way to get length of current anim or montage playing. or if not, remaining time in current anim or montage playing?
but tree traversals are incredibly fast
oh wait thats the return value in play anim montage i think lol
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.
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
sorry that's only binary search trees 😔
look at this though
@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.
@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.
have you considered asking people in #animation ?
Yea thats been my issue "Spritesheet but for like 3d" hasn't come up for much 😂
😛 go figure lol
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
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.
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...
@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
voxels you guys
Yeah, looks like the same thing. Just snapped animation states and directional clamps to 45 degrees.
and uh... not sure how it's related to blueprints
maybe you could just lower the playing framerate. They did something like this for that clay kirby game, i think it was 12frames. Maybe 6 frames instead of the normal?
U about to get mad again 😂
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
@terse elm
technically this was halfway related to blueprints cause one of my options was implenting this through code and not any form of animator
checking now! thx for the reply. let me look
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?
I struggle to see how
but ok
Well you struigglnig to understand isnt my problem lol
you could operate on an array of tiles
Now, that was uncalled for really
I think you'd struggle to make it work in code IMO. it'd be very expensive
meh, i asked a question and you are complaining about my quesation rather than helping soooo
right, pointing you to places where you can get help is not helping
Well if you understood it you wouldn't need help so it's not really your place to be rude about it
That might work. I like that idea.
how I explained it and he basically went I don't understand so your wrong, I said thats not my problem if he doesn't unmderstand and that doesn't just make him right
yeah, it would do them all at the same time though. If you want them to do it in some fancy way, like one after another, or radially or something, then I'd assume there is more to be done.
but its apointless arguement lets move on
you could also have your tiles be actors and each of them have their own timelines? although I'm not sure if that's what you were asking for?
I need them to all be flashing at the same time, so it should be fine.
Yup. Just update the array and then call that event/timeline
@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
perhaps worth asking people in #animation about that? seems to be more animation specific anyway
ill try yea. figured might be a bp setting. ill go try
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?
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
@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
@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.
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.
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
Cheers for the answers!
I think so? at least these are used in the animBP for state transitions
hm
The video really is more understandeable if you know the absolute basics of C++ in unreal
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
CE true yea hm... wonder how i access that. trying to get that value to pass through to a lerp
I guess you could wrap it if all else fails, but to be honest I think it should be accessible already somehow
You could maybe add an anim notify state
CE thats what i had hoped. ill keep diggin around ty
I was thinking anim notify too but that's giving a specific point in time
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)
not how long is left
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
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
if you're referring to the analogous elements from C# to cpp you're correct
or well
variables are variables
but C# properties are 👌
functions are methods in C# too
@maiden wadioh, now that makes sense and "of course" 😅
You could do it but you would have to manually handle some data, such as total length of each animation and then current time/total time
But there should be an easier way lol
@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.
Im the guy that spent a day on an interface not knowing you could expose properties on the spawn node so yeah
well it does exist in the animBP
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
For a slightly better question. Out of curiosity, why do you need to know the length of an animation?
get anim instance?
if (UAnimSequenceBase* SequenceBase = Cast<UAnimSequenceBase>(CurrentAsset))
{
return SequenceBase->SequenceLength;
}```
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
AnimNotifies are a much better case at handling things happening at a particular time of an animation. And there are bindings for animation finished.
it's in cpp so it could be exposed no doubt
yea so like if the dash animation is 30f. i want to drive a timeline to go from 0-1 over that duration
@terse elmso you are basically into re-inventing anim montages - did i get this right?
What is the Timeline for?
i tried to do it with montage and couldnt get it to work. cause i cant call a montage in an animbp
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
just wrap it inside an animmontage and tweak your interp and do whatever you want with it.
infinitely extendable
i guess id have to take the dash out of the animBP then and just have it forceplay when input is triggered
why would you want to call a "dash" - ability I'm assuming/key press in animbp?!
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
well the anim graph can be configured in many ways
@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 🤷♂️
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
well, that's @terse elm - just a jk 😛
that's literally my animgraph
interesting ok hmm