#blueprint
402296 messages ยท Page 935 of 403
yea so that code is my attack animation
Your question isn't about the animation, it's about how to check which attack hit a character
its more so i dont know how to make an enemy reaction to that animation
yea
thats the attack
You told me it was the opposite
so you don't really know yet when the attack did hit anything?
hmm, sorry, maybe misunderstanding, i meant how to make enemy react when they overlap or get hit with that animation
not yet, am guessing i need to line trace or something like that
that depends on what would cause the hit to succeed
is it the collision with gaia, or the collision with one of those waterballs that you spawn?
its collision
or waterball
but collision would be better to learn
so i prefer that
collision should fire an hit event on both characters when everything is set up properly
either on the capsule or the skeletal mesh component
so right click the one which handles your character collision in the blueprint hierarchy, and theres an add event entry in the context menue
This is dumb, but how do I get the Comment bubble to show on my comments
press c when nodes are selected and then in the options when u click comment, there should be a option to show bubble, hopefully am correct
kay let me try
So the C made the comment, yea, but I don't see the option for the bubble ๐
got this node
NVM I'm dumb, it was under the details pane
when u left click bubble, it should show this on right corner
lol yea
lmao yea, I found it
Hey I wanted to ask a kind of general question but one I dont quite get yet. Pretty new to object oriented languages/coding in general but I think I get the general concept of using event dispatchers to make it so that you can tell multiple actors/objects/etc what to do when x thing happens in a clean manner.
My question is, is there anything logically/theory wise I should consider before making something an event dispatcher or not? I get "if you need multiple actors to call something" but wondering if there's a more in depth answer.
Based on what I've seen implemented in various systems so far, the event concept are mostly used to facilitate async communication/data transfer.
Simplistically, more or less use events if you're not sure whether the result of an action can be provided within the return value of the next function call that you'll be making.
The actual implementation on when to use events depends on each case though.
Ah right that makes sense
@spark steppe do i make like a "is animating" boolean
I suppose that last part is exactly what I'm a bit worried about lol. There's one end of making everything an event dispatcher which is probably unnecessarily and then vise versa
but I suppose it also probably comes with a bit of time/experience to figure out exactly when that is too
Best practice on how/when to use events is a rather relative thing, time and experience might help you figure out what's best to do for each case and scenario.
I suggest you just try and see what works best for you and polish things as you go.
Awesome, thank you :)
Is it possible to store values in a BP then use a BP class reference to get those values ?
I would look into data assets
Mh i would still need a link between the BP class and the datas
Basically it's hard to interact with BP classes without spawning an instance of that class into the game world
The benefit of a data asset class (a little tricky to set up in BP but can be done) is you don't need to spawn it
I can't have something like c++ to get the CDO ?
Downside is you can't write anything into it
It's a stone cold asset
Mathew Wadstein has a vid on YT on how to make a data asset class purely in BP
Well if i have to handle an ID system manually i will make it in c++ i think, but i don't really like the design
Maybe I misread what you're asking for. You said class reference which is different than an object reference which means you want data from something that isn't spawned into the game world
If you need to write to such a thing... I'm not sure what all the options are. Savegame files for one...
This is the default values, i would like to get those values, i can get them with the CDO in C++ i'm looking a way to do it in BP
GetDefaultValues?
that will get the default values of the class without needing an instance of the actor/item/object
Yeah, I was about to say. Didn't know if you needed to spawn it
any advice on how to program simple crowd control on enemy like a knockdown?
@static cipher I suppose one way to think about event dispatchers vs other methods of "blueprint communication" is how you want to manage dependency relationships. When a BP class binds to a dispatcher, it necessarily needs a class specific object reference to the thing it's binding to. There are lots of other ways for BPs to communicate and you should look into all the options (casting, BPI, BP components) before making everything a dispatcher.
Ah okay Ill make sure to do that then
Oh and class hierarchies. Casting to a parent class to talk to child classes is also a form of interface. Gotta know about those.
Ah parent class make a little more sense to me actually
this is very good stuff thank you
is that walk animation?
its a sprite moving to the left
Advice, should i set trace responses to overlap or block?
oh, cant help sadly, haha very unique using sprites in ue
i wanted to mess around trying to create a 2d game
nice
It says how to fix it right in the error message
How do I set it to movable?
I wasn't born yesterday
Is it something you've placed in via the editor?
This should have been your question then!
Click on it, it'll be in the details panel. Just below the transform.
thank you
I've got a question:
When playing a Level Sequence as a cutscene, what is the best practice for accepting an input to skip the cutscene? What object would it be attached to?
Right now, most of the level sequences are created & played from the level blueprint.
Thanks for any help.
I guess you'd use a player controller?
Where would it be scripted? On the level blueprint? On the level sequence events?
Honestly using the level bp isn't a great idea. It's fairly insular.
The button to skip would be "interact," used for many other activities in the game. When the cutscene is playing, I want interact to skip to the end and stop.
Ok what would you recommend?
I'm not sure if oyu need to change it or not.
Can you access the level sequence outside of the level bp?!
I'm sure it's possible to do so. I currently have not tried.
Well you have 3 options. Either you access the level sequence outside the level bp, see if you can accept input inside your level bp or set up a link between the level sequence and the player's player controller from inside the level bp.
Which would you recommend?
I'd try #2 first. It seems the easiest to test and the one most likely to fail.
Perfect. Will do. Thank you for your prompt responses @mental trellis !
@here Hey guys, i'm having some issues setting lighting channels in my character BP, I just have a point light I want to affect the scene but not the skeletal mesh. It works in editor but on begin play doesn't work at all. I've tried setting the lighting channel in the bp itself but no luck either...any ideas?
I wonder where that expression came about
from people born the day before yesterday
i am being honest ๐
Any luck?
I am going to work on it tomorrow. I was fixing many things today and this was just one on my very large list of changes needed.
Get world location will be updated as you move
You want to store original location to a variable before firing off the timeline
("Heart Location")
i got it tho so its fine'
I mean Paper Sprite
You're moving it, so its location for the lerp will be different every time the timeline update fires
look at the event tick, is that not what you mean?
Your whole setup is giga fucked, what are you trying to do, move PaperSprite to HeartLocation over time when Move is called?
HeartLocation = PaperSpriteWorldLocation
They are the same thing
I'm suprised your timeline does anything close to what you want. You are lerping A from A to A+20.
Do you see how every tick, your start location is moving?
I modified it to my liking and changed the timeline for .1
works perfectly as intended
So every frame, you just lerp more of your +20, and you're framerate dependent. Just do it like this
Nothing on tick
Move -> Store StartingLocation -> Timeline -> Lerp from StartingLocation to TargetLocation (or from StartingLocation to StartingLocation +20 or whatever)
Done
Now try it at a different framerate
well yeah
It'll go a different distance
it only works at 30fps (I capped it)
Just fix it, that's super borked
how would i
What is HeartLocation meant to be, the current location or the target location?
Or is target location always X distance forward?
current
if I set it to move keybind then it will only work once
So when you press move, how far in what direction do you want it to go?
Then don't use a timeline
ASWD
I couldnt get it to work but that's maybe because I couldnt get the heart to move
was on stationary
What is the heart? This is a super confusing setup.
the PaperSprite
Show the actor BP outline
K so just do this on tick
Tick -> Make some MovementVector from input -> Position = Position + MovementVector x Speed x DeltaSeconds
Done
That's the simplest movement code possible really
Now if you want collisions etc that's another matter, I'd just use some movement component for that so you don't go reinventing the wheel.
Did unreal 5 add any support for loading screens that are blueprint only?
A simple trace should suffice^^
Grid based movement often seem paired with turn based, if so, then a few more steps would have to be made
If you're using a struct to save some information in a blueprint, how would you go about checking whether or not that struct has actually been set with a value? Would it be correct to just break it and check if one of the values that should be set isn't, or is there a different way of going about it?
How do you extract info from a struct?
I have an array of structs inside of a struct and im trying to get to info within that array
Get an index from the array and then break teh struct
Or just split the pin on the get node.
Yeah sounds fair. If you're uncertain of what a value should be to prove its been setz you could add a bool for this very purpose
It isnt letting me break it anymore
im trying to get the NPCinfoarray
Thank you
did a ForEachLoop with all the agents of class 'NPC' and plugged the index to that
It says it's accessing none even though on save it's supposed to save the naems of the NPCs into display names?
Yeah it's not saving into the Display Names variable, i dont understand
It's help if your code didn't look like the timeline to Primer.
Make it straightforward instead of pulling values that probably don't exist at the time from all over the place.
how do i save the name into the name slot for the array
You just put a name in there but that's the least of your problems. Look at your execution, you're making an array of one struct, who's name value will be .... What exactly? The for each node doesn't even do anything
For each loop is for each actor that belongs to NPC class
That's still borked. When that big ass set node is hit, you won't have a valid name
Break this up, make a variable for each field in your save game struct, populate them all separately, and then make the savegame struct at the very end and save.
break it up how? its already broken up, and using the 'get' function wont let me set anything in the get options
- Loop over NPCs, adding their info to the arrays.
- Plug the resulting arrays into your savegame struct
- Save game
Add being the key word here
An array has multiple entries
dont understand why this is not working ;/ am i doing sothing wrong i assigned this to left ctrl
How do you know it's not working?
? look man i just followed a youtube tut im just trying to learn blue prints
By default crouching only modifies capsule size and movement stats. Search for crouch in the character and CMC properties
ok
Isnt there a state to the cmc?
So at default, capsule size and statw would change?
Yeah but if that state isn't used for anything how would you tell.
And youd usually make your animB graph transition to crouch based on the state
Idk if default crouched state is anything different from not crouched
That's why I asked how they knew it wasn't working. It probably is working, and doing nothing
Yeah true
any ways after i get crouch working ;/ im going to try attempt pickup mechanics ;/ not sure if good idea but meh il tr
try
Its a place to start atleast
Good idea but make sure you understand everything you're doing and not just going through the motions.
This is the key ^
where do i find the information? i dont wanna keep looking at youtube
Break it, fix it, understand it
Depends on how much programming you already know
i only know python, java and basic website coding
Oh then you're fine just do it
Make a bp actor class that launches any character that overlaps it. If you're totally new read up on what an actor, pawn, character, component, controller are
what bp stand for? XD
Just searching for nodes in BP will get you most of the way there. It's context sensitive so just drag off a thing and search for what you can do with that thing
BP = Blueprint.
ah ok
my first though should i learn c++ or blue prints but i think this be first step
BP for sure. Don't touch the c++ until you're comfy with them. Won't take long if you know your general programming.
fair enough
might take longer because i got learning difficulties but im trying to supass it
You can do plenty with BP only.
Easy
Minecraft, Factorio, Unreal Tournament, that stuff is c++ land.
emmm im sure minecraft is java
I mean the tech
You wouldn't want to try doing voxels/blocks in BP
well i know if i wanna make my game multiplayer im sure thats C++ aswell
Yeah but learn to crawl before trying to sprint.
Single player that's fine. In MP a sprint is way more complex due to prediction
ahhhh
MP is 5x the work minimum of say, but it depends on your design.
also more pricier aswell :/ if im correct
Idk, price your game how you want. But that's a long ways off. Start with making something happen.
I have a notification system video link if you would want to add that
O.o
Just strugglebus through it on your own first
Whoop whoop!
i actually got crouch working ;3
Hi everyone! is there a node in BP to fire an event when materials finished rebuilding?
no
How can I make mannequin stay on ground without capsule colision.?
Random Bool will be either true or false, 0 or 1.
Random does not mean 50% 1 50% 0
You realise that, right?
Chance not guarantee
It will tend to 50% the more it happens
It will not start at 50%
Show code. I'm not sure I trust what you're saying after you talked about random bool in the same sentence as integer select.
Just why
Nevermind.
i have a problem , when my actor respawns , my stamina bar, empties and stops working , any ideas
You mean as in widget?
Show the stamina progress bar bind function
You sure the stamina is always 100 after the respawn?
Is your char ref set correctly?
it works correctly when i remove destroy actor , in the above picture
when i do that , i basically disable the respawn system
my stamina bar
And if you respawn, that doesn't get reset to the new character, right?
Why not bind it to the player controller (which won't change) and do player controller -> get pawn -> cast to your character type -> get stamina
yea
is it a efficient method ?
It really doesn't matter.
^ this is the cause
sorry, for stupid questions, still new
thxs
It's cool!
By any chance do you know how i can rig the stamina to go down , when i swing a weapon
ill be back, im going to try this
You would need to hook that up in your attack event.
what is vaulting?
This is why I don't like BP
is there a way to get my character to climb steeper surfaces?
how do i get my character to*
Hi everyone, I have a problem involving parent-children actors.
I have created my parent actor, and leaving the Default Scene Root on it, then I created my Child, and I added a Cube on it, but when I'm moving the Cube, it leaves behind the Default Scene Component at the place where the Cube was, causing my code based on its location wrong. I'd like to attach this Cube as my new Default Scene Root but I cannot because it's a Child Component, do you know a way to attach it as the new Root? Or is there a way to force the Default Scene Root to follow its Children components?
How do I do to move the whole actor?
Yes but when I grab my cube, the Default Scene Root stays where it is
Because the cube is patented to the root, not the other way around.. move the root, everything else moves too
Btw set world location and set actor location are different nodes
Ok but how do I Simulate Physics on the actor itself? If I enable Physics on the Cube, it will move when I kick on it but it leaves the Root behind, and if I disable Physics, the component does not move anymore
Have you tried using a static mesh actor which has its static mesh as the root component?
Reparent your first BP to static mesh actor and your default scene root will disappear.
I can create a static mesh on the parent and set it as the root, but if I want to create multiples shapes (not only cubes), how do I do for the future children?
e.g all children will be created with a Cube Root
You can set the static mesh on the component on child classes
Yes, I tried it, but if I do that, the shape will not be centred, as shown on the picture (Box Collision is the center of the actor and SM the inherited component)
Hi, for several days I have been thinking for days about function, which will add a cooldown of 8 seconds at the game start before the proper function can be activated
but after those 8 seconds ( at the beginning of game ) this proper function should be fired immediately
like on this graph
I don't have to add, that delay is not a way to go, because it will add 8 sec cooldown before each "fire"
Did you try using a "Do Once" node?
I didn't fully understand your problem, should the function fire at every tick after 8s? In any case, I think the "Do Once" may be the solution
let me clarify
it's about arcade racer
at the game beginning there is a camera thingy and countdown all in total of 8 seconds
I have several custom functions including player force respawn ( triggered by the player with enter key )
and I want to set custom delays for each of custom funcions to prevent player from using them
and after let's say the race starts
player is allowed to use them
this is the countdown
At the start of each function: if !RaceStarted return
create boolean ?
The race started bit is whatever you want it to be.
A bool. A function. Whatever.
@lyric onyx that depends completely on the pivot point of the mesh. If you make sure all your shapes' pivots are either center mass or center bottom then they'll line up fine
How do I do that? Does that mean I have to place manually the Static Mesh at the center of the actor?
(But yes, set the pivot point at the center of the actor is the solution)
It's how it was exported from the dcc it was made in.
If you export to blender, set the mesh center at the world origin and export back to unreal, it'll be set to the center of the mesh
morning all. following this tutorial on sprinting/regen but i dont want an overlay on screen and would rather use audio cues https://www.youtube.com/watch?v=seGQy-GBfhY&ab_channel=MattAspland. anyone have an "audio tutorial" for that part of the blueprint? sorry if this is in the wrong channel
Hey guys, in today's video I'm going to be showing you how to create a sprinting (running) system with stamina that drains and refills. The stamina will also be displayed on-screen for the player to see in a progress bar.
#UE5 #UnrealEngine5 #UE5Tutorial
00:00 - Intro
0...
I don't have nor know how to use Blender
Its free and it'll take 10 mins of youtube videos to learn how to import, move, and export a mesh
Hey I have a question, I want to make my mesh somewhat see through and a different mesh more visible like this, does anyone know how id go about that
im trying to cross compile for linux and i installed the SDK but it still says its unsuppourted but it shows the linux penguin on it
Thats more a #graphics question, done with materials really
Oh ok, my bad
guys does anyone know the Auto scalability command ?
Hey guys, what's the right collision setup for trigger volumes on actors? I assume there's the right way to set things up so that two trigger volumes don't detect each other but generate overlap events for all the other actors along a particular channel
explain with example
overlap with pawn and ignore everything else?
Oh yeah it's kinda basic but like - I got a projectile with particular logic I'd like to execute on other projectiles of the same class when they enter a "proximity volume" of sorts. but I don't want that proximity volume itself to generate overlap events on the same volume of the other actor, only on the dedicated, smaller collision body in it that hugs the mesh.
So basically I want the volume to "see" other actors but not be "seen" itself if it makes sense. To query other collision bodies but itself not respond to queries. I got tangled up with my understanding of how profiles, channels, responses etc. work and it'd be sweet if you could spoonfeed me just this once, I think it'll make sense from that point on
I normally use shape sweeps for that kinda thing, but this use case is continuous, on a lots of actors existing in the same level all the time, and I only really need to know when an actor enters and leaves said volume. I assumed that it'd be smarter for me to use a collision volume for this specific thing
Hi, I am trying to re-write my AI car respawn logic
but I cannot figure out how to count 5 seconds while car is stuck ( moving with speed under 10kph ) can somebody help ?
Really I think the best example is that I'm trying to achieve the same thing as a shape sweep every frame, so that the collision volume itself does not trigger events in other actors
im just trying to do it the "proper" way ig
Whichever you want
I tend to use timer by function, iirc
I dont like typing the name manually ๐
Then save the return value (timer handle) and use that to clear and invalidate it if above treshold
On below, first check if the handle is validz and if so, do nothing
GetGameUserSettings()->RunHardwareBenchmark()
GetGameUserSettings()->ApplyBenchmarkResult()
i dont think there is a command line syntax for it though.
with blueprints how to give the opposite value (C++ !value) 9000--> -9000 | True ---> False
depends on what this is
but generally
knowing my algebra calculus
multiplay by -1
reverses everything
especially positive values
what about the boolean
?
is float less 0
is integer less 0
it can be either less 0
or greater
9000 is greater
-9000 is less
thereby negative.
i dont know what your point is XD
one method makes a value either negative or positive
the other method checks if a value is negative or positive
I asked what about the boolean
if there was a simple way to do it
Other than a branch method
ok youre not explaining it good enough then haha
if you dont want to use a condition then you could try a select
alright
Hello! Does somebody have an idea what would be the best way to get all names in an array and set them in a text box?
Like this:
Map1
Map2
Map3
I've tried using a for each loop, but with the node format text it replaces that one variable each time (obviously). So I'm not sure how to go about this... ๐ค
youre plugin an array into a single
(image is just for context, I understand that arrays are not supported)
you need to get an array element first
drag
and write get
either copy or ref
doesnt matter for reading
Yeah, that's what I wrote in my message. Using a for each loop I could get each array element. But I don't need just one, I'd like to have all of them in the text box.
Format Text is probably not the best way to go about it.
Thank you. Converting them to strings I was able to join the entries together. ๐
seeking help, how can i apply a knockdown animation to enemy, when my animation overlaps/collides with another actor
use a NOT for boolean..
i think there is but i can not find it, someone was asking the same question on Epic questions site and he found it but did not add the command line
is there a way to make a sphertrace by channel move along my camera?
Project the end location from the cameras forward vector * the distance you want it to go in cm
kay will try
i've done that but i can't rotate it
You want it to cinstantly move in camera direction?
ye and i don't to do that with the event tick
How do you propose it works then?
You cant do somethinf every tick without... doing it every tick
NOT
here's my blueprint
how in the world im gonna use the event tick here
Generate the trace based if a boolean is true or false on tick, in that code there set the boolean to to true or false
So instead of having the speher trace there tgat just sets a bool to true
im gonna try that
?
True = NOT(False)
the not node
not is the negation operator for booleans
it has an exclamation mark
True = !False
False = !True
yeah that works thx
Hey I want to make a simple following logic and for that I've used one enum that tells the AI that it is in following state and one boolean that tells the AI whether he should keep following the target depending on distance
I have a problem that even when I clear the blackboard value keep following it still goes to Move To node
What is the reason for that?
https://blueprintue.com/blueprint/ia6j8qd3/ I made a BP that whenever I press the save button, the game will get all actors of class 'NPC' and do try for each loop for every NPC it finds and make a struct and add the arrays into my save game struct, problem is it only saves the name of the first index for some reason and thats it. what's wrong here?
Oh nvm i fixed it
Fixed version
you need to use a selector, not a sequence
Thanks
Just used it
And it indeed changes
but like after few seconds after the value is cleared
the tick is every 0.4 to 0.6 secs
Hello, any ideas why the variables in my struct keep resetting to default after I restart the editor?
Show it
Variables in struct in what?
Nevermind, for some reason it seems to work now. It was probably my fault somehow. Anyway, thank you for answering.
Having this strange bug where when I hit save after a save game exists, all the saved values of the NPCs except for their name seems to be broken
is it possible to get a random point on mesh collision in blueprint?
I put delete save game slot 1 if a save game already exists in slot 1, then just save it normally, but that doesnt work
works fine for the first save but totally breaks after
In the level blueprint, I setup interact as seen in the image below. I then modified each level sequence to assign to "current_cutscene" and then play.
I used the "On Stop" event for all events to be triggered upon sequence completion.
All other uses of "interact" are kept within respective blueprints, and input enabled and disabled as needed.
Not sure if it's the most ideal, but it's working! Thanks for the help.
Hi everyone! do you know how to end a game? is there a node?
can function libraries be accessed from any blueprint?
you mean like quit?
yes!
yeah there's a node called quit game
that's connected to a button on my widget blueprint
thank you!!
You can create a blueprint function library.
Yeah i have one, im just wondering if there are any blueprints that could never access it?
it can get tricky on widget blueprints iirc
Uobjects canโt
ok ill keep that in mind
and using them on save game objects kinda works, but throws warnings
so probably not a good practice either
Hi!!! Is it somehow possible to get a Texture2D object from Material Instance preview image?
or somehow Material Instance in a Texture2D format, perhaps projected on a cube or rectangle
You can render a material to a render target
Depends on what your'e trying to do tho
i'd like to generate thumbnails for variant manager, and one option is to set thumbnails from texture.
and i have a reference to the material instance, but turns out there is no texture2D to reference it to.. i'll look into render target but not sure if that's it..
@remote meteor haha am struggling with writing the non boolean code for what am trying to do
What is the correct node to make a cast for a blueprint class widget
is it possible to get texture2D out of render target? or do you suggest by rendering a material to a render target get texture from the result material?
Hello, guys
what are these ?
this is a fresh repo, i just created and character, a controller and a bt with a blackboard
That's the external map actors.
I forget what it's called.
Basically the actors in your level are saved externally to help with multi-user editing.
So should I commit them ?
Ok, thank you
@mental trellis do you know how i can make it so when my character hits another character during that animation, that the enemy will play a certain animation (a knock down animation)
yea but idk how
if objects, i can just create a blueprint class
but idk how to do with animations
If its animating, does it move? Like the collision capsule?
yea
Then you should just be able to use regular collision.
I think u should use events
i did it from c++,
they are called onspherebeginoverlap or something like that
and that is where you write the code for the anim montage
i used custom event in second coode
Game Dance ?
and input key starts the animation
yes
When is it called ? I think the collision capsule has custom events
when i press shift q
Ok, I understand now

I'm a beginner, but it should work
so the montage is not playing ?
yes
the knock down montage
this is the attack animation btw
k
that good?
i paid someone to make it hahaha
yea its not printing
oh kay
so then
lol yea idk what slot is
Hi, what's the fastest / easiest method to implement A.I. car braking in certain areas ? I have decided to place overlap volumes, but I am little confused about brake settings
I use cast to ( overlapping AI car ) and then I set the braking force to AI car, but the braking is not evident / apparent
I don't know if this is caused by too low brake torque value, or something else
my cast to character is failing, any advice useful
The actor you hit isn't of that class.
Print what itโs actually hitting
cause according to that you arenโt hitting what you think
@worthy jasper kay will do that
Is there performance difference in using Foreach with array that could be empty rather than checking first if its empty so Foreach doesn't need to be executed?
is this how i can print name?
That's some over optimisation there, MrJay
@mental trellis @worthy jasper okay its working a lot better now, thanks!!!
Of course ๐
@raven pilot love that Toph mesh
ayee thanks men 
Nah
Probably slower on average actually, since you have 2 nodes when you could have 1
depends on average size of array but nah, totally not worth it.
Hey all, does anyone know if it's possible/how to write to CSV (or a text file) from blueprints? (UE5)
oh you said write. sorry
Yup, thanks for the link, but yes, I'm interested in Exporting/writing data to CSV.
yeah, sorry. looked around for a minute and didn't find anything that was just a BP approach
Cool thanks. Yeah seems a bit trickier than just reading..
Might need to summon some C++ support by the looks of things? Unless any BP ninjas here know of a way?
Look up the LE Standard Library
But typically writing to arbitary files at runtime is a no-no for BP. Can be hacked together in C++ but that is a bit smelly TBH. What's the use case?
This won't be happening in normal gameplay. But I am creating a special map that takes a series of screenshots of various characters wearing varying bits of kit in different poses/backgrounds etc.
So what I'm after is I want to write some data somewhere that references each image and tells us what kit attributes/backgrounds/poses are set.
SaveGame?
Is this for design or is the end user doing this?
It's a one-off design thing only, so happy for it to be a bit hacky ๐ Hmmm let me look into SaveGame...
I'm not sure if SaveGame is going to work, as I need external teams to be able to access the data (outside of the Engine)
I just had a browse through the nodes in the LE Standard Library on the Marketplace (some of which already seem super useful), but I'm not seeing anything specific to writing to (CSV/text) file. Is there a specific node you think would do it?
I'm pretty sure it can do JSON but you might have better luck doing what we're doing
We have a map for making stuff, it saves to a savegame
then we have an editor utiltiy to read savegame and write to a data table
you can export data table as csv
OR you can do some editor scripting but that is a PITA
you can export data table as csv
Oooh do you have any info on how to specifically do this step?
Just look up CSV/JSON stuff for Unreal though, there's prolly some free plugins
Just right click it
IDR the specifics but we used to just have it write/read to/from a spreadsheet
OK, that sounds like what I need. Will investigate further. Thanks!
are camera shakes exclusive or can have multiple of those running simultaneously?
I think it's a stack so yeah multiple
Just dont' go all Vlambeer
lmao, thanks
How would I go about that? I recognize putting a spline on a camera might be the trick but I'm not sure how to have the camera move on the spline dependent on the characters distance from the camera
https://tenor.com/view/hamster-triggered-rage-shaking-gif-17789643
What it's like to play a Vlambeer game.
Are UGameInstanceSubsystems available for inheritance by blueprints?
yep, it's an ultra simple class, I should be able to do this easily
You put a spline and a camera into your BP. OnTick of the actor you can calculate the distance between camera and character and use that to get a location along the spline. You can then use that location to position the camera
There is some math involved though
Depending on how your game works, you could place the spline on character height and put a spring arm between spline and camera@fervent bramble
And then just set the spring arm location to the nearest location on the spline (nearest to the character location)
But that's just theory
I am trying to make a simple heart based health system, where if I get hit I lose a heart. I found a guide online but for some reason I get errors that I don't understand. Any clue?
I have a question
I think there is a website that can copy and paste blueprint nodes like Pastebin, but I forget the link
Does someone know?
this @burnt citrus
Thank you!
Heart 1, to 5 are attributes of the class ?
This looks overly complicated
Well.. maybe not complicated but
Is it only full hearts or partial hearts aswell?
A progress bar with a looping heart icon based on the widget size would solve this nicely i think
Only full hearts, how do I set a looping heart icon?
I remade the whole thing and now it works, however it eats all my hearts when I take damage. Doesn't matter if it's 10 dmg or 50, it eats all anyway
Show the blueprint that works
I imputed another, 6th, heart to test with and I notice that it gets black as well so it has nothing to do with my code it seems
I checked the second answer in this thread
https://forums.unrealengine.com/t/heart-based-health-system-that-is-not-based-on-the-legend-of-zelda/132658
I hope Iโm not asking for too much, but I was wondering how I make a heart-based health not based on the Legend of Zelda. What I mean by non-Zelda is that in the Legend of Zelda games, the heart-based health system uses fractions, which results in things liking having 3 full hearts & 1/4 of a fourth heart, whereas in my own game I simply want t...
Also, what is health ? The input, how many hearts are left ?
Health on my player character
I'm a complete beginner and have watched youtube tutorials so I don't really understand the code, only very basic
What u can do is to try with only one heart, without the array, and the for loop, see if it works and go from there
its taking in a float and seeing if its less then the array
Im a beginner too, but I work as a software engineer
Ok, i cant look rn, but do that, try it with one heart without the for loop, see what happens
Now I have the "Health" variable (in PlayerUI) set on a specific value. I want it to gather the info from my third person character instead, not really sure how to go about that
Not sure how to go about taking out the for loop and the array as there is nowhere to input my heath icons
U need a reference of the player in player ui or the other way around
Like that
Now connect
Heart 1 to the pin
And the red pin to the index pin of the node Select
Ok
Then just make the for loop again, but connect only Heart 1 to it
So make it exactly like before, but c9nnect only one heart to the make array node
Same issue, all black
From the for loop node take array index and connect it
Same issue, all black hearts
Hmm, then it might have to do with the widget itself
I looking at this guide, and when he sets the custom event and adds a input/variable he doesn't have to specify any number for it, while I do. He uses UE4 and I use UE5.
https://youtu.be/nI1KcW3mjAA?t=6296
Nvm, I remade it and not I don't have any value on the input. Still get all black hearts though..
I'm going crazy I'll go take a walk and cool down. BRB
You are setting the color and opacity on the widget all the hearts are inside of
not the individual hearts
Get a rubber duck and talk to it
Hello guys, how can i use render target on local for fog of war system ? how can i turn off replication for render target
someone have liks that experience? all works fine. just screen looks like this,
Hi, can someone tell me what's wrong with my code ? What im trying to do is go to an actor and make it spawn projectile
but it's not spawning
Hey guys, Iโm trying to do something equivalent with the generator from dead by dead light. So when the player start interact, all basic inputs like movement and so are disabled and only exit and use are on. What is the best way to do that, have a different pawn and switch?
Probably just a bool,
Or run the "use" and "exit" inputs from the controller. Keep the rest in the pawn and disable input to it.
@near wolf without knowing if shot target is pointing where you want, my first guess is that you're spawning it inside something and the collision handling is canceling the spawn
Hey guys. I've got this skeleton on a physics simulation to fall apart, however I want it to happen as soon as I go through that door's box trigger. Currently it just falls to the ground as soon as I start playing. Anyone ran into this before and could help please?
ok that's a idea, tks
Does someone have any idea why the montage isn't playing?
The add impulse function gets called and executed but the montage is only playing on the listen server and not multicasted
do you guys know how to use render target on only client
i want different renders client by client
Do we have this in UE5?
just do divide, and then you change bottom pin type
shot target is right outside of the gun
That is not possible, see error message in below image.
Probably... Don't simulate physics on the component by default, and use BP to enable physics sim when it's needed
Thank you
hi. how do i use a slowmotion (Global Time Dilation) for everything except the player character?
Any good tutorials to learn blueprints for UE4?
Hey guys, My left mouse button is not working after Unpausing the game.
I tried to input mode game only and Input mode Ui and game.
None of those working.
Anyone know to to get my mouse control back.
Note:If I'm clicking and ad dragging only then it is working
what is cheaper on the engine? getting an actor health value through an actor component or through an interface?
That's such an esoteric question you probably have to test it by doing a loop of 100,000 and measuring the frame time spike ("stat raw" console command on a packaged or play-as-standalone game)
Memory wise I guess an interface will use less because it doesn't contain any code?
Either way I suspect the perf and memory impact will be infinitesimal
Either route is not expensive
well basically the component doesnt contain any code either, you just get the component of the actor and then get its member variable
its really hard to tell where to use interfaces and where to use components
Interfaces are structurally simpler but don't have any behavior/data, so I guess it depends if you need that
Erm... hello guys. What should I do to get the physical representation of the sun in my project?
So if you find yourself remaking the same system on every actor that implements an interface, then...
In my case it just turns on and off like a light
tbh i cant really tell a difference between the components and interfaces, they have almost same functionality for what i can tell
Epic's own example use case of a BPI is when each actor has a unique reaction to something โ their example was a flame thrower that might set things on fire, blow them up or do nothing
All the flamethrower does is spam an interface message on everything it hits
Components help encapsulate things to help describe an actor. Such as a movement component or a Skeletal Mesh component.
Interface is more of a contract saying that some object has some kind of method on it.
You can have executable code in a component. You cannot have executable code in an interface (unless we want to get in the realm of default implementations for interfaces, but we don't have that in BP land)
but technically i could also check if it has a certain component and then make decisions based on that
Sure - you could do that.
at least for health and everything related i think it makes more sense to have a component
and some function library for it
Up to you.
If it's just a simple health counter - I just put it on the actor directly. Less overhead than anything else.
currently i have set up a component for all health / mana / stamina stuff, it contains the current and max values and regeneration rate
and i can basically just slap that component on any actor i want to have any of these stats
i guess thats alot more convenient than having to set up an interface every time i want to use these stats on a new actor type or whatever
Yup. That's part of the purpose of a component.
Encapsulated functionality that can be used to describe an actor.
Guys. Can you tell me, how to enable that menu? I dont have those buttons
but then why do all tutorials recommend casting or interfaces?
Because they solve different problems.
i havent seen a single tutorial using components for these things
Guys pls help
@manic geode Be patient. You literally just asked your question.
Not to mention that this doesn't have anything to do with blueprint
ah right, sorry
yeah the new buttons really look massively different lol
It depends entirely on the tutorial, the intended goal of the tutorial, and the person doing the tutorial. Components aren't the answer to everything. It's a tool in your toolbox. Use it where it fits.
Most tutorials also just try to get you the intended lesson as soon as possible, so they would circumvent doing things "correct" for the sake of brevity.
problem is that everything fits about everywhere and its had to tell which is the best way to go xD
That's just programming in general.
is there a way to impose drag onto a projectile motion?
guess ill just have to do some testing and figure out what works best
i meant through the component
i think u want damping
Quick note that this is shit and unpredictable tho.
If you want a real projectile with good drag modeling you'll want to roll your own. While you're at it, switch to line traces and not sweeps.
line trace superiority lol
Unless your projectile has a radius worth caring about.
Does something like "Get Random Point in Navigatable Bounds" exist? So instead of a radius it's a square?
(I tried exactly that of course and didn't see anything like it)
Alternatively is there a test for a point to see if it can be navigated to?
just set the origin to that point i guess?
oh yeah, set that to the origin and maybe a small radius.
then use the bool to check if valid
thanks
looks like Random Point in Bounding Box exists
Is there a way to control the execution order of blueprints? For example unity has this window (see pic) which allows you to control the order. (Not to be abused but useful in a case such as mine)
Use case: All my units/bps depend on the grid. To avoid race conditions, I'm hooking up to an event after the grid is set-up, only then I'm executing the rest.
This is tedious to go through most scripts and error prone. Wondering if there is a similar solution where I can set the order and forget about it.
sounds like ure overcomplicating this
Why not do it like that? Have some central authority that controls the order of things
There's also tick dependency
I only care about the order of the begin play tbh
I can do it as I am right now, by hooking up to the grid's "setup event" then doing my begin play when that fires
It is just a convenience question really
In unity, I would just add the grid class to the list and drag it into order position. I know this isn't unity, just wondering if there is an equivalent method or something
go back to unity if you liked it that much (jk)
Lazy man's approach is put a tiny delay on the beginplay on each grid-dependent actor lol. Otherwise manage it so that the grid informs all of its associated actors that it's constructed. I suppose you could do it backward too, where the grid has an event dispatcher for when it's finished, and each associated actor checks if the grid is constructed, and if it isn't, binds to that dispatcher.
I'm a lazy man in this case, so in my project I have a parent class that has a 2nd, "delayed beginplay" custom event
why dont u just put that stuff into the gamemode? i think its loaded before the actors
Are units spawned at runtime?
The grid needs to exist for tile stuff to actually work. I don't see how game mode is relevant
u can build the grid in gamemode blueprint
Currently no but I expect to spawn a few later on
i ended up using a timeline
So if units and grid exist at map load, what's the problem
Unit begin play -> get grid
you store an instance of ur grid thing in gamemode and then the actors can access it
in a hypothetical situation where the grid dynamically constructs on beginplay (cuz randomization or w/e), and the grid actors can't do stuff until the grid is constructed, I can picture why you'd need to manage execution order
if the grid is static, you can put it in the construction script and add it to the level, and it'll be pre-constructed
or just make use of the games natural flow
this is what I am currently doing, I am trying to cut down the part circled in red
where exactly are u building this grid?
the question was: if i can make the grid's begin play (the setup stuff), execute before all other custom bps
it is an actor in the scene
then ill tell u a third time, build it in the gamemode instead of an actor
the gamemode stuff gets executed first and then it loads all the actors
im assuming its a building grid?
building grid?
or what do you need this grid for?
I'm trying to make a tactical grid-based game
think disgaea or ff tactics type of game
ok then what i suggested previously should work
What happens when you start up your Unreal Engine game? This video is a guided tour of the Engine's initialization process: along the way, we'll glimpse the high-level structure of the Engine (modules, game instances, local players, and viewports) and we'll see how all the different parts of the Game Framework (game modes, game states, player co...
i recommend u watch this video
@steady elk
thanks 
Thats a good one ^
<@&213101288538374145> it deserves a pin i guess
Flow control is a vital aspect of game dev and systems in general, especially when they depend on other stuff
Guess the video doesnt really teach you the how-to but atleast walks through the engines framework and some nice to know sequences of things
Hi,anyone know how can I set up a damage multiplayer
Do you already have damage and health singleplayer?
i heard rumors of UE4 having a built-in health system lol
i wonder if they have to remake all that stuff when they switch to UE5
There's a damage "interface". Not really an interface but pretty much has the usage of one, it's on all actors.
No built in health but that's simple
Yes
I built up , health system , damage system , stamina system etc
make the actor health a component and set it to replicate
Then
then you have synced health
Iโm still new ( apologies for stupid questions)
maybe watch some multiplayer tutorials then
Yea, gonna do that
Iโm trying to make a system where after killing an enemie mana builds up , when you press a button it uses the mana which results in high damage
Pass the damager over in the damage call.
Then on the enemy, if it dies, it calls some event on whoever damaged it.
Then back in the player character, that event adds mana.
Character
Input -> whatever -> Apply Damage to Enemy
Enemy
Event Any Damage -> HP Stuff -> About to die -> Notify Character
Character
Enemy Died -> Add Mana
add component to character -> enemy dies and tries to get component of killer and tries to add mana
Ew no
Pass damager over in the damage event
If die, cast damager to character, call an event on it, die.
Character should be touching its own stats, not the enemy itself
the character doesnt do anything in my scenario
except holding the component
basically all the functionality would be in the enemy death event
That's pretty dangerous and fragile. Try to think in the minimum amount of communication needed.
Enemy dies -> It tells killer or character that it died and optionally some other info (its level or whatever)
Hi people!
I have a question about Arrays:
I have an array of Floats. All these Floats values come from variables. I'm using a "For each loop" to calculate a new value for all these variables but I don't know how to propagate it to them... I manage to do the calculation and apply it to the Array, but original variables remain unchanged. Does anyone know how to apply it to the variables please?
You have to go through and set the original variables with the values from the array
Ok but how do I do that?
How did you get the variables in the first place?
I created them in the blueprint, set drag and "get"
At the Event Begin Play, I placed a "Make Array" with all these variables, and "Set" the Array
I created them in the blueprint, set drag and
"get""set"
How many variables we talking?
You need to get index 0 then 1 then 2 then 3 then 4
but time dilation should cover you
5 variables but I'll add more later
My goal is to make my Delays unaffected by Time Dilation, because I'm using a Custom Time Dilation for my Character, but its Delays nodes are affected and make it unplayable
Can we not have an array of variable references in BP?
I need help on how to snap or align instance mesh together by using the normal hit and instance orientation. any suggestions ? https://youtu.be/geEpSjGmYtA
I'm working on a VR project and I use Instance Mesh and snap them together. It works fine for simple cubes but when I try other shapes like Tetrahedron I can't find the right vector/rotator math to apply to make it.
I mean base types.. obviously object types we can
If you must do it this way, I'd make a struct with Name, Float pairs and make an array of those.
Then adding a new parameter is just adding another struct to that array
I see... Even tho I think it's a bit overkilling x)
It's still a viable solution however!
This smells like a timeline tbh
and you can control a timeline's speed
and probably(don't quote me) have it ignore TD
I don't know
However it may be a great solution to adjust cooldown even if time is slow down
You want to have stuff happen in an order at different times.
That's a timeline.
You can have it drive all sorts of stuff too (audio, particles, mat parameters)
All in a one-stop shop.
It's like an animation for whatever you want it to control.
I just want to control delays
how is it dangerous?
Because it's a pretty bad idea to just have any old enemy reaching into the character and directly modifying stuff.
Think in terms of messages
If I want you to unlock your door, I ring your doorbell, then you unlock the door and let me in
I would not just reach in the window and start messing with your door. I just tell you what I want and let you do it
i dont see a difference, its basically just 1 message in both cases or not?
i just butchered my sprint ability to make it multiplayer compatible
again using components to do all the stuff
I never used Multi Gate, how does it work? (I guess I just have to read the doc)
Iterates through outputs each time the input is hit
hi guys! i've run into a bit of an issue. i have a replicatable actor, which is constructed on left click. One client (on play as listen server) can see the others placed actors, but not vice versa. Any help would be appreciated. Thanks!
heres my code
https://cdn.discordapp.com/attachments/221799385611239424/992133672209760306/unknown.png
heres actor properties
https://cdn.discordapp.com/attachments/221799385611239424/992133795438399518/unknown.png
so it basically lets u run multiple codes on 1 input?
why is it a voxel?
i just called it voxel, coz its like a minecraft block except i want it to be spherical
:D
go home george, you are drunk
the what
i got ue4 a while ago and my wifis slow
not that new, just hardly touched ue
why are u setting the owner to gamemode?
Oh sorry thats from b4 i learnt abt replication
gimme a sec
changed it to playercharacter
Well yeah, beacuse everyone is placing the actor on their own machine
only the servers machines actors are replicating out
oh ok
how do i make it broadcast to the server when you place
you need to set up a proper server-client logic
you need to change it to
Input -> run on server event
Then serverside
Spawn actor
soooo
i just tested with this because im also working on multiplayer rn
ok ty
@cursive elbowThe only way the server knows about ANYTHING is through a run on server event (RPC)
so you have to do the spawning on the server and on your multicast
wait how do i get player controller to place it at?
wait how do i get player controller to place it at?
Don't multicast
yeah i guess it should be owning client sorry
actually not
it needs a multicast here
No, the actor shoudl be replicated
don't multicast the event that spawns the actor
just spawn the actor on the server
ohh i forgot to set that actor to replicate
Why do you need the player controller? You're doing this in the pawn right?
or is it in the PC
either way, just get self
Sure it can
or you mean like as an arg
but then wont it always spawn under the character hosting the server
If you get Player 0 it would
thats why you don't do that
ok
this is happening in the PC/Pawn
so get self
then you know WHICH PC/Pawn is doing it
so do i do the index thing and replace 0 with self
No, just get self
this is in my player character
o ok ty
@cursive elbow
wait sorry complete nooby thing: how do i make server event?
Read the Network Compendium
Make an event, there's a setting in its properties for replication
thank you
honestly
you are so helpful adriel and source control, ive learned so much in like 5 minutes!
This is from controller
I'd do it in pawn but it depends on if it's more the PAWN that's doing the building or the disembodied PLAYER
Out of curiosity, I have 3 things to add to view port , using 1 event begin play . How can I do this ๐ฅฒ
( I donโt apologise this time for this question, lol)
Do all 3 in sequence
add one, then the other, then the other
I would make one widget which holds those 3 widgets as children but start with what you got right now
I see , lmao
Begin play -> make stamina widget -> add to vp -> make XP -> add to vp, etc etc
Later you can just do
Begin Play -> make UI Widget -> add to vp
and UI widget would handle its children
but baby steps first
That's more of a bit of advice
Dont need to watch tuts when Adriel is around. A walking tutorial๐
Sounds like a #cpp question
wait actually i noticed that my shit spawns 2 instances on server
Does someone know how to do that every actor spawned can be overlapped only one time and therefore activate the bound event only one time? (If you tell me to use do once I kill you)
and actually on client too
pizdec
so you actually only have to do like this @cursive elbow
and if u set actor to replicate it should show on server and client
@modest monolith If you want a more complicated method you can set the collision to block or ignore after the first overlap
Or you can make a collision component or something to handle the overlap and destroy the component afterwards
Yes yes at the end I realized by myself.. i've set that when he gets overlapped he goes physics only
Hi! I am making an arcade racer and I need to set some needle render angles for TACHOmeter. One car works fine, but when I set ( create ) the reference for/ to the second car and want to use that reference and link it, every time I get an error saying "pawn object reference is not compatible with Wheeled Vehicle Movement Component Object Reference" WTF?
I have no idea what this is
the first car below
Do you know guys if it exists a node that returns a boolean value when the float number is closer to one between 3 values ?
Like if Y location is closer to -175 do this, if closer to +175 do that, if closer to 0 stay
I have to make that my character when he lands he will teleport to the closest lane (endless runner)
Is there a way to automatically scale actor(with skeletal mesh) to always fit scene capture?
how do i add code variables to my blueprint?
you mean, how to create variable in e.g. loop?
uhm not sure if this will help but
i have code that reads the position of a hand and i want to implement that but idk how
sounds like you should watch some beginner tutorials
Just click "+", and choose variable type
thank you
Custom macro with tresholds
On Land -> Teleport to closest lane
make TeleportToClosestLane a function or event, and just call it when you land
easy breezy
for some reason the interact event wont work on my client
Because the client isn't the owner of the Wisp
It should go:
Clientside Pawn
Input -> Run on Server -> Interact
Serverside WhateverYou'reInteractingWith
Event Interact -> Do Thing
The Client -> Server RPC (The Run on Server Event) needs to happen in your PlayerController/Pawn/Character/SomethingElseYouOwn
so basically i have to make new function here?
Yes