#blueprint
1 messages · Page 51 of 1
Do you know how to use data table?
i assume i need a 'wallet' for money i have ,some functions to waste money ,some functins to receive money and functions to get what i want
https://www.unrealengine.com/marketplace/en-US/product/node-graph-assistant
The User Guide showcases the things it can do
this looks cool
If you want to make shop that sell stuff, you can just use Structs and Data table
who has $11 to spare )
populate the Shop item lists in data table, then the shop keeper can just display information from it
i am a noob ,just a beginner
In this series we will be creating an in-game shop with a NPC where you can spend in game currency.
In episode 5 we give the player some money and start purchasing items from the shop.
Support me on Patreon and get access to videos early, join our developer community on Discord, get exclusive behind the scenes videos on my projects and much mo...
i found this one
Where could I put Talk 2 so it doesn't run at the same time as Talk 1?
Not enough context, what are you trying to do more broadly?
Dialogue between character and NPC which has two different convo events based on what the objective is.
I had an issue and it stemmed from both events being called from the same time.
I was trying to make an enemy spawn emitter and when I was testing it in the editor play, suddenly my player character is floating while in the falling animation and is unable to move (can still do actions like fire when clicking). I saved, the closed the editor, and now when I try again the character is now completely invisible but still stuck (still able to fire when clicking). I get this error message.
so I did implement this, I checked that the location was only set whenever the tile was detected as different, but still see this "bouncy" effect, what else you think I could try?.
Can I get a more precise output for the Joystick when its using the enhanced input? Im trying to get it to only fire when the joystick his reached almost the halfway point of going down. Right now it fires directly off center of the top axis. I've tried using a less than but there is something weird happening and even when I use a less than for the negative side it still fires at the same point.
Didn't see there was an Enhanced Input channel. I posted it there.
yes, how that is not a built-in thing is beyond me. People say UE is great, because Epic actually uses it to make games themselves, but apparently they don't use blueprints in the process at all 😄
Blueprints work to an extent. You have far more control and access to variables when you code it out.
Not knocking blueprints. Im using them haha. But sometimes you look online for a solution and the only solution is coding..... oof.
mm
can someone help me make the bp appear to grow on the widget progress bar?
No errors but no grown in the power up
mana goes down
the constant mana tick
and
the reduce mana ofc
any help would be great
shouldnt the bp progress bar work?
wait
imma check something
k
here is my Get BP Function that is binded to the percent of the widget
A useful debug tool is the print string. Print the BP value in that last function to see what it says. Also, did you find out why you got that issue previously? Because if that happens again now, and the ref for some reason is invalid, that BP float will not provide any useful number. That's the first I would check. Print the BP float and isvalid (bool) of equipment component.
okay ill try that for now
I think you have the wrong function selected here.
y'all, not sure if this is the right channel, but I edited a field in a struct definition, my project crashed and it won't open again, stuck on this... Has this ever happened to you? I'm at my wit's end, tried deleting the saved and intermediate folders, still nada.
I have a different question for a second involing the same thing.
i made those vars when i was making the updatebarconstant for the widget. does this mean i have to use those vars when calling bp?
Apparently Bp structures can be unstable, in particular if editing them. You could try going into the autosaves folder, find the autosaved struct and replace the one in your contents folder. Do remember to save a backup of the files before replacing.
You shouldn't need to do this. Use replicated variables and if you want something to execute when a new value is received, mark it as Rep With Notify as that then gives you a function that is automatically called when the value change is received on the client.
Little simplier terms lol? What do i have to mark as Rep With Notify?
(I'm a novice trying to break into intermediate)
okay so i did that, and i got the string
however, still same results
i need to put the string in a different spot
this is a ss of the tutorial
https://youtu.be/ZGQoo9frBUA?si=M0nrd7zdEEkMBObS
Support the channel on Patreon:
https://www.patreon.com/CobraCode
Get my 12 hour course on how to make 2D games with Unreal Engine:
https://tinyurl.com/Ultimate2D
Learn how to make 2.5D Platformer/Jump and Run in Unreal Engine 5. This is a quick and easy tutorial and even beginners should be able to follow along.
I'll show you how you can rest...
thank you, I ended up going into git and reverting
There's a couple of checkboxes you need to do here. If you've done them, make sure you compile your blueprints and try again.
yes, i think it was the compile only
let me give it a try
okay so, i did EXACTLY like the tut guy then it worked
what i did wrong was, after adding the variable, i didnt hit compile and just check marked the 2 boxes
but when i compiled 1st and then check marked the 2 boxes
i was able to get the follow target thing. am i wrong to assume that this is what was wrong
?
If you don't hit the compile then the changes aren't necessarily "applied" to the blueprint. When you created the spawn blueprint node, it's then reading off the unchanged version which didn't have the exposed variable change applied.
okay, that makes sense. thanks!
Hello! Got a question here about Bindings in blueprint. Could someone enlighten me on how the OnComponentHit(Capsule Component) delegate works without having to have a "Bind" call to it like in the event lower in the picture? Presumably I'd hook up the Bind Event to BeginPlay or something.
The top one you'd implement in the actor that has the component. The bottom one you could potentially bind to in another blueprint, or, you could set it up in such a way that you programmatically bind and unbind the event as needed rather than being always bound like in the top example.
There isnt much of a difference in the underlying cpp code that is getting used to handle the bindings. The top one is basically just a shortcut epic implemented so you dont have to manually call the binding function.
Just some blueprint editor graph magic.
That's the part I was a little confused about. I was wondering if it was just some sort of extra implementation that prevents having to manually lay out the binding. Thank you both! @trim matrix @dawn gazelle
So I must be missing something but is there no way to delete a single element from an array in the editor? Seems my only option for removing items is to delete the entire array. Is there a way to resize the array and remove the last x elements instead of all the elements? Context menu doesn't seem to have a remove option
Maybe I'm just stupid or something idk. I'm wondering if this functionality is just not provided in the editor
Some of them have the functionality hidden
Click the little arrow next to each field, should see delete there
Ohh thank you so much! 🙏 Wow that was quite hidden wasn't it haha. And duplicate was hidden in there as well
lol i clicked on every other arrow before I even saw the one you were talking about
I have a laser projectile and both a hostile and friendly ship actor, they can both shoot lasers. When the laser hits something, it is destroyed.
I want to be able to make sure that the laser fired from the ship, does not hit the team it was fired from, and only hits the other team. I also want to damage the ship that is hit by the laser. I'm guessing the laser actor should call the damage event of the ship from the laser's hit event, but I feel a bit lost on how to begin.
What's the best way of handling this?
This is what I have for the laser projectile so far
I'm trying to set up a pre-made spline that I want a spawned enemy to utilise for its movement around the map. I'm having trouble orienting the spline before adding it to the spawned actor, or even orienting it after it's spawned and added to the actor. It just seems like it does not rotate no matter which rotation nodes I use. Any ideas on what I could do here?
If it helps, this is the first point in the spline, and the X is pointing downwards, I want to rotate the whole circle 90 degrees so that the X points to the right
Either cast to the enemy class or use tags
hi there, I'm finally transitioning from unity to ue5, which i also put off for the longest time since i did not dare to get used to visual programming but now there no real viable alternative until i decide dabble into cpp.
But enough rambling, the thing i actually wanted to ask about is variables in this case a variable "flashlightOn"[bool] which i can change by pressing 'F' and the visibility of the spotlight is determined by "flashlightOn"
Normally I'd do smth along the lines of:
bool flashlightOn;
spotlight flashlight;
flashlight.visiblity = flashlightOn;
if(Input.GetKeyDown(KeyCode.F) && flashlightOn){
flashlightOn = false;
} else [
flashlightOn = true;
}
But now i've set a boolean "flashlightOn" in my eventgraph but how do i correlate the state of visibilty with this variable?
I figured out the solution. Basically I needed to find the slope angle, and use some ACos math to build a new transform matrix, then rInterp between current and new based on the normal of the slope. fun stuff. works great and looks good.
Does anyone know how to make a bone look at a hit location? I have the hit location and know you can rotate an object based on a start and end vector (bone origin and hit location), but cannot get a bone to rotate. What am I missing?
You can do something like this. You can plug in your own flashlight variable in there if you want, and just set it to its inverse value whenever you press the button.
A flipflop node perhaps?
A, set flashlight.visibility = 1.
B, set flashlight.visibility = 0.
If u need toggle boolean just do a not when setting, that will flip the value
Flip flop is nast because it always remember the state.
Imagine if u want to turn off the flashlight for cinematic or other reason
anyone know how to get an actor or camera's rotation where it doesnt loop back to -180 after hitting 180? i want it to just continually add forever if i keep rotating one way, and subtract forever if i keep rotating the other way
all these things just loop and dont go on forever im pretty sure
If u want to keep adding forever, just add rotation on tick?
Use delta time so it's not frame dependent
i dont know how i would do that, im really inexperienced with unreal engine
so i would get the last tick's rotation, and then subtract it from the current ticks rotation, and then add the new value to a variable?
but it has a constant rotation rate? idk, but the rotation that im trying to get is my player's rotation
Hey guys, i've been having a weird bug with my DataTable, it's been working great in the past but now when we fill a field with a class ref, it completely stops the engine from loading. I'll join screenshots of my DataTable and the code of my Row Struct.
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/DataTable.h"
#include "ClassEffect.h"
#include "FItemStruct.generated.h"
USTRUCT(BlueprintType)
struct FItemStruct : public FTableRowBase
{
GENERATED_BODY()
FItemStruct()
{
Name = FText::FromString("Item");
Description = FText::FromString("Item Description");
Thumbnail = nullptr;
ItemClass = nullptr;
StackSize = 1;
}
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Inventory")
FText Name;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Inventory")
FText Description;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Inventory")
UTexture2D* Thumbnail;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Inventory")
TSubclassOf<class AActor> ItemClass;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Inventory")
int StackSize = 1;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Inventory")
TSubclassOf<class AClassEffect> EffectClass;
};
More details :
AClassEffect is a cpp class that derives from AActor and has nothing more, it is just to allow the cpp code to identifie the class
This data table is used to store data about items that will be put in an inventory, basically we got a calss called LootableActor that will look into this datatable for its key and set its others variables to the other field of the row
if you need anything else just ask ! I hope you can understand the context and what my problem is, i've been stuck on this for quite some time and it's currently putting the project at a halt
well i wasn't sure where to put it but now it makes more sense to put it overthere (it's the code of my teammate and i assumed it was mostly BP due to the DataTable)
i'll move it right away
They’ll prly be better at helping you with this regardless
Any idea why im not compiling?
I have a number of walls generated using DynamicMesh, some intersecting one another.
How do I identify enclosed areas, and obtain those "corner points" in that area?
Seems that you have an issue with the GetPlayerCharacter first
Where is this code located?
This is a UI widget blueprint?
What does the error say? No world context object?
Wait, GenericFunctionLibrary, is it by default or was it something you created?
Open it up and compile it to see if there is any error?
I deleted a function in my Hud.
If I disconnect my hud it compiles fine.
Deleting a function caused this.... oof
@distant hollow Ok I figured it out. Im super new to this sorry. But for some reason get player controller was deleted off my hud widget.....
is there a way to unload a reference?
Question i making a game in uneral engine 5 and I want to do it when player finished level comes to the door if door is blue colour it's safe place if red colour fight monsters and yellow traps can I make it that the colour change rendomly so if player dies it's not the same colour and environment
Look up random number generator UE%
UE5*
@earnest ember
@zealous moth By unload what do you mean?
Destroy? Delete from the entire file?
If I make a hard reference to something, it gets loaded into memory. If I no longer want it in memory, how can I unload it?
Look up blueprint interfaces.
They can access variables and data without making a hard reference
when the head of the reference chain is no longer being referenced, during a GC, they will be removed
in unreal, memory management is semi-automated, the removal of an allocated memory will only happen on a GC
that's the part i am not sure I understand well.
If I have a data table full of hard references, bringing that into play and looping through rows will bring stuff into memory.
However, once the loop is over and I got what I needed, will the rest unload automatically?
or do i need to unload it manually?
the data table reference itself is the focus here
for example if you game mode is referencing the data table, the game mode needs to be no longer referenced for the data table to be eligible to be unloaded
Is there any way to extract/find a number in a string?
@fiery ridge you can do a string parse and compare to all numericals OR use regex
which one of them?
sorry it would be "find substring"
but it's a pain
get regex
regex would be even better
Im in a bit of a dilemma here.
Im making vehicles that have different weapons systems, this weapon can be changed on the vehicle.
1- Heavy machine gun. 2- Rocket launcher. 3- Grenade launcher.
So they are attached to the vehicle actor.
But since they are different in shape and size, they are attached at different position offsets.
And they also fire different projectiles, have different shooting speed.
Should i do this all data driven? Create a data table, and then when spawning the BP_Gun, i just get the offsets and shooting speed and projectile from the data table?
Or i create a child blueprint for each different gun type?
Hey everyone, how do you get the color of a specific pixel in a volume texture in blueprint?
Is there any option or plugin for when you drag out a pin and drop it that suggests the most common nodes? So you don't need to type every time what you are looking for?
If they have the same properties but just different parameters, you can just use a DataTable
Otherwise it would be better to create Child blueprints.
Question:
I have a number of walls generated using DynamicMesh, some intersecting one another.
How do I identify enclosed areas, and obtain those "corner points" in that area?
@fallow epoch ty
do not talk about pirating software on this server 😄
its againts the rule
profiling question:
I fucked sth up and my game thread is taking forever on some frames. WaitForTasks is like 99% of it
any advice on how to read this? how do I go about finding out which task is waiting for what?
Hey. How can I calculate the turn rate from my mouse so that I can use in in a Transform bone to tilt my character to the sides when I turn?
How would I get a reference to a trigger volume within an actor blueprint?
Is the trigger placed in the editor or spawn at run time?
#profiling guys prob have ideas
Editor
You can have a variable of the trigger type in the bp you want to call it. At this point it's not pointing at anything tho, so make it instance editable and expose on spawn. Then you can drop pick it from the scene from the instance you dropped
Ok
Though for trigger, do you need to get a reference to it early in the game?
you can just get it when u overlap with it
Tbf, that's what I need, I need to know when it's overlapped, but I can't find anything in the actor bp
Show your code
I have none so far for the character blueprint
You shouldn't need a trigger in the character blueprint
I'm trying to make it so when the player gets close enough to the enemy
It turns and runs away then despawns
So who owns the trigger?
I have something like this in the level blueprint but idk if that's the right place lol
Nope, don't use level blueprint
you can't get a ref to the level blueprint in blueprint. That makes it a one way communication
So for this case, just attach the trigger volume in your enemy bp
When overlapped -> Check if it's the player that overlap -> Run away
For distance check, you probably don't even need Trigger volume
Just have AI perception to check if it sensed sees the character and check the distance
I can't, says it can't be attached to a dynamic actor
Show code
Does anyone know why Get Location At Spline Point in World coordinates always returns a completely wrong location? I tried mitigating by switching this to Local and adding the spline component's world location to it and it's almost correct but still wrong. Are spline components just broken outright?
I just did it btw, never heard of that error
Don't have discord on pc
not outliner
GO to your BP_Enemy
Top left, on component tab
hit the + button to add component
add box collision
That will be your trigger volume
not that I know the answer, but can you give an example of one of the way?
Don't know what is anyway
But WPO is one of the way to manipulate vertex afaik (Rotating coin etc)
Oh, like Soft body?
if there isn't one on the net for Unreal , you might have to write it your own
@trim matrix https://www.youtube.com/watch?v=LwnDh8u5sGU&ab_channel=renderBucket
Maybe this for that use case
Topic: Unreal Engine 5.2 - Introduction To Chaos Flesh
In this video we take a look at Chaos Flesh to perform real-time softbody simulations. We will also take a look at how these simulations can be transferred onto a more detailed mesh by transferring deformations to a rig/skeletal mesh.
Patreon:
https://patreon.com/renderBucket
Discord:
h...
Ok, now I'm back at where I started lol, I can't get the character to move to this box I've got placed
That's the box stored in goal
It gets past the corner barely, then resets its position
The A.I will need an AI Controller for it to accept the move node
also need actual navigation
Look it up on youtube on how to setup I guess
Oppps 🙊
So how would I get it to move there?
you get any error in output log?
so, something I want to do in blueprints is I want to have a set of 3 pickups in a level, when you pick one up it gives your actor a tag that allows you to do something and the pickup disappears, then when you grab one of the other pickups it replaces the actor's tag and the other pickup reappears.
I've figured out the tag replacing and making the pickup disappear, what I can't figure out is how to make it reappear, any help?
what are you using the tag system for?
the concept is it's a stealth game where the pickups change your colour and if you're standing on a panel that shares your colour the guards can't see you, so the tag is to make the guards ignore you
so, I have 3 pickups, a red one, a blue one, and a green one, I want to be able to have the red one picked up then it vanishes, then when you pick up the blue or green one the red one reappears
oh
so you can go back to red if you need to
there's a "workaround" i can share with you
so is there no standard way to do this in blueprints?
1 sec
that's one way to do it
you dont really remove/destroy the actor
you just disable it and make it invisible
and when you need it back, re enable collision and visibility
tbh I don't think I'd have to disable collision, just have it so collision only activates if you don't have the tag of that pickup already
like if you have the tag red you can't interract with the red pickup
None I can see
so how would I re-enable visibility for the red one when I get the green pickup?
I'd go even further than redsid,
have each pickup as a blueprint component. (that way when you want to add further features etc it's easier).
when you trigger the pickup it changes a string variable to the name of the color you picked up. then having an event that fires on the pickup use the node "switch on string" and have it match the name of the string variable which will then make the pickup component reappear
Ok so I got it working sort of
do you have an example of this? sorry I'm really new to all of this still getting my head around it all
If I have a destroy actor at the end after MoveTo, it instantly destroys it
If I don't, it skips back to where it started the animation
have you used Switch on string before?
Simple moveTo Don't have any Finished call back
calling destroy afterward just gonna delete the actor in the same frame
yeah I have in a tutorial I Was working through to switch a widget's text during a countdown
this is how I do it currently
and I have a collision sphere around the pickup to trigger the overlap
interface is something I've touched briefly on for opening doors but I'd like for it to be on overlap rather than hitting a button for it since that's actually part of the challenge. There's areas where it forces you to switch by placing a pickup right in the way
u can do interface with overlap too
This not gonna do anything
you are destroying already before adding a tag
it has worked though I've tested it
If you get lucky
you have 3 different colors, and you need to make one disappear when you pick the other one
which means you need a ref of some kind
You don't want to destroy a BP and still pray that it runs the code afterward
racing with GC
and destruct
Just have the Destroy Actor AFTER you add the tag
but hey if that works for you, then all the best
I've tried using an aimoveto but it keeps just looping back, idk what it is
when you say "reappear" you mean spawning the colored thing back again right?
yes, when Red is picked up it is invisible and blue and green are visible, when Green is picked up Green is invisible and Red and Blue are visible etc
ok do you have them as references anywhere?
im sorry to ask again but it's giving me a headache i can't figure out how to fix, any input would be welcome
you could just store their references on your player character and do whatever you want with them
I have references to them in the level blueprint
oh no
level blueprints are a big no-go around here
you have 4 objects = player, red, green & blue. they need to communicate with each other in some way
i assume its singleplayer so maybe start storing references on your player char bp
yeah it's singleplayer
just do a BeginPlay>set self for reference
don't
cast to playerBP
yeah I've already been told that but I have yet to hear why exactly.
Reason is level blueprint cannot be referenced by other bp actor in BP world. So the communication only goes one way
surely there are situations where that would be beneficial though.. granted not in this one but in others perhaps
rarely
Sure, but not for gameplay element
maybe to show a main menu at the start of the game
though u can use game mode for that
but hey the Level bp is there
things also become exclusive to that level if you tie things to the level BP
Does anyone know a good way to handle montages that need items spawning/attaching during them? I know I could set something up to spawn items and attach but I'm trying to think of a system that's easy to handle different montages and items.
Notify?
@hoary junco You can do a "manager actor" that manage this behavior. It's like a "radio button group", you can have a "PickUpGroup" actor that have the references of each of your pickups, with delegates and events, this manager can can make disappear/appear pickups, and the pickup actors are not coupled together
if its a actor component (pick up group component), you can do a vizualizer that show you the pickups that are "linked"
Yeah that's the point of the level BP. I mainly use it to make events only for this level, like run a cutscene at that trigger box, sky lights and whatever
if you have 100 pickups of each color and do this behavior automatically without referencing 300 pickups, you have to do a manager actor for sure
yes but he's storing actor references for gameplay elements, which isnt good because the next level might not work
automation is key
As in the anim notify get on the play montage node?
Yeah that's a no go. Use Game Mode.
we are telling him that, i dont think he wants to do it though xd
Or game Instance, I honestly never understood the difference between Game Mode and Game Instance.
game instance persists throught levels
until session is terminated
game mode resets upon level change
I guess. Get the name of the notify and do whatever you want
Thank you
I never used Game Mode
Just game Instance
They have completly different Use case
That was my initial thought but that would require setting something to handle it where ever I play a montage.
why don't using subsystem ?
you can save stuff on game instance (like save files, upgrades, etc)
Subsystem for?
to answer the question of Mike MW
Without starting the new animation, it doesn't even move to the box
Yup, I have that for ammo management and health and stuff. Since I want them to persists through levels
so I just thought of something, can I call an event whenever a character's tag is changed?
Probably, with repnotify. I never tried tho
i really do not think you need the tag system for this
You can use a dispatcher
I think
but its up to you
You can make your own Setter Function, which then broadcast an event
hey folks does anyone know why this rotator returns the same value every tick?
despite the target moving all the time
How do you observe the value?
That's odd, show how you print it
Check with Body and Target if they're referencing correctly
You probably want to print the location of body and target too
I did this
do you know that, after you update the world rotatin of your body, the find Look at rotation will be recomputed ?
how?
store the result in variable before updating your components rotation
because the function is pure
he prints before he set the rotation tho, just a hunch
Body->SetWorldRotation will compute Find Look at Rotation once, then Rotation->SetWorldRotation will recompute Find Look at Rotation but because Body has changed, the result could be different
Print Body Location and Target Location, see if they change
disconnect the set rotation then, see if u get different result
my bad, you don't use rotation in your Find Look at Rotation but in the Lerp
I see no problem with this, the value always update
even after updating rotation
My guess is your Target and body doesn't move?
the body doesn't move Yea it's supposed to be a sentry
My character just doesn't move on ai MoveTo or simple move to
If the body is the actor itself, is the target set correctly??
do you have a NavMesh in your level ?
Yes
Not a problem as long the target moves, have u print string both location?
I'm not sure what you mean by Body and Target, different actores??
You can see from the video, my box stand still too
and your AI is inside the nav mesh bounds volume ? sure the function is called ?
the body is a component and the target should be set correctly because it does look at it but just for one tick and then it returns the same value as the first tick
Maybe check with the AI Controller? Behaviour Tree
@hoary junco what did you decide to do?
i moved it manually to see if it updates
lemme try printing
go get some lunch and think on it some more because I'll be honest so much stuff was thrown out that I have no damn clue where to start.. back to square 0
Ai MoveTo is called, then it triggers on fail
Try printing from the Invalid
Idk why
nothing happened because i already did print valid before
Btw wut does this truly mean
The body changed
get rid of tag system, store references on player or game mode, this will allow you to control all the colors and do whatever you want, gl
Temporary, try taking this whole function out and put it in the Event Graph to where the Look at Enemy is.
no its ok, but if you use your lerp with an alpha other than 1, each time a pure function (without exec pin) is linked, it is computed
for exemple, if you do something like this, your Lerp is computed once for the mesh world rotation, but after, for capsule component rotation, you will recompute the lerp, and because inputs has changed (mesh world rotation), it will change the result
So how do i recompute the lerp?
but it doesn't affect your actual issue because you don't use your lerp for the moment (your alpha is always 1)
what I suggest to avoid future bugs is to store the result after your lerp in a variable, and use this variable to update rotation of your components
if it's not clear, i can show you an other exemple with floats
is this something that can be avoided with c++?
with a variable
I had an issue with boolean in UE. where it's inverted, settings it to true, it returns false
So is it better to mix bp with c++ or just pure blueprint or pure c++
I'm using c++ with my new project, it's much better, c++ based with some BP.
so after i (almost) master blueprint is it an obligation for me to learn unreal c++ aswell?
I wouldn't mind learning c++
.... but i like bp structs
Have a c++ base class
I have a big project which was bp based, I started to change some functions and put them c++
@toxic jay Any wisdom on how to navigate codes? I can write something for my self but I can't read other people code.
Do i just need to read more on learncpp.com?
wait so if i were to start a new project i should pick c++ instead of bp?
Same
when you choose C++ or BP when you create a project only affect the code of the template. You can add C++ to a BP project, and add BP to a C++ project easily
and to debug 
Ah
Im just ctrl clicking function but it still feel like a maze
@toxic jay c++ uses Game Instance like BP??
Game Instance for c++ felt obscured or like "it's there if you want it"
What's the diff between cpp gi and bp gi?
game instance is a c++ class, all classes in BP are in c++
@toxic nacelle so do i store it like dis?
BP game instance inherit from C++ game instance
yes, then you can use this variable after, because the result is cached
Ik I'm just trying to understand what he means
I may be really dumb but how do i use it?
Thanks
If u tap cpp you can make subsystem out of the game instance. Kinda useful
drag and drop your variable in the bp ?
I used it for loading screen because I don't want to clutter my main GI
Well das obvious
But how do i put the variable to use with the calculation is what i'm confused on
,,,whoops
just plug it
Well i actually did that initially
Still the same result
Unless i'm missing something crucial
@fiery ridge what was the code again to deactivate and hide an actor on pickup? I want to test something
set visibility and collision
yes, i said that this fix won't your issue right now
turn both off
Oh
also how do I get a reference to an actor because I saw it there before now it's gone
so, you sure your target is moving, is there an other code that try to move the target and potentially reset to his initial pos ?
like I drag off the target node, type in the name of the blueprint and it only says cast to
go to your color actors, on Beginplay, cast to player BP and set self as reference (you need a ref variable on player BP first)
well i could try storing the original position and reset it after the move component to node completes
it's better to use Set Actor Hidden In Game, because sub-component will remain visible no ?
hi all, im making a PC / controller game and not sure how make an action button work for elevtaor, currently i have 2 inputs W + S to go up and down respectivly, how can i check which key was pressed to control the code
now that i think of it, make one parent blueprint and the rest children, much much easier and less hassle
well i tried doing this and it didn't work for some reason
i did set it properly though i think
is modulo in blueprint broken? -1 % 5 is supposed to be 4
I used modulo just fine. Never tried negative number tho
Also watch variable can be broken afaik. Just print string to check the value
ah apparently this is correct behavior https://forums.unrealengine.com/t/blueprint-modulo-node-doesnt-handle-negatives/315093/4
👍
Yes, modulo doesn't necessarily give positive result
is your body moving, with this code ?
yes, i only see the Body variable 😄
so why do you move your Body component ?
ok, both the target and sentry has Body variable
Yup
and your target is literally moving in the level ?
but the Find Look at Rotation always return the same result ? 
does someone know why Unreal doesn't let me to set the default value of a "sound component" variable?
I couldn't find much online
If I set the variable to "sound cue" than I can set the value but I can't use the "fade out" or "stop" nodes to stop the sound when I want
Also worth mentioning is that because of this I am getting an "accessed none" error after I stop playing. This is not game breaking just very annoying.
It happens because I try accessing a variable which hasn't been set yet.
Thanks for any help or tips.
Cheers🍻
Well you're storing a reference to an audio component. What would you expect the default value to be able to be.
It can't know what audio component youre looking for at editor time
When you use something like a sound cue, it can have a default value, because it's an asset
so if I use an audio component I cant set its value to be an sound cue?
No, because it's an audio component pointer
and are there any other options to fade out or stop the audio
using an sound cue variable?
Either have an audio component on the thing, or at begin play, assign the ref into that variable
I see it is weird cause in the ue documentation of the sound component is says I can add a sound cue
or maybe I am understanding it wrong
You can, but you're not creating an adding a component. You're making a variable that is a component pointer, there's a big difference
I see. Thanks for the explination
anyone know how to get the original bounds of an actor as if it was unrotated? get component bounds takes rotation into account and thus is inconsistent
get the static mesh from the mesh component and get bounds of that instead.
Is there something i can do after using Enable Input to kinda refresh the key down inputs? If i'm already holding W and Enable Input, the W isnt recognised as down, and has to be pressed again to activate 🤔
are you using enhanced inputs?
maybe? not tested
yes
actually, i think my movement is still on the old system
Yea that's the old system, as far as im aware it should still fire but if you have 'MoveForward' somewhere else, it's probally consuming the input meaning nothing else gets it.
it's definitely not anywhere else, but i think it might also be because i'm flushing input when i swap to UI mode only
i wonder if there is a way to undo the flushing, or whatever that terminology is 😂
@fiery ridge sorry to bother you again but a question, why are tags seen as a negative when setting this stuff up? Because after a bunch of testing I got the switch on string method to work, when Red is picked up I hide all instances of Red, and when setting up the show green and show blue, wouldn't it save a bunch of time if I just got GetAllActorsWithTag and set them all to NotRed so hide all Red and show all NotRed? I figure if I ever wanted to add more colours I could just asign them the tag of NotRed so I don't have to extend the blueprint any further
if there is a reason why this wouldn't work or why it's bad I'd like to know so I don't commit to this
it's not necessarily a static mesh
So I'm looking into exporting some data, preferably to csv. From what I've read you can easily export data tables, but you can't edit data tables easily at runtime. So what would be the quickest way to export some data to csv without a data table?
I don't think that's gonna work, the box from get actor bounds is already scaled based on the actor's rotation, rotating it won't change anything
I don't think you can even rotate extents since they're not representative of a position
if the extents are a 1,2,3 , and it is rotated 0,0,90, the extents will be 2,1,3
that's only gonna work for 90° rotation then
and the initial extents are still already wrong
well wrong relative to what I want from them
ahh yah , extents are always in a grid
horrible workaround: duplicate the object, hide it, set its rotation to 0,0,0, get bounds, destroy 😂
yeah that is going to break many many things
i was actually doing stuff regarding object bounds yesterday
and i managed to get the proper rotated bounds after a bit of math
but i deleted it all because i didn't need it in the end 🤣
I have a number of walls generated using DynamicMesh, some intersecting one another.
How do I identify enclosed areas, and obtain those "corner points" in that area?
hi there how can i check what is colliding with a box?
i have a box on my hand and a box on an object and they seem to be colliding even though they haven't touched yet
Get OtherActor on collision
Ya, check the Actor, print out to see what is the Other Actor that is colliding
wdym?
sorry i don't know how to check the actor
Drag out from “Other Actor”, print
yeah
Then see what is the print showing
It should show what is the other actor causing a collision
omg like this ?
Yes
damn cool it worked !
its vr handshake cc 0
i have this on it
but i don't know what are the right settings ? It should be just the box colliding
thank you so much for your help i'm going insane
So the actor hitting is of a class VRHandshake
You can ignore the cc0
LogBlueprintUserMessages: [t_cell_60fps_Blueprint_C_0] VRPawnHandshake_C_0
LogBlueprintUserMessages: [t_cell_60fps_Blueprint_C_0] collidedd
LogBlueprintUserMessages: [t_cell_60fps_Blueprint_C_0] VRPawnHandshake_C_0
LogBlueprintUserMessages: [t_cell_60fps_Blueprint_C_0] collidedd
ah ok what does it mean
Json
but what collider on the VRPAWNhandshake
That means your VRPawnHandshake actor is colliding with it
Try going to your Viewport and check the collision box
i have set everything to this setting
Do you want them to interact or not to?
here is the line
export to json and then convert to csv?
yes i want the interaction but only with the box on the Object and the box on the hand
So yeah sorry i've set everythhing to no collision except those two boxes
this is the box setting on the hand
I don't know never worked with json. But I know you can make a Json structures so you can export the data you want
if you are talking about Data Table, it does take both csv and Json
and this is the box setting on the obejct
You can customize the collision settings
Just search for Collision in the Details
And play around with it
Yes this
yeah are those settings ok or should i set it up to collision enabled ?
Test around your settings
ok so this is correct
ok i'll try opther settinfs
Check further below
There should be a set of interactions showing what they interact with and not
Yes
but there also seems to be some sort of slight offset with the collision box
thanks i'll check
@frosty heron I have a number of walls generated using DynamicMesh, some intersecting one another.
How do I identify enclosed areas, and obtain those "corner points" in that area?
You can always adjust the size of the collision box and the offset
its only working when i activate world dynamic for some reason
and its working without my hand touching anything
i think it's colliding with the player start
wait i have an idea
i'll add the actual vr pawn instead of the player start
so i can see better
yeah no it still collides at some random point
isn't there a workaround here ?
Hi all I hope your well. I have a very specific problem with the AI perception. Basically my main actor has an ability where he can swap out with another Actor and I want the enemies to chase the current actor that is being controlled. The way I have it set up in my Ai controller works for a little bit but the enemies stop chasing the other actor after a while. If I switch back to the main actor the enemies start chasing again. Also if the switched out actor leaves the level and comes back the Enemies dont detect him at all. Ive provided blueprints and a GIF to better expplain what I mean below. Any helps appreciated. Thanks
ok i foudn a way
Player start doesn’t have a collision, it spawns an actor/character/pawn on start
why is this printing Destroyed??
You can set a variable in the AI blueprint to hold a reference to the controlled Actor, then change that reference when you switch Actors
Where is your part of Print that prints Destroy?
Try this: the Debug Box visualizes the Bounds, and moves with rotation of Actor
https://app.screencast.com/rtGrZHSHeKsmu
World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
With maths, I guess but don't ask me how. If I were in your shoes I will look at how Dungeons or areas procedurally generated, there are quiet a few algorithm on the internet
I think each people approach it differently
yay if i ifnally fixed my code
some have their own unique setup with "seeds"
Those generally autogenerate first a floor then walls surrounding them
Which is easy
But what I need now is cause the user can place their own walls in any angles
So I’ll need to identify the space inside
I've never done anything like that. I will tho later after I finished my combat system
have plans to do PCG dungeons
so I guess I will leave the research for later 😄
all the best
I have a feeling it’s because you changed the class
Try to skip that node and see what you get
Connect it this way and see what you get
yeah after removing the SetChildActorClass it worked
but how would I change my weapon now
was doing it in c++ but since this messing it up, need to find a new way
Try changing the child actor class before setting the variable instead
You can do things in bp first, when they work. Then you can refactor to cpp
IsValid > SetChildActorClass> set AsWeaponBase
Rearrange the SetActorClass node to come before Set AsWeaponbase
See how that turns out
alright
@frosty heron Let’s say we put dynamic meshes aside
We have several walls of StaticMeshes in various angles
same thing
Would you have any idea how to identify the enclosed areas?
Same exact message? Show the new blueprint code?
Then it’s probably the variable type since it is cast from a blueprint class
You can try to have another blueprint class that contains the new child actor class, then set the variable to that instead
why is it being destroyed tho when the change class is there
As above
I can try the BP class rather than the C++
Because the class differs
and see how it goes
I'm not the right person to ask for these kind of stuff. I have 0 experience with procedurally generating anything.
Doing it Grid based make things way simpler tho, You can probably just check if every grid has something occupying it. Then the rest you just need to figure out if there is any hole
Hmm ok
Probably think it from 2D perspective first before doing it 3D
Grid is not possible cos we are working with a 20m x 20m space (minimum) and the precision is down to 1mm
#game-math or #cpp probably have better ideas
edited: the Blueprint class didnt work.
So if we are using grids that would be like 400million boxes
I mean grid is just imaginary lines. You can define 1 unit = 1mm
but yea not sure what you are doing
wait nevermind
better ask people with wisdom
Yeah but to check a grid space I’d need to define an array of grids first
didn't work
Yeah but 1 Grid = 1 floor*
nope
1mm sq unit of a floor
shouldn't need crazy ammount, unless u making a huge area
And I have a space of 20x20 minimum
So that’s (20 x 100 x 10)sq
Use another blueprint class, but set that blueprint class variable only after the Set Child Actor Class is completed
I'm trying something else
it works first well with the first weapon, but when I change weapon it gets messed up
Thanks, how would i do this?
Like a variable “Current Character” (type: Actor) in the AI blueprint
Keeping everything to the grid is the way to go with this type of stuff. Is there a reason you need precision down to 1mm?
Then either use an interface or cast to/from the PlayerCharacter or AI blueprint to change them
It’s an archviz builder project for real-life application
For office space
So precision is down to mm
Ahh ok. So to make sure i followed your previous comments, the user is able to place walls and you need to find the space inside the placed walls?
Yes
what are you needing to get the space for?
To set floors
So if for example I have 6 walls forming two rooms
There need to have to different floor objects generated
Because each room floor is supposed to be individually customizable
Thanks, i get that but how would I implement it?
Wouldn't it be better to have the user place the floors and have them attach the walls to the floor?
Because the walls may not be at regular angles and users may want to adjust the length of the walls etc
Eg like Coohom
Depending on context, can be simple or complicated
But if you have a floor, the user could add/remove corners which they can then move around that make the bounds. Attaching walls to this would be significantly easier.
@plush hornet another easier way is to have the same variable in GameState
Then on Switch Charatcer change that variable in the game state
In the AI blueprint periodically check GameState and retrieve the variable and set it to the local variable to chase after
Hmm it’s worth considering although not the requirement given down
But I’ll discuss with my leader, tks for the suggestion though
Btw
I asked chat gpt, cuz why not
now I have a little idea for the walls
Just start from one of the wall . You want to have some sort of collision check at the corner of each wall
Get all the walls. Start from a wall, it can be any
then work your way through all the way. Check if a wall are connected to another wall
if they come back to the first wall, then you have enclosed space
Is this going to work? I aleady have the perception to chase the player controller and its stops working after a while
If it stops chasing you need to first identify the reason why it stopped
Such as printing the variable regularly
And when entering the level again it will only chase the main actor if its being controlled
So that you know what is actually causing it to stop
I dont know whats causing it to stop thats why i posted the blueprint earlier
@frosty heron it would return a false point at BC
It works with the main actor, and works initially when i switch to the other actor but eventually stops
Thats what confuses me
Do you have a variable on the AI blueprint that defines the actor being chased?
My brain only think of rectangle shaped dungeon
No. But wouldnt the player controller be enough?
i don't like pain so I won't do anything complicated
Apparently it isn’t since you are getting issues
it worked
After rearranging the order of the nodes?
if (EquippedWeapon != NextWeapon)
{
if (WeaponBase && WeaponBase->HasAmmo())
{
EquippedWeapon = NextWeapon;
WeaponBase->SetWeapon(EquippedWeapon);
GEngine->AddOnScreenDebugMessage(-1, 100.f, FColor::Red, "Changed");
WeaponChildActor->SetChildActorClass(EquippedWeapon);
}
else
{
return;
}
}
not sure what was the issue it just worked
sorry for cpp in BP but yeah
tested this same in BP and worked
checked my older project, had same setup
The user would define the shape of the floor by placing corner markers. When placing walls, they can be placed along the edges. The wall can then be slide along the edge or scaled up to the length of the edge. (Use a ratio)
If they want to adjust the walls, they change the room points and the walls would update automatically.
Yeah I get that
Thanks guys
The only other way i can think of is using a ton of line traces but I wouldn't recommend lol.
Yeah someone else suggested that too, gonna look at it tomorrow
Actually, box traces using some form of octree structure might work.
Edit: Although a line trace chain might work. o.O
@plush hornet can you SS the part where it defines in the PlayerController on the character chased by the AI?
you shouldn't be checking BC
Just AC, CD, DE, and EA
Never used that, how does it work?
Right, the issue is, how to tell the system that BC should be skipped?
Assuming you are not looking at the picture now
Trace to a wall, then get the right vector (something like that) so it does a line trace to the next wall, then do another line trace from this point again, repeat until you get back to the starting wall.
That would result in a false point at BC, no?
this is the logic for the perception
Start with 1 wall, check its Left Side
If there is a Hit, check the hit wall's left side
Repeat
If no hit, then its an open room
if there is a hit that was already hit, then room is closed
i would have 2 sockets on each Wall mesh, one on each side
Use the Sockets World Location to do a Sphere overlap trace for other walls
What happens if there are only two parallel walls?
How frequently are you calling Execute AI? (First pic)
But both hits correctly, so logic wise it would mistake it as a room
From print string i can see when it sees the actor it only calls once, if it doesnt it calls multiple times which makes sense tbh
like this ?
Then one possibility is that it was executed, it reached the spot where the actor was, and stopped
or this ?
No thats not it because when i switch to the other actor it will chase that actor regardless of where i go to and then eventually stop
It will also do its attacks like with the main actor
Kinda yes
Anyway what you are suggesting is probably like a multitrace, I would be exploring that tomorrow
Thanks for the suggestions anyway though
It stopped when the character moved too far?
Could it be the radius?
No. I could be right next to it
I have a gif of it but it wont upload
Try adding this
See if the message appears
And also another Print right at the beginning of Execute AI, to make sure it was executed
Cast to Actor?
isn't that the base class??
why not cast to the AI or actor that you are referencing to?
If i leave the Level with the switched out actor and come back it wont fire at all until I switch back to the main actor
Doesnt work as it will only follow the main actor
Have you tried adding the prints and see what the results are yet?
Thats how i had it set up first
Let’s find out if the issue is due to a failed cast first
Yes I mentioned with main actor its a success and with switched out actor is also success for a while, but if i leave the level with the switched out charecter and come back it doesnt fire at all
so the AI does not move
No
No
I am saying
So i know that the issue is to do with how the perceptions setup
Have you added the Print on the failed cast yet?
Lol. Yes thats why Im telling you this
Thats how i know it doesnt trigger
use a breakpoint and follow it
What does not trigger?
I think the cast to actor doesn't triiger
The Execute AI? Or the failed cast?
The event execute Ai doesnt trigger, I have a print string before the branch and on failed but if I leave the level and come back with the secondary charecter it doesnt print any thing i.e it doesnt trigger
So i know the issue is to do with either the AI perception in the Ai controller or in the service logic
So either one of these
In that case maybe try to place Print nodes on the Perception
See where the branches lead you through and whether that route was intended / should be
print strings always saved the day
Hey guys, how do i get the name of the bp and not the whole actor placed in the scene name ?
I believe the issue is this
Cos no Actor?
It doesnt know what to search for but it needs to search for the player controller NOT the actor
Yes but theres no option for player controller from it
The actor can be plugged straight into the value as object but it will only target the main actor
Did it end up in the bottom route?
what do you mean?
Did it reach here but not work?
Not it doesnt fire with the secondary charecter. If I switch from main actor to the secondary one while the enemies see them it will follow the secondary charecter for a while. But if i switch when they dont see them it wont follow the secondary charecter at all.
Print string showed as well
“If I switch when they don’t see them it won’t follow”
You mean if the main or sub char is out of sight?
I need to connect the below but dont know how
get actor controller?
If the main charecters out of sight and switches, and the secondary charecetr then approaches the enemies it wont follow at all
There no option for that
So perception is not retriggering or Reactivation is not retriggering
so confused then lol.
It doesnt trigger on the secondary charecter
Autocorrect lol
If i switch the main to the second while the enemies see it can kind of "trick" it into following that charecter
But if I switch without them seeing it will only follow the main charecter
When you say “sight” does it only shave visual sight (directions count) or simply being within range?
It has 180 degree sight
From the ai perception
This will show you what the issue is
Finally got it to upload
So it is not perceiving the changes actor as a target
Is there a way to advance this enum via code? Example go to day 1 to day 2 ... Idk something like a Add Node
I use a Select, with the next value for each enume
Ah ok so there's no other way. This is what I do atm
thank you
I think maybe in that case
Instead of using PlayerController as the target, set a variable in GameState as Actor type, on wherever your blueprint that changes the Actor (I presume PlayerController), cast to GS and change that value, then plug that value as the Actor to the AI instead?
You can convert Enum to Byte, add 1, and then Byte back to Enum, and do a check if its at MAX
I'm working on setting up a top down shooter, and I'm curious how folks handle slopes, specifically allowing the characters to go up and down, and be able to hit other things above and below.
Right now I use my pawns control rotation to aim straight ahead. Do you just use the angle of the slope you're currently on?
You mean to be able to hit regardless of height difference?
Yea exactly, I'm not sure if I should try to use the slope info directly and do a direct trace, or do something like sweeping a line trace that points straight up and down so it catches any thing above/below.
Doesnt work from what i can see as the default value of "Actor type" variable cant be changed
unless i'm missing something😵💫
The only one that can be edited is actor classs reference but that wont plug into where i need it too
If there is an output it’s somewhere
Is there anywhere that you call the event Perception?
When/where is this triggered?
how can I generate a random stream from a vector?
Its always being triggered as the enemy has to know if the charecters seen or not
Bear in mind the AI controller is put into an Actors BP details panel so it acts indepently
Hmm
Guess I can’t help any further as I am not familiar enough with the subject, sorry about it
“This Event will fire when the Perception System receives an update and will return the Actor that signaled the update. “
Hey guys does anyone know how to calculate the dimensions of your landscape?
I cant because I got a warning about posting in mulitple chats last time. I dhave to go back and delete all of my messages
You can probaly delete the one here and post it in #gameplay-ai because the one that does AI stuff lives there
also Other chats have a very slow response time
Why the hell this doesn't work? The tormentor doesn't pop up and lose "Hidden" but it show the print string if i put it
On top of hidden, there is also Visibility, Only Owner see, Owner no See, Hidden in Game, etc
gotta check all of them
also your code not gonna work as intended if you have multiple tormentor
Hidden in game is more than enough. I always use only that and it's fine. No need to check everything.
Tormentor is only one
You can set it to not be hidden but if visibility is set to false, you still won't see it
hence the check list
but if u think u already checked all of them then, I dont know what else is the issue
It's visible
Is GetActorOfClass returning a valid reference?
Yes
It doesn't work not even if I reference it with level blueprint by dragging the actor
did you set the mesh component to be hidden in game, and now you are attempting to set the entire actor to show in game?
You should just toggle vissibility, I dont see the point of changing Actor Hidden in game in Run Time
Only the static mesh. now I changed it and it works. Thank you.. But the collision doesn't go enabled
I disable it when it's hidden and enable when he goes visible (not hidden)
WEll ur code set it to disable from ur last pic
Do the same, enable collision on exactly the component you need.
gotta tick the box
I mean my line trace doesn't touch iut
lol hehe
And if that dont work then you should check your other component as Rappy said
ill let you know
Anyone have a way to SET the color? seems its not exposed 😦
It doesn't work.. Also why should i set collision only for one component when I can include the whole actor
Okay the mesh didn't have collision
lol
thanks for your help guys
there you go then gg.
❤️
BlueprintReadOnly
Its the only mention of the word Color in the header file
bummer
Hey guys, kinda "newish" to the UE5 (and Enhanced Input)
I want to know if there's a way to do what i'm looking for.
Basically i have a Input Action that uses a value type of Vector2. So that i can add the X-axis value for right/left movement and Y-axis value for forward/backward movement fed from the keyboard W/S keys. However, i don't really know how to make it distinguish between when it's pressing W or S from this node.
I set it already in the InputAction Mapping, but can't understand.
So far i can only move it forward (using W) because this blueprint will feed a positive value. But i wanted to know if there's a way from a single Input Action so it can verify that is being pressed from the EnhancedInputAction node and set the value being fed to negative.
Is there a way to make this text always centered regardlesso of the length?
In the details panel for that text, anchor it to the bottom center, change the Justification to the center setting as well. Then add a x position offset to the text box, equal to half of its X size.
from the ue5 third person template
in the input mapping context
Oh wow, thanks! I will try to study that, i don't understand the logic behind it, but thanks alot for that!
So simple, didn't even thought about it 🤦
you can see modifiers, and you can negate
Didn't get the last part
Make its position X, 715 / 2 * -1
But it's not centered now
Is that text placed inside a canvas panel? or in some other object?
canvas panel
Is it just the text that doesnt look centered, in game, or is the actual text box in editor not centered.
both
Confirm with me your anchor setting, is it bottom center?
Yes
If your justification is centered. and your Size X is 715, and your position X is -357.5. then it should be exacltly centered within the canvas panel.
I would then worry that the canvas panel isnt centered, is this canvas panel the top in the heiarchy?
I would then worry also that there is another setting on the text box you have changed that isnt the defualt.
Like what?
I dont know. 
If this doesnt leave you with a centered text box in a canvas panel, im not sure.
I could imagine the text being rendered within the text box as being uncenterd
font could mess it up, translation could mess it up.
But the text box itself? the green outline when you select it?

You dont have size to content enabled do you?
It's enabled
disable that then.
It will mess it up.
text will render outside the bounds of the text box widget size anyways. You dont ever need size to content on a text box.
Oh now it works!! Thank you!! How did you know about this math formula ? lol
center - (width/2)
Just think about it, the x position offset moves the widget by its top left corner.
btw you can do the same exact thing for the Y position offset.
hail ms paint
Just a random ad for our glorious #game-math channel!
Don't know the context, but maybe it's useful!
Until we meet again!
I'm getting an infinite loop crash when my function hits its 20th cycle. I need to run the cycle 24 times. How do I allow it to keep running the cycle until it's done, instead of the engine assuming it's a loop?
The Engine doesn't assume an infinite loop with 20 cycles. The max is way higher.
You can even set that somewhere in your Project Settings
Pretty sure it's a million even by default?
Hmm, ok. I'll keep gandering.
You might be calling it way more often than you think?
UE blueprints can perform about 1 million steps in a given tick (configurable but not recommended to change unless you actually know what you're doing) before it assumes there's an infinite loop. Running a function 20 times doesn't seem like a lot so the question is, what is this function doing?
It's a precedure, I'm trying to generate a house. I'm still just working on organizing the data, so it's just a bunch of named rooms right now.
Pressing F starts the procedure by sending a request the Room Manager.
The room manager goes through 2 functions, one to determine what the next room in the order is, the next to determine the space it needs to spawn. It then send that info to the Mansion Manager.
The mansion manager takes the size and name and sends it through several more functions, one to clear the space, then place the floor, then place the walls, then set the room in play.
Setting the room in play right now just prints it's name out and then repeats the procedure by sending a request to the Room Manager.
When I prepare the size, I can break the cycle at 19 and it'll run the whole thing. If I connect the 20th branch in the series, it'll crash the app.
Hey there everyone:)
I'm trying to use this node in a geometry script BP, but I'm running into a problem:
Is there a way to get a reference to the "world" ("create in world" pin) using BP?
If not, what's the easiest way to get a relevant reference?
Thanks!!
uh #geometry-tools might be better with this stuff. Otherwise maybe drag from that create in world pin and see if it gives you any options to get the world.
This is the closest I can find in bp but that function you have there is asking for a UWorld* , so idk if you can use that, maybe with a pass by ref? 🤷
normally the code has better comments but this is still flagged as experimental so the only comments are stuff like TO DO 😄
So I get this error, which is an easy fix. Right click, refresh nodes, and everything compiles happily.... until I restart Unreal.
Every single time I restart the editor, this error comes back.
How do I make it REMEMBER the refresh? Why does this keep reverting?
Bp struct?
SJournalDescriptor is a struct, yeah
I see BP struct
Where?
Here
Is there a distinction between "structure" and "BP struct"? I'm not sure what you're saying
Struct made in BP is known to break
they should be declared in cpp
anyway apart from that
I dont use CPP
And no the data id is just a GUID
THAT'S gotta be the issue!
Hmm I see. I'm honestly not sure, nothing immidietly helpful popped up from dragging out of the creat in world pin.
What would you put in the "in elemnt handle" connection? Sry, not even sure what to ask haha
Im not sure
But wait how do you cast a struct?
But I'll try the group you sudggested, Thanks!
You don't
But for sanity check
Can u chose a specific data table?
the one that uses SJournalDechiptor
Multiple tables do. Each level has it's own journal data table
I mean im using this fine, so I don't know if that's the issue. In this case tho, the Data table i feed is always usses FashionStruct
but for sanity check you probably want to try hard coding a data table that uses SJournalDechiptor only. see if the error still presist
How do I make to shoot inside the car like drive by
How do I add a specific actor as a child actor component in blueprints? I basically just want to parent one thing to another
Fixed it! The answer to "how do you cast a struct" is apparently to store it as a local var
I don't even reference the variable anywhere but that set call alone made the problems stop
yea I don't know about this. If that works out then good. Not something that I have tried
normally I know the struct im breaking is of a certain type
Using add child actor component , then you can set the actor to w/e actor u assigned
but child actor is known to break as well
wdym?
Bp struct and Child actor are most commonly uttered when it comes to stuff that break
it's just buggy
🤷♂️
but I never encounter it since I don't use it (child actor)
bp struct I learn the hard way
Is there a better way to have one actor mirror the transform of another? Setting it in BP every tick seems inefficient
Had to redo it pretty much
If it's something that must be done every frame, it probably belong to event tick tho
fair
So here's my theory. Impure nodes cache their output to ensure idempotency if it's used multiple times. I bet that output is CACHED as a wildcard, even though the first use of it is a break that guarantees the type. I bet if I was only doing EITHER of these uses of it, it wouldn't break. Don't have time to test that theory today though
By adding that set call, I'm replacing the multi-use output with a strictly-typed one
So that's what gets cached instead
Of course there's no harm looking at reducing the number of things that needs to be done is the various functions but what you'll need to do is either jump to C++ and multi thread or learn to spread stuff across ticks.
Spreading stuff across ticks means having an actions list (in some shape or form) where each tick it completes the first action in the list and then removes it when complete. The following tick it moves onto the next action and so on.
Edit: I forgot to add, this does mean the construction script becomes useless but a potenial work around is using editor functions. So you would have to manually run x functions in sequence when the BP is selected in the editor via the details panel.
Well if I ever run to your error, I will sure to keep that hack in mind 😄
Hey does anyone know of a way to spawn an audio volume at runtime?
or get a reference to an audio volume thats in the scene?
Just spawn at run time and cache it. Anytime you need to get ref to it, you just get the variable
if you want to get a ref to an audio volume that you preplaced in editor. you can create an actor bp . Create variable type of the Audio , make it instance editable, expose on spawn
.Drop the actor into the scene and just drop pick the audio comp
I assumed audio comp not audio volume
Just wanted to check in to see if anyone here has a solution/workaround to the "text inside a retainer" bug, present since UE4
is there a tool in ue5 that prevents my gun clipping into the camera when aiming down sights
So, I've got a bunch of player starts, one in front of each door to a new level, and I don't want the game to pick them at random when going from one level to another. How do I make it so the player starts a level at a specific player start?
I think its something to do with the 'options' in the open level node and the player start tag in the player start actor, but when I set both to say 'mall' it still just picks a random player start
Open menu Edit → Project Settings → General Settings/search Near Clip Plane
do i make it higher or lower
Hello friends! I'm beyond stuck with some blueprints and am in desperate need of some help.
Since you can break down an array like shown here in three steps, shouldn't there be a way to add stuff into the array working backwards? If so how?