#blueprint

402296 messages Β· Page 891 of 403

lone eagle
#

sorry

#

i didnt know

#

thought you was saying it as like

faint pasture
#

You're recording what time you started

lone eagle
#

sudo code

#

my bad

#

now i have this setup

faint pasture
#

Is your variable called Set Start Time?

#

first of all rename those, that's confusing as all hell

lone eagle
faint pasture
#

yeah remove the set part of the names

lone eagle
#

yeah youre right

#

set.settime

faint pasture
lone eagle
#

get.settime

#

its weird

faint pasture
#

OK your start time is good. Now on tick set CurrentTime = GameTimeSeconds - StartTime

lone eagle
#

like so?

faint pasture
#

What you posted is

CurrentTime = GameTime
CurrentTime - StartTime   //is never used

and thats it.

lone eagle
faint pasture
#

Yup

#

Print CurrentTime after that node and make sure it's going up

#

print string, just drag CurrentTime into it

lone eagle
#

so here, my event tick does start time - my game time in seconds and my current time is the result

faint pasture
#

Yes

#

Logically, this is what happens in order
Event Tick is a function.
Event tick sets CurrentTime to be GameTime minus StartTime

lone eagle
#

it works

faint pasture
#

So every time Tick fires, CurrentTime is updated

lone eagle
#

start time remains as 0

faint pasture
#

OK so now at your end level trigger (Begin Overlap probably?)
Set EndTime.

lone eagle
#

so is that to make sure that the counter starts at 0

faint pasture
#

It might be different depending on loading or whatever or if you wanted to have like 3 seconds countdown before the official Start

lone eagle
#

i could delay it by a second too right?

faint pasture
#

Yeah, you'd just set StartTime sometime later

#

That's the whole reasoning behind having a StartTime variable.

lone eagle
#

i changed the variable and it didnt change anything

faint pasture
#

You'd want to change WHEN you set it

#

Try
Begin Play -> Delay -> Set StartTime

lone eagle
#

that also didnt work for some reason

faint pasture
#

Show what you have

lone eagle
#

oh i see

#

it counts to 4, then resets

faint pasture
#

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

lone eagle
#

this is the result

faint pasture
#

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

lone eagle
#

done

faint pasture
#

BeginPlay -> StartTime = CountDownTime x -1 -> Delay for CountDownTime Seconds -> Set StartTime = GameTime

fickle dune
#

Would anyone please help me

faint pasture
#

It's a bit redundant, you could just set start time = GameTime - CountDownTime but this is a better setup for an actual start event.

lone eagle
#

what would be the better setup

#

the 1st or 2nd?

faint pasture
#

For storing across levels you want to either save/load or store in GameInstance

faint pasture
# lone eagle the 1st or 2nd?

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.

lone eagle
#

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

faint pasture
#

Begin Play -> Set StartTime = -1 x CountDownTime

lone eagle
faint pasture
#

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

lone eagle
#

you mean this

#

?

faint pasture
faint pasture
lone eagle
#

timer just starts negative

#

can i ask also

#

will i be able to make this into a widget?

faint pasture
#

later, your widget just reads CurrentTime and updates itself with it

lone eagle
#

oh i see

#

will it not read the negative int

#

float*

faint pasture
#

It will, but you could clamp it or whatever. Whatever you want to do

lone eagle
#

oh i see

#

should be fine either way

#

where do i place the end of it?

faint pasture
#

wait

#

no, End Time = Game Time Seconds

#

CurrentTime is what you read anywhere else

#

Call it ElapsedTime or whatever if that's better

lone eagle
#

but the overlap wont actually pause it?>

#

oh it does

#

but i dont understand how it pauses it

faint pasture
#

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

lone eagle
#

wait what

#

oh is this for the negative timer

#

for the delay

faint pasture
#

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.

lone eagle
#

do you think the latter would be better for setting up the widget

faint pasture
#

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

lone eagle
#

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

faint pasture
#

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

lone eagle
#

oh, select is a node

faint pasture
round moth
#

hi this button doesnt work at all.

#

doesnt even print string when i click it

faint pasture
round moth
#

no

lone eagle
#

@faint pasture ill be honest, im unsure how select works

faint pasture
#

pretty simple

lone eagle
#

this is what i got

faint pasture
# lone eagle

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

lone eagle
#

this works

faint pasture
#

yup

lone eagle
faint pasture
#

Almost, why are you setting
EndTime = 0.0?

#

Shouldn't it be
EndTime = GameTimeSeconds

lone eagle
#

yeah

#

i copied without that node

#

my mistake

#

sorry

faint pasture
# lone eagle

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

lone eagle
#

end time should be true?

#

complete? so on the begin overlap?

faint pasture
#

When the Level is complete, you want to use EndTime for your calculations, not GameTimeSeconds

#

That makes sense right?

lone eagle
faint pasture
#

yup thats good

lone eagle
#

yeah, when level complete = true then i want end time

#

and -start time stops the event tick from counting up?

faint pasture
#

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

lone eagle
#

i dont quite understand the logic properly

#

oh

#

so - keeps it at bay

#

keeps it from changing

#

but the print stops completely

faint pasture
lone eagle
#

is that because i set game to pause

faint pasture
#

should be tick

#

Pausing stops GameTime from going up yes

#

and slowmo makes it slower

#

Time Dilation

lone eagle
#

it doesnt work now that i put it on event tick

faint pasture
#

Begin Play has the delay and stuff remember?

lone eagle
#

oh

#

because i have no print

#

sorry

faint pasture
#

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.

lone eagle
#

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?

faint pasture
# lone eagle 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

lone eagle
#

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

unreal marten
#

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

trim matrix
unreal marten
#

yeah

trim matrix
#

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.

unreal marten
#

I knew I should have put C) something else?

trim matrix
#

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)

unreal marten
#

awesome I'll work on switching things over now, thanks!

trim matrix
#

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.

faint pasture
trim matrix
#

yes

lone eagle
#

@faint pasture im not sure if you have seen my screenshots above

#

i feel like im becoming quite annoying also

trim matrix
kindred pier
#

I feel like I'm missing something here, it successfully toggles the camera on, but won't toggle back

trim matrix
#

Im assuming this custom event executes when you make a keyboard input?

kindred pier
#

on a widget button press

#

well that button press calls this event

trim matrix
#

I see then, I am not sure.

unreal marten
trim matrix
#

Do you mean, you are having a hard time knowing how to make the new widget update?

unreal marten
trim matrix
#

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.

last ice
#

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:

trim matrix
#

I am unaware of any way to accomplish that easiliy.

last ice
#

its just weird because for example on a character class it automaticaly uses the bottom of the sphere for placement

trim matrix
#

I dont think there is a way unless you edit the mesh. Or unless you create code to accomplish that

unreal marten
# trim matrix I see.

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

trim matrix
#

You might be getting confused somewhere.

#

Do you want to hop on call real quick?

unreal marten
gentle urchin
last ice
#

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 πŸ™‚

compact anchor
#

did they remove the option to multiply and divide vectors by a single float?

tawdry surge
#

Math nodes are universal in ue5

compact anchor
#

wait but then now instead of (vector) / (float) u have to do (vector) / (float, float, float)

tawdry surge
#

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

hard sigil
#

is there anyway to check if the player is in a navmesh volume?

jaunty summit
#

Call GetOverlappingActors to check if you're in the nav mesh

surreal peak
#

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

undone surge
#

is there a way to conditionally edit or chane a mateirial on a mesh in main eventgraph on anything

paper gate
paper gate
# paper gate

Capsule component rotating in z direction also when i move mouse to lookup

fickle dune
#

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

sterile fjord
#

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

undone surge
#

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

brazen pike
undone surge
#

how do i reference the intensity in a blueprint

brazen pike
#

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

undone surge
#

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

brazen pike
#

I'm not 100% sure, somebody else might be able to help you there

undone surge
#

alright

#

ill ask in animation

#

thanks

tight schooner
# fickle dune How do I make my interactor be the inventory component from my third person char...

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

tight schooner
undone surge
rain egret
#

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

prisma tree
#

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

fiery glen
#

subtract 100 and absolute the result

#

absolute forces the result to be positive

prisma tree
#

Omg so clever! πŸ˜‰ thanks alot

fiery glen
#

to be clear this will make 100 > 0

prisma tree
#

Thats fine, i didnt even manage to ask my question properly, that is the behaviour i want!

fiery glen
#

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

prisma tree
#

Well your solution did exactly what I wanted so thanks alot πŸ™‚

undone surge
#

how do i get a friendly AI to differentiate between my character and an enemy AI

hoary junco
#

If you want multiple targets then I would try to make an array of them

undone surge
#

do i set this logic in the behaviour tree ?

#

@hoary junco

hoary junco
#

It has been a while since I worked with AI so I don't remember

undone surge
#

ok ill try to find a guide . thanks tho

covert schooner
#

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.

shadow holly
#

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

icy dragon
remote meteor
covert schooner
remote meteor
#

nope, only in editor that the construction runs again

shadow holly
remote meteor
#

during the runtime, the construction script will only run once when the actor is created

icy dragon
remote meteor
#

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

icy dragon
tight schooner
#

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

shadow holly
#

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?

tight schooner
#

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...

remote meteor
#

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

tight schooner
#

Yeah custom structs are nice

strange thunder
#

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

covert schooner
#

Where do you (typically) launch UI? From the PlayerController or the Pawn or the Level?

remote meteor
#

usually playercontroller, or if you want, playerhud

covert schooner
#

What is playerhud? I have not seen that class mentioned before

tight schooner
#

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

covert schooner
#

good point

remote meteor
#

from you player controller, you can gethud and return the hud class used from the game mode overrides

covert schooner
#

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)

remote meteor
#

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

shadow holly
#

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

remote meteor
#

unless the projectile knows exactly what it can do

#

things may get messy too

remote meteor
#

radial damage does check for collision channel that blocks the view

strange thunder
remote meteor
#

if your radial origin is on the ground

#

and ur barrel's origin is on the ground too

#

might get blocked

strange thunder
#

Barrels origin is like, the center of the barrel?

#

Can I like change it or something?

remote meteor
#

if it in the center then it should be fine

remote meteor
shadow holly
remote meteor
#

oh

#

if you can do c++

#

do your struct in c++

#

πŸ™

strange thunder
remote meteor
#

if that works out

strange thunder
#

Oh it is working now

#

Thanks !!

remote meteor
#

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

strange thunder
#

Im going to try :>

#

Works super clean now thank you

mild jacinth
#

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++)

covert schooner
tawdry surge
#

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

covert schooner
#

right, and it works, but that warning concerns me

#

should I assume its just implying its not authorative?

tawdry surge
#

It is client owned..
I can't say I ever noticed the note on it

covert schooner
#

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"

tawdry surge
#

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

covert schooner
tawdry surge
#

It'll work fine

balmy vessel
#

anyone know why this doesnt actually change the colour of my editable text?

#

the prints come out correct

remote meteor
#

you need to use the SetFont() function instead

balmy vessel
#

set font doesnt exist

#

it doesnt come up

mental trellis
#

Pretty sure font doesn't include colour anyway, it's just text size, style (bold/italic/etc) and actual font.

remote meteor
#

oh yea

#

SetColorAndOpacity?

balmy vessel
#

nope

#

set style was the only thing that comes up

remote meteor
#

choose the

#

UseRule to Specified Color

balmy vessel
#

huh?

remote meteor
balmy vessel
#

nope

prisma tree
#

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 πŸ™‚

remote meteor
# balmy vessel nope

ok so its dumb but you need to wrap your editable text with a border and change the ContentColorAndOpacity there

remote meteor
#

wrap the image with a scale box and scale to fill

balmy vessel
remote meteor
#

πŸ˜…

tawdry surge
#

If you're trying to set the text content on the text element you need " set text(text)"

solar bison
#

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?

balmy vessel
tawdry surge
#

Oh ok, Color and opacity then

balmy vessel
#

yeah, which isnt an option for the editable text version hence why we've come to the conclusion that we have to wrap it

tawdry surge
#

It should have a "foreground color" for setting the color of the text in an editable one

balmy vessel
#

and that doesnt work

tawdry surge
#

@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

formal parcel
#

whats the cleanest way to know if something is sitting on the ground? i have distance measuring approach but its kkinda scuffed

solar bison
#

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

tawdry surge
#

And the "Data"table isn't a data structure.. ok

formal parcel
#

heh

#

so anyways, - anyone know a clean way to know if something is "touching" another, aka sitting on the ground

undone surge
#

how do i open my current level blueprint in ue5

formal parcel
#

@undone surge Open Level

#

er double click it in content window

#

whichever u meant

undone surge
#

but that will load the map right

#

i want to open the blueprint

#

to edit stuff in event graph

formal parcel
#

levels dont have blueprints i dont believe

undone surge
#

oh

#

i saw a video where a guy opened it in ue4

formal parcel
#

you can spawn blueprints (actors and such) in a level

#

levels dont have execution space, they are just data

#

i'm pretty sure anyways...

undone surge
#

like this

formal parcel
#

those are other blueprints i think

#

not like the event graph for the level

#

use player controller or game instance or something

undone surge
#

ok

formal parcel
#

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

undone surge
#

i wana make a day night cycle

solar bison
undone surge
#

how would i rotate the light

solar bison
#

I have to store a map somewhere in a class or a BP

#

i can access the data table anywhere

formal parcel
#

not sure off hand, it might be a dynamic light tho

#

as in, added at runtime

undone surge
#

i see

#

ill try to look for ue5 vids on this

formal parcel
#

yea good question but either way theres no code "in" the level

tawdry surge
#

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

solar bison
#

yeah

undone surge
#

i found the level blueprint

solar bison
#

"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

tawdry surge
#

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

formal parcel
#

is it overlapping if its just sitting on it?

fair magnet
#

Is it fine to do line plane intersect on tick?

tawdry surge
#

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

formal parcel
#

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

tawdry surge
#

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

formal parcel
#

i dont follow that

obtuse herald
#

I don't know the exact circumstances but there is also Sphere Trace if that helps

formal parcel
#

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

tawdry surge
#

Sphere trace would work too

formal parcel
#

lemme try that

obtuse herald
#

slightly larger sphere trace would work I guess?

formal parcel
#

sphghere trace the same size sphere maybe?

tawdry surge
#

Slightly bigger

formal parcel
#

i dont mind a tiny tolerance to deal with very minor bumps

solar bison
#

How do I make a child element of a horizontal box Fill the box?

formal parcel
#

so my sphere is 100

#

like, 101?

#

or 100.00001

obtuse herald
#

100.1 is probably enough already

formal parcel
#

i guess thats my tolerance πŸ™‚

#

ty lemme give it a shot

obtuse herald
#

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

tawdry surge
#

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

balmy vessel
#

@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

formal parcel
#

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

remote meteor
#

actually

formal parcel
#

also was able to take out the breaking of the result as now just hitting is all i needed

remote meteor
#

there is a function called FindFloor

#

from the CharacterMovement

formal parcel
#

yea cant use it cuz i'm not using character movement

balmy vessel
#

I have to have the text inherit from the border tho right?

remote meteor
#

then manually trace is the way to go

formal parcel
#

yea the approach above seems to functions well

balmy vessel
#

so i cant have the border be transparent without the text also being transparent?

#

oh wait

#

i was changing the wrong one

remote meteor
#

theres this

balmy vessel
obtuse herald
# formal parcel

Actually you can also just shoot a line trace down the exact same way

balmy vessel
#

the text is transparent now tho

formal parcel
#

No Toy, read above that, I cant use a line cuz its a sphere πŸ™‚

#

i had a line originally

obtuse herald
#

End would only be actor location - (radius + tolerance) on z

formal parcel
#

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

obtuse herald
balmy vessel
#

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

open latch
#

When creating UMG for mobile do you need to rotate your buttons etc for portrait or does it automatically rotate?

formal parcel
#

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?

thin panther
tawdry surge
#

Yeah go ahead and throw it up

trim matrix
#

Hey guys. I got those 2 questions. Every time I open Unreal Engine 5.0.1 project:

  1. One of UPROPERTY(EditAnywhere) setted before closing(saved and compiled and saved). Lose it's connection (like setted value).
  2. 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.

lone eagle
#

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?

tame pecan
blissful grail
#

It's honestly fairly easy to build one yourself.

#

All in all - a handful of nodes.

lone eagle
#

i decided to buy it

#

it will help me in the future

undone surge
#

how do i eject out of character after pressing play

blissful grail
#

F8

lone eagle
blissful grail
trim matrix
tame pecan
trim matrix
tame pecan
#

Every time you make changes to a header file or the constructor, ALWAYS restart the editor

#

or weird things will happen

blissful grail
#

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++.

tame pecan
mild jacinth
#

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)

trim matrix
#

sorry tought issue lays in blueprint

blissful grail
#

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.

trim matrix
#

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

mild jacinth
#

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

trim matrix
#

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

compact anchor
cedar cave
#

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.

vale pasture
#

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

rugged wigeon
#

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

blissful grail
#

You can customize a lot of the theme now in the editor settings. Maybe check there to see if it is a field.

vale pasture
#

Thanks @icy dragon , i didn't there is a macos section, sorry !

icy dragon
#

I'm suprised they still went with the "3D" look of the BP in UE5

rugged wigeon
#

I like that part tbh

icy dragon
#

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

rugged wigeon
#

@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

oak crane
oak crane
#

I like it but I would bet that it wouldn't be very difficult to change with a plugin or something.

ionic crescent
#

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 =.

tight schooner
#

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

ionic crescent
#

Thank you i will give that a try and report back. I appreciate the in depth answer +D

undone surge
#

im trying to spawn actor from class which is an AI actor but when it spawns in it doesnt do the AI stuff

ionic crescent
#

Does the actor have the ai controller as the default controller for it

undone surge
#

ai controller

#

yes

#

i did spawn ai from class

#

is that right

#

its working

#

but asking just in case

peak summit
#

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?

ionic crescent
tight schooner
trim matrix
#

Anyone can point me the right direction to check if mouse have been moved to certain distance?

faint pasture
trim matrix
icy dragon
#

What

faint pasture
#

Wut

trim matrix
#

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

faint pasture
#

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

trim matrix
#

hmmmm

#

So compare previous length with current one?

faint pasture
#

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

tight schooner
#

I am also deep in thought pondering a proper waifu-petting system

trim matrix
#

The video illustrate the mechanic I wanted to replicate. So the player Brush the Subject by moving the mouse left and right

tight schooner
#

like do you want mouse velocity, or distance from the initially clicked starting position, or...

trim matrix
#

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?

tight schooner
#

she seems displeased

trim matrix
icy dragon
#

The only catch is that you might want to consider screen resolution as part of the math

trim matrix
faint pasture
#

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

tight schooner
#

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

ionic crescent
icy dragon
ionic crescent
trim matrix
#

Thanks for the suggestion guys, I will try to compare Vector every frame and see how it goes

icy dragon
#

So the idea is to check if mouse position is larger than box area from the centre. If yes, then accumulate the distance.

trim matrix
#

Right but what if we move the position a little from the centre / hot spot then remain static

ionic crescent
icy dragon
#

Though, again, with screen space calculation, you need to take into account the screen resolution.

trim matrix
#

@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

icy dragon
cobalt gulch
#

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

trim matrix
#

@cobalt gulch

cobalt gulch
trim matrix
#

What mesh sry? I don;t think mesh has anything to do with the timeline?

icy dragon
trim matrix
#

After u create a timeline, you can see the variable on the variable tab. Drag Auto Fire Time line then set the play rate

tight schooner
#

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

icy dragon
#

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

tight schooner
#

room for innovation alex

icy dragon
cobalt gulch
#

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

icy dragon
#

DualShock 4 and DualSense are only console controllers that has touch screen functionality

trim matrix
#

πŸ‘‰ πŸ‘ˆ

#

@cobalt gulch Show your blueprint

hexed glade
#

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?

cobalt gulch
tight schooner
#

use "Spawn emitter attached"

trim matrix
#

@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.

cobalt gulch
#

Yeah

cobalt gulch
#

Neither attach it

sinful gust
#

Is there any way of calling a rep notify variable (or calling a function on variable update) for standalone?

trim matrix
#

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

tight schooner
# cobalt gulch

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

hexed glade
trim matrix
#

@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

trim matrix
#

U want to spawn something on your muzzle socket, correct?

cobalt gulch
#

Yea

#

But attach it

tight schooner
#

In your screenshot there's no emitter template selected...

cobalt gulch
#

It does spawn but its not attaching

cobalt gulch
tight schooner
#

Spawn Emitter Attached
Location: 0,0,0
Rotation: 0,0,0
Scale: 1,1,1
Location type: Keep relative

trim matrix
#

Oh u are doing spawn emmiter attached, have u tried spawn emmiter at location

onyx token
#

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?

cobalt gulch
trim matrix
#

nvm u can do spawn emmiter attached, keep it that way

#

Try to change type to keep world position tho?

sinful gust
tight schooner
cobalt gulch
trim matrix
trim matrix
onyx token
#

not the parent material

trim matrix
#

Ohh yeah one sec

trim matrix
#

@onyx token

#

This will do?

onyx token
trim matrix
#

actually can u print string the location of the muzzle first?

#

print that value and see what u get

wicked lava
#

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

cobalt gulch
#

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

cobalt gulch
tight schooner
#

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

wicked osprey
#

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?

marsh oak
cobalt gulch
#

Would there be a way to set the start and end keyframes to a variable which I can change?

proven plover
#

Hi guys! How can I get a blend mode on material instance if it is overridden?

tight schooner
# cobalt gulch

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.

cobalt gulch
tight schooner
#

oh, you want the output values to change? hmm

#

I mean, you can scale the whole output with math, but...

cobalt gulch
#

Should I just create another timeline for seperate guns?

tight schooner
#

multiple timelines and/or multiple curve assets for your arsenal

wicked osprey
# marsh oak can you explain in more detail what you are trying to do?

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

gentle urchin
tight schooner
marsh oak
cobalt gulch
marsh oak
#

do you think that would work for your needs, @wicked osprey ? It should let you call them separately and together like you describe

marsh oak
#

πŸ‘

wicked osprey
#

I had the same idea, but I was thinking to find out if there are more ways)

marsh oak
#

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.

faint pasture
marsh oak
#

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.

cobalt gulch
#

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

earnest tangle
zealous moth
zealous moth
zealous moth
tawdry surge
#

Loops are an exception case. In general BP is as performant as c#

blissful grail
#

(Not saying performance in a gameplay scripting manner is the end all be all though)

blissful grail
earnest tangle
#

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

tawdry surge
#

Sjorde from epic claimed it. had a graph and everything during one of his BP talks.

blissful grail
#

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#.

tawdry surge
#

It was in the 2 part BP deep dive talk iirc

faint pasture
icy dragon
trim matrix
#

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.

trim matrix
#

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.

tight schooner
#

@trim matrix auto exposure? Sounds like a question for #graphics

trim matrix
#

Oh I'll post there.

fickle dune
#

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?

tight schooner
#

Any references to stuff in the world are invalidated when you load a new level, because it (almost) all gets destroyed

tight schooner
#

Dunno, sry

fickle dune
#

damn lol

#

well it doesn't really break the game as it works as intended but just pops that error

cobalt gulch
#

My game is crashing when I click play, even though it worked last time i had opened the project

fleet cobalt
#

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?

buoyant citrus
earnest tangle
#

You're going to need to provide a lot more details if you expect anyone to be able to solve that

zealous moth
#

@cobalt gulch make a copy and see if it crashes

fleet cobalt
elfin arch
#

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?

covert schooner
#

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?

zealous moth
#

@pseudo wedge easiest way is to make the camera a separate actor that follows or doesnt

#

What is your pov? Third person is?

#

Iso

pseudo wedge
#

third person @zealous moth

zealous moth
#

Isometric or just free moving

pseudo wedge
#

free moving

#

currently the actor moves with the camera

zealous moth
#

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.

lusty shard
#

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.

covert schooner
bitter plover
#

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

lusty shard
covert schooner
lusty shard
#

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

bitter plover
# brazen pike ....set visibility?

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

covert schooner
#

do you have enough hard drive space, ram, and a nice sized page file?

brazen pike
covert schooner
lusty shard
bitter plover
#

thanks

covert schooner
#

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?

lusty shard
#

I have a 2TB M.2 and 32GB RAM

#

I have 218GB left on the M.2

covert schooner
dusky cape
#

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

remote meteor
#

hm it uses camera as the reference though

dusky cape
#

yeah exactly

remote meteor
#

what kind of in game view is that?

#

FPS or TPS

dusky cape
#

fps

remote meteor
#

it goes backwards?

dusky cape
#

yes

remote meteor
#

can you click on the camera and see where the red arrow is facing?

#

oh

#

i saw the problem

dusky cape
#

whats the problem?

remote meteor
#

this needs to be +

#

not *

dusky cape
#

oh

#

THANK YOU

remote meteor
#

πŸ‘

#

since we are offsetting 500 units forward from the start point, it should be addition

dusk nymph
#

how to add image to grid panel in blueprint ?

jaunty jolt
#

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.

unique harness
#

It gives you a FHitResult

#

But that'll only fire if they can actually overlap, otherwise, you need at Hit delegate

peak summit
#

Why is a newly created DataAsset not castable to when iterating Get Assets by Class?

jaunty jolt
gentle urchin
jaunty jolt
#

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?

blissful grail
#

It's pretty easy to do. Add a socket to your rabbit, then to equip the weapon, just attach the weapon to the socket.

tight schooner
# jaunty jolt Can i access separate parts of an instanced static mesh? I have an instanced sta...

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

drifting peak
#

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

marsh oak
#

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.

drifting peak
#

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

solar bison
#

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
lament ginkgo
#

Probably a stupid question, but if I have variables on the level blueprint, where can I see those in the editor at runtime?

drifting peak
#

@lament ginkgo you cant get variables from the level blueprint

lament ginkgo
#

Oh, like you can't even see them in the inspector?

drifting peak
#

if you are trying to use it in other bps

#

are you trying to print it to your screen?

lament ginkgo
#

I'm not, just trying to actually verify they're being set properly

marsh oak
#

he wants to inspect their values at runtime I think

lament ginkgo
#

Yeah

drifting peak
#

print string node

lament ginkgo
#

Thanks, I'll try

drifting peak
#

@solar bison did you create your widget and store it in a variable in your parent yet?

marsh oak
solar bison
#

now what.. how do I propagate state up from child to parent?

marsh oak
#

world position or not, it shouldnt matter where the numbers come from. The only explanation is that the numbers are wrong somehow 🀷

drifting peak
#

i can check again

drifting peak
solar bison
#

@drifting peak so when I click on the child, it gets "seletcted". i.e

  1. I flip a boolean to highlight it in the UI
  2. 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

drifting peak
#

are you using flip flop node to flip the boolean?

solar bison
#

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?

drifting peak
#

@marsh oak i reset both back to world origin, the vertex still goes further than the spider's location

solar bison
#

also is it better to use a button versus an iamge to respond to click events?

drifting peak
#

it doesnt matter if you use a button or an image, because your image is just an overlay in your widget

solar bison
#

Explain this then? Button event handlers don't ask me to return anything

drifting peak
#

if you dont want to make it activate from the widget itself then do it in your game instance

#

or your level bp

solar bison
#

what?

drifting peak
#

are you clicking on your widget then it does something?

solar bison
#

Why does OnMouseButtonDown expect me to to pass something in the Return Node?

#

What's wrong with Unreal...?

jaunty jolt
tight schooner
#

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

jaunty jolt
#

it starts with 1000 rabbits. then they reproduce to 100.000

tight schooner
#

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

#

which reduces the need to do clever HISMC tricks as people did in earlier versions of UE4

jaunty jolt
#

so that means i dont need to do all this that im doing? and that now it does automatically??

tight schooner
#

yeah if you spawn 100 of the same actor with the same static mesh component & material

#

UE4 will batch all those draw calls automatically

jaunty jolt
#

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?

solar bison
#

does dividing an integer (eg: 9/4) return the floor value?) i.e 2?

tight schooner
solar bison
#

ok so it's always floored

tight schooner
solar bison
#

i.e 9/2 = 4, and 8/2 = 4 too right

tight schooner
#

yeah

jaunty jolt
#

ok thanks so much

gentle urchin
solar bison
gentle urchin
#

If you reply handled it consumes the click if im not mistaken

#

While unhandled allows it to traverse down the widget z order

solar bison
#

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?

gentle urchin
#

I believe so

#

Yes

solar bison
#

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

gentle urchin
#

If the top one returns handled, all is fine and nothing else happens

solar bison
#

I don't expect random returns like that in simple event listeners

gentle urchin
#

While unhandled allows another one to react to the same click

#

Its a practical return imo^^

remote meteor
#

ui input works in hierarchy

#

if someone handled it, it doesnt get passed down

#

its a legit useful feature

solar bison
#

yes but small things like these are what creates barriers to get started with unreal

solar bison
icy dragon
#

Not really a barrier

remote meteor
#

and thats is what this channel is for πŸ™‚

solar bison
#

not a discord channel

#

i'm sure there are collectively 50+ people over the last couple years who've askde the same question πŸ™‚

remote meteor
#

a simple "ue4 return handle" result is all you need

#

and some effort to figure out stuffs

solar bison
#

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

remote meteor
#

also im not joking, the best documentation you have in unreal is the source code itself

#

its well documented within the source code

solar bison
remote meteor
#

you still can look at source code

solar bison
#

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.

remote meteor
#

you remove from parent and dereference it

#

and GC will clean up for you

solar bison
#

what;s the associated bp function?

remote meteor
#

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)

solar bison
#

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

remote meteor
#

mmh nope

solar bison
#

..

remote meteor
#

if you want clean slate its either you clean it yourself

#

or you create another one

solar bison
#

I don't mind creating another one. Just tell me how to destroy the previous one

remote meteor
#

remove from parent

remote meteor
#

and it will destroy itself

#

provided you did not store its reference as a variable

solar bison
#

I did not

icy dragon
#

The ever so hard working Unreal janitors will take it away once there's nothing else referencing it

remote meteor
#

poor janitors have to work on tight schedule

solar bison
#

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.

remote meteor
#

its not the best way but its ok once you get the hang of it

#

there are a bunch of useful stuff

icy dragon
#

Maybe that could lessen the pain to some degree

solar bison
#

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

icy dragon
#

You're still going to need a bit of BP if you want pain free asset referencing.

solar bison
#

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

remote meteor
#

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

solar bison
#

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

remote meteor
#

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

icy dragon
#

Personally I do things in BP to get things going. Only then I port things to C++ once performance had a concerning hit

remote meteor
#

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

solar bison
#

performance is the least of my concerns. code readability is

#

I'm not getting good code readability in blueprints