#blueprint
402296 messages Β· Page 891 of 403
You're recording what time you started
Is your variable called Set Start Time?
first of all rename those, that's confusing as all hell
yeah remove the set part of the names
that's uber confusing. Like www.wwwdotcom.com
Slashdot: News for nerds, stuff that matters. Timely news source for technology related news with a heavy slant towards Linux and Open Source issues.
OK your start time is good. Now on tick set CurrentTime = GameTimeSeconds - StartTime
What you posted is
CurrentTime = GameTime
CurrentTime - StartTime //is never used
and thats it.
Yup
Print CurrentTime after that node and make sure it's going up
print string, just drag CurrentTime into it
so here, my event tick does start time - my game time in seconds and my current time is the result
Yes
Logically, this is what happens in order
Event Tick is a function.
Event tick sets CurrentTime to be GameTime minus StartTime
it works
So every time Tick fires, CurrentTime is updated
start time remains as 0
OK so now at your end level trigger (Begin Overlap probably?)
Set EndTime.
so is that to make sure that the counter starts at 0
That's fine, to be expected if you intend to start counting time the exact frame the level starts playing.
It might be different depending on loading or whatever or if you wanted to have like 3 seconds countdown before the official Start
i could delay it by a second too right?
Yeah, you'd just set StartTime sometime later
That's the whole reasoning behind having a StartTime variable.
i changed the variable and it didnt change anything
that also didnt work for some reason
Show what you have
So it is working, just the math for CurrentTime doesn't work correctly as StartTime defaults to 0
Yeah so you'll want to do this. Make another variable called CountdownTime
Yes, because StartTime is 0 until the set gets hit
So, to make it work out, make a new variable called CountDownTime
make it 4 by default
done
BeginPlay -> StartTime = CountDownTime x -1 -> Delay for CountDownTime Seconds -> Set StartTime = GameTime
Would anyone please help me
It's a bit redundant, you could just set start time = GameTime - CountDownTime but this is a better setup for an actual start event.
For storing across levels you want to either save/load or store in GameInstance
I would do the 1st as it's more robust and you could replace the bit after the delay with a custom event for starting that maybe enables movement and plays a sound and a bunch of other stuff.
i dont know where to actually put count down time x -1
when you say = do you mean here
so start time = get game time
Begin Play -> Set StartTime = -1 x CountDownTime
Do that before the delay
then after delay just set start time = gametime
thats so the start time is negative and the elapsed time calculated on tick is correct. Like a T minus countdown
That's delaying twice....
genuine mistake, forgot i put that there
timer just starts negative
can i ask also
will i be able to make this into a widget?
Don't make the logic in a widget
later, your widget just reads CurrentTime and updates itself with it
It will, but you could clamp it or whatever. Whatever you want to do
yup
wait
no, End Time = Game Time Seconds
CurrentTime is what you read anywhere else
Call it ElapsedTime or whatever if that's better
but the overlap wont actually pause it?>
oh it does
but i dont understand how it pauses it
Wait a second
Yeah you're right, if you want ONE variable to go up until triggered, you'll want to bring a bool into the mix too
So you can do 2 things.
Trigger -> set end time -> calculate ElapsedTime (you'd have CurrentTime and ElapsedTime)
or
Add a boolean named LevelComplete
Tick -> Set CurrentTime = Select(bLevelComplete, EndTime, GameTimeSeconds)
Trigger -> set EndTime -> set bLevelComplete = true
I'd do the latter probably
Select node uses a boolean to pick between 2 inputs
so if the level isn't complete, you choose GameTimeSeconds
if it IS complete, you choose EndTime
either way you set CurrentTime = WhateverOneWasChosen - StartTime, and it'll stop going up as soon as bLevelComplete is true.
do you think the latter would be better for setting up the widget
Yeah, since it can only worry about CurrentTime
with the first approach you'd have 2 numbers, one of which always goes up, and one that gets set when you finish
ill start trying to add that in real quick
ill send a screenshot shortly
Select(bLevelComplete, EndTime, GameTimeSeconds)
im not sure how to translate that visually
I'm about to drive home but get this ALL working without the widgets right now. Once CurrentTime is behaving the way you want it to, just go in your widget and do
Construct -> Get Actor of Class (YourTriggerClass) -> store to a variable
Tick or whatever it's called in widgets -> Get CurrentTime off that variable
oh, select is a node
Just right click and type select, you'll find it
but check that your input is set to game and UI. Does it visually change when hovered or clicked?
no
@faint pasture ill be honest, im unsure how select works
It chooses one of the inputs based on the boolean and sends it on the output
pretty simple
You're turning LevelComplete into a float and using that as one of the choices. Try drag LevelComplete into the wildcard on the bottom
Select can use enums and ints and bools and prolly other stuff too
yup
Almost, why are you setting
EndTime = 0.0?
Shouldn't it be
EndTime = GameTimeSeconds
Also current time = all that select stuff MINUS start time
So when complete
CurrentTime = EndTime - StartTime
and when in progress
CurrentTime = GameTime - StartTime
also you got your select inputs backwards
When the Level is complete, you want to use EndTime for your calculations, not GameTimeSeconds
That makes sense right?
yup thats good
yeah, when level complete = true then i want end time
and -start time stops the event tick from counting up?
using end time stops it from changing
it'll be like
CurrentTime = 5 - 1
that'll never be anything other than 4
so every time it fires it'll be the same number
but GameTimeSeconds goes up forever
i dont quite understand the logic properly
oh
so - keeps it at bay
keeps it from changing
but the print stops completely
Wait wtf why is this on BeginPlay now?
is that because i set game to pause
should be tick
Pausing stops GameTime from going up yes
and slowmo makes it slower
Time Dilation
it doesnt work now that i put it on event tick
Begin Play has the delay and stuff remember?
I gotta go but make SURE you understand what all this stuff is doing before proceeding. You don't want to get lost in the weeds just copying people, you want to understand what and why it's doing what it's doing.
okay yes it works
yeah, thats the mistake i make sometimes when wanting to get something done
i know you need to go
but is the widget part simple?
Yeah, whatever you were doing before, just get the number from this actor. On construct, get actor of class, save that to a variable. And then on whatever the update method was, get current time from the actor variable
Get it to just display the float before worrying about formatting
this is what i have in my widget
im lost when you say. on construct get actor of class
actor of class being my trigger box?
this doesnt update the number
remains at default text
On construct, get actor of class, save that to a variable.
i assume that means this
im unsure what to do next
would it be better to A) create hud widget>add to viewport on PB_PlayerBase BeginPlay, or B) create hud widget on PB_PlaterBase BeginPlay then put add to viewport in hud widget OnInit? I feel like it would be better to keep as much of the UI handling in the UI itself but too new to know how much itll affect future stuff
What is PB_PlayerBase? Is this the player character?
yeah
Ok.
Well to answer your question, option A.
You have alot more control over how a widget can be used if you manualy add it to the screen.
Also though, if you are asking questions like this, I would reccomend that you should not create your HUD on the player character.
There is alot of reasons why you should not create/save widgets on the player character. The main reason is that the player character is meant to be switched throughout the game.
I knew I should have put C) something else?
If you create and save widgets on the player character, you will not be able to easily switch the player character.
It is best practice to create/save widgets on something else.
There is actualy a dedicated peice of the unreal engine framework called the HUD class.
I would reccomend that you create/save widgets on the HUD class.
The HUD class is apart of your gamemode.,
This way, you are able to easily switch the player without affecting the HUD
you are also able to switch the HUD without affecting the player(or any other part of the UE4 framework)
awesome I'll work on switching things over now, thanks!
You can create a new HUD class by hitting using the add new blueprint window, you have to search for HUD
You can set your gamemode to use the new HUD class by editing its class defaults.
AHUD
yes
@faint pasture im not sure if you have seen my screenshots above
i feel like im becoming quite annoying also
That is also how you get a reference to the hud class. Good luck with your project.
I feel like I'm missing something here, it successfully toggles the camera on, but won't toggle back
Im assuming this custom event executes when you make a keyboard input?
I see then, I am not sure.
thank you! so I've switched it over mostly but I have a function to update the health value on screen but I'm having a hard time getting the references right, it used to reference the hud widget I was creating in PlayerBase but now that it's made in the HUD class idk
Do you mean, you are having a hard time knowing how to make the new widget update?
yeah, so this is what I had before but now that it's being made in the hud class that hud widget reference is worthless, but I can't seem to get one that works for the hud class
I see.
GetPlayerCharacter -> GetHUD :plug into: CastToMyCustomHUDClass
That will give you a reference to your custom hud class.
You can then get the Widget reference from there.
how can i set the actors level placement pivot point to be the bottom of a collision box? atm it seems to take the center of the collision box for placement in the level:
I am unaware of any way to accomplish that easiliy.
its just weird because for example on a character class it automaticaly uses the bottom of the sphere for placement
I dont think there is a way unless you edit the mesh. Or unless you create code to accomplish that
I had tried something like that when you first mentioned the controller>hud but I can't use it to satisfy the target requirement of the UpdateHealth function
yeah thatd be great
Have a scenecomponent as root , and offset the collision accordingly
so you think i should set something different as root and offset the collision from the root component upwards then?
using defaultsceneroot as base?
@gentle urchin @tawdry surge @trim matrix ty for the help guys π
did they remove the option to multiply and divide vectors by a single float?
Math nodes are universal in ue5
wait but then now instead of (vector) / (float) u have to do (vector) / (float, float, float)
Wait what?
Are you in 5?
Just make an add node, plug a vector in the top and a float in the bottom. It'll adjust to accommodate
is there anyway to check if the player is in a navmesh volume?
NavMesh has collision, though by default it is set to No Collision
Call GetOverlappingActors to check if you're in the nav mesh
The Dynamic Nodes in UE5 are a bit lacking/buggy.
I already reported it (had to re-report it to UDN cause for whatever reason they didn't want me to use the Bug Report form..)
E.g. you can't multiply Vector2D with float at the moment
is there a way to conditionally edit or chane a mateirial on a mesh in main eventgraph on anything
Capsule component rotating in z direction also when i move mouse to lookup
How do I make my interactor be the inventory component from my third person character without using class? I'm using a save system that works but because it stores info on the gameinstance it thinks the inventorycomponent doesn't exist anymore and can't add anything to it
will someone look at my spaghetti and tell me why the character is launching to the right after moving right for the first time after game starts?
That's the whole project, but just looking at Player blueprint really
is there a way to reference how much light there is in the scene? like if i wana do something if its dark or do something when its light
The intensity of whatever your scene's light source is could be an option.
how do i reference the intensity in a blueprint
If you have a reference to the light, then you can just get the intensity. And you can get a reference to the light in a bunch of different ways which probably depends on your project
alright thnx
also
@brazen pike is there a way to get rid of the slopes?
i want the direction animations to run only at 0 speed
I'm not 100% sure, somebody else might be able to help you there
If I'm reading you right, you're trying to store a reference into a savegame file or Game Instance... The problem is an object reference isn't the object itself, but a pointer to an object spawned into the world. As soon as the object is despawned, the pointer is invalidated and the data inside is lost. You have to store the data inside of the inventory system rather than a mere reference to the inventory system if you want to save it.
Save games are kind of a deep subject so I can't give any advice there
Not sure what you're asking. There are nodes to change materials on meshes, and a Dynamic Material Instance workflow for changing parameters on materials
yea i managed to get it to work thanks tho
hey i was wondering how i can have the mouse locked in game and still be able to turn the camera by moving the mouse
Sorry i donΒ΄t speak math so could you help me pls? or maybe there is a node for this?:
I want to switch the values from 100 -> 1 to 1 -> 100 ie:
98 -> 2
80 -> 20
75 -> 25
20 -> 80
etc
Omg so clever! π thanks alot
to be clear this will make 100 > 0
Thats fine, i didnt even manage to ask my question properly, that is the behaviour i want!
so if the result has to be above 0 you need to account for that
honestly just showing a bunch of examples is the easiest way sometimes
especially when you don't know the terminology
Well your solution did exactly what I wanted so thanks alot π
how do i get a friendly AI to differentiate between my character and an enemy AI
In your AI you might have some kind of targeting system which follows and shoots at the player. Just change that to follow and shoot at the enemy AI and there you have yourself a friendly AI
If you want multiple targets then I would try to make an array of them
It has been a while since I worked with AI so I don't remember
ok ill try to find a guide . thanks tho
So I was trying to determine if I could put something in a construction script or not, and I ran across this post which is making me worry about something:
(https://forums.unrealengine.com/t/spawn-actor-from-construction-script-loophole/20361)
Now I am not interested in doing any spawning or anything, but the suggestion is leveled in the thread that any changes one makes each tick would cause the constructor to re-run. I'm not sure if this is refering simply to the editor, or whether this is to the runtime in general. The reason I ask, is if I need to better guard or perhaps rethink how I assign initial dynamic material instances to actors. I really like having them in the constructor because it means visuals become immediately apparent in the editor, which helps with level design, but if its going to run everytime a property changes in the game itself, that could be a huge problem.
So it appears that I canβt βSpawn Actor from Classβ inside βConstruction scriptβ However, if I make a function, with a βSpawn Actor from Classβ and then I call that function in the construction script, I can bypass that first restriction. Either I shouldnβt be able to bypass it(Am I causing a leak or anything?) or You should be able to call...
How would I go about adding hit events to objects created at runtime? For example I'm making a roguelike and I want to add an upgrade that chains lightning on all projectiles fired, I was thinking of just passing variables through like "CanChain" and "ChainChance" etc. but I feel like this would start to get messy when adding lots of different on hit upgrades or is this how it should be done? Thanks
You can bind events from an actor reference.
to reflect anything in the viewport editor, everytime somethings triggers the recompilation of the blueprint, construction script will run. if it is an actor that already has been placed in the level and you attempt to change values in the details panel, that will trigger the construction script to run again too
but is that only in the editor? For instance, if I am playing the game in PIE or packaged, and I translate the vector of an actor using a blueprint, will it run the constructor for the object I just moved again? I mean I would hope not but it sort of reads that way
nope, only in editor that the construction runs again
Would I be able to get a reference to an actor as the projectiles are created during play?
during the runtime, the construction script will only run once when the actor is created
Why not? Just store the reference the moment you spawn the projectile actor
if you are adding feature to your projectile and planning to only add that after the projectile is spawned
i reccomend not to because if the projectile is block hit based, and you fire it towards a wall, anything after the spawn node is too late as the projectile may already been destroyed
build the features in to the projectiles and decide if you need the feature at the moment you are trying to spawn it
Check if dynamic material instance reference already exist.
If yes, don't do anything.
If no, create a dynamic material instance based on the skeletal mesh's default material, store it to the reference variable, then assign the mesh materials in the component to it.
You can make variables that are "exposed on spawn" fwiw. Maybe on a projectile parent class.
This will add data input pins to the "spawn actor from class" node
and the newly spawned actors will have that data at the instant of creation
So should I just have a list of bools for each on hit effect I add to the game, and then set those when I spawn each actor and just do a branch for each one that checks those bools and runs a custom event for each one that's true?
I suppose another way to handle it is through actor tags, and you can "Get All Actors Of Class With Tag" as another way to build a list of chain-able player projectiles in the world for your chain lightning effect. Those are the two options I can think of
Either way it's going to be messy lol. I had a chain explosion mechanic in my current project at one point and it was pulling lists of actors through Sphere Overlap Actors nodes, checking if they had the right flags, sorting and selecting the closest ones...
i recommend not to clutter your "exposed on spawn", else you would have a very long spawn node π
have a FProjectileBehavior struct
and have the details in it
Yeah custom structs are nice
Can anyone help me? I placed this dummy to check if I could deal damage with the radial damage and it seems to work sometimes, sometimes it registers the damage and others nope
Where do you (typically) launch UI? From the PlayerController or the Pawn or the Level?
usually playercontroller, or if you want, playerhud
What is playerhud? I have not seen that class mentioned before
Not on the pawn unless it's really specific to that pawn. Otherwise if that pawn isn't possessed then the code to launch the UI isn't easily accessible
good point
from you player controller, you can gethud and return the hud class used from the game mode overrides
in this case, what I am considering is a "player select" (where the user selects an avatar to play as), as well as in game dialogs (turn based)
mmh input based launching ui would be in player controller
in game dialogues i would let a DialogueComponent or such to handle it for me
Yea I feel like it's gonna get quite messy regardless once the effects start piling up haha, yea I'll try passing everything through in a struct as well should help keep things relatively neat, thanks for the help
the challenge of dynamically hooking features into a projectile would be racing condition
unless the projectile knows exactly what it can do
things may get messy too
Here is a video
did you do a linetrace from weapon and spawn the radial origin there?
radial damage does check for collision channel that blocks the view
Yes
if your radial origin is on the ground
and ur barrel's origin is on the ground too
might get blocked
Barrels origin is like, the center of the barrel?
Can I like change it or something?
if it in the center then it should be fine
just testing, try +1 on the z axis on the origin
Yea that's true actually I'm gonna have to put checks in for each upgrade for every projectile, I may just have to convert the bp to c++ depending on how the performance works out
Like on the apply radial damage?
then change your linetracebychannel to spheretracebychannel
give it some radius of like 5
then use the hit location
that would adjust the position so that it wont be touching on the blocking plane
then you can remove the +1 z axis thing
since that isnt really reliable
hi, can anyone help me with this weird fatal error that I started experiencing after packaging the game using UE5?
Here is log: https://pastebin.com/hNKUMZYZ
I cannot see any red colored errors in the output log either.. im out of ideas, any kind of help is appreciated(project is in BP, not C++)
when I attempt to add a ui control I wrote (player select screen), I noticed that the "add to viewport" says "not for gameplay, only for cosmetic items" on it. Of course, this is FOR gameplay, so whats the appropriate node for that? Any pointers helpful
Add to viewport puts it on your whole screen
Add to screen puts it on your window in a split screen situation
You can definitely use a widget you added to the viewport during runtime, have buttons, animations and update stuff
right, and it works, but that warning concerns me
should I assume its just implying its not authorative?
It is client owned..
I can't say I ever noticed the note on it
Yeah, I figured it was client owned, that would be a lot of state otherwise, but my curiousity is whether there is some other reason it may not be usable, or whether I should interpret it simply as "without addition effort, this should not be relied on for gameplay"
You're not really supposed to script gameplay logic in widgets. Just have them communicate with the classes that do.
Like a middle man between the player and the things doing the work
Right. The intent was to expose events and handle those events.
It'll work fine
anyone know why this doesnt actually change the colour of my editable text?
the prints come out correct
you need to use the SetFont() function instead
Pretty sure font doesn't include colour anyway, it's just text size, style (bold/italic/etc) and actual font.
huh?
nope
Hi, How do I make a image background that scales to always be fullscreen no matter what resolution I am running the game in?
Sorry, nevermind realized i just needed to set anchor to fullscreen π
ok so its dumb but you need to wrap your editable text with a border and change the ContentColorAndOpacity there
that would squeeze the image if your screen ratio isnt the same as your image
wrap the image with a scale box and scale to fill
yeah someone mentionted that and i thought, theres no way its that stupid
π
If you're trying to set the text content on the text element you need " set text(text)"
Can I use some built in Unreal thing as a map?
I have cards, I want to map each one to a color. What's the quickest way?
im just trying to change the colour not the text
Oh ok, Color and opacity then
yeah, which isnt an option for the editable text version hence why we've come to the conclusion that we have to wrap it
Anyone?
It should have a "foreground color" for setting the color of the text in an editable one
and that doesnt work
@solar bison you try a map container
Or a struct with 4 arrays
You can't change a struct at runtime you gotta make a new one and assign that
In BP anyway
whats the cleanest way to know if something is sitting on the ground? i have distance measuring approach but its kkinda scuffed
progbably not what I'm looking for
I don't want a data structure
I want something static, akin to scriptable objects in Unity
I think data Table is what I'm looking for
And the "Data"table isn't a data structure.. ok
heh
so anyways, - anyone know a clean way to know if something is "touching" another, aka sitting on the ground
how do i open my current level blueprint in ue5
but that will load the map right
i want to open the blueprint
to edit stuff in event graph
levels dont have blueprints i dont believe
you can spawn blueprints (actors and such) in a level
levels dont have execution space, they are just data
i'm pretty sure anyways...
those are other blueprints i think
not like the event graph for the level
use player controller or game instance or something
ok
not sure what ur trying to do but events would be handled somewhere other than the level tho
like if u want something to happen when u hit an object in the level, that even is on the object
i wana make a day night cycle
big difference though
how would i rotate the light
I have to store a map somewhere in a class or a BP
i can access the data table anywhere
yea good question but either way theres no code "in" the level
You can absolutely script in the level BP
It's just not a good idea unless you're adding level unique logic. Otherwise someplace more re-useable is better
@solar bison struct is the same way
yeah
i found the level blueprint
"I don't want a data structure" my bad -- I didn't mean this
I meant I want something static that never changes, that I can access anywhere. data table works well
You'll pry need both. To keep it clean
@formal parcel physics objects return hit events, or you can add a collision volume and check if it's overlapping something
is it overlapping if its just sitting on it?
Is it fine to do line plane intersect on tick?
No if it's blocking it'll sit on top and trigger a hit event when it makes contact.
For overlap you'd need a volume. The collision for that can be set to overlap and will trigger begin and end overlap events
Or you can just do a short line trace down on tick(or the axis event to piggy back off its function call)and see if it's hitting anything
so i cant do the hit event because this is a triggered action, it could have been at rest for a while, its not overlapping as everything involved is blocking, and the line trace is an issue because the object is a sphere
if it is rolling up/down hill it isn't on the ground, thats kinda the approach i have now that doesns't quite work properly
thats my current approach, it works kinda but is scuffed on angles
You can do a multi-line trace to catch funny angles
Or do the trace based on the "up vector" -1x to get the down and it'll be in relation to the object local rotation
If I flip you upside down up for you is down in the world
i dont follow that
I don't know the exact circumstances but there is also Sphere Trace if that helps
i basically just trying to know if a sphere is "touching" the ground even if its rolling down a plane or sitting on an actor, wherever it may be
but the roundness makes it kinda tricky
and the fact that it rolls, not sure how i would use local rotation as that can be anything
Sphere trace would work too
lemme try that
ahh
slightly larger sphere trace would work I guess?
sphghere trace the same size sphere maybe?
Slightly bigger
i dont mind a tiny tolerance to deal with very minor bumps
How do I make a child element of a horizontal box Fill the box?
100.1 is probably enough already
yeah, radius + tolerance
If you want an alternative, you could also just shoot a line trace down and check if it hits anything with the distance < radius + tolerance
And just to clarify. If you did the line trace (and assuming this is for a car) you wouldn't use the sphere rotation but the actor's rotation for the trace that way it'll adjust to the angle of the whole actor and not the spinning wheels
@remote meteor how do i use a border without seeing it?
cause if i set it to opacity 0, the text also takes that, or is it just something i have to deal with
thanks for the help guys, this actually works about perfect:
note that i'm using the exact sphere size and doing the tolerance on the distance of the trace
there is brush color for the border
actually
also was able to take out the breaking of the result as now just hitting is all i needed
yea cant use it cuz i'm not using character movement
I have to have the text inherit from the border tho right?
then manually trace is the way to go
yea
yea the approach above seems to functions well
so i cant have the border be transparent without the text also being transparent?
oh wait
i was changing the wrong one
theres this
Actually you can also just shoot a line trace down the exact same way
the text is transparent now tho
No Toy, read above that, I cant use a line cuz its a sphere π
i had a line originally
End would only be actor location - (radius + tolerance) on z
no, cuz rolling down a steep hill the bottom isn't actually touching
that was the issue with my original line based approach
hense, the sphere approach is now working far better
yeah right, I see that
nvm im dumb
uh maybe not
@remote meteor am i doing this wrong? in the widget its fine but when i boot up the game, the text is completly transparent
nvm it randomy started working
When creating UMG for mobile do you need to rotate your buttons etc for portrait or does it automatically rotate?
hey MW I think I'm doing something dumb with vector math, I dont quite understand the behavior - got a min to tell me what i'm missing?
Yeah go ahead and throw it up
Hey guys. I got those 2 questions. Every time I open Unreal Engine 5.0.1 project:
- One of UPROPERTY(EditAnywhere) setted before closing(saved and compiled and saved). Lose it's connection (like setted value).
- There is no showing of UPROPERTY(VIsibleAnywhere) of inherited C++ class (BluePrints inherits from C++ class). After I do LiveCode compile. They appear to be visible. Always have to compile to see them. Why ? Can I avoid that?
If someone is intrested in helping me by answering one or those two. Please DM.
i am unsure if this is the right place to ask this question. But is there a way to clean out a project folder by removing all unused assets and components within select levels?
Do you live compile changes to a header file?
is there a free version?
It's honestly fairly easy to build one yourself.
I did it last night. You can see the main thing you need in #editor-scripting.
All in all - a handful of nodes.
how do i eject out of character after pressing play
F8
do you know how to use the plugin?
Not a clue. I literally just built my own version of it myself last night.
I do not know... How to check it ?
Do you live compile after making changes to a header file
yes. I tried to save and compile every step.
don't do that
Every time you make changes to a header file or the constructor, ALWAYS restart the editor
or weird things will happen
With UE5 - I don't think I've had to restart the editor other than deleting a class; with the improved live++.
Restarting the editor is a safe bet, yes; but I wouldn't go as far as to say to never use live++.
it can handle some header changes sometimes.
You don't need to restart editor. however livecompile sometimes does not catch up the changes made. so you are better off closing editor and then pressing CTRL + Shift + B(or you can disable livecoding so you don't need to exit the editor always)
also #cpp
sorry tought issue lays in blueprint
Haven't hit an issue yet. I've added classes, added/removed functions, add/remove UMACROs, changed values...short of flat out removing classes; I've done practically everything. Takes it like a champ. Just don't have any BP's opened.
what about 1 problem I described. One of BluePrint references loses its value after project restart...
I wonder if that somehow connected to Visual Studio 2022
I've had it happen personally where the UPROPERTY variable is missing, it's like you basically typed it 30 seconds ago and compiled and closed .sln + opened, and it's gone. but I avoided it by File -> Save All, close the UE5 Editor and compile from inside the .sln, thats about as far as I know myself
this is why I said livecompile does not catch up sometimes
because I just started project (with earlier deleted Visual Studio 2022) and made connection reference value set. And reopen it and it works
THANKS guys
no problem just copied from "find all"->"vector * float" or "vector / float"
I'm having the worst experiences ever πͺ... everytime I try to copy my heth bar and paste it in my User widget my system crashes ... is there a way to fix that?
Health**
Not to mention I'm trying to have my character take damage, show in Hud, damage loss, and player death once health is drained.
Hello everyone !
I migrated my project from Windows 11 to my MacOS computer (version Monterey) in order to able to pack and build IPA apps for iPhone.
I using the SocketIOClient package for websocket connections. When I create the connection on localhost or on external server (http, not https), it does not works inside the Editor. And the strange thing is it works when I install the app on iPhone.
I thought Unreal Engine was blocked by MacOS for creating http connections (in/out), but the firewall is inactive, so ...
Any suggestions (instead of migrating back to windows π€ ) ?
Thanks in advance !
PS : I'm on Unreal Engine 5
Hey, stupidest question, but I'm upgrading to ue5, and the the blueprint names are now, very slightly, darker grey
This looks terrible to me, in contrast to the bright white. It's not indicating anything is it? Is there a way to make it white
You can customize a lot of the theme now in the editor settings. Maybe check there to see if it is a field.
Thanks @icy dragon , i didn't there is a macos section, sorry !
I'm suprised they still went with the "3D" look of the BP in UE5
I like that part tbh
I guess it works the first time around in UE4, and it reflects contemporary design in the early 2010s, but personally I'd have flatter look of it
@blissful grail thanks. The answer was the "Foreground" color setting. I lament that I prefer the darker color for other fonts, but it looks much nicer for the blueprints
What do you mean 3d look? the bubble like texture of the nodes?
I like it but I would bet that it wouldn't be very difficult to change with a plugin or something.
Hello, I am setting the text on above my flowers to a random letter in this array, and then removing that letter so it isnt used again but it is using the same letter multiple times, can anyone give me a hand?
if i print the length of the array it goes down each iteration =.
If you attach multiple executed nodes to a "pure" function (i.e. no execution pin), the pure function will be called for every executed node it's attached to
In other words I think your BP is choosing two different random elements in that array
One for the Set Text and another for the Remove Index
Basically you have to cache your rolled index to a variable (local variables are useful for this) and then use that variable to drive the rest
Thank you i will give that a try and report back. I appreciate the in depth answer +D
im trying to spawn actor from class which is an AI actor but when it spawns in it doesnt do the AI stuff
Does the actor have the ai controller as the default controller for it
ai controller
yes
i did spawn ai from class
is that right
its working
but asking just in case
Where can i see the order of things firing up to see when an AI Controller would be available for ref compared to the pawn in the scene and BeginPlay etc?
i tried to make this event and call it every time to pick the letter but it is still doing duplicates
You still got "Random" connected to two different nodes. It might make more sense to store the index instead, and then use that index to do the rest
Anyone can point me the right direction to check if mouse have been moved to certain distance?
Give more specifics, what are you trying to do?
@faint pasture https://youtu.be/Kcn0LWS7OcM?t=165
Punishing Gray Raven basic Dorm guide to show you guys the benefits, dailies and how to decorate your dorm.
Timestamps:
0:00 Intro
0:32 Dorm's value
1:55 Dailies
5:03 How To Decorate
Discord: https://discord.gg/vNefwFEhbm
Email: seanbgames@gmail.com Discord: https://discord.gg/EMtNGq39FE
What
Wut
Just need to know how to detect how far the mouse have moved from it's last position
This should illustrate
oof sry
re-taking the video
@ionic crescent You want 0 Duplicate? why not just have letter A - Z
then shuffle the array
Try the shuffle node
Just turn the input values into a vector and get its length. But I'm not 100% sure that's what you want
The engine already gives you how far it moved an X and Y every frame, make a vector out of that, get its length, that's how far it moved
No, the length of the vector is how far it moved since last frame. Are you 100% sure that's what you want?
What mechanic are you trying to make
I am also deep in thought pondering a proper waifu-petting system
The video illustrate the mechanic I wanted to replicate. So the player Brush the Subject by moving the mouse left and right
like do you want mouse velocity, or distance from the initially clicked starting position, or...
which drove the value of the radial button
well this is what i got atm, what do u guys think I should do in this case?
she seems displeased
no animation yet X_X
Get the screen position of the mouse from the last frame, add the distance to a float var, while making sure the mouse didn't get out of area
The only catch is that you might want to consider screen resolution as part of the math
Cool, how would you prevent the mouse from getting out of the area?
It sounds like he's trying to do it in 3d, so I would probably run some line traces and compare the positions. I would also accumulate them over the last x amount of time
jeez... maybe you have some, like... running "distance traveled" metric. As long as the mouse is moving over the hotspot, the delta adds up to some threshold = happy waifu
I didn't realize there was a shuffle node thank you

Good luck
Simple 2D vector check from the center of the area would do
Oh I see what you mean thank you
Thanks for the suggestion guys, I will try to compare Vector every frame and see how it goes
So the idea is to check if mouse position is larger than box area from the centre. If yes, then accumulate the distance.
Right but what if we move the position a little from the centre / hot spot then remain static
The array is letter a thru z
Though, again, with screen space calculation, you need to take into account the screen resolution.
@ionic crescent in that case try shuffle and print them, you should get the letters shuffled. Once u confirm the letter have been shuffled you can just do the For each loop and go from index 0 to the last index to set the letter
Just update the centre vector every frame.
how can I set the play speed/rate of a timeline?
So for example i want to set the ak47 speed to faster than that of a aug
That's the thing, I am afraid fps and screen resolution might be a problem
@cobalt gulch
How could I change the target since it only shows a mesh
What mesh sry? I don;t think mesh has anything to do with the timeline?
Framerate shouldn't be too much of a worry, since you're calculating the distance. But the resolution normalising could be a pain to deal with
A slightly better idea would to project screen space to world space and use a box collision to limit the area
After u create a timeline, you can see the variable on the variable tab. Drag Auto Fire Time line then set the play rate
Ah k got it thx
Another idea is you could do it in 3D. Line trace to a collision plane placed on the character's head, and keep a running distance metric for each line trace hit location projected from the cursor.
Framerate shouldn't have much of an effect if you're just adding the distance between previous and current hit locations... But if you're trying to get a mouse cursor velocity type thing
you'll have to divide the distance in any given frame (tick) by World Delta Seconds = velocity
if velocity somehow factors into the waifu happiness mechanic
this is my favorite BP question all week btw
Sometimes I play those kind of anime games in speedrun pace, and most of the time velocity isn't a factor
I have yet to see such game (even NSFW ones) where how fast you rub actually matters
room for innovation 
If only I didn't put gamepads into consideration, then yes
When I use the attach emitter node to put the muzzle flash onto the muzzle socket on the gun, it spawns very far away from the character
DualShock 4 and DualSense are only console controllers that has touch screen functionality
Finally got around to packaging my game for a test version and got an unknown structure error on this event. Do I need to attach the structure or is it the fact that it must have a value at all times?
use "Spawn emitter attached"
@hexed glade I got unknown structure error all the time... basically if you have already have use some of the struct somewhere and at some point you modify the file or add new things, the game just won't package anymore.
Yeah
I tried it that way
Neither attach it
Is there any way of calling a rep notify variable (or calling a function on variable update) for standalone?
Try to save a backup for your game before following my advice, but basically what you need to do is, rename your struct. Then save all, after that the game should package just fine
the location & rotation when attached become relative. Try using 0,0,0 for location & rotation and see if the emitter is any closer to where it should be
Okay. Will try after backing up π
@cobalt gulch You probably have to change the location type from relative to snap to world? I can't remember the wording exactly
If you spawn relative then it will be relative to what ever it is attached to
Hmm none of the options work
U want to spawn something on your muzzle socket, correct?
In your screenshot there's no emitter template selected...
It does spawn but its not attaching
I've updated it since then dw
Spawn Emitter Attached
Location: 0,0,0
Rotation: 0,0,0
Scale: 1,1,1
Location type: Keep relative
Oh u are doing spawn emmiter attached, have u tried spawn emmiter at location
if i have a bunch of material instances
each having a variable that i need to edit
how do i access those in a blueprint?
Yeah but it doesent attach
nvm u can do spawn emmiter attached, keep it that way
Try to change type to keep world position tho?
Nvm, when the var updates, I'm calling the onrep function if it's standalone xd
With nodes. If you have a static mesh component or whatever, there are lots of material-related nodes that have material slot inputs
When I put it to that i cant see it spawning
wat do u want to access? the specific material? You can get the slot name I suppose
Can U eject from the character and see where it is being spawned at?
to be specific i wanna access this variable in the instance
not the parent material
Ohh yeah one sec
how can i eject
ooh that did the trick, thank you! 
actually can u print string the location of the muzzle first?
print that value and see what u get
For some reason setting keyboard focus on my pause menu isnt working, is there something im missing?
I have it set up the exact same way I did my other menus but it wont register
Ok so
When my gun is firing, recoil is added, how can I make it so when I stop firing it goes back to where you were aiming
How can i print the loc?
probably need a layer of abstraction... where you want to aim + recoil offset = where you're actually aiming
and then you animate the recoil offset in some fashion, whether via math or with timelines etc., and have the offset return to 0 eventually
worked great thank you
Hi everybody. I wanted to ask you for advice, how can I make it so that at the end of one timer another one is called, but at the same time, in the function that is called from the first timer, do not call the second timer?
can you explain in more detail what you are trying to do?
Would there be a way to set the start and end keyframes to a variable which I can change?
Hi guys! How can I get a blend mode on material instance if it is overridden?
Is that a timeline? I'm afraid this might be a hare-brained scheme, but... you could have an event track in the timeline that sets play rate on the timeline component as it's playing, lol.
Wouldn't that only set the speed?
oh, you want the output values to change? hmm
I mean, you can scale the whole output with math, but...
Should I just create another timeline for seperate guns?
Probably. Curve assets are another option. But whichever makes more sense to you
multiple timelines and/or multiple curve assets for your arsenal
I have two functions equip and unequip and in these functions have timers that fire after a certain amount of time. I also have a switch function in which the unequip function must first be executed and, at the end of the timer, the equip function must be executed in it. I could just add a timer with the Equip function at the end of the Unequip function, but then how can I use Unequip without the Equip function and vice versa, and creating a new function will not work
You could set start time, and use a given duration to define the end time
Maybe set a variable representing the thing being switched to, and the unequip function checks if that variable has something in it or not
Leave your equip and unequip functions separate, so you can use them independently, and then create 2 new functions - EquipSequential that uses the equip function and then the unequip function after the timer like you said. And then do the same for an UnequipSequential. So when you need to use JUST the equip function, call equip. And when you need to use both call equipSequential.
I cant seem to find it when referencing the timeline
do you think that would work for your needs, @wicked osprey ? It should let you call them separately and together like you describe
Thank youβ€
π
I had the same idea, but I was thinking to find out if there are more ways)
I mean that is how I would structure it in code. It is the most straightforward way.
This is my main sticking point with blueprints so far. They're great for non programmers, but they are soooooo cumbersome for programmers. On the flip side, c++ is too low level for my c# and java accustomed human readable tastes. So its basically a lose/lose no matter what I use lol.
Blueprints are programming tho
I mean sure, but you have limited access to the api and even the simplest operations take longer than they should. IE hooking up a for loop or whatever. That's what i mean by cumbersome.
If there was a button to remove the widget from the player, how could I do this only for the player that pressed the button rather than all the players in the lobby
Just do C++. It's not that much different from C# or whatever in UE since the engine deals with most of the nonsense... main downside is compilation time
overwrite it in the MI under general material properties? Not sur what you mean by "get a blend mode"
There isn't that much discrepancy and even if you do not have access to something in BP, you can easily make a C++ class that does it.
get player at index 0 since that is always the main player
Loops are an exception case. In general BP is as performant as c#
Gonna need some sources on that claim.
(Not saying performance in a gameplay scripting manner is the end all be all though)
I'd say C++ compile errors are some of the most obtuse things in the world. Have very little issues in other languages though.
Yeah although the real weird ones are usually caused by the same specific things so once you recognize them you know what it is lol
Sjorde from epic claimed it. had a graph and everything during one of his BP talks.
I know I've seen them say that the slow part of BP is the connection lines, so going from one node to another; but I don't recall ever actually seeing/hearing comparison to C#.
It was in the 2 part BP deep dive talk iirc
Yeah there's an overhead per node. Just keep it sane, and move your slow stuff to C++ when needed.
UFUNCTION(BlueprintCallable) go brrrr
I'm trying to create a night scene, I can rotate the lgiht source and increase star brightness, but the region surrounding my plane is still very bright an dI'm not sure how to make that dark.
[context needed]
I guess I'mt rying to change the skybox? So this is the the view looking up.
You can see the sky is darker and star is visible.
But looking straight ahead
There's this complete brightness.
And I don't know what that's from.
I can get rid of the clounds, rotate the light source, but I'm not sure where that blinding light around the map is coming from.
Or how do I change the colour of it so it matches the sky.
Oh I'll post there.
Hey guys so on a level I have I turned down the brightness to 0.0001 on the sky_sphere to make it dark (its a cave level) and when I travel to that level from another one and exit, it gives me an error about the Skysphere not being able to be accessed.
The lighting works as intended but that only happens when exiting, has anyone ever come across this issue?
Are you by any chance storing a reference to your sky sphere object on Game Instance or loading it out of a savegame?
Any references to stuff in the world are invalidated when you load a new level, because it (almost) all gets destroyed
Not at all
Dunno, sry
damn lol
well it doesn't really break the game as it works as intended but just pops that error
My game is crashing when I click play, even though it worked last time i had opened the project
so i have this ai that once this blueprint activates it plays jumpscare sound and it just spams the sound instead of doing it once, how can i fix this?
It looks like you're just looping this 10 times a second, maybe add a Sequence node with the sound behind a DoOnce node?
pls help
You're going to need to provide a lot more details if you expect anyone to be able to solve that
@cobalt gulch make a copy and see if it crashes
sound stops looping but it messes up ai
Hi, I overrode the Destroyed function on my character and want to undo that but deleting it doesn't make the function show back up in the list of overridable functions. Is overriding a function irreversible?
Im trying to add an event dispatcher to a gameinstance subclass, but I am unable to add inputs to it, as all those things are greyed out. What gives?
@pseudo wedge easiest way is to make the camera a separate actor that follows or doesnt
What is your pov? Third person is?
Iso
third person @zealous moth
Isometric or just free moving
Then yeah separate actor
Like a new one with spring arm and camera
Make a new actor. Equip it with a spring arm and a camera. Set up controls. Declare it on begin play to your player controller and in the player controller create free movement or follow swapping. In your camera actor create inputs when needed.
Anything I should be aware of that makes dragging wires super laggy in blueprints event graph?
Im working in 5.0.1
I have had the issues since 5.0 ea in august
runs super smoothly if I run ccleaner and delete a bunch of files but not sure which files are causing the issue. the lagginess comes back fairly quickly too
ping me if anyone has input or ideas. would really like to solve this.
Do you have like a ton of wires going? If so try subdividing them into macros and functions a bit, that usually helps me if things get a lil laggy.
How can i set a static mesh which is a child of my character blueprint to invisible?
Idk why I am having so much trouble finding a solution to this syntactical problem
I am in a clean project and have maybe 4 events, very few wires.
....set visibility?
No idea then, normally it does not lag at all for me until ive got about 200 on screen.
heres an example. This is the most populated event graph in this project within the character
but I have the same lag issue even in empty event graphs
set visibility seems to target the character itself, i reckon it works on an actor itself. My character is holding a gun and i am trying to set that gun's static mesh to invisible
do you have enough hard drive space, ram, and a nice sized page file?
yeah if you drag out the static mesh component from the left side into your blueprint then you can make it target the mesh specifically
page file?
Your windows page file
Where do I see that?
i did that just now
thanks
System Properties->Performance->VirtualMemory I think
its your OS not unreal
How much ram do you have, how much hard drive space do you have left, and do you have an SSD?
Well that should be plenty, perhaps make sure that windows defender is excluding the engine and your project?
i have my interaction set up here, however, with my line trace, it's behind my player from where i look and press the interact key rather than in front where i should see it
idk if its bc of something in my PlayerController BP or if it's something else
i am using a custom player tho
hm it uses camera as the reference though
yeah exactly
it goes backwards?
yes
can you click on the camera and see where the red arrow is facing?
oh
i saw the problem
whats the problem?
π
since we are offsetting 500 units forward from the start point, it should be addition
how to add image to grid panel in blueprint ?
I have two big cubes colliding. When they collide i want to spawn a sparks there. How do i get the exact point of collision between the 2 cubes? The event begin overlap doesnt seem to have an "hit location". Pls help.
Use the overlap between the two mesh components instead of the actors
It gives you a FHitResult
But that'll only fire if they can actually overlap, otherwise, you need at Hit delegate
Why is a newly created DataAsset not castable to when iterating Get Assets by Class?
I dont see it. It looks the same as the overlap for the normal collision?
Set new time, its an input on the timeline node
Can i access separate parts of an instanced static mesh?
I have an instanced static mesh of a character, its just a rabbit sprite in a plane. Then i intend to include in the same instanced static mesh, another plane with a texture of the weapon.
This is so that i can move the weapon independently in the instances.
Can the original instanced static mesh of the character (the rabbit), also include a weapon,
that can be moved separetely? Or i must create a new instanced static mesh just for the weapon?
They should be two separate meshes.
It's pretty easy to do. Add a socket to your rabbit, then to equip the weapon, just attach the weapon to the socket.
Hard to think of a way where they can be the same ISM. You could maybe animate the spear in the material graph with World Position Offset, but then every instance of the HISM would share that animation state I think. The way around that maybe is by doing it as a Niagara system with material inputs.
I assume your use case is wanting hundreds of rabbits on screen without creating hundreds of draw calls. I assume Niagara could be part of the solution but I've never done anything like that personally.
If you're animating just a handful of rabbits then just do it as two static mesh components
Or one skinned mesh, or a mesh with morph targets
UE auto-instances static mesh components behind the scenes in cases where they share the same mesh and material instance
anyone know how to get an actors location to make a vertex spawn spawn there? Currently the vertex is spawning in the general direction but never close enough
is your capsule offset from its scene root that you need to subtract the positions? Could you test with a simpler example first where you could just gets the actors position? Thats the only thing I see here that could be affecting your vertex location.
it is not the offset that affects the issue
the referenced position is used in many other bps and it works normally
when generating mesh it's very abnormal so I am probably thinking about it the wrong way
in this example, direct input of world location causes this infinite mesh
red is where the it's suppose to go
How do I "select" a child widget. Want to do 2 things:
- highlight the selected widget,
- update a list in the parent to know it's selected
Probably a stupid question, but if I have variables on the level blueprint, where can I see those in the editor at runtime?
@lament ginkgo you cant get variables from the level blueprint
Oh, like you can't even see them in the inspector?
if you are trying to use it in other bps
are you trying to print it to your screen?
I'm not, just trying to actually verify they're being set properly
he wants to inspect their values at runtime I think
Yeah
print string node
anyone?
Thanks, I'll try
@solar bison did you create your widget and store it in a variable in your parent yet?
you sure the world location vector is coming out ok? did you debug the vertice array? There is literally nothing else wrong with that mesh section
did that just now
now what.. how do I propagate state up from child to parent?
world position or not, it shouldnt matter where the numbers come from. The only explanation is that the numbers are wrong somehow π€·
i can check again
what are you trying to send from child to parent?
@drifting peak so when I click on the child, it gets "seletcted". i.e
- I flip a boolean to highlight it in the UI
- parent should know how many cards are selected, and which ones
so I guess both are implicitly taken care of, I want a clean way to handle this. Should I fire an event from the child whenever it is selected/deselected? and then on the parent I listen for that event and run appropriate logic
are you using flip flop node to flip the boolean?
don't worry about me flipping the boolean, what's the best way to respond to a boolean being flipped?
is it only thru events?
@marsh oak i reset both back to world origin, the vertex still goes further than the spider's location
also is it better to use a button versus an iamge to respond to click events?
it doesnt matter if you use a button or an image, because your image is just an overlay in your widget
Explain this then? Button event handlers don't ask me to return anything
if you dont want to make it activate from the widget itself then do it in your game instance
or your level bp
what?
are you clicking on your widget then it does something?
Why does OnMouseButtonDown expect me to to pass something in the Return Node?
What's wrong with Unreal...?
Yup. I thought about that. i could in theory change the position of the weapon. So that would work. But you are saying that will change all the weapons in all instances? What if i create dynamic material? And change it per instance?
I don't think you can give individual instances their own material. I haven't looked deeply into it but...
And every dynamic material instance is a new draw call
So you're losing the ostensible benefit of instanced meshes
How many rabbits do you intend to have on the screen at most?
If it's just a few dozen then BP actors and static mesh components might be ok
it starts with 1000 rabbits. then they reproduce to 100.000
I guess you'd need something clever like a Niagara particle system... That goes well beyond my knowledge
I think there are crowd systems on the marketplace as well
as far as draw calls go, UE does actually do mesh auto-instancing https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Rendering/MeshDrawingPipeline/
which reduces the need to do clever HISMC tricks as people did in earlier versions of UE4
so that means i dont need to do all this that im doing? and that now it does automatically??
yeah if you spawn 100 of the same actor with the same static mesh component & material
UE4 will batch all those draw calls automatically
ah i see. but what im doing is actually i have 1 actor, with like 100's of rabbits and they move all together, those are instanced static meshes inside 1 actor character. is this good?
does dividing an integer (eg: 9/4) return the floor value?) i.e 2?
yeah integer division throws away the remainder
ok so it's always floored
I guess the actor part is unimportant... If the engine sees a bunch of identical-ish static meshes, it'll batch them
i.e 9/2 = 4, and 8/2 = 4 too right
yeah
ok thanks so much
Isnt that the handled/unhandled reply?
what does that mean
If you reply handled it consumes the click if im not mistaken
While unhandled allows it to traverse down the widget z order
no idea what that means, could you break it down for a ue5 dummy
there's nothing documented about it
like, this is if there are widgets overlaid on top of each other?
all responding to click events?
one with the highest z order's click gets registered?
ok
I must say, coming from unity background, unreal does a poor job documenting this stuff
If the top one returns handled, all is fine and nothing else happens
I don't expect random returns like that in simple event listeners
While unhandled allows another one to react to the same click
Its a practical return imo^^
ui input works in hierarchy
if someone handled it, it doesnt get passed down
its a legit useful feature
yes but small things like these are what creates barriers to get started with unreal
not documented + something that could be optionally handled instead of a return
Not really a barrier
and thats is what this channel is for π
Disagree. This is what good documentation should handle
not a discord channel
i'm sure there are collectively 50+ people over the last couple years who've askde the same question π
a simple "ue4 return handle" result is all you need
and some effort to figure out stuffs
I don't want to argue. But if you think this is documentation that is sufficient for somebody who doesn't understand "bubble up/down", "widget hierarchy" and "event reply" (coming from Unity background), then all I can say is there is room for improvement
also im not joking, the best documentation you have in unreal is the source code itself
its well documented within the source code
I agree. unfortunately I am using blueprints for this project
you still can look at source code
Since we are on this topic, si there nothing I can use to destroy a widget? I don't want to "remove from parent", because the next time I use it, I want the state to be clean.
not really a function
when you remove from parent, the viewport slate is gone
if there are no reference holding the widget
it will be cleaned up by GC
so if you did not store a reference of the widget created, after you called "remove from parent" (aka remove from viewport)
then it will soon be cleared by GC
if you however stored the reference of the widget created, you can use back the widget and add it back to the viewport(or panelslots), constructs will execute whenever a widget is added to viewport(or panelslot)
along with the constructs executing
does it also start with a clean slate in terms of state/
I don't want lingering state in the widget
mmh nope
..
if you want clean slate its either you clean it yourself
or you create another one
I don't mind creating another one. Just tell me how to destroy the previous one
remove from parent
Remove From Parent
I did not
The ever so hard working Unreal janitors will take it away once there's nothing else referencing it
poor janitors have to work on tight schedule
I must say...blueprints are so painful to do UI stuff. Wow
I was writing react at my day job yesterday...got complicated UI with 4 different states done in like, 4 hours. Maybe I'm just not used to Unreal. at all.
its not the best way but its ok once you get the hang of it
there are a bunch of useful stuff
You can sideload it into a C++ function if you want to, provided that you inherit from UserWidget.h and include both UMG and Slate + SlateCore modules.
Maybe that could lessen the pain to some degree
I am actually thinking of rewriting this entire project in C++ lol
not really sure what I'm doing, with everything in blueprints
game logic is absurdly different to handle. have like 7-8 core actors now with a lot of functions. I miss my IDE so much
You're still going to need a bit of BP if you want pain free asset referencing.
I will 100% use BP for assets
I don't want to create static references in C++ with file paths, that's the worst
blueprints will be exactly how I use them in Unity for Gameobjects/prefabs, to change static/skeletal meshes, small scripting stuff (event dispatchers + handelrs for particles/sound) etc
hmm in c++ you ask the packagemanager to find the asset for you, you just need to know its relative path but yeah, quite pain in the ass compared to drop down list in bp
but I am just very disappointed with visual scripting in general. I really thought it'll be pain free when building an entire game
I thought of writing a couple unit tests since logic for board games boils down to just arithmetic for the most part. I don't even know how to get started in blueprints. eek
i will say bp excels in fast iteration and testing stuff, but you cannot go into unreal blindly
unlike unity where freedom is almost literally a feature
Personally I do things in BP to get things going. Only then I port things to C++ once performance had a concerning hit
unreal follows a strict models of stuffs that you first need to understand before you can do things without everything goes sphegetti in 2 days