#blueprint
402296 messages ยท Page 661 of 403
Is STAMINASYSTEM function called on tick?
First note, is that you have way too many state variables. Systems like this should really rely on getter data. Like you're doing with the GetVelocity->VectorLength. Don't use input keys to tell your system that you're sprinting or not, use the speed. Input key should only affect the max walk speed and maybe acceleration. Otherwise doing something like just pressing shift and not moving turns your stamina on.
For instance. Sprinting? bool, should generally be replaced with a pure getter function like IsSprinting, that returns a boolean value that is GetVelocity->VectorLegnth >= BaseSprintingSpeed
Not doing this will result in buggy behavior, like a player being able to hold shift, and tap W repeatedly, and still drain stamina even though they're not moving that fast.
Well, you have the check there for that with the length so that wouldn't happen in this case.
Guys, I wish to create cover system for my units, for that i want to make capsules witch has to be phantom cover points for my units in all potential cover actors. If I click on that capsule - unit will take cover in same place behind actor that capsule is attached to. But there is potential issue - if I will place actor and my cover capsule will colliding with another mesh - capsule should be destroyed before game started (I check on Begin Play Event if it colliding and destroy it). So will it lag if like 50-80 actors on map, on a game start, destroy colliding capsules and if it do - will be it lagging rest of the game when all colliding capsules destroyed?
(P.S. Sorry if it difficult to understand, ask me if something is not clear)
can anybody help me out?
I've been trying to update an older project of mine
and I'm having trouble with some basic variable access functionality
@tough ocean Not really certain why you're destroying the capsules?
cose if it colliding, player could not click on it and unit shouldn't be able to take it like place for cover
But why not just set it's state? Destroying and creating is costly. You can disable clicking on it with some collision settings.
if it stay existing on a map it will continue generate overlap events (and that i thing will be heavy for system), but ur proposition is good
@maiden wadi
I need to make a widget with a button in it draggable but the button stops onmousedown from firing... How can I fix this?
Not sure what you mean
using OnPreviewMouseDown seems to work
Except now my button requires a double click in order for the click event to fire..
Does anybody knows what's best option to alert actors to some event?
For instance a player attacks one enemy, and all enemies in the given range around the attacked one (or all on the level even) should become hostile as a result. I feel like "event dispatchers" are key to this, but I don't quite get how to work with them.
@trim matrix You can't really do draggable widgets with buttons. It's a hassle, but do yourself a favor and just make your own clickable button widget out of borders that you can expose variables to change and alter on preconstruct for styles, and handle the mouse buttondown/mousebuttonup stuff yourself.
Epic really biffed it on UButton UMG
Mmmh seems like it's by design. I thought about that workaround but I need hover/unhover which borders doesn't seem to do. I might get away with disabling the button where I need the drag functionality.. but we'll see in a bit if it works or not.
Ah, missed those
iirc Mathew gave source files on already made dragable widget you can use anywhere
Weekly whatever on Wednesday (or whenever lol) when we do what you wanted!
A few weeks ago I wanted to see if I could create a resizable widget and after a bit I extended it and made it movable as well. Today I went ahead and cleaned up for release the Widget and hopefully you can get some use out of it.
Link for the Google Doc with Topics ...
But yeah. Like Button Onclick, all you really need to do is set the widget's translation a few pixels down and reset it on mouseup/mouseleave. Everything else is pretty hover. or styling. Can easily make a bunch of functions to get and alter it easily. Then you can just reuse the same widget everywhere with multiple styles.
Cast to is equal to an object reference, right?
Not necessarily. It returns an object reference tho
@vapid ibex Event dispatchers are useful where you have some centralized event that a bunch of other actors can individually listen to. Epic's example is a boss that dies and causes all of the minions to die, which are subscribed to the boss' death event.
But in your case it sounds like that information isn't centralized โ any enemy needs to alert other enemies in some radius โ so an event dispatcher may not be the most natural approach
I have problems even when I remove the button, I've bound mouse up and down on the widget itself instead but my OnMouseButtonUp requires a double click for it to fire for some reason... ๐
Found this https://forums.unrealengine.com/t/widget-onmousebuttonup-only-activates-on-double-click/88127 but the images are broken, rip lol
It works as expected apart from the fact that it will only respond to a double-click: Any ideas why? The widget has only one element - border, and nothing else. [HR][/HR] Solution: one needs to capture the mouse first, and by default itโs captured by the viewport (in most cases I guess). Handling it in OnMouseButtonDown first seems to wor...
What would be a better solution? Except "get all actors of class", of course...
Adding this in my mouse down fires the onmousebuttonup the second time I click but not the first one.. ๐
Blueprint Interface can be used for "one for all" cross info management
BPIs only communicate with other BP classes that shared the same BPI.
Interface might be needed if all of your enemies cannot inherit from the same base class. Like if some are flying pawn drones and some are characters. Otherwise it's just a simple inheritance thing of getting all enemies in a radius via something like SphereOverlapsActors, and calling the event. Event dispatchers would be used if you needed this to apply to ALL enemies, but that would be a waste to run the check on every single enemy.
aight
Hey again everyone.
Earlier today I posted the question Im answering to now and got the help I needed to get the "is overlapping actor" node to work.
It works if I only have one copy of my AI spawner, but if I create a replica of the spawner one them wont recognise the actor that its overlapping
Anyone know what Im doing wrong here?
First blueprint is the ai spawner
second the AI
I have checked the the self actor is unique when the game runs and I have also checked that both instances of the ai blueprint runs through all actors of the spawner class in the for each loop
Array of bools will suffice.
what is it you're trying to do? the problem is potentially that because you're saying 'get all actors of ai spawner' it will check the overlap 2 times, 1st time it may be true 2nd may be false (depending on the order it checks in) which could cause the issue you're having?
Hey thanks for responding again.
I want to have one AI spawner that I can place in separate places on a level and have them patrolling different areas depending on the array of locations they will be able to pull from the actor that they are overlapping and thus semi pairing them with. The locations they will end up receiving would be customisable depending on where I place the arrays 3D widgets. I have the rest of the code ready once I can get the spawned AI to recognise the actor it spawns on
I would define the skills in the player character BP, and store player stats in game instance, of which the character BP can refer to at any time.
The game instance would store all the variables that could be serialised for save data, including skill points.
@vapid ibex maybe a Sphere Overlap Actors or something? https://docs.unrealengine.com/en-US/BlueprintAPI/Collision/SphereOverlapActors/index.html
As the actor is dying, make it do that and filter for your enemy base class & call a function. Can maybe even put that functionality into a BP component
SphereOverlapActors
You could feed a reference of the spawner into the AI so that it knows which spawner its spawned from and then get the variables from that reference. My thoughts would be on the spawner plugging self into the owner pin of the Spawn AIFrom Class node and then on beginplay of the AI you could get owner and cast it to the spawner class and storing it as a variable if that makes sense.
Thanks, I'll try and see if I can pull that off. I tried casting before but I didn't try casting to the class, that might work!
no problem, feel free to tag me if it doesn't work out ๐ป
Thanks appreciate it ๐
@swift pewter Don't you have a level variable? O.o
Depends on what it is you want to do. Usually players only level up in one direction. So presumably if a player levels up and their new level is 25, they've made 5 levels from 20.
Oh. Well in that case that's easy. Level up should set level, and then call bindings or other event functions. And then your SkillTokens should change based on the level.
So if you have TotalSkillTokens and levels are your only factor, you'll do this. LevelUp->SetLevel->UpdateSkillTokens. And inside of UpdateSkillTokens, you just need to do TotalSkillTokens = Floor(Levels/5)
This will set your TotalSkillTokens to 4 for 20,21,22,23,24. And 5 tokens for like 25,26,27,28,29.
Correct. And you can eventually add other factors to the UpdateSkillTokens function, and simply call that function to refactor your skill tokens whenever anything that might update them would change.
So I tried some different things based on your feedback and Im sure Im doing something wrong ๐
First I tried with just casting to the class and it gave the same location to both of the spawns instead of looking at the unique actor.
Secondly I tried setting owner on the spawner and getting the owner to get the locations, but the cast fails.
Third I tried the object reference which doesn't return any vector just null ๐
Every information has to be able to be fetched by the spawned AIs at runtime and they will be two parallel running AI blueprints from the same blueprint. The only fixed point of references are the ai spawners and I can't reference them directly within the BP_Enemy as it'll just return none as a vector
does anyone know anyone who knows how to use blutilities? (blueprint editor utility) im looking to change all fonts in all my widgets
There would be no need to cast in this situation - you have "Get Actor of Class" which allows you to define what class exactly it is you're looking for. The trouble is, you're not really defining which actor of that class in this scenario. What you want to do as Kira pointed out was to add a reference variable of the AI_Spawner to your enemy BP that is exposed on spawn. When your spawner goes to spawn the enemy, you can feed in a reference of self into the new exposed variable on your enemy. Then on your enemy you can reference details about the spawner that spawned the enemy.
Thanks for responding. I'll do some more testing based on your feedback ๐
I feel like Im getting closer, but Im still doing something wrong it seems.
Both are returning Accessed none
https://prnt.sc/12e6p3v https://prnt.sc/12e6u1f this is what I was talking about, but making a variable and exposing it on spawn would also work. ofcourse assuming thirdpersoncharacter in my case would be spawner in your case
so you'd get the owner, cast it to the spawner and then promote it to a variable and with that variable you can get any variable on the spawner when you need it.
Hello, I'm following through a local multiplayer tutorial and have set 2 playerstarts as my game only has 2 players. even though I have set the default pawn class to None, the editor is still spawning an extra player. why is that?
The only problem with casting is that it pulls from the actual blueprint at runtime rather then the instance of the blueprint that is spawned right?
@lost canopy It doesn't matter if you cast or use a pointer. The object will get loaded. If you already have instances of that object around, casting won't make a single bit of difference.
in thr first image i disabled the spawning of the 2 players, but still got 1 player..
Ty, I'll see what else I can mess up while Im at it ๐
@lost canopy To try and explain it a little better, Unreal only loads what things need. Classes are actually an object, they're a version of a blueprint that is created and stored as a "default". Say you have your spawner for instance, but no AI, but you have stuff like SpawnAIFromClass that spawns a specific class of AI. That AI class is created in the background before you can even load the spawner. Casting to the AI class after that will make zero difference. The one and only time you could concern yourself with casting, is when you're casting to a lot of different things in different places and things that don't need to be loaded are. Like if you have four levels, all with different AI, all with different managers. But something in level 1 casts to a specific class in level 2. Now you're not using this class in level 1 but it gets loaded. If that class casts to or stores pointers to other things in level 2, all of those get loaded, and anything they cast to, etc etc etc. This leads to major memory problems on larger projects later when you have a ton of things loaded that don't ever need to be just because of careless pointers.
Thanks for clarifying, that's really helpful!
Sorry to bother you again, tried your suggestion and the cast fails
it shouldn't fail if you plugged self into the owner pin on the spawn ai from class node
Maybe the AI_spawner can't be the owner as its not a character?
Can i convert the interp speed of finterp into seconds or ms? So i want something to interp from 0 to 100 in 1s or 3.5s etcv
@devout dove What is your use case? Because it seems like you want a simple modifier, which you should be able to get from (TotalDuration/CurrenTime)*100
you can try debugging it. on the spawned ai you can do a print string of the get owner node and see what it returns. it should be returning the spawner if it doesn't then there's something else that may be interfering with this code
Thanks, I'll try that!
It returns my AI controller as owner. If I remove the AI controller it works perfectly and thanks for that. But I can't use a behavior tree if there's no AI controller attached
never mind, seems like I misunderstood what 'owner' represents. I thought it would represent the actor that spawned it but it seems its actually the controller.
Thanks for trying. I'll see if I can figure out what Datura meant. This has brought me a lot closer though in understanding how the BPs perform at runtime when there are multiple instances
instead of using spawn ai from class you can use spawn actor from class and as mentioned earlier you can expose a variable on spawn. then when you choose the class (inside the spawn actor from class node) that variable should show up as a pin. but you'd have to change where you run your BT, which you can do in the controller using the Run behaviour tree node
Thank you again for your patience, I'll try that ๐
how do i get all actors of class and store it as a list?
Use the get all actors of class, it'll assign them all into an array you can do with what you want
yes i know that, but i have no clue how to save the names of the actors to a list, i need it to save and load it
something like this?
why are you storing names tho? what is the purpose?
to destroy the actors by name, i dont need to destroy all
you should never need to destroy actors by name
actors also have a thing called ActorTags you could use to identify unique actors
That did it, its working perfectly with my behavior tree now, tyvm!
but how can i add a tag to them after they are destroyed?
at the beginning i need to spawn all actors, but when i load the game i need some to be destroyed. I finally managed everything with saving and loading i need, but i cant destroy actors, i think i got the wrong thinking path in my mind <.<
but you should not be using names for that, i never trust names
i used integr, for it, but it only destroys one
but if they exist in level, then they should be name stable, so you can get away with it
but its not optimal
i thought so too, thats why i started with " get hearts (the number collected) then get all actors of class, then i get a copy, and put the number of hearts in it, but it only destroys the actor that is the number. But i need the number to destroy the count of the actors
No
Object references cannot be saved. You need to store information about the objects and when loading, recreate them.
Doesn't matter if it is in a structure. The objects themselves cannot be stored within a save game. When you're dealing with an object reference, you're dealing with a pointer to the object in memory. When the game exits, that pointer would no longer be valid as the object no longer exists in memory. Trying to store the reference is just trying to save the pointer, and if that pointer is no longer valid, then the object for all intents and purposes, no longer exists.
Goes for any type of object reference - like, you can't store a Texture2D reference that is created from a TextureRender object. However, you could store the image that the Texture2D has created in bytes and reconstruct it when needed.
So in that sense, you have to create your own "Save Object" functions - these functions would collect the data required from the object in question, and if you're loading the game, you would then read the necessary values to place that object where it should be and with whatever values it should have that you've stored in the save.
Before I submit this repro project in an bug report, there's no non-C++ thing I can put into World Context Object to make this work, right?
(It's an Editor Utility Actor, btw)
Happy Sunday, folks. Took a day off and now I am back on the grind. Today's task - limiting the amount of enemies that are allowed to be spawned in world.
My wave game is really coming along and it is quite fun, but once you get to Wave 13 and up, the amount of enemies that gradually spawn eventually lead to significant frame rate drop. I've experimented with lods, but the maps are such close quarters that they can only do so much. My solution - check how many enemies are in world, and if it's >= 100 or so, I want to temporarily stop spawning and then resume again once enemies are < 100, until the wave is over. I heard get that "get all actors of class" can be expensive. Anyone have some advice for how to best handle this?
Hello!
Is there a way to refer to any of these Scene Components inside the Details panel of the Actor Component named "Component"?
GetOwner, Cast to Actor Type
Create a control actor that all your spawners report to. In this actor, have an integer value that keeps track of how many enemies are spawned. Before spawning an enemy, have them check with the control actor to see how many enemies are spawned and if < 100 go ahead, otherwise, keep track of the spawner requesting to spawn the enemy - when the next reported enemy is dead, have the control notify the spawner to proceed and remove it from the tracker. When an enemy is spawned, have your spawners report to the control actor and add 1 to the number of enemies spawned. Have your enemy actors report when they are dead to the control actor to remove 1 from the spawn and notify the next available spawner to spawn an enemy.
Basically - have one master that controls all the spawners.
I second this solution ๐
Was this an answer for me?
yes
I mean is there a way to reference those components in the details panel of the actor component.
ah, no there is not
@late cave GetEditorWorld
So if I wanted to write a component that helps communicate two other components, I would have to get their references at runtime inside BeginPlay or something.
thanks folks, I will work on this @dawn gazelle @burnt berry
components typically shouldn't need to interact with other components best rethink your design
Thank you so much! ๐ I searched for world and yet missed that, and then someone on answerhub said that the only solution was C++
Why should that be?
Eh. A lot of people still go by what they've learned half a decade ago. ๐คทโโ๏ธ
There are a lot of different reasons. What if the manage component gets deleted for some reason? By design Actors manage their own components because they are
"children" of the actor, children shouldn't be managing siblings, the parent should. These are two off the top of my head
Well I am the one writing the code, so I do know the managed component won't get deleted for some reason ๐
Thank you though, I will look for alternative approaches
instead of breaking structs, you can split them
but I don't think you can hide members that way
right click the pin
when nothing is connected
I think it lets you not use the Make node too
Looks pretty clean to me, whats the issue? ๐
You mean like going saveable_data->remaining_xp?
getting exactly one variable instead of breaking?
@swift pewter SetMembers makes it easier to set individual struct values.
For instance. I'm not even sure that your level is going up, is it? Doesn't Break return by value?
Yeah. Don't use the Set though.
Just input your SaveableData into the SetMembersInEtcEtcEtc, and click on the SetMembers node.
In the details panel on the right, you can checkbox which values you want to set there.
They'll show up on the node, and you can set them directly that way without having to break and make everywhere.
Interestingly, Get Editor World didn't make a difference... I still can't get anything after a Delay to execute in an Editor Utility Actor
I dunno. I avoid delays as much as possible. I wonder if SetTimerByEvent is affected?
Good idea, I'll try that next.
Hi guys, So i have an issue with blueprints. I have 0 experience with blueprints and this is starting to be really frustrating. My idea is to have a billboard which shows two lines of text on the screen when the F key is pressed. And the issue I have is that in the screen it is showing a part of the text, and the other problem is that the text is still showing even when the F key is pressed outside of the overlapping box. Here is my BP
hopefully someone could give mme a hand bc to behonest i dont know what else to seach on google
Weird... I don't even get settings for "Call in Editor" on the second event...
and Set Timer by Event doesn't seem to execute either, but it was worth a try ๐
made the bug report now
I'll just use the bool to block while saving, but it would be nicer to have the delay while you're tweaking values
Is it possible to use bps to add rows to datatables
data tables are read-only, they're not meant to be used as a database.
Gotcha ๐
you beauties. Enemies limited to 100 spawned at any given time. It works perfectly
I had planned to work on this throughout the day. It was so simple. Now what do I do?!?
with 100 enemies, the fps sits around 56-62. That should be fine, yeah?
If you want to, you could just use array of the struct instead of data tables.
The rows are basically the array elements, and the columns are the variables within a struct
@summer bolt If you want to mass edit a datatable easily, do yourself a favor and export it as a CSV and edit it somewhere like Apache or Excel.
Hey all, I've got a billboard in my scene, I've got it to face towards the camera but when I'm on top of it, it spins round and round as it properly doesn't know which was to face, is there a way to stop this?
If it's going to be used more than once, use visibility, otherwise destroy
so can the player pop up the widget once or more than once?
So visibility
Is this with the editor open or closed? All profiling should happen with the editor closed as it consumes a lot of resources
that's with editor open, so I guess it would be better?
Hello, Im having some issue with sending Interface Messages to my weapon after I switch it's Mesh. So I have a spear, that I transforms into an Axe if a button is switched but when I switch the mesh my interfaces stop telling the weapon when collision should be on or off. Its just always on. I narrowed it down the the "Mesh Comp" Im unsure how I can switch the weapon's mesh and still receive interface messages. Any help on this would be greatly appreciated!
๐
Also this might be helpful to know, im using the notifies for the following State. When it starts, the weapon's collision turns on, when it ends, the collision turns off.
Hey guys, any advice on widget Leaderboards creation? Would be possible to add a row according to the number of players automatically?
Hey all, so is there a way to set up the default 1st person character to grab objects in the environment? I was following a tutorial and they are grabbing cubes and moving them around and as far as I can tell this function does not come by default and want to find the easiest solution.
for reference, this is the tutorial I'm following: https://www.youtube.com/watch?v=--xR0aQ2rB0
He does have a tutorial for his own "gravity gun" but just curious if there was a quick way to get the grabbing part up and running.
In this free step by step Unreal Engine 4 tutorial video (UE4 how to) you will learn how to implement physics based monopole and dipole magnets that attract or repel each other. This is using physics constraints.
All my UE4 tutorials: https://www.youtube.com/watch?v=BT0jFArPtGM&list=PLEp7216xGGILh3i2BZe2E0ZEuiIGa-VQT&index=1
Join me for Live St...
When you import a static mesh is there any way to edit its geometry alignment? trying to make it "align surface fit" so it stops breaking my material
I only see this feature available in geometry
Is there a way to check if the Actor that a LineTraceByChannel has hit is a Character?
Any idea how to prevent this? When an NPC dies I wait a few seconds and remove the controller and pause or delete all blueprints/components. Usually it works fine, but sometimes they get this super fast vibration/ghosting go on.
Cast to the character class. The 'Cast Failed' or 'Success' output will tell you
Can you remove collision from geometry brushes, can't find the options
could just check the array length
what does "variable is not in scope" mean?
Can someone please help me out with this? https://forums.unrealengine.com/t/tree-view-keeps-recreating-a-check-box-on-each-initialization/224784
Hello, Im creating a rhythm game where you can create you own song/Maps. Everything works perfectly but when I create a checkbox for the corresponding object, and scroll up or down on the tree view, it creates brand new check boxes regardless if its for the right โlaneโ. Thus if I press the create check box button once and you scroll around, you...
Im so lost
its been days
if you need me to join call and share my screen, i could do that
It means that the compiler cannot find the variable you're calling. Out of scope means that you're trying to call a variable that's most likely outside the object.
Thats weird... i create that variable inside the same blueprint, like 2 nodes before i reuse it
hey folks, quick question. I have save slots that I use for storing certain things (graphics settings, high scores, etc). When I package my game for shipping/distribution, where are those saved? I can't find them in the packaged folder
Are there multiple variables that have the same name?
I've packaged out my game for testing. I used Shipping/Distribution. I have it set so that the first screen will be setting up your graphics settings. Once you hit apply, it saves your settings and loads the main menu. The reason for this is so that the next time you open the game, those settings are saved. On my entry level, I have a branch setup like the below. The hope was that the second time you open the game, it would go straight to opening the main menu level. This is not happening. It keeps opening the widget off the false branch. Any ideas?
do I first need to cast to the SaveGameSettings that I created?
Hey I am trying to disable a keybind when a key is pressed but i cannot get it working can someone help me here is the blueprint
Where is that code located
level blueprint
Does it work in the Editor first of all?
works in editor, yes
I should note that the packaged game is correctly saving high scores, and loading them when I open the game again
I found where it's saving these slots to (C:Users>ME>AppData>Local>GameName
it is saving them
just on that level blueprint it always goes false
You could try moving that Logic into the GameInstance
Never know if it's a Level Blueprint problem
Event Init and do the check
Hi, so first off I'd like to say I'm quite new to Unreal Engine so forgive me if I made some obvious beginner mistakes. I have been having an issue where I'm making a Survival/Hack n Slash game and as of now I'm trying to make a system where my character actually deals damage. (I've been doing this off of this tutorial from Ryan Laley https://www.youtube.com/watch?v=BQ7X01SmQJA&t=526s ) See my problem is I've followed the full video and followed every step but my damage hitbox only appears underneath my character and not on my sword. Does anyone know how to fix this? (btw I am using a weapon mesh reference instead of a character mesh reference because I imported the character without the weapon on it)
A new set of videos where I explain and teach you how to make it so you can deal damage to enemies. This first episode covers how to use notify states and a trace to determine if you can deal damage or not.
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my...
How could to make them a single material?
Can you explain? They're all different materials
I have a model with 4 materials, how could I turn them into a single material?
For example, if you had a cube you'd want each side to be a different color?
yes, exactly
You would have to go and make a new element map if im not mistaken
Oh okay thanks for help !
Im wondering how to make a basic crosshair/dot that you point at say a door, and when you click the door opens. Probably really easy I just can't figure it out on my own.
Use a line trace, and compare the classes
I want to change 4 materials in an object
Any help about Element Index ?
element index is just the element/material slots number of the object
so if a mesh has 4 materials, then 0 would be the first, 1 the second, 2 the third ,etc
Oh nice thank you but I want to change all materials in object no only one.
to change all 4 at once, you can make 4 separate nodes. or use a For Loop
yeah change all 4 at once
yup, just add the For Loop like in my pic
between your ChangeObstacle and SetMateiral
Oh yeah true, thank you very much
I need select node?
its only if you want 4 different and new materials
otherwise you can just set all 4 to just one
Select node can save on nodes, and looks better than 4 Set Material nodes with Switch on Int.
Thank you
Ok thank you
Hi I have a question
For the default FPS projectile it will delete itself after a few seconds
where can i find the option to prevent it from deleting itself?
Has anyone encountered this error when sometimes opening, panning or zooming in and out on a certain blueprint "Assertion failed: OutPin->LinkedTo.Num() == 1 [File:D:/Build/++UE4/Sync/Engine/Source/Editor/GraphEditor/Private/BlueprintConnectionDrawingPolicy.cpp] [Line: 506]"
It causes a crash
I have switched my graphics driver from "Game Ready to "Studio" in the Geforce Experience.Hope it works for you too.
@chilly jetty I was gunna try and find an answer for you, but for some reason I cant get any templates to load. But my assumption is there is a destroy actor node with a delay node just before it in the projectile BP.
Have you updated your drivers for your gpu
Yes, i did that when switching to the studio driver
What card is it
Are you using any plugins
A few, but ive tried disabling them, same result sadly
Does it do it in new files or just the one project
Just the one blueprint
Are you using c++
No
Does it give you enough time to copy any of it across to a new bp
It does yea, let me try
Try copying all of it and see what happens, if it keeps crashing try just copying parts of it across and see which bits cause the problem, or duplicate it and start delete parts of it and see if you can find the thing that is causing the problem
Will do
Oh, think i fixed it, deleted parts, found what crashed it and there was a wierd double connection going on with the execution pin
I have no clue how that happend though
Thank you very much!
No problem, glad to have helped
Friends, I have a question.
Here I have an object on the map, which blocks the passage.
When there is a battle, one of the opponents destroys this object, and then he must run through the opening passageway. But since there was an object, there is no navmesh under it and the enemy can not run there. Is it possible to make the navmesh information update after the destruction of the object or some other solutions?
Either:
a. Set the object to not affect the navigation mesh, and make the AI not trying to go through the collision by doing collision check every few steps forward.
b. Use navigation invokers which only calculate the navmesh for the proximity of the AI. I'm not sure about the performance implications though.
@icy dragon Thank you! I did so, the object is two-part. The bottom object has no collision, so the navigation under it goes through, and the top object blocks everything. It is below the capsule and enemies and character and so no one can pass through it.
@ancient topaz You may also need to enable runtime nav generation if you haven't already in project settings.
hello! does anyone know why the line trace won't hit the moving part of the skeletal mesh actor (landscape and squab are imported as one alembic..)
Does it have collision ?
no collision mesh but i am tracing for complex (which should hit per poly if i understand correctly) and for the landscape (which is part of the alembic/skeletal mesh) it works
Think you gotta set that in the mesh aswell ?
2 sec, opening
I cant even find collision setting for skeletal. thought complex was for static meshes, but dont quote me on it
then you have regular collision settings in the mesh in the bp its used
Complex just means that it isn't using the faster simplified geometry but is tracing against the mesh itself.
^so does that work towards a skeletal aswell ?
Should be.
Judging by google though, there seems to be plenty of people with issues relating to alembic cache meshes and collisions.
Sounds like one could be better of with collision capsules then?
where did you find this entry?
ah project settings
mhm no looks like a different enty
I found this in the static mesh viewer
So i dont think it applies to your mesh as it's a skeletal
mhm ok
how would i create an object like the game instance or game mode, the ones which do not have a physical existence in the world?
Object, or Actor Component (not scene component). Though these are not "globally accessible" like game mode or game instance.
What do you mean create those? You don't really spawn them because the engine does that for you
Yeah I had a few "manager" objects which were just actors with no components on them, it works pretty well... Subsystems are also an option but you need to use C++ for those
uh oh, I did hear a rumor you could extend one if it was exposed to BP's in such a way but sounded to be full of gotchas
I did and gave up
:D
I got reasonably close but it just never worked in packaged
Ah
Hi Im working on a magazine eject from a VR Pistol . I want it to look good so I move the magazine to the weapons exit socket so It follows the correct path out without clipping the weapon. I did this with a lerp transform/ timeline But there is a noticeable delay after the mag reaches the exit point and is supposed to either simulate physics or I add impluse and it pauses in the air for a fraction of a second before falling. Im not sure why this is happening. Ideally I would love to move it in a simulated state so its the velocity of the transform is applied to the mag and it seamlessly slides out with velocity But I just get the trying to move a simulated mesh without the teleport flag.
Wow that sounds like it leads to some really confusing behavior lol
I dont really know why this one is giving me a hard time as I have done much bigger things. and I think this should be simple. 3 days and I cant solve the issue
It feels like when the timeline ends there is a delay before executing the finish pin
Perhaps you can try to calculate the velocity of it as it's being lerped, and then adjust the velocity manually at the end?
since it won't have any velocity from the lerped movement applied to it as it's just being "teleported" in a sense
I tried to do that before the Timeline . and also on the first pin of a sequence and it just fell to the floor
Ideally I would like it to be seamless transition from move to simulate. I have also tried to just use impulse to eject it But getting it right is difficult as its either to powerful or dont clear the weapon..
I am also messsing about with set tick groups on the timelime like pre/ post/ during physics but Im not really sure what Im doing there tbh
Lorash Is there a node that could help with that?
Yeah so what you could probably do is just calculate how fast you're moving it during the lerping
then apply it as the object's velocity, and it should continue smoothly at that speed
Thats what I want it to do , look natural
I might be able to do that As I have a BP i do something similar with to look at
I'd just try setting the velocity to some random number first to see if it will continue moving using that method
Won't have to spend so much time figuring out how to calculate the correct velocity if it just won't work :D
Yeah, tho if you wanna simplify it a little you can just copy the current frame to the previous frame at the end :)
Hi, im trying to make a skill tree that auto generates its layout, i got the icon position working but now i need to generate lines to connect the skills, does anyone have any idea how i would do so?
You could draw the line in another program and link all the things together
Is it possible to spawn actors while also giving it a specific public variable?
I think that's expose on spawn
There is a DrawLine method you should have access to within the widget
i don't really know what that means
Call it OnPaint
There are settings to expose variables on spawn in the variable details panel
Ok thank you
r/beatmetoit
I thought there was something like that but didn't know for sure lol
Where exactly do i need to be looking then? in which actor or is it somewhere else?
So you want to spawn an actor and set a variable on that instance right?
Yes i have a vector variable to set the color but i want to be able to spawn it in different colors
the variable is already public
Alright
So
Where you selected the type of variable
Look down a bit
Should be something like expose on spawn
oh i see
Tick that
Yup
And refresh nodes on the spawn actor node
And you should expand it and see an option for that variable
Awesome thank you!
Np
i have a skeletalMeshComponent, and for some reason it plays an animation (looping) all the time by default. how would i make it not play any animation other than when i tell it to?
show the animation settings for the component
what do you mean exactly?
anyone know how i can get a stationary foliage asset to flow with wind?
In the actor component list click on the component that has this mesh
ah ok. it's set to Use Animation Blueprint but i havent made one for it. do i have to,
you have to tell it how you want to animate
if you're just making the trap activate, you can probably use PlayMontage
you will need to use a material, which offsets the vertices of the mesh back and forth over time
What do i need to link to the object in the cast node so that i can measure the distance between two blueprints?
you need to get a reference of an object in the world
and how would i do that?
there's many ways, a simple way is to have a collision box or sphere on your character (or the npc) and on begin overlap you cast to bp_npc with the other actor pin. then promote as bp npc to a variable and then you can use that reference (variable) to get the actor location.
this is just if you have 1 npc though, if u have multiple you could do the same thing but instead of promoting it to a variable adding it to an array.
i'm just not going to use a cast i guess and rather a for each loop with get all actors of class
Hey folks, I'm doing a "simple" find look at rot, but I'm getting wacky results. I checked it on relative and world, made sure my axis' were correct too. What gives?
Aye, so I should +90 on the Y?
Cool cool, I'll give it a shot
Yeah, well that could be my bad now that I think of it. Inside the BP the cannon is pointing up
So I should rot it so the arrow is to the right. Thanks mate!
easier to conjure a random actor and get the distance to that
Anyone know why UI elements that are anchored move slightly when i switch my viewport from window to full screen with F11?
Shouldn't anchored means they wont move from that position regardless of screen resolution?
Hello. When I add an arrow component to my players mesh, it is pointing left when facing forward. Is there a way to reset the meshes forward rotation?
why don't you just reimport it correctly? (the player mesh)
Hey, my name is ben and I render out actors with looped animations to create animated tokens for my pen & paper game. So i have different cameras in seperate level sequences and render everything out with the render movie queue. So far so good. I have two questions:
- When I change the sekeletal mesh (one of the cameras films) and render out the same render movie queue It still shows the old model even though its not there anymore. Is there any way to "update" every sequence without going in and change something and save it.... or something?
- Do you have a hint how I connect the Last Frame of several sequencers to one variable so i can chnge them comfortable without open every single one and set it up manually? I dont need a solution, just a hint i can chew on. -> Use case is that I film/render out different animations (With cine actors/Render queue) that have different animation lenghts
where are they anchored to?
Thats what I was thinking but I dont know if that will affect the bones and animations?
Hii everyone, I'm fairly new to unreal engine. Now im trying to make an sort of fps with it to gain some experience with the engine, now im running in to an issue where when I have the ai shoot and I shoot my self the sounds gets messed up. Does anyone has an sollution for this problem? Thanks in advance!!
Turn youre vollume down! ๐คฃ
Show where you're playing the sound
What can I change the event tick for?
I need the actor to always look at the player.
If you always want to face player, Tick is correct
It's getting a little choppy when many actors are on screen though.
Then you can either limit how often it's called through the tick interval or create a manager actor to update them all together
Does anyone know where I can find some more information on the Return Value of the Apply Damage function? Is it possible to influence this? For example if a player has some kind of damage resistance.
you will have to make your own Damage Type
Uh I do not know :/ havent worked with animations yet in unreal
I suspect you misread the question. I wonder what the "Return Value" of the "Apply Damage" node is
it must be the Base Damage with some calculations applied relevant to the Damage Type. to influence it, make a Damage Type
To my knowledge the only thing I can influence on a damage type is these things. Where can I put any custom calculations?
are there any events similar to "on focus received" or "removed from focus path" but for buttons, not widgets?
I think you may be looking at this the wrong way.
When you apply the damage, you would then use an event like "Any Damage" on the receiver's end - from there you would do your calculations to determine how much damage was done.
If you're looking for visual #s to appear or something similar, then have the actor that received the damage perform that function.
If the person dealing the damage needs to know the value, then it can be reported back after calculating it on the actor and reported back to the instigator by using the Damage Causer or Instigated By node on one of the damage nodes.
(The damage report is a custom event I created)
Guys, I appreciate the effort, I really do, but this is not my question. I only wonder about what the float that is returned from the Apply Damage node is.
It is based around the calculations within the damage type class.
This was introduced fairly recently, and I haven't seen it before. Can this be influenced? I find it strange, that's all.
Yes, by the settings that you see within the damage type class, and that's it. I believe it has to do more with destructable meshes.
The only documentation I can find on it is "Actual damage the ended up being applied to the actor."
Eg:
So perhaps it was introduced with Chaos to determine more fine-grained damage?
Possibly. The damage type definitely is not for doing any calculations outside of tweaking some values - like there's a setting in there for damage falloff which would be useful for AoE damage like an explosion, so the closer you are, the more damage is dealt.
Totally, except the apply radial damage does not have this output, only "Apply Damage" and "Apply Point Damage" has it.
Could you use On Hovered/On Unhovered events?
If you made a widget that was specifically just your button, then you could probably use the focus path events.
Not for keyboard or gamepad
Yes but then Iโd have to remake everything
which I guess is what I have to do
Hello, I would like to update my HUD's ability Icons depending on which unit is selected. Do you know how I would go with that ?
I was able to display the text and character's image by binding, but the binding option is not displayed on the class. Would you know if there is a way to manually update the HUD somehow ? My selected unit is stored in the gameMode so I can get it from anywhere:
idk where to put this but i got this error building lighting and i was wondering if any of you all could help
Hey there ๐
i somehow managed to understand the third person controller a bit,
but is there a way i can "disable" the "build up speed" while running?
have a look here (after sliding is done):
https://i.gyazo.com/4b504985c54022b42a848194c4d1f73a.mp4
should water materials cast a shadow? does this make sense?
If you have a character movement component, select it, and change the max acceleration to something really high?
Real Water do cast shadows, but not like a human would.
What's the best way to implement hitstop? (freeze frames seen in action games, upon landing a hit. usually accompanied by a screen shake)
and what exactly is the issue?
As you can hear in the clip, when the player shoots and the ai shoots you hear a weird i dont know how to call it. ?clipping?
at around 10 seconds in to the clip
What happens if you remove the attenuation?
That doesnt help
What is ShootSound?
That sounds like it has to do with the concurrency.
Just an ak sound, so you can plug in more sounds
is it a SoundWave?
if so, try creating a sound cue and using that instead
hi all have a quick question, what node is outputting float from X to Y in given amount of time? I need to output x=100 y=200 during 0.5 seconds. thanks!
Do you mean you need to lerp between the two values over a period of time?
ok good thank u
mm I thought maybe it's not a lerp between two values but I need to increment it... so it's like from 100, 101, 102 ... till 200 in given time
ok I got with timeline what I need but it plays once, but with "play from start" input it's strangely not playing while activated
timeline starts playing when air time is false...
What node I need to make an Array for Element material?
Nvm.. That was wrong.
It's ok no problem sir
So this would be right. This would set all materials on a mesh to whatever you've defined in the material option on the Set Material node.
Oh thank you very much sir
The nodes looks fine but in game I can't see the materials
how many booleans can you use in OR?
my shield was working fine, but now that I've introduced a second shield type, it's no longer working. I have all 4 plugged into an OR boolean
here's the code that WAS working prior to adding the last two booleans
once I added in Exploding Shield On and No Starting Exploding Shield, it stopped working
right now the functionality of both shields are the exact same, really. I haven't coded in the exploding part, so essentially I recreated the same thing with it's own variables
one is available at wave 3, the new one is available at wave 8
Sorry, can't be much help there - I've never used the Set Material node in such a way so not too sure what needs to be done to use it properly.
It's okay no problem
My button inputs are working to rotate my character, but the mouse inputaxis doesn't work. Does anybody know why this would be?
@weary forum in the "class defaults" section check to make sure these are selected
My guess is only yaw is selected
wow
i don't know why that was ticked
thanks
Much appreciated
do timelines loop no matter what
like after they have been executed
because its still working when it shouldnt
You have to stop them by feeding an event into the Stop exec line.
Execution paths typically only execute once unless there's something that is making them fire more than once - like a timeline, tick, loops etc.
So Begin Play fires once, starting the timeline, then it continuously loops until you feed something into the Stop pin.
I need some help
I use this nodes for change 4 materials in an object but don't work in game
Have you confirmed that it's actually running?
And that it's looping once per material?
I'm also interested in why you're making your obstacle's into glass.
Yeah, that would probably not do anything bad but also not anything useful.
As it would be in the same evaluation, probably the last value.
for the life of me, I cannot figure this out
I ran print strings like you mentioned @trim matrix the value for the first shield seem to be false, same as the second shield
here is the working code for the first third that unlocks at wave 3. It gets cast to in my enemy bp, which feeds into apply damage
the top two are the first (working) shield. The bottom are the second (not working) shield
here is the code for the second shield.
it's basically the same, but the variables are different for each shield
You seem to have two different variable names?
You have "Explosive Shield" and "Exploding Shield On"
I need to. They are two different types of shields with different cooldowns and timers
So Explosive Shield and Exploding Shield are different?
sorry, updated here
I tried rebuilding it from scratch to find out where I was getting an incorrect true/false
the first image I sent was from the first version
how it is now, neither actually work. The first shield was working fine before this. Feeding the 4 into the OR boolean seems to mess something up
Do you know how to use the debugger and break points?
Not as well as I should
Well, it's pretty simple. If you click on that "Branch" node and hit "F9" you'll get a break point.
If you run the game, and get to a point in the game where it would be relevant, the game will pause, and you'll be pulled over to this BP.
You will, then, be able to inspect all the variables.
Which will, hopefully, tell you which nodes are true.
It's very unlikely that the OR node is broken.
As that is a fundamental logic node.
And if it didn't work, a great deal more than your damage code would be broken.
how do I inspect the variables. I did the breakdown, I got hit and it brought me to the breakpoint
You just mouse over the nodes.
The connection nodes. It should pop up as a tooltip.
(it's not the best design that epic could use to display variables tbh)
Shield On = False, No Starting Shield = False, Explosive Shield On = False, No Starting Explosive Shield = True
which is correct at this point. No shield is up and I am able to take damage
Cool!
So you can remove the break point by hitting F9 on the node again, and you can click "Resume" which will bring you back into game.
When you get to the point in the game where the behavior is not matching what you think it should be, pause the game, tab back over to this node, and re-add the breakpoint.
You should then be able to test the new values.
Okay. The Shield is now up, the values are as follows:
Shield On = False, No Starting Shield = False, Explosive Shield On = False, No Starting Explosive Shield = True
And are you still seeing the correct result?
I am going to revise this so it's easier to read and write it.
When no shield has been unlocked or used yet here are the starting values:
Shield On = False
No Starting Shield = True
Explosive Shield On = False
No Starting Explosive Shields = True
OK, but I don't understand your game, so none of those values mean anything to me.
You need to test the point where there is an error. Where you think you should be getting through that 'branch' node, and you're not.
Test that.
Values when the shield is on:
Shield On = False (incorrect)
No Starting Shield = False
Explosive Shield On = False
No Starting Explosive Shields = True
the weird thing - it works just fine on its own. Without this new shield, everything functions correctly
So you've broken something.
Or something was accidentally working.
(hope it's the first, the second is usually harder to figure out)
accidentally working is more like it
Hey, I've created a split timer and it doesn't always lineup with the final time because each time a split time is shown it takes the time float and converts it into text, thus it is rounded up and down sometimes so its usually only off by .001 by really trying to think, I've tried using a clamp and it doesnt work still rounds the number
Is it that the number is inconsistent or that it's wrong?
And is 0.001 second really something a player is going to care about?
I just tested and found the margin of error was much larger 1 sec
Are you using a Timer object in unreal?
Or are you actually storing time values?
so the level is comprised of different stages. While the player plays there is an on going timer, when a stage is complete it gives the split time (time it took to complete that stage alone) as you can see in my poorly cropped pic the splits add up to 18.86 yet the game final time is 18.89 and I printed the float which is 19.89377
Timer objects tend to be not very good for timing things. They tend to be better for intermittent updates.
If you need a toad enemy to hop every three seconds, a timer is appropriate.
heres my timer converstion, my timer works of an timeline
If you need to calculate split times, use GetGameTimeInSeconds and store the float value.
should this be in parralel with my using a timeline as my timer?
Timeline's are even worse for timing, as they're on the animation update thread, and cannot be relied on to always tick.
damn I copied this system from an official ue4 tutorial made about a racing game
I'll start the process of changing it
Store the results of GetGameTimeAsSeconds when you pass a split marker.
okay if ur not sure but could I pause stop and start a timer using gettgametimeasseconds?
I don't... know what possible situation that would be beneficial.
You want to store the results of the amount of time between when a race starts and when you hit specific locations, right?
well the time wouldnt start until the player crossed the starting line
So you take the time when the race starts, and you store the time when you hit the split markers.
Then you subtract the split time from the start time and you get an accurate 'amount of time since the start'.
That is what you want, right?
When an object has to fall to the ground then it will bounce and move according to physics. But in this case I need the natural one as it falls. Then I want it to remain stable on the ground (like a stone). How could to do that?
I'm not with my computer right now, but there's settings to adjust the amount of bounciness and friction of the physics object.
I know but sorry, I really did't find any relevant settings.
I think you want to disable Simulate Physics when you want it to remain stable
Exactly
so you want to know when it stops moving?
You could just do a collision check with static meshes ad hoc, and disable physics if it hit something, but it might suspend in vertical obstacles.
Yea OnHit, disable physics after a period time to let it bounce/roll
Yeah
I have to do that with nodes in mesh?
It's something from here?
Simulation Generates Hit Events?
yes
Only that?
no you have to hook up logic to the OnHit event
OnHit event in blueprins?
yes on the component you have selected that you turned hit events on
Could you show me a sample?
yes in a few minutes
Thank you
@trim matrix If you want the object to not stick on any angle of surface or suspended mid-air because of ad hoc OnHit event, you can define the bounciness and the friction of the mesh with Physical Materials.
How could I define this in an object?
so after 0.5 seconds, physics will turn off
Create a new Physical Material asset, adjust the friction to high numbers (don't go above 1 million just to be safe), set the restitution/bounciness to 0.0, and tweak the density if necessary. Save the asset, then in your mesh's or collision's detail panel, look for Phys Material Override, and use the Physical Material asset.
you probably want to check Other Actor for what you're actually hitting though
You can also improvise Dirtsleeper's method, by doing check on velocity instead of on hit. Because high friction and no bounciness would mean the mesh practically stop moving when landed on horizontal surface, you can disable the physics if the object velocity is near zero. You can also enable physics again if the object's received normal impulse is larger than certain value. (You don't want to compare with exactly 0.0, due to floating point imprecisions)
Thank you very much guys I will try all of these @icy dragon @unique harness
hey anyone know if you can get an actor reference from self?
because this doesn't work and Im trying to see if the player is looking at the actor
i've made sure that the line trace is working properly, i just wanna compare the two actors
Try checking what the Hit Actor actually is, by either watching its value or print string the name
Thanks!
It works, thank you very much
How would I find the location (ie 100 units) to the left of my character's forward rotation?
But why you have more options than me ?
Where is the static friction?
What engine version are you using? I assume it's before 4.26
4.25
I guess the additional options are added in 4.26, probably in tandem with the Chaos physics.
Ohh Okay then, thank you
I have a system where the interior of a space ship is located within a level, I then have a separate level which includes the world that I want to fly said spaceship around in. This is because I want the player to be able to walk around inside of the ship, and physics to behave as if there is artificial gravity. So the actual interior will stay still. What I need to do however is get the view outside from a render target in the main level back into the ship level. How do I do this? Is there a way to have a proxy of the interior level inside of the larger one?
Hi everyone, wondering if anyone knows the best way to make a dialogue system in ue4?
there are literally dozens of ways, and it very much dpends on your game
i suggest browsing the marketplace plugins for inspiration (don't need to use them, but you will get some idea whats out there)
@twilit heath Ace thanks heaps will do! ๐
Hey is it possible to use the gamepad input to rotate the camera not around the player but around itself?
Like I want a camera that follows the player, so it's connected with a spring arm, but I want the right stick to rotate it around itself
you mean simply rotating the camera? That can be done with a rotation offset sure
I've tried doing something like this but it's not moving
Edit: I've connected the set world rotation
but still not working
well you're rotating the camera boom (spring arm) not the camera itself?
Oh I thought it was the same thing
What actor do I need to use to get the camera itself?
the camera is (probably) attached to the camera boom in the actor's component list
Why is it that when I try the camera setup in the viewport everything is fine, but when I try it in a standalone window it's so messed up?
Hello. Trying to control the Sunsky time of day with a UI slider, modified from this video: https://www.youtube.com/watch?v=_Sdm_gsbaos.
Creating accurate and realistic patterns of sunlight and shadow is critical to some scenes, especially for large architectural and construction projects, and Unreal Engine's Sun Position Calculator Plugin provides a method to do this. In this Unreal Engine tips and tricks video, you'll learn how to modify the time of day with a slider during run...
I then load it with this separate BP:
It doesn't work, pulling the slider does nothing at runtime.
Log:
"LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated"
Any tips?
is there a way to randomly select a sequence to play out of an array?
Haha.. When even Epic employees can't use GetActorOfClass, over GetAllActorsOfClass->GetIndexzero
how can i connect those?
@spice shore If you have an array of sequences, Just get a random integer in range from 0 - LastIndex of the array and use that to get that index from the array of sequences.
@turbid valley Custom events in the part with the Timeline, and call them where you're setting the bool.
like this?
Sure. Might have been easier to do that via array of the left column and then get the sequencer after selecting it.
Also don't hardcode the length.
Just drag off the make array and do LastIndex. Then you can resize it later without having to alter the random integer part.
ok lemme try that
Use LastIndex count for the Max of RandomIntegerInRange
thanks, i got it working!
is this right @maiden wadi ?
@spice shore The LastIndex count needs to be the max of your RandomIntegerInRange
I don't know much BP, but that struck me as a bit strange. I suppose it's ok if there's only one object of that class, but..
How do I create a struct in Blueprint?
I have an input that accepts a struct, and I have all the details for that struct.
Is there something like "CreateStruct" that would allow me to combine inputs into a struct?
Like the opposet of "break"
like this?
Yeah.
it seems to play one spefically
make ! Thats what I was most likely forgetting
Besides using event tick and always tracing the line, Is there any other way to show "press "E" to interact" widget when i look at the object and hide it when i look away.
You could limit it by using collision trigger overlaps
So the line trace from camera would only occur every tick when the player is in the interactable's sphere/box collision area.
@icy dragon Thank you, that's smart way
I know it's nothing but as a rule of thumb, i'm trying to limit event tick as much as possible.
I'm calling FreezeGameRendering blueprint node, which is part of RamasVictoryBP Library. All it seems to do is call FViewport::SetGameRenderingEnabled(true). My issue is, whenever I call this, my memory usage keeps incrementing at around 8-10MB persecond. As soon as I call unfreeze, this memory usage clears. Any ideas as to what might be causing this accumulation of memory while the game is in "freeze" mode?
It's not like player should be able to interact with something from far away, unless it's a telepathic interaction anyway
I reckon empty branch result is cheaper than actually doing something.
sure, i just had bad experience of using it too much then ending up with collosal amount of code that was performing bad, optimization at that stage was struggle to say the least.
Freeze rendering is not necessarily freezing all the other stuff that's going on under the hood.
@icy dragon Correct, however, If i dont call Freeze, there is no memory accumulation...memory start accumulating/being allocated when i call freeze, which is why its strange.
Currently i'm not at stage, where i can intuitively know when too much is too much, that's the reason i'm limiting it wherever it's possible. i'm sure it'll get easier as i go on.
is there a way to reverse some of the sequemces in the array?
Hi, I am trying to set a textbox color in a widget based on a variable stored on the PlayerState of the owner actor of the widget.
However when I perform the SetColorAndOpacity operation in the blueprint, it changes the text color for all the widget instances held by all the actors instead of only the one attached to the owner.
How should I do this please?
Is there an event which fires whenever bool updates from true to false and vice-versa?
I guess Event Dispatcher.
what would i need to do with swap array elements
no i dont want to reverse the range mainly the speed
Yeah, it also needs to know if it updated from true to false, not from true to true. Since i'm setting at "LookingAtWidgetable" bool from line trace, i want to activate/deactivate widget "Press "E" to interact" - whenever bool updates its state.
no the speed of the individual sequences
no i meant it as reversing play rates when i said "is there a way to reverse some of the sequemces in the array?"
Any idea on why my loading screen widget added in GameInstance still gets removed when loading another level?
What I'm doing:
- Creating+adding "LoadingScreenWidget" to viewport in GameInstance -> Calling A load level function
- Load level function: - [OpenLevel] -> [Delay] -> [RemoveFromParent"LoadingScreenWidget"]
The problem is that the delay is ignored and the widget gets removed as soon as the level is loaded. I want a delay because sometimes it's almost instant.
I am following this compass tutorial and I got it so the compass texture rotates withe the player view, but I am trying to figure out how I can set it so it gets direction of North from direction actor in level then sets the N north from that then offset the correct player view offset from that. https://www.youtube.com/watch?v=R0Iz49UVxXE&t=267s any suggestions.
In this video I quickly want to show you how to create 2 different compasses in Unreal Engine 4! :D
Hi, I am CAPTNCAPS -at least that is my internet pseudo- and I love making tutorials! I make them for the fun, and because I like helping people! I hope you like my tutorials, I am always open to criticism, so don't forget to leave a comment if y...
i dont know if this is the right place but im having issue when i fired the projectile it works but my particle go through walls Thx ๐
@trim matrix Look into particle collision (beware though, it gets expensive fast)
where is particle collision ?
@trim matrix Search google/youtube to see how it's setup, it's more than 2-3 mouse clicks but there are plenty of tuts out there
Any idea about how I would change the color of a text in a widget only for the widget instance held by a specific actor?
After I created a Material Instance like this, how do I assign the parent material to it? Or how do I create the Material Instance from the Material?
Like this? I can't connect them because the Set Material Instance Parent nodes Instance input expects a material instance constant object reference
ah yes, its called material isntance constant, cast to that
also make sure to select constant in the asset class too
that's not working
what is not working?
definitely works
same
can I set the parent before I create the material instance?
I think it would be better if I can create the instance form the parent material, not create the material instance and then assign the parent
well you selected the wrong class
its material instance constant
not editor
it wont go through the cast
so its obv not setting it
well f me ๐
thanks, now it's working
I got another one ๐ I have a Skeletal Mesh asset with bones (obviously ๐ it's just a rig for a car) and I want to get the position of a bone, but the Get Socket Location node expects a Scene Component as input and I can't cast a Skeletal Mesh to a Component
Hi, how can i create a variable like Timer handle( which decrease overtime to 0)?
@dusk talon
@boreal ether but the timer handle is unique for a single event, i can't create multiple timer handle without create multiple event ๐
Can someone explain to me what Valid and Partial path actually mean ? Valid is just if there is a path to the given location right? What about partial?
@boreal ether oh wait, maybe i dont needto create multiple event if i use that create event node
@fallen glade There's a setting in "move to" to allow partial paths. Then the AI will just walk to the closest possible point to the target
but here I have a path object and I'm asking it if it's partial? I don't get it
Is partial is true if something is blocking the path
I think is valid is false if for example the AI isn't on the nav mesh and it can't generate a path at all
@boreal ether nah, that delegate is still unique, i still need create multiple event
like what? is it testing for collisions?
Can you not use a single event and pass it an enum for different behaviors?
For example if you have an AI that wants to go from the left sphere to the right one:
it will get a partial path and stop at the wall
If "allow partial" is true
and I think the path would be valid, not sure on that one
but if the AI starts outside your navmesh it can't generate any path
@boreal ether then i cant create multiple timer handle :<
oh I see it, thanks. Do you perhaps know what happens when you "get path points" on a partial path like the one you showed?
I'd assume you just get multiple points along the path until the endpoint which would be the wall
Can you describe the intended use a bit more?
so it wouldn't go past it, neat. thank you for the help, I appreciated it!
np!
@boreal ether im trying to create a key-value variable, like skill - cooldown ( with cooldown is a variable like timer handle)
@dusk talon Here's a possible solution. Not the most elegant. Reverse for each loop so you can safely remove items. Then just call this function in a loop
Hey folks, do you guys also have a issue showing a niagara particle effect using the ortho camera? IF so, what work arounds did you use to get past it?
As far as I know orthographic camera is broken, shadows etc
Regarding my earlier question, here is some additional information that might help answering :
@fallen glade Aye, seems to be so. There is a few hacks to get around it, like changing the camera angle or switching to perspective and setting the FOV low
@sweet lintel you're only returning the color for team 1
Add another return node for team 0
oh you need two different return nodes ?
That or a select node
ty for the answer, sorry for the noob question, am quite new to this
No problem, everyone has to start somewhere!
https://youtu.be/MzIuGkUYEmM how to make drunk effect like this?
Texturing, terrain modelling, programming - Przemyslaw Zaworski
Source code:
https://github.com/przemyslawzaworski/Unity3D-CG-programming/blob/master/drunk.cs
https://github.com/przemyslawzaworski/Unity3D-CG-programming/blob/master/drunk.shader
as a generic answer i'd say i would apply some kind of shader to distort render based on a sin wave, however i'm quite new to unreal and have no idea how i would do that or if there's a simpler way to go
This can be done with post FX material.
You would distort the screen with a noise texture, but not too extreme.
In GTA 4 and 5, the drunk effect is done with mix of actual camera shakes and slight noise distortion on the screen.
is there a way to dectect collision and overlap events on a static mesh cube without making a blueprint for each cube
What do you mean by "blueprint for each cube"? You can have multiple instances of a single Actor BP placed in the map.
instead of adding a blueprint for each cube is there another way i can detect collsion between a collection of cubes and the player
Why not just make a new blueprint with a cube in it, code in the collision detection, and then duplicate them around the map as many as your framerate can handle.
Instead of having a generic Static Mesh actor.
because theres over 100 each diffrent shapes, sizes and indivually animated in the sequence manager
Hey folks, what's the best way to scale a mesh (laser) based on a line trace. I'm getting wonky results. Any quick ideas?
I just need help with adjusting the scale length based on impact point
Aye, in this instance I am using Z for up and getting Up Vector
oh, speaking of, I have a really stupid question because I keep second-guessing my math
looks like it should work fine
@supple dome The pivot is at it's base
Yeah man, I thought so too haha but it still comes out really wonky
if a mesh is 100x100x100uu the world scale is essentially going to be in meters, right? i.e. setting world scale to 100 would make it 100 meters across
yep
okay, thanks
do you have any pics of what the laser looks like in 3D?
I can grab one really quick
It should be starting at the base of the cannon and ending at the white box, but it doesn't. It starts like 10 feet away from the base and then keeps going even if it hits a object
Does it do the same thing if you trace complex? May have something to do with the collision
Keeps going, I mean
Hummm. what do you mean trace complex though?
there's a little bool checkbox on the LineTrace node
if i had to guess the pivot would be a little off, scaling from it would push the mesh further away
The system is not that complex but it seems like it's ignoring the trace end
hummm, so the pivot point should be at 0,0,0?
how tall is your laser staticmesh?
If you hover over it in the content browser it should give something like 100x100x100
take your VectorLength you get from subtracting your two hit result vectors and try dividing it by (separately, not at the same time) 20, then 200 and see if the laser still goes too far
I think you're not factoring in the height of the object in world units so you're really setting your laser length to (trace start - hit result) * 200 without realizing it essentially
200 was the magic number! Thanks a bunch dude!
yeah no problem, I just happened to be working on a similar issue atm
Dude thanks so much, man. I tried niagara effects, learned that the stinking ortho camera can't render them good, then tried this technique yesterday and couldn't solve it. Now I have it working haha
math would only work with 1cm meshes, your mesh had 200cm
Now if I rotate it, it stops working hah
That checks out, you were right on the 1cm thing
wait, it works if I rotate it, just won't show the laser before I hit something. That means on the False I need it to beam the distance of the trace
what type do I need to set the property value for a texture?
nevermind I found it
anyone got anyidea why i got the error "level sequence player not compatible with level sequence object actor" when trying to make a random sequence player
I'm confused about how to set references to other objects in the same class blueprint in my components. I want to just have a saved reference in one component to another e.g. TestSimulation Has a reference to VoxelFluidSimData. Technically I don't need to save a reference because the component can do... GetOwner()->GetComponentByClass but I want it saved.as part of the asset for convenience. Is this possible?
Hey ive got a 'spell' that involves spawning two actors, how would i set it so after spawning the second one, any new spawn destroys the last two?
In one of my blueprints, I have two components, a Main Inventory and a Mission Manager component.
Whenever an instance of this particular blueprint is spawned, these components are loaded.
So let's say this blueprint was my "Character" blueprint.
When a Character is spawned, they would then have the components loaded. Now lets say one character wants to reference the inventory of the other.
First, you'd need to know which Character it is that you're wanting to reference the component on - again, each Character in this instance has their own components being loaded.
Once you have a reference to the Character that you're wanting to manipulate, then you can get the component from it and save a reference to the component. The Components do not exist until the actor that has them is spawned in, so you're not able to reference them specifically in the blueprint editor - though you potentially could if you're manipulating the values from within the scene editor and are directly setting them on an actor you've dragged into the scene.
I just got this error, does anyone know how I can avoid this?
LogNavigationDirtyArea: Warning: Skipping dirty area creation because of empty bounds (object: ProceduralMeshComponent
Hi, there is a way to check if a mat or texture is black at runtime ?
Keep track of actors spawned in an array. When casting, loop through the array, checking if the element (which would be the actor) is valid, and if so, destroy it/set life span
Just store it in the GameInstance
i wish that made sense. i know what each of those things are but putting it together i just dont get the rules
is thier a counter function? after every spawn function, add 1 to counter, then at the end with the other things that decide to kill the spawns, timelimit or when they do thier job, kill them, put like a when counter reach 2 kill actors, i appreciate that you put that into a bp but i dont understand where on it it kill previous spawns after 2 have been spawned?
ah i see it now
setting lifespan to 0 doesn't destroy the spawn though?
Oh whoops, yea... Set that to like 0.1 or something ๐
how do i screenshot my bp so i can check where that should be put in, or will be done seprate to the code i have that sets the spawns
i have a linetrace thing to spawn them in certain places and rotate them
I was hoping there would be a shortcut for things you know will spawn together (Unity prefabs have this, where objects in the same heirarchy can reference each other in a Prefab), but I'll just have it get the other component in BeginPlay, thanks
Right, that's better than BeginPlay for sure
This one will do it so one is spawned at a time, and if there are 2 out already, the oldest one is destroyed.
Can I tell an actor that it is not relevant for NavMesh Creation?
im essentially spawning a paired portal, its a spell to counter other spells so you cast, place entry exit portal and redirect it, so im trying to make it either time out in like 10 seconds, destroy if something goes through the portal, or destroy if you cast it again
im trying to do the other guys version but changing all the actor variables to an array is giving issues
ok making it an array has now broke the game
i changed the array back and the code looks like it did but now it doesnt work like it did
you held the button while you placed now it spawns thousands
Hi everyone, there is a way to check if a mat or texture is black at runtime ?
Hello, can someone help me with vectors? I am trying to get my boat to pass this buoy but it only crashes into it. Right now it does the dashed arrow. I want it to be the green line. Any help appreciated!! (Right now I have the boat tracking the buoy with a vector. Maybe I should manipulate that somehow)
You're going to want to look up "Pathfinding".
Retrieving that kind of information is going to be expensive. There is almost certainly a better way of doing whatever you're trying to use that for.
Hi, so i made it so that my skill tree auto generates from a data table but now i've been trying for days to connect the skill slots with lines without success, i also need them to change color according to their parent skill slot, does anyone know how to do this?
thx! i'll look into this soon
As of now i have tried overriding the on paint but ran into some position issues, tried creating a new widget for the line and ran into some angle issues
You can use "Draw Line" like here:
What is the UMG: Draw Line Node in Unreal Engine 4
Source Files: https://github.com/MWadstein/UnrealEngineProjects/tree/WTF-Examples
Note: You will need to be logged into your Epic approved GitHub account to access these examples files. https://github.com/EpicGames/Signup
No need to deal with angles, you just put in the start and end points and it will draw a line.
the issue i had is that for the skill slot i set the anchors so its a vector2d between 0 and 1
Just convert that into screenspace.
so i tried getting the screensize on paint and multiplying values but ended up with some very weird behaviour
ill recreate it real quick to see
Hello guys i have a problem, i set on a world settings level a custom gamemode and player controller. Then i create an interface to get the object reference of playercontroller and gamemode to avoid cast operation. Then on the widget i can use get owningplayer - call the function to obtain the ref of PC and then call a function inside it. The problem is blueprint at runtime give me an error , seems he get None from get owning player.. how i can resolve it? with cast operation all works fine
Not 100% sure, but I believe widgets run twice, once when you make them in game, and once in the editor
so try minimizing your widget window or adding a valid check
so could be a "visual" problem?
I'm just thinking the version of your widget with the null reference could be the one in the editor window
that one doesn't really matter
closing the widget editor window or adding a null check might prevent the error
How would i convert it into screenspace?
i tried to do it with an array of a struct that contains the start and end position and drawing each lines using a for loop but by printing the index of the loop all it says is 0 even though the lenght of the array is 12
I would make a 'line' widget, and have one of those per connection.
Rather than having one widget with all the lines in it.
A widget with only a line inside?
Sure, and make one of them per connection.
Have two slots for the two things you're connecting.
And just pipe their pixel position into the DrawLine box.
sorry im a bit new to umg, what do you mean slots?
Properties on the widget that you would assign while spawning them.
Make a property "Exposed On Spawn" and you can supply them when creating the widget.
oh i see so the widget would be completely empty in the designer
and the only thing making lines is the on paint
that makes sense
thank you!
๐
So new issue, the shape of the lines looks good but changing the size of the viewport messes up the position completely
Apparently, Local to Absolute returns a value that assumes your viewport is full 1080p.
No idea why.
But it does.
At least according to this thread:
Itโs not simple. Slate does not allow access to widget geometry outside of the event/layout pass where the geometry is stable and you can make the correct calculations without introducing layout loops. The only widget who gives you access to their geometry is your own, during the Tick or the events where the geometry is available.
You'll need to take that value and modify it by the size of the viewport.
so anchor position > local to absolute > * viewport size?
Possibly?
You know where the problem is: you need to convert your scalar value to pixel coordinates.
Figure out how to do that.
which one is my scalar value?
A 'scalar value' is a value between 0 and 1 that represents a range.
You say you have one of those for the position of your nodes.
You need to convert that into screenspace.
Or, you need to pass your actual nodes, and read their geometry.
ok ill try that out
not work
what happens after you add the null check
Hehehehe, this is always the question. "What did it do instead of work?"
ya
means use node ? is valid , sorry for the stupid question
btw ?is valid return me that the reference obtain is not valid
if is valid returns true, then it is safe to use and won't cause an error
Why there's no promote to local variable option for me when I right click on a pin?
@smoky socket Local Variables in blueprint, are only available inside of contained functions. They can't be used in the event graph.
geez, I'm stupid ๐
but never return true this is the problem
Why can i interact with guns and stuff like that on the default thirdperson map but not if i change map =
your question is not clear, which effect do u mean? the animation? climbing the rope? ui stuff?
newbie question. On a boolean variable, checked is true or false?
A bool can be true or false
checked means true
@narrow kelp thank you
Hi, why does my NumOfEnemy degrade in value over time?
https://blueprintue.com/blueprint/p_gyi82_/
I want to keep EnemyNum constantly at MaxEnemies
it might be safer to keep your enemies in a set
that way you could never count one more than once
Should I? It's just one type of actor.
another question. I packaged my game out to test it. It works. Is there any reason why I shouldn't continue to build my game from the same file that I packaged out?
I noticed that the folders now include a Build folder
shouldn't be any issue, right?
correct
thought so. Just wanted to make sure before I keep pushing forward, only to find out I'll need to do it again on a version prior to packaging
thank you ๐
climbing the rope?
I wonder if there's a simpler way to do this if you want something to face towards the player but only on one axis? (the line to left is the location of the thing that needs to face player)
(Find Look at Rotation pivots the object in multiple axes)
you can break vector or split the pin
True, zeroing them would probably be a bit more straightforward
Guys, can you reccomend software design patterns that i could look into, which work well with blueprints. I'm still finding out head and tails of it.
Kind of depends on what exactly you're trying to do with said patterns
I'm not sure if a lot of the sort of "gang of four" patterns are something you'd apply a lot
@earnest tangle Most important thing is modularity for me. So i can reuse as much of the work done, as possible.
I've heard about software design patterns just a while ago and they are so many, i'm deciding where to start. I'll look into "gang of four" patterns. Thank you.
yeah the so called gang of four patterns are from the Design Patterns book which is usually what most folks refer to when they talk about design patterns
But I don't really know if it helps much with UE... maybe some of them are kind of applicable but at least in my experience the best thing you can do is try to keep things simple
Simple means it's easy to modify later, which is quite likely something you'll need to do :)
Without proper approach, i end up with problems like events coded into player begin play that must be fired on first level only but they also fire on every other level because they're attached to player and so on - functionalities which aren't modular. I hoped patterns would give me some clarity and outlines regarding these kinda problems.
Hmm
I feel like you'd need UE specific patterns tbh, since a lot of those types of scenarios that you described are caused by the specific kind of architecture used in UE projects
but I guess also basic object oriented design where you can use subclasses to contain more specific functionality, or components, or using event listeners
(eg. you could have a PlayerPawn and then have a child class SpecialPlayerPawn which contains that initialization you need in just that one level)
Here's an example. I coded this dialogue onto player because i didn't had any other level in mind when i was coding, but when i finished and added another level it started firing every level, so i had to create branch and check if it was firing on the first level.
My code is full of rubberband solutions like this, so i'm trying to get better at it.
I'll look into these terms aswell.
Yeah there's a few ways you could solve that type of problems
Instead of hardcoding the dialogue into the player, you could for example use a trigger in the level itself to play the dialogue
But using a branch like that can work too, it's usually just a question of what's a simple way to solve the problem
if you had many different levels and then need complicated branching because of that, then perhaps some other way of doing it could be easier
Yes, that's what i'm looking for, some kind of design pattern which sorts for example pickupables, meshes, interactable meshes, sounds and so on into different categories and gives optimal basis of reusing them. Just something to start with and build upon.
well it's not necessarily just that, it's more about "UE patterns" - how do you approach these typically in a game project with UE's architecture
yup
unfortunately I don't think there's a lot of "UE patterns" type resources out there, I sometimes wonder about this as well when doing something even though I'm pretty experienced in programming and OO design in general
Yeah, but there's tons of features in the engine that you just randomly discover by complaining about it on #cpp lol
like UDeveloperSettings
that seems like such an obvious thing
I guess browsing the UE community wiki and just skimming the articles could give you at least somewhat of an overview of common things to do
yeah that's why I was saying it's "UE patterns" not GoF :D
well a pattern is just a typical way to solve a certain problem
Eg. how do you configure a subsystem easily? UDeveloperSettings and GetDefault it
the whole idea of GetDefault is so foreign to "typical" OO design as well
:D
A quick question. How can I "turn off" the AttachToComponent?
You mean detach?
How can i run multiple sessions/rooms on the same server?
im making a simple multiplayer game
Yes, thanks for the "detach" word, I find the solution.
is this going to cast multiple times
if i save the output of the cast to a reference variable and read that variable for each of the 3 following nodes, would that be more efficient?
it casts only once
nodes with the white exec pin connection only produce their outputs once per execution
ah ok
however nodes that don't have the exec pins will run multiple times per each connection from them
okok thanks
https://d9k7ugc3ks4h3.cloudfront.net/original/3X/9/9/99d79576a33d39da444b57071edb4e117bf5c60e.png
is this some sort of bp theme that can be switched in engine or something?
yeah you can switch themes.
You can get this PS4 lightbar esque theme too
If I have two widget, how could plug it?
Thank you
alternativelly theres a sequence node, for organization
Is there any server hosting solution that can use UE4's built in replication features for multiplayer?
and supports HTML5? (im on 4.23)
Thank you its fine done
any tips on how to achieve this climbing up effect, not the animation just going upwards/downwards on the rope?
get a direction and move the player. Pretty basic stuff. If you want to make it more dynamic (like the rope swings) then get the normal direction between the rope and the player and rotate it in the direction you want to climb.
Hey, is there a way to run code for an actor only when it's placed on the level?
Anyone else have a child gamemode with which players can't move?
how are you spawning the actor?
So normally we have a "spawner" that does the spawning but we want to be able to drag and place them in a level too
But doing this misses some of the code running in the spawner
So i'm wondering how I can tell which ones are placed in the level and run the code for them
have the spawner set a variable in the actor blueprint maybe?
could expose the variable on spawn and have false be placed, true be spawned?
Yea wondered about that, just thought i'd check for any built in thing
Hey, so I'm trying to set up movement with 6 degrees of freedom, and my Character Movement is limiting the Pitch rotation to not go further than -90 degrees or 90 degrees. AKA, It won't let me look further than fully up or fully down.
Does anybody know how to let it rotate past that?
there is a Limit Pitch View function in the player camera manager. There is also a Player Camera Limit Pitch node in the character.
I don't think Character Movement is the right option for 6DOF movement. You may want to improvise from the flight template instead.
I agree but you can switch the character movement in the CMC to a viable method and go from there too.
honestly starting from scratch is even better because you don't need all the bloat and you will be wanting to work in some quaternion calcs to avoid euler gimbal lock.
Also starting from pawn is a good idea, because Character uses capsule collision by default, and games like Descent or Forsaken don't work like grounded character.
Okay, thanks for the tips! As a relative noob, I'll ask, are there any good resources for learning how to build your own movement component like that?
dont make it as a component. That's a whole discipline in itself. Just use actor rotations etc
If this isn't the place for newbie questions, I'll happily move it to wherever is most appropriate.
Is there a good way of getting a 2D array of ints in and out of UE via blueprint? Specifically, I've made my own heightmap generation tool that's not really like other heightmaps, and breaks down to a 2D array of ints. I'm trying to figure the best way to get that data accessible to my blueprint that I'm using to build that a mesh in my level
Handling the movement right in the BP wont hurt.
You don't have to make component, unless you want it to be reusable.
How would one go about getting a JSON or CSV as a variable in a Blueprint? I didn't see any File IO functions when searching
I'd check out the json plugin for more details on that. CSV can be imported to datatables and such.
Perhaps you could have a string variable that contains the path to the JSON file instead, and use Load Asset node to load it.
You can also convert it between absolute path and relative path.